shaka-player 4.8.8 → 4.8.9

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.
@@ -237,7 +237,7 @@ function Eh(a){var b;return L(function(c){switch(c.g){case 1:if(a.m.mediaKeys)re
237
237
  r.Vc=function(a){var b=this;return L(function(c){if(1==c.g){if(!b.s)return b.B.na(a,"encrypted",function(){b.o(new Q(2,6,6010))}),c.return();b.m=a;b.B.na(b.m,"play",function(){for(var d=u(b.N),e=d.next();!e.done;e=d.next())Hh(b,e.value);b.Y=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return uh(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
238
238
  b.A.size?C(c,Eh(b),2):c.u(2)}Ih(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Fh(b,d)});F(c)})};
239
239
  function Jh(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=jg([a.g.serverCertificateUri],a.h.retryParameters);ra(g,3);c=a.C.zb.request(5,b);return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ab(d.data);ta(g,4);break;case 3:throw e=va(g),new Q(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
240
- ra(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=va(g),new Q(2,6,6004,f.message);}})}function Kh(a,b){var c,d,e;return L(function(f){if(1==f.g)return C(f,Lh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.ab=new Tf,d.push(e.ab);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);F(f)})}
240
+ ra(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=va(g),new Q(2,6,6004,f.message);}})}function Kh(a,b){var c,d,e;return L(function(f){if(1==f.g)return C(f,Lh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.bb=new Tf,d.push(e.bb);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);F(f)})}
241
241
  function Ih(a){var b,c,d,e,f;return L(function(g){if(1==g.g){if(!a.A.size)return g.u(2);a.A.forEach(function(h,k){Lh(a,k,h)});return C(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Mh(a))return g.return(a.l);a.l=new Tf;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=u(c);for(e=d.next();!e.done;e=d.next())f=e.value,Gh(a,f.initDataType,f.initData);Nh(a)&&a.l.resolve();return g.return(a.l)})}
242
242
  function Gh(a,b,c){if(c.length){var d=a.i.values();d=u(d);for(var e=d.next();!e.done;e=d.next())if(xb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Nh(a)&&(a.l.resolve(),a.l=new Tf,a.l.catch(function(){}));Oh(a,b,c,a.g.sessionType)}}function Ph(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Qh(a){a=a.i.keys();a=ug(a,function(b){return b.sessionId});return Array.from(a)}
243
243
  r.Te=function(){var a=this,b=this.i.keys();b=ug(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.cd=function(){var a=Infinity,b=this.i.keys();b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Kd=function(){return xg(this.ea)};
@@ -251,14 +251,14 @@ l.qe}}(d)))return e.keySystemAccess;a=u([!0,!1]);for(e=a.next();!e.done;e=a.next
251
251
  function Sh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,t,w,x;return L(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new Q(2,6,6E3);d=u(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=u(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){z.u(4);break}k=h.value;if(!b.has(k)){z.u(3);break}l=b.get(k);ra(z,6);return C(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
252
252
  z.h,z.return(c);case 6:va(z);case 7:sg(a.j);case 3:h=g.next();z.u(2);break;case 4:m=u([!0,!1]),n=m.next();case 9:if(n.done){z.u(11);break}q=n.value;p=u(b.keys());h=p.next();case 12:if(h.done){n=m.next();z.u(9);break}t=h.value;w=b.get(t);x=w.drmInfos.some(function(v){return!!v.licenseServerUri});if(x!=q){z.u(13);break}ra(z,15);return C(z,navigator.requestMediaKeySystemAccess(t,[w]),17);case 17:return c=z.h,z.return(c);case 15:va(z);case 16:sg(a.j);case 13:h=p.next();z.u(12);break;case 11:return z.return(c)}})}
253
253
  function Ah(a){a=wg(a.h.clearKeys);return 0==a.size?null:Gd(a)}function Uh(a){Nh(a)&&a.l.resolve()}function Vh(a,b){(new Mc(function(){b.loaded=!0;Uh(a)})).U(Wh)}
254
- function Lh(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new Q(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.Y?a.N.push(n):Hh(a,n)});a.B.D(d,"keystatuseschange",function(n){return Xh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,lf:Infinity,ab:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return C(m,
254
+ function Lh(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new Q(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.Y?a.N.push(n):Hh(a,n)});a.B.D(d,"keystatuseschange",function(n){return Xh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,lf:Infinity,bb:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return C(m,
255
255
  d.load(b),4);case 4:return g=m.h,sg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new Q(h,6,6013)),f.loaded=!0),Vh(a,f),Uh(a),m.return(d);case 2:k=va(m),sg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new Q(l,6,6005,k.message)),f.loaded=!0,Uh(a);case 3:return m.return(Promise.resolve())}})}
256
- function Oh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new Q(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.Y?a.N.push(f):Hh(a,f)});a.B.D(e,"keystatuseschange",function(f){return Xh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,lf:Infinity,ab:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof Q||(b=new Q(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&vd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
256
+ function Oh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new Q(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.Y?a.N.push(f):Hh(a,f)});a.B.D(e,"keystatuseschange",function(f){return Xh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,lf:Infinity,bb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof Q||(b=new Q(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&vd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
257
257
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new Q(2,6,6006,f.message,f,h))}})}
258
258
  function Hh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,t;L(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&vd(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=jg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(Ph(a.g.keySystem)){var x=
259
259
  md(g.body,!0,!0);if(x.includes("PlayReadyKeyMessage")){x=Rg(x,"PlayReadyKeyMessage");var z=$g(x,"HttpHeader");z=u(z);for(var v=z.next();!v.done;v=z.next()){var B=v.value;v=$g(B,"name")[0];B=$g(B,"value")[0];g.headers[Yg(v)]=Yg(B)}x=$g(x,"Challenge")[0];g.body=wd(Yg(x))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();ra(w,2);l=a.C.zb.request(2,g);return C(w,l.promise,4);case 4:k=w.h;ta(w,3);break;case 2:m=va(w);if(a.j.g)return w.return();n=new Q(2,6,6007,m);1==a.i.size?(a.o(n),
260
- d&&d.ab&&d.ab.reject(n)):(d&&d.ab&&d.ab.reject(n),a.i.delete(c),Nh(a)&&(a.l.resolve(),a.L.U(.1)));return w.return();case 3:if(a.j.g)return w.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&vd(k.data);ra(w,5);return C(w,c.update(k.data),7);case 7:ta(w,6);break;case 5:return q=va(w),p=new Q(2,6,6008,q.message),a.o(p),d&&d.ab&&d.ab.reject(p),w.return();case 6:if(a.j.g)return w.return();t=new T("drmsessionupdate");a.C.onEvent(t);d&&(d.ab&&d.ab.resolve(),Vh(a,d));F(w)}})}
261
- function Xh(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Ph(a.g.keySystem)&&16==g.byteLength&&(Qc()||bd())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Ad(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ab&&(a.i.delete(b),b.close().catch(function(){}));
260
+ d&&d.bb&&d.bb.reject(n)):(d&&d.bb&&d.bb.reject(n),a.i.delete(c),Nh(a)&&(a.l.resolve(),a.L.U(.1)));return w.return();case 3:if(a.j.g)return w.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&vd(k.data);ra(w,5);return C(w,c.update(k.data),7);case 7:ta(w,6);break;case 5:return q=va(w),p=new Q(2,6,6008,q.message),a.o(p),d&&d.bb&&d.bb.reject(p),w.return();case 6:if(a.j.g)return w.return();t=new T("drmsessionupdate");a.C.onEvent(t);d&&(d.bb&&d.bb.resolve(),Vh(a,d));F(w)}})}
261
+ function Xh(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Ph(a.g.keySystem)&&16==g.byteLength&&(Qc()||bd())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Ad(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.bb&&(a.i.delete(b),b.close().catch(function(){}));
262
262
  Nh(a)&&(a.l.resolve(),a.L.U(Yh))}function rh(a){var b=a.aa,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new Q(2,6,6014));a.C.fe(xg(c))}
263
263
  function Zh(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,q;return L(function(p){switch(p.g){case 1:ra(p,
264
264
  2);if("org.w3.clearkey"===l&&ed())throw Error("Unsupported keySystem");return C(p,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=p.h,q=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Vc()&&(q=!1),f.set(l,{persistentState:q}),C(p,m.createMediaKeys(),5);case 5:ta(p,0);break;case 2:va(p),f.set(l,null),F(p)}})},h=a.map(function(l){return g(l)}),C(k,Promise.all(h),2)):k.return(xg(f))})}
@@ -278,35 +278,35 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
278
278
  Copyright 2023 Google LLC
279
279
  SPDX-License-Identifier: Apache-2.0
280
280
  */
281
- function ei(a,b,c){this.h=a;this.i=b;this.g=c}function fi(a,b){return L(function(c){return 1==c.g?C(c,gi(a,b),2):c.return(hi(a,b))})}function gi(a,b){return L(function(c){if(1==c.g)return C(c,Ie(a.g,b,a.h.drm.preferredKeySystems),2);if(!b.variants.some(lf))throw new Q(2,4,4032);F(c)})}
282
- function hi(a,b){var c=He(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=u(b.variants),f=e.next();!f.done;f=e.next())f=f.value,ii(a,d.keySystem,f.video),ii(a,d.keySystem,f.audio);ji(a,b)}return c}function ii(a,b,c){if(c){c=u(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=u(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Gh(a.g,e.initDataType,e.initData)}}}
283
- function ji(a,b){a=a.g?a.g.Kd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=u(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=u(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=u(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?ki.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
284
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new Q(2,4,4012,a);}var ki=["output-restricted","internal-error"];function li(){}function mi(a,b){if(b){var c=ni[b.toLowerCase()];if(c)return c}throw new Q(2,4,4E3,a,b);}P("shaka.media.ManifestParser",li);li.unregisterParserByMime=function(a){delete ni[a]};li.registerParserByMime=function(a,b){ni[a]=b};li.registerParserByExtension=function(){pb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};li.AccessibilityPurpose={Aj:"visually impaired",Vi:"hard of hearing"};var ni={};function oi(a){function b(){d=!0}function c(l){f.push(l);Gg(l)}a=Ab(a);var d=!1,e,f=[],g=[];(new Bg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);Kg(l)}).O("encv",b).O("enca",b).O("dvav",function(l){g.push({box:l,Ya:1701733238})}).O("dva1",function(l){g.push({box:l,Ya:1701733238})}).O("dvh1",function(l){g.push({box:l,Ya:1701733238})}).O("dvhe",function(l){g.push({box:l,Ya:1701733238})}).O("hev1",function(l){g.push({box:l,Ya:1701733238})}).O("hvc1",
285
- function(l){g.push({box:l,Ya:1701733238})}).O("avc1",function(l){g.push({box:l,Ya:1701733238})}).O("avc3",function(l){g.push({box:l,Ya:1701733238})}).O("ac-3",function(l){g.push({box:l,Ya:1701733217})}).O("ec-3",function(l){g.push({box:l,Ya:1701733217})}).O("ac-4",function(l){g.push({box:l,Ya:1701733217})}).O("mp4a",function(l){g.push({box:l,Ya:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw bb(Ad(a)),new Q(2,3,3019);g.reverse();for(var h=u(g),k=h.next();!k.done;k=h.next())k=k.value,
286
- a=pi(a,e,k.box,f,k.Ya);return a}
287
- function pi(a,b,c,d,e){var f=qi.value(),g=a.subarray(c.start,c.start+c.size),h=Eb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Eb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);ri(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Sc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=u(d);for(d=a.next();!d.done;d=a.next())d=d.value,ri(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Jg(b);a=k.getUint32(b);
288
- k.setUint32(b,a+1);return e}function ri(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var qi=new Jc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function vi(a,b,c,d,e,f,g){this.$=a;this.Aa=b;this.ja=c;this.gf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}vi.prototype.ac=function(){return this.Aa};vi.prototype.Yb=function(){return this.ja};vi.prototype.ed=function(){return this.g};function wi(a,b){return a===b?!0:a&&b?a.ac()==b.ac()&&a.Yb()==b.Yb()&&Mb(a.$().sort(),b.$().sort())&&xb(a.ed(),b.ed()):a==b}P("shaka.media.InitSegmentReference",vi);
289
- vi.prototype.getEndByte=vi.prototype.Yb;vi.prototype.getStartByte=vi.prototype.ac;
290
- function xi(a,b,c,d,e,f,g,h,k,l,m,n,q,p,t,w){l=void 0===l?[]:l;p=void 0===p?yi:p;this.startTime=a;this.i=this.endTime=b;this.C=c;this.Aa=d;this.ja=e;this.ca=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===q?null:q;this.status=p;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===t?null:t;this.s=null;this.j=0;this.o=void 0===w?!1:w;this.Wd=this.md=!1;a=u(this.g);for(b=a.next();!b.done;b=
291
- a.next())b.value.pg();this.o&&this.g.length&&this.g[this.g.length-1].og();this.B=this.mimeType=this.codecs=null}r=xi.prototype;r.$=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.nh=function(){return this.endTime};r.ac=function(){return this.Aa};r.Yb=function(){return this.ja};r.Eh=function(){return this.tilesLayout};r.Dh=function(){return this.A};r.bc=function(){return this.status};r.Wh=function(){this.status=zi};r.ff=function(){this.preload=!0};r.Qh=function(){return this.preload};
281
+ function ei(a,b,c){this.h=a;this.i=b;this.g=c}function fi(a,b){return L(function(c){if(1==c.g)return C(c,Ie(a.g,b,a.h.drm.preferredKeySystems),2);De(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(lf))throw new Q(2,4,4032);return c.return(gi(a,b))})}
282
+ function gi(a,b){var c=He(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=u(b.variants),f=e.next();!f.done;f=e.next())f=f.value,hi(a,d.keySystem,f.video),hi(a,d.keySystem,f.audio);ii(a,b)}return c}function hi(a,b,c){if(c){c=u(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=u(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Gh(a.g,e.initDataType,e.initData)}}}
283
+ function ii(a,b){a=a.g?a.g.Kd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=u(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=u(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=u(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?ji.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
284
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new Q(2,4,4012,a);}var ji=["output-restricted","internal-error"];function ki(){}function li(a,b){if(b){var c=mi[b.toLowerCase()];if(c)return c}throw new Q(2,4,4E3,a,b);}P("shaka.media.ManifestParser",ki);ki.unregisterParserByMime=function(a){delete mi[a]};ki.registerParserByMime=function(a,b){mi[a]=b};ki.registerParserByExtension=function(){pb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ki.AccessibilityPurpose={Aj:"visually impaired",Vi:"hard of hearing"};var mi={};function ni(a){function b(){d=!0}function c(l){f.push(l);Gg(l)}a=Ab(a);var d=!1,e,f=[],g=[];(new Bg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);Kg(l)}).O("encv",b).O("enca",b).O("dvav",function(l){g.push({box:l,Za:1701733238})}).O("dva1",function(l){g.push({box:l,Za:1701733238})}).O("dvh1",function(l){g.push({box:l,Za:1701733238})}).O("dvhe",function(l){g.push({box:l,Za:1701733238})}).O("hev1",function(l){g.push({box:l,Za:1701733238})}).O("hvc1",
285
+ function(l){g.push({box:l,Za:1701733238})}).O("avc1",function(l){g.push({box:l,Za:1701733238})}).O("avc3",function(l){g.push({box:l,Za:1701733238})}).O("ac-3",function(l){g.push({box:l,Za:1701733217})}).O("ec-3",function(l){g.push({box:l,Za:1701733217})}).O("ac-4",function(l){g.push({box:l,Za:1701733217})}).O("mp4a",function(l){g.push({box:l,Za:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw bb(Ad(a)),new Q(2,3,3019);g.reverse();for(var h=u(g),k=h.next();!k.done;k=h.next())k=k.value,
286
+ a=oi(a,e,k.box,f,k.Za);return a}
287
+ function oi(a,b,c,d,e){var f=pi.value(),g=a.subarray(c.start,c.start+c.size),h=Eb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Eb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);qi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Sc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=u(d);for(d=a.next();!d.done;d=a.next())d=d.value,qi(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Jg(b);a=k.getUint32(b);
288
+ k.setUint32(b,a+1);return e}function qi(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var pi=new Jc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function ri(a,b,c,d,e,f,g){this.$=a;this.Aa=b;this.ja=c;this.gf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}ri.prototype.ac=function(){return this.Aa};ri.prototype.Yb=function(){return this.ja};ri.prototype.ed=function(){return this.g};function vi(a,b){return a===b?!0:a&&b?a.ac()==b.ac()&&a.Yb()==b.Yb()&&Mb(a.$().sort(),b.$().sort())&&xb(a.ed(),b.ed()):a==b}P("shaka.media.InitSegmentReference",ri);
289
+ ri.prototype.getEndByte=ri.prototype.Yb;ri.prototype.getStartByte=ri.prototype.ac;
290
+ function wi(a,b,c,d,e,f,g,h,k,l,m,n,q,p,t,w){l=void 0===l?[]:l;p=void 0===p?xi:p;this.startTime=a;this.i=this.endTime=b;this.C=c;this.Aa=d;this.ja=e;this.ca=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===q?null:q;this.status=p;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===t?null:t;this.s=null;this.j=0;this.o=void 0===w?!1:w;this.Wd=this.md=!1;a=u(this.g);for(b=a.next();!b.done;b=
291
+ a.next())b.value.pg();this.o&&this.g.length&&this.g[this.g.length-1].og();this.B=this.mimeType=this.codecs=null}r=wi.prototype;r.$=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.nh=function(){return this.endTime};r.ac=function(){return this.Aa};r.Yb=function(){return this.ja};r.Eh=function(){return this.tilesLayout};r.Dh=function(){return this.A};r.bc=function(){return this.status};r.Wh=function(){this.status=yi};r.ff=function(){this.preload=!0};r.Qh=function(){return this.preload};
292
292
  r.Zd=function(){this.l=!1};r.Nh=function(){return this.l};r.pg=function(){this.md=!0};r.Ph=function(){return this.md};r.og=function(){this.Wd=!0};r.Oh=function(){return this.Wd};r.ng=function(){this.m=!0};r.Kh=function(){return this.m};r.Gg=function(a){this.s=a};r.Ch=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
293
- r.Hf=function(a){null==this.h?Ua("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.zi=function(a){this.B=a};r.ed=function(){return this.B};function Ai(a,b){a.ca=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())Ai(c.value,b)}P("shaka.media.SegmentReference",xi);xi.prototype.getSegmentData=xi.prototype.ed;xi.prototype.setSegmentData=xi.prototype.zi;xi.prototype.syncAgainst=xi.prototype.Hf;xi.prototype.offset=xi.prototype.offset;
294
- xi.prototype.getThumbnailSprite=xi.prototype.Ch;xi.prototype.setThumbnailSprite=xi.prototype.Gg;xi.prototype.hasByterangeOptimization=xi.prototype.Kh;xi.prototype.markAsByterangeOptimization=xi.prototype.ng;xi.prototype.isLastPartial=xi.prototype.Oh;xi.prototype.markAsLastPartial=xi.prototype.og;xi.prototype.isPartial=xi.prototype.Ph;xi.prototype.markAsPartial=xi.prototype.pg;xi.prototype.isIndependent=xi.prototype.Nh;xi.prototype.markAsNonIndependent=xi.prototype.Zd;xi.prototype.isPreload=xi.prototype.Qh;
295
- xi.prototype.markAsPreload=xi.prototype.ff;xi.prototype.markAsUnavailable=xi.prototype.Wh;xi.prototype.getStatus=xi.prototype.bc;xi.prototype.getTileDuration=xi.prototype.Dh;xi.prototype.getTilesLayout=xi.prototype.Eh;xi.prototype.getEndByte=xi.prototype.Yb;xi.prototype.getStartByte=xi.prototype.ac;xi.prototype.getEndTime=xi.prototype.nh;xi.prototype.getStartTime=xi.prototype.getStartTime;xi.prototype.getUris=xi.prototype.$;var yi=0,zi=1;xi.Status={Ii:yi,yj:zi,aj:2};function Bi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ci(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Di(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=u(Ei(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
296
- function Fi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ei(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ei(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
293
+ r.Hf=function(a){null==this.h?Ua("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.zi=function(a){this.B=a};r.ed=function(){return this.B};function zi(a,b){a.ca=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())zi(c.value,b)}P("shaka.media.SegmentReference",wi);wi.prototype.getSegmentData=wi.prototype.ed;wi.prototype.setSegmentData=wi.prototype.zi;wi.prototype.syncAgainst=wi.prototype.Hf;wi.prototype.offset=wi.prototype.offset;
294
+ wi.prototype.getThumbnailSprite=wi.prototype.Ch;wi.prototype.setThumbnailSprite=wi.prototype.Gg;wi.prototype.hasByterangeOptimization=wi.prototype.Kh;wi.prototype.markAsByterangeOptimization=wi.prototype.ng;wi.prototype.isLastPartial=wi.prototype.Oh;wi.prototype.markAsLastPartial=wi.prototype.og;wi.prototype.isPartial=wi.prototype.Ph;wi.prototype.markAsPartial=wi.prototype.pg;wi.prototype.isIndependent=wi.prototype.Nh;wi.prototype.markAsNonIndependent=wi.prototype.Zd;wi.prototype.isPreload=wi.prototype.Qh;
295
+ wi.prototype.markAsPreload=wi.prototype.ff;wi.prototype.markAsUnavailable=wi.prototype.Wh;wi.prototype.getStatus=wi.prototype.bc;wi.prototype.getTileDuration=wi.prototype.Dh;wi.prototype.getTilesLayout=wi.prototype.Eh;wi.prototype.getEndByte=wi.prototype.Yb;wi.prototype.getStartByte=wi.prototype.ac;wi.prototype.getEndTime=wi.prototype.nh;wi.prototype.getStartTime=wi.prototype.getStartTime;wi.prototype.getUris=wi.prototype.$;var xi=0,yi=1;wi.Status={Ii:xi,yj:yi,aj:2};function Ai(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Bi(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ci(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=u(Di(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
296
+ function Ei(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Di(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Di(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
297
297
  @license
298
298
  Shaka Player
299
299
  Copyright 2022 Google LLC
300
300
  SPDX-License-Identifier: Apache-2.0
301
301
  */
302
- function Gi(){}function Hi(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Ii(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Ji(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
303
- function Ki(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=jd(Ab(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=jd(Ab(a.data,3+c,f)),h;"--\x3e"===d?h=jd(Ab(a.data,4+c+f)):h=Bb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
302
+ function Fi(){}function Gi(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Hi(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Ii(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
303
+ function Ji(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=jd(Ab(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=jd(Ab(a.data,3+c,f)),h;"--\x3e"===d?h=jd(Ab(a.data,4+c+f)):h=Bb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
304
304
  d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=jd(Ab(a.data,1,d));a=jd(Ab(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=jd(Ab(a.data,1,d));a=jd(Ab(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=jd(Ab(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
305
305
  c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Bb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=jd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=jd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Bb(a.data),b):null}
306
- function Li(a){for(var b=0,c=[];Hi(a,b);){var d=Ji(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Ji(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ki(e))&&c.push(f);b+=e.size+10}Ii(a,b)&&(b+=10)}return c}function Mi(a,b){for(var c=b=void 0===b?0:b,d=0;Hi(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Ji(a,b+6),Ii(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}P("shaka.util.Id3Utils",Gi);Gi.getID3Data=Mi;
307
- Gi.getID3Frames=Li;function Ni(a,b){var c=null,d=null,e=null,f=a.M();b&1&&(e=a.Cc());b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:f,Yf:c,hh:d,Cj:e}}function Oi(a,b){return 1==b?(b=a.M(),a=a.M(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.M()}}function Pi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.M();a.skip(4);a=a.ra();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
308
- function Qi(a,b,c){var d=a.M(),e=[],f=null;c&1&&(f=a.M());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={yf:null,sampleSize:null,ie:null};c&256&&(h.yf=a.M());c&512&&(h.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(h.ie=0==b?a.M():a.tg());e.push(h)}return{Gj:d,xg:e,gh:f}}
309
- function Ri(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.M();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.ra()+a.ra()/16;a=a.ra()+a.ra()/16;return{trackId:c,width:b,height:a}}function Si(a){a=a.M();return{Ea:Fg(a)}}function Ti(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Ui(a){return(10>a?"0":"")+a};/*
306
+ function Ki(a){for(var b=0,c=[];Gi(a,b);){var d=Ii(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Ii(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ji(e))&&c.push(f);b+=e.size+10}Hi(a,b)&&(b+=10)}return c}function Li(a,b){for(var c=b=void 0===b?0:b,d=0;Gi(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Ii(a,b+6),Hi(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}P("shaka.util.Id3Utils",Fi);Fi.getID3Data=Li;
307
+ Fi.getID3Frames=Ki;function Mi(a,b){var c=null,d=null,e=null,f=a.M();b&1&&(e=a.Cc());b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:f,Yf:c,hh:d,Cj:e}}function Ni(a,b){return 1==b?(b=a.M(),a=a.M(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.M()}}function Oi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.M();a.skip(4);a=a.ra();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
308
+ function Pi(a,b,c){var d=a.M(),e=[],f=null;c&1&&(f=a.M());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={yf:null,sampleSize:null,ie:null};c&256&&(h.yf=a.M());c&512&&(h.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(h.ie=0==b?a.M():a.tg());e.push(h)}return{Gj:d,xg:e,gh:f}}
309
+ function Qi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.M();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.ra()+a.ra()/16;a=a.ra()+a.ra()/16;return{trackId:c,width:b,height:a}}function Ri(a){a=a.M();return{Ea:Fg(a)}}function Si(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Ti(a){return(10>a?"0":"")+a};/*
310
310
 
311
311
  Copyright Brightcove, Inc.
312
312
 
@@ -322,1032 +322,1032 @@ function Ri(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.M();1=
322
322
  See the License for the specific language governing permissions and
323
323
  limitations under the License.
324
324
  */
325
- function Vi(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Ab(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Wi(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new yg(c,0)).M(),a.g=8*d,a.i-=d)}function Xi(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Wi(a)}a.h<<=b;a.g-=b}
326
- function Yi(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Wi(a);c=b-c;return 0<c?d<<c|Yi(a,c):d}function Zi(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Wi(a);return b+Zi(a)}function $i(a){Xi(a,1+Zi(a))}function U(a){var b=Zi(a);return Yi(a,b+1)-1}function aj(a){a=U(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===Yi(a,1)}function bj(a){return Yi(a,8)}
327
- function ij(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=aj(a),d=(c+d+256)%256),c=0===d?c:d}function jj(a){bj(a);U(a);return U(a)}P("shaka.util.ExpGolomb",Vi);function kj(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}r=kj.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
328
- r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,lj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Sd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
325
+ function Ui(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Ab(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Vi(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new yg(c,0)).M(),a.g=8*d,a.i-=d)}function Wi(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Vi(a)}a.h<<=b;a.g-=b}
326
+ function Xi(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Vi(a);c=b-c;return 0<c?d<<c|Xi(a,c):d}function Yi(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Vi(a);return b+Yi(a)}function Zi(a){Wi(a,1+Yi(a))}function U(a){var b=Yi(a);return Xi(a,b+1)-1}function $i(a){a=U(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===Xi(a,1)}function aj(a){return Xi(a,8)}
327
+ function bj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=$i(a),d=(c+d+256)%256),c=0===d?c:d}function ij(a){aj(a);U(a);return U(a)}P("shaka.util.ExpGolomb",Ui);function jj(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}r=jj.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
328
+ r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,kj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Sd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
329
329
  k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,q=m;2<q;){var p=f[n+1]+2;switch(f[n]){case 5:var t=nd(f.subarray(n+2,n+p));-1==g.audio&&"Opus"===t?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===t&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(t=
330
330
  null,128===f[n+2]&&(t=f[n+3]),null!=t&&(this.F={channelCount:0===(t&15)?2:t&15,ah:t,sampleRate:48E3}))}n+=p;q-=p}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Sd&&(g.Sd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
331
331
  break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.I=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Sd&&(this.C=f.Sd);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.I:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
332
332
  break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
333
- function mj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=nj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=nj(d,
333
+ function lj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=mj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=mj(d,
334
334
  a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.bi=function(a){pb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.qf(a)};
335
335
  r.qf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var q=a[n];if(q){if(2<=g&&1==q){b&&!h.length&&-1==k&&(q=n-(3<g?3:g),c&&0!=q&&(q=a.subarray(0,q),b.data=Bd(b.data,q),b.fullData=Bd(b.fullData,q)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Bd(b.data,k),b.fullData=Bd(b.fullData,k)));if(n>=e-f)return h;
336
- n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Bd(b.data,a),b.fullData=Bd(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=u(this.l),c=b.next();!c.done;c=b.next())c=Bd.apply(td,y(c.value)),(c=mj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Li(c.data),dts:c.dts,pts:c.pts});return a};
337
- r.Gb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=u(this.i),c=b.next();!c.done;c=b.next()){var d=Bd.apply(td,y(c.value)),e=mj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Bd(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
338
- r.xc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=u(this.j),d=c.next();!d.done;d=c.next()){var e=Bd.apply(td,y(d.value)),f=mj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Bd(d.data,e),this.g.push(d))}if(a){var g;c=u(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.qf(d,
336
+ n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Bd(b.data,a),b.fullData=Bd(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=u(this.l),c=b.next();!c.done;c=b.next())c=Bd.apply(td,y(c.value)),(c=lj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Ki(c.data),dts:c.dts,pts:c.pts});return a};
337
+ r.Gb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=u(this.i),c=b.next();!c.done;c=b.next()){var d=Bd.apply(td,y(c.value)),e=lj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Bd(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
338
+ r.xc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=u(this.j),d=c.next();!d.done;d=c.next()){var e=Bd.apply(td,y(d.value)),f=lj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Bd(d.data,e),this.g.push(d))}if(a){var g;c=u(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.qf(d,
339
339
  g,void 0),d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Gb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.xc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};
340
- r.bd=function(){return{audio:this.A,video:this.m}};r.Od=function(){for(var a=[],b=u(this.xc()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value.nalus));return a};r.Hh=function(){pb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Xe();return{height:a.height,width:a.width}};r.Xe=function(){return"hvc"==this.m?oj(this):pj(this)};
341
- function pj(a){var b={height:null,width:null,Ea:null};a=a.Od();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new Vi(a.data);var c=bj(a),d=bj(a),e=bj(a);$i(a);if(qj.includes(c)){var f=U(a);3===f&&Xi(a,1);$i(a);$i(a);Xi(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?ij(a,16):ij(a,64))}}$i(a);f=U(a);if(0===f)U(a);else if(1===f)for(Xi(a,1),$i(a),$i(a),f=U(a),g=0;g<f;g++)$i(a);$i(a);Xi(a,1);f=U(a);g=U(a);var h=Yi(a,1);0===h&&Xi(a,1);Xi(a,1);var k=0,l=0,m=0,n=
340
+ r.bd=function(){return{audio:this.A,video:this.m}};r.Od=function(){for(var a=[],b=u(this.xc()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value.nalus));return a};r.Hh=function(){pb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Xe();return{height:a.height,width:a.width}};r.Xe=function(){return"hvc"==this.m?nj(this):oj(this)};
341
+ function oj(a){var b={height:null,width:null,Ea:null};a=a.Od();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new Ui(a.data);var c=aj(a),d=aj(a),e=aj(a);Zi(a);if(pj.includes(c)){var f=U(a);3===f&&Wi(a,1);Zi(a);Zi(a);Wi(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?bj(a,16):bj(a,64))}}Zi(a);f=U(a);if(0===f)U(a);else if(1===f)for(Wi(a,1),Zi(a),Zi(a),f=U(a),g=0;g<f;g++)Zi(a);Zi(a);Wi(a,1);f=U(a);g=U(a);var h=Xi(a,1);0===h&&Wi(a,1);Wi(a,1);var k=0,l=0,m=0,n=
342
342
  0;W(a)&&(k=U(a),l=U(a),m=U(a),n=U(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.Ea="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
343
- function oj(a){var b={height:null,width:null,Ea:null};a=a.Od();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new Vi(a.fullData,!0);bj(c);bj(c);Yi(c,4);var d=Yi(c,3);W(c);var e=Yi(c,2),f=Yi(c,1),g=Yi(c,5),h=Yi(c,32);a=bj(c);for(var k=bj(c),l=bj(c),m=bj(c),n=bj(c),q=bj(c),p=bj(c),t=[],w=[],x=0;x<d;x++)t.push(W(c)),w.push(W(c));if(0<d)for(x=d;8>x;x++)Yi(c,2);for(x=0;x<d;x++)t[x]&&Yi(c,88),w[x]&&bj(c);U(c);d=U(c);3==d&&Yi(c,1);t=U(c);w=U(c);var z=x=0,v=0,B=0;W(c)&&
343
+ function nj(a){var b={height:null,width:null,Ea:null};a=a.Od();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new Ui(a.fullData,!0);aj(c);aj(c);Xi(c,4);var d=Xi(c,3);W(c);var e=Xi(c,2),f=Xi(c,1),g=Xi(c,5),h=Xi(c,32);a=aj(c);for(var k=aj(c),l=aj(c),m=aj(c),n=aj(c),q=aj(c),p=aj(c),t=[],w=[],x=0;x<d;x++)t.push(W(c)),w.push(W(c));if(0<d)for(x=d;8>x;x++)Xi(c,2);for(x=0;x<d;x++)t[x]&&Xi(c,88),w[x]&&aj(c);U(c);d=U(c);3==d&&Xi(c,1);t=U(c);w=U(c);var z=x=0,v=0,B=0;W(c)&&
344
344
  (x+=U(c),z+=U(c),v+=U(c),B+=U(c));b.width=String(t-(x+z)*(1===d||2===d?2:1));b.height=String(w-(v+B)*(1===d?2:1));c=function(A){for(var D=0,H=0;32>H;H++)D|=(A>>H&1)<<31-H;return D>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;q&&(e+="."+q.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
345
- a.toString(16).toUpperCase());b.Ea=e;return b}function nj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function rj(a){return 0>lj(a)?!1:!0}function lj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}P("shaka.util.TsParser",kj);kj.syncOffset=lj;kj.probe=rj;kj.prototype.getVideoInfo=kj.prototype.Xe;kj.prototype.getVideoResolution=kj.prototype.Hh;kj.prototype.getVideoNalus=kj.prototype.Od;
346
- kj.prototype.getCodecs=kj.prototype.bd;kj.prototype.getStartTime=kj.prototype.getStartTime;kj.prototype.getVideoData=kj.prototype.xc;kj.prototype.getAudioData=kj.prototype.Gb;kj.prototype.getMetadata=kj.prototype.getMetadata;kj.prototype.parseNalus=kj.prototype.qf;kj.prototype.parseAvcNalus=kj.prototype.bi;kj.prototype.parse=kj.prototype.parse;kj.prototype.clearData=kj.prototype.clearData;kj.Timescale=9E4;var qj=[100,110,122,244,44,83,86,118,128,138,139,134];function sj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Wa("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,pb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Wa("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Wa("Could not find LCEVC Library on this page"),
347
- a=!1):(this.h.SupportObject.SupportStatus||Wa(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function tj(a){a.g&&a.i.classList.add("shaka-hidden")}
348
- sj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function uj(a,b,c){var d=vj,e=wj;switch(b.mimeType){case "video/webm":d=xj;break;case "video/mp4":d=yj}switch(c){case "DASH":e=zj;break;case "HLS":e=Aj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",sj);sj.prototype.release=sj.prototype.release;var vj=0,xj=1,yj=2,Aj=0,zj=1,wj=-1;function Bj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.qa={};this.g=null;this.ba=!1;this.ta=c||function(){};this.T=d||null;this.j={};this.o=new eb;this.m={};this.H=null;this.L=new Tf;this.N="";this.da=!1;this.l=Cj(this,this.L);this.C=!1;this.I=new rg(function(){return Dj(e)});this.B=!1;this.aa="UNKNOWN";this.pa=this.sa=!1;this.ia=new Tf;this.s=!1;this.ea=!0;this.K=this.Y=null}
349
- function Cj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.ea=!0});a.o.D(c,"endstreaming",function(){a.ea=!1});a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.N=Ej(c);a.i.src=a.N;return c}c=new MediaSource;a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.N=Ej(c);a.i.src=a.N;return c}
350
- function Fj(a,b){var c,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return a.createSegmentIndex?C(p,a.createSegmentIndex(),2):p.u(2);if(!a.segmentIndex)return p.return(!1);if(0==a.segmentIndex.getNumReferences())return p.return(!0);c=Md;d=new Set;e=u(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ma){if(m=Od(h,k),!fe(m))return p.return(!1)}else if(b==c.fa?k=Pe(k):b==c.S&&(k=Qe(k,h)),n=
351
- Sd(a,h,k),q=Qd(h,k),!kb(n)&&!lc(q))return p.return(!1);return p.return(!0)})}r=Bj.prototype;r.destroy=function(){return this.I.destroy()};
352
- function Dj(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(oe)),f=u(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new Q(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.m)b.push(a.m[k].destroy());return C(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.F=null;a.h={};a.m={};a.H=null;
353
- a.j={};a.T=null;a.K=null;F(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return f=Md,C(m,e.L,2);case 2:e.B=b,e.aa=c,e.sa=d,e.pa=!e.B&&"HLS"==e.aa&&!e.sa,e.K=null,g=u(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return C(m,Gj(e,k,l,l.codecs),6);case 6:e.s?(e.j[f.S]=[],e.j[f.fa]=[]):e.j[k]=[],h=g.next(),m.u(3)}})};
354
- function Gj(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,t,w;return L(function(x){switch(x.g){case 1:return e=Md,f=Oa,g=Pa,C(x,Fj(c,b),2);case 2:g.call(f,x.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Od(c.mimeType,d);if(b==e.ma){Hj(a,h,a.B,c.external);x.u(0);break}k=a.A.forceTransmux;if(!kb(h)||!a.B&&Pd.includes(h))k=!0;l=Qd(c.mimeType,d);if(!k){x.u(4);break}m=Id(e.S,(d||"").split(","));n=Id(e.fa,(d||"").split(","));if(!m||!n){x.u(5);break}a.s=!0;return C(x,Gj(a,e.S,c,m),6);case 6:return C(x,
355
- Gj(a,e.fa,c,n),7);case 7:return x.return();case 5:if(q=lc(l))p=q(),a.m[b]=p,h=p.convertCodecs(b,l);case 4:t=h+a.A.addExtraFeaturesToSourceBuffer(h);sg(a.I);try{w=a.l.addSourceBuffer(t)}catch(z){throw new Q(2,3,3015,z,"The mediaSource_ status was "+a.l.readyState+" expected 'open'");}a.B&&(w.mode=Ij);a.o.D(w,"error",function(){a.j[b][0].p.reject(new Q(2,3,3014,a.i.error?a.i.error.code:0))});a.o.D(w,"updateend",function(){return Jj(a,b)});a.h[b]=w;a.G[b]=h;a.qa[b]=!!c.drmInfos.length;F(x)}})}
345
+ a.toString(16).toUpperCase());b.Ea=e;return b}function mj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function qj(a){return 0>kj(a)?!1:!0}function kj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}P("shaka.util.TsParser",jj);jj.syncOffset=kj;jj.probe=qj;jj.prototype.getVideoInfo=jj.prototype.Xe;jj.prototype.getVideoResolution=jj.prototype.Hh;jj.prototype.getVideoNalus=jj.prototype.Od;
346
+ jj.prototype.getCodecs=jj.prototype.bd;jj.prototype.getStartTime=jj.prototype.getStartTime;jj.prototype.getVideoData=jj.prototype.xc;jj.prototype.getAudioData=jj.prototype.Gb;jj.prototype.getMetadata=jj.prototype.getMetadata;jj.prototype.parseNalus=jj.prototype.qf;jj.prototype.parseAvcNalus=jj.prototype.bi;jj.prototype.parse=jj.prototype.parse;jj.prototype.clearData=jj.prototype.clearData;jj.Timescale=9E4;var pj=[100,110,122,244,44,83,86,118,128,138,139,134];function rj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Wa("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,pb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Wa("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Wa("Could not find LCEVC Library on this page"),
347
+ a=!1):(this.h.SupportObject.SupportStatus||Wa(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function sj(a){a.g&&a.i.classList.add("shaka-hidden")}
348
+ rj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function tj(a,b,c){var d=uj,e=vj;switch(b.mimeType){case "video/webm":d=wj;break;case "video/mp4":d=xj}switch(c){case "DASH":e=yj;break;case "HLS":e=zj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",rj);rj.prototype.release=rj.prototype.release;var uj=0,wj=1,xj=2,zj=0,yj=1,vj=-1;function Aj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.qa={};this.g=null;this.ba=!1;this.ta=c||function(){};this.T=d||null;this.j={};this.o=new eb;this.m={};this.H=null;this.L=new Tf;this.N="";this.da=!1;this.l=Bj(this,this.L);this.C=!1;this.I=new rg(function(){return Cj(e)});this.B=!1;this.aa="UNKNOWN";this.pa=this.sa=!1;this.ia=new Tf;this.s=!1;this.ea=!0;this.K=this.Y=null}
349
+ function Bj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.ea=!0});a.o.D(c,"endstreaming",function(){a.ea=!1});a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.N=Dj(c);a.i.src=a.N;return c}c=new MediaSource;a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.N=Dj(c);a.i.src=a.N;return c}
350
+ function Ej(a,b){var c,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return a.createSegmentIndex?C(p,a.createSegmentIndex(),2):p.u(2);if(!a.segmentIndex)return p.return(!1);if(0==a.segmentIndex.getNumReferences())return p.return(!0);c=Md;d=new Set;e=u(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ma){if(m=Od(h,k),!fe(m))return p.return(!1)}else if(b==c.fa?k=Pe(k):b==c.S&&(k=Qe(k,h)),n=
351
+ Sd(a,h,k),q=Qd(h,k),!kb(n)&&!lc(q))return p.return(!1);return p.return(!0)})}r=Aj.prototype;r.destroy=function(){return this.I.destroy()};
352
+ function Cj(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(oe)),f=u(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new Q(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.m)b.push(a.m[k].destroy());return C(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.F=null;a.h={};a.m={};a.H=null;
353
+ a.j={};a.T=null;a.K=null;F(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return f=Md,C(m,e.L,2);case 2:e.B=b,e.aa=c,e.sa=d,e.pa=!e.B&&"HLS"==e.aa&&!e.sa,e.K=null,g=u(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return C(m,Fj(e,k,l,l.codecs),6);case 6:e.s?(e.j[f.S]=[],e.j[f.fa]=[]):e.j[k]=[],h=g.next(),m.u(3)}})};
354
+ function Fj(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,t,w;return L(function(x){switch(x.g){case 1:return e=Md,f=Oa,g=Pa,C(x,Ej(c,b),2);case 2:g.call(f,x.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Od(c.mimeType,d);if(b==e.ma){Gj(a,h,a.B,c.external);x.u(0);break}k=a.A.forceTransmux;if(!kb(h)||!a.B&&Pd.includes(h))k=!0;l=Qd(c.mimeType,d);if(!k){x.u(4);break}m=Id(e.S,(d||"").split(","));n=Id(e.fa,(d||"").split(","));if(!m||!n){x.u(5);break}a.s=!0;return C(x,Fj(a,e.S,c,m),6);case 6:return C(x,
355
+ Fj(a,e.fa,c,n),7);case 7:return x.return();case 5:if(q=lc(l))p=q(),a.m[b]=p,h=p.convertCodecs(b,l);case 4:t=h+a.A.addExtraFeaturesToSourceBuffer(h);sg(a.I);try{w=a.l.addSourceBuffer(t)}catch(z){throw new Q(2,3,3015,z,"The mediaSource_ status was "+a.l.readyState+" expected 'open'");}a.B&&(w.mode=Hj);a.o.D(w,"error",function(){a.j[b][0].p.reject(new Q(2,3,3014,a.i.error?a.i.error.code:0))});a.o.D(w,"updateend",function(){return Ij(a,b)});a.h[b]=w;a.G[b]=h;a.qa[b]=!!c.drmInfos.length;F(x)}})}
356
356
  r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
357
- function Hj(a,b,c,d){a.g||(a.g=new ee(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ba;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,he[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):pb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):pb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
358
- function Kj(a){return a.C?!1:a.l?"ended"==a.l.readyState:!0}function Lj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Kd?a=a.g.g:(a=Mj(a,b),a=!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Nj(a,b){return a.C?null:b==Kd?a.g.h:Bi(Mj(a,b))}function Oj(a,b,c){if(a.C)return 0;if(b==Kd)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Mj(a,b);return Di(a,c)}
359
- r.ob=function(){var a={total:this.C?[]:Ei(this.i.buffered),audio:this.C?[]:Ei(Mj(this,"audio")),video:this.C?[]:Ei(Mj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Mj(a,b){try{return a.h[b].buffered}catch(c){return null}}
360
- function Pj(a,b,c,d,e,f){var g=null,h=Ab(c);if(Pd.includes(e))f=Li(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ta([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ca&&d.ca.timescale){var k=d.ca.timescale;if(!isNaN(k)){var l=0,m=!1;(new Bg).box("moof",Gg).box("traf",Gg).O("tfdt",function(n){l=Oi(n.reader,
361
- n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!rj(h)||(a.K?a.K.clearData():a.K=new kj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ta(h,f,d?d.endTime:null));return g}
362
- function Qj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,q,p,t,w,x,z,v,B,A;return L(function(D){switch(D.g){case 1:m=Md;if(b!=m.ma){D.u(2);break}if(!a.B){D.u(3);break}return C(D,a.ia,4);case 4:n=D.h,a.g.s=n;case 3:return C(D,ie(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.$()[0]:null),5);case 5:return D.return();case 2:if(l||!a.s){D.u(6);break}return C(D,Qj(a,m.S,c,d,e,f,g,h,k,!0),7);case 7:return C(D,Qj(a,m.fa,c,d,e,f,g,h,k,!0),8);case 8:return D.return();
363
- case 6:if(!a.h[b])return D.return();q=a.h[b].timestampOffset;p=a.G[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(t=Pj(a,b,c,d,p,q),null!=t&&(w=d.startTime-t,x=Math.abs(q-w),(.001<=x||g||h)&&(!k||0<w||!q)&&(q=w,a.pa&&(Rj(a,b,function(){return Sj(a,b)}),Rj(a,b,function(){return Tj(a,b,q)}))),z=b==m.fa||!(m.fa in a.h),a.B&&z&&a.ia.resolve(q)));f&&b==m.fa&&(a.g||Hj(a,"application/cea-608",a.B,!1),a.H||(v=p.split(";",1)[0],a.H=new Gb(v)),d?(B=a.H.i(c),B.length&&me(a.g,B,d.startTime,d.endTime,q)):a.H.init(c,
364
- h));if(!a.m[b]){D.u(9);break}return C(D,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=D.h;case 9:return c=Uj(a,c,d?d.startTime:null,b),d&&a.B&&b!=m.ma&&(g||h)&&(A=d.startTime,Rj(a,b,function(){return Sj(a,b)}),Rj(a,b,function(){return Tj(a,b,A)})),C(D,Rj(a,b,function(){var H=c;if("video"==b&&a.T){var J=a.T;J.g&&J.g.appendBuffer(H,"video",J.o,-q)}a.h[b].appendBuffer(H)}),11);case 11:F(D)}})}function Vj(a,b){var c=Nj(a,"video")||0;ke(a.g,b,c)}function Wj(a){a.g&&ke(a.g,"",0)}
365
- r.remove=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=Md,a==e.ma?C(f,d.g.remove(b,c),0):C(f,Rj(d,a,function(){return Xj(d,a,b,c)}),4)):d.s?C(f,Rj(d,e.S,function(){return Xj(d,e.S,b,c)}),0):f.u(0)})};function Yj(a,b){var c;return L(function(d){return 1==d.g?(c=Md,b==c.ma?a.g?C(d,a.g.remove(0,Infinity),0):d.return():C(d,Rj(a,b,function(){return Xj(a,b,0,a.l.duration)}),4)):a.s?C(d,Rj(a,c.S,function(){return Xj(a,c.S,0,a.l.duration)}),0):d.u(0)})}
366
- r.flush=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Md,a==c.ma?d.return():C(d,Rj(b,a,function(){b.i.currentTime-=.001;Jj(b,a)}),2)):b.s?C(d,Rj(b,c.S,function(){var e=c.S;b.i.currentTime-=.001;Jj(b,e)}),0):d.u(0)})};
367
- function Zj(a,b,c,d,e,f,g,h,k){var l,m,n;return L(function(q){if(1==q.g){l=Md;if(b==l.ma)return f||(a.g.s=c),je(a.g,d,e),q.return();m=[];return C(q,ak(a,b,g,h,k),2)}n=q.h;n||(m.push(Rj(a,b,function(){return Sj(a,b)})),a.s&&m.push(Rj(a,l.S,function(){return Sj(a,l.S)})));f||(m.push(Rj(a,b,function(){return Tj(a,b,c)})),a.s&&m.push(Rj(a,l.S,function(){return Tj(a,l.S,c)})));m.push(Rj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Jj(a,b)}));a.s&&m.push(Rj(a,
368
- l.S,function(){var p=l.S;a.h[p].appendWindowStart=0;a.h[p].appendWindowEnd=e;a.h[p].appendWindowStart=d;Jj(a,p)}));return C(q,Promise.all(m),0)})}function bk(a,b,c){var d;return L(function(e){if(1==e.g){d=Md;if(b==d.ma)return e.return();b==d.fa&&(a.ia=new Tf);Rj(a,b,function(){return Sj(a,b)});a.s&&Rj(a,d.S,function(){return Sj(a,d.S)});return C(e,Rj(a,b,function(){return Tj(a,b,c)}),2)}return a.s?C(e,Rj(a,d.S,function(){return Tj(a,d.S,c)}),0):e.u(0)})}
369
- r.endOfStream=function(a){var b=this;return L(function(c){return C(c,ck(b,function(){Kj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.$a=function(a){var b=this;return L(function(c){return C(c,ck(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Tf};b.j[d].unshift(e)}b.l.duration=a;b.Y=a}),0)})};r.getDuration=function(){return this.l.duration};function Xj(a,b,c,d){d<=c?Jj(a,b):a.h[b].remove(c,d)}
370
- function Sj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Jj(a,b)}function Tj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Jj(a,b)}function Jj(a,b){if(!a.C){var c=a.j[b][0];c&&(c.p.resolve(),dk(a,b))}}function Rj(a,b,c){sg(a.I);c={start:c,p:new Tf};a.j[b].push(c);1==a.j[b].length&&ek(a,b);return c.p}
371
- function ck(a,b){var c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:sg(a.I);c=[];d={};for(e in a.h)d.Mc=new Tf,f={start:function(m){return function(){return m.Mc.resolve()}}(d),p:d.Mc},a.j[e].push(f),c.push(d.Mc),1==a.j[e].length&&f.start(),d={Mc:d.Mc};ra(l,2);return C(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=va(l),g;case 3:return ra(l,5,6),C(l,b(),6);case 6:wa(l);for(h in a.h)dk(a,h);ya(l,0);break;case 5:throw k=va(l),new Q(2,3,3015,k,a.i.error||"No error in the media element");
372
- }})}function dk(a,b){a.j[b].shift();ek(a,b)}function ek(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new Q(2,3,3017,b)):c.p.reject(new Q(2,3,3015,d,a.i.error||"No error in the media element")),dk(a,b)}}function Uj(a,b,c,d){var e=a.qa[d];a.A.insertFakeEncryptionInInit&&null==c&&e&&(Uc()||Sc()||Tc("SOPOpenBrowser"))&&"mp4"==Ud(a.G[d])&&(b=oi(b));return b}
373
- function fk(a,b,c,d){return Rj(a,b,function(){b!==Kd&&(nb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Jj(a,b))})}
374
- function gk(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E;return L(function(G){switch(G.g){case 1:c=Md;a.C=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);sa(G,2);a.o.ib();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(oe)),n=u(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new Q(2,7,7003,void 0));for(t in a.h){w=a.h[t];try{a.l.removeSourceBuffer(w)}catch(K){}}return C(G,
375
- Promise.all(g),4);case 4:return a.m={},a.h={},x=a.l.duration,a.L=new Tf,a.l=Cj(a,a.L),C(G,a.L,5);case 5:!isNaN(x)&&x?a.l.duration=x:!isNaN(a.Y)&&a.Y&&(a.l.duration=a.Y),z=new Tf,v=a.l.sourceBuffers,B=b.size,A=0,D=function(){A++;A===B&&(z.resolve(),a.o.Lb(v,"addsourcebuffer",D))},a.o.D(v,"addsourcebuffer",D),H=u(b.keys()),J=H.next();case 6:if(J.done)return a.i.currentTime=d,C(G,z,2);I=J.value;E=b.get(I);return C(G,Gj(a,I,E,E.codecs),9);case 9:a.s?(a.j[c.S]=[],a.j[c.fa]=[]):a.j[I]=[];J=H.next();G.u(6);
376
- break;case 2:wa(G),a.C=!1,sg(a.I),a.o.na(a.i,"canplaythrough",function(){a.I.g||(a.i.autoplay=e,f||a.i.play())}),ya(G,0)}})}function hk(a,b){return ck(a,function(){return gk(a,b)})}
377
- function ak(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){if(1==A.g){f=Md;if(b==f.ma)return A.return(!1);g=Xd(ce(a.G[b]));h=Yd(a.G[b]);l=!1;m=Od(c,d);n=a.A.forceTransmux;if(!kb(m)||!a.B&&Pd.includes(m))n=!0;n&&(q=Qd(c,d),p=lc(q))&&(k=p(),t=Id(f.S,(d||"").split(",")),w=Id(f.fa,(d||"").split(",")),t&&w?(l=!0,x=w,b==f.S&&(x=t),m=k.convertCodecs(b,Qd(c,x))):m=k.convertCodecs(b,q));z=Xd(ce(m));v=Yd(m);if(g===z&&h===v)return A.return(!1);B=!0;if(a.s||l&&k&&!a.m[b])B=!1;if(B&&"smooth"===
378
- a.A.codecSwitchingStrategy&&nb())return C(A,fk(a,b,m,k),3);k&&k.destroy();return C(A,hk(a,e),3)}return A.return(!0)})}function ik(a,b,c,d){if(b==Kd)var e=!1;else{e=Xd(ce(a.G[b]));var f=Yd(a.G[b]),g=Od(c,d),h=a.A.forceTransmux;if(!kb(g)||!a.B&&Pd.includes(g))h=!0;c=Qd(c,d);h&&(h=lc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Xd(ce(g));g=Yd(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!nb()||a.s:!1}var Ej=window.URL.createObjectURL,Ij="sequence";function jk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=null}r=jk.prototype;r.getDuration=function(){return this.j};r.th=function(){return this.g};r.Eg=function(a){this.i=a};r.$a=function(a){this.j=a};r.xh=function(){return this.i};r.Cg=function(a){this.A=a};r.Ec=function(a){this.F=a};r.ke=function(a){this.m=a};r.Nd=function(){return this.m};r.Df=function(a){this.s=a};r.mh=function(){return this.s};
357
+ function Gj(a,b,c,d){a.g||(a.g=new ee(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ba;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,he[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):pb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):pb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
358
+ function Jj(a){return a.C?!1:a.l?"ended"==a.l.readyState:!0}function Kj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Kd?a=a.g.g:(a=Lj(a,b),a=!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Mj(a,b){return a.C?null:b==Kd?a.g.h:Ai(Lj(a,b))}function Nj(a,b,c){if(a.C)return 0;if(b==Kd)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Lj(a,b);return Ci(a,c)}
359
+ r.ob=function(){var a={total:this.C?[]:Di(this.i.buffered),audio:this.C?[]:Di(Lj(this,"audio")),video:this.C?[]:Di(Lj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Lj(a,b){try{return a.h[b].buffered}catch(c){return null}}
360
+ function Oj(a,b,c,d,e,f){var g=null,h=Ab(c);if(Pd.includes(e))f=Ki(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ta([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ca&&d.ca.timescale){var k=d.ca.timescale;if(!isNaN(k)){var l=0,m=!1;(new Bg).box("moof",Gg).box("traf",Gg).O("tfdt",function(n){l=Ni(n.reader,
361
+ n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!qj(h)||(a.K?a.K.clearData():a.K=new jj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ta(h,f,d?d.endTime:null));return g}
362
+ function Pj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,q,p,t,w,x,z,v,B,A;return L(function(D){switch(D.g){case 1:m=Md;if(b!=m.ma){D.u(2);break}if(!a.B){D.u(3);break}return C(D,a.ia,4);case 4:n=D.h,a.g.s=n;case 3:return C(D,ie(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.$()[0]:null),5);case 5:return D.return();case 2:if(l||!a.s){D.u(6);break}return C(D,Pj(a,m.S,c,d,e,f,g,h,k,!0),7);case 7:return C(D,Pj(a,m.fa,c,d,e,f,g,h,k,!0),8);case 8:return D.return();
363
+ case 6:if(!a.h[b])return D.return();q=a.h[b].timestampOffset;p=a.G[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(t=Oj(a,b,c,d,p,q),null!=t&&(w=d.startTime-t,x=Math.abs(q-w),(.001<=x||g||h)&&(!k||0<w||!q)&&(q=w,a.pa&&(Qj(a,b,function(){return Rj(a,b)}),Qj(a,b,function(){return Sj(a,b,q)}))),z=b==m.fa||!(m.fa in a.h),a.B&&z&&a.ia.resolve(q)));f&&b==m.fa&&(a.g||Gj(a,"application/cea-608",a.B,!1),a.H||(v=p.split(";",1)[0],a.H=new Gb(v)),d?(B=a.H.i(c),B.length&&me(a.g,B,d.startTime,d.endTime,q)):a.H.init(c,
364
+ h));if(!a.m[b]){D.u(9);break}return C(D,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=D.h;case 9:return c=Tj(a,c,d?d.startTime:null,b),d&&a.B&&b!=m.ma&&(g||h)&&(A=d.startTime,Qj(a,b,function(){return Rj(a,b)}),Qj(a,b,function(){return Sj(a,b,A)})),C(D,Qj(a,b,function(){var H=c;if("video"==b&&a.T){var J=a.T;J.g&&J.g.appendBuffer(H,"video",J.o,-q)}a.h[b].appendBuffer(H)}),11);case 11:F(D)}})}function Uj(a,b){var c=Mj(a,"video")||0;ke(a.g,b,c)}function Vj(a){a.g&&ke(a.g,"",0)}
365
+ r.remove=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=Md,a==e.ma?C(f,d.g.remove(b,c),0):C(f,Qj(d,a,function(){return Wj(d,a,b,c)}),4)):d.s?C(f,Qj(d,e.S,function(){return Wj(d,e.S,b,c)}),0):f.u(0)})};function Xj(a,b){var c;return L(function(d){return 1==d.g?(c=Md,b==c.ma?a.g?C(d,a.g.remove(0,Infinity),0):d.return():C(d,Qj(a,b,function(){return Wj(a,b,0,a.l.duration)}),4)):a.s?C(d,Qj(a,c.S,function(){return Wj(a,c.S,0,a.l.duration)}),0):d.u(0)})}
366
+ r.flush=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Md,a==c.ma?d.return():C(d,Qj(b,a,function(){b.i.currentTime-=.001;Ij(b,a)}),2)):b.s?C(d,Qj(b,c.S,function(){var e=c.S;b.i.currentTime-=.001;Ij(b,e)}),0):d.u(0)})};
367
+ function Yj(a,b,c,d,e,f,g,h,k){var l,m,n;return L(function(q){if(1==q.g){l=Md;if(b==l.ma)return f||(a.g.s=c),je(a.g,d,e),q.return();m=[];return C(q,Zj(a,b,g,h,k),2)}n=q.h;n||(m.push(Qj(a,b,function(){return Rj(a,b)})),a.s&&m.push(Qj(a,l.S,function(){return Rj(a,l.S)})));f||(m.push(Qj(a,b,function(){return Sj(a,b,c)})),a.s&&m.push(Qj(a,l.S,function(){return Sj(a,l.S,c)})));m.push(Qj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Ij(a,b)}));a.s&&m.push(Qj(a,
368
+ l.S,function(){var p=l.S;a.h[p].appendWindowStart=0;a.h[p].appendWindowEnd=e;a.h[p].appendWindowStart=d;Ij(a,p)}));return C(q,Promise.all(m),0)})}function ak(a,b,c){var d;return L(function(e){if(1==e.g){d=Md;if(b==d.ma)return e.return();b==d.fa&&(a.ia=new Tf);Qj(a,b,function(){return Rj(a,b)});a.s&&Qj(a,d.S,function(){return Rj(a,d.S)});return C(e,Qj(a,b,function(){return Sj(a,b,c)}),2)}return a.s?C(e,Qj(a,d.S,function(){return Sj(a,d.S,c)}),0):e.u(0)})}
369
+ r.endOfStream=function(a){var b=this;return L(function(c){return C(c,bk(b,function(){Jj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.ab=function(a){var b=this;return L(function(c){return C(c,bk(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Tf};b.j[d].unshift(e)}b.l.duration=a;b.Y=a}),0)})};r.getDuration=function(){return this.l.duration};function Wj(a,b,c,d){d<=c?Ij(a,b):a.h[b].remove(c,d)}
370
+ function Rj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Ij(a,b)}function Sj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Ij(a,b)}function Ij(a,b){if(!a.C){var c=a.j[b][0];c&&(c.p.resolve(),ck(a,b))}}function Qj(a,b,c){sg(a.I);c={start:c,p:new Tf};a.j[b].push(c);1==a.j[b].length&&dk(a,b);return c.p}
371
+ function bk(a,b){var c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:sg(a.I);c=[];d={};for(e in a.h)d.Mc=new Tf,f={start:function(m){return function(){return m.Mc.resolve()}}(d),p:d.Mc},a.j[e].push(f),c.push(d.Mc),1==a.j[e].length&&f.start(),d={Mc:d.Mc};ra(l,2);return C(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=va(l),g;case 3:return ra(l,5,6),C(l,b(),6);case 6:wa(l);for(h in a.h)ck(a,h);ya(l,0);break;case 5:throw k=va(l),new Q(2,3,3015,k,a.i.error||"No error in the media element");
372
+ }})}function ck(a,b){a.j[b].shift();dk(a,b)}function dk(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new Q(2,3,3017,b)):c.p.reject(new Q(2,3,3015,d,a.i.error||"No error in the media element")),ck(a,b)}}function Tj(a,b,c,d){var e=a.qa[d];a.A.insertFakeEncryptionInInit&&null==c&&e&&(Uc()||Sc()||Tc("SOPOpenBrowser"))&&"mp4"==Ud(a.G[d])&&(b=ni(b));return b}
373
+ function ek(a,b,c,d){return Qj(a,b,function(){b!==Kd&&(nb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Ij(a,b))})}
374
+ function fk(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E;return L(function(G){switch(G.g){case 1:c=Md;a.C=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);sa(G,2);a.o.ib();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(oe)),n=u(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new Q(2,7,7003,void 0));for(t in a.h){w=a.h[t];try{a.l.removeSourceBuffer(w)}catch(K){}}return C(G,
375
+ Promise.all(g),4);case 4:return a.m={},a.h={},x=a.l.duration,a.L=new Tf,a.l=Bj(a,a.L),C(G,a.L,5);case 5:!isNaN(x)&&x?a.l.duration=x:!isNaN(a.Y)&&a.Y&&(a.l.duration=a.Y),z=new Tf,v=a.l.sourceBuffers,B=b.size,A=0,D=function(){A++;A===B&&(z.resolve(),a.o.Lb(v,"addsourcebuffer",D))},a.o.D(v,"addsourcebuffer",D),H=u(b.keys()),J=H.next();case 6:if(J.done)return a.i.currentTime=d,C(G,z,2);I=J.value;E=b.get(I);return C(G,Fj(a,I,E,E.codecs),9);case 9:a.s?(a.j[c.S]=[],a.j[c.fa]=[]):a.j[I]=[];J=H.next();G.u(6);
376
+ break;case 2:wa(G),a.C=!1,sg(a.I),a.o.na(a.i,"canplaythrough",function(){a.I.g||(a.i.autoplay=e,f||a.i.play())}),ya(G,0)}})}function gk(a,b){return bk(a,function(){return fk(a,b)})}
377
+ function Zj(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){if(1==A.g){f=Md;if(b==f.ma)return A.return(!1);g=Xd(ce(a.G[b]));h=Yd(a.G[b]);l=!1;m=Od(c,d);n=a.A.forceTransmux;if(!kb(m)||!a.B&&Pd.includes(m))n=!0;n&&(q=Qd(c,d),p=lc(q))&&(k=p(),t=Id(f.S,(d||"").split(",")),w=Id(f.fa,(d||"").split(",")),t&&w?(l=!0,x=w,b==f.S&&(x=t),m=k.convertCodecs(b,Qd(c,x))):m=k.convertCodecs(b,q));z=Xd(ce(m));v=Yd(m);if(g===z&&h===v)return A.return(!1);B=!0;if(a.s||l&&k&&!a.m[b])B=!1;if(B&&"smooth"===
378
+ a.A.codecSwitchingStrategy&&nb())return C(A,ek(a,b,m,k),3);k&&k.destroy();return C(A,gk(a,e),3)}return A.return(!0)})}function hk(a,b,c,d){if(b==Kd)var e=!1;else{e=Xd(ce(a.G[b]));var f=Yd(a.G[b]),g=Od(c,d),h=a.A.forceTransmux;if(!kb(g)||!a.B&&Pd.includes(g))h=!0;c=Qd(c,d);h&&(h=lc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Xd(ce(g));g=Yd(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!nb()||a.s:!1}var Dj=window.URL.createObjectURL,Hj="sequence";function ik(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=null}r=ik.prototype;r.getDuration=function(){return this.j};r.th=function(){return this.g};r.Eg=function(a){this.i=a};r.ab=function(a){this.j=a};r.xh=function(){return this.i};r.Cg=function(a){this.A=a};r.Ec=function(a){this.F=a};r.ke=function(a){this.m=a};r.Nd=function(){return this.m};r.Df=function(a){this.s=a};r.mh=function(){return this.s};
379
379
  r.sg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.de(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
380
380
  r.ld=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=u(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.de(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.Xd=function(){this.o=!0};r.Rh=function(){return this.o};r.Dg=function(a){this.B=a};r.qh=function(){return this.B};
381
381
  r.de=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.hf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.R=function(){return Infinity==this.j&&!this.F};r.dc=function(){return Infinity!=this.j&&!this.F};r.qb=function(){return Math.max(this.G,this.Hb()-this.m)};r.Ig=function(a){this.G=a};
382
382
  r.Hb=function(){return this.R()||this.dc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};r.dd=function(a){var b=Math.max(this.l,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Hb()-this.m+a,this.pb()))};r.$b=function(){return this.dd(0)};r.pb=function(){return Math.max(0,this.Hb()-(this.R()||this.dc()?this.s:0))};r.Mg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
383
- r.Bg=function(a){this.H=a};P("shaka.media.PresentationTimeline",jk);jk.prototype.setAvailabilityTimeOffset=jk.prototype.Bg;jk.prototype.usingPresentationStartTime=jk.prototype.Mg;jk.prototype.getSeekRangeEnd=jk.prototype.pb;jk.prototype.getSeekRangeStart=jk.prototype.$b;jk.prototype.getSafeSeekRangeStart=jk.prototype.dd;jk.prototype.getSegmentAvailabilityEnd=jk.prototype.Hb;jk.prototype.setUserSeekStart=jk.prototype.Ig;jk.prototype.getSegmentAvailabilityStart=jk.prototype.qb;
384
- jk.prototype.isInProgress=jk.prototype.dc;jk.prototype.isLive=jk.prototype.R;jk.prototype.offset=jk.prototype.offset;jk.prototype.notifyMaxSegmentDuration=jk.prototype.hf;jk.prototype.notifyMinSegmentStartTime=jk.prototype.de;jk.prototype.getInitialProgramDateTime=jk.prototype.qh;jk.prototype.setInitialProgramDateTime=jk.prototype.Dg;jk.prototype.isStartTimeLocked=jk.prototype.Rh;jk.prototype.lockStartTime=jk.prototype.Xd;jk.prototype.notifySegments=jk.prototype.ld;jk.prototype.notifyTimeRange=jk.prototype.sg;
385
- jk.prototype.getDelay=jk.prototype.mh;jk.prototype.setDelay=jk.prototype.Df;jk.prototype.getSegmentAvailabilityDuration=jk.prototype.Nd;jk.prototype.setSegmentAvailabilityDuration=jk.prototype.ke;jk.prototype.setStatic=jk.prototype.Ec;jk.prototype.setClockOffset=jk.prototype.Cg;jk.prototype.getPresentationStartTime=jk.prototype.xh;jk.prototype.setDuration=jk.prototype.$a;jk.prototype.setPresentationStartTime=jk.prototype.Eg;jk.prototype.getMaxSegmentDuration=jk.prototype.th;
386
- jk.prototype.getDuration=jk.prototype.getDuration;function kk(a,b,c){this.j=c;this.l=a;this.s=lk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}kk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function mk(a,b){a.i=b}function nk(a){this.g=a}function lk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=u(Ei(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function ok(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new eb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return pk(f)});this.m=(new Mc(function(){pk(f)})).Sa(this.s.gapJumpTimerTime)}ok.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};ok.prototype.mf=function(){this.o=!0;pk(this)};
387
- function pk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=lk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new T("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Fi(c,b,a.s.gapDetectionThreshold),
388
- null!=d&&(0!=d||a.o))){e=c.start(d);if(Rc()||Sc())e=Math.ceil(100*(e+.01))/100;e>=a.B.pb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new T("gapjumped")))}}}};function qk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=rk.value().get(b),c.na(a,b,d))}var rk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function sk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new eb;this.i=new tk(a);qk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){uk(e,e.j())})}sk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function vk(a){return a.o?a.g.currentTime:a.j()}
389
- function wk(a,b){0<a.g.readyState?xk(a.i,b):qk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){uk(a,a.j())})}function uk(a,b){.001>Math.abs(a.g.currentTime-b)?yk(a):(a.h.na(a.g,"seeking",function(){yk(a)}),xk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function yk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
390
- function tk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Mc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}tk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function xk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Sa(.1)};function zk(a){this.g=a;this.j=!1;this.h=null;this.i=new eb}r=zk.prototype;r.we=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;qk(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.xe=function(a){this.h=this.j?this.h:a};r.Dd=function(){return(this.j?this.g.currentTime:this.h)||0};r.Pf=function(){return 0};
383
+ r.Bg=function(a){this.H=a};P("shaka.media.PresentationTimeline",ik);ik.prototype.setAvailabilityTimeOffset=ik.prototype.Bg;ik.prototype.usingPresentationStartTime=ik.prototype.Mg;ik.prototype.getSeekRangeEnd=ik.prototype.pb;ik.prototype.getSeekRangeStart=ik.prototype.$b;ik.prototype.getSafeSeekRangeStart=ik.prototype.dd;ik.prototype.getSegmentAvailabilityEnd=ik.prototype.Hb;ik.prototype.setUserSeekStart=ik.prototype.Ig;ik.prototype.getSegmentAvailabilityStart=ik.prototype.qb;
384
+ ik.prototype.isInProgress=ik.prototype.dc;ik.prototype.isLive=ik.prototype.R;ik.prototype.offset=ik.prototype.offset;ik.prototype.notifyMaxSegmentDuration=ik.prototype.hf;ik.prototype.notifyMinSegmentStartTime=ik.prototype.de;ik.prototype.getInitialProgramDateTime=ik.prototype.qh;ik.prototype.setInitialProgramDateTime=ik.prototype.Dg;ik.prototype.isStartTimeLocked=ik.prototype.Rh;ik.prototype.lockStartTime=ik.prototype.Xd;ik.prototype.notifySegments=ik.prototype.ld;ik.prototype.notifyTimeRange=ik.prototype.sg;
385
+ ik.prototype.getDelay=ik.prototype.mh;ik.prototype.setDelay=ik.prototype.Df;ik.prototype.getSegmentAvailabilityDuration=ik.prototype.Nd;ik.prototype.setSegmentAvailabilityDuration=ik.prototype.ke;ik.prototype.setStatic=ik.prototype.Ec;ik.prototype.setClockOffset=ik.prototype.Cg;ik.prototype.getPresentationStartTime=ik.prototype.xh;ik.prototype.setDuration=ik.prototype.ab;ik.prototype.setPresentationStartTime=ik.prototype.Eg;ik.prototype.getMaxSegmentDuration=ik.prototype.th;
386
+ ik.prototype.getDuration=ik.prototype.getDuration;function jk(a,b,c){this.j=c;this.l=a;this.s=kk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}jk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function lk(a,b){a.i=b}function mk(a){this.g=a}function kk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=u(Di(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function nk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new eb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return ok(f)});this.m=(new Mc(function(){ok(f)})).Sa(this.s.gapJumpTimerTime)}nk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};nk.prototype.mf=function(){this.o=!0;ok(this)};
387
+ function ok(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=kk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new T("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Ei(c,b,a.s.gapDetectionThreshold),
388
+ null!=d&&(0!=d||a.o))){e=c.start(d);if(Rc()||Sc())e=Math.ceil(100*(e+.01))/100;e>=a.B.pb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new T("gapjumped")))}}}};function pk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=qk.value().get(b),c.na(a,b,d))}var qk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function rk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new eb;this.i=new sk(a);pk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){tk(e,e.j())})}rk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function uk(a){return a.o?a.g.currentTime:a.j()}
389
+ function vk(a,b){0<a.g.readyState?wk(a.i,b):pk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){tk(a,a.j())})}function tk(a,b){.001>Math.abs(a.g.currentTime-b)?xk(a):(a.h.na(a.g,"seeking",function(){xk(a)}),wk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function xk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
390
+ function sk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Mc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}sk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function wk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Sa(.1)};function yk(a){this.g=a;this.j=!1;this.h=null;this.i=new eb}r=yk.prototype;r.we=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;pk(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.xe=function(a){this.h=this.j?this.h:a};r.Dd=function(){return(this.j?this.g.currentTime:this.h)||0};r.Pf=function(){return 0};
391
391
  r.Of=function(){return 0};r.rg=function(){};
392
- function Ak(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Bk(a,c,f);this.j=new ok(a,b.presentationTimeline,c,this.o,f);this.h=new sk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=vk(g.h);h=Ck(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;wk(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
393
- g.g.$b():g.g.pb():0>h&&(h=g.g.pb()+h);return Dk(g,Ek(g,h))});this.m=new Mc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=vk(g.h),k=g.g.$b(),l=g.g.pb();3>l-k&&(k=l-3);h<k&&(h=Ck(g,h),g.i.currentTime=h)}})}r=Ak.prototype;r.we=function(){this.m.Sa(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};r.xe=function(a){wk(this.h,a)};
394
- r.Dd=function(){var a=vk(this.h);return 0<this.i.readyState&&!this.i.paused?Ek(this,a):a};r.Pf=function(){return this.o?this.o.o:0};r.Of=function(){return this.j.C};r.rg=function(){this.j.mf()};function Dk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
395
- function Ck(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.$b(),f=a.g.pb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.dd(c),k=a.g.dd(d);c=a.g.dd(c+d);return b>=g?Dk(a,b):b>f?f:b<e?Ci(a.i.buffered,k)?k:c:b>=h||Ci(a.i.buffered,b)?b:c}function Ek(a,b){var c=a.g.$b();if(b<c)return c;a=a.g.pb();return b>a?a:b}
396
- function Bk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new kk(new nk(a),b.stallThreshold,c);mk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Fk(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Fk.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.Xh=function(){this.o=!0};r.tc=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
392
+ function zk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Ak(a,c,f);this.j=new nk(a,b.presentationTimeline,c,this.o,f);this.h=new rk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=uk(g.h);h=Bk(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;vk(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
393
+ g.g.$b():g.g.pb():0>h&&(h=g.g.pb()+h);return Ck(g,Dk(g,h))});this.m=new Mc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=uk(g.h),k=g.g.$b(),l=g.g.pb();3>l-k&&(k=l-3);h<k&&(h=Bk(g,h),g.i.currentTime=h)}})}r=zk.prototype;r.we=function(){this.m.Sa(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};r.xe=function(a){vk(this.h,a)};
394
+ r.Dd=function(){var a=uk(this.h);return 0<this.i.readyState&&!this.i.paused?Dk(this,a):a};r.Pf=function(){return this.o?this.o.o:0};r.Of=function(){return this.j.C};r.rg=function(){this.j.mf()};function Ck(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
395
+ function Bk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.$b(),f=a.g.pb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.dd(c),k=a.g.dd(d);c=a.g.dd(c+d);return b>=g?Ck(a,b):b>f?f:b<e?Bi(a.i.buffered,k)?k:c:b>=h||Bi(a.i.buffered,b)?b:c}function Dk(a,b){var c=a.g.$b();if(b<c)return c;a=a.g.pb();return b>a?a:b}
396
+ function Ak(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new jk(new mk(a),b.stallThreshold,c);lk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Ek(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Ek.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.Xh=function(){this.o=!0};r.tc=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
397
397
  r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=u(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
398
398
  r.ae=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,y(a))}};r.kd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.ae(a);this.La(b)};r.La=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
399
- r.sc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new xi(a.startTime,b,a.C,a.Aa,a.ja,a.ca,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.j=a.j,this.g[this.g.length-1]=b)}};
400
- r.le=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Mc(function(){var d=b();d?c.g.push.apply(c.g,y(d)):(c.m.stop(),c.m=null)}),this.m.Sa(a))};Fk.prototype[Symbol.iterator]=function(){return this.xb(0)};
401
- Fk.prototype.xb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;d--;var e=this.get(d+1),f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Ua("No independent partial segment found!"),null}d++;f=g-1;break}}return new Gk(this,d,f,c)};function Hk(a,b,c){a=new xi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Fk([a])}
402
- P("shaka.media.SegmentIndex",Fk);Fk.forSingleSegment=Hk;Fk.prototype.getIteratorForTime=Fk.prototype.xb;Fk.prototype.updateEvery=Fk.prototype.le;Fk.prototype.fit=Fk.prototype.sc;Fk.prototype.evict=Fk.prototype.La;Fk.prototype.mergeAndEvict=Fk.prototype.kd;Fk.prototype.offset=Fk.prototype.offset;Fk.prototype.get=Fk.prototype.get;Fk.prototype.find=Fk.prototype.find;Fk.prototype.markImmutable=Fk.prototype.Xh;Fk.prototype.release=Fk.prototype.release;Fk.prototype.getNumEvicted=Fk.prototype.getNumEvicted;
403
- Fk.prototype.getNumReferences=Fk.prototype.getNumReferences;function Gk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Gk.prototype.je=function(a){this.reverse=a};Gk.prototype.fh=function(){return this.h};Gk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
404
- Gk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};P("shaka.media.SegmentIterator",Gk);Gk.prototype.next=Gk.prototype.next;Gk.prototype.current=Gk.prototype.current;Gk.prototype.currentPosition=Gk.prototype.fh;
405
- Gk.prototype.setReverse=Gk.prototype.je;function Ik(){Fk.call(this,[]);this.h=[]}na(Ik,Fk);r=Ik.prototype;r.clone=function(){var a=new Ik;a.h=this.h.slice();return a};r.release=function(){for(var a=u(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.tc=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.tc(a)};r.find=function(a){for(var b=0,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};
406
- r.get=function(a){for(var b=0,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.ae=function(){};r.La=function(){};r.kd=function(){};r.sc=function(){};r.le=function(){};P("shaka.media.MetaSegmentIndex",Ik);Ik.prototype.updateEvery=Ik.prototype.le;Ik.prototype.fit=Ik.prototype.sc;Ik.prototype.mergeAndEvict=Ik.prototype.kd;Ik.prototype.evict=Ik.prototype.La;Ik.prototype.merge=Ik.prototype.ae;
407
- Ik.prototype.offset=Ik.prototype.offset;Ik.prototype.get=Ik.prototype.get;Ik.prototype.find=Ik.prototype.find;Ik.prototype.forEachTopLevelReference=Ik.prototype.tc;Ik.prototype.release=Ik.prototype.release;function Jk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Md();this.h=new Mc(function(){b.g.qg(.25*b.i)})}Jk.prototype.release=function(){this.set(this.Xb());this.h&&(this.h.stop(),this.h=null);this.g=null};Jk.prototype.set=function(a){this.i=a;Kk(this)};Jk.prototype.Xb=function(){return this.g.Xb()};function Kk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Md()!=b&&a.g.Ff(b);return}catch(c){}a.h.Sa(.25);0!=a.g.Md()&&a.g.Ff(0)};function Lk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Mc(function(){Mk(b,!1)})).Sa(.25)}Lk.prototype.release=function(){this.i.stop();for(var a=u(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Mk(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Nk(){this.g=null;this.h=[]}function Ok(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Pk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Qk(){this.i=this.h=null;this.g=[]}function Rk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Sk(){this.Ed=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.I=this.K=this.l=this.o=NaN;this.g=new Nk;this.h=new Qk};function Tk(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function Uk(a,b){a.j=b;a=u(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
408
- function Vk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.xb(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.ja&&(c=!1);2==d.bc()&&(c=!1);c&&d.ca&&Wk(a,d.ca);c&&!a.g.has(d)&&(c=new Xk(a.j),Yk(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.md&&d.Wd)break;d=b.next().value}Zk(a)}}}
409
- function Wk(a,b){if(a.h.segmentIndex&&!Array.from(a.i.keys()).some(function(d){return wi(d,b)})){var c=new Xk(a.j);Yk(c,b,a.h);a.i.set(b,c)}}function $k(a,b){b=u(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&al(a,c)}function bl(a){$k(a,a.g);$k(a,a.i);a.l=0}Tk.prototype.La=function(a,b){b=void 0===b?!1:b;for(var c=u(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&al(this,d);b&&Zk(this)};
410
- function Zk(a){for(var b=Array.from(a.g.keys()),c={},d=u(a.i.keys()),e=d.next();!e.done;c={wd:c.wd},e=d.next())c.wd=e.value,b.some(function(f){return function(g){return wi(g.ca,f.wd)}}(c))||al(a,c.wd)}function cl(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&al(a,d)}Zk(a)}function dl(a,b){b&&b!==a.h&&(bl(a),a.h=b)}function al(a,b){var c=a.g;b instanceof vi&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function Xk(a){this.g=a;this.ge=this.Gf=null}
411
- function Yk(a,b,c){var d=new Uint8Array(0);a.ge=a.g(b,c,function(e){return L(function(f){if(1==f.g)return 0<d.byteLength?d=Bd(d,e):d=e,a.Gf?C(f,a.Gf(d),3):f.u(0);d=new Uint8Array(0);F(f)})})}Xk.prototype.abort=function(){this.ge&&this.ge.abort()};function el(a){cg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Mc(function(){for(var c=b.i(),d=u(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new T("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Sa(2)}na(el,cg);el.prototype.release=function(){this.g.clear();this.h.stop();cg.prototype.release.call(this)};function fl(a){cg.call(this);this.g=new Map;this.h=a}na(fl,cg);fl.prototype.release=function(){this.g.clear();cg.prototype.release.call(this)};function gl(a,b){var c=a.g.get(b);c||(c={nd:[],Wf:null,contentType:b},a.g.set(b,c));return c}function hl(a,b,c){var d=gl(a,b.contentType);il(a,d);a={gf:b,position:c};d=d.nd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
412
- fl.prototype.j=function(a){for(var b=u(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.nd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.gf;break a}}d=null}if(e=d)e=c.Wf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
413
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Wf=d,JSON.stringify(d),c=new T("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function il(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.nd;b.nd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.nd=[]};function jl(a,b,c,d,e){a=jg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function kl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.I=null;this.A=!1;this.l=new rg(function(){return ll(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null}}r=kl.prototype;r.destroy=function(){return this.l.destroy()};
414
- function ll(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=u(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,ml(e),b.push(nl(e));f=u(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,bl(h);return C(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;F(k)})}
415
- r.configure=function(a){this.h=a;this.I=new Qf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.X&&(bl(b.X),b.X=null);b=u(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,bl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Kd))&&
416
- b.X&&(bl(b.X),b.X=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.X&&(bl(b.X),b.X=null);b=u(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.X?(cl(c.X,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.X=null)):0<a.segmentPrefetchLimit&&(c.X=ol(this,c.stream));a.disableAudioPrefetch||pl(this)};r.start=function(a){var b=this;return L(function(c){if(1==c.g)return C(c,ql(b,a||new Map),2);sg(b.l);b.C=!0;F(c)})};
417
- function rl(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Md,a.H++,d=a.H,ra(l,2),C(l,Yj(a.g.W,c.ma),4);case 4:ta(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=Od(b.mimeType,b.codecs),Hj(a.g.W,f,a.m.sequenceMode,b.external),g=a.g.W.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=sl(a,b),a.i.set(c.ma,k),tl(a,k,0)),F(l)}})}function ul(a){var b=a.i.get(Kd);b&&(ml(b),nl(b).catch(function(){}),a.i.delete(Kd));a.s=null}
418
- function vl(a,b){var c=0>a.g.eb(),d=a.i.get("video");d&&d.Z&&d.Z.je(c);(d=a.i.get("audio"))&&d.Z&&d.Z.je(c);(d=a.i.get(Kd))&&d.Z&&d.Z.je(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.jc&&(wl(a,b,!1,0,!1),c.jc=d);else if(b=c.jc)c.jc=null,wl(a,b,!0,0,!1)}function xl(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.C&&(b.video&&wl(a,b.video,c,d,e,f),b.audio&&wl(a,b.audio,c,d,e,f))}
419
- function yl(a,b){L(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):C(c,b.createSegmentIndex(),2):c.return();wl(a,b,!0,0,!1);F(c)})}
420
- function wl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Kd?g&&(g.jc&&(b.trickModeVideo?(g.jc=b,b=b.trickModeVideo):g.jc=null),g.stream!=b||e)&&(a.o.has(b)?g.X=a.o.get(b):g.X&&dl(g.X,b),b.type==Kd&&(e=Od(b.mimeType,b.codecs),Hj(a.g.W,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Z=null,g.Qf=!!f,c&&(g.Xc?g.me=!0:g.Qa?(g.Mb=!0,g.Id=d,g.me=!0):(ml(g),zl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Al(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
421
- rl(a,b)}
422
- function Al(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.Za)return e.return();c=b.stream;d=b.Za;return c.segmentIndex?e.u(2):C(e,c.createSegmentIndex(),2)}if(b.Za!=d||b.stream!=c)return e.return();var f=a.g.Ld();var g=Nj(a.g.W,b.type),h=b.stream.segmentIndex.find(b.Oa?b.Oa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.Aa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.ja?k.ja-k.Aa:null)||0),k=a.g.getBandwidthEstimate(),f=
423
- 8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Za.h.g>h?!0:!1):f=!1;f&&b.Za.abort();F(e)})}
424
- r.od=function(){if(this.g)for(var a=this.g.Ld(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Z&&(e=c.Z.current());if(!e||e.startTime>a||e.endTime<a)c.Z=null;e=this.g.W;e.C?e=!1:d==Kd?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Mj(e,d),e=Ci(e,a));e||((null!=Nj(this.g.W,d)||c.Qa)&&Bl(this,c),c.Za&&(c.Za.abort(),c.Za=null),d===Kd&&(d=this.g.W,d.H&&d.H.g()),c.od=!0)}};
425
- function Bl(a,b){b.Xc||b.Mb||(b.Qa?(b.Mb=!0,b.Id=0):null==Lj(a.g.W,b.type)?null==b.ub&&tl(a,b,0):(ml(b),zl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
426
- function ql(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Md;if(!a.j)throw new Q(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.S,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.fa,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ma,a.s),e.add(a.s));f=a.g.W;return C(q,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}sg(a.l);a.updateDuration();g=u(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=sl(a,l),b.has(l.id)&&(n=
427
- b.get(l.id),Uk(n,function(p,t,w){return Cl(p,t,w||null,a.h.retryParameters,a.g.zb)}),m.X=n),a.i.set(k,m),tl(a,m,0));F(q)})}function sl(a,b){return{stream:b,type:b.type,Z:null,X:ol(a,b),Oa:null,ec:null,df:null,bf:null,af:null,jc:null,endOfStream:!1,Qa:!1,ub:null,Mb:!1,Id:0,me:!1,Xc:!1,od:!0,wf:!1,gd:!1,Za:null}}
428
- function ol(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Kd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Kd&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.X)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new Tk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Cl(d,e,f||null,a.h.retryParameters,a.g.zb)}):null}
429
- function pl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=u(a.m.variants),f=e.next();!f.done;d={Fa:d.Fa},f=e.next())if(d.Fa=f.value,d.Fa.audio)if(a.o.has(d.Fa.audio)){if(f=a.o.get(d.Fa.audio),cl(f,b),!(0<b&&c.some(function(h){return function(k){return re(h.Fa.audio.language,k)}}(d)))){var g=a.i.get(d.Fa.audio.type);f!==(g&&g.X)&&bl(f);a.o.delete(d.Fa.audio)}}else 0>=b||!c.some(function(h){return function(k){return re(h.Fa.audio.language,k)}}(d))||!(f=ol(a,d.Fa.audio))||
430
- (d.Fa.audio.segmentIndex||d.Fa.audio.createSegmentIndex(),a.o.set(d.Fa.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.W.$a(a):this.g.W.$a(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
431
- function Dl(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:sg(a.l);if(b.Qa||null==b.ub||b.Xc)return h.return();b.ub=null;if(!b.Mb){h.u(2);break}return C(h,zl(a,b,b.me,b.Id),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Qa||b.ub||tl(a,b,0),h.return();case 4:ra(h,6);d=El(a,b);null!=d&&(tl(a,b,d),b.gd=!1);ta(h,7);break;case 6:return e=
432
- va(h),C(h,Fl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return C(h,a.g.W.endOfStream(),10);case 10:sg(a.l),g=a.g.W.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.$a(g),F(h)}})}
433
- function El(a,b){if(Gl(b))return Vj(a.g.W,b.stream.originalId||""),null;b.type==Kd&&Wj(a.g.W);if(!a.g.W.ea&&b.type!=Kd)return a.h.updateIntervalSeconds/2;var c=a.g.Ld();if("audio"===b.type)for(var d=u(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.La(c,!0),Vk(e,c);d=b.Oa?b.Oa.endTime:c;e=Oj(a.g.W,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.m.presentationTimeline.getDuration()-d,h=Nj(a.g.W,b.type);if(1E-6>g&&h)return b.endOfStream=
434
- !0,"video"==b.type&&(a=a.i.get(Kd))&&Gl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Hl(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=u(g);for(h=g.next();!h.done;h=g.next())h=h.value,Gl(h)||h.Z&&!h.Z.current()||(f=Math.min(f,h.Oa?h.Oa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.X&&b.Z&&!a.o.has(b.stream)&&(b.X.La(c),Vk(b.X,e.startTime));Il(a,b,c,e).catch(function(){});return null}
435
- function Hl(a,b,c,d){if(b.Z)return b.Z.current();if(b.Oa||d)return b.Z=b.stream.segmentIndex.xb(b.Oa?b.Oa.endTime:d,!1,0>a.g.eb()),b.Z&&b.Z.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.eb();var f=null;d&&(b.Z=b.stream.segmentIndex.xb(e,!1,a),f=b.Z&&b.Z.next().value);f||(b.Z=b.stream.segmentIndex.xb(c,!1,a),f=b.Z&&b.Z.next().value);return f}
436
- function Il(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:e=Md;f=b.stream;g=b.Z;b.Qa=!0;ra(A,2);if(2==d.bc())throw new Q(1,1,1011);return C(A,Jl(a,b,d),4);case 4:sg(a.l);if(a.A)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=q=!1,w=function(D){var H,J,I,E;return L(function(G){switch(G.g){case 1:if(q)return G.return();p=!0;sg(a.l);if(a.A)return G.return();
437
- ra(G,2);n=Kl(n,D);H=!1;J=0;(new Bg).box("mdat",function(K){J=K.size+K.start;H=!0}).parse(n,!1,!0);if(!H){G.u(4);break}I=n.subarray(0,J);n=n.subarray(J);return C(G,Ll(a,b,c,f,d,I,!0),5);case 5:b.X&&b.Z&&Vk(b.X,d.startTime,!0);case 4:ta(G,0);break;case 2:t=E=va(G),F(G)}})},C(A,Ml(a,b,d,w),9);l=Ml(a,b,d);return C(A,l,7);case 7:m=A.h;sg(a.l);if(a.A)return A.return();sg(a.l);return b.Mb?(b.Qa=!1,tl(a,b,0),A.return()):C(A,Ll(a,b,c,f,d,m),6);case 9:x=A.h;if(t)throw t;if(p){A.u(10);break}q=!0;sg(a.l);return a.A?
438
- A.return():b.Mb?(b.Qa=!1,tl(a,b,0),A.return()):C(A,Ll(a,b,c,f,d,x),10);case 10:b.X&&b.Z&&Vk(b.X,d.startTime,!0);case 6:sg(a.l);if(a.A)return A.return();b.Oa=d;g.next();b.Qa=!1;b.wf=!1;z=a.g.W.ob();v=z[b.type];ab(JSON.stringify(v));b.Mb||a.g.mf(d,b.stream);tl(a,b,0);ta(A,0);break;case 2:B=va(A);sg(a.l,B);if(a.A)return A.return();b.Qa=!1;if(7001==B.code)b.Qa=!1,ml(b),tl(a,b,0),A.u(0);else if(b.type==e.ma&&a.h.ignoreTextStreamFailures)a.i.delete(e.ma),A.u(0);else if(3017==B.code)Nl(a,b,B),A.u(0);else return b.gd=
439
- !0,1==B.category&&b.X&&al(b.X,d),B.severity=2,C(A,Fl(a,b,B),0)}})}function Ol(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):C(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
440
- function Kl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Nl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.wf})){if(0<a.h.maxDisabledTime&&a.g.Jd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.gd=!0;a.A=!0;a.g.onError(c);return}b.wf=!0}tl(a,b,4)}
441
- function Jl(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w;return L(function(x){switch(x.g){case 1:d=Md;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Xd(b.stream.codecs);k=Yd(b.stream.mimeType);l=c.timestampOffset;if(l==b.df&&f==b.bf&&g==b.af&&h==b.cf&&k==b.mg){x.u(2);break}m=b.cf&&b.mg&&ik(a.g.W,b.type,k,h);if(!m){x.u(3);break}n=null;b.type===d.fa?n=a.i.get(d.S):b.type===d.S&&(n=a.i.get(d.fa));if(!n){x.u(3);break}return C(x,nl(n).catch(function(){}),5);case 5:n.ec=null,Bl(a,n);case 3:return q=
442
- function(){var z,v,B;return L(function(A){if(1==A.g)return z=new Map,a.j.audio&&z.set(d.S,a.j.audio),a.j.video&&z.set(d.fa,a.j.video),ra(A,2),b.bf=f,b.af=g,b.cf=h,b.mg=k,b.df=l,v=a.m.sequenceMode||"HLS"==a.m.type,C(A,Zj(a.g.W,b.type,l,f,g,v,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=A.g)return ta(A,0);B=va(A);b.bf=null;b.af=null;b.cf=null;b.df=null;throw B;})},C(x,q(),2);case 2:return wi(c.ca,b.ec)||(b.ec=c.ca,c.l&&c.ca&&(p=Ml(a,b,c.ca),t=function(){var z,v,B,A,D,H,J;return L(function(I){switch(I.g){case 1:return ra(I,
443
- 2),C(I,p,4);case 4:return z=I.h,sg(a.l),v=null,B=new Map,A={projection:null,hfov:null},D=new Bg,D.box("moov",Gg).box("trak",Gg).box("mdia",Gg).O("mdhd",function(E){v=Pi(E.reader,E.version).timescale}).box("hdlr",function(E){E=E.reader;E.skip(8);switch(E.hc()){case "soun":B.set(d.S,v);break;case "vide":B.set(d.fa,v)}v=null}).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("encv",Lg).box("avc1",Lg).box("avc3",Lg).box("hev1",Lg).box("hvc1",Lg).box("dvav",Lg).box("dva1",Lg).box("dvh1",Lg).box("dvhe",Lg).box("vexu",
444
- Gg).box("proj",Gg).O("prji",function(E){E=E.reader.hc();A.projection=E}).box("hfov",function(E){E=E.reader.M()/1E3;A.hfov=E}).parse(z),Pl(a,A),B.has(b.type)?c.ca.timescale=B.get(b.type):null!=v&&(c.ca.timescale=v),H=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(I,a.g.Sf(b.type,z),5);case 5:return C(I,Qj(a.g.W,b.type,z,null,b.stream,H),6);case 6:ta(I,0);break;case 2:throw J=va(I),b.ec=null,J;}})},a.g.Zh(c.startTime,c.ca),e.push(t()))),a.m.sequenceMode&&(w=b.Oa?b.Oa.j:null,c.j!=w&&e.push(bk(a.g.W,
399
+ r.sc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new wi(a.startTime,b,a.C,a.Aa,a.ja,a.ca,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.j=a.j,this.g[this.g.length-1]=b)}};
400
+ r.le=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Mc(function(){var d=b();d?c.g.push.apply(c.g,y(d)):(c.m.stop(),c.m=null)}),this.m.Sa(a))};Ek.prototype[Symbol.iterator]=function(){return this.xb(0)};
401
+ Ek.prototype.xb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;d--;var e=this.get(d+1),f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Ua("No independent partial segment found!"),null}d++;f=g-1;break}}return new Fk(this,d,f,c)};function Gk(a,b,c){a=new wi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Ek([a])}
402
+ P("shaka.media.SegmentIndex",Ek);Ek.forSingleSegment=Gk;Ek.prototype.getIteratorForTime=Ek.prototype.xb;Ek.prototype.updateEvery=Ek.prototype.le;Ek.prototype.fit=Ek.prototype.sc;Ek.prototype.evict=Ek.prototype.La;Ek.prototype.mergeAndEvict=Ek.prototype.kd;Ek.prototype.offset=Ek.prototype.offset;Ek.prototype.get=Ek.prototype.get;Ek.prototype.find=Ek.prototype.find;Ek.prototype.markImmutable=Ek.prototype.Xh;Ek.prototype.release=Ek.prototype.release;Ek.prototype.getNumEvicted=Ek.prototype.getNumEvicted;
403
+ Ek.prototype.getNumReferences=Ek.prototype.getNumReferences;function Fk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Fk.prototype.je=function(a){this.reverse=a};Fk.prototype.fh=function(){return this.h};Fk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
404
+ Fk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};P("shaka.media.SegmentIterator",Fk);Fk.prototype.next=Fk.prototype.next;Fk.prototype.current=Fk.prototype.current;Fk.prototype.currentPosition=Fk.prototype.fh;
405
+ Fk.prototype.setReverse=Fk.prototype.je;function Hk(){Ek.call(this,[]);this.h=[]}na(Hk,Ek);r=Hk.prototype;r.clone=function(){var a=new Hk;a.h=this.h.slice();return a};r.release=function(){for(var a=u(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.tc=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.tc(a)};r.find=function(a){for(var b=0,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};
406
+ r.get=function(a){for(var b=0,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.ae=function(){};r.La=function(){};r.kd=function(){};r.sc=function(){};r.le=function(){};P("shaka.media.MetaSegmentIndex",Hk);Hk.prototype.updateEvery=Hk.prototype.le;Hk.prototype.fit=Hk.prototype.sc;Hk.prototype.mergeAndEvict=Hk.prototype.kd;Hk.prototype.evict=Hk.prototype.La;Hk.prototype.merge=Hk.prototype.ae;
407
+ Hk.prototype.offset=Hk.prototype.offset;Hk.prototype.get=Hk.prototype.get;Hk.prototype.find=Hk.prototype.find;Hk.prototype.forEachTopLevelReference=Hk.prototype.tc;Hk.prototype.release=Hk.prototype.release;function Ik(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Md();this.h=new Mc(function(){b.g.qg(.25*b.i)})}Ik.prototype.release=function(){this.set(this.Xb());this.h&&(this.h.stop(),this.h=null);this.g=null};Ik.prototype.set=function(a){this.i=a;Jk(this)};Ik.prototype.Xb=function(){return this.g.Xb()};function Jk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Md()!=b&&a.g.Ff(b);return}catch(c){}a.h.Sa(.25);0!=a.g.Md()&&a.g.Ff(0)};function Kk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Mc(function(){Lk(b,!1)})).Sa(.25)}Kk.prototype.release=function(){this.i.stop();for(var a=u(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Lk(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Mk(){this.g=null;this.h=[]}function Nk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Ok(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Pk(){this.i=this.h=null;this.g=[]}function Qk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Rk(){this.Ed=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.I=this.K=this.l=this.o=NaN;this.g=new Mk;this.h=new Pk};function Sk(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function Tk(a,b){a.j=b;a=u(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
408
+ function Uk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.xb(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.ja&&(c=!1);2==d.bc()&&(c=!1);c&&d.ca&&Vk(a,d.ca);c&&!a.g.has(d)&&(c=new Wk(a.j),Xk(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.md&&d.Wd)break;d=b.next().value}Yk(a)}}}
409
+ function Vk(a,b){if(a.h.segmentIndex&&!Array.from(a.i.keys()).some(function(d){return vi(d,b)})){var c=new Wk(a.j);Xk(c,b,a.h);a.i.set(b,c)}}function Zk(a,b){b=u(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&$k(a,c)}function al(a){Zk(a,a.g);Zk(a,a.i);a.l=0}Sk.prototype.La=function(a,b){b=void 0===b?!1:b;for(var c=u(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&$k(this,d);b&&Yk(this)};
410
+ function Yk(a){for(var b=Array.from(a.g.keys()),c={},d=u(a.i.keys()),e=d.next();!e.done;c={wd:c.wd},e=d.next())c.wd=e.value,b.some(function(f){return function(g){return vi(g.ca,f.wd)}}(c))||$k(a,c.wd)}function bl(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&$k(a,d)}Yk(a)}function cl(a,b){b&&b!==a.h&&(al(a),a.h=b)}function $k(a,b){var c=a.g;b instanceof ri&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function Wk(a){this.g=a;this.ge=this.Gf=null}
411
+ function Xk(a,b,c){var d=new Uint8Array(0);a.ge=a.g(b,c,function(e){return L(function(f){if(1==f.g)return 0<d.byteLength?d=Bd(d,e):d=e,a.Gf?C(f,a.Gf(d),3):f.u(0);d=new Uint8Array(0);F(f)})})}Wk.prototype.abort=function(){this.ge&&this.ge.abort()};function dl(a){cg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Mc(function(){for(var c=b.i(),d=u(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new T("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Sa(2)}na(dl,cg);dl.prototype.release=function(){this.g.clear();this.h.stop();cg.prototype.release.call(this)};function el(a){cg.call(this);this.g=new Map;this.h=a}na(el,cg);el.prototype.release=function(){this.g.clear();cg.prototype.release.call(this)};function fl(a,b){var c=a.g.get(b);c||(c={nd:[],Wf:null,contentType:b},a.g.set(b,c));return c}function gl(a,b,c){var d=fl(a,b.contentType);hl(a,d);a={gf:b,position:c};d=d.nd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
412
+ el.prototype.j=function(a){for(var b=u(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.nd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.gf;break a}}d=null}if(e=d)e=c.Wf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
413
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Wf=d,JSON.stringify(d),c=new T("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function hl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.nd;b.nd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.nd=[]};function il(a,b,c,d,e){a=jg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function jl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.I=null;this.A=!1;this.l=new rg(function(){return kl(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null}}r=jl.prototype;r.destroy=function(){return this.l.destroy()};
414
+ function kl(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=u(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,ll(e),b.push(ml(e));f=u(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,al(h);return C(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;F(k)})}
415
+ r.configure=function(a){this.h=a;this.I=new Qf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.X&&(al(b.X),b.X=null);b=u(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,al(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Kd))&&
416
+ b.X&&(al(b.X),b.X=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.X&&(al(b.X),b.X=null);b=u(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.X?(bl(c.X,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.X=null)):0<a.segmentPrefetchLimit&&(c.X=nl(this,c.stream));a.disableAudioPrefetch||ol(this)};r.start=function(a){var b=this;return L(function(c){if(1==c.g)return C(c,pl(b,a||new Map),2);sg(b.l);b.C=!0;F(c)})};
417
+ function ql(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Md,a.H++,d=a.H,ra(l,2),C(l,Xj(a.g.W,c.ma),4);case 4:ta(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=Od(b.mimeType,b.codecs),Gj(a.g.W,f,a.m.sequenceMode,b.external),g=a.g.W.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=rl(a,b),a.i.set(c.ma,k),sl(a,k,0)),F(l)}})}function tl(a){var b=a.i.get(Kd);b&&(ll(b),ml(b).catch(function(){}),a.i.delete(Kd));a.s=null}
418
+ function ul(a,b){var c=0>a.g.eb(),d=a.i.get("video");d&&d.Z&&d.Z.je(c);(d=a.i.get("audio"))&&d.Z&&d.Z.je(c);(d=a.i.get(Kd))&&d.Z&&d.Z.je(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.jc&&(vl(a,b,!1,0,!1),c.jc=d);else if(b=c.jc)c.jc=null,vl(a,b,!0,0,!1)}function wl(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.C&&(b.video&&vl(a,b.video,c,d,e,f),b.audio&&vl(a,b.audio,c,d,e,f))}
419
+ function xl(a,b){L(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):C(c,b.createSegmentIndex(),2):c.return();vl(a,b,!0,0,!1);F(c)})}
420
+ function vl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Kd?g&&(g.jc&&(b.trickModeVideo?(g.jc=b,b=b.trickModeVideo):g.jc=null),g.stream!=b||e)&&(a.o.has(b)?g.X=a.o.get(b):g.X&&cl(g.X,b),b.type==Kd&&(e=Od(b.mimeType,b.codecs),Gj(a.g.W,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Z=null,g.Qf=!!f,c&&(g.Xc?g.me=!0:g.Qa?(g.Mb=!0,g.Id=d,g.me=!0):(ll(g),yl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),zl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
421
+ ql(a,b)}
422
+ function zl(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.$a)return e.return();c=b.stream;d=b.$a;return c.segmentIndex?e.u(2):C(e,c.createSegmentIndex(),2)}if(b.$a!=d||b.stream!=c)return e.return();var f=a.g.Ld();var g=Mj(a.g.W,b.type),h=b.stream.segmentIndex.find(b.Oa?b.Oa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.Aa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.ja?k.ja-k.Aa:null)||0),k=a.g.getBandwidthEstimate(),f=
423
+ 8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.$a.h.g>h?!0:!1):f=!1;f&&b.$a.abort();F(e)})}
424
+ r.od=function(){if(this.g)for(var a=this.g.Ld(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Z&&(e=c.Z.current());if(!e||e.startTime>a||e.endTime<a)c.Z=null;e=this.g.W;e.C?e=!1:d==Kd?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Lj(e,d),e=Bi(e,a));e||((null!=Mj(this.g.W,d)||c.Qa)&&Al(this,c),c.$a&&(c.$a.abort(),c.$a=null),d===Kd&&(d=this.g.W,d.H&&d.H.g()),c.od=!0)}};
425
+ function Al(a,b){b.Xc||b.Mb||(b.Qa?(b.Mb=!0,b.Id=0):null==Kj(a.g.W,b.type)?null==b.ub&&sl(a,b,0):(ll(b),yl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
426
+ function pl(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Md;if(!a.j)throw new Q(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.S,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.fa,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ma,a.s),e.add(a.s));f=a.g.W;return C(q,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}sg(a.l);a.updateDuration();g=u(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=rl(a,l),b.has(l.id)&&(n=
427
+ b.get(l.id),Tk(n,function(p,t,w){return Bl(p,t,w||null,a.h.retryParameters,a.g.zb)}),m.X=n),a.i.set(k,m),sl(a,m,0));F(q)})}function rl(a,b){return{stream:b,type:b.type,Z:null,X:nl(a,b),Oa:null,ec:null,df:null,bf:null,af:null,jc:null,endOfStream:!1,Qa:!1,ub:null,Mb:!1,Id:0,me:!1,Xc:!1,od:!0,wf:!1,gd:!1,$a:null}}
428
+ function nl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Kd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Kd&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.X)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new Sk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Bl(d,e,f||null,a.h.retryParameters,a.g.zb)}):null}
429
+ function ol(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=u(a.m.variants),f=e.next();!f.done;d={Fa:d.Fa},f=e.next())if(d.Fa=f.value,d.Fa.audio)if(a.o.has(d.Fa.audio)){if(f=a.o.get(d.Fa.audio),bl(f,b),!(0<b&&c.some(function(h){return function(k){return re(h.Fa.audio.language,k)}}(d)))){var g=a.i.get(d.Fa.audio.type);f!==(g&&g.X)&&al(f);a.o.delete(d.Fa.audio)}}else 0>=b||!c.some(function(h){return function(k){return re(h.Fa.audio.language,k)}}(d))||!(f=nl(a,d.Fa.audio))||
430
+ (d.Fa.audio.segmentIndex||d.Fa.audio.createSegmentIndex(),a.o.set(d.Fa.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.W.ab(a):this.g.W.ab(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
431
+ function Cl(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:sg(a.l);if(b.Qa||null==b.ub||b.Xc)return h.return();b.ub=null;if(!b.Mb){h.u(2);break}return C(h,yl(a,b,b.me,b.Id),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Qa||b.ub||sl(a,b,0),h.return();case 4:ra(h,6);d=Dl(a,b);null!=d&&(sl(a,b,d),b.gd=!1);ta(h,7);break;case 6:return e=
432
+ va(h),C(h,El(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return C(h,a.g.W.endOfStream(),10);case 10:sg(a.l),g=a.g.W.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.ab(g),F(h)}})}
433
+ function Dl(a,b){if(Fl(b))return Uj(a.g.W,b.stream.originalId||""),null;b.type==Kd&&Vj(a.g.W);if(!a.g.W.ea&&b.type!=Kd)return a.h.updateIntervalSeconds/2;var c=a.g.Ld();if("audio"===b.type)for(var d=u(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.La(c,!0),Uk(e,c);d=b.Oa?b.Oa.endTime:c;e=Nj(a.g.W,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.m.presentationTimeline.getDuration()-d,h=Mj(a.g.W,b.type);if(1E-6>g&&h)return b.endOfStream=
434
+ !0,"video"==b.type&&(a=a.i.get(Kd))&&Fl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Gl(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=u(g);for(h=g.next();!h.done;h=g.next())h=h.value,Fl(h)||h.Z&&!h.Z.current()||(f=Math.min(f,h.Oa?h.Oa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.X&&b.Z&&!a.o.has(b.stream)&&(b.X.La(c),Uk(b.X,e.startTime));Hl(a,b,c,e).catch(function(){});return null}
435
+ function Gl(a,b,c,d){if(b.Z)return b.Z.current();if(b.Oa||d)return b.Z=b.stream.segmentIndex.xb(b.Oa?b.Oa.endTime:d,!1,0>a.g.eb()),b.Z&&b.Z.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.eb();var f=null;d&&(b.Z=b.stream.segmentIndex.xb(e,!1,a),f=b.Z&&b.Z.next().value);f||(b.Z=b.stream.segmentIndex.xb(c,!1,a),f=b.Z&&b.Z.next().value);return f}
436
+ function Hl(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:e=Md;f=b.stream;g=b.Z;b.Qa=!0;ra(A,2);if(2==d.bc())throw new Q(1,1,1011);return C(A,Il(a,b,d),4);case 4:sg(a.l);if(a.A)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=q=!1,w=function(D){var H,J,I,E;return L(function(G){switch(G.g){case 1:if(q)return G.return();p=!0;sg(a.l);if(a.A)return G.return();
437
+ ra(G,2);n=Jl(n,D);H=!1;J=0;(new Bg).box("mdat",function(K){J=K.size+K.start;H=!0}).parse(n,!1,!0);if(!H){G.u(4);break}I=n.subarray(0,J);n=n.subarray(J);return C(G,Kl(a,b,c,f,d,I,!0),5);case 5:b.X&&b.Z&&Uk(b.X,d.startTime,!0);case 4:ta(G,0);break;case 2:t=E=va(G),F(G)}})},C(A,Ll(a,b,d,w),9);l=Ll(a,b,d);return C(A,l,7);case 7:m=A.h;sg(a.l);if(a.A)return A.return();sg(a.l);return b.Mb?(b.Qa=!1,sl(a,b,0),A.return()):C(A,Kl(a,b,c,f,d,m),6);case 9:x=A.h;if(t)throw t;if(p){A.u(10);break}q=!0;sg(a.l);return a.A?
438
+ A.return():b.Mb?(b.Qa=!1,sl(a,b,0),A.return()):C(A,Kl(a,b,c,f,d,x),10);case 10:b.X&&b.Z&&Uk(b.X,d.startTime,!0);case 6:sg(a.l);if(a.A)return A.return();b.Oa=d;g.next();b.Qa=!1;b.wf=!1;z=a.g.W.ob();v=z[b.type];ab(JSON.stringify(v));b.Mb||a.g.mf(d,b.stream);sl(a,b,0);ta(A,0);break;case 2:B=va(A);sg(a.l,B);if(a.A)return A.return();b.Qa=!1;if(7001==B.code)b.Qa=!1,ll(b),sl(a,b,0),A.u(0);else if(b.type==e.ma&&a.h.ignoreTextStreamFailures)a.i.delete(e.ma),A.u(0);else if(3017==B.code)Ml(a,b,B),A.u(0);else return b.gd=
439
+ !0,1==B.category&&b.X&&$k(b.X,d),B.severity=2,C(A,El(a,b,B),0)}})}function Nl(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):C(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
440
+ function Jl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Ml(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.wf})){if(0<a.h.maxDisabledTime&&a.g.Jd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.gd=!0;a.A=!0;a.g.onError(c);return}b.wf=!0}sl(a,b,4)}
441
+ function Il(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w;return L(function(x){switch(x.g){case 1:d=Md;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Xd(b.stream.codecs);k=Yd(b.stream.mimeType);l=c.timestampOffset;if(l==b.df&&f==b.bf&&g==b.af&&h==b.cf&&k==b.mg){x.u(2);break}m=b.cf&&b.mg&&hk(a.g.W,b.type,k,h);if(!m){x.u(3);break}n=null;b.type===d.fa?n=a.i.get(d.S):b.type===d.S&&(n=a.i.get(d.fa));if(!n){x.u(3);break}return C(x,ml(n).catch(function(){}),5);case 5:n.ec=null,Al(a,n);case 3:return q=
442
+ function(){var z,v,B;return L(function(A){if(1==A.g)return z=new Map,a.j.audio&&z.set(d.S,a.j.audio),a.j.video&&z.set(d.fa,a.j.video),ra(A,2),b.bf=f,b.af=g,b.cf=h,b.mg=k,b.df=l,v=a.m.sequenceMode||"HLS"==a.m.type,C(A,Yj(a.g.W,b.type,l,f,g,v,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=A.g)return ta(A,0);B=va(A);b.bf=null;b.af=null;b.cf=null;b.df=null;throw B;})},C(x,q(),2);case 2:return vi(c.ca,b.ec)||(b.ec=c.ca,c.l&&c.ca&&(p=Ll(a,b,c.ca),t=function(){var z,v,B,A,D,H,J;return L(function(I){switch(I.g){case 1:return ra(I,
443
+ 2),C(I,p,4);case 4:return z=I.h,sg(a.l),v=null,B=new Map,A={projection:null,hfov:null},D=new Bg,D.box("moov",Gg).box("trak",Gg).box("mdia",Gg).O("mdhd",function(E){v=Oi(E.reader,E.version).timescale}).box("hdlr",function(E){E=E.reader;E.skip(8);switch(E.hc()){case "soun":B.set(d.S,v);break;case "vide":B.set(d.fa,v)}v=null}).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("encv",Lg).box("avc1",Lg).box("avc3",Lg).box("hev1",Lg).box("hvc1",Lg).box("dvav",Lg).box("dva1",Lg).box("dvh1",Lg).box("dvhe",Lg).box("vexu",
444
+ Gg).box("proj",Gg).O("prji",function(E){E=E.reader.hc();A.projection=E}).box("hfov",function(E){E=E.reader.M()/1E3;A.hfov=E}).parse(z),Ol(a,A),B.has(b.type)?c.ca.timescale=B.get(b.type):null!=v&&(c.ca.timescale=v),H=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(I,a.g.Sf(b.type,z),5);case 5:return C(I,Pj(a.g.W,b.type,z,null,b.stream,H),6);case 6:ta(I,0);break;case 2:throw J=va(I),b.ec=null,J;}})},a.g.Zh(c.startTime,c.ca),e.push(t()))),a.m.sequenceMode&&(w=b.Oa?b.Oa.j:null,c.j!=w&&e.push(ak(a.g.W,
445
445
  b.type,c.startTime))),C(x,Promise.all(e),0)}})}
446
- function Ll(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return L(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.F;if(l||m)k=new Bg;l&&k.O("emsg",function(t){var w=d.emsgSchemeIdUris;if(0===t.version){var x=t.reader.hc();var z=t.reader.hc();var v=t.reader.M();var B=t.reader.M();var A=t.reader.M();var D=t.reader.M();var H=e.startTime+B/v}else v=t.reader.M(),H=t.reader.Cc()/
446
+ function Kl(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return L(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.F;if(l||m)k=new Bg;l&&k.O("emsg",function(t){var w=d.emsgSchemeIdUris;if(0===t.version){var x=t.reader.hc();var z=t.reader.hc();var v=t.reader.M();var B=t.reader.M();var A=t.reader.M();var D=t.reader.M();var H=e.startTime+B/v}else v=t.reader.M(),H=t.reader.Cc()/
447
447
  v+e.timestampOffset,B=H-e.startTime,A=t.reader.M(),D=t.reader.M(),x=t.reader.hc(),z=t.reader.hc();t=t.reader.sb(t.reader.getLength()-t.reader.wa());if(w&&w.includes(x)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.$h():(w=(new Map).set("detail",{startTime:H,endTime:H+A/v,schemeIdUri:x,value:z,timescale:v,presentationTimeDelta:B,eventDuration:A,id:D,messageData:t}),w=new T("emsg",w),w.cancelable=!0,a.g.onEvent(w),w.defaultPrevented||"https://aomedia.org/emsg/ID3"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
448
- x||(x=Li(t),x.length&&e&&a.g.ai([{cueTime:e.startTime,data:t,frames:x,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.O("prft",function(t){if(!a.F&&e.ca.timescale){var w=t.reader,x=t.version;w.M();t=w.M();var z=w.M();t=1E3*t+z/Math.pow(2,32)*1E3;0===x?w=w.M():(x=w.M(),w=w.M(),w=x*Math.pow(2,32)+w);t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+t)).getTime();w=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-w/e.ca.timescale*1E3)});w=new T("prft",w);a.g.onEvent(w);
449
- a.F=!0}});(l||m)&&k.parse(f);return C(p,Ql(a,b,c),2);case 2:return sg(a.l),n=b.od,b.od=!1,q=b.Qf,b.Qf=!1,C(p,a.g.Sf(b.type,f),3);case 3:return C(p,Qj(a.g.W,b.type,f,e,d,h,n,q,g),4);case 4:sg(a.l),F(p)}})}function Ql(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Lj(a.g.W,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():C(h,a.g.W.remove(b.type,e,e+g),2)}sg(a.l);F(h)})}
450
- function Gl(a){return a&&a.type==Kd&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
451
- function Ml(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.ed())return l.return(e);f=null;if(b.X){var m=b.X,n=m.g;c instanceof vi&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Gf=d),f=m.ge):f=null}f||(f=Cl(c,b.stream,d||null,a.h.retryParameters,a.g.zb));g=0;b.Z&&(g=b.Z.h);b.Za=f;return C(l,f.promise,2);case 2:h=l.h;b.Za=null;k=h.data;if(!c.aesKey){l.u(3);break}return C(l,Ol(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
452
- function Cl(a,b,c,d,e){var f=a instanceof xi?a:void 0,g=f?1:0;a=jl(a.$(),a.Aa,a.ja,d,c);a.contentType=b.type;return e.request(pg,a,{type:g,stream:b,segment:f})}
453
- function zl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Mb=!1,b.me=!1,b.Id=0,b.Xc=!0,b.Oa=null,b.ec=null,b.Z=null,b.X&&!a.o.has(b.stream)&&bl(b.X),d?(e=a.g.Ld(),f=a.g.W.getDuration(),C(g,a.g.W.remove(b.type,e+d,f),3)):C(g,Yj(a.g.W,b.type),4);if(3!=g.g)return sg(a.l),c?C(g,a.g.W.flush(b.type),3):g.u(3);sg(a.l);b.Xc=!1;b.endOfStream=!1;b.Qa||b.ub||tl(a,b,0);F(g)})}
454
- function tl(a,b,c){var d=b.type;if(d!=Kd||a.i.has(d))b.ub=(new Lc(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),C(f,Dl(a,b),4);if(2!=f.g)return ta(f,0);e=va(f);if(a.g)a.g.onError(e);F(f)})})).U(c)}function ml(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function nl(a){return L(function(b){return a.Za?C(b,a.Za.abort(),0):b.u(0)})}
455
- function Fl(a,b,c){var d;return L(function(e){if(1==e.g)return C(e,Sf(a.I),2);sg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Jd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);F(e)})}
456
- function Rl(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Md;if(e=a.i.get(d.S))e.ec=null,Bl(a,e),nl(e).catch(function(){});if(f=a.i.get(d.fa))f.ec=null,Bl(a,f),nl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.S,a.j.audio);a.j.video&&g.set(d.fa,a.j.video);return C(h,hk(a.g.W,g),2)}return h.return(!0)})}
457
- function Pl(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function Sl(){}
458
- function Tl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Ae(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ae(l)),k=Tl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Wa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
459
- k),g=!1)}return g}function Ul(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Vl(a,b){return a&&b}P("shaka.util.ConfigUtils",Sl);Sl.convertToConfigObject=Ul;Sl.mergeConfigObjects=Tl;function Wl(){}function Xl(a){a=od(a);return(new rc(a)).wb}function Yl(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new Q(2,6,6015);var e;"string"==typeof b?e=qd(b,!0):e=b;a=od(a);a=qd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Zl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=od(a).split("skd://").pop();return Yl(a,c,b)}
460
- function $l(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}P("shaka.util.FairPlayUtils",Wl);Wl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=jd(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Bb(wd(c)))}};Wl.expressplayFairPlayRequest=function(a,b){$l(a,b)};
461
- Wl.conaxFairPlayRequest=function(a,b){$l(a,b)};Wl.ezdrmFairPlayRequest=function(a,b){$l(a,b)};Wl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ab(b.body),a=vd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=pd("spc="+a))};Wl.expressplayInitDataTransform=function(a,b,c){return Zl(a,b,c)};
462
- Wl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=od(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Db(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Yl(a,d,b)};Wl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=od(a).split(";").pop();return Yl(a,c,b)};Wl.verimatrixInitDataTransform=function(a,b,c){return Zl(a,b,c)};Wl.initDataTransform=Yl;
463
- Wl.defaultGetContentId=Xl;Wl.isFairPlaySupported=function(){var a;return L(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ra(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);va(b);return b.return(!1)})};function am(){}
464
- function bm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Rf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(k,l,m){window.shakaMediaKeysPolyfill&&"skd"==l&&(l=m.serverCertificate,m=Xl(k),k=Yl(k,m,l));return k},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Sc(),minHdcpVersion:"",
448
+ x||(x=Ki(t),x.length&&e&&a.g.ai([{cueTime:e.startTime,data:t,frames:x,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.O("prft",function(t){if(!a.F&&e.ca.timescale){var w=t.reader,x=t.version;w.M();t=w.M();var z=w.M();t=1E3*t+z/Math.pow(2,32)*1E3;0===x?w=w.M():(x=w.M(),w=w.M(),w=x*Math.pow(2,32)+w);t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+t)).getTime();w=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-w/e.ca.timescale*1E3)});w=new T("prft",w);a.g.onEvent(w);
449
+ a.F=!0}});(l||m)&&k.parse(f);return C(p,Pl(a,b,c),2);case 2:return sg(a.l),n=b.od,b.od=!1,q=b.Qf,b.Qf=!1,C(p,a.g.Sf(b.type,f),3);case 3:return C(p,Pj(a.g.W,b.type,f,e,d,h,n,q,g),4);case 4:sg(a.l),F(p)}})}function Pl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Kj(a.g.W,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():C(h,a.g.W.remove(b.type,e,e+g),2)}sg(a.l);F(h)})}
450
+ function Fl(a){return a&&a.type==Kd&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
451
+ function Ll(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.ed())return l.return(e);f=null;if(b.X){var m=b.X,n=m.g;c instanceof ri&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Gf=d),f=m.ge):f=null}f||(f=Bl(c,b.stream,d||null,a.h.retryParameters,a.g.zb));g=0;b.Z&&(g=b.Z.h);b.$a=f;return C(l,f.promise,2);case 2:h=l.h;b.$a=null;k=h.data;if(!c.aesKey){l.u(3);break}return C(l,Nl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
452
+ function Bl(a,b,c,d,e){var f=a instanceof wi?a:void 0,g=f?1:0;a=il(a.$(),a.Aa,a.ja,d,c);a.contentType=b.type;return e.request(pg,a,{type:g,stream:b,segment:f})}
453
+ function yl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Mb=!1,b.me=!1,b.Id=0,b.Xc=!0,b.Oa=null,b.ec=null,b.Z=null,b.X&&!a.o.has(b.stream)&&al(b.X),d?(e=a.g.Ld(),f=a.g.W.getDuration(),C(g,a.g.W.remove(b.type,e+d,f),3)):C(g,Xj(a.g.W,b.type),4);if(3!=g.g)return sg(a.l),c?C(g,a.g.W.flush(b.type),3):g.u(3);sg(a.l);b.Xc=!1;b.endOfStream=!1;b.Qa||b.ub||sl(a,b,0);F(g)})}
454
+ function sl(a,b,c){var d=b.type;if(d!=Kd||a.i.has(d))b.ub=(new Lc(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),C(f,Cl(a,b),4);if(2!=f.g)return ta(f,0);e=va(f);if(a.g)a.g.onError(e);F(f)})})).U(c)}function ll(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function ml(a){return L(function(b){return a.$a?C(b,a.$a.abort(),0):b.u(0)})}
455
+ function El(a,b,c){var d;return L(function(e){if(1==e.g)return C(e,Sf(a.I),2);sg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Jd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);F(e)})}
456
+ function Ql(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Md;if(e=a.i.get(d.S))e.ec=null,Al(a,e),ml(e).catch(function(){});if(f=a.i.get(d.fa))f.ec=null,Al(a,f),ml(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.S,a.j.audio);a.j.video&&g.set(d.fa,a.j.video);return C(h,gk(a.g.W,g),2)}return h.return(!0)})}
457
+ function Ol(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function Rl(){}
458
+ function Sl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Ae(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ae(l)),k=Sl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Wa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
459
+ k),g=!1)}return g}function Tl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Ul(a,b){return a&&b}P("shaka.util.ConfigUtils",Rl);Rl.convertToConfigObject=Tl;Rl.mergeConfigObjects=Sl;function Vl(){}function Wl(a){a=od(a);return(new rc(a)).wb}function Xl(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new Q(2,6,6015);var e;"string"==typeof b?e=qd(b,!0):e=b;a=od(a);a=qd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Yl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=od(a).split("skd://").pop();return Xl(a,c,b)}
460
+ function Zl(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}P("shaka.util.FairPlayUtils",Vl);Vl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=jd(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Bb(wd(c)))}};Vl.expressplayFairPlayRequest=function(a,b){Zl(a,b)};
461
+ Vl.conaxFairPlayRequest=function(a,b){Zl(a,b)};Vl.ezdrmFairPlayRequest=function(a,b){Zl(a,b)};Vl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ab(b.body),a=vd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=pd("spc="+a))};Vl.expressplayInitDataTransform=function(a,b,c){return Yl(a,b,c)};
462
+ Vl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=od(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Db(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Xl(a,d,b)};Vl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=od(a).split(";").pop();return Xl(a,c,b)};Vl.verimatrixInitDataTransform=function(a,b,c){return Yl(a,b,c)};Vl.initDataTransform=Xl;
463
+ Vl.defaultGetContentId=Wl;Vl.isFairPlaySupported=function(){var a;return L(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ra(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);va(b);return b.return(!1)})};function $l(){}
464
+ function am(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Rf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(k,l,m){window.shakaMediaKeysPolyfill&&"skd"==l&&(l=m.serverCertificate,m=Wl(k),k=Xl(k,m,l));return k},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Sc(),minHdcpVersion:"",
465
465
  ignoreDuplicateInitData:!Wc()};(Sc()||bd())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;Wc()||Vc()||Tc("Tizen 4")||Tc("Tizen 5")||Tc("Tizen 6")||Yc()||Xc()&&53===Zc()||Xc()&&68===Zc()||!(!$c()||$c()&&Tc("Android")||$c()&&Tc("Fuchsia"))||(navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform&&navigator.platform.toLowerCase().includes("windows"))&&Qc()||(c="smooth",d=!0);d={retryParameters:Rf(),
466
466
  availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey",
467
- "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:cm,manifestPreprocessorTXml:dm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,
468
- defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Vc()||Wc()||Yc()||bd()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:cm,manifestPreprocessorTXml:dm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
469
- "79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Rf(),failureCallback:function(k){return Vl([k])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
467
+ "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:bm,manifestPreprocessorTXml:cm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,
468
+ defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Vc()||Wc()||Yc()||bd()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:bm,manifestPreprocessorTXml:cm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
469
+ "79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Rf(),failureCallback:function(k){return Ul([k])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
470
470
  autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:.95,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,
471
- vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,loadTimeout:30};if(Xc()||Uc()||$c()||dd())e.stallSkip=0;var f={trackSelectionCallback:function(k){return L(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;return L(function(m){if(1==m.g)return navigator.storage&&navigator.storage.estimate?C(m,navigator.storage.estimate(),3):m.return(!0);l=m.h;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return Vl([k,
471
+ vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,loadTimeout:30};if(Xc()||Uc()||$c()||dd())e.stallSkip=0;var f={trackSelectionCallback:function(k){return L(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;return L(function(m){if(1==m.g)return navigator.storage&&navigator.storage.estimate?C(m,navigator.storage.estimate(),3):m.return(!0);l=m.h;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return Ul([k,
472
472
  l])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,
473
- clearBufferSwitch:!1,safeMarginSwitch:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(k){return Vl([k],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(k,l){return Vl([k,l])}};var g=!1;if(Xc()||Uc()||$c()||dd()||cd()||bd()||Sc())g=!0;var h={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new tf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",
473
+ clearBufferSwitch:!1,safeMarginSwitch:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(k){return Ul([k],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(k,l){return Ul([k,l])}};var g=!1;if(Xc()||Uc()||$c()||dd()||cd()||bd()||Sc())g=!0;var h={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new tf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",
474
474
  preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},
475
- textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(em(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
476
- function fm(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Tl(a,b,c||bm(),d,"")}
477
- function em(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=ze(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return se(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
478
- h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Kd&&"image"!=c.type||b.push(c);return b}function cm(a){return Vl([a],a)}function dm(a){return Vl([a],a)}P("shaka.util.PlayerConfiguration",am);am.mergeConfigObjects=fm;am.createDefault=bm;function gm(a,b,c,d,e){cg.call(this);this.K=a;this.Y=b;this.bb=e.networkingEngine;this.aa=d;this.o=null;this.Vb=c;this.Ia=0;this.Tb=e.rc;this.A=e.Uh;this.Ub=e.Vh;this.g=e.config;this.j=this.B=this.h=null;this.sa=!1;this.C=e.ei;this.Ga=!1;this.l=null;this.ea=!1;this.i=this.s=null;this.da=!1;this.I=new Map;this.Ha=!1;this.lb=e.di;this.ba=new Sk;this.qa=new Tf;this.pa=new Tf;this.L=new Tf;this.F=new Tf;this.F.catch(function(){});this.N=null;this.m=!1;this.Rb=e.Xg;this.ta=null;this.mb=e.Wg;this.T=!1;
479
- this.H=[];this.G=[]}na(gm,cg);function hm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function im(a){if(a.G)for(var b=u(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function jm(a,b){a.N=b;a.T=!0;if(a.H){b=u(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=gm.prototype;r.getStartTime=function(){return this.aa};r.ad=function(){return this.K};r.Ue=function(){return this.h};function km(a){a.da=!0;return a.i}function lm(a){a.sa=!0;return a.j}function mm(a){a.Ga=!0;return a.C}
480
- r.getStats=function(){return this.ba};function nm(a){a.ea=!0;return a.l}function om(a){a.Ha=!0;return a.I}
481
- r.start=function(){var a=this,b;return L(function(c){switch(c.g){case 1:return C(c,Promise.resolve(),2);case 2:return ra(c,3),C(c,pm(a),5);case 5:if(a.m)return c.return();a.qa.resolve();return C(c,qm(a),6);case 6:if(a.m)return c.return();a.pa.resolve();a.o||(a.o=new Df(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,
482
- a.g.manifest.dash.enableAudioGroups),De(a.h,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes));if(a.mb){var d=a.g.abrFactory;a.s=d;a.i=d();a.i.configure(a.g.abr)}if(a.Rb){d=a.h.presentationTimeline.R();var e=mf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ta=e,e.video&&rm(a,e.video,d),e.audio&&rm(a,e.audio,d)}return C(c,void 0,7);case 7:if(a.m)return c.return();a.L.resolve();ta(c,0);break;
483
- case 3:throw b=va(c),a.F.reject(b),b;}})};r.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):cg.prototype.dispatchEvent.call(this,a)};r.onError=function(a){2===a.severity&&(this.F.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function sm(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
484
- function pm(a){var b,c,d,e,f;return L(function(g){if(1==g.g){sm(a,"manifest-parser");a.j||(a.B=mi(a.K,a.Y),a.j=a.B(),a.j.configure(a.g.manifest));b=Date.now()/1E3;sm(a,"manifest");if(a.h)return g.u(2);c=a;return C(g,a.j.start(a.K,a.Ub),3)}2!=g.g&&(c.h=g.h);d=new T("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new Q(2,4,4036);tm(a.h);e=Date.now()/1E3;f=e-b;a.ba.F=f;F(g)})}
485
- function qm(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:sm(a,"drm-engine");a.Ia=Date.now()/1E3;a.l=a.Tb();a.A.g=a.l;a.l.configure(a.g.drm);var h=a.A;b=He(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new T("trackschanged",void 0);return C(g,Promise.resolve(),3);case 3:a.dispatchEvent(c);case 2:return d=mf(a.h.variants),C(g,xh(a.l,d,a.h.offlineSessionIds),4);case 4:return C(g,fi(a.A,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new T("trackschanged",void 0);return C(g,Promise.resolve(),
486
- 7);case 7:a.dispatchEvent(f),F(g)}})}r.configure=function(a,b){a=Ul(a,b);fm(this.g,a)};r.getConfiguration=function(){return Ae(this.g)};
487
- function rm(a,b,c){var d,e,f,g,h;L(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Tk(d,b,function(l,m,n){return Cl(l,m,n||null,a.g.streaming.retryParameters,a.bb)}),a.I.set(b.id,e),C(k,b.createSegmentIndex(),2);f=a.aa||0;(h=(g=b.segmentIndex.xb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ca&&Wk(e,h.ca):Vk(e,h.startTime));F(k)})}r.Gi=function(){return Promise.race([this.L,this.F])};
488
- r.destroy=function(){var a=this,b,c,d;return L(function(e){switch(e.g){case 1:a.m=!0;if(!a.j||a.sa){e.u(2);break}return C(e,a.j.stop(),2);case 2:if(!a.i||a.da){e.u(4);break}return C(e,a.i.stop(),4);case 4:a.C&&!a.Ga&&a.C.release();if(!a.l||a.ea){e.u(6);break}return C(e,a.l.destroy(),6);case 6:if(0<a.I.size&&!a.Ha)for(b=u(a.I.values()),c=b.next();!c.done;c=b.next())d=c.value,bl(d);F(e)}})};
489
- function tm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}P("shaka.media.PreloadManager",gm);gm.prototype.destroy=gm.prototype.destroy;gm.prototype.waitForFinish=gm.prototype.Gi;function um(a,b){cg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{oc:null,nc:vm,cc:function(d,e){return wm(c,"enter",d,e)}},{oc:xm,nc:vm,cc:function(d,e){return wm(c,"enter",d,e)}},{oc:Lm,nc:vm,cc:function(d,e){return wm(c,"enter",d,e)}},{oc:vm,nc:xm,cc:function(d,e){return wm(c,"exit",d,e)}},{oc:vm,nc:Lm,cc:function(d,e){return wm(c,"exit",d,e)}},{oc:xm,nc:Lm,cc:function(d,e){return wm(c,"skip",d,e)}},{oc:Lm,nc:xm,cc:function(d,e){return wm(c,"skip",d,e)}}];this.h=new eb;this.h.D(this.i,
490
- "regionremove",function(d){c.g.delete(d.region)})}na(um,cg);um.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cg.prototype.release.call(this)};um.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=u(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?xm:a>d.endTime?Lm:vm;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.oc==e&&h.nc==f&&h.cc(d,b)}}};
491
- function wm(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var xm=1,vm=2,Lm=3;function Mm(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:var n=(new rc(a)).Pa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Nm[d])return m.return(e);f=0;g=jg([a],c);ra(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=va(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
475
+ textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(dm(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
476
+ function em(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Sl(a,b,c||am(),d,"")}
477
+ function dm(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=ze(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return se(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
478
+ h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Kd&&"image"!=c.type||b.push(c);return b}function bm(a){return Ul([a],a)}function cm(a){return Ul([a],a)}P("shaka.util.PlayerConfiguration",$l);$l.mergeConfigObjects=em;$l.createDefault=am;function fm(a,b,c,d,e){cg.call(this);this.K=a;this.Y=b;this.cb=e.networkingEngine;this.aa=d;this.o=null;this.Vb=c;this.Ia=0;this.Tb=e.rc;this.s=e.Uh;this.Ub=e.Vh;this.g=e.config;this.j=this.B=this.h=null;this.sa=!1;this.C=e.ei;this.Ga=!1;this.l=null;this.ea=!1;this.i=this.A=null;this.da=!1;this.I=new Map;this.Ha=!1;this.lb=e.di;this.ba=new Rk;this.qa=new Tf;this.pa=new Tf;this.L=new Tf;this.F=new Tf;this.F.catch(function(){});this.N=null;this.m=!1;this.Rb=e.Xg;this.ta=null;this.mb=e.Wg;this.T=!1;
479
+ this.H=[];this.G=[]}na(fm,cg);function gm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function hm(a){if(a.G)for(var b=u(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function im(a,b){a.N=b;a.T=!0;if(a.H){b=u(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=fm.prototype;r.getStartTime=function(){return this.aa};r.ad=function(){return this.K};r.Ue=function(){return this.h};function jm(a){a.da=!0;return a.i}function km(a){a.sa=!0;return a.j}function lm(a){a.Ga=!0;return a.C}
480
+ r.getStats=function(){return this.ba};function mm(a){a.ea=!0;return a.l}function nm(a){a.Ha=!0;return a.I}
481
+ r.start=function(){var a=this,b;return L(function(c){switch(c.g){case 1:return C(c,Promise.resolve(),2);case 2:return ra(c,3),C(c,om(a),5);case 5:if(a.m)return c.return();a.qa.resolve();return C(c,pm(a),6);case 6:if(a.m)return c.return();a.pa.resolve();a.o||(a.o=new Df(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,
482
+ a.g.manifest.dash.enableAudioGroups));if(a.mb){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Rb){d=a.h.presentationTimeline.R();var e=mf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ta=e,e.video&&qm(a,e.video,d),e.audio&&qm(a,e.audio,d)}return C(c,void 0,7);case 7:if(a.m)return c.return();a.L.resolve();ta(c,0);break;case 3:throw b=va(c),a.F.reject(b),b;}})};
483
+ r.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):cg.prototype.dispatchEvent.call(this,a)};r.onError=function(a){2===a.severity&&(this.F.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function rm(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
484
+ function om(a){var b,c,d,e,f;return L(function(g){if(1==g.g){rm(a,"manifest-parser");a.j||(a.B=li(a.K,a.Y),a.j=a.B(),a.j.configure(a.g.manifest));b=Date.now()/1E3;rm(a,"manifest");if(a.h)return g.u(2);c=a;return C(g,a.j.start(a.K,a.Ub),3)}2!=g.g&&(c.h=g.h);d=new T("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new Q(2,4,4036);sm(a.h);e=Date.now()/1E3;f=e-b;a.ba.F=f;F(g)})}
485
+ function pm(a){var b,c,d,e,f,g;return L(function(h){switch(h.g){case 1:rm(a,"drm-engine");a.Ia=Date.now()/1E3;a.l=a.Tb();a.s.g=a.l;a.l.configure(a.g.drm);var k=a.s;b=He(a.h.variants,k.h.restrictions,k.i);return C(h,fi(a.s,a.h),2);case 2:c=h.h;if(!b&&!c){h.u(3);break}d=new T("trackschanged",void 0);return C(h,Promise.resolve(),4);case 4:a.dispatchEvent(d);case 3:return e=mf(a.h.variants),C(h,xh(a.l,e,a.h.offlineSessionIds),5);case 5:return C(h,fi(a.s,a.h),6);case 6:f=h.h;if(!f){h.u(0);break}g=new T("trackschanged",
486
+ void 0);return C(h,Promise.resolve(),8);case 8:a.dispatchEvent(g),F(h)}})}r.configure=function(a,b){a=Tl(a,b);em(this.g,a)};r.getConfiguration=function(){return Ae(this.g)};
487
+ function qm(a,b,c){var d,e,f,g,h;L(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Sk(d,b,function(l,m,n){return Bl(l,m,n||null,a.g.streaming.retryParameters,a.cb)}),a.I.set(b.id,e),C(k,b.createSegmentIndex(),2);f=a.aa||0;(h=(g=b.segmentIndex.xb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ca&&Vk(e,h.ca):Uk(e,h.startTime));F(k)})}r.Gi=function(){return Promise.race([this.L,this.F])};
488
+ r.destroy=function(){var a=this,b,c,d;return L(function(e){switch(e.g){case 1:a.m=!0;if(!a.j||a.sa){e.u(2);break}return C(e,a.j.stop(),2);case 2:if(!a.i||a.da){e.u(4);break}return C(e,a.i.stop(),4);case 4:a.C&&!a.Ga&&a.C.release();if(!a.l||a.ea){e.u(6);break}return C(e,a.l.destroy(),6);case 6:if(0<a.I.size&&!a.Ha)for(b=u(a.I.values()),c=b.next();!c.done;c=b.next())d=c.value,al(d);F(e)}})};
489
+ function sm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}P("shaka.media.PreloadManager",fm);fm.prototype.destroy=fm.prototype.destroy;fm.prototype.waitForFinish=fm.prototype.Gi;function tm(a,b){cg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{oc:null,nc:um,cc:function(d,e){return vm(c,"enter",d,e)}},{oc:wm,nc:um,cc:function(d,e){return vm(c,"enter",d,e)}},{oc:xm,nc:um,cc:function(d,e){return vm(c,"enter",d,e)}},{oc:um,nc:wm,cc:function(d,e){return vm(c,"exit",d,e)}},{oc:um,nc:xm,cc:function(d,e){return vm(c,"exit",d,e)}},{oc:wm,nc:xm,cc:function(d,e){return vm(c,"skip",d,e)}},{oc:xm,nc:wm,cc:function(d,e){return vm(c,"skip",d,e)}}];this.h=new eb;this.h.D(this.i,
490
+ "regionremove",function(d){c.g.delete(d.region)})}na(tm,cg);tm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cg.prototype.release.call(this)};tm.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=u(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?wm:a>d.endTime?xm:um;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.oc==e&&h.nc==f&&h.cc(d,b)}}};
491
+ function vm(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var wm=1,um=2,xm=3;function ym(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:var n=(new rc(a)).Pa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Mm[d])return m.return(e);f=0;g=jg([a],c);ra(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=va(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
492
492
  e.toLowerCase().split(";").shift():"")}})}
493
- var Nm={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",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Om(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Om(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Pm(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Pm(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=u(h);h=k.next().value;k=k.next().value;
493
+ var Mm={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",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Nm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Nm(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Om(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Om(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=u(h);h=k.next().value;k=k.next().value;
494
494
  return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
495
- function Pm(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
496
- case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Qm(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,y(Qm(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Om(d,b);c.push(e)}return c};function Rm(a,b){this.g=null;for(var c=u(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=Rm.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;Sm(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
497
- r.append=function(a){var b=Qm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=u(b);for(var e=b.next();!e.done;d={qc:d.qc},e=b.next())d.qc=e.value,a.some(function(f){return function(g){return g.startTime==f.qc.startTime&&g.endTime==f.qc.endTime&&g.text==f.qc.payload?!0:!1}}(d))||(e=Tm(d.qc))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
498
- c.indexOf(g)});a=u(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(Sm(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
499
- function Tm(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
500
- function Sm(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=u(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}P("shaka.text.SimpleTextDisplayer",Rm);Rm.prototype.setTextVisibility=Rm.prototype.setTextVisibility;Rm.prototype.isTextVisible=Rm.prototype.isTextVisible;Rm.prototype.destroy=Rm.prototype.destroy;Rm.prototype.append=Rm.prototype.append;Rm.prototype.remove=Rm.prototype.remove;Rm.prototype.configure=Rm.prototype.configure;function Um(){}r=Um.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};P("shaka.text.StubTextDisplayer",Um);Um.prototype.setTextVisibility=Um.prototype.setTextVisibility;Um.prototype.isTextVisible=Um.prototype.isTextVisible;Um.prototype.destroy=Um.prototype.destroy;Um.prototype.append=Um.prototype.append;Um.prototype.remove=Um.prototype.remove;Um.prototype.configure=Um.prototype.configure;function Vm(){}function Wm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",Vm);Vm.removeAllChildren=Wm;function Xm(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||pb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Mc(function(){d.A.paused||
501
- Ym(d)})).Sa(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new eb;this.j.D(document,"fullscreenchange",function(){Ym(d,!0)});this.j.D(this.A,"seeking",function(){Ym(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Ym(d,!0)}),this.o.observe(this.g));this.B=new Map}r=Xm.prototype;r.configure=function(a){this.C&&this.C.Sa(a.captionsUpdatePeriod)};
502
- r.append=function(a){var b=[].concat(y(this.h)),c={};a=u(a);for(var d=a.next();!d.done;c={ud:c.ud},d=a.next())c.ud=d.value,b.some(function(e){return function(f){return $b(f,e.ud)}}(c))||this.h.push(c.ud);Ym(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
503
- r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Ym(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function Zm(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
504
- function $m(a,b,c,d,e){var f=!1,g=[],h=[];b=u(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Og:null;l&&(g.push(l.De),l.ic&&g.push(l.ic),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Zm(a,n)||(f=!0):(an(a,k,e),l=a.i.get(k),n=l.Og,f=!0));0<k.nestedCues.length&&n&&$m(a,k.nestedCues,n,d,e);e.pop()}if(f){d=u(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,p){return q.startTime!=
505
- p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=u(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.ic?(d.ic.contains(c)&&d.ic.removeChild(c),c.appendChild(d.ic),d.ic.appendChild(d.De)):c.appendChild(d.De)}}function Ym(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=u(a.B.values());for(var d=b.next();!d.done;d=b.next())Wm(d.value);Wm(a.g);a.i.clear();a.B.clear()}a.m&&$m(a,a.h,a.g,c,[])}}
506
- function an(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&bn(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.l===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==gc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==gc?"%":"px");if(a.B.has(g))c=a.B.get(g);else{var h=document.createElement("span"),k=c.heightUnits==gc?"%":"px",l=c.widthUnits==
495
+ function Om(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
496
+ case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Pm(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,y(Pm(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Nm(d,b);c.push(e)}return c};function Qm(a,b){this.g=null;for(var c=u(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=Qm.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;Rm(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
497
+ r.append=function(a){var b=Pm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=u(b);for(var e=b.next();!e.done;d={qc:d.qc},e=b.next())d.qc=e.value,a.some(function(f){return function(g){return g.startTime==f.qc.startTime&&g.endTime==f.qc.endTime&&g.text==f.qc.payload?!0:!1}}(d))||(e=Sm(d.qc))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
498
+ c.indexOf(g)});a=u(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(Rm(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
499
+ function Sm(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
500
+ function Rm(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=u(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}P("shaka.text.SimpleTextDisplayer",Qm);Qm.prototype.setTextVisibility=Qm.prototype.setTextVisibility;Qm.prototype.isTextVisible=Qm.prototype.isTextVisible;Qm.prototype.destroy=Qm.prototype.destroy;Qm.prototype.append=Qm.prototype.append;Qm.prototype.remove=Qm.prototype.remove;Qm.prototype.configure=Qm.prototype.configure;function Tm(){}r=Tm.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};P("shaka.text.StubTextDisplayer",Tm);Tm.prototype.setTextVisibility=Tm.prototype.setTextVisibility;Tm.prototype.isTextVisible=Tm.prototype.isTextVisible;Tm.prototype.destroy=Tm.prototype.destroy;Tm.prototype.append=Tm.prototype.append;Tm.prototype.remove=Tm.prototype.remove;Tm.prototype.configure=Tm.prototype.configure;function Um(){}function Vm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",Um);Um.removeAllChildren=Vm;function Wm(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||pb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Mc(function(){d.A.paused||
501
+ Xm(d)})).Sa(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new eb;this.j.D(document,"fullscreenchange",function(){Xm(d,!0)});this.j.D(this.A,"seeking",function(){Xm(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Xm(d,!0)}),this.o.observe(this.g));this.B=new Map}r=Wm.prototype;r.configure=function(a){this.C&&this.C.Sa(a.captionsUpdatePeriod)};
502
+ r.append=function(a){var b=[].concat(y(this.h)),c={};a=u(a);for(var d=a.next();!d.done;c={ud:c.ud},d=a.next())c.ud=d.value,b.some(function(e){return function(f){return $b(f,e.ud)}}(c))||this.h.push(c.ud);Xm(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
503
+ r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Xm(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function Ym(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
504
+ function Zm(a,b,c,d,e){var f=!1,g=[],h=[];b=u(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Og:null;l&&(g.push(l.De),l.ic&&g.push(l.ic),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Ym(a,n)||(f=!0):($m(a,k,e),l=a.i.get(k),n=l.Og,f=!0));0<k.nestedCues.length&&n&&Zm(a,k.nestedCues,n,d,e);e.pop()}if(f){d=u(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,p){return q.startTime!=
505
+ p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=u(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.ic?(d.ic.contains(c)&&d.ic.removeChild(c),c.appendChild(d.ic),d.ic.appendChild(d.De)):c.appendChild(d.De)}}function Xm(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=u(a.B.values());for(var d=b.next();!d.done;d=b.next())Vm(d.value);Vm(a.g);a.i.clear();a.B.clear()}a.m&&Zm(a,a.h,a.g,c,[])}}
506
+ function $m(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&an(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.l===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==gc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==gc?"%":"px");if(a.B.has(g))c=a.B.get(g);else{var h=document.createElement("span"),k=c.heightUnits==gc?"%":"px",l=c.widthUnits==
507
507
  gc?"%":"px",m=c.viewportAnchorUnits==gc?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.l===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):
508
508
  (h.style.top=c.viewportAnchorY-c.regionAnchorY*c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(g,h);c=h}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,
509
- {De:f,Og:e,ic:c})}function cn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Pb?c:"left"===a||"start"===a&&b===Rb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Rb?"line-right":"center"}
510
- function bn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=dn(c.linePadding,c,a.s);f.paddingRight=dn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
511
- "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=en(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=en(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-
512
- 1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=dn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Ub&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",
513
- c.writingMode==Tb?(f.width="100%",c.lineAlign==Vb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Vb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Vb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Tb?f.paddingLeft=c.position:f.paddingTop=c.position);a=cn(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");
509
+ {De:f,Og:e,ic:c})}function bn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Pb?c:"left"===a||"start"===a&&b===Rb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Rb?"line-right":"center"}
510
+ function an(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=cn(c.linePadding,c,a.s);f.paddingRight=cn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
511
+ "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=dn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=dn(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-
512
+ 1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=cn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Ub&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",
513
+ c.writingMode==Tb?(f.width="100%",c.lineAlign==Vb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Vb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Vb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Tb?f.paddingLeft=c.position:f.paddingTop=c.position);a=bn(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");
514
514
  f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Tb?f.width=c.size+"%":f.height=c.size+"%")}
515
- function dn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function en(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}P("shaka.text.UITextDisplayer",Xm);Xm.prototype.setTextVisibility=Xm.prototype.setTextVisibility;
516
- Xm.prototype.isTextVisible=Xm.prototype.isTextVisible;Xm.prototype.remove=Xm.prototype.remove;Xm.prototype.destroy=Xm.prototype.destroy;Xm.prototype.append=Xm.prototype.append;Xm.prototype.configure=Xm.prototype.configure;function fn(a,b){function c(f){for(var g=f,h=u(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Qm(a);a="WEBVTT\n\n";d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
517
- break;case "right":g.push("align:right");break;case Qb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}P("shaka.text.WebVttGenerator",function(){});function gn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}gn.prototype.configure=function(a){this.g=a};
518
- function hn(a,b,c){try{if(!a.g.enabled)return b;var d=jn(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=kn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=ln;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=mn;break a}e=void 0}d.ot=e;d.su=
519
- !0;var f=nn(d);return on(b,f)}catch(g){return Xa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function jn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
520
- function pn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,jn(a));c.pr=a.h.eb();var e=c.ot===qn||c.ot===ln;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=rn(a,c);if(d)d=sn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=nn(a);f&&(b.uris=b.uris.map(function(g){return on(g,f)}))}}}function rn(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
521
- function tn(a){if(0===a.type)return un;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?ln:qn;if("audio"==b)return kn;if("text"==b)return"application/mp4"===a.mimeType?vn:wn}}function xn(a,b){b=a.h.ob()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
522
- function yn(a,b){b=a.h.ob()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function zn(a,b){var c=a.h.Ib();if(!c.length)return NaN;a=c[0];c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case qn:return a.videoBandwidth||NaN;case kn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
523
- function nn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=u(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
524
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function sn(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=nn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
525
- function on(a,b){if(!b||a.includes("offline:"))return a;a=new rc(a);a.g.set("CMCD",b);return a.toString()}var mn="m",kn="a",qn="v",ln="av",un="i",wn="c",vn="tt";P("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Qg:"s",OTHER:"o"});function An(a){this.h=a;this.g=null}r=An.prototype;r.configure=function(a){this.h=a};r.fg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Bn)?1E3*this.g.get(Bn):null};r.eg=function(){return this.h.enabled&&this.g&&this.g.has(Cn)?1E3*this.g.get(Cn):null};r.yh=function(){return this.h.enabled&&this.g&&this.g.has(Dn)?this.g.get(Dn):null};r.zh=function(){return this.h.enabled&&this.g&&this.g.has(En)?this.g.get(En):null};
526
- r.getBandwidthEstimate=function(a){var b=this.eg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Fn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",An);An.prototype.getBandwidthEstimate=An.prototype.getBandwidthEstimate;An.prototype.getRoundTripTime=An.prototype.zh;An.prototype.getResponseDelay=An.prototype.yh;An.prototype.getEstimatedThroughput=An.prototype.eg;
527
- An.prototype.getMaxBitrate=An.prototype.fg;var Cn="etp",Bn="mb",Dn="rd",En="rtt";function Gn(){this.g=null;this.h=[]}function Hn(a,b){return L(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;F(c)})}Gn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){cg.call(this);var c=this;this.l=In;this.Rd=this.g=null;this.da=!1;this.Yd=new eb;this.Rb=new eb;this.m=new eb;this.ta=new eb;this.C=this.F=this.B=this.H=null;this.ce=0;this.Y=new Gn;this.ea=this.kf=this.qa=this.i=this.Ga=this.I=this.j=this.lb=this.K=this.wg=this.aa=this.T=this.mb=this.L=this.Td=this.G=this.bb=null;this.Ia=!1;this.pa=this.o=null;this.uf=1E9;this.$c=[];this.N=NaN;this.h=Jn(this);this.ba={width:Infinity,height:Infinity};this.Pd=new ei(this.h,this.ba,null);this.nf=[];
528
- this.s=null;this.sa=new Df(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ha=this.h.preferredTextLanguage;this.Vb=this.h.preferredTextRole;this.Ub=this.h.preferForcedSubs;this.Tb=[];b&&b(this);this.T=Kn(this);this.aa=new An(this.h.cmsd);
529
- this.H=Ln(this);this.H.Ef(this.h.streaming.forceHTTPS);this.A=null;Mn&&(this.A=Mn(),this.A.configure(this.h.ads));this.Yd.D(window,"online",function(){Nn(c);c.xf()});this.Ud=new Mc(function(){return On(c)});a&&(pb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Vc(a,!0))}na(X,cg);function Pn(a){null!=a.K&&(tj(a.K),a.K.release(),a.K=null)}
530
- function Qn(a,b){if(b.lcevc.enabled){var c=a.Ib();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Qc()||Rc())&&(b.mediaSource.forceTransmux||Wa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Pn(a);null==a.K&&(a.K=new sj(a.g,a.wg,b.lcevc),a.F&&(a.F.T=a.K))}else Pn(a)}function Rn(a,b){return new T(a,b)}r=X.prototype;
531
- r.destroy=function(){var a=this,b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(a.l==Sn)return g.return();Pn(a);b=a.detach();a.l=Sn;return C(g,b,2);case 2:c=[];d=u(a.nf);for(e=d.next();!e.done;e=d.next())f=e.value,f.m||c.push(f.destroy());a.nf=[];return C(g,Promise.all(c),3);case 3:a.Yd&&(a.Yd.release(),a.Yd=null);a.Rb&&(a.Rb.release(),a.Rb=null);a.m&&(a.m.release(),a.m=null);a.ta&&(a.ta.release(),a.ta=null);a.pa=null;a.h=null;a.s=null;a.Rd=null;a.T=null;a.aa=null;if(!a.H){g.u(4);break}return C(g,
532
- a.H.destroy(),5);case 5:a.H=null;case 4:a.o&&(a.o.release(),a.o=null),cg.prototype.release.call(a),F(g)}})};function Tn(a,b){a.dispatchEvent(Rn("onstatechange",(new Map).set("state",b)))}
533
- r.Vc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==Sn)throw new Q(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.u(2);break}return C(g,c.detach(),2);case 2:return C(g,Un(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(Tn(c,"attach"),e=function(){var h=Vn(c);h&&Wn(c,h)},c.Rb.D(a,"error",e),c.g=a);if(!b||!Nc()||c.F){g.u(6);break}return C(g,Xn(c),6);case 6:wa(g);c.Y.release();ya(g,0);break;case 5:return f=va(g),C(g,c.detach(),10);case 10:throw f;
534
- }})};r.Yg=function(a){this.wg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==Sn)throw new Q(2,7,7E3);return C(c,b.lc(!1,a),2)}if(3!=c.g)return C(c,Un(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Rb.ib(),b.g=null),Tn(b,"detach"),b.A&&!a&&b.A.release()}finally{b.Y.release()}F(c)})};function Un(a,b){var c;return L(function(d){return 1==d.g?(c=++a.ce,C(d,Hn(a.Y,b),2)):c!=a.ce?(a.Y.release(),d.return(!0)):d.return(!1)})}
535
- r.lc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:return c.l!=Sn&&(c.l=In),C(q,Un(c,"unload"),2);case 2:if(q.h)return q.return();sa(q,3);c.Ia=!1;Tn(c,"unload");a&&!Nc()&&(a=!1);Pn(c);d=c.Tb.map(function(p){return p()});c.Tb=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(Rn("unloading"));c.mb&&(c.mb.release(),c.mb=null);c.g&&(c.m.ib(),c.ta.ib());c.Ud.stop();c.bb&&(c.bb.release(),c.bb=null);c.Td&&(c.Td.stop(),c.Td=null);
536
- if(!c.I){q.u(6);break}return C(q,c.I.stop(),7);case 7:c.I=null,c.Ga=null;case 6:if(!c.o){q.u(8);break}return C(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.G&&(c.G.release(),c.G=null);c.C&&(c.C.release(),c.C=null);if(!c.F){q.u(12);break}return C(q,c.F.destroy(),13);case 13:c.F=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.aa&&(c.aa.g=null);c.g&&Wm(c.g);if(!c.g||!c.g.src){q.u(14);break}return C(q,new Promise(function(p){return(new Mc(p)).U(.1)}),
537
- 15);case 15:c.g.removeAttribute("src"),c.g.load();case 14:if(!c.B){q.u(16);break}return C(q,c.B.destroy(),17);case 17:c.B=null;case 16:c.qa=null;c.kf=null;c.L=null;if(c.i){e=u(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=u([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=u(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.s=new Sk;c.tf=null;c.$c=[];c.N=NaN;Yn(c);
538
- case 3:wa(q);c.Y.release();ya(q,4);break;case 4:if(a&&Nc()&&!c.F)return C(q,Xn(c),0);q.u(0)}})};r.Fi=function(a){this.ea=a};
539
- r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,t,w,x;return L(function(z){switch(z.g){case 1:if(d.l==Sn)throw new Q(2,7,7E3);e=null;f="";a instanceof gm?(e=a,f=e.ad()||""):f=a||"";return C(z,Hn(d.Y,"load"),2);case 2:d.Y.release();if(!d.g)throw new Q(2,7,7002);if(!d.qa){z.u(3);break}return C(z,d.lc(!1),3);case 3:g=++d.ce;h=function(){return L(function(v){if(1==v.g)return d.ce==g?v.u(0):e?C(v,e.destroy(),3):v.u(3);throw new Q(2,7,7E3);})};k=function(v,B){return L(function(A){switch(A.g){case 1:return sa(A,
540
- 2),C(A,Hn(d.Y,B),4);case 4:return C(A,h(),5);case 5:return C(A,v(),6);case 6:return C(A,h(),7);case 7:e&&d.h&&(e.g=d.h);case 2:wa(A),d.Y.release(),ya(A,0)}})};ra(z,5,6);null==b&&e&&(b=e.getStartTime());d.ea=b;d.Ia=!1;d.dispatchEvent(Rn("loading"));if(e){c=e.Y;z.u(8);break}if(c){z.u(8);break}return C(z,k(function(){return L(function(v){if(1==v.g)return C(v,Zn(d,f),2);c=v.h;F(v)})},"guessMimeType_"),8);case 8:l=!!e;if(e){jm(e,d);d.s=e.getStats();z.u(11);break}return C(z,$n(d,f,b,c,!0),12);case 12:e=
541
- z.h;if(!e){d.s=new Sk;z.u(11);break}jm(e,d);d.s=e.getStats();return C(z,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.Vb:Date.now()/1E3;d.s=e?e.getStats():new Sk;d.qa=f;d.kf=c||null;if(m)return C(z,k(function(){return L(function(v){return C(v,ao(d,c),0)})},"initializeSrcEqualsDrmInner_"),24);if(d.F){z.u(17);break}return C(z,k(function(){return L(function(v){return C(v,Xn(d),0)})},"initializeMediaSourceEngineInner_"),17);case 17:return C(z,k(function(){return e.qa},"waitForManifest"),
542
- 19);case 19:d.h=e.getConfiguration();d.Pd=e.A;d.Ga=e.B;d.I=lm(e);d.mb=mm(e);d.lb=e.lb;d.i=e.Ue();if(q=e.o)d.sa=q;l&&d.g&&"AUDIO"===d.g.nodeName&&(bo(d),d.configure("manifest.disableVideo",!0));return C(z,k(function(){return e.pa},"waitForDrm"),20);case 20:return d.B=nm(e),C(z,k(function(){return L(function(v){return C(v,d.B.Vc(d.g),0)})},"drmEngine_.attach"),21);case 21:return C(z,k(function(){return e.L},"waitForChooseInitialVariant"),22);case 22:return!(p=e.s)||d.pa&&d.pa==p||(d.o=km(e),d.pa=e.s,
515
+ function cn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function dn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}P("shaka.text.UITextDisplayer",Wm);Wm.prototype.setTextVisibility=Wm.prototype.setTextVisibility;
516
+ Wm.prototype.isTextVisible=Wm.prototype.isTextVisible;Wm.prototype.remove=Wm.prototype.remove;Wm.prototype.destroy=Wm.prototype.destroy;Wm.prototype.append=Wm.prototype.append;Wm.prototype.configure=Wm.prototype.configure;function en(a,b){function c(f){for(var g=f,h=u(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Pm(a);a="WEBVTT\n\n";d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
517
+ break;case "right":g.push("align:right");break;case Qb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}P("shaka.text.WebVttGenerator",function(){});function fn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}fn.prototype.configure=function(a){this.g=a};
518
+ function gn(a,b,c){try{if(!a.g.enabled)return b;var d=hn(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=jn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=kn;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=ln;break a}e=void 0}d.ot=e;d.su=
519
+ !0;var f=mn(d);return nn(b,f)}catch(g){return Xa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function hn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
520
+ function on(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,hn(a));c.pr=a.h.eb();var e=c.ot===pn||c.ot===kn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=qn(a,c);if(d)d=rn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=mn(a);f&&(b.uris=b.uris.map(function(g){return nn(g,f)}))}}}function qn(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
521
+ function sn(a){if(0===a.type)return tn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?kn:pn;if("audio"==b)return jn;if("text"==b)return"application/mp4"===a.mimeType?un:vn}}function wn(a,b){b=a.h.ob()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
522
+ function xn(a,b){b=a.h.ob()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function yn(a,b){var c=a.h.Ib();if(!c.length)return NaN;a=c[0];c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case pn:return a.videoBandwidth||NaN;case jn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
523
+ function mn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=u(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
524
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function rn(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=mn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
525
+ function nn(a,b){if(!b||a.includes("offline:"))return a;a=new rc(a);a.g.set("CMCD",b);return a.toString()}var ln="m",jn="a",pn="v",kn="av",tn="i",vn="c",un="tt";P("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Qg:"s",OTHER:"o"});function zn(a){this.h=a;this.g=null}r=zn.prototype;r.configure=function(a){this.h=a};r.fg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(An)?1E3*this.g.get(An):null};r.eg=function(){return this.h.enabled&&this.g&&this.g.has(Bn)?1E3*this.g.get(Bn):null};r.yh=function(){return this.h.enabled&&this.g&&this.g.has(Cn)?this.g.get(Cn):null};r.zh=function(){return this.h.enabled&&this.g&&this.g.has(Dn)?this.g.get(Dn):null};
526
+ r.getBandwidthEstimate=function(a){var b=this.eg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function En(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",zn);zn.prototype.getBandwidthEstimate=zn.prototype.getBandwidthEstimate;zn.prototype.getRoundTripTime=zn.prototype.zh;zn.prototype.getResponseDelay=zn.prototype.yh;zn.prototype.getEstimatedThroughput=zn.prototype.eg;
527
+ zn.prototype.getMaxBitrate=zn.prototype.fg;var Bn="etp",An="mb",Cn="rd",Dn="rtt";function Fn(){this.g=null;this.h=[]}function Gn(a,b){return L(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;F(c)})}Fn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){cg.call(this);var c=this;this.l=Hn;this.Rd=this.g=null;this.da=!1;this.Yd=new eb;this.Rb=new eb;this.m=new eb;this.ta=new eb;this.C=this.F=this.B=this.H=null;this.ce=0;this.Y=new Fn;this.ea=this.kf=this.qa=this.i=this.Ga=this.I=this.j=this.lb=this.K=this.wg=this.aa=this.T=this.mb=this.L=this.Td=this.G=this.cb=null;this.Ia=!1;this.pa=this.o=null;this.uf=1E9;this.$c=[];this.N=NaN;this.h=In(this);this.ba={width:Infinity,height:Infinity};this.Pd=new ei(this.h,this.ba,null);this.nf=[];
528
+ this.s=null;this.sa=new Df(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ha=this.h.preferredTextLanguage;this.Vb=this.h.preferredTextRole;this.Ub=this.h.preferForcedSubs;this.Tb=[];b&&b(this);this.T=Jn(this);this.aa=new zn(this.h.cmsd);
529
+ this.H=Kn(this);this.H.Ef(this.h.streaming.forceHTTPS);this.A=null;Ln&&(this.A=Ln(),this.A.configure(this.h.ads));this.Yd.D(window,"online",function(){Mn(c);c.xf()});this.Ud=new Mc(function(){return Nn(c)});a&&(pb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Vc(a,!0))}na(X,cg);function On(a){null!=a.K&&(sj(a.K),a.K.release(),a.K=null)}
530
+ function Pn(a,b){if(b.lcevc.enabled){var c=a.Ib();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Qc()||Rc())&&(b.mediaSource.forceTransmux||Wa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));On(a);null==a.K&&(a.K=new rj(a.g,a.wg,b.lcevc),a.F&&(a.F.T=a.K))}else On(a)}function Qn(a,b){return new T(a,b)}r=X.prototype;
531
+ r.destroy=function(){var a=this,b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(a.l==Rn)return g.return();On(a);b=a.detach();a.l=Rn;return C(g,b,2);case 2:c=[];d=u(a.nf);for(e=d.next();!e.done;e=d.next())f=e.value,f.m||c.push(f.destroy());a.nf=[];return C(g,Promise.all(c),3);case 3:a.Yd&&(a.Yd.release(),a.Yd=null);a.Rb&&(a.Rb.release(),a.Rb=null);a.m&&(a.m.release(),a.m=null);a.ta&&(a.ta.release(),a.ta=null);a.pa=null;a.h=null;a.s=null;a.Rd=null;a.T=null;a.aa=null;if(!a.H){g.u(4);break}return C(g,
532
+ a.H.destroy(),5);case 5:a.H=null;case 4:a.o&&(a.o.release(),a.o=null),cg.prototype.release.call(a),F(g)}})};function Sn(a,b){a.dispatchEvent(Qn("onstatechange",(new Map).set("state",b)))}
533
+ r.Vc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==Rn)throw new Q(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.u(2);break}return C(g,c.detach(),2);case 2:return C(g,Tn(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(Sn(c,"attach"),e=function(){var h=Un(c);h&&Vn(c,h)},c.Rb.D(a,"error",e),c.g=a);if(!b||!Nc()||c.F){g.u(6);break}return C(g,Wn(c),6);case 6:wa(g);c.Y.release();ya(g,0);break;case 5:return f=va(g),C(g,c.detach(),10);case 10:throw f;
534
+ }})};r.Yg=function(a){this.wg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==Rn)throw new Q(2,7,7E3);return C(c,b.lc(!1,a),2)}if(3!=c.g)return C(c,Tn(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Rb.ib(),b.g=null),Sn(b,"detach"),b.A&&!a&&b.A.release()}finally{b.Y.release()}F(c)})};function Tn(a,b){var c;return L(function(d){return 1==d.g?(c=++a.ce,C(d,Gn(a.Y,b),2)):c!=a.ce?(a.Y.release(),d.return(!0)):d.return(!1)})}
535
+ r.lc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:return c.l!=Rn&&(c.l=Hn),C(q,Tn(c,"unload"),2);case 2:if(q.h)return q.return();sa(q,3);c.Ia=!1;Sn(c,"unload");a&&!Nc()&&(a=!1);On(c);d=c.Tb.map(function(p){return p()});c.Tb=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(Qn("unloading"));c.mb&&(c.mb.release(),c.mb=null);c.g&&(c.m.ib(),c.ta.ib());c.Ud.stop();c.cb&&(c.cb.release(),c.cb=null);c.Td&&(c.Td.stop(),c.Td=null);
536
+ if(!c.I){q.u(6);break}return C(q,c.I.stop(),7);case 7:c.I=null,c.Ga=null;case 6:if(!c.o){q.u(8);break}return C(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.G&&(c.G.release(),c.G=null);c.C&&(c.C.release(),c.C=null);if(!c.F){q.u(12);break}return C(q,c.F.destroy(),13);case 13:c.F=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.aa&&(c.aa.g=null);c.g&&Vm(c.g);if(!c.g||!c.g.src){q.u(14);break}return C(q,new Promise(function(p){return(new Mc(p)).U(.1)}),
537
+ 15);case 15:c.g.removeAttribute("src"),c.g.load();case 14:if(!c.B){q.u(16);break}return C(q,c.B.destroy(),17);case 17:c.B=null;case 16:c.qa=null;c.kf=null;c.L=null;if(c.i){e=u(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=u([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=u(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.s=new Rk;c.tf=null;c.$c=[];c.N=NaN;Xn(c);
538
+ case 3:wa(q);c.Y.release();ya(q,4);break;case 4:if(a&&Nc()&&!c.F)return C(q,Wn(c),0);q.u(0)}})};r.Fi=function(a){this.ea=a};
539
+ r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,t,w,x;return L(function(z){switch(z.g){case 1:if(d.l==Rn)throw new Q(2,7,7E3);e=null;f="";a instanceof fm?(e=a,f=e.ad()||""):f=a||"";return C(z,Gn(d.Y,"load"),2);case 2:d.Y.release();if(!d.g)throw new Q(2,7,7002);if(!d.qa){z.u(3);break}return C(z,d.lc(!1),3);case 3:g=++d.ce;h=function(){return L(function(v){if(1==v.g)return d.ce==g?v.u(0):e?C(v,e.destroy(),3):v.u(3);throw new Q(2,7,7E3);})};k=function(v,B){return L(function(A){switch(A.g){case 1:return sa(A,
540
+ 2),C(A,Gn(d.Y,B),4);case 4:return C(A,h(),5);case 5:return C(A,v(),6);case 6:return C(A,h(),7);case 7:e&&d.h&&(e.g=d.h);case 2:wa(A),d.Y.release(),ya(A,0)}})};ra(z,5,6);null==b&&e&&(b=e.getStartTime());d.ea=b;d.Ia=!1;d.dispatchEvent(Qn("loading"));if(e){c=e.Y;z.u(8);break}if(c){z.u(8);break}return C(z,k(function(){return L(function(v){if(1==v.g)return C(v,Yn(d,f),2);c=v.h;F(v)})},"guessMimeType_"),8);case 8:l=!!e;if(e){im(e,d);d.s=e.getStats();z.u(11);break}return C(z,Zn(d,f,b,c,!0),12);case 12:e=
541
+ z.h;if(!e){d.s=new Rk;z.u(11);break}im(e,d);d.s=e.getStats();return C(z,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.Vb:Date.now()/1E3;d.s=e?e.getStats():new Rk;d.qa=f;d.kf=c||null;if(m)return C(z,k(function(){return L(function(v){return C(v,$n(d,c),0)})},"initializeSrcEqualsDrmInner_"),24);if(d.F){z.u(17);break}return C(z,k(function(){return L(function(v){return C(v,Wn(d),0)})},"initializeMediaSourceEngineInner_"),17);case 17:return C(z,k(function(){return e.qa},"waitForManifest"),
542
+ 19);case 19:d.h=e.getConfiguration();d.Pd=e.s;d.Ga=e.B;d.I=km(e);d.mb=lm(e);d.lb=e.lb;d.i=e.Ue();if(q=e.o)d.sa=q;l&&d.g&&"AUDIO"===d.g.nodeName&&(ao(d),d.configure("manifest.disableVideo",!0));return C(z,k(function(){return e.pa},"waitForDrm"),20);case 20:return d.B=mm(e),C(z,k(function(){return L(function(v){return C(v,d.B.Vc(d.g),0)})},"drmEngine_.attach"),21);case 21:return C(z,k(function(){return e.L},"waitForChooseInitialVariant"),22);case 22:return!(p=e.A)||d.pa&&d.pa==p||(d.o=jm(e),d.pa=e.A,
543
543
  "function"!=typeof d.o.setMediaElement&&(pb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(pb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(pb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),
544
- t=om(e),w=e.ta,C(z,k(function(){return L(function(v){return C(v,co(d,n,w,t),0)})},"loadInner_"),23);case 23:im(e);z.u(16);break;case 24:return C(z,k(function(){return L(function(v){return C(v,eo(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(Rn("loaded"));case 6:wa(z);if(!e){z.u(26);break}return C(z,e.destroy(),26);case 26:ya(z,0);break;case 5:x=va(z);if(7E3==x.code){z.u(28);break}return C(z,d.lc(!1),28);case 28:throw x;}})};
545
- function bo(a){for(var b=u(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
546
- r.Bi=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.I&&c.Ga&&c.qa)){g.u(2);break}e=c.g.currentTime;c.R()&&(e=null);f=Date.now()/1E3;return C(g,fo(c,c.qa,e,c.kf,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.I,l=c.Ga;h.h=c.i;h.j=k;h.B=l;h=d;k=c.pa;h.i=c.o;h.s=k;d.o=c.sa;d.start();c.i=null;c.I=null;c.Ga=null;c.o=null;c.pa=null;case 2:return C(g,c.lc(a,b),4);case 4:return g.return(d)}})};
547
- r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return L(function(f){if(1==f.g)return C(f,$n(d,a,b,c),2);(e=f.h)?e.start().catch(function(){}):Wn(d,new Q(2,7,7005));return f.return(e)})};
548
- function $n(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return L(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):C(l,Zn(a,b),3);2!=l.g&&(d=l.h);if(g=go(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.pa==a.h.abrFactory&&(k=!1),a.g&&"AUDIO"===a.g.nodeName&&(h=!0));return l.return(fo(a,b,c,d||null,f,!e,h,k))})}
549
- function fo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,p,t,w,x,z,v,B,A,D,H;return L(function(J){if(1==J.g)return k=null,l=Ae(a.h),g&&(l.manifest.disableVideo=!0),m=function(){return k.T&&k.m?null:k},n=function(){return m()?m().getConfiguration():a.h},q=function(I,E){m()?k.configure(I,E):a.configure(I,E)},Infinity!=a.ba.width||Infinity!=a.ba.height?J.u(2):C(J,hd(),3);2!=J.g&&(p=J.h,a.ba.width=p.width,a.ba.height=p.height);t=new ei(l,a.ba,null);w={networkingEngine:a.H,
550
- filter:function(I){var E,G;return L(function(K){if(1==K.g)return C(K,fi(t,I),2);if(4!=K.g){E=K.h;if(!E)return K.u(0);G=Rn("trackschanged");return C(K,Promise.resolve(),4)}k.dispatchEvent(G);F(K)})},makeTextStreamsForClosedCaptions:function(I){return ho(a,I)},onTimelineRegionAdded:function(I){var E=k.C;a:{var G=u(E.g);for(var K=G.next();!K.done;K=G.next())if(K=K.value,K.schemeIdUri==I.schemeIdUri&&K.id==I.id&&K.startTime==I.startTime&&K.endTime==I.endTime){G=K;break a}G=null}null==G&&(E.g.add(I),I=
551
- new T("regionadd",new Map([["region",I]])),E.dispatchEvent(I))},onEvent:function(I){return k.dispatchEvent(I)},onError:function(I){return k.onError(I)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){q("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.T&&a.j.updateDuration()},newDrmInfo:function(I){var E=k.l,G=E?E.g:null;G&&E.s&&ii(t,G.keySystem,I)},onManifestUpdated:function(){var I=
552
- (new Map).set("isLive",a.R());k.dispatchEvent(Rn("manifestupdated",I));hm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.R())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};x=new el(function(){return a.Jb()});x.addEventListener("regionadd",function(I){var E=I.region;io(a,"timelineregionadded",E,k);hm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(E)})});z=null;l.streaming.observeQualityChanges&&(z=new fl(function(){return a.ob()}),z.addEventListener("qualitychange",function(I){var E=
553
- I.quality;I=I.position;E=(new Map).set("mediaQuality",{bandwidth:E.bandwidth,audioSamplingRate:E.audioSamplingRate,codecs:E.codecs,contentType:E.contentType,frameRate:E.frameRate,height:E.height,mimeType:E.mimeType,channelsCount:E.channelsCount,pixelAspectRatio:E.pixelAspectRatio,width:E.width}).set("position",I);a.dispatchEvent(Rn("mediaqualitychanged",E))}));v=!0;B={zb:a.H,onError:function(I){return k.onError(I)},fe:function(I){hm(k,!0,function(){a:{var E=Rn("keystatuschanged");a.dispatchEvent(E);
554
- var G=Object.keys(I);E=1==G.length&&"00"==G[0];var K=!1;if(G.length){G=u(a.i.variants);for(var M=G.next();!M.done;M=G.next()){M=M.value;var O=[];M.audio&&O.push(M.audio);M.video&&O.push(M.video);O=u(O);for(var N=O.next();!N.done;N=O.next()){var R=N.value;N=M.allowedByKeySystem;if(R.keyIds.size){M.allowedByKeySystem=!0;R=u(R.keyIds);for(var S=R.next();!S.done;S=R.next())if(S=S.value,(S=I[E?"00":S])||a.B.F)M.allowedByKeySystem=M.allowedByKeySystem&&!!S&&!ki.includes(S)}N!=M.allowedByKeySystem&&(K=!0)}}}if(K&&
555
- (jo(a),!ko(a)))break a;(E=a.j.j)&&!E.allowedByKeySystem&&lo(a)}})},onExpirationUpdated:function(I,E){var G=Rn("expirationupdated");k.dispatchEvent(G);if((G=k.j)&&G.onExpirationUpdated)G.onExpirationUpdated(I,E)},onEvent:function(I){k.dispatchEvent(I);"drmsessionupdate"==I.type&&v&&(v=!1,I=Date.now()/1E3-k.Ia,(a.s||k.getStats()).j=I,a.K&&tj(a.K))}};A=Ln(a,m);D=function(){return a.rc(B)};H={config:l,Vh:w,ei:x,di:z,rc:D,Uh:t,networkingEngine:A,Xg:f,Wg:h};k=new gm(b,d,e,c,H);a.nf.push(k);return J.return(k)})}
556
- function Zn(a,b){var c,d;return L(function(e){if(1==e.g)return c=a.h.manifest.retryParameters,C(e,Mm(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&ad()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
557
- function go(a,b){if(!Nc())return!0;if(b){if(""==(a.g||Pc()).canPlayType(b))return!1;if(!(Nc()&&b in ni))return!0;if(de(b)){if(a.h.streaming.preferNativeHls)return!0;if(ad()&&(a.h.drm.servers["com.apple.fps"]||a.h.drm.servers["com.apple.fps.1_0"]))return a.h.streaming.useNativeHlsForFairPlay;if(ad())return a.h.streaming.useNativeHlsOnSafari}}return!1}
558
- function Xn(a){var b,c,d,e,f;return L(function(g){if(1==g.g)return Tn(a,"media-source"),b=a.h.textDisplayFactory,c=b(),c.configure?c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.tf=b,d=mo(a.g,c,function(h,k,l){no(a,h,k,l)},a.K),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.ba=f,C(g,d.L,2);a.F=d;F(g)})}
559
- function co(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I;return L(function(E){switch(E.g){case 1:Tn(a,"load");e=a.g;a.G=new Jk({Md:function(){return e.playbackRate},Xb:function(){return e.defaultPlaybackRate},Ff:function(G){e.playbackRate=G},qg:function(G){e.currentTime+=G}});f=function(){return oo(a)};g=function(){return po(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);Qn(a,a.h);a.Ha=a.h.preferredTextLanguage;a.Vb=a.h.preferredTextRole;a.Ub=a.h.preferForcedSubs;
560
- qo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.o.init(function(G,K,M){a.i&&a.j&&G!=a.j.j&&ro(a,G,!0,void 0===K?!1:K,void 0===M?0:M)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=so(a);a.j.configure(a.h.streaming);a.l=to;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(G){if(G.track)switch(G=G.track,G.kind){case "chapters":uo(a,G)}});a.dispatchEvent(Rn("streaming"));h=c;(k=a.j.j)||h||(h=vo(a,!0));l=[];m=k||h;n=u([m.video,m.audio]);for(q=n.next();!q.done;q=n.next())(p=
561
- q.value)&&!p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){E.u(2);break}return C(E,Promise.all(l),2);case 2:if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(m);qo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);t=function(G){a.C=wo(a,G);a.bb=xo(a,b);yo(a,e,Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal))};a.h.streaming.startAtSegmentBoundary||t(a.ea);if(k){E.u(4);break}if(!a.h.streaming.startAtSegmentBoundary){E.u(5);break}w=a.i.presentationTimeline;
562
- x=a.ea||a.g.currentTime;z=w.$b();v=w.pb();x<z?x=z:x>v&&(x=v);return C(E,zo(h,x),6);case 6:B=E.h,t(B);case 5:ro(a,h,!0,!1,0);case 4:return a.C.we(),A=a.wc().find(function(G){return G.active}),A||((D=nf(a.i.textStreams,a.Ha,a.Vb,a.Ub)[0]||null)&&Rk(a.s.h,D,!0),h&&(D?(h.audio&&Ao(a,h.audio,D)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),Bo(a)):a.da=!1),D&&(a.h.streaming.alwaysStreamText||a.$e())&&yl(a.j,D)),C(E,a.j.start(d),7);case 7:a.h.abr.enabled&&(a.o.enable(),Co(a));jo(a);ko(a);a.i.variants.some(function(G){return G.primary});
563
- if((H=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)J=function(){return Do(a)},a.m.D(e,"timeupdate",J);H||(I=function(){return Eo(a)},a.m.D(e,"timeupdate",I),Eo(a));if(a.A)a.A.onManifestUpdated(H);a.Ia=!0;a.m.na(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});F(E)}})}
564
- function ao(a,b){var c,d,e,f,g;return L(function(h){return 1==h.g?(c=Md,d=Date.now()/1E3,e=!0,a.B=a.rc({zb:a.H,onError:function(k){Wn(a,k)},fe:function(){},onExpirationUpdated:function(){var k=Rn("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
544
+ t=nm(e),w=e.ta,C(z,k(function(){return L(function(v){return C(v,bo(d,n,w,t),0)})},"loadInner_"),23);case 23:hm(e);z.u(16);break;case 24:return C(z,k(function(){return L(function(v){return C(v,co(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(Qn("loaded"));case 6:wa(z);if(!e){z.u(26);break}return C(z,e.destroy(),26);case 26:ya(z,0);break;case 5:x=va(z);if(7E3==x.code){z.u(28);break}return C(z,d.lc(!1),28);case 28:throw x;}})};
545
+ function ao(a){for(var b=u(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
546
+ r.Bi=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.I&&c.Ga&&c.qa)){g.u(2);break}e=c.g.currentTime;c.R()&&(e=null);f=Date.now()/1E3;return C(g,eo(c,c.qa,e,c.kf,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.I,l=c.Ga;h.h=c.i;h.j=k;h.B=l;h=d;k=c.pa;h.i=c.o;h.A=k;d.o=c.sa;d.start();c.i=null;c.I=null;c.Ga=null;c.o=null;c.pa=null;case 2:return C(g,c.lc(a,b),4);case 4:return g.return(d)}})};
547
+ r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return L(function(f){if(1==f.g)return C(f,Zn(d,a,b,c),2);(e=f.h)?e.start().catch(function(){}):Vn(d,new Q(2,7,7005));return f.return(e)})};
548
+ function Zn(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return L(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):C(l,Yn(a,b),3);2!=l.g&&(d=l.h);if(g=fo(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.pa==a.h.abrFactory&&(k=!1),a.g&&"AUDIO"===a.g.nodeName&&(h=!0));return l.return(eo(a,b,c,d||null,f,!e,h,k))})}
549
+ function eo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,p,t,w,x,z,v,B,A,D,H;return L(function(J){if(1==J.g)return k=null,l=Ae(a.h),g&&(l.manifest.disableVideo=!0),m=function(){return k.T&&k.m?null:k},n=function(){return m()?m().getConfiguration():a.h},q=function(I,E){m()?k.configure(I,E):a.configure(I,E)},Infinity!=a.ba.width||Infinity!=a.ba.height?J.u(2):C(J,hd(),3);2!=J.g&&(p=J.h,a.ba.width=p.width,a.ba.height=p.height);t=new ei(l,a.ba,null);w={networkingEngine:a.H,
550
+ filter:function(I){var E,G;return L(function(K){if(1==K.g)return C(K,fi(t,I),2);if(4!=K.g){E=K.h;if(!E)return K.u(0);G=Qn("trackschanged");return C(K,Promise.resolve(),4)}k.dispatchEvent(G);F(K)})},makeTextStreamsForClosedCaptions:function(I){return go(a,I)},onTimelineRegionAdded:function(I){var E=k.C;a:{var G=u(E.g);for(var K=G.next();!K.done;K=G.next())if(K=K.value,K.schemeIdUri==I.schemeIdUri&&K.id==I.id&&K.startTime==I.startTime&&K.endTime==I.endTime){G=K;break a}G=null}null==G&&(E.g.add(I),I=
551
+ new T("regionadd",new Map([["region",I]])),E.dispatchEvent(I))},onEvent:function(I){return k.dispatchEvent(I)},onError:function(I){return k.onError(I)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){q("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.T&&a.j.updateDuration()},newDrmInfo:function(I){var E=k.l,G=E?E.g:null;G&&E.s&&hi(t,G.keySystem,I)},onManifestUpdated:function(){var I=
552
+ (new Map).set("isLive",a.R());k.dispatchEvent(Qn("manifestupdated",I));gm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.R())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};x=new dl(function(){return a.Jb()});x.addEventListener("regionadd",function(I){var E=I.region;ho(a,"timelineregionadded",E,k);gm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(E)})});z=null;l.streaming.observeQualityChanges&&(z=new el(function(){return a.ob()}),z.addEventListener("qualitychange",function(I){var E=
553
+ I.quality;I=I.position;E=(new Map).set("mediaQuality",{bandwidth:E.bandwidth,audioSamplingRate:E.audioSamplingRate,codecs:E.codecs,contentType:E.contentType,frameRate:E.frameRate,height:E.height,mimeType:E.mimeType,channelsCount:E.channelsCount,pixelAspectRatio:E.pixelAspectRatio,width:E.width}).set("position",I);a.dispatchEvent(Qn("mediaqualitychanged",E))}));v=!0;B={zb:a.H,onError:function(I){return k.onError(I)},fe:function(I){gm(k,!0,function(){a:{var E=Qn("keystatuschanged");a.dispatchEvent(E);
554
+ var G=Object.keys(I);E=1==G.length&&"00"==G[0];var K=!1;if(G.length){G=u(a.i.variants);for(var M=G.next();!M.done;M=G.next()){M=M.value;var O=[];M.audio&&O.push(M.audio);M.video&&O.push(M.video);O=u(O);for(var N=O.next();!N.done;N=O.next()){var R=N.value;N=M.allowedByKeySystem;if(R.keyIds.size){M.allowedByKeySystem=!0;R=u(R.keyIds);for(var S=R.next();!S.done;S=R.next())if(S=S.value,(S=I[E?"00":S])||a.B.F)M.allowedByKeySystem=M.allowedByKeySystem&&!!S&&!ji.includes(S)}N!=M.allowedByKeySystem&&(K=!0)}}}if(K&&
555
+ (io(a),!jo(a)))break a;(E=a.j.j)&&!E.allowedByKeySystem&&ko(a)}})},onExpirationUpdated:function(I,E){var G=Qn("expirationupdated");k.dispatchEvent(G);if((G=k.j)&&G.onExpirationUpdated)G.onExpirationUpdated(I,E)},onEvent:function(I){k.dispatchEvent(I);"drmsessionupdate"==I.type&&v&&(v=!1,I=Date.now()/1E3-k.Ia,(a.s||k.getStats()).j=I,a.K&&sj(a.K))}};A=Kn(a,m);D=function(){return a.rc(B)};H={config:l,Vh:w,ei:x,di:z,rc:D,Uh:t,networkingEngine:A,Xg:f,Wg:h};k=new fm(b,d,e,c,H);a.nf.push(k);return J.return(k)})}
556
+ function Yn(a,b){var c,d;return L(function(e){if(1==e.g)return c=a.h.manifest.retryParameters,C(e,ym(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&ad()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
557
+ function fo(a,b){if(!Nc())return!0;if(b){if(""==(a.g||Pc()).canPlayType(b))return!1;if(!(Nc()&&b in mi))return!0;if(de(b)){if(a.h.streaming.preferNativeHls)return!0;if(ad()&&(a.h.drm.servers["com.apple.fps"]||a.h.drm.servers["com.apple.fps.1_0"]))return a.h.streaming.useNativeHlsForFairPlay;if(ad())return a.h.streaming.useNativeHlsOnSafari}}return!1}
558
+ function Wn(a){var b,c,d,e,f;return L(function(g){if(1==g.g)return Sn(a,"media-source"),b=a.h.textDisplayFactory,c=b(),c.configure?c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.tf=b,d=lo(a.g,c,function(h,k,l){mo(a,h,k,l)},a.K),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.ba=f,C(g,d.L,2);a.F=d;F(g)})}
559
+ function bo(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I;return L(function(E){switch(E.g){case 1:Sn(a,"load");e=a.g;a.G=new Ik({Md:function(){return e.playbackRate},Xb:function(){return e.defaultPlaybackRate},Ff:function(G){e.playbackRate=G},qg:function(G){e.currentTime+=G}});f=function(){return no(a)};g=function(){return oo(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);Pn(a,a.h);a.Ha=a.h.preferredTextLanguage;a.Vb=a.h.preferredTextRole;a.Ub=a.h.preferForcedSubs;
560
+ po(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.o.init(function(G,K,M){a.i&&a.j&&G!=a.j.j&&qo(a,G,!0,void 0===K?!1:K,void 0===M?0:M)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=ro(a);a.j.configure(a.h.streaming);a.l=so;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(G){if(G.track)switch(G=G.track,G.kind){case "chapters":to(a,G)}});a.dispatchEvent(Qn("streaming"));h=c;(k=a.j.j)||h||(h=uo(a,!0));l=[];m=k||h;n=u([m.video,m.audio]);for(q=n.next();!q.done;q=n.next())(p=
561
+ q.value)&&!p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){E.u(2);break}return C(E,Promise.all(l),2);case 2:if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(m);po(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);t=function(G){a.C=vo(a,G);a.cb=wo(a,b);xo(a,e,Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal))};a.h.streaming.startAtSegmentBoundary||t(a.ea);if(k){E.u(4);break}if(!a.h.streaming.startAtSegmentBoundary){E.u(5);break}w=a.i.presentationTimeline;
562
+ x=a.ea||a.g.currentTime;z=w.$b();v=w.pb();x<z?x=z:x>v&&(x=v);return C(E,yo(h,x),6);case 6:B=E.h,t(B);case 5:qo(a,h,!0,!1,0);case 4:return a.C.we(),A=a.wc().find(function(G){return G.active}),A||((D=nf(a.i.textStreams,a.Ha,a.Vb,a.Ub)[0]||null)&&Qk(a.s.h,D,!0),h&&(D?(h.audio&&zo(a,h.audio,D)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),Ao(a)):a.da=!1),D&&(a.h.streaming.alwaysStreamText||a.$e())&&xl(a.j,D)),C(E,a.j.start(d),7);case 7:a.h.abr.enabled&&(a.o.enable(),Bo(a));io(a);jo(a);a.i.variants.some(function(G){return G.primary});
563
+ if((H=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)J=function(){return Co(a)},a.m.D(e,"timeupdate",J);H||(I=function(){return Do(a)},a.m.D(e,"timeupdate",I),Do(a));if(a.A)a.A.onManifestUpdated(H);a.Ia=!0;a.m.na(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});F(E)}})}
564
+ function $n(a,b){var c,d,e,f,g;return L(function(h){return 1==h.g?(c=Md,d=Date.now()/1E3,e=!0,a.B=a.rc({zb:a.H,onError:function(k){Vn(a,k)},fe:function(){},onExpirationUpdated:function(){var k=Qn("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
565
565
  g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Yd(b):"",codecs:b?ce(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.fa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Od(g.mimeType,
566
566
  g.codecs)),b.startsWith("audio/")?(g.type=c.S,f.audio=g):f.video=g,a.B.ba=!0,C(h,xh(a.B,[f],[]),2)):C(h,a.B.Vc(a.g),0)})}
567
- function eo(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(t){if(1==t.g)return Tn(a,"src-equals"),d=a.g,a.C=new zk(d),e=!1,a.Tb.push(function(){e=!0}),null!=a.ea&&a.C.xe(a.ea),a.G=new Jk({Md:function(){return d.playbackRate},Xb:function(){return d.defaultPlaybackRate},Ff:function(w){d.playbackRate=w},qg:function(w){d.currentTime+=w}}),f=a.h.streaming.rebufferingGoal,yo(a,d,f),g=function(){return oo(a)},h=function(){return po(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
568
- "ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return jo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return jo(a)}),a.m.D(d.audioTracks,"change",function(){return jo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":Fo(a,w);break;case "chapters":uo(a,w);break;default:jo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return jo(a)}),
569
- a.m.D(d.textTracks,"change",function(){return jo(a)})),d.src=hn(a.T,a.qa,c),(Uc()||Xc())&&d.load(),"none"!=d.preload&&!d.autoplay&&de(c)&&ed()&&d.load(),a.l=Go,a.dispatchEvent(Rn("streaming")),k=new Tf,qk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.we();k.resolve()}),qk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return L(function(x){if(1==x.g)return Ho(a),w=Io(a),w.find(function(z){return"disabled"!=z.mode})?(0<w.length&&(a.da=!0),x.u(2)):C(x,new Promise(function(z){a.m.na(d.textTracks,
570
- "change",z);(new Mc(z)).U(1)}),2);if(e)return x.return();Jo(a);F(x)})}),d.error?k.reject(Vn(a)):"none"==d.preload&&(Wa('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.'),k.resolve()),a.m.na(d,"error",function(){k.reject(Vn(a))}),l=new Promise(function(w,x){(new Mc(x)).U(a.h.streaming.loadTimeout)}),C(t,Promise.race([k,
571
- l]),2);if((m=a.R())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)n=function(){return Do(a)},a.m.D(d,"timeupdate",n);m||(q=function(){return Eo(a)},a.m.D(d,"timeupdate",q),Eo(a));a.A&&(a.A.onManifestUpdated(m),m&&(p=a.Jb().end,a.m.D(d,"progress",function(){var w=a.Jb().end;p!=w&&(a.A.onManifestUpdated(a.R()),p=w)})));a.Ia=!0;F(t)})}function Ho(a){var b=a.h.preferredAudioLanguage;""!=b&&a.yg(b,a.h.preferredVariantRole)}
572
- function Jo(a){var b=a.h.preferredTextLanguage;""!=b&&a.Af(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
573
- function Fo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=u(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ko(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Mc(function(){var d=Lo(a);d=u(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).kc().U(.5);a.Tb.push(function(){c.stop()})}}
574
- function no(a,b,c,d){b=u(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=u(e.frames),k=h.next();!k.done;k=h.next())Ko(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Ko(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Rn("metadata",b))}
575
- function uo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Mc(function(){b.mode="hidden"})).kc().U(.5);a.Tb.push(function(){c.stop()})}}r.ii=function(){for(var a=this.Y;a.g;)a.release()};r.rc=function(a){return new qh(a)};
576
- function Ln(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?hm(b(),!0,e):e()}b||(b=function(){return null});return new fg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Rn("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
577
- Fn(n[1]))}}catch(x){}if(l=e["cmsd-dynamic"]){try{var q=new Map,p=l.split(";");for(l=1;l<p.length;l++){var t=p[l].split("=");q.set(t[0],Fn(t[1]))}var w=q}catch(x){w=null}w&&(h.g=w)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Rn("downloadfailed",e))},function(e,f,g){d(function(){var h=a.T,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)pn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
578
- "d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}pn(h,f,{ot:mn,su:!h.i})}}catch(N){Xa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case pg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.R()?"l":"v"};n.ot=tn(k);var q=n.ot===qn||n.ot===kn||n.ot===ln||n.ot===vn,p=k.stream;if(p){var t=h.h.eb();if(q&&(n.bl=xn(h,p.type),n.ot!==vn)){var w=yn(h,p.type);n.dl=t?w/Math.abs(t):w}p.bandwidth&&(n.br=p.bandwidth/1E3);
579
- if(p.segmentIndex&&m){var x=p.segmentIndex.xb(m.endTime,!0,0>t);if(x){var z=x.next().value;if(z&&z!=m){if(!Mb(m.$(),z.$())){var v=z.$()[0],B=f.uris[0],A=new URL(v),D=new URL(B);if(A.origin!==D.origin)var H=v;else{for(var J=A.pathname.split("/").slice(1),I=D.pathname.split("/").slice(1,-1);J[0]===I[0];)J.shift(),I.shift();for(;I.length;)I.shift(),J.unshift("..");H=J.join("/")}n.nor=H}if((z.Aa||z.ja)&&(m.Aa!=z.Aa||m.ja!=z.ja)){var E=z.Aa+"-";z.ja&&(E+=z.ja);n.nrr=E}}}var G=h.h.eb()||1,K=yn(h,p.type)||
580
- 500,M=p.bandwidth;var O=M?M*(m.endTime-m.startTime)/1E3/(K/G/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}q&&n.ot!==vn&&(n.tb=zn(h,n.ot)/1E3);pn(h,f,n)}}catch(N){Xa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:pn(h,f,{ot:"k"});break;case 4:pn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.I)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.Ed=isNaN(f.Ed)?e:f.Ed+e)})}
581
- function wo(a,b){return new Ak(a.g,a.i,a.h.streaming,b,function(){a.bb&&Mk(a.bb,!0);a.j&&a.j.od();a.L&&Mo(a)},function(c){return a.dispatchEvent(c)})}
582
- function xo(a,b){b=new um(a.mb,a.R()||0<b);b.addEventListener("enter",function(d){io(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){io(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(io(a,"timelineregionenter",e),io(a,"timelineregionexit",e))});var c=new Lk(a.g);c.g.add(b);a.lb&&c.g.add(a.lb);return c}
583
- function yo(a,b,c){a.L=new Mf;a.L.g=Of;Pf(a.L,c,Math.min(.5,c/2));Yn(a);a.Td=(new Mc(function(){Mo(a)})).Sa(.25);a.m.D(b,"waiting",function(){return Mo(a)});a.m.D(b,"stalled",function(){return Mo(a)});a.m.D(b,"canplaythrough",function(){return Mo(a)});a.m.D(b,"progress",function(){return Mo(a)})}
584
- function Mo(a){switch(a.l){case Go:if(a.g.ended)var b=!0;else{var c=Bi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case to:a:if(a.g.ended||Kj(a.F))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Hb();var d=Bi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Di(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Nf:Of;c.g=d;(b=b!=d)&&d===Nf&&(c.h=Date.now());b&&Yn(a)}function mo(a,b,c,d){return new Bj(a,b,c,d)}
585
- function Kn(a){return new gn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ob:function(){return a.ob()},getCurrentTime:function(){return a.g?a.g.currentTime:0},eb:function(){return a.eb()},Zb:function(){return a.Zb()},Ib:function(){return a.Ib()},R:function(){return a.R()}},a.h.cmcd)}
586
- function so(a){return new kl(a.i,{Ld:function(){return a.C?a.C.Dd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},eb:function(){return a.eb()},W:a.F,zb:a.H,onError:function(b){return Wn(a,b)},onEvent:function(b){return a.dispatchEvent(b)},$h:function(){a.I&&a.I.update&&a.I.update()},mf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.rg();var g=Lj(a.F,f);!a.R()&&a.g.paused&&null!=g&&0<g&&a.C.Dd()<g&&a.C.xe(g)}Mo(a);d=(new Map).set("start",d).set("end",e).set("contentType",
587
- f);a.dispatchEvent(Rn("segmentappended",d));a.o&&c.fastSwitching&&b.md&&b.Wd&&a.o.trySuggestStreams()},Zh:function(b,c){(c=c.gf)&&a.lb&&hl(a.lb,c,b)},Sf:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Og(Ab(c));var e=0,f=u(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=u(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Gh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
588
- return d},ai:function(b,c,d){no(a,b,c,d)},Jd:function(b,c){return a.Jd(b,c)}})}
589
- r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ul(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(pb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(pb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
567
+ function co(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(t){if(1==t.g)return Sn(a,"src-equals"),d=a.g,a.C=new yk(d),e=!1,a.Tb.push(function(){e=!0}),null!=a.ea&&a.C.xe(a.ea),a.G=new Ik({Md:function(){return d.playbackRate},Xb:function(){return d.defaultPlaybackRate},Ff:function(w){d.playbackRate=w},qg:function(w){d.currentTime+=w}}),f=a.h.streaming.rebufferingGoal,xo(a,d,f),g=function(){return no(a)},h=function(){return oo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
568
+ "ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return io(a)}),a.m.D(d.audioTracks,"removetrack",function(){return io(a)}),a.m.D(d.audioTracks,"change",function(){return io(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":Eo(a,w);break;case "chapters":to(a,w);break;default:io(a)}}),a.m.D(d.textTracks,"removetrack",function(){return io(a)}),
569
+ a.m.D(d.textTracks,"change",function(){return io(a)})),d.src=gn(a.T,a.qa,c),(Uc()||Xc())&&d.load(),"none"!=d.preload&&!d.autoplay&&de(c)&&ed()&&d.load(),a.l=Fo,a.dispatchEvent(Qn("streaming")),k=new Tf,pk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.we();k.resolve()}),pk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return L(function(x){if(1==x.g)return Go(a),w=Ho(a),w.find(function(z){return"disabled"!=z.mode})?(0<w.length&&(a.da=!0),x.u(2)):C(x,new Promise(function(z){a.m.na(d.textTracks,
570
+ "change",z);(new Mc(z)).U(1)}),2);if(e)return x.return();Io(a);F(x)})}),d.error?k.reject(Un(a)):"none"==d.preload&&(Wa('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.'),k.resolve()),a.m.na(d,"error",function(){k.reject(Un(a))}),l=new Promise(function(w,x){(new Mc(x)).U(a.h.streaming.loadTimeout)}),C(t,Promise.race([k,
571
+ l]),2);if((m=a.R())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)n=function(){return Co(a)},a.m.D(d,"timeupdate",n);m||(q=function(){return Do(a)},a.m.D(d,"timeupdate",q),Do(a));a.A&&(a.A.onManifestUpdated(m),m&&(p=a.Jb().end,a.m.D(d,"progress",function(){var w=a.Jb().end;p!=w&&(a.A.onManifestUpdated(a.R()),p=w)})));a.Ia=!0;F(t)})}function Go(a){var b=a.h.preferredAudioLanguage;""!=b&&a.yg(b,a.h.preferredVariantRole)}
572
+ function Io(a){var b=a.h.preferredTextLanguage;""!=b&&a.Af(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
573
+ function Eo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=u(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Jo(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Mc(function(){var d=Ko(a);d=u(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).kc().U(.5);a.Tb.push(function(){c.stop()})}}
574
+ function mo(a,b,c,d){b=u(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=u(e.frames),k=h.next();!k.done;k=h.next())Jo(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Jo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Qn("metadata",b))}
575
+ function to(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Mc(function(){b.mode="hidden"})).kc().U(.5);a.Tb.push(function(){c.stop()})}}r.ii=function(){for(var a=this.Y;a.g;)a.release()};r.rc=function(a){return new qh(a)};
576
+ function Kn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?gm(b(),!0,e):e()}b||(b=function(){return null});return new fg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Qn("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
577
+ En(n[1]))}}catch(x){}if(l=e["cmsd-dynamic"]){try{var q=new Map,p=l.split(";");for(l=1;l<p.length;l++){var t=p[l].split("=");q.set(t[0],En(t[1]))}var w=q}catch(x){w=null}w&&(h.g=w)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Qn("downloadfailed",e))},function(e,f,g){d(function(){var h=a.T,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)on(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
578
+ "d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}on(h,f,{ot:ln,su:!h.i})}}catch(N){Xa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case pg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.R()?"l":"v"};n.ot=sn(k);var q=n.ot===pn||n.ot===jn||n.ot===kn||n.ot===un,p=k.stream;if(p){var t=h.h.eb();if(q&&(n.bl=wn(h,p.type),n.ot!==un)){var w=xn(h,p.type);n.dl=t?w/Math.abs(t):w}p.bandwidth&&(n.br=p.bandwidth/1E3);
579
+ if(p.segmentIndex&&m){var x=p.segmentIndex.xb(m.endTime,!0,0>t);if(x){var z=x.next().value;if(z&&z!=m){if(!Mb(m.$(),z.$())){var v=z.$()[0],B=f.uris[0],A=new URL(v),D=new URL(B);if(A.origin!==D.origin)var H=v;else{for(var J=A.pathname.split("/").slice(1),I=D.pathname.split("/").slice(1,-1);J[0]===I[0];)J.shift(),I.shift();for(;I.length;)I.shift(),J.unshift("..");H=J.join("/")}n.nor=H}if((z.Aa||z.ja)&&(m.Aa!=z.Aa||m.ja!=z.ja)){var E=z.Aa+"-";z.ja&&(E+=z.ja);n.nrr=E}}}var G=h.h.eb()||1,K=xn(h,p.type)||
580
+ 500,M=p.bandwidth;var O=M?M*(m.endTime-m.startTime)/1E3/(K/G/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}q&&n.ot!==un&&(n.tb=yn(h,n.ot)/1E3);on(h,f,n)}}catch(N){Xa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:on(h,f,{ot:"k"});break;case 4:on(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.I)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.Ed=isNaN(f.Ed)?e:f.Ed+e)})}
581
+ function vo(a,b){return new zk(a.g,a.i,a.h.streaming,b,function(){a.cb&&Lk(a.cb,!0);a.j&&a.j.od();a.L&&Lo(a)},function(c){return a.dispatchEvent(c)})}
582
+ function wo(a,b){b=new tm(a.mb,a.R()||0<b);b.addEventListener("enter",function(d){ho(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){ho(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ho(a,"timelineregionenter",e),ho(a,"timelineregionexit",e))});var c=new Kk(a.g);c.g.add(b);a.lb&&c.g.add(a.lb);return c}
583
+ function xo(a,b,c){a.L=new Mf;a.L.g=Of;Pf(a.L,c,Math.min(.5,c/2));Xn(a);a.Td=(new Mc(function(){Lo(a)})).Sa(.25);a.m.D(b,"waiting",function(){return Lo(a)});a.m.D(b,"stalled",function(){return Lo(a)});a.m.D(b,"canplaythrough",function(){return Lo(a)});a.m.D(b,"progress",function(){return Lo(a)})}
584
+ function Lo(a){switch(a.l){case Fo:if(a.g.ended)var b=!0;else{var c=Ai(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case so:a:if(a.g.ended||Jj(a.F))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Hb();var d=Ai(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ci(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Nf:Of;c.g=d;(b=b!=d)&&d===Nf&&(c.h=Date.now());b&&Xn(a)}function lo(a,b,c,d){return new Aj(a,b,c,d)}
585
+ function Jn(a){return new fn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ob:function(){return a.ob()},getCurrentTime:function(){return a.g?a.g.currentTime:0},eb:function(){return a.eb()},Zb:function(){return a.Zb()},Ib:function(){return a.Ib()},R:function(){return a.R()}},a.h.cmcd)}
586
+ function ro(a){return new jl(a.i,{Ld:function(){return a.C?a.C.Dd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},eb:function(){return a.eb()},W:a.F,zb:a.H,onError:function(b){return Vn(a,b)},onEvent:function(b){return a.dispatchEvent(b)},$h:function(){a.I&&a.I.update&&a.I.update()},mf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.rg();var g=Kj(a.F,f);!a.R()&&a.g.paused&&null!=g&&0<g&&a.C.Dd()<g&&a.C.xe(g)}Lo(a);d=(new Map).set("start",d).set("end",e).set("contentType",
587
+ f);a.dispatchEvent(Qn("segmentappended",d));a.o&&c.fastSwitching&&b.md&&b.Wd&&a.o.trySuggestStreams()},Zh:function(b,c){(c=c.gf)&&a.lb&&gl(a.lb,c,b)},Sf:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Og(Ab(c));var e=0,f=u(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=u(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Gh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
588
+ return d},ai:function(b,c,d){mo(a,b,c,d)},Jd:function(b,c){return a.Jd(b,c)}})}
589
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Tl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(pb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(pb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
590
590
  a.streaming&&"useNativeHlsOnSafari"in a.streaming&&pb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){pb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
591
591
  a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=
592
- 100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));var d=fm(this.h,a,Jn(this));No(this);return d};
593
- function No(a){a.Pd=new ei(a.h,a.ba,a.B);if(a.I){var b=Ae(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.B&&a.B.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{a.l!=Sn&&hi(a.Pd,a.i)&&jo(a)}catch(f){Wn(a,f)}a.o&&ko(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||lo(a)}a.H&&a.H.Ef(a.h.streaming.forceHTTPS);if(a.F)if(a.F.configure(a.h.mediaSource),a.F.ba=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.tf!=b){var c=b();c.configure?
594
- c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.tf=b;a.j&&(b=a.j,(c=b.i.get(Kd))&&wl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.h.textDisplayer);a.o&&(a.o.configure(a.h.abr),a.h.abr.enabled?a.o.enable():a.o.disable(),Co(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Pf(a.L,b,Math.min(.5,
595
- b/2)));a.i&&qo(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.T&&a.T.configure(a.h.cmcd);a.aa&&a.aa.configure(a.h.cmsd)}r.getConfiguration=function(){var a=Jn(this);fm(a,this.h,Jn(this));return a};
596
- r.cg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Jb().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.mi=function(){for(var a in this.h)delete this.h[a];fm(this.h,Jn(this),Jn(this));No(this)};r.rh=function(){return this.l};r.Ve=function(){return this.i?this.i.type:null};r.uh=function(){return this.g};
592
+ 100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));var d=em(this.h,a,In(this));Mo(this);return d};
593
+ function Mo(a){a.Pd=new ei(a.h,a.ba,a.B);if(a.I){var b=Ae(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.B&&a.B.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{a.l!=Rn&&gi(a.Pd,a.i)&&io(a)}catch(f){Vn(a,f)}a.o&&jo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||ko(a)}a.H&&a.H.Ef(a.h.streaming.forceHTTPS);if(a.F)if(a.F.configure(a.h.mediaSource),a.F.ba=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.tf!=b){var c=b();c.configure?
594
+ c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.tf=b;a.j&&(b=a.j,(c=b.i.get(Kd))&&vl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.h.textDisplayer);a.o&&(a.o.configure(a.h.abr),a.h.abr.enabled?a.o.enable():a.o.disable(),Bo(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Pf(a.L,b,Math.min(.5,
595
+ b/2)));a.i&&po(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.T&&a.T.configure(a.h.cmcd);a.aa&&a.aa.configure(a.h.cmsd)}r.getConfiguration=function(){var a=In(this);em(a,this.h,In(this));return a};
596
+ r.cg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Jb().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.mi=function(){for(var a in this.h)delete this.h[a];em(this.h,In(this),In(this));Mo(this)};r.rh=function(){return this.l};r.Ve=function(){return this.i?this.i.type:null};r.uh=function(){return this.g};
597
597
  r.Zb=function(){return this.H};r.ad=function(){return this.qa};r.bg=function(){return this.A?this.A:null};r.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};r.dc=function(){return this.i?this.i.presentationTimeline.dc():!1};r.Lh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
598
598
  r.Jb=function(){if(this.i){if(!this.Ia&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.$b(),end:a.pb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Ih=function(){this.R()&&(this.g.currentTime=this.Jb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.B?this.B.g:null};r.cd=function(){return this.B?this.B.cd():Infinity};
599
599
  r.Te=function(){return this.B?this.B.Te():[]};r.Kd=function(){return this.B?this.B.Kd():{}};r.Ye=function(){return this.L?this.L.g==Of:!1};r.eb=function(){return this.g?this.G?this.G.i:1:0};
600
- r.sd=function(a){var b=this;0==a?Wa("A trick play rate of 0 is unsupported!"):(this.ta.ib(),this.g.paused&&this.g.play(),this.G.set(a),this.l==to&&(this.o.playbackRateChanged(a),vl(this.j,1<Math.abs(a))),this.R()&&this.ta.D(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Jb(),e=b.h.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Wc():Math.floor(c)<=Math.floor(d.start+e)&&b.Wc()}))};
601
- r.Wc=function(){var a=this.G.Xb();this.l==Go&&this.G.set(a);this.l==to&&(this.G.set(a),this.o.playbackRateChanged(a),vl(this.j,!1));this.ta.ib()};
600
+ r.sd=function(a){var b=this;0==a?Wa("A trick play rate of 0 is unsupported!"):(this.ta.ib(),this.g.paused&&this.g.play(),this.G.set(a),this.l==so&&(this.o.playbackRateChanged(a),ul(this.j,1<Math.abs(a))),this.R()&&this.ta.D(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Jb(),e=b.h.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Wc():Math.floor(c)<=Math.floor(d.start+e)&&b.Wc()}))};
601
+ r.Wc=function(){var a=this.G.Xb();this.l==Fo&&this.G.set(a);this.l==so&&(this.G.set(a),this.o.playbackRateChanged(a),ul(this.j,!1));this.ta.ib()};
602
602
  r.Ib=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=u(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,lf(e)){var f=Ze(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return kf(g)}):[]};
603
- r.wc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=$e(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Io(this).map(function(f){return hf(f)}):[]};r.ph=function(){var a=this.$c;this.i&&(a=this.i.imageStreams);return a.map(function(b){return af(b)})};
604
- r.ih=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=to&&b.l!=Go)return g.return(null);c=b.$c;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.tc(function(h){var k=Oo(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Sb;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.hg(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
605
- function Oo(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Sb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
606
- r.hg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A;return L(function(D){if(1==D.g){if(c.l!=to&&c.l!=Go)return D.return(null);d=c.$c;c.i&&(d=c.i.imageStreams);return(e=d.find(function(H){return H.id==a}))?e.segmentIndex?D.u(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=Oo(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Sb;n=l/h.rows;q=h.Sb*h.rows;p=g.i-g.startTime;
603
+ r.wc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=$e(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Ho(this).map(function(f){return hf(f)}):[]};r.ph=function(){var a=this.$c;this.i&&(a=this.i.imageStreams);return a.map(function(b){return af(b)})};
604
+ r.ih=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=so&&b.l!=Fo)return g.return(null);c=b.$c;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.tc(function(h){var k=No(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Sb;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.hg(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
605
+ function No(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Sb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
606
+ r.hg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A;return L(function(D){if(1==D.g){if(c.l!=so&&c.l!=Fo)return D.return(null);d=c.$c;c.i&&(d=c.i.imageStreams);return(e=d.find(function(H){return H.id==a}))?e.segmentIndex?D.u(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=No(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Sb;n=l/h.rows;q=h.Sb*h.rows;p=g.i-g.startTime;
607
607
  t=g.A||p/q;w=g.startTime;z=x=0;1<q&&(v=Math.floor((b-g.startTime)/t),w=g.startTime+v*t,x=v%h.Sb*m,z=Math.floor(v/h.Sb)*n);B=!1;if(A=g.s)B=!0,n=A.height,x=A.positionX,z=A.positionY,m=A.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:x,positionY:z,startTime:w,duration:t,uris:g.$(),width:m,sprite:B})})};
608
- r.zg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Rk(this.s.h,b,!1),yl(this.j,b),Po(this),this.Ha=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Io(this);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,bf(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";Po(this)}};
609
- r.Bf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&lf(d)&&(ro(this,d,!1,b,c),this.sa=new Cf(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),ko(this))}else if(this.g&&this.g.audioTracks)for(b=
610
- Array.from(this.g.audioTracks),b=u(b),c=b.next();!c.done;c=b.next())if(c=c.value,bf(c)==a.id){Qo(this,c);break}};r.kh=function(){return Ro(this.Ib())};r.Bh=function(){return Ro(this.wc())};r.jh=function(){return Array.from(So(this.Ib()))};r.Ah=function(){return Array.from(So(this.wc()))};
608
+ r.zg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Qk(this.s.h,b,!1),xl(this.j,b),Oo(this),this.Ha=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Ho(this);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,bf(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";Oo(this)}};
609
+ r.Bf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&lf(d)&&(qo(this,d,!1,b,c),this.sa=new Cf(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),jo(this))}else if(this.g&&this.g.audioTracks)for(b=
610
+ Array.from(this.g.audioTracks),b=u(b),c=b.next();!c.done;c=b.next())if(c=c.value,bf(c)==a.id){Po(this,c);break}};r.kh=function(){return Qo(this.Ib())};r.Bh=function(){return Qo(this.wc())};r.jh=function(){return Array.from(Ro(this.Ib()))};r.Ah=function(){return Array.from(Ro(this.wc()))};
611
611
  r.yg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.sa=new Df(a,b||"",c,"",!1,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.sa.create(this.i.variants);c=null;e=u(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
612
- b))c=f;c?(a=Ze(c),this.Bf(a,!0,d)):lo(this)}else this.g&&this.g.audioTracks&&(d=nf(this.Ib(),a,b||"",!1)[0])&&this.Bf(d)};r.Af=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ha=a,this.Vb=b||"",this.Ub=c,(a=nf(this.i.textStreams,this.Ha,this.Vb,this.Ub)[0]||null)&&a!=this.j.s&&(Rk(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.$e()))yl(this.j,a),Po(this)}else(a=nf(this.wc(),a,b||"",c)[0])&&this.zg(a)};
613
- r.ti=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=u(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.sa=new Df(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),lo(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=u(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Qo(this,b)}};
614
- r.$e=function(){var a=this.da;return this.F&&this.l==to?this.F.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Io(this).some(function(b){return"showing"==b.mode}):a};r.dg=function(){return this.g&&this.g.src&&this.g.textTracks?To(this).map(function(a){return hf(a)}):[]};
615
- r.lh=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=se(a),c=To(this).filter(function(h){return se(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=u(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=u(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
616
- function Io(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Lo(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function To(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
617
- r.Fg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==to)this.F.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=nf(this.i.textStreams,this.Ha,this.Vb,this.Ub),0<a.length&&(yl(this.j,a[0]),Po(this))):ul(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Io(this);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Bo(this)}};
612
+ b))c=f;c?(a=Ze(c),this.Bf(a,!0,d)):ko(this)}else this.g&&this.g.audioTracks&&(d=nf(this.Ib(),a,b||"",!1)[0])&&this.Bf(d)};r.Af=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ha=a,this.Vb=b||"",this.Ub=c,(a=nf(this.i.textStreams,this.Ha,this.Vb,this.Ub)[0]||null)&&a!=this.j.s&&(Qk(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.$e()))xl(this.j,a),Oo(this)}else(a=nf(this.wc(),a,b||"",c)[0])&&this.zg(a)};
613
+ r.ti=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=u(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.sa=new Df(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),ko(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=u(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Po(this,b)}};
614
+ r.$e=function(){var a=this.da;return this.F&&this.l==so?this.F.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Ho(this).some(function(b){return"showing"==b.mode}):a};r.dg=function(){return this.g&&this.g.src&&this.g.textTracks?So(this).map(function(a){return hf(a)}):[]};
615
+ r.lh=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=se(a),c=So(this).filter(function(h){return se(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=u(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=u(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
616
+ function Ho(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Ko(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function So(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
617
+ r.Fg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==so)this.F.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=nf(this.i.textStreams,this.Ha,this.Vb,this.Ub),0<a.length&&(xl(this.j,a[0]),Oo(this))):tl(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Ho(this);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Ao(this)}};
618
618
  r.wh=function(){if(this.C)var a=this.C.Dd();else{if(null==this.ea)return new Date;a=this.ea}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.g&&this.g.getStartDate?(b=this.g.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.gg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:a):null};
619
- r.Nd=function(){return this.R()?this.i?this.i.presentationTimeline.Nd():null:null};r.ob=function(){if(this.l==to)return this.F.ob();var a={total:[],audio:[],video:[],text:[]};this.l==Go&&(a.total=Ei(this.g.buffered));return a};
620
- r.getStats=function(){if(this.l!=to&&this.l!=Go)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};oo(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
621
- this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.Of(),this.s.N=this.C.Pf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.I=d;this.s.H=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.I?c.I:NaN):c=NaN;this.s.s=c;if(this.l==to){c=this.j.j;b=this.j.s;if(c){d=this.G?this.G.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||
622
- NaN,b.o=c.video.width||NaN,b.l=d);this.R()&&(c=this.gg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==Go&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.I;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,q=f.F,p=f.j,t=Ok(f.g,"playing"),w=Ok(f.g,"paused"),x=Ok(f.g,"buffering"),z=f.s,v=f.C,B=f.G,A=f.Ed,D=Pk(f.g),H=[];
619
+ r.Nd=function(){return this.R()?this.i?this.i.presentationTimeline.Nd():null:null};r.ob=function(){if(this.l==so)return this.F.ob();var a={total:[],audio:[],video:[],text:[]};this.l==Fo&&(a.total=Di(this.g.buffered));return a};
620
+ r.getStats=function(){if(this.l!=so&&this.l!=Fo)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};no(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
621
+ this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.Of(),this.s.N=this.C.Pf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.I=d;this.s.H=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.I?c.I:NaN):c=NaN;this.s.s=c;if(this.l==so){c=this.j.j;b=this.j.s;if(c){d=this.G?this.G.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||
622
+ NaN,b.o=c.video.width||NaN,b.l=d);this.R()&&(c=this.gg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==Fo&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.I;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,q=f.F,p=f.j,t=Nk(f.g,"playing"),w=Nk(f.g,"paused"),x=Nk(f.g,"buffering"),z=f.s,v=f.C,B=f.G,A=f.Ed,D=Ok(f.g),H=[];
623
623
  f=u(f.h.g);for(var J=f.next();!J.done;J=f.next())J=J.value,H.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:q,drmTimeSeconds:p,playTime:t,pauseTime:w,bufferingTime:x,licenseTime:z,liveLatency:v,maxSegmentDuration:B,bytesDownloaded:A,stateHistory:D,
624
624
  switchHistory:H}};
625
- r.Tg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:if(h.l!=to&&h.l!=Go)throw new Q(1,7,7004);"subtitles"!=c&&"captions"!=c&&Wa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.u(2);break}return C(A,Uo(h,a),3);case 3:d=A.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=Go){A.u(4);break}g&&(c="forced");return C(A,Vo(h,a,b,c,d,f||"",k),5);case 5:l=se(b);m=h.wc();if(n=m.find(function(D){return se(D.language)==
626
- l&&D.label==(f||"")&&D.kind==c}))return jo(h),A.return(n);throw new Q(1,2,2012);case 4:q=Md;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new Q(1,4,4033);if(!k.length){A.u(6);break}return C(A,Wo(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=A.h,w=Xo(h,t,d,k),x=new Blob([w],{type:"text/vtt"}),a=Ej(x),d="text/vtt";case 6:z={id:h.uf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Hk(0,p,[a]),mimeType:d||"",
627
- codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Od(d||"",e||"")])};v=Od(z.mimeType,z.codecs);B=fe(v);if(!B)throw new Q(2,2,2014,d);h.i.textStreams.push(z);jo(h);return A.return($e(z))}})};
628
- r.Ug=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v;return L(function(B){switch(B.g){case 1:if(c.l!=to&&c.l!=Go)throw new Q(1,7,7004);if(b){B.u(2);break}return C(B,Uo(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new Q(1,2,2017,a);d=Md;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new Q(1,4,4045);return C(B,Wo(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=B.h;g=he[b];if(!g)throw new Q(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
629
- vttOffset:0};l=Ab(f);m=h.parseMedia(l,k,a);n=[];q={};p=u(m);for(t=p.next();!t.done;q={Rc:q.Rc,Ob:q.Ob},t=p.next())q.Ob=t.value,q.Rc=null,w=function(A){return function(){null==A.Rc&&(A.Rc=Cd([a],[A.Ob.payload]));return A.Rc||[]}}(q),x=new xi(q.Ob.startTime,q.Ob.endTime,w,0,null,null,0,0,Infinity),q.Ob.payload.includes("#xywh")&&(z=q.Ob.payload.split("#xywh=")[1].split(","),4===z.length&&x.Gg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
630
- n.push(x);v={id:c.uf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fk(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.ve,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Od(b||
631
- "","")])};c.l==Go?c.$c.push(v):c.i.imageStreams.push(v);jo(c);return B.return(af(v))}})};
632
- r.Sg=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=to&&d.l!=Go)throw new Q(1,7,7004);if(c){k.u(2);break}return C(k,Uo(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),C(k,Vo(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.dg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return C(k,new Promise(function(l,m){d.m.na(f,"load",l);d.m.na(f,"error",function(){m(new Q(1,2,2015))})}),6);case 6:return jo(d),k.return(h);case 5:throw new Q(1,
633
- 2,2012);}})};function Uo(a,b){var c;return L(function(d){switch(d.g){case 1:return ra(d,2),C(d,Mm(b,a.H,a.h.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new Q(1,2,2011,b);}})}
634
- function Vo(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?C(n,Wo(a,b,a.H,a.h.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=Xo(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ej(l),e="text/vtt");m=document.createElement("track");var q=a.T,p=b;try{if(q.g.enabled){var t=jn(q);t.ot=wn;t.su=!0;var w=nn(t);var x=on(p,w)}else x=p}catch(z){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),x=p}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
635
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function Wo(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=pg;f=jg([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&pn(k,f,{ot:wn,su:!0})}catch(l){Xa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
636
- function Xo(a,b,c,d){var e=he[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null),fn(b,d);throw new Q(2,2,2014,c);}r.yi=function(a,b){this.ba.width=a;this.ba.height=b};r.xf=function(a){if(this.l==to){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=u(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.gd||d.Qa||d.ub||(d.gd=!1,tl(b,d,a));b=!0}}else b=!1;return b};
625
+ r.Tg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:if(h.l!=so&&h.l!=Fo)throw new Q(1,7,7004);"subtitles"!=c&&"captions"!=c&&Wa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.u(2);break}return C(A,To(h,a),3);case 3:d=A.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=Fo){A.u(4);break}g&&(c="forced");return C(A,Uo(h,a,b,c,d,f||"",k),5);case 5:l=se(b);m=h.wc();if(n=m.find(function(D){return se(D.language)==
626
+ l&&D.label==(f||"")&&D.kind==c}))return io(h),A.return(n);throw new Q(1,2,2012);case 4:q=Md;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new Q(1,4,4033);if(!k.length){A.u(6);break}return C(A,Vo(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=A.h,w=Wo(h,t,d,k),x=new Blob([w],{type:"text/vtt"}),a=Dj(x),d="text/vtt";case 6:z={id:h.uf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Gk(0,p,[a]),mimeType:d||"",
627
+ codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Od(d||"",e||"")])};v=Od(z.mimeType,z.codecs);B=fe(v);if(!B)throw new Q(2,2,2014,d);h.i.textStreams.push(z);io(h);return A.return($e(z))}})};
628
+ r.Ug=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v;return L(function(B){switch(B.g){case 1:if(c.l!=so&&c.l!=Fo)throw new Q(1,7,7004);if(b){B.u(2);break}return C(B,To(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new Q(1,2,2017,a);d=Md;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new Q(1,4,4045);return C(B,Vo(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=B.h;g=he[b];if(!g)throw new Q(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
629
+ vttOffset:0};l=Ab(f);m=h.parseMedia(l,k,a);n=[];q={};p=u(m);for(t=p.next();!t.done;q={Rc:q.Rc,Ob:q.Ob},t=p.next())q.Ob=t.value,q.Rc=null,w=function(A){return function(){null==A.Rc&&(A.Rc=Cd([a],[A.Ob.payload]));return A.Rc||[]}}(q),x=new wi(q.Ob.startTime,q.Ob.endTime,w,0,null,null,0,0,Infinity),q.Ob.payload.includes("#xywh")&&(z=q.Ob.payload.split("#xywh=")[1].split(","),4===z.length&&x.Gg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
630
+ n.push(x);v={id:c.uf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ek(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.ve,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Od(b||
631
+ "","")])};c.l==Fo?c.$c.push(v):c.i.imageStreams.push(v);io(c);return B.return(af(v))}})};
632
+ r.Sg=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=so&&d.l!=Fo)throw new Q(1,7,7004);if(c){k.u(2);break}return C(k,To(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),C(k,Uo(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.dg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return C(k,new Promise(function(l,m){d.m.na(f,"load",l);d.m.na(f,"error",function(){m(new Q(1,2,2015))})}),6);case 6:return io(d),k.return(h);case 5:throw new Q(1,
633
+ 2,2012);}})};function To(a,b){var c;return L(function(d){switch(d.g){case 1:return ra(d,2),C(d,ym(b,a.H,a.h.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new Q(1,2,2011,b);}})}
634
+ function Uo(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?C(n,Vo(a,b,a.H,a.h.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=Wo(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Dj(l),e="text/vtt");m=document.createElement("track");var q=a.T,p=b;try{if(q.g.enabled){var t=hn(q);t.ot=vn;t.su=!0;var w=mn(t);var x=nn(p,w)}else x=p}catch(z){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),x=p}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
635
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function Vo(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=pg;f=jg([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&on(k,f,{ot:vn,su:!0})}catch(l){Xa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
636
+ function Wo(a,b,c,d){var e=he[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null),en(b,d);throw new Q(2,2,2014,c);}r.yi=function(a,b){this.ba.width=a;this.ba.height=b};r.xf=function(a){if(this.l==so){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=u(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.gd||d.Qa||d.ub||(d.gd=!1,sl(b,d,a));b=!0}}else b=!1;return b};
637
637
  r.Ue=function(){Wa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.sh=function(){return this.Ga};
638
- function Jn(a){var b=bm();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.xf(d))}};b.textDisplayFactory=function(){if(a.Rd){var c=a.getConfiguration();return new Xm(a.g,a.Rd,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Rm(a.g,"Shaka Player TextTrack"):new Um};return b}r.Jg=function(a){this.Rd=a};
639
- function ho(a,b){for(var c=new Set,d=u(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=u(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=u(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Ik,l=e.closedCaptions.get(g);h={id:a.uf++,originalId:g,groupId:null,
638
+ function In(a){var b=am();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.xf(d))}};b.textDisplayFactory=function(){if(a.Rd){var c=a.getConfiguration();return new Wm(a.g,a.Rd,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Qm(a.g,"Shaka Player TextTrack"):new Tm};return b}r.Jg=function(a){this.Rd=a};
639
+ function go(a,b){for(var c=new Set,d=u(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=u(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=u(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Hk,l=e.closedCaptions.get(g);h={id:a.uf++,originalId:g,groupId:null,
640
640
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Kd,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Od(h,"")])};b.textStreams.push(h);c.add(g)}}
641
- function zo(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return L(function(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.xb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
642
- function Yn(a){var b=a.Ye();if(a.s&&a.L&&a.C){var c=a.G;c.j=b;Kk(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);oo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Rn("buffering",b))}function po(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Rn("ratechange"),a.dispatchEvent(b))}
643
- function oo(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Of?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Rn("statechanged",c)))}}
644
- function Do(a){var b=a.g.playbackRate,c=a.R();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.cg();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.sd(d):1==e&&b!==a.G.Xb()&&a.Wc()}if(c&&(e=a.Jb(),Number.isFinite(e.end)&&!(a.g.currentTime<e.start))){if(a.h.streaming.liveSync){var f=a.h.streaming.liveSyncMaxLatency;var g=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,
645
- g=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var h=a.h.streaming.liveSyncMinLatency;var k=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,k=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);c=e.end-a.g.currentTime;d=0;if(a.l==Go){var l=a.g.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.h.streaming.liveSyncPanicMode;
641
+ function yo(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return L(function(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.xb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
642
+ function Xn(a){var b=a.Ye();if(a.s&&a.L&&a.C){var c=a.G;c.j=b;Jk(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);no(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Qn("buffering",b))}function oo(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Qn("ratechange"),a.dispatchEvent(b))}
643
+ function no(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Of?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Qn("statechanged",c)))}}
644
+ function Co(a){var b=a.g.playbackRate,c=a.R();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.cg();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.sd(d):1==e&&b!==a.G.Xb()&&a.Wc()}if(c&&(e=a.Jb(),Number.isFinite(e.end)&&!(a.g.currentTime<e.start))){if(a.h.streaming.liveSync){var f=a.h.streaming.liveSyncMaxLatency;var g=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,
645
+ g=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var h=a.h.streaming.liveSyncMinLatency;var k=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,k=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);c=e.end-a.g.currentTime;d=0;if(a.l==Fo){var l=a.g.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.h.streaming.liveSyncPanicMode;
646
646
  l=1E3*a.h.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.h.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.sd(k):f&&g&&c-d>f?b!=g&&a.sd(g):h&&k&&c-d<h?b!=k&&a.sd(k):b!==a.G.Xb()&&a.Wc()}}
647
- function Eo(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.N)?(a.N=c,b=!0):(c=Math.max(a.N,c),a.N!=c&&(a.N=c,b=!0)));if(b){var d;0==a.N?d=Rn("started"):25==a.N?d=Rn("firstquartile"):50==a.N?d=Rn("midpoint"):75==a.N?d=Rn("thirdquartile"):100==a.N&&(d=Rn("complete"));d&&a.dispatchEvent(d)}}}function ko(a){try{ji(a.Pd,a.i)}catch(c){return Wn(a,c),!1}var b=mf(a.i.variants);b=a.sa.create(b);a.o.setVariants(Array.from(b.values()));return!0}
648
- function vo(a,b){b=void 0===b?!1:b;return ko(a)?a.o.chooseVariant(b):null}
649
- function On(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=u(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,bb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Ud.stop();d&&lo(a,!0,void 0,!1,!1)}
650
- function lo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=vo(a);f&&ro(a,f,e,b,c,d)}function ro(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&xl(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));xl(a.j,b,d,e,f,c);d=null;g&&(d=Ze(g));b=Ze(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&uj(a.K,b,a.Ve()),c=Rn("adaptation",c),Yo(a,c)):Zo(a,d,b)}}
651
- function Qo(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=kf(c);b=kf(b);Zo(a,c,b)}function Ao(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=se(a.h.preferredTextLanguage);c=se(c.language);if(2==a.h.autoShowText)return re(c,d);if(3==a.h.autoShowText)return a=se(b.language),re(c,d)&&!re(a,c);Wa("Invalid autoShowText setting!");return!1}function jo(a){var b=Rn("trackschanged");Yo(a,b)}
652
- function Zo(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&uj(a.K,c,a.Ve());c=Rn("variantchanged",b);Yo(a,c)}function Po(a){var b=Rn("textchanged");Yo(a,b)}function Bo(a){var b=Rn("texttrackvisibility");Yo(a,b)}function Co(a){a.h.abr.enabled||Nn(a);var b=(new Map).set("newStatus",a.h.abr.enabled);Yo(a,Rn("abrstatuschanged",b))}function Nn(a,b){b=void 0===b?!0:b;if(a.l==to){a.Ud.stop();for(var c=u(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&ko(a)}}
653
- r.Jd=function(a,b){if(!this.h.abr.enabled||this.l===Sn||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=u(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.Ud.Sa(1);b=this.ob().video.reduce(function(f,g){return f+g.end-g.start},0);lo(this,!0,b,!0,!1);return!0}return!1};
654
- function Wn(a,b){var c,d,e;return L(function(f){switch(f.g){case 1:if(a.l==Sn)return f.return();c=!0;if(!(a.Ia&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ra(f,3);return C(f,Rl(a.j),5);case 5:d=f.h;c=!d;ta(f,2);break;case 3:va(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&Nn(a,!1);e=Rn("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);F(f)}})}
655
- function io(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(Rn(b,a))}function Vn(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new Q(2,3,3016,b,c,a.g.error.message)}
656
- function qo(a,b,c){0<b&&(a.R()||a.Ig(b));b=a.getDuration();c<b&&(a.R()||a.$a(c))}function Yo(a,b){L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);a.l!=Sn&&a.dispatchEvent(b);F(c)})}function So(a){var b=new Set;a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(se(c.language)):b.add("und");return b}
657
- function Ro(a){var b=new Map,c=new Map;a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=se(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=u(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=u(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
647
+ function Do(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.N)?(a.N=c,b=!0):(c=Math.max(a.N,c),a.N!=c&&(a.N=c,b=!0)));if(b){var d;0==a.N?d=Qn("started"):25==a.N?d=Qn("firstquartile"):50==a.N?d=Qn("midpoint"):75==a.N?d=Qn("thirdquartile"):100==a.N&&(d=Qn("complete"));d&&a.dispatchEvent(d)}}}function jo(a){try{ii(a.Pd,a.i)}catch(c){return Vn(a,c),!1}var b=mf(a.i.variants);b=a.sa.create(b);a.o.setVariants(Array.from(b.values()));return!0}
648
+ function uo(a,b){b=void 0===b?!1:b;return jo(a)?a.o.chooseVariant(b):null}
649
+ function Nn(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=u(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,bb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Ud.stop();d&&ko(a,!0,void 0,!1,!1)}
650
+ function ko(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=uo(a);f&&qo(a,f,e,b,c,d)}function qo(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&wl(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));wl(a.j,b,d,e,f,c);d=null;g&&(d=Ze(g));b=Ze(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&tj(a.K,b,a.Ve()),c=Qn("adaptation",c),Xo(a,c)):Yo(a,d,b)}}
651
+ function Po(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=kf(c);b=kf(b);Yo(a,c,b)}function zo(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=se(a.h.preferredTextLanguage);c=se(c.language);if(2==a.h.autoShowText)return re(c,d);if(3==a.h.autoShowText)return a=se(b.language),re(c,d)&&!re(a,c);Wa("Invalid autoShowText setting!");return!1}function io(a){var b=Qn("trackschanged");Xo(a,b)}
652
+ function Yo(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&tj(a.K,c,a.Ve());c=Qn("variantchanged",b);Xo(a,c)}function Oo(a){var b=Qn("textchanged");Xo(a,b)}function Ao(a){var b=Qn("texttrackvisibility");Xo(a,b)}function Bo(a){a.h.abr.enabled||Mn(a);var b=(new Map).set("newStatus",a.h.abr.enabled);Xo(a,Qn("abrstatuschanged",b))}function Mn(a,b){b=void 0===b?!0:b;if(a.l==so){a.Ud.stop();for(var c=u(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&jo(a)}}
653
+ r.Jd=function(a,b){if(!this.h.abr.enabled||this.l===Rn||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=u(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.Ud.Sa(1);b=this.ob().video.reduce(function(f,g){return f+g.end-g.start},0);ko(this,!0,b,!0,!1);return!0}return!1};
654
+ function Vn(a,b){var c,d,e;return L(function(f){switch(f.g){case 1:if(a.l==Rn)return f.return();c=!0;if(!(a.Ia&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ra(f,3);return C(f,Ql(a.j),5);case 5:d=f.h;c=!d;ta(f,2);break;case 3:va(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&Mn(a,!1);e=Qn("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);F(f)}})}
655
+ function ho(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(Qn(b,a))}function Un(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new Q(2,3,3016,b,c,a.g.error.message)}
656
+ function po(a,b,c){0<b&&(a.R()||a.Ig(b));b=a.getDuration();c<b&&(a.R()||a.ab(c))}function Xo(a,b){L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);a.l!=Rn&&a.dispatchEvent(b);F(c)})}function Ro(a){var b=new Set;a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(se(c.language)):b.add("und");return b}
657
+ function Qo(a){var b=new Map,c=new Map;a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=se(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=u(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=u(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
658
658
  h.push({language:l,role:m,label:n})}});return h}P("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Jg;X.prototype.getManifestParserFactory=X.prototype.sh;X.prototype.getManifest=X.prototype.Ue;X.prototype.retryStreaming=X.prototype.xf;X.prototype.setMaxHardwareResolution=X.prototype.yi;X.prototype.addChaptersTrack=X.prototype.Sg;X.prototype.addThumbnailsTrack=X.prototype.Ug;X.prototype.addTextTrackAsync=X.prototype.Tg;X.prototype.getStats=X.prototype.getStats;
659
659
  X.prototype.getBufferedInfo=X.prototype.ob;X.prototype.getSegmentAvailabilityDuration=X.prototype.Nd;X.prototype.getPresentationStartTimeAsDate=X.prototype.gg;X.prototype.getPlayheadTimeAsDate=X.prototype.wh;X.prototype.setTextTrackVisibility=X.prototype.Fg;X.prototype.getChapters=X.prototype.lh;X.prototype.getChaptersTracks=X.prototype.dg;X.prototype.isTextTrackVisible=X.prototype.$e;X.prototype.selectVariantsByLabel=X.prototype.ti;X.prototype.selectTextLanguage=X.prototype.Af;
660
660
  X.prototype.selectAudioLanguage=X.prototype.yg;X.prototype.getTextLanguages=X.prototype.Ah;X.prototype.getAudioLanguages=X.prototype.jh;X.prototype.getTextLanguagesAndRoles=X.prototype.Bh;X.prototype.getAudioLanguagesAndRoles=X.prototype.kh;X.prototype.selectVariantTrack=X.prototype.Bf;X.prototype.selectTextTrack=X.prototype.zg;X.prototype.getThumbnails=X.prototype.hg;X.prototype.getAllThumbnails=X.prototype.ih;X.prototype.getImageTracks=X.prototype.ph;X.prototype.getTextTracks=X.prototype.wc;
661
661
  X.prototype.getVariantTracks=X.prototype.Ib;X.prototype.cancelTrickPlay=X.prototype.Wc;X.prototype.trickPlay=X.prototype.sd;X.prototype.getPlaybackRate=X.prototype.eb;X.prototype.isBuffering=X.prototype.Ye;X.prototype.getKeyStatuses=X.prototype.Kd;X.prototype.getActiveSessionsMetadata=X.prototype.Te;X.prototype.getExpiration=X.prototype.cd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Ih;X.prototype.seekRange=X.prototype.Jb;
662
662
  X.prototype.isAudioOnly=X.prototype.Lh;X.prototype.isInProgress=X.prototype.dc;X.prototype.isLive=X.prototype.R;X.prototype.getAdManager=X.prototype.bg;X.prototype.getAssetUri=X.prototype.ad;X.prototype.getNetworkingEngine=X.prototype.Zb;X.prototype.getMediaElement=X.prototype.uh;X.prototype.getManifestType=X.prototype.Ve;X.prototype.getLoadMode=X.prototype.rh;X.prototype.resetConfiguration=X.prototype.mi;X.prototype.getBufferFullness=X.prototype.cg;X.prototype.getConfiguration=X.prototype.getConfiguration;
663
663
  X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.ii;X.prototype.preload=X.prototype.preload;X.prototype.unloadAndSavePreload=X.prototype.Bi;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Fi;X.prototype.unload=X.prototype.lc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Yg;X.prototype.attach=X.prototype.Vc;
664
- X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?C(h,Zh(),3):h.u(2);2!=h.g&&(b=h.h);var k={};if(Nc())for(var l in ni)k[l]=!0;l=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Nc()?!!ni[m]:Oc(m);c=k;l='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",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",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(",").concat(y(Pd));
665
- k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=fe(m)?!0:Nc()?kb(m)||(lc(m)?!0:!1):Oc(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=$o;for(g in f)e[g]=f[g]();return h.return(e)})};
666
- X.isBrowserSupported=function(){window.Promise||Wa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Tc("Trident/"))return!1;var a=ed();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Oc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Mn=a};
667
- X.registerSupportPlugin=function(a,b){$o[a]=b};X.prototype.destroy=X.prototype.destroy;var Sn=0,In=1,to=2,Go=3;X.LoadMode={DESTROYED:Sn,NOT_LOADED:In,MEDIA_SOURCE:to,SRC_EQUALS:Go};X.version="v4.8.8";var ap=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(ap[0]),Number(ap[1])));var $o={},Mn=null;function bp(){this.h=[];this.j=this.i=this.g=0};function cp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new eb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=cp.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
664
+ X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?C(h,Zh(),3):h.u(2);2!=h.g&&(b=h.h);var k={};if(Nc())for(var l in mi)k[l]=!0;l=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Nc()?!!mi[m]:Oc(m);c=k;l='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",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",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(",").concat(y(Pd));
665
+ k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=fe(m)?!0:Nc()?kb(m)||(lc(m)?!0:!1):Oc(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=Zo;for(g in f)e[g]=f[g]();return h.return(e)})};
666
+ X.isBrowserSupported=function(){window.Promise||Wa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Tc("Trident/"))return!1;var a=ed();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Oc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Ln=a};
667
+ X.registerSupportPlugin=function(a,b){Zo[a]=b};X.prototype.destroy=X.prototype.destroy;var Rn=0,Hn=1,so=2,Fo=3;X.LoadMode={DESTROYED:Rn,NOT_LOADED:Hn,MEDIA_SOURCE:so,SRC_EQUALS:Fo};X.version="v4.8.9";var $o=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number($o[0]),Number($o[1])));var Zo={},Ln=null;function ap(){this.h=[];this.j=this.i=this.g=0};function bp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new eb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=bp.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
668
668
  r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
669
669
  r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
670
670
  r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
671
- r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",cp);cp.prototype.release=cp.prototype.release;
672
- cp.prototype.getPodIndex=cp.prototype.getPodIndex;cp.prototype.getTimeOffset=cp.prototype.getTimeOffset;cp.prototype.getMediaUrl=cp.prototype.getMediaUrl;cp.prototype.getAdvertiserName=cp.prototype.getAdvertiserName;cp.prototype.getCreativeAdId=cp.prototype.getCreativeAdId;cp.prototype.getAdId=cp.prototype.getAdId;cp.prototype.getVastMediaWidth=cp.prototype.getVastMediaWidth;cp.prototype.getVastMediaHeight=cp.prototype.getVastMediaHeight;cp.prototype.getVastMediaBitrate=cp.prototype.getVastMediaBitrate;
673
- cp.prototype.getDescription=cp.prototype.getDescription;cp.prototype.getTitle=cp.prototype.getTitle;cp.prototype.getPositionInSequence=cp.prototype.getPositionInSequence;cp.prototype.getSequenceLength=cp.prototype.getSequenceLength;cp.prototype.setMuted=cp.prototype.setMuted;cp.prototype.resize=cp.prototype.resize;cp.prototype.isLinear=cp.prototype.isLinear;cp.prototype.isMuted=cp.prototype.isMuted;cp.prototype.setVolume=cp.prototype.setVolume;cp.prototype.getVolume=cp.prototype.getVolume;
674
- cp.prototype.play=cp.prototype.play;cp.prototype.pause=cp.prototype.pause;cp.prototype.skip=cp.prototype.skip;cp.prototype.canSkipNow=cp.prototype.canSkipNow;cp.prototype.getTimeUntilSkippable=cp.prototype.getTimeUntilSkippable;cp.prototype.isSkippable=cp.prototype.isSkippable;cp.prototype.isPaused=cp.prototype.isPaused;cp.prototype.getRemainingTime=cp.prototype.getRemainingTime;cp.prototype.getMinSuggestedDuration=cp.prototype.getMinSuggestedDuration;cp.prototype.getDuration=cp.prototype.getDuration;function dp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new eb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.8");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
675
- google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){ep(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){fp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.F=!0})}dp.prototype.configure=function(a){this.s=a};dp.prototype.stop=function(){this.g&&this.g.stop();this.o&&Wm(this.o)};
676
- dp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function fp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new T("ad-error",b));gp(a,null);a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
677
- function ep(a,b){a.m(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.m(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
678
- a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}hp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,ip(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,ip(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
679
- a.i.offsetHeight,ip(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,ip(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.na(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){gp(a,null)}}
680
- function ip(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
681
- function hp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new T(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){fp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){jp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){jp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
682
- function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){gp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){gp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
671
+ r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",bp);bp.prototype.release=bp.prototype.release;
672
+ bp.prototype.getPodIndex=bp.prototype.getPodIndex;bp.prototype.getTimeOffset=bp.prototype.getTimeOffset;bp.prototype.getMediaUrl=bp.prototype.getMediaUrl;bp.prototype.getAdvertiserName=bp.prototype.getAdvertiserName;bp.prototype.getCreativeAdId=bp.prototype.getCreativeAdId;bp.prototype.getAdId=bp.prototype.getAdId;bp.prototype.getVastMediaWidth=bp.prototype.getVastMediaWidth;bp.prototype.getVastMediaHeight=bp.prototype.getVastMediaHeight;bp.prototype.getVastMediaBitrate=bp.prototype.getVastMediaBitrate;
673
+ bp.prototype.getDescription=bp.prototype.getDescription;bp.prototype.getTitle=bp.prototype.getTitle;bp.prototype.getPositionInSequence=bp.prototype.getPositionInSequence;bp.prototype.getSequenceLength=bp.prototype.getSequenceLength;bp.prototype.setMuted=bp.prototype.setMuted;bp.prototype.resize=bp.prototype.resize;bp.prototype.isLinear=bp.prototype.isLinear;bp.prototype.isMuted=bp.prototype.isMuted;bp.prototype.setVolume=bp.prototype.setVolume;bp.prototype.getVolume=bp.prototype.getVolume;
674
+ bp.prototype.play=bp.prototype.play;bp.prototype.pause=bp.prototype.pause;bp.prototype.skip=bp.prototype.skip;bp.prototype.canSkipNow=bp.prototype.canSkipNow;bp.prototype.getTimeUntilSkippable=bp.prototype.getTimeUntilSkippable;bp.prototype.isSkippable=bp.prototype.isSkippable;bp.prototype.isPaused=bp.prototype.isPaused;bp.prototype.getRemainingTime=bp.prototype.getRemainingTime;bp.prototype.getMinSuggestedDuration=bp.prototype.getMinSuggestedDuration;bp.prototype.getDuration=bp.prototype.getDuration;function cp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new eb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.9");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
675
+ google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){dp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){ep(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.F=!0})}cp.prototype.configure=function(a){this.s=a};cp.prototype.stop=function(){this.g&&this.g.stop();this.o&&Vm(this.o)};
676
+ cp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function ep(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new T("ad-error",b));fp(a,null);a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
677
+ function dp(a,b){a.m(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.m(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
678
+ a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}gp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
679
+ a.i.offsetHeight,hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.na(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){fp(a,null)}}
680
+ function hp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
681
+ function gp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new T(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){ep(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){ip(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){ip(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
682
+ function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){fp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){fp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
683
683
  a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
684
684
  a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
685
685
  google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
686
- function jp(a,b){var c=b.getAd();c?(a.j=new cp(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new T("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Wa("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
687
- function gp(a,b){a.m(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function kp(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.l=d}r=kp.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h.skipOffset?!0:!1};
686
+ function ip(a,b){var c=b.getAd();c?(a.j=new bp(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new T("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Wa("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
687
+ function fp(a,b){a.m(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function jp(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.l=d}r=jp.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h.skipOffset?!0:!1};
688
688
  r.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var a=this.getRemainingTime()-this.h.skipOffset;return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};
689
689
  r.isLinear=function(){return this.l};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.j?this.j:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};
690
- r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",kp);kp.prototype.release=kp.prototype.release;kp.prototype.getPodIndex=kp.prototype.getPodIndex;kp.prototype.getTimeOffset=kp.prototype.getTimeOffset;kp.prototype.getMediaUrl=kp.prototype.getMediaUrl;kp.prototype.getAdvertiserName=kp.prototype.getAdvertiserName;
691
- kp.prototype.getCreativeAdId=kp.prototype.getCreativeAdId;kp.prototype.getAdId=kp.prototype.getAdId;kp.prototype.getVastMediaWidth=kp.prototype.getVastMediaWidth;kp.prototype.getVastMediaHeight=kp.prototype.getVastMediaHeight;kp.prototype.getVastMediaBitrate=kp.prototype.getVastMediaBitrate;kp.prototype.getDescription=kp.prototype.getDescription;kp.prototype.getTitle=kp.prototype.getTitle;kp.prototype.getPositionInSequence=kp.prototype.getPositionInSequence;kp.prototype.getSequenceLength=kp.prototype.getSequenceLength;
692
- kp.prototype.setMuted=kp.prototype.setMuted;kp.prototype.resize=kp.prototype.resize;kp.prototype.isLinear=kp.prototype.isLinear;kp.prototype.isMuted=kp.prototype.isMuted;kp.prototype.setVolume=kp.prototype.setVolume;kp.prototype.getVolume=kp.prototype.getVolume;kp.prototype.play=kp.prototype.play;kp.prototype.pause=kp.prototype.pause;kp.prototype.skip=kp.prototype.skip;kp.prototype.canSkipNow=kp.prototype.canSkipNow;kp.prototype.getTimeUntilSkippable=kp.prototype.getTimeUntilSkippable;
693
- kp.prototype.isSkippable=kp.prototype.isSkippable;kp.prototype.isPaused=kp.prototype.isPaused;kp.prototype.getRemainingTime=kp.prototype.getRemainingTime;kp.prototype.getMinSuggestedDuration=kp.prototype.getMinSuggestedDuration;kp.prototype.getDuration=kp.prototype.getDuration;function lp(a,b,c,d){this.B=a;this.K=b;this.g=c;this.l=null;this.Y=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.o=new eb}lp.prototype.stop=function(){for(var a=u(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Lb(b.target,b.type,b.listener);mp(this);this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
694
- lp.prototype.release=function(){this.stop();this.o&&this.o.release()};lp.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(np(this,this.G,this.T),this.T=!1)};lp.prototype.getCuePoints=function(){for(var a=[],b=u(this.j),c=b.next();!c.done;c=b.next()){c=u(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
695
- function op(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;L(function(t){if(1==t.g)return d=jg([b],Rf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=pd(e)),f=a.K.request(7,d),ra(t,2),C(t,f.promise,4);if(2!=t.g){g=t.h;h=jd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.Y,a.i(new T("ads-loaded",(new Map).set("loadTime",q))),p=new rc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
690
+ r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",jp);jp.prototype.release=jp.prototype.release;jp.prototype.getPodIndex=jp.prototype.getPodIndex;jp.prototype.getTimeOffset=jp.prototype.getTimeOffset;jp.prototype.getMediaUrl=jp.prototype.getMediaUrl;jp.prototype.getAdvertiserName=jp.prototype.getAdvertiserName;
691
+ jp.prototype.getCreativeAdId=jp.prototype.getCreativeAdId;jp.prototype.getAdId=jp.prototype.getAdId;jp.prototype.getVastMediaWidth=jp.prototype.getVastMediaWidth;jp.prototype.getVastMediaHeight=jp.prototype.getVastMediaHeight;jp.prototype.getVastMediaBitrate=jp.prototype.getVastMediaBitrate;jp.prototype.getDescription=jp.prototype.getDescription;jp.prototype.getTitle=jp.prototype.getTitle;jp.prototype.getPositionInSequence=jp.prototype.getPositionInSequence;jp.prototype.getSequenceLength=jp.prototype.getSequenceLength;
692
+ jp.prototype.setMuted=jp.prototype.setMuted;jp.prototype.resize=jp.prototype.resize;jp.prototype.isLinear=jp.prototype.isLinear;jp.prototype.isMuted=jp.prototype.isMuted;jp.prototype.setVolume=jp.prototype.setVolume;jp.prototype.getVolume=jp.prototype.getVolume;jp.prototype.play=jp.prototype.play;jp.prototype.pause=jp.prototype.pause;jp.prototype.skip=jp.prototype.skip;jp.prototype.canSkipNow=jp.prototype.canSkipNow;jp.prototype.getTimeUntilSkippable=jp.prototype.getTimeUntilSkippable;
693
+ jp.prototype.isSkippable=jp.prototype.isSkippable;jp.prototype.isPaused=jp.prototype.isPaused;jp.prototype.getRemainingTime=jp.prototype.getRemainingTime;jp.prototype.getMinSuggestedDuration=jp.prototype.getMinSuggestedDuration;jp.prototype.getDuration=jp.prototype.getDuration;function kp(a,b,c,d){this.B=a;this.K=b;this.g=c;this.l=null;this.Y=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.o=new eb}kp.prototype.stop=function(){for(var a=u(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Lb(b.target,b.type,b.listener);lp(this);this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
694
+ kp.prototype.release=function(){this.stop();this.o&&this.o.release()};kp.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(mp(this,this.G,this.T),this.T=!1)};kp.prototype.getCuePoints=function(){for(var a=[],b=u(this.j),c=b.next();!c.done;c=b.next()){c=u(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
695
+ function np(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;L(function(t){if(1==t.g)return d=jg([b],Rf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=pd(e)),f=a.K.request(7,d),ra(t,2),C(t,f.promise,4);if(2!=t.g){g=t.h;h=jd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.Y,a.i(new T("ads-loaded",(new Map).set("loadTime",q))),p=new rc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
696
696
  return ta(t,0)}va(t);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,t.return();a.l.resolve(a.H);a.l=null;F(t)})}
697
- function np(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z;L(function(v){if(1==v.g)return d=jg([b],Rf()),e=a.K.request(7,d),ra(v,2),C(v,e.promise,4);if(2!=v.g){f=v.h;g=[];h=jd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=u(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=u(n.nonLinearAdsList),p=q.next();!p.done;p=q.next())for(t=p.value,w=u(t.nonLinearAdList),x=w.next();!x.done;x=w.next())z=x.value,pp(a,z);g=a.getCuePoints();a.i(new T("ad-cue-points-changed",
698
- (new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",g))),mp(a),a.j=[];c&&(a.I||0<g.length)&&qp(a);return ta(v,0)}va(v);F(v)})}
699
- function pp(a,b){var c,d,e,f,g,h,k,l;L(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=rp(b);if(d=a.F.get(c))return m.return();e=jg([b.staticResource],Rf());f=a.K.request(7,e);ra(m,2);a.F.set(c,[]);return C(m,f.promise,4)}if(2!=m.g)return g=m.h,h=jd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ta(m,0);va(m);a.F.delete(c);F(m)})}
700
- function rp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function qp(a){sp(a);a.I||(tp(a),a.o.D(a.g,"seeked",function(){tp(a)}),a.o.D(a.g,"ended",function(){mp(a)}));a.o.D(a.g,"timeupdate",function(){sp(a)})}
701
- function tp(a){var b=a.g.currentTime;if(0!=b&&null==a.A){for(var c,d,e=u(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=u(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.g.currentTime=c.startTimeInSeconds)}}
702
- function sp(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if(a.h){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),up(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),up(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),up(a,"thirdQuartile"));d=a.h.getRemainingTime();
703
- e=a.h.getDuration();0<e&&(0>=d||d>e)&&mp(a)}if(!a.h||!a.h.isLinear()){a:for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.h&&a.h.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.g.ended)continue;a.g.currentTime=h;break a}mp(a);a.L=e;a.h=new kp(g,f+1,e.ads.length,!0,a.g);a.C=g;0===f&&up(a,"breakStart");vp(a);break}}}if(!a.h)for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;
704
- if(a.h)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(rp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){mp(a);h=a;k=u(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||0)+"%";m.style.maxWidth=100-(l.placeholder.left||
705
- 0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.h=new kp(g,f+1,e.ads.length,!1,a.g);a.C=g;0===f&&up(a,"breakStart");vp(a);break}}}c&&!a.h&&(b=a.g.currentTime,a.A&&a.A>b&&(a.g.currentTime=a.A),a.A=null)}}}
706
- function mp(a){if(a.h){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.N.push(a.C.adId);up(a,"complete");for(var b=u(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.o.Lb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&up(a,"breakEnd");a.h=null;a.C=null;a.L=null}}
707
- function vp(a){var b=!1;a.g.paused?b=!0:(up(a,"impression"),up(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&up(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||up(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(up(a,"impression"),up(a,"start"),b=!1):up(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){up(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
697
+ function mp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z;L(function(v){if(1==v.g)return d=jg([b],Rf()),e=a.K.request(7,d),ra(v,2),C(v,e.promise,4);if(2!=v.g){f=v.h;g=[];h=jd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=u(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=u(n.nonLinearAdsList),p=q.next();!p.done;p=q.next())for(t=p.value,w=u(t.nonLinearAdList),x=w.next();!x.done;x=w.next())z=x.value,op(a,z);g=a.getCuePoints();a.i(new T("ad-cue-points-changed",
698
+ (new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",g))),lp(a),a.j=[];c&&(a.I||0<g.length)&&pp(a);return ta(v,0)}va(v);F(v)})}
699
+ function op(a,b){var c,d,e,f,g,h,k,l;L(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=qp(b);if(d=a.F.get(c))return m.return();e=jg([b.staticResource],Rf());f=a.K.request(7,e);ra(m,2);a.F.set(c,[]);return C(m,f.promise,4)}if(2!=m.g)return g=m.h,h=jd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ta(m,0);va(m);a.F.delete(c);F(m)})}
700
+ function qp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function pp(a){rp(a);a.I||(sp(a),a.o.D(a.g,"seeked",function(){sp(a)}),a.o.D(a.g,"ended",function(){lp(a)}));a.o.D(a.g,"timeupdate",function(){rp(a)})}
701
+ function sp(a){var b=a.g.currentTime;if(0!=b&&null==a.A){for(var c,d,e=u(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=u(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.g.currentTime=c.startTimeInSeconds)}}
702
+ function rp(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if(a.h){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),tp(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),tp(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),tp(a,"thirdQuartile"));d=a.h.getRemainingTime();
703
+ e=a.h.getDuration();0<e&&(0>=d||d>e)&&lp(a)}if(!a.h||!a.h.isLinear()){a:for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.h&&a.h.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.g.ended)continue;a.g.currentTime=h;break a}lp(a);a.L=e;a.h=new jp(g,f+1,e.ads.length,!0,a.g);a.C=g;0===f&&tp(a,"breakStart");up(a);break}}}if(!a.h)for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;
704
+ if(a.h)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(qp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){lp(a);h=a;k=u(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||0)+"%";m.style.maxWidth=100-(l.placeholder.left||
705
+ 0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.h=new jp(g,f+1,e.ads.length,!1,a.g);a.C=g;0===f&&tp(a,"breakStart");up(a);break}}}c&&!a.h&&(b=a.g.currentTime,a.A&&a.A>b&&(a.g.currentTime=a.A),a.A=null)}}}
706
+ function lp(a){if(a.h){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.N.push(a.C.adId);tp(a,"complete");for(var b=u(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.o.Lb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&tp(a,"breakEnd");a.h=null;a.C=null;a.L=null}}
707
+ function up(a){var b=!1;a.g.paused?b=!0:(tp(a,"impression"),tp(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&tp(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||tp(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(tp(a,"impression"),tp(a,"start"),b=!1):tp(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){tp(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
708
708
  d.type,d.listener)}
709
- function up(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=u(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=jg([d],Rf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.h)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break;
710
- case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active")}};function wp(a,b){this.g=a;this.i=null;this.h=b}r=wp.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
709
+ function tp(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=u(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=jg([d],Rf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.h)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break;
710
+ case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active")}};function vp(a,b){this.g=a;this.i=null;this.h=b}r=vp.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
711
711
  r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.h.muted=a};
712
712
  r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};r.getAdId=function(){return this.g.getAdId()};
713
- r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};P("shaka.ads.ServerSideAd",wp);wp.prototype.release=wp.prototype.release;wp.prototype.getPodIndex=wp.prototype.getPodIndex;
714
- wp.prototype.getTimeOffset=wp.prototype.getTimeOffset;wp.prototype.getMediaUrl=wp.prototype.getMediaUrl;wp.prototype.getAdvertiserName=wp.prototype.getAdvertiserName;wp.prototype.getCreativeAdId=wp.prototype.getCreativeAdId;wp.prototype.getAdId=wp.prototype.getAdId;wp.prototype.getVastMediaWidth=wp.prototype.getVastMediaWidth;wp.prototype.getVastMediaHeight=wp.prototype.getVastMediaHeight;wp.prototype.getVastMediaBitrate=wp.prototype.getVastMediaBitrate;wp.prototype.getDescription=wp.prototype.getDescription;
715
- wp.prototype.getTitle=wp.prototype.getTitle;wp.prototype.getPositionInSequence=wp.prototype.getPositionInSequence;wp.prototype.getSequenceLength=wp.prototype.getSequenceLength;wp.prototype.setMuted=wp.prototype.setMuted;wp.prototype.resize=wp.prototype.resize;wp.prototype.isLinear=wp.prototype.isLinear;wp.prototype.isMuted=wp.prototype.isMuted;wp.prototype.setVolume=wp.prototype.setVolume;wp.prototype.getVolume=wp.prototype.getVolume;wp.prototype.play=wp.prototype.play;wp.prototype.pause=wp.prototype.pause;
716
- wp.prototype.skip=wp.prototype.skip;wp.prototype.canSkipNow=wp.prototype.canSkipNow;wp.prototype.getTimeUntilSkippable=wp.prototype.getTimeUntilSkippable;wp.prototype.isSkippable=wp.prototype.isSkippable;wp.prototype.isPaused=wp.prototype.isPaused;wp.prototype.getRemainingTime=wp.prototype.getRemainingTime;wp.prototype.getMinSuggestedDuration=wp.prototype.getMinSuggestedDuration;wp.prototype.getDuration=wp.prototype.getDuration;function xp(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new eb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){yp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
717
- e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new wp(f,e.l);e.A&&(e.m.i=e.A);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
713
+ r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};P("shaka.ads.ServerSideAd",vp);vp.prototype.release=vp.prototype.release;vp.prototype.getPodIndex=vp.prototype.getPodIndex;
714
+ vp.prototype.getTimeOffset=vp.prototype.getTimeOffset;vp.prototype.getMediaUrl=vp.prototype.getMediaUrl;vp.prototype.getAdvertiserName=vp.prototype.getAdvertiserName;vp.prototype.getCreativeAdId=vp.prototype.getCreativeAdId;vp.prototype.getAdId=vp.prototype.getAdId;vp.prototype.getVastMediaWidth=vp.prototype.getVastMediaWidth;vp.prototype.getVastMediaHeight=vp.prototype.getVastMediaHeight;vp.prototype.getVastMediaBitrate=vp.prototype.getVastMediaBitrate;vp.prototype.getDescription=vp.prototype.getDescription;
715
+ vp.prototype.getTitle=vp.prototype.getTitle;vp.prototype.getPositionInSequence=vp.prototype.getPositionInSequence;vp.prototype.getSequenceLength=vp.prototype.getSequenceLength;vp.prototype.setMuted=vp.prototype.setMuted;vp.prototype.resize=vp.prototype.resize;vp.prototype.isLinear=vp.prototype.isLinear;vp.prototype.isMuted=vp.prototype.isMuted;vp.prototype.setVolume=vp.prototype.setVolume;vp.prototype.getVolume=vp.prototype.getVolume;vp.prototype.play=vp.prototype.play;vp.prototype.pause=vp.prototype.pause;
716
+ vp.prototype.skip=vp.prototype.skip;vp.prototype.canSkipNow=vp.prototype.canSkipNow;vp.prototype.getTimeUntilSkippable=vp.prototype.getTimeUntilSkippable;vp.prototype.isSkippable=vp.prototype.isSkippable;vp.prototype.isPaused=vp.prototype.isPaused;vp.prototype.getRemainingTime=vp.prototype.getRemainingTime;vp.prototype.getMinSuggestedDuration=vp.prototype.getMinSuggestedDuration;vp.prototype.getDuration=vp.prototype.getDuration;function wp(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new eb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){xp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
717
+ e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new vp(f,e.l);e.A&&(e.m.i=e.A);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
718
718
  var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new T("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new T("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new T("ad-third-quartile"))});
719
719
  this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new T("ad-complete"));e.i(new T("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new T("ad-skipped"));e.i(new T("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=u(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
720
- f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=xp.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
721
- function yp(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){cg.call(this);this.g=this.h=this.i=null;this.j=new bp;this.m=navigator.language;this.l=null}na(Y,cg);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new Q(2,10,1E4);this.i&&this.i.release();this.i=new dp(a,b,this.m,c,function(e){return zp(d,e)});this.i.configure(this.l)};
722
- r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);cg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new T("ad-stopped"));this.j=new bp};r.requestClientSideAds=function(a){if(!this.i)throw new Q(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
723
- r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new Q(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new lp(a,b,c,function(e){return zp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new Q(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new Q(1,10,10004)):(d.l=new Tf,op(d,a,b),d.H=c||"",d.Y=Date.now()/1E3,a=d.l);return a};
724
- r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new Q(1,10,10005);var b=this.h;b.G=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new Q(2,10,10002);this.g&&this.g.release();this.g=new xp(a,b,this.m,function(d){return zp(c,d)});this.g.configure(this.l)};
725
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new Q(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.8.8";c=this.g;c.j?a=Promise.reject(new Q(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
726
- (c.G=!0),c.j=new Tf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new Q(1,10,10003);(a.mpt||a.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.8.8";this.g.g.replaceAdTagParameters(a)};
720
+ f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=wp.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
721
+ function xp(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){cg.call(this);this.g=this.h=this.i=null;this.j=new ap;this.m=navigator.language;this.l=null}na(Y,cg);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new Q(2,10,1E4);this.i&&this.i.release();this.i=new cp(a,b,this.m,c,function(e){return yp(d,e)});this.i.configure(this.l)};
722
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);cg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new T("ad-stopped"));this.j=new ap};r.requestClientSideAds=function(a){if(!this.i)throw new Q(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
723
+ r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new Q(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new kp(a,b,c,function(e){return yp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new Q(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new Q(1,10,10004)):(d.l=new Tf,np(d,a,b),d.H=c||"",d.Y=Date.now()/1E3,a=d.l);return a};
724
+ r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new Q(1,10,10005);var b=this.h;b.G=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new Q(2,10,10002);this.g&&this.g.release();this.g=new wp(a,b,this.m,function(d){return yp(c,d)});this.g.configure(this.l)};
725
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new Q(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.8.9";c=this.g;c.j?a=Promise.reject(new Q(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
726
+ (c.G=!0),c.j=new Tf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new Q(1,10,10003);(a.mpt||a.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.8.9";this.g.g.replaceAdTagParameters(a)};
727
727
  r.getServerSideCuePoints=function(){pb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
728
728
  r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
729
- function zp(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}P("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
729
+ function yp(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}P("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
730
730
  Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
731
731
  Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";
732
732
  Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";
733
- Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Mn=function(){return new Y};function Ap(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof T){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=u(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=u(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
734
- TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=u(Ei(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
735
- function Bp(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Cp(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
736
- function Cp(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
737
- var Dp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Ep="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Fp=["loop","playbackRate"],Gp=["pause","play"],Hp={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
738
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Ip={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Jp={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Kp=[["getConfiguration","configure"]],Lp=[["isTextTrackVisible","setTextTrackVisibility"]],Mp="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
739
- Np=["attach","attachCanvas","detach","load","unload"];function Op(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Mc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Pp(h)};this.C=function(k,l){k=Bp(l);switch(k.type){case "event":var m=k.targetName,n=ag(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new Q(q.severity,q.category,
740
- q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Qp.add(this)}r=Op.prototype;r.destroy=function(){Qp.delete(this);Rp(this);Sp&&Tp(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.Va=function(){return this.h};r.vf=function(){return this.I};
741
- r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.kc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u(Qp),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Tf;d.s=!0;Up(d,e)}},function(b){for(var c=u(Qp),d=c.next();!d.done;d=c.next())d=d.value,Vp="available"==b,d.l.kc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Vp&&this.l.U(Wp);(a=Sp)&&
742
- a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Tf,this.s=!0,Up(this,a)):Sp=null}else window.__onGCastApiAvailable!==Xp&&(Yp=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Xp)};r.Cf=function(a){this.o=a;this.h&&Zp(this,{type:"appData",appData:this.o})};
743
- r.cast=function(){var a=this;return L(function(b){if(!a.m)throw new Q(1,8,8E3);if(!Vp)throw new Q(1,8,8001);if(a.h)throw new Q(1,8,8002);a.j=new Tf;chrome.cast.requestSession(function(c){return Up(a,c)},function(c){return $p(a,c)});return C(b,a.j,0)})};function aq(a){a.h&&chrome.cast.requestSession(function(b){return Up(a,b)},function(b){return $p(a,b)})}r.uc=function(){if(this.h){Rp(this);if(Sp){Tp(this);try{Sp.stop(function(){},function(){})}catch(a){}Sp=null}Pp(this)}};
744
- r.get=function(a,b){var c=this;if("video"==a){if(Gp.includes(b))return function(){return c.vg.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))}}else if("player"==a){if(Jp[b]&&!this.get("player","isLive")())return function(){};if(Mp.includes(b))return function(){return c.vg.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Np.includes(b))return function(){return c.ji.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Hp[b]||Ip[b])return function(){return c.g[a][b]}}return this.g[a][b]};
745
- r.set=function(a,b,c){this.g[a][b]=c;Zp(this,{type:"set",targetName:a,property:b,value:c})};function Up(a,b){var c=a.N();Sp=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Pp(a);Zp(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function $p(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new Q(2,8,c,b))}
746
- r.vg=function(a,b){Zp(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.ji=function(a,b){var c=Ha.apply(2,arguments),d=new Tf,e=this.H.toString();this.H++;this.i[e]=d;try{Zp(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Tp(a){var b=Sp;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
747
- function Pp(a){var b=Sp?"connected"==Sp.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Rp(a)}a.h=b;a.I=b?Sp.receiver.friendlyName:"";a.l.kc()}function Rp(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new Q(1,7,7E3))}}function Zp(a,b){b=Ap(b);var c=Sp;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},$a)}catch(d){throw b=new Q(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.A("player",c),a.uc(),b;}}var Wp=.02,Vp=!1,Sp=null,Yp=null,Qp=new Set;
748
- function Xp(a){Yp?window.__onGCastApiAvailable=Yp:delete window.__onGCastApiAvailable;Yp=null;if(a)for(var b=u(Qp),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function bq(a,b,c,d){d=void 0===d?!1:d;cg.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Op(c,function(){return cq(e)},function(){return dq(e)},function(f,g){return eq(e,f,g)},function(){return fq(e)},function(){return gq(e)},d);hq(this)}na(bq,cg);r=bq.prototype;
749
- r.destroy=function(a){a&&this.g.uc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;cg.prototype.release.call(this);return Promise.all(a)};r.Gh=function(){return this.l};r.vh=function(){return this.s};r.Zg=function(){return this.g.m&&Vp};r.Va=function(){return this.g.Va()};r.vf=function(){return this.g.vf()};
750
- r.cast=function(){var a=this;return L(function(b){return 1==b.g?C(b,a.g.cast(),2):a.h?C(b,a.h.lc(),0):b.return()})};r.Cf=function(a){this.g.Cf(a)};r.Ai=function(){aq(this.g)};r.uc=function(){this.g.uc()};
751
- r.$g=function(a,b){b=void 0===b?!1:b;var c=this;return L(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.uc();return C(d,c.g.destroy(),2)}c.g=null;c.g=new Op(a,function(){return cq(c)},function(){return dq(c)},function(e,f){return eq(c,e,f)},function(){return fq(c)},function(){return gq(c)},b);c.g.init();F(d)})};
752
- function hq(a){a.g.init();a.m=new eb;for(var b=u(Dp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Va()||(f=ag(f),a.j.dispatchEvent(f))});for(var d in bg)a.m.D(a.h,bg[d],function(f){a.g.Va()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Kc=e,Object.defineProperty(a.l,b.Kc,{configurable:!1,enumerable:!0,get:function(f){return function(){return iq(a,f.Kc)}}(b),set:function(f){return function(g){var h=f.Kc;a.g.Va()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Kc:b.Kc};a.s={};jq(a,
753
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return kq(a,f)}})});lq(a);a.j=new cg;a.j.Vd=a.l;a.o=new cg;a.o.Vd=a.s}function lq(a){var b=new Map;jq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
754
- function jq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=u(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
755
- function gq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ad(),startTime:null};a.i.pause();for(var c=u(Fp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=u(Kp);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=u(Lp);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function cq(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}
756
- function dq(a){var b=new T(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
757
- function fq(a){for(var b=u(Kp),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=u(Fp);for(d=c.next();!d.done;d=c.next())d=
758
- d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=u(Fp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=u(Lp);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.Fg(h);g&&a.h.Af(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new T("error",l);a.h.dispatchEvent(l)})}
759
- function iq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Va()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Va()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
760
- function kq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Zb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.bg()};
761
- if("setVideoContainer"==b)return function(c){return a.h.Jg(c)};if(a.g.Va()){if("getManifest"==b||"drmInfo"==b)return function(){Wa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Wa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Va()&&0==Object.keys(a.g.g.video).length&&(Hp[b]||Ip[b])||!a.g.Va()?a.h[b].bind(a.h):a.g.get("player",b)}
762
- function eq(a,b,c){a.g.Va()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}P("shaka.cast.CastProxy",bq);bq.prototype.changeReceiverId=bq.prototype.$g;bq.prototype.forceDisconnect=bq.prototype.uc;bq.prototype.suggestDisconnect=bq.prototype.Ai;bq.prototype.setAppData=bq.prototype.Cf;bq.prototype.cast=bq.prototype.cast;bq.prototype.receiverName=bq.prototype.vf;bq.prototype.isCasting=bq.prototype.Va;bq.prototype.canCast=bq.prototype.Zg;bq.prototype.getPlayer=bq.prototype.vh;
763
- bq.prototype.getVideo=bq.prototype.Gh;bq.prototype.destroy=bq.prototype.destroy;function mq(a,b,c,d){cg.call(this);var e=this;this.g=a;this.h=b;this.j=new eb;this.H={video:a,player:b};this.C=c||function(){};this.I=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Mc(function(){nq(e)});oq(this)}na(mq,cg);r=mq.prototype;r.isConnected=function(){return this.F};r.Mh=function(){return this.o};r.wi=function(a){this.i=a};r.eh=function(){this.i=null};
733
+ Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Ln=function(){return new Y};function zp(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof T){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=u(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=u(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
734
+ TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=u(Di(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
735
+ function Ap(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Bp(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
736
+ function Bp(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
737
+ var Cp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Dp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Ep=["loop","playbackRate"],Fp=["pause","play"],Gp={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
738
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Hp={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Ip={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Jp=[["getConfiguration","configure"]],Kp=[["isTextTrackVisible","setTextTrackVisibility"]],Lp="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
739
+ Mp=["attach","attachCanvas","detach","load","unload"];function Np(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Mc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Op(h)};this.C=function(k,l){k=Ap(l);switch(k.type){case "event":var m=k.targetName,n=ag(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new Q(q.severity,q.category,
740
+ q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Pp.add(this)}r=Np.prototype;r.destroy=function(){Pp.delete(this);Qp(this);Rp&&Sp(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.Wa=function(){return this.h};r.vf=function(){return this.I};
741
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.kc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u(Pp),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Tf;d.s=!0;Tp(d,e)}},function(b){for(var c=u(Pp),d=c.next();!d.done;d=c.next())d=d.value,Up="available"==b,d.l.kc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Up&&this.l.U(Vp);(a=Rp)&&
742
+ a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Tf,this.s=!0,Tp(this,a)):Rp=null}else window.__onGCastApiAvailable!==Wp&&(Xp=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Wp)};r.Cf=function(a){this.o=a;this.h&&Yp(this,{type:"appData",appData:this.o})};
743
+ r.cast=function(){var a=this;return L(function(b){if(!a.m)throw new Q(1,8,8E3);if(!Up)throw new Q(1,8,8001);if(a.h)throw new Q(1,8,8002);a.j=new Tf;chrome.cast.requestSession(function(c){return Tp(a,c)},function(c){return Zp(a,c)});return C(b,a.j,0)})};function $p(a){a.h&&chrome.cast.requestSession(function(b){return Tp(a,b)},function(b){return Zp(a,b)})}r.uc=function(){if(this.h){Qp(this);if(Rp){Sp(this);try{Rp.stop(function(){},function(){})}catch(a){}Rp=null}Op(this)}};
744
+ r.get=function(a,b){var c=this;if("video"==a){if(Fp.includes(b))return function(){return c.vg.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))}}else if("player"==a){if(Ip[b]&&!this.get("player","isLive")())return function(){};if(Lp.includes(b))return function(){return c.vg.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Mp.includes(b))return function(){return c.ji.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Gp[b]||Hp[b])return function(){return c.g[a][b]}}return this.g[a][b]};
745
+ r.set=function(a,b,c){this.g[a][b]=c;Yp(this,{type:"set",targetName:a,property:b,value:c})};function Tp(a,b){var c=a.N();Rp=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Op(a);Yp(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Zp(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new Q(2,8,c,b))}
746
+ r.vg=function(a,b){Yp(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.ji=function(a,b){var c=Ha.apply(2,arguments),d=new Tf,e=this.H.toString();this.H++;this.i[e]=d;try{Yp(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Sp(a){var b=Rp;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
747
+ function Op(a){var b=Rp?"connected"==Rp.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Qp(a)}a.h=b;a.I=b?Rp.receiver.friendlyName:"";a.l.kc()}function Qp(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new Q(1,7,7E3))}}function Yp(a,b){b=zp(b);var c=Rp;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},$a)}catch(d){throw b=new Q(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.A("player",c),a.uc(),b;}}var Vp=.02,Up=!1,Rp=null,Xp=null,Pp=new Set;
748
+ function Wp(a){Xp?window.__onGCastApiAvailable=Xp:delete window.__onGCastApiAvailable;Xp=null;if(a)for(var b=u(Pp),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function aq(a,b,c,d){d=void 0===d?!1:d;cg.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Np(c,function(){return bq(e)},function(){return cq(e)},function(f,g){return dq(e,f,g)},function(){return eq(e)},function(){return fq(e)},d);gq(this)}na(aq,cg);r=aq.prototype;
749
+ r.destroy=function(a){a&&this.g.uc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;cg.prototype.release.call(this);return Promise.all(a)};r.Gh=function(){return this.l};r.vh=function(){return this.s};r.Zg=function(){return this.g.m&&Up};r.Wa=function(){return this.g.Wa()};r.vf=function(){return this.g.vf()};
750
+ r.cast=function(){var a=this;return L(function(b){return 1==b.g?C(b,a.g.cast(),2):a.h?C(b,a.h.lc(),0):b.return()})};r.Cf=function(a){this.g.Cf(a)};r.Ai=function(){$p(this.g)};r.uc=function(){this.g.uc()};
751
+ r.$g=function(a,b){b=void 0===b?!1:b;var c=this;return L(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.uc();return C(d,c.g.destroy(),2)}c.g=null;c.g=new Np(a,function(){return bq(c)},function(){return cq(c)},function(e,f){return dq(c,e,f)},function(){return eq(c)},function(){return fq(c)},b);c.g.init();F(d)})};
752
+ function gq(a){a.g.init();a.m=new eb;for(var b=u(Cp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Wa()||(f=ag(f),a.j.dispatchEvent(f))});for(var d in bg)a.m.D(a.h,bg[d],function(f){a.g.Wa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Kc=e,Object.defineProperty(a.l,b.Kc,{configurable:!1,enumerable:!0,get:function(f){return function(){return hq(a,f.Kc)}}(b),set:function(f){return function(g){var h=f.Kc;a.g.Wa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Kc:b.Kc};a.s={};iq(a,
753
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return jq(a,f)}})});kq(a);a.j=new cg;a.j.Vd=a.l;a.o=new cg;a.o.Vd=a.s}function kq(a){var b=new Map;iq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
754
+ function iq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=u(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
755
+ function fq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ad(),startTime:null};a.i.pause();for(var c=u(Ep),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=u(Jp);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=u(Kp);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function bq(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}
756
+ function cq(a){var b=new T(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
757
+ function eq(a){for(var b=u(Jp),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=u(Ep);for(d=c.next();!d.done;d=c.next())d=
758
+ d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=u(Ep),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=u(Kp);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.Fg(h);g&&a.h.Af(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new T("error",l);a.h.dispatchEvent(l)})}
759
+ function hq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Wa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Wa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
760
+ function jq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Zb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.bg()};
761
+ if("setVideoContainer"==b)return function(c){return a.h.Jg(c)};if(a.g.Wa()){if("getManifest"==b||"drmInfo"==b)return function(){Wa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Wa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Wa()&&0==Object.keys(a.g.g.video).length&&(Gp[b]||Hp[b])||!a.g.Wa()?a.h[b].bind(a.h):a.g.get("player",b)}
762
+ function dq(a,b,c){a.g.Wa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}P("shaka.cast.CastProxy",aq);aq.prototype.changeReceiverId=aq.prototype.$g;aq.prototype.forceDisconnect=aq.prototype.uc;aq.prototype.suggestDisconnect=aq.prototype.Ai;aq.prototype.setAppData=aq.prototype.Cf;aq.prototype.cast=aq.prototype.cast;aq.prototype.receiverName=aq.prototype.vf;aq.prototype.isCasting=aq.prototype.Wa;aq.prototype.canCast=aq.prototype.Zg;aq.prototype.getPlayer=aq.prototype.vh;
763
+ aq.prototype.getVideo=aq.prototype.Gh;aq.prototype.destroy=aq.prototype.destroy;function lq(a,b,c,d){cg.call(this);var e=this;this.g=a;this.h=b;this.j=new eb;this.H={video:a,player:b};this.C=c||function(){};this.I=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Mc(function(){mq(e)});nq(this)}na(lq,cg);r=lq.prototype;r.isConnected=function(){return this.F};r.Mh=function(){return this.o};r.wi=function(a){this.i=a};r.eh=function(){this.i=null};
764
764
  r.xi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.vi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.ui=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
765
765
  r.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,cg.prototype.release.call(a),C(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
766
- function oq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return pq(a)};b.onSenderDisconnected=function(){return pq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&qq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);qq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return rq(a,
767
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return sq(a,e)};b.start();b=u(Dp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return tq(a,"video",e)});for(var d in bg)a.j.D(a.h,bg[d],function(e){return tq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;uq(a)});a.j.D(a.g,"playing",function(){a.o=!1;uq(a)});a.j.D(a.g,"pause",function(){uq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;uq(a)});
768
- a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,uq(a))})).U(vq)})}function pq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;uq(a)}function uq(a){var b;L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);if(!a.h)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);wq(a)||xq(a);F(c)})}
769
- function yq(a,b,c){var d,e,f,g,h,k,l,m,n,q;L(function(p){switch(p.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ra(p,5),C(p,a.h.load(b.manifest,b.startTime),7)):C(p,Promise.resolve(),3);case 7:ta(p,3);break;case 5:return g=va(p),h=(new Map).set("detail",g),k=new T("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
770
- a.g.autoplay=f;b.manifest&&(a.g.play(),xq(a));F(p)}})}function tq(a,b,c){a.h&&(nq(a),qq(a,{type:"event",targetName:b,event:c},a.l))}
771
- function nq(a){a.G.U(zq);for(var b={video:{},player:{}},c=u(Ep),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.R())for(var e in Jp)0==a.m%Jp[e]&&(b.player[e]=a.h[e]());for(var f in Hp)0==a.m%Hp[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;qq(a,{type:"update",update:b},a.l);for(var g in Ip)0==a.m%Ip[g]&&(b={player:{}},b.player[g]=a.h[g](),qq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
772
- 1);wq(a)}function wq(a){return a.A&&(a.g.duration||a.h.R())?(Aq(a),a.A=!1,!0):!1}function Aq(a,b){var c={contentId:a.h.ad(),streamType:a.h.R()?"LIVE":"BUFFERED",contentType:""};a.h.R()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);xq(a,void 0===b?0:b,c)}
773
- function sq(a,b){var c=Bp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;yq(a,c.initState,c.appData);nq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
774
- "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Bq(a,g,f,null)},function(h){return Bq(a,g,f,h)})}}
775
- function rq(a,b){var c=Bp(b.data);switch(c.type){case "PLAY":a.g.play();xq(a);break;case "PAUSE":a.g.pause();xq(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),xq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),xq(a));break;case "STOP":a.h.lc().then(function(){a.h&&xq(a)});break;case "GET_STATUS":Aq(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
776
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||xq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Aq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");qq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:qq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
777
- function Bq(a,b,c,d){a.h&&qq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function qq(a,b,c,d){a.F&&(a=Ap(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function xq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Cq:a.h.Ye()?Dq:a.g.paused?Eq:Fq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);qq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
778
- P("shaka.cast.CastReceiver",mq);mq.prototype.destroy=mq.prototype.destroy;mq.prototype.setContentArtist=mq.prototype.ui;mq.prototype.setContentImage=mq.prototype.vi;mq.prototype.setContentTitle=mq.prototype.xi;mq.prototype.clearContentMetadata=mq.prototype.eh;mq.prototype.setContentMetadata=mq.prototype.wi;mq.prototype.isIdle=mq.prototype.Mh;mq.prototype.isConnected=mq.prototype.isConnected;var zq=.5,vq=5,Cq="IDLE",Fq="PLAYING",Dq="BUFFERING",Eq="PAUSED";function Gq(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Hq(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,t=-1,w=0;w<q.length;w++)if(null!=q[w]&&""!==q[w].g.trim()){p=w;break}for(w=q.length-1;0<=w;w--)if(null!=q[w]&&""!==q[w].g.trim()){t=w;break}if(-1===
779
- p||-1===t)q=Iq(d,e),a.nestedCues.push(q);else{for(;p<=t;p++)if(w=q[p]){var x=w.l,z=w.i,v=w.j,B=w.h;if(x!=h||z!=k||v!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Hq(d,e,x,z,v,B),h=x,k=z,l=v,m=B;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Iq(d,e),a.nestedCues.push(n));n=Hq(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
780
- function Hq(a,b,c,d,e,f){a=new Nb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Iq(a,b){a=new Nb(a,b,"");a.lineBreak=!0;return a}function Jq(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Kq(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Lq(this)}function Mq(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Nb(b,c,"");e.lineInterpretation=1;var f=Nq.get(a.g);f&&(e.line=f);return Gq(e,d,a.i,b,c)}function Lq(a){Oq(a,0,15);a.g=1}
781
- function Pq(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Qq:d=Rq.has(c)?Rq.get(c):String.fromCharCode(c);break;case Sq:d=Tq.get(c);break;case Uq:a.i[a.g].pop();d=Vq.get(c);break;case Wq:a.i[a.g].pop(),d=Xq.get(c)}d&&a.i[a.g].push(new Jq(d,a.m,a.j,a.o,a.l))}}function Yq(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Oq(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
782
- var Qq=0,Sq=1,Uq=2,Wq=3,Rq=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Tq=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Vq=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
783
- "\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Xq=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
784
- [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),Nq=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Zq(a,b){this.h=$q;this.o=new Kq(a,b);this.i=new Kq(a,b);this.g=this.j=new Kq(a,b);this.l=0;this.m=null}function ar(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==br&&a.h!==cr&&(e=Mq(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Oq(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Oq(c,0,15),d.g=15);a.h=br;d.h=b;return e}function dr(a){a.h=er;a.g=a.j;a.g.h=0}function fr(a){Xa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=cr}
785
- var $q=0,er=1,br=3,cr=4,gr="black green blue cyan red yellow magenta black".split(" "),hr="white green blue cyan red yellow magenta white_italics".split(" ");function ir(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=jr;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";kr(this)}function kr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(lr())}function lr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function mr(a,b){nr(a)&&(a.i[a.h][a.g]=new Jq(b,a.C,a.A,a.s,a.B),a.g++)}function nr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}ir.prototype.isVisible=function(){return this.l};
786
- function or(a,b,c){var d=new Nb(a.j,b,"");d.textAlign=a.F===pr?"left":a.F===qr?"right":Qb;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?gc:2;switch(a.G){case rr:e.regionAnchorX=0;e.regionAnchorY=0;break;case sr:e.regionAnchorX=50;e.regionAnchorY=0;break;case tr:e.regionAnchorX=100;e.regionAnchorY=0;break;case ur:e.regionAnchorX=0;e.regionAnchorY=50;break;case vr:e.regionAnchorX=
787
- 50;e.regionAnchorY=50;break;case wr:e.regionAnchorX=100;e.regionAnchorY=50;break;case xr:e.regionAnchorX=0;e.regionAnchorY=100;break;case yr:e.regionAnchorX=50;e.regionAnchorY=100;break;case zr:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Gq(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var pr=0,qr=1,jr=2,rr=0,sr=1,tr=2,ur=3,vr=4,wr=5,xr=6,yr=7,zr=8;function Ar(){this.i=[];this.h=null;this.g=0}function Br(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Cr(a.h)),a.h=null,a.g=0))}function Cr(a){this.g=0;this.h=a}Cr.prototype.ka=function(){return this.g<this.h.length};Cr.prototype.wa=function(){return this.g};function Dr(a){if(!a.ka())throw new Q(2,2,3E3);return a.h[a.g++]}Cr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new Q(2,2,3E3);this.g+=a};function Er(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
788
- function Fr(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Dr(b).value;b=null;c=u(Gr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=or(e,d,a.i)),kr(e);return b}if(137===c)for(b=Dr(b).value,b=u(Gr(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Dr(b).value;b=null;c=u(Gr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=or(e,d,a.i)),e.l=!1;return b}if(139===c){c=Dr(b).value;
789
- b=null;c=u(Gr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=or(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Dr(b).value,Hr(a,b,d);if(143===c)return d=Hr(a,255,d),Ir(a),d;if(144===c)b.skip(1),d=Dr(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Dr(b).value,c=Dr(b).value,b.skip(1),a.g&&(b=Jr((c&48)>>4,(c&12)>>2,c&3),a.g.B=Jr((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Dr(b).value,b=Dr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
790
- b.skip(1),d=Dr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new ir(c,a.i);f.j=d;a.h[c]=f}d=Dr(b).value;f=Dr(b).value;var g=Dr(b).value,h=Dr(b).value,k=Dr(b).value;b=Dr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
791
- function Gr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Hr(a,b,c){var d=null;b=u(Gr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=or(f,c,a.i));a.h[e]=null}return d}function Ir(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Jr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Kr[a<<2|b<<1|c]}
792
- var Lr=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Kr="black blue green cyan red magenta yellow white".split(" ");function Mr(){this.h=[];this.g=[];this.i=new Ar;this.l=0;this.m=new Map([["CC1",new Zq(0,0)],["CC2",new Zq(0,1)],["CC3",new Zq(1,0)],["CC4",new Zq(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Nr(this)}Mr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Nr(this);a=u(this.j.values());for(var b=a.next();!b.done;b=a.next())Ir(b.value)};
793
- function Nr(a){a.o=0;a.s=0;for(var b=u(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=$q,c.g=c.j,c.m=null,Lq(c.i),Lq(c.j),Lq(c.o);a.B=!0}
794
- Mr.prototype.extract=function(a,b){if(this.B){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new yg(a,0);if(!(8>a.getLength())&&181===a.P()&&49===a.ra()&&1195456820===a.M()&&3===a.P()&&(c=a.P(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.P(),f=(e&4)>>2,g=a.P(),h=a.P();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,cb:g,vb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
795
- Mr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=u(this.h),d=c.next();!d.done;d=c.next())(d=Or(this,d.value))&&b.push(d);c=u(this.g);for(d=c.next();!d.done;d=c.next())Br(this.i,d.value);c=u(this.i.i);for(d=c.next();!d.done;d=c.next())d=Pr(this,d.value),b.push.apply(b,y(d));this.i.i=[];this.h=[];this.g=[];return b};
796
- function Or(a,b){var c=b.type;if(16===(b.cb&112)){var d=b.cb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.cb&&255===b.vb||!b.cb&&!b.vb||!Qr(b.cb)||!Qr(b.vb))return 45<=++a.l&&Nr(a),null;a.l=0;b.cb&=127;b.vb&=127;if(!b.cb&&!b.vb)return null;a.A.add(d);a=null;if(16===(b.cb&112))a:{d=b.cb;a=b.vb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=
797
- hr[e]:7===e&&(f=!0);a=1===(a&1);c.h!==cr&&(e=c.g,c.h===br&&b!==e.g&&(c=1+b-e.h,Yq(e,c,1+e.g-e.h,e.h),Oq(e,0,c-1),Oq(e,b+1,15-b)),e.g=b,e.m=a,e.j=f,e.l=d,e.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Pq(c.g,Qq,32),d=!1,b=hr[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=gr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Pq(c.g,Sq,a);else if(18===
798
- (d&246)&&32===(a&224))Pq(c.g,d&1?Wq:Uq,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.vb){case 32:dr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=ar(c,2,a);break;case 38:d=ar(c,3,a);break;case 39:d=ar(c,4,a);break;case 40:Pq(c.g,Qq,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Lq(c.o);fr(c);break;case 43:fr(c);break;case 44:b=c.i;d=null;c.h!==cr&&(d=Mq(b,c.l,a));Oq(b,0,15);break;case 45:b=c.g;c.h!==br?d=null:(d=Mq(b,c.l,a),f=b.g-b.h+1,Yq(b,f-1,f,b.h),Oq(b,0,
799
- f-1),Oq(b,b.g,15-b.g),c.l=a);break;case 46:Oq(c.j,0,15);break;case 47:b=null,c.h!==cr&&(b=Mq(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,dr(c),c.l=a,d=b}a=d;break a}a=null}else d=b.vb,Pq(c.g,Qq,b.cb),Pq(c.g,Qq,d);return a}
800
- function Pr(a,b){var c=[];try{for(;b.ka();){var d=Dr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Dr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Er(e));for(var g=a.j.get(e),h=b.wa();b.wa()-h<f;){e=b;var k=Dr(e),l=k.value,m=k.pts;if(16===l){var n=Dr(e);l=l<<16|n.value}if(0<=l&&31>=l){var q=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!nr(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=or(p,q,g.i));if(p.h+1>=p.o){q=p;for(var t=
801
- 0,w=1;16>w;w++,t++)q.i[t]=q.i[w];for(w=0;1>w;w++,t++)q.i[t]=lr()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=or(p,q,g.i));p.i[p.h]=lr();p.g=0;break;case 12:p.isVisible()&&(e=or(p,q,g.i)),kr(p),q=p,q.h=0,q.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Fr(g,e,l,m);else{if(4096<=l&&4127>=l)q=l&255,8<=q&&15>=q?e.skip(1):16<=q&&23>=q?e.skip(2):24<=q&&31>=q&&e.skip(3);else if(4224<=l&&4255>=l)q=l&255,128<=q&&135>=q?e.skip(4):136<=q&&143>=q&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?mr(g.g,
802
- "\u266a"):mr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&mr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Lr.has(e)){var z=Lr.get(e);mr(g.g,z)}else mr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?mr(g.g,"_"):mr(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(v){if(v instanceof Q&&3E3===v.code)Xa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw v;}return c}function Qr(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
803
- Mr.prototype.getStreams=function(){return Array.from(this.A)};P("shaka.cea.CeaDecoder",Mr);Ib=function(){return new Mr};function Rr(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(y(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Sr(){this.j=new Map;this.i=this.h=0;this.g=Tr}
804
- Sr.prototype.init=function(a){function b(f){f=f.name;f in Ur&&(c.g=Ur[f])}var c=this,d=[],e=[];(new Bg).box("moov",Gg).box("mvex",Gg).O("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.M();g=g.M();c.h=f;c.i=g}).box("trak",Gg).O("tkhd",function(f){f=Ri(f.reader,f.version);d.push(f.trackId)}).box("mdia",Gg).O("mdhd",function(f){f=Pi(f.reader,f.version);e.push(f.timescale)}).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
805
- b).box("dvh1",b).box("dvhe",b).box("encv",Lg).box("sinf",Gg).box("frma",function(f){f=Si(f.reader).Ea;f in Ur&&(c.g=Ur[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new Q(2,2,2010);this.g==Tr&&Wa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
806
- Sr.prototype.parse=function(a){var b=this;if(this.g==Tr)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Bg).box("moof",function(l){f=l.start;g=[];Gg(l)}).box("traf",Gg).O("trun",function(l){l=Qi(l.reader,l.version,l.flags);g.push(l)}).O("tfhd",function(l){l=Ni(l.reader,l.flags);d=l.Yf||b.h;e=l.hh||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).O("tfdt",function(l){h=Oi(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Wa("Unable to find base media decode time for CEA captions!"),
807
- new Q(2,2,2010);Vr(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
808
- function Vr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(t){return t.xg});n=[].concat.apply([],y(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].gh);b.ka();){g=b.M();var q=b.P(),p=null;p=!1;h=1;switch(a.g){case Wr:p=q&31;p=6==p;break;case Xr:h=2;b.skip(1);p=q>>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,l<n.length&&(q=n[l].ie||0),q=(c+q)/d,h=u(Rr(b.sb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:q});else try{b.skip(g-h)}catch(t){break}m-=g+4;0==m&&(c=l<n.length?
809
- c+(n[l].yf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",Sr);var Tr=0,Wr=1,Xr=2,Ur={avc1:Wr,avc3:Wr,hev1:Xr,hvc1:Xr,dvav:Wr,dva1:Wr,dvh1:Xr,dvhe:Xr};Hb["video/mp4"]=function(){return new Sr};function Yr(){this.g=null}Yr.prototype.init=function(){};Yr.prototype.parse=function(a){this.g?this.g.clearData():this.g=new kj;var b=[];a=Ab(a);if(!rj(a))return b;a=this.g.parse(a);var c=a.bd(),d=a.Od();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=u(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=u(Rr(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
810
- P("shaka.cea.TsCeaParser",Yr);Hb["video/mp2t"]=function(){return new Yr};function Zr(a,b,c){var d=$r(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new Q(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Dc});if(1<f.length)throw new Q(2,4,4050);f.length&&(g=as(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Dc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Dc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
811
- l.Dc});f.length&&(a=bs(e,k,f,c,h),0==a.length&&(a=[Fd("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=u(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Fd(c,k,e));if(h=Array.from(h)[0]||null)for(k=u(a),b=k.next();!b.done;b=k.next())for(b=u(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Xf:h,Dj:e,drmInfos:a,ye:g,ag:!0}}
812
- function cs(a,b,c,d){var e=Zr(a,c,d);if(b.ag){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.ag=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new Q(2,4,4008);return e.Xf||b.Xf}
813
- function ds(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function es(a){a=u($g(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=u(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return Yg(c)}return""}
814
- function fs(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Yg(b)))return b;a=bh(a.node,"urn:microsoft:playready","pro");if(!a||!Yg(a))return"";a=Yg(a);a=wd(a);a=ds(a).filter(function(c){return c.type===gs})[0];if(!a)return"";a=md(a.value,!0);return(a=Rg(a,"WRMHEADER"))?es(a):""}
815
- function bs(a,b,c,d,e){var f=[];c=u(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Dc];if(h){var k;if((k=bh(g.node,"urn:microsoft:playready","pro"))&&Yg(k)){k=Yg(k);k=wd(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Pg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Dc)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
816
- 60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Pg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Fd(h,b,g.init||a||k||l);if(h=hs.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function $r(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=is(c.value))&&b.push(c);return b}
817
- function is(a){var b=a.attributes.schemeIdUri,c=eh(a,"urn:mpeg:cenc:2013","default_KID"),d=ch(a,"urn:mpeg:cenc:2013","pssh").map(Zg),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new Q(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:wd(g),keyId:null}})}catch(g){throw new Q(2,4,4007);}return{node:a,Dc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
818
- function as(a){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new Q(2,4,4042);var b=bh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new Q(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new Q(2,4,4051);b=bh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new Q(2,4,4051);a=b.attributes.IV;b=sd(b.attributes.keyUriTemplate);
766
+ function nq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return oq(a)};b.onSenderDisconnected=function(){return oq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&pq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);pq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return qq(a,
767
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return rq(a,e)};b.start();b=u(Cp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return sq(a,"video",e)});for(var d in bg)a.j.D(a.h,bg[d],function(e){return sq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;tq(a)});a.j.D(a.g,"playing",function(){a.o=!1;tq(a)});a.j.D(a.g,"pause",function(){tq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;tq(a)});
768
+ a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,tq(a))})).U(uq)})}function oq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;tq(a)}function tq(a){var b;L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);if(!a.h)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);vq(a)||wq(a);F(c)})}
769
+ function xq(a,b,c){var d,e,f,g,h,k,l,m,n,q;L(function(p){switch(p.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ra(p,5),C(p,a.h.load(b.manifest,b.startTime),7)):C(p,Promise.resolve(),3);case 7:ta(p,3);break;case 5:return g=va(p),h=(new Map).set("detail",g),k=new T("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
770
+ a.g.autoplay=f;b.manifest&&(a.g.play(),wq(a));F(p)}})}function sq(a,b,c){a.h&&(mq(a),pq(a,{type:"event",targetName:b,event:c},a.l))}
771
+ function mq(a){a.G.U(yq);for(var b={video:{},player:{}},c=u(Dp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.R())for(var e in Ip)0==a.m%Ip[e]&&(b.player[e]=a.h[e]());for(var f in Gp)0==a.m%Gp[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;pq(a,{type:"update",update:b},a.l);for(var g in Hp)0==a.m%Hp[g]&&(b={player:{}},b.player[g]=a.h[g](),pq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
772
+ 1);vq(a)}function vq(a){return a.A&&(a.g.duration||a.h.R())?(zq(a),a.A=!1,!0):!1}function zq(a,b){var c={contentId:a.h.ad(),streamType:a.h.R()?"LIVE":"BUFFERED",contentType:""};a.h.R()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);wq(a,void 0===b?0:b,c)}
773
+ function rq(a,b){var c=Ap(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;xq(a,c.initState,c.appData);mq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
774
+ "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Aq(a,g,f,null)},function(h){return Aq(a,g,f,h)})}}
775
+ function qq(a,b){var c=Ap(b.data);switch(c.type){case "PLAY":a.g.play();wq(a);break;case "PAUSE":a.g.pause();wq(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),wq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),wq(a));break;case "STOP":a.h.lc().then(function(){a.h&&wq(a)});break;case "GET_STATUS":zq(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
776
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||wq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&zq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");pq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:pq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
777
+ function Aq(a,b,c,d){a.h&&pq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function pq(a,b,c,d){a.F&&(a=zp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function wq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Bq:a.h.Ye()?Cq:a.g.paused?Dq:Eq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);pq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
778
+ P("shaka.cast.CastReceiver",lq);lq.prototype.destroy=lq.prototype.destroy;lq.prototype.setContentArtist=lq.prototype.ui;lq.prototype.setContentImage=lq.prototype.vi;lq.prototype.setContentTitle=lq.prototype.xi;lq.prototype.clearContentMetadata=lq.prototype.eh;lq.prototype.setContentMetadata=lq.prototype.wi;lq.prototype.isIdle=lq.prototype.Mh;lq.prototype.isConnected=lq.prototype.isConnected;var yq=.5,uq=5,Bq="IDLE",Eq="PLAYING",Cq="BUFFERING",Dq="PAUSED";function Fq(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Gq(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,t=-1,w=0;w<q.length;w++)if(null!=q[w]&&""!==q[w].g.trim()){p=w;break}for(w=q.length-1;0<=w;w--)if(null!=q[w]&&""!==q[w].g.trim()){t=w;break}if(-1===
779
+ p||-1===t)q=Hq(d,e),a.nestedCues.push(q);else{for(;p<=t;p++)if(w=q[p]){var x=w.l,z=w.i,v=w.j,B=w.h;if(x!=h||z!=k||v!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Gq(d,e,x,z,v,B),h=x,k=z,l=v,m=B;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Hq(d,e),a.nestedCues.push(n));n=Gq(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
780
+ function Gq(a,b,c,d,e,f){a=new Nb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Hq(a,b){a=new Nb(a,b,"");a.lineBreak=!0;return a}function Iq(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Jq(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Kq(this)}function Lq(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Nb(b,c,"");e.lineInterpretation=1;var f=Mq.get(a.g);f&&(e.line=f);return Fq(e,d,a.i,b,c)}function Kq(a){Nq(a,0,15);a.g=1}
781
+ function Oq(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Pq:d=Qq.has(c)?Qq.get(c):String.fromCharCode(c);break;case Rq:d=Sq.get(c);break;case Tq:a.i[a.g].pop();d=Uq.get(c);break;case Vq:a.i[a.g].pop(),d=Wq.get(c)}d&&a.i[a.g].push(new Iq(d,a.m,a.j,a.o,a.l))}}function Xq(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Nq(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
782
+ var Pq=0,Rq=1,Tq=2,Vq=3,Qq=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Sq=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Uq=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
783
+ "\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Wq=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
784
+ [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),Mq=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Yq(a,b){this.h=Zq;this.o=new Jq(a,b);this.i=new Jq(a,b);this.g=this.j=new Jq(a,b);this.l=0;this.m=null}function $q(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ar&&a.h!==br&&(e=Lq(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Nq(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Nq(c,0,15),d.g=15);a.h=ar;d.h=b;return e}function cr(a){a.h=dr;a.g=a.j;a.g.h=0}function er(a){Xa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=br}
785
+ var Zq=0,dr=1,ar=3,br=4,fr="black green blue cyan red yellow magenta black".split(" "),gr="white green blue cyan red yellow magenta white_italics".split(" ");function hr(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=ir;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";jr(this)}function jr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(kr())}function kr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function lr(a,b){mr(a)&&(a.i[a.h][a.g]=new Iq(b,a.C,a.A,a.s,a.B),a.g++)}function mr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}hr.prototype.isVisible=function(){return this.l};
786
+ function nr(a,b,c){var d=new Nb(a.j,b,"");d.textAlign=a.F===or?"left":a.F===pr?"right":Qb;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?gc:2;switch(a.G){case qr:e.regionAnchorX=0;e.regionAnchorY=0;break;case rr:e.regionAnchorX=50;e.regionAnchorY=0;break;case sr:e.regionAnchorX=100;e.regionAnchorY=0;break;case tr:e.regionAnchorX=0;e.regionAnchorY=50;break;case ur:e.regionAnchorX=
787
+ 50;e.regionAnchorY=50;break;case vr:e.regionAnchorX=100;e.regionAnchorY=50;break;case wr:e.regionAnchorX=0;e.regionAnchorY=100;break;case xr:e.regionAnchorX=50;e.regionAnchorY=100;break;case yr:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Fq(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var or=0,pr=1,ir=2,qr=0,rr=1,sr=2,tr=3,ur=4,vr=5,wr=6,xr=7,yr=8;function zr(){this.i=[];this.h=null;this.g=0}function Ar(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Br(a.h)),a.h=null,a.g=0))}function Br(a){this.g=0;this.h=a}Br.prototype.ka=function(){return this.g<this.h.length};Br.prototype.wa=function(){return this.g};function Cr(a){if(!a.ka())throw new Q(2,2,3E3);return a.h[a.g++]}Br.prototype.skip=function(a){if(this.g+a>this.h.length)throw new Q(2,2,3E3);this.g+=a};function Dr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
788
+ function Er(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Cr(b).value;b=null;c=u(Fr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=nr(e,d,a.i)),jr(e);return b}if(137===c)for(b=Cr(b).value,b=u(Fr(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Cr(b).value;b=null;c=u(Fr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=nr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Cr(b).value;
789
+ b=null;c=u(Fr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=nr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Cr(b).value,Gr(a,b,d);if(143===c)return d=Gr(a,255,d),Hr(a),d;if(144===c)b.skip(1),d=Cr(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Cr(b).value,c=Cr(b).value,b.skip(1),a.g&&(b=Ir((c&48)>>4,(c&12)>>2,c&3),a.g.B=Ir((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Cr(b).value,b=Cr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
790
+ b.skip(1),d=Cr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new hr(c,a.i);f.j=d;a.h[c]=f}d=Cr(b).value;f=Cr(b).value;var g=Cr(b).value,h=Cr(b).value,k=Cr(b).value;b=Cr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
791
+ function Fr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Gr(a,b,c){var d=null;b=u(Fr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=nr(f,c,a.i));a.h[e]=null}return d}function Hr(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Ir(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Jr[a<<2|b<<1|c]}
792
+ var Kr=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Jr="black blue green cyan red magenta yellow white".split(" ");function Lr(){this.h=[];this.g=[];this.i=new zr;this.l=0;this.m=new Map([["CC1",new Yq(0,0)],["CC2",new Yq(0,1)],["CC3",new Yq(1,0)],["CC4",new Yq(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Mr(this)}Lr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Mr(this);a=u(this.j.values());for(var b=a.next();!b.done;b=a.next())Hr(b.value)};
793
+ function Mr(a){a.o=0;a.s=0;for(var b=u(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Zq,c.g=c.j,c.m=null,Kq(c.i),Kq(c.j),Kq(c.o);a.B=!0}
794
+ Lr.prototype.extract=function(a,b){if(this.B){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new yg(a,0);if(!(8>a.getLength())&&181===a.P()&&49===a.ra()&&1195456820===a.M()&&3===a.P()&&(c=a.P(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.P(),f=(e&4)>>2,g=a.P(),h=a.P();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Ua:g,vb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
795
+ Lr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=u(this.h),d=c.next();!d.done;d=c.next())(d=Nr(this,d.value))&&b.push(d);c=u(this.g);for(d=c.next();!d.done;d=c.next())Ar(this.i,d.value);c=u(this.i.i);for(d=c.next();!d.done;d=c.next())d=Or(this,d.value),b.push.apply(b,y(d));this.i.i=[];this.h=[];this.g=[];return b};
796
+ function Nr(a,b){var c=b.type;if(16===(b.Ua&112)){var d=b.Ua>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Ua&&255===b.vb||!b.Ua&&!b.vb||!Pr(b.Ua)||!Pr(b.vb))return 45<=++a.l&&Mr(a),null;a.l=0;b.Ua&=127;b.vb&=127;var e=b.Ua;if(1<=e&&15>=e||!b.Ua&&!b.vb)return null;e=null;if(16===(b.Ua&112))a:{a.A.add(d),d=b.Ua;a=b.vb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
797
+ "white";e=!1;7>f?d=gr[f]:7===f&&(e=!0);a=1===(a&1);c.h!==br&&(f=c.g,c.h===ar&&b!==f.g&&(c=1+b-f.h,Xq(f,c,1+f.g-f.h,f.h),Nq(f,0,c-1),Nq(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Oq(c.g,Pq,32),d=!1,b=gr[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=fr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Oq(c.g,
798
+ Rq,a);else if(18===(d&246)&&32===(a&224))Oq(c.g,d&1?Vq:Tq,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.vb){case 32:cr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=$q(c,2,a);break;case 38:d=$q(c,3,a);break;case 39:d=$q(c,4,a);break;case 40:Oq(c.g,Pq,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Kq(c.o);er(c);break;case 43:er(c);break;case 44:b=c.i;d=null;c.h!==br&&(d=Lq(b,c.l,a));Nq(b,0,15);break;case 45:b=c.g;c.h!==ar?d=null:(d=Lq(b,c.l,a),e=b.g-b.h+1,Xq(b,
799
+ e-1,e,b.h),Nq(b,0,e-1),Nq(b,b.g,15-b.g),c.l=a);break;case 46:Nq(c.j,0,15);break;case 47:b=null,c.h!==br&&(b=Lq(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,cr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.vb,Oq(c.g,Pq,b.Ua),Oq(c.g,Pq,a);return e}
800
+ function Or(a,b){var c=[];try{for(;b.ka();){var d=Cr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Cr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Dr(e));for(var g=a.j.get(e),h=b.wa();b.wa()-h<f;){e=b;var k=Cr(e),l=k.value,m=k.pts;if(16===l){var n=Cr(e);l=l<<16|n.value}if(0<=l&&31>=l){var q=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!mr(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=nr(p,q,g.i));if(p.h+1>=p.o){q=p;for(var t=
801
+ 0,w=1;16>w;w++,t++)q.i[t]=q.i[w];for(w=0;1>w;w++,t++)q.i[t]=kr()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=nr(p,q,g.i));p.i[p.h]=kr();p.g=0;break;case 12:p.isVisible()&&(e=nr(p,q,g.i)),jr(p),q=p,q.h=0,q.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Er(g,e,l,m);else{if(4096<=l&&4127>=l)q=l&255,8<=q&&15>=q?e.skip(1):16<=q&&23>=q?e.skip(2):24<=q&&31>=q&&e.skip(3);else if(4224<=l&&4255>=l)q=l&255,128<=q&&135>=q?e.skip(4):136<=q&&143>=q&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?lr(g.g,
802
+ "\u266a"):lr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&lr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Kr.has(e)){var z=Kr.get(e);lr(g.g,z)}else lr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?lr(g.g,"_"):lr(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(v){if(v instanceof Q&&3E3===v.code)Xa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw v;}return c}function Pr(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
803
+ Lr.prototype.getStreams=function(){return Array.from(this.A)};P("shaka.cea.CeaDecoder",Lr);Ib=function(){return new Lr};function Qr(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(y(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Rr(){this.j=new Map;this.i=this.h=0;this.g=Sr}
804
+ Rr.prototype.init=function(a){function b(f){f=f.name;f in Tr&&(c.g=Tr[f])}var c=this,d=[],e=[];(new Bg).box("moov",Gg).box("mvex",Gg).O("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.M();g=g.M();c.h=f;c.i=g}).box("trak",Gg).O("tkhd",function(f){f=Qi(f.reader,f.version);d.push(f.trackId)}).box("mdia",Gg).O("mdhd",function(f){f=Oi(f.reader,f.version);e.push(f.timescale)}).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
805
+ b).box("dvh1",b).box("dvhe",b).box("encv",Lg).box("sinf",Gg).box("frma",function(f){f=Ri(f.reader).Ea;f in Tr&&(c.g=Tr[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new Q(2,2,2010);this.g==Sr&&Wa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
806
+ Rr.prototype.parse=function(a){var b=this;if(this.g==Sr)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Bg).box("moof",function(l){f=l.start;g=[];Gg(l)}).box("traf",Gg).O("trun",function(l){l=Pi(l.reader,l.version,l.flags);g.push(l)}).O("tfhd",function(l){l=Mi(l.reader,l.flags);d=l.Yf||b.h;e=l.hh||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).O("tfdt",function(l){h=Ni(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Wa("Unable to find base media decode time for CEA captions!"),
807
+ new Q(2,2,2010);Ur(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
808
+ function Ur(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(t){return t.xg});n=[].concat.apply([],y(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].gh);b.ka();){g=b.M();var q=b.P(),p=null;p=!1;h=1;switch(a.g){case Vr:p=q&31;p=6==p;break;case Wr:h=2;b.skip(1);p=q>>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,l<n.length&&(q=n[l].ie||0),q=(c+q)/d,h=u(Qr(b.sb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:q});else try{b.skip(g-h)}catch(t){break}m-=g+4;0==m&&(c=l<n.length?
809
+ c+(n[l].yf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",Rr);var Sr=0,Vr=1,Wr=2,Tr={avc1:Vr,avc3:Vr,hev1:Wr,hvc1:Wr,dvav:Vr,dva1:Vr,dvh1:Wr,dvhe:Wr};Hb["video/mp4"]=function(){return new Rr};function Xr(){this.g=null}Xr.prototype.init=function(){};Xr.prototype.parse=function(a){this.g?this.g.clearData():this.g=new jj;var b=[];a=Ab(a);if(!qj(a))return b;a=this.g.parse(a);var c=a.bd(),d=a.Od();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=u(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=u(Qr(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
810
+ P("shaka.cea.TsCeaParser",Xr);Hb["video/mp2t"]=function(){return new Xr};function Yr(a,b,c){var d=Zr(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new Q(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Dc});if(1<f.length)throw new Q(2,4,4050);f.length&&(g=$r(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Dc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Dc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
811
+ l.Dc});f.length&&(a=as(e,k,f,c,h),0==a.length&&(a=[Fd("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=u(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Fd(c,k,e));if(h=Array.from(h)[0]||null)for(k=u(a),b=k.next();!b.done;b=k.next())for(b=u(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Xf:h,Dj:e,drmInfos:a,ye:g,ag:!0}}
812
+ function bs(a,b,c,d){var e=Yr(a,c,d);if(b.ag){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.ag=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new Q(2,4,4008);return e.Xf||b.Xf}
813
+ function cs(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function ds(a){a=u($g(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=u(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return Yg(c)}return""}
814
+ function es(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Yg(b)))return b;a=bh(a.node,"urn:microsoft:playready","pro");if(!a||!Yg(a))return"";a=Yg(a);a=wd(a);a=cs(a).filter(function(c){return c.type===fs})[0];if(!a)return"";a=md(a.value,!0);return(a=Rg(a,"WRMHEADER"))?ds(a):""}
815
+ function as(a,b,c,d,e){var f=[];c=u(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Dc];if(h){var k;if((k=bh(g.node,"urn:microsoft:playready","pro"))&&Yg(k)){k=Yg(k);k=wd(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Pg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Dc)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
816
+ 60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Pg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Fd(h,b,g.init||a||k||l);if(h=gs.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Zr(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=hs(c.value))&&b.push(c);return b}
817
+ function hs(a){var b=a.attributes.schemeIdUri,c=eh(a,"urn:mpeg:cenc:2013","default_KID"),d=ch(a,"urn:mpeg:cenc:2013","pssh").map(Zg),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new Q(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:wd(g),keyId:null}})}catch(g){throw new Q(2,4,4007);}return{node:a,Dc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
818
+ function $r(a){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new Q(2,4,4042);var b=bh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new Q(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new Q(2,4,4051);b=bh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new Q(2,4,4051);a=b.attributes.IV;b=sd(b.attributes.keyUriTemplate);
819
819
  if(!a||!b)throw new Q(2,4,4051);a=zd(a.substr(2));if(16!=a.byteLength)throw new Q(2,4,4048);return{Sh:b,iv:a}}
820
- var gs=1,hs=(new Map).set("com.widevine.alpha",function(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Yg(b))?b:(a=bh(a.node,"urn:microsoft","laurl"))?sd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",fs).set("com.microsoft.playready.recommendation",fs).set("com.microsoft.playready.software",fs).set("com.microsoft.playready.hardware",fs).set("org.w3.clearkey",function(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Yg(b))?b:(a=bh(a.node,"http://dashif.org/guidelines/clearKey",
821
- "Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Yg(a))?a:""});function js(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Wa("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
820
+ var fs=1,gs=(new Map).set("com.widevine.alpha",function(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Yg(b))?b:(a=bh(a.node,"urn:microsoft","laurl"))?sd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",es).set("com.microsoft.playready.recommendation",es).set("com.microsoft.playready.software",es).set("com.microsoft.playready.hardware",es).set("org.w3.clearkey",function(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Yg(b))?b:(a=bh(a.node,"http://dashif.org/guidelines/clearKey",
821
+ "Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Yg(a))?a:""});function is(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Wa("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
822
822
  break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
823
- function ks(a,b){var c=ls(a,b,"timescale"),d=1;c&&(d=kh(c)||1);c=ls(a,b,"duration");(c=kh(c||""))&&(c/=d);var e=ls(a,b,"startNumber"),f=Number(ls(a,b,"presentationTimeOffset"))||0,g=lh(e||"");if(null==e||null==g)g=1;var h=ms(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ha.duration||Infinity;e=g;h=Xg(h,"S");for(var k=[],l=-f,m=0;m<h.length;++m){var n=h[m],q=h[m+1],p=dh(n,"t",lh),t=dh(n,"d",lh),w=dh(n,"r",jh);n=dh(n,"k",jh)||0;null!=p&&(p-=f);if(!t)break;p=null!=p?p:l;w=w||0;if(0>w)if(q){q=dh(q,"t",
824
- lh);if(null==q)break;else if(p>=q)break;w=Math.ceil((q-p)/t)-1}else{if(Infinity==a)break;else if(p/b>=a)break;w=Math.ceil((a*b-p)/t)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=w;++q)l=p+t,k.push({start:p/b,end:l/b,Mf:p,rb:n,si:k.length+e}),p=l}b=k}return{timescale:d,Da:c,rd:g,Bb:f/d||0,Lf:f,timeline:b}}function ns(a,b){return[b(a.J),b(a.ua),b(a.za)].filter(pe)}function ls(a,b,c){b=ns(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
825
- function ms(a,b,c){b=ns(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=ah(d.value,c));d=b.next());return a}
826
- function os(a,b,c,d,e,f){for(var g=eh(a,"http://www.w3.org/1999/xlink","href"),h=eh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=u(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Tg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Vf(new Q(2,4,4028));if("onLoad"!=h)return Vf(new Q(2,4,4027));var q=Cd([d],[g]);return e.request(0,jg(q,b)).va(function(p){p=Qg(p.data,a.tagName);if(!p)return Vf(new Q(2,4,4001,g));for(a.children=
827
- [];p.children.length;){var t=p.children.shift();t.tagName&&(t.parent=a);a.children.push(t)}t=u(Object.keys(p.attributes));for(var w=t.next();!w.done;w=t.next())w=w.value,a.attributes[w]=p.attributes[w];return ps(a,b,c,q[0],e,f+1)})}
828
- function ps(a,b,c,d,e,f){f=void 0===f?0:f;if(eh(a,"http://www.w3.org/1999/xlink","href")){var g=os(a,b,c,d,e,f);c&&(g=g.va(void 0,function(){return ps(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=u(Wg(a)),l=k.next();!l.done;h={pc:h.pc},l=k.next())h.pc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==eh(h.pc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.pc}}(h)):"SegmentTimeline"!=h.pc.tagName&&g.push(ps(h.pc,b,c,d,e,f));return Zf(g).va(function(){return a})}
829
- ;function qs(a,b,c,d,e,f,g){var h,k=(new Bg).O("sidx",function(l){h=rs(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new Q(2,3,3004);}
830
- function rs(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new Q(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Cc(),m=g.reader.Cc();g.reader.skip(2);var n=g.reader.ra();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.M(),p=(q&2147483648)>>>31;q&=2147483647;var t=g.reader.M();g.reader.skip(4);if(1==p)throw new Q(2,3,3006);h.push(new xi(l/k+c,(l+t)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=t;a+=q}g.parser.stop();return h};function ss(a){this.h=Eb(a);this.g=new yg(this.h,0)}ss.prototype.ka=function(){return this.g.ka()};
831
- function ts(a){var b=us(a);if(7<b.length)throw new Q(2,3,3002);var c=0;b=u(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=us(a);a:{d=u(vs);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();else{if(8==b.length&&b[1]&224)throw new Q(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Eb(a.h,a.g.wa(),b);a.g.skip(b);return new ws(c,
832
- d)}function us(a){var b=a.g.wa(),c=a.g.P();if(0==c)throw new Q(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ab(a.h,b,c)}var vs=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function ws(a,b){this.id=a;this.g=b}
833
- function xs(a){if(8<a.g.byteLength)throw new Q(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new Q(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function ys(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ss(a.g);for(var n=null,q=null;a.ka();){var p=ts(a);if(187==p.id){var t=zs(p);t&&(p=c*t.Ei,t=b+t.hi,null!=n&&m.push(new xi(n+g,p+g,l,q,t-1,f,g,h,k)),n=p,q=t)}}null!=n&&m.push(new xi(n+g,d+g,l,q,null,f,g,h,k));return m}
834
- function zs(a){var b=new ss(a.g);a=ts(b);if(179!=a.id)throw new Q(2,3,3013);a=xs(a);b=ts(b);if(183!=b.id)throw new Q(2,3,3012);b=new ss(b.g);for(var c=0;b.ka();){var d=ts(b);if(241==d.id){c=xs(d);break}}return{Ei:a,hi:c}};function As(a,b,c){b=ms(a,b,"Initialization");if(!b)return null;var d=a.J.nb(),e=b.attributes.sourceURL;e&&(d=Cd(d,[sd(e)]));e=0;var f=null;if(b=dh(b,"range",ih))e=b.start,f=b.end;c=new vi(function(){return d},e,f,Bs(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
835
- function Cs(a,b,c){var d=Number(ls(a,Ds,"presentationTimeOffset"))||0,e=ls(a,Ds,"timescale"),f=1;e&&(f=kh(e)||1);var g=d/f||0,h=As(a,Ds,c);Es(a,h);var k=Be(a);return{vc:function(){var l=ms(k,Ds,"RepresentationIndex");var m=k.J.nb();l&&(l=sd(l.attributes.sourceURL))&&(m=Cd(m,[l]));l=Fs(k);return Gs(k,b,h,m,l.start,l.end,g)}}}
836
- function Gs(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I;return L(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Fb||!a.ha.Ze,l=a.ha.start,m=a.ha.duration,n=a.J.mimeType.split("/")[1],q=b,p=null,t=[q(d,e,f,!1),"webm"==n?q(c.$(),c.Aa,c.ja,!0):null],q=null,C(E,Promise.all(t),2);w=E.h;x=w[0];z=w[1]||null;v=null;B=l-g;A=l;D=m?l+m:Infinity;if("mp4"==n)var G=qs(x,e,d,c,B,A,D);else{G=new ss(z);if(440786851!=ts(G).id)throw new Q(2,3,3008);var K=ts(G);if(408125543!=K.id)throw new Q(2,
837
- 3,3009);G=K.g.byteOffset;K=new ss(K.g);for(var M=null;K.ka();){var O=ts(K);if(357149030==O.id){M=O;break}}if(!M)throw new Q(2,3,3010);M=new ss(M.g);O=1E6;for(K=null;M.ka();){var N=ts(M);if(2807729==N.id)O=xs(N);else if(17545==N.id)if(4==N.g.byteLength)K=N.g.getFloat32(0);else if(8==N.g.byteLength)K=N.g.getFloat64(0);else throw new Q(2,3,3003);}if(null==K)throw new Q(2,3,3011);M=O/1E9;K*=M;O=ts(new ss(x));if(475249515!=O.id)throw new Q(2,3,3007);G=ys(O,G,M,K,d,c,B,A,D)}v=G;H=u(v);for(J=H.next();!J.done;J=
838
- H.next())I=J.value,I.codecs=a.J.codecs,I.mimeType=a.J.mimeType;h.ld(v);p=new Fk(v);k&&p.sc(A,D,!0);return E.return(p)})}function Ds(a){return a.pd}function Fs(a){var b=ms(a,Ds,"RepresentationIndex");a=ls(a,Ds,"indexRange");a=ih(a||"");b&&(a=dh(b,"range",ih,a));return a}function Es(a,b){Hs(a,b);if(!Fs(a))throw new Q(2,4,4002);}function Hs(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Kd&&"mp4"!=c&&"webm"!=c)throw new Q(2,4,4006);if("webm"==c&&!b)throw new Q(2,4,4005);}
839
- function Bs(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.ee,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Is(a,b,c){var d=As(a,Js,c),e=Ks(a);if(!e.Da&&!e.timeline&&1<e.yc.length)throw new Q(2,4,4002);if(!e.Da&&!a.ha.duration&&!e.timeline&&1==e.yc.length)throw new Q(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new Q(2,4,4002);var f=null,g=null;a.za.id&&a.J.id&&(g=b[a.za.id+","+a.J.id])&&(f=g.segmentIndex);var h=Ls(a.ha.start,a.ha.duration,a.J.nb,e,d,c,a.J.mimeType,a.J.codecs);b=!f;f?f.kd(h,a.presentationTimeline.qb()):f=new Fk(h);a.presentationTimeline.ld(h);a.Fb&&a.ha.Ze||f.sc(a.ha.start,
840
- a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{vc:function(){f&&0!=f.getNumReferences()||f.ae(h);return Promise.resolve(f)}}}function Js(a){return a.Kb}function Ks(a){var b=Ms(a);a=ks(a,Js);var c=a.rd;0==c&&(c=1);var d=0;a.Da?d=a.Da*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Da:a.Da,startTime:d,rd:c,Bb:a.Bb,timeline:a.timeline,yc:b}}
841
- function Ls(a,b,c,d,e,f,g,h){var k=d.yc.length;d.timeline&&d.timeline.length!=d.yc.length&&(k=Math.min(d.timeline.length,d.yc.length));for(var l=a-d.Bb,m=b?a+b:Infinity,n=[],q=d.startTime,p={},t=0;t<k;p={Sc:p.Sc,Oc:p.Oc},t++){p.Oc=d.yc[t];var w=q;q=void 0;q=null!=d.Da?w+d.Da:d.timeline?d.timeline[t].end:w+b;p.Sc=null;w=new xi(a+w,a+q,function(x){return function(){null==x.Sc&&(x.Sc=Cd(c(),[x.Oc.Yh]));return x.Sc}}(p),p.Oc.start,p.Oc.end,e,l,a,m,[],"",null,null,yi,f);w.codecs=h;w.mimeType=g;n.push(w)}return n}
842
- function Ms(a){return[a.J.Kb,a.ua.Kb,a.za.Kb].filter(pe).map(function(b){return Xg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.kg&&(a.kg=!0);var c=sd(b.attributes.media);b=dh(b,"mediaRange",ih,{start:0,end:null});return{Yh:c,start:b.start,end:b.end}})};function Ns(a,b,c,d,e,f,g,h){var k=Os(a,g),l=Ps(a);Qs(l);var m=Be(a);if(l.hd)return Hs(a,k),{vc:function(){var w=js(l.hd,m.J.id,null,null,m.bandwidth||null,null);w=Cd(m.J.nb(),[w]);return Gs(m,b,k,w,0,null,l.Bb)}};if(l.Da)return d||"image"===a.ua.contentType||(a.presentationTimeline.hf(l.Da),a.presentationTimeline.de(a.ha.start)),{vc:function(){return Rs(m,l,e,k,f,g,h)}};var n=null;d=d=null;a.za.id&&a.J.id&&(d=a.za.id+","+a.J.id,d=c[d])&&(n=d.segmentIndex);var q=a.ha.start,p=a.ha.duration?q+a.ha.duration:
843
- Infinity,t=!(a.Fb&&a.ha.Ze);n?(c=n,Ss(c,l,q,p,t,k),c.La(a.presentationTimeline.qb())):n=new Ts(l,a.J.id,a.bandwidth,a.J.nb,q,p,k,t,g,a.J.zf);l.timeline&&"image"!==a.ua.contentType&&a.presentationTimeline.sg(l.timeline,q);d&&a.Fb&&(d.segmentIndex=n);return{vc:function(){n instanceof Ts&&0==n.getNumReferences()&&Ss(n,l,q,p,t,k);return Promise.resolve(n)}}}function Us(a){return a.qd}
844
- function Ps(a){var b=ks(a,Us),c=ls(a,Us,"media"),d=ls(a,Us,"index");return{Da:b.Da,timescale:b.timescale,rd:b.rd,Bb:b.Bb,Lf:b.Lf,timeline:b.timeline,zc:c&&sd(c),hd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function Qs(a){var b=a.hd?1:0;b+=a.timeline?1:0;b+=a.Da?1:0;if(0==b)throw new Q(2,4,4002);1!=b&&(a.hd&&(a.timeline=null),a.Da=null);if(!a.hd&&!a.zc)throw new Q(2,4,4002);}
845
- function Rs(a,b,c,d,e,f,g){function h(K){var M=(K-w)*t,O=M+b.Bb,N=M+n;M=N+t;var R=Math.min(M,l());N=new xi(N,R,function(){var S=O*x;"BigInt"in window&&S>Number.MAX_SAFE_INTEGER&&(S=BigInt(O)*BigInt(x));S=js(z,B,K,null,v,S);return Cd(A(),[S])},0,null,d,D,n,l(),[],"",null,null,yi,f);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.i=M;return N}function k(){var K=[Math.max(m.qb(),n),Math.min(m.Hb(),l())].map(function(M){return M-n});K=[Math.ceil(K[0]/t),Math.ceil(K[1]/t)-1];a.J.Eb&&K[1]++;return K.map(function(M){return M+
846
- w})}function l(){var K=null!=q&&e[q]||p;return K?n+K:Infinity}var m=a.presentationTimeline,n=a.ha.start,q=a.za.id,p=a.ha.duration,t=b.Da,w=b.rd,x=b.timescale,z=b.zc,v=a.bandwidth||null,B=a.J.id,A=a.J.nb,D=n-b.Bb,H=k();c=a.Fb?Math.max(H[0],H[1]-c+1):H[0];g=g||H[1];H=[];for(var J=c;J<=g;++J){var I=h(J);H.push(I)}var E=new Fk(H);H=m.Hb()<l();J=m.R();if(H||J){var G=Math.max(c,g+1);c=t;a.J.Eb&&(c=.1);E.le(c,function(){var K=m.qb();E.La(K);var M=u(k());M.next();M=M.next().value;for(var O=[];G<=M;){var N=
847
- h(G);O.push(N);G++}return K>l()&&!O.length?null:O})}return Promise.resolve(E)}function Os(a,b){var c=ls(a,Us,"initialization");if(!c)return null;c=sd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.nb;b=new vi(function(){var g=js(c,d,null,null,e,null);return Cd(f(),[g])},0,null,Bs(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}function Ts(a,b,c,d,e,f,g,h,k,l){Fk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.i=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&Vs(this)}na(Ts,Fk);r=Ts.prototype;
848
- r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Fk.prototype.release.call(this);this.h=null};r.La=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.getNumReferences()&&this.release())}};
849
- function Ss(a,b,c,d,e,f){Ws(a,f);if(a.h){c=a.h.timeline;a.h.zc=b.zc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,y(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&Vs(a)}function Ws(a,b){if(a.s!==b){a.s=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ai(c,b)}}function Vs(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.La(a.i)}}
823
+ function js(a,b){var c=ks(a,b,"timescale"),d=1;c&&(d=kh(c)||1);c=ks(a,b,"duration");(c=kh(c||""))&&(c/=d);var e=ks(a,b,"startNumber"),f=Number(ks(a,b,"presentationTimeOffset"))||0,g=lh(e||"");if(null==e||null==g)g=1;var h=ls(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ha.duration||Infinity;e=g;h=Xg(h,"S");for(var k=[],l=-f,m=0;m<h.length;++m){var n=h[m],q=h[m+1],p=dh(n,"t",lh),t=dh(n,"d",lh),w=dh(n,"r",jh);n=dh(n,"k",jh)||0;null!=p&&(p-=f);if(!t)break;p=null!=p?p:l;w=w||0;if(0>w)if(q){q=dh(q,"t",
824
+ lh);if(null==q)break;else if(p>=q)break;w=Math.ceil((q-p)/t)-1}else{if(Infinity==a)break;else if(p/b>=a)break;w=Math.ceil((a*b-p)/t)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=w;++q)l=p+t,k.push({start:p/b,end:l/b,Mf:p,rb:n,si:k.length+e}),p=l}b=k}return{timescale:d,Da:c,rd:g,Bb:f/d||0,Lf:f,timeline:b}}function ms(a,b){return[b(a.J),b(a.ua),b(a.za)].filter(pe)}function ks(a,b,c){b=ms(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
825
+ function ls(a,b,c){b=ms(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=ah(d.value,c));d=b.next());return a}
826
+ function ns(a,b,c,d,e,f){for(var g=eh(a,"http://www.w3.org/1999/xlink","href"),h=eh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=u(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Tg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Vf(new Q(2,4,4028));if("onLoad"!=h)return Vf(new Q(2,4,4027));var q=Cd([d],[g]);return e.request(0,jg(q,b)).va(function(p){p=Qg(p.data,a.tagName);if(!p)return Vf(new Q(2,4,4001,g));for(a.children=
827
+ [];p.children.length;){var t=p.children.shift();t.tagName&&(t.parent=a);a.children.push(t)}t=u(Object.keys(p.attributes));for(var w=t.next();!w.done;w=t.next())w=w.value,a.attributes[w]=p.attributes[w];return os(a,b,c,q[0],e,f+1)})}
828
+ function os(a,b,c,d,e,f){f=void 0===f?0:f;if(eh(a,"http://www.w3.org/1999/xlink","href")){var g=ns(a,b,c,d,e,f);c&&(g=g.va(void 0,function(){return os(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=u(Wg(a)),l=k.next();!l.done;h={pc:h.pc},l=k.next())h.pc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==eh(h.pc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.pc}}(h)):"SegmentTimeline"!=h.pc.tagName&&g.push(os(h.pc,b,c,d,e,f));return Zf(g).va(function(){return a})}
829
+ ;function ps(a,b,c,d,e,f,g){var h,k=(new Bg).O("sidx",function(l){h=qs(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new Q(2,3,3004);}
830
+ function qs(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new Q(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Cc(),m=g.reader.Cc();g.reader.skip(2);var n=g.reader.ra();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.M(),p=(q&2147483648)>>>31;q&=2147483647;var t=g.reader.M();g.reader.skip(4);if(1==p)throw new Q(2,3,3006);h.push(new wi(l/k+c,(l+t)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=t;a+=q}g.parser.stop();return h};function rs(a){this.h=Eb(a);this.g=new yg(this.h,0)}rs.prototype.ka=function(){return this.g.ka()};
831
+ function ss(a){var b=ts(a);if(7<b.length)throw new Q(2,3,3002);var c=0;b=u(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=ts(a);a:{d=u(us);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();else{if(8==b.length&&b[1]&224)throw new Q(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Eb(a.h,a.g.wa(),b);a.g.skip(b);return new vs(c,
832
+ d)}function ts(a){var b=a.g.wa(),c=a.g.P();if(0==c)throw new Q(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ab(a.h,b,c)}var us=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function vs(a,b){this.id=a;this.g=b}
833
+ function ws(a){if(8<a.g.byteLength)throw new Q(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new Q(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function xs(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new rs(a.g);for(var n=null,q=null;a.ka();){var p=ss(a);if(187==p.id){var t=ys(p);t&&(p=c*t.Ei,t=b+t.hi,null!=n&&m.push(new wi(n+g,p+g,l,q,t-1,f,g,h,k)),n=p,q=t)}}null!=n&&m.push(new wi(n+g,d+g,l,q,null,f,g,h,k));return m}
834
+ function ys(a){var b=new rs(a.g);a=ss(b);if(179!=a.id)throw new Q(2,3,3013);a=ws(a);b=ss(b);if(183!=b.id)throw new Q(2,3,3012);b=new rs(b.g);for(var c=0;b.ka();){var d=ss(b);if(241==d.id){c=ws(d);break}}return{Ei:a,hi:c}};function zs(a,b,c){b=ls(a,b,"Initialization");if(!b)return null;var d=a.J.nb(),e=b.attributes.sourceURL;e&&(d=Cd(d,[sd(e)]));e=0;var f=null;if(b=dh(b,"range",ih))e=b.start,f=b.end;c=new ri(function(){return d},e,f,As(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
835
+ function Bs(a,b,c){var d=Number(ks(a,Cs,"presentationTimeOffset"))||0,e=ks(a,Cs,"timescale"),f=1;e&&(f=kh(e)||1);var g=d/f||0,h=zs(a,Cs,c);Ds(a,h);var k=Be(a);return{vc:function(){var l=ls(k,Cs,"RepresentationIndex");var m=k.J.nb();l&&(l=sd(l.attributes.sourceURL))&&(m=Cd(m,[l]));l=Es(k);return Fs(k,b,h,m,l.start,l.end,g)}}}
836
+ function Fs(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I;return L(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Fb||!a.ha.Ze,l=a.ha.start,m=a.ha.duration,n=a.J.mimeType.split("/")[1],q=b,p=null,t=[q(d,e,f,!1),"webm"==n?q(c.$(),c.Aa,c.ja,!0):null],q=null,C(E,Promise.all(t),2);w=E.h;x=w[0];z=w[1]||null;v=null;B=l-g;A=l;D=m?l+m:Infinity;if("mp4"==n)var G=ps(x,e,d,c,B,A,D);else{G=new rs(z);if(440786851!=ss(G).id)throw new Q(2,3,3008);var K=ss(G);if(408125543!=K.id)throw new Q(2,
837
+ 3,3009);G=K.g.byteOffset;K=new rs(K.g);for(var M=null;K.ka();){var O=ss(K);if(357149030==O.id){M=O;break}}if(!M)throw new Q(2,3,3010);M=new rs(M.g);O=1E6;for(K=null;M.ka();){var N=ss(M);if(2807729==N.id)O=ws(N);else if(17545==N.id)if(4==N.g.byteLength)K=N.g.getFloat32(0);else if(8==N.g.byteLength)K=N.g.getFloat64(0);else throw new Q(2,3,3003);}if(null==K)throw new Q(2,3,3011);M=O/1E9;K*=M;O=ss(new rs(x));if(475249515!=O.id)throw new Q(2,3,3007);G=xs(O,G,M,K,d,c,B,A,D)}v=G;H=u(v);for(J=H.next();!J.done;J=
838
+ H.next())I=J.value,I.codecs=a.J.codecs,I.mimeType=a.J.mimeType;h.ld(v);p=new Ek(v);k&&p.sc(A,D,!0);return E.return(p)})}function Cs(a){return a.pd}function Es(a){var b=ls(a,Cs,"RepresentationIndex");a=ks(a,Cs,"indexRange");a=ih(a||"");b&&(a=dh(b,"range",ih,a));return a}function Ds(a,b){Gs(a,b);if(!Es(a))throw new Q(2,4,4002);}function Gs(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Kd&&"mp4"!=c&&"webm"!=c)throw new Q(2,4,4006);if("webm"==c&&!b)throw new Q(2,4,4005);}
839
+ function As(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.ee,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Hs(a,b,c){var d=zs(a,Is,c),e=Js(a);if(!e.Da&&!e.timeline&&1<e.yc.length)throw new Q(2,4,4002);if(!e.Da&&!a.ha.duration&&!e.timeline&&1==e.yc.length)throw new Q(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new Q(2,4,4002);var f=null,g=null;a.za.id&&a.J.id&&(g=b[a.za.id+","+a.J.id])&&(f=g.segmentIndex);var h=Ks(a.ha.start,a.ha.duration,a.J.nb,e,d,c,a.J.mimeType,a.J.codecs);b=!f;f?f.kd(h,a.presentationTimeline.qb()):f=new Ek(h);a.presentationTimeline.ld(h);a.Fb&&a.ha.Ze||f.sc(a.ha.start,
840
+ a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{vc:function(){f&&0!=f.getNumReferences()||f.ae(h);return Promise.resolve(f)}}}function Is(a){return a.Kb}function Js(a){var b=Ls(a);a=js(a,Is);var c=a.rd;0==c&&(c=1);var d=0;a.Da?d=a.Da*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Da:a.Da,startTime:d,rd:c,Bb:a.Bb,timeline:a.timeline,yc:b}}
841
+ function Ks(a,b,c,d,e,f,g,h){var k=d.yc.length;d.timeline&&d.timeline.length!=d.yc.length&&(k=Math.min(d.timeline.length,d.yc.length));for(var l=a-d.Bb,m=b?a+b:Infinity,n=[],q=d.startTime,p={},t=0;t<k;p={Sc:p.Sc,Oc:p.Oc},t++){p.Oc=d.yc[t];var w=q;q=void 0;q=null!=d.Da?w+d.Da:d.timeline?d.timeline[t].end:w+b;p.Sc=null;w=new wi(a+w,a+q,function(x){return function(){null==x.Sc&&(x.Sc=Cd(c(),[x.Oc.Yh]));return x.Sc}}(p),p.Oc.start,p.Oc.end,e,l,a,m,[],"",null,null,xi,f);w.codecs=h;w.mimeType=g;n.push(w)}return n}
842
+ function Ls(a){return[a.J.Kb,a.ua.Kb,a.za.Kb].filter(pe).map(function(b){return Xg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.kg&&(a.kg=!0);var c=sd(b.attributes.media);b=dh(b,"mediaRange",ih,{start:0,end:null});return{Yh:c,start:b.start,end:b.end}})};function Ms(a,b,c,d,e,f,g,h){var k=Ns(a,g),l=Os(a);Ps(l);var m=Be(a);if(l.hd)return Gs(a,k),{vc:function(){var w=is(l.hd,m.J.id,null,null,m.bandwidth||null,null);w=Cd(m.J.nb(),[w]);return Fs(m,b,k,w,0,null,l.Bb)}};if(l.Da)return d||"image"===a.ua.contentType||(a.presentationTimeline.hf(l.Da),a.presentationTimeline.de(a.ha.start)),{vc:function(){return Qs(m,l,e,k,f,g,h)}};var n=null;d=d=null;a.za.id&&a.J.id&&(d=a.za.id+","+a.J.id,d=c[d])&&(n=d.segmentIndex);var q=a.ha.start,p=a.ha.duration?q+a.ha.duration:
843
+ Infinity,t=!(a.Fb&&a.ha.Ze);n?(c=n,Rs(c,l,q,p,t,k),c.La(a.presentationTimeline.qb())):n=new Ss(l,a.J.id,a.bandwidth,a.J.nb,q,p,k,t,g,a.J.zf);l.timeline&&"image"!==a.ua.contentType&&a.presentationTimeline.sg(l.timeline,q);d&&a.Fb&&(d.segmentIndex=n);return{vc:function(){n instanceof Ss&&0==n.getNumReferences()&&Rs(n,l,q,p,t,k);return Promise.resolve(n)}}}function Ts(a){return a.qd}
844
+ function Os(a){var b=js(a,Ts),c=ks(a,Ts,"media"),d=ks(a,Ts,"index");return{Da:b.Da,timescale:b.timescale,rd:b.rd,Bb:b.Bb,Lf:b.Lf,timeline:b.timeline,zc:c&&sd(c),hd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function Ps(a){var b=a.hd?1:0;b+=a.timeline?1:0;b+=a.Da?1:0;if(0==b)throw new Q(2,4,4002);1!=b&&(a.hd&&(a.timeline=null),a.Da=null);if(!a.hd&&!a.zc)throw new Q(2,4,4002);}
845
+ function Qs(a,b,c,d,e,f,g){function h(K){var M=(K-w)*t,O=M+b.Bb,N=M+n;M=N+t;var R=Math.min(M,l());N=new wi(N,R,function(){var S=O*x;"BigInt"in window&&S>Number.MAX_SAFE_INTEGER&&(S=BigInt(O)*BigInt(x));S=is(z,B,K,null,v,S);return Cd(A(),[S])},0,null,d,D,n,l(),[],"",null,null,xi,f);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.i=M;return N}function k(){var K=[Math.max(m.qb(),n),Math.min(m.Hb(),l())].map(function(M){return M-n});K=[Math.ceil(K[0]/t),Math.ceil(K[1]/t)-1];a.J.Eb&&K[1]++;return K.map(function(M){return M+
846
+ w})}function l(){var K=null!=q&&e[q]||p;return K?n+K:Infinity}var m=a.presentationTimeline,n=a.ha.start,q=a.za.id,p=a.ha.duration,t=b.Da,w=b.rd,x=b.timescale,z=b.zc,v=a.bandwidth||null,B=a.J.id,A=a.J.nb,D=n-b.Bb,H=k();c=a.Fb?Math.max(H[0],H[1]-c+1):H[0];g=g||H[1];H=[];for(var J=c;J<=g;++J){var I=h(J);H.push(I)}var E=new Ek(H);H=m.Hb()<l();J=m.R();if(H||J){var G=Math.max(c,g+1);c=t;a.J.Eb&&(c=.1);E.le(c,function(){var K=m.qb();E.La(K);var M=u(k());M.next();M=M.next().value;for(var O=[];G<=M;){var N=
847
+ h(G);O.push(N);G++}return K>l()&&!O.length?null:O})}return Promise.resolve(E)}function Ns(a,b){var c=ks(a,Ts,"initialization");if(!c)return null;c=sd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.nb;b=new ri(function(){var g=is(c,d,null,null,e,null);return Cd(f(),[g])},0,null,As(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}function Ss(a,b,c,d,e,f,g,h,k,l){Ek.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.i=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&Us(this)}na(Ss,Ek);r=Ss.prototype;
848
+ r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Ek.prototype.release.call(this);this.h=null};r.La=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.getNumReferences()&&this.release())}};
849
+ function Rs(a,b,c,d,e,f){Vs(a,f);if(a.h){c=a.h.timeline;a.h.zc=b.zc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,y(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&Us(a)}function Vs(a,b){if(a.s!==b){a.s=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&zi(c,b)}}function Us(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.La(a.i)}}
850
850
  r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
851
- r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.zc,e=this.h.timeline[a],f=e.si,g=this.h.Lf+e.Mf;c=this.i-this.h.Bb;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],q=(e.end-e.start)/e.rb,p={},t=0;t<e.rb;p={Tc:p.Tc,te:p.te},t++){var w=e.start+q*t,x=w+q;p.te=t+1;p.Tc=null;w=new xi(this.i+w,this.i+x,function(z){return function(){if(!b.h)return[];
852
- null==z.Tc&&(z.Tc=Xs(b.h.zc,b.F,f,b.B,g,z.te,b.C));return z.Tc}}(p),0,null,this.s,c,this.i,this.l,[],"",null,null,yi,this.A);w.codecs=l;w.mimeType=m;0==this.G?0<t&&w.Zd():0!=t%this.G&&w.Zd();n.push(w)}c=new xi(this.i+e.start,k,function(){return 0<e.rb?[]:Xs(d,b.F,f,b.B,g,null,b.C)},0,null,this.s,c,this.i,this.l,n,"",null,null,yi,this.A,0<e.rb);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
853
- function Xs(a,b,c,d,e,f,g){a=js(a,b,c,f,d||null,e);return Cd(g(),[a]).map(function(h){return h.toString()})};function Ys(a){this.o=null;this.A=a;this.G=new dg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}Ys.prototype.configure=function(a){this.o=a};Ys.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Ys.prototype.setManifestType=function(a){this.s=a};
854
- function Zs(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Cd(a.i,[$s(a,b)]),d=jg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),eg(a.G,e),ra(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=jd(f.data),h=JSON.parse(g),1==h.VERSION&&at(a,h,f.uri),ta(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Mc(function(){Zs(a,b)});a.g.U(a.C);F(l)})}
855
- function $s(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function at(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Mc(function(){Zs(a,d)});if(c=b.TTL)a.C=c;a.g.U(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
856
- function bt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Ys.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
857
- function ct(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=u(a.m),g=f.next();!g.done;e={Qb:e.Qb},g=f.next())if(e.Qb=g.value,g=b.get(e.Qb))d.push({rf:e.Qb,location:g});else if(g=a.F.find(function(k){return function(l){return l.Wi==k.Qb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Pg?(h=new rc(h),tc(h,g["URI-REPLACEMENT"].Pg),d.push({rf:e.Qb,location:h.toString()})):d.push({rf:e.Qb,location:h}))}e=Date.now();f=u(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
858
- h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new rc(k.location)).wb))return!1;return!0});d.length&&(a.B=d[0].rf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.B=a.h,d.push(f);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Cd(a.i,d)};function dt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.o=this.m=!1;this.s=new Set}r=dt.prototype;r.release=function(){for(var a=u(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};r.Fh=function(){return this.j};r.We=function(){return this.l.slice()};r.oh=function(){return this.i};
859
- function et(a,b){var c=[],d=[],e=[],f=[];a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[ft(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[gt(n),n]})),l=new Map(h.textStreams.map(function(n){return[ht(n),n]}));h=new Map(h.imageStreams.map(function(n){return[it(n),n]}));if(b){var m=jt(Kd);l.set(ht(m),m);m=jt("image");h.set(it(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Rf:c,Ng:d,Kg:e,jg:f}}
860
- r.Uf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R;return L(function(S){if(1==S.g){d=Md;if(!b&&1==a.length)return e=et(a,!1),f=e.Rf,g=e.Ng,h=e.Kg,k=e.jg,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),S.u(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.s.has(n.id)||(c.s.add(n.id),-1==l&&(l=m));if(-1==l)return S.return();q=et(a,!0);p=q.Rf;t=q.Ng;w=q.Kg;x=q.jg;return C(S,Promise.all([kt(c,c.h,p,l,lt,
861
- mt),kt(c,c.g,t,l,lt,mt),kt(c,c.l,w,l,lt,mt),kt(c,c.i,x,l,lt,mt)]),2)}z=0;v=[];if(c.g.length&&c.h.length)for(I=u(c.h),E=I.next();!E.done;E=I.next())for(G=E.value,K=u(c.g),M=K.next();!M.done;M=K.next())O=M.value,N=ci(G.drmInfos,O.drmInfos),G.drmInfos.length&&O.drmInfos.length&&!N.length||(R=z++,v.push({id:R,language:G.language,disabledUntilTime:0,primary:G.primary,audio:G,video:O,bandwidth:(G.bandwidth||0)+(O.bandwidth||0),drmInfos:N,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));
851
+ r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.zc,e=this.h.timeline[a],f=e.si,g=this.h.Lf+e.Mf;c=this.i-this.h.Bb;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],q=(e.end-e.start)/e.rb,p={},t=0;t<e.rb;p={Tc:p.Tc,te:p.te},t++){var w=e.start+q*t,x=w+q;p.te=t+1;p.Tc=null;w=new wi(this.i+w,this.i+x,function(z){return function(){if(!b.h)return[];
852
+ null==z.Tc&&(z.Tc=Ws(b.h.zc,b.F,f,b.B,g,z.te,b.C));return z.Tc}}(p),0,null,this.s,c,this.i,this.l,[],"",null,null,xi,this.A);w.codecs=l;w.mimeType=m;0==this.G?0<t&&w.Zd():0!=t%this.G&&w.Zd();n.push(w)}c=new wi(this.i+e.start,k,function(){return 0<e.rb?[]:Ws(d,b.F,f,b.B,g,null,b.C)},0,null,this.s,c,this.i,this.l,n,"",null,null,xi,this.A,0<e.rb);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
853
+ function Ws(a,b,c,d,e,f,g){a=is(a,b,c,f,d||null,e);return Cd(g(),[a]).map(function(h){return h.toString()})};function Xs(a){this.o=null;this.A=a;this.G=new dg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}Xs.prototype.configure=function(a){this.o=a};Xs.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Xs.prototype.setManifestType=function(a){this.s=a};
854
+ function Ys(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Cd(a.i,[Zs(a,b)]),d=jg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),eg(a.G,e),ra(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=jd(f.data),h=JSON.parse(g),1==h.VERSION&&$s(a,h,f.uri),ta(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Mc(function(){Ys(a,b)});a.g.U(a.C);F(l)})}
855
+ function Zs(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function $s(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Mc(function(){Ys(a,d)});if(c=b.TTL)a.C=c;a.g.U(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
856
+ function at(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Xs.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
857
+ function bt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=u(a.m),g=f.next();!g.done;e={Qb:e.Qb},g=f.next())if(e.Qb=g.value,g=b.get(e.Qb))d.push({rf:e.Qb,location:g});else if(g=a.F.find(function(k){return function(l){return l.Wi==k.Qb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Pg?(h=new rc(h),tc(h,g["URI-REPLACEMENT"].Pg),d.push({rf:e.Qb,location:h.toString()})):d.push({rf:e.Qb,location:h}))}e=Date.now();f=u(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
858
+ h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new rc(k.location)).wb))return!1;return!0});d.length&&(a.B=d[0].rf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.B=a.h,d.push(f);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Cd(a.i,d)};function ct(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.o=this.m=!1;this.s=new Set}r=ct.prototype;r.release=function(){for(var a=u(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};r.Fh=function(){return this.j};r.We=function(){return this.l.slice()};r.oh=function(){return this.i};
859
+ function dt(a,b){var c=[],d=[],e=[],f=[];a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[et(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[ft(n),n]})),l=new Map(h.textStreams.map(function(n){return[gt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[ht(n),n]}));if(b){var m=it(Kd);l.set(gt(m),m);m=it("image");h.set(ht(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Rf:c,Ng:d,Kg:e,jg:f}}
860
+ r.Uf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R;return L(function(S){if(1==S.g){d=Md;if(!b&&1==a.length)return e=dt(a,!1),f=e.Rf,g=e.Ng,h=e.Kg,k=e.jg,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),S.u(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.s.has(n.id)||(c.s.add(n.id),-1==l&&(l=m));if(-1==l)return S.return();q=dt(a,!0);p=q.Rf;t=q.Ng;w=q.Kg;x=q.jg;return C(S,Promise.all([jt(c,c.h,p,l,kt,
861
+ lt),jt(c,c.g,t,l,kt,lt),jt(c,c.l,w,l,kt,lt),jt(c,c.i,x,l,kt,lt)]),2)}z=0;v=[];if(c.g.length&&c.h.length)for(I=u(c.h),E=I.next();!E.done;E=I.next())for(G=E.value,K=u(c.g),M=K.next();!M.done;M=K.next())O=M.value,N=ci(G.drmInfos,O.drmInfos),G.drmInfos.length&&O.drmInfos.length&&!N.length||(R=z++,v.push({id:R,language:G.language,disabledUntilTime:0,primary:G.primary,audio:G,video:O,bandwidth:(G.bandwidth||0)+(O.bandwidth||0),drmInfos:N,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));
862
862
  else for(B=c.g.length?c.g:c.h,A=u(B),D=A.next();!D.done;D=A.next())H=D.value,J=z++,v.push({id:J,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H.type==d.S?H:null,video:H.type==d.fa?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=v;F(S)})};
863
- function nt(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N;return L(function(R){switch(R.g){case 1:b=Md;if(1==a.length)return R.return(a[0]);c=a.map(function(S){return new Map(S.filter(function(V){return V.type===b.S}).map(function(V){return[ft(V),V]}))});d=a.map(function(S){return new Map(S.filter(function(V){return V.type===b.fa}).map(function(V){return[gt(V),V]}))});e=a.map(function(S){return new Map(S.filter(function(V){return V.type===b.ma}).map(function(V){return[ht(V),V]}))});
864
- f=a.map(function(S){return new Map(S.filter(function(V){return V.type===b.ve}).map(function(V){return[it(V),V]}))});g=u(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=ot(b.ma),k.set(ht(l),l);m=u(f);for(n=m.next();!n.done;n=m.next())q=n.value,p=ot(b.ve),q.set(it(p),p);t=new dt;return C(R,kt(t,[],c,0,pt,qt),2);case 2:return w=R.h,C(R,kt(t,[],d,0,pt,qt),3);case 3:return x=R.h,C(R,kt(t,[],e,0,pt,qt),4);case 4:return z=R.h,C(R,kt(t,[],f,0,pt,qt),5);case 5:v=R.h;B=0;if(x.length&&w.length)for(I=u(w),E=
863
+ function mt(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N;return L(function(R){switch(R.g){case 1:b=Md;if(1==a.length)return R.return(a[0]);c=a.map(function(S){return new Map(S.filter(function(V){return V.type===b.S}).map(function(V){return[et(V),V]}))});d=a.map(function(S){return new Map(S.filter(function(V){return V.type===b.fa}).map(function(V){return[ft(V),V]}))});e=a.map(function(S){return new Map(S.filter(function(V){return V.type===b.ma}).map(function(V){return[gt(V),V]}))});
864
+ f=a.map(function(S){return new Map(S.filter(function(V){return V.type===b.ve}).map(function(V){return[ht(V),V]}))});g=u(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=nt(b.ma),k.set(gt(l),l);m=u(f);for(n=m.next();!n.done;n=m.next())q=n.value,p=nt(b.ve),q.set(ht(p),p);t=new ct;return C(R,jt(t,[],c,0,ot,pt),2);case 2:return w=R.h,C(R,jt(t,[],d,0,ot,pt),3);case 3:return x=R.h,C(R,jt(t,[],e,0,ot,pt),4);case 4:return z=R.h,C(R,jt(t,[],f,0,ot,pt),5);case 5:v=R.h;B=0;if(x.length&&w.length)for(I=u(w),E=
865
865
  I.next();!E.done;E=I.next())for(G=E.value,K=u(x),M=K.next();!M.done;M=K.next())O=M.value,N=B++,O.variantIds.push(N),G.variantIds.push(N);else for(A=x.concat(w),D=u(A),H=D.next();!H.done;H=D.next())J=H.value,J.variantIds=[B++];return R.return(x.concat(w).concat(z).concat(v))}})}
866
- function kt(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I;return L(function(E){switch(E.g){case 1:g=[];for(h=0;h<d;h++)g.push(new Set);for(k=d;k<c.length;k++)g.push(new Set(c[k].values()));l=u(b);m=l.next();case 2:if(m.done){E.u(4);break}n=m.value;return C(E,rt(a,n,c,d,f,g),5);case 5:q=E.h;if(!q)throw new Q(2,4,4037);m=l.next();E.u(2);break;case 4:p=u(g);for(t=p.next();!t.done;t=p.next())for(w=t.value,x=u(w),z=x.next();!z.done;z=x.next())v=z.value,(B=st(a,v,c,e,f,g))&&b.push(B);A=u(g);for(t=
867
- A.next();!t.done;t=A.next())for(D=t.value,H={},J=u(D),z=J.next();!z.done;H={Bd:H.Bd},z=J.next())if(H.Bd=z.value,!tt(H.Bd)&&(I=b.some(function(G){return function(K){return ut(a,G.Bd,K)}}(H))))throw new Q(2,4,4037);return E.return(b)}})}function rt(a,b,c,d,e,f){return L(function(g){if(1==g.g)return vt(a,c,b),b.matchedStreams?b.segmentIndex?C(g,wt(b,d),2):g.u(2):g.return(!1);xt(b,d,e,f);return g.return(!0)})}
868
- function wt(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return C(l,Promise.all(c),2)}if(a.segmentIndex instanceof Ik)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);F(l)})}
869
- function st(a,b,c,d,e,f){if(tt(b))return null;var g=d(b);vt(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return L(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Ik;return C(h,wt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;xt(g,0,e,f);return g}
870
- function xt(a,b,c,d){for(var e=a.matchedStreams;b<e.length;b++){var f=e[b];c(a,f);var g=!0;"audio"==a.type&&0==we(a.language,f.language)&&(g=!1);if(g&&(d[b].delete(f),f.fullMimeTypes))for(f=u(f.fullMimeTypes.values()),g=f.next();!g.done;g=f.next())a.fullMimeTypes.add(g.value)}}
871
- function lt(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=u(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
872
- function pt(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
873
- function mt(a,b){function c(g,h){g||(g=[]);h=u(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=u(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=ci(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new Q(2,4,4038);a.drmInfos=
874
- d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=u(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=lt(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),mt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&mt(a.trickModeVideo,
875
- b)}function qt(a,b){var c=a.roles;c||(c=[]);for(var d=u(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=u(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,y(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=u(b.closedCaptions),c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
876
- function vt(a,b,c){var d=[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=yt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
877
- function yt(a,b,c){var d={audio:ft,video:gt,text:ht,image:it}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return ut(a,l,m)},video:function(l,m){return ut(a,l,m)},text:zt,image:At}[c.type];for(var g={audio:Bt,video:Ct,text:Dt,image:Et}[c.type],h=u(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.o&&!tt(e)&&b.delete(d(e));return e}
878
- function Ft(a,b){function c(d){if(!Gt.has(d)){var e=Vd(d);Gt.set(d,e)}return Gt.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}r.Ag=function(a){this.m=a};r.Hg=function(a){this.o=a};function ut(a,b,c){return!Ft(b,c)&&!a.m||b.drmInfos&&!bi(b.drmInfos,c.drmInfos)?!1:!0}function zt(a,b){return b.language?a.forced!==b.forced||0==we(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function At(){return!0}
879
- function Bt(a,b,c){var d=Ft(a,b),e=Ft(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=we(a.language,b.language);e=we(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
880
- if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Ht(a.channelsCount,b.channelsCount,c.channelsCount);if(d==It)return!0;if(d==Jt)return!1;d=Ht(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==It?!0:d==Jt?!1:a.bandwidth&&Kt(a.bandwidth,b.bandwidth,c.bandwidth)==It?!0:!1}
881
- function Ct(a,b,c){var d=Ft(a,b),e=Ft(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Ht(a.width*a.height,b.width*b.height,c.width*c.height);if(d==It)return!0;if(d==Jt)return!1;if(a.frameRate){d=Ht(a.frameRate,b.frameRate,c.frameRate);if(d==It)return!0;if(d==Jt)return!1}return a.bandwidth&&Kt(a.bandwidth,b.bandwidth,c.bandwidth)==It?!0:!1}
882
- function Dt(a,b,c){var d=we(a.language,b.language),e=we(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
883
- if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Et(a,b,c){return Ht(a.width*a.height,b.width*b.height,c.width*c.height)==It?!0:!1}
884
- function ot(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
885
- function jt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
886
- function Ht(a,b,c){if(b==a&&a!=c)return Jt;if(c==a&&a!=b)return It;if(b>a){if(c<=a||c-a<b-a)return It;if(c-a>b-a)return Jt}else{if(c>a)return Jt;if(a-c<a-b)return It;if(a-c>a-b)return Jt}return Lt}function Kt(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?It:b<a?Jt:Lt}function tt(a){switch(a.type){case Kd:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
887
- function gt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function ft(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function ht(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
888
- function it(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}P("shaka.util.PeriodCombiner",dt);dt.prototype.setUseStreamOnce=dt.prototype.Hg;dt.prototype.setAllowMultiTypeVariants=dt.prototype.Ag;dt.prototype.combinePeriods=dt.prototype.Uf;dt.prototype.getImageStreams=dt.prototype.oh;dt.prototype.getTextStreams=dt.prototype.We;dt.prototype.getVariants=dt.prototype.Fh;var It=1,Lt=0,Jt=-1,Gt=new Map;function Mt(a,b){var c=new DOMParser,d=Nt.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Ot(a,b){try{var c=od(a);return Mt(c,b)}catch(d){return null}}
889
- var Nt=new Jc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Pt(){var a=this;this.i=this.g=null;this.o=[];this.j=null;this.I=1;this.m={};this.L={};this.l=new dt;this.G=0;this.H=new Qa(5);this.A=new Mc(function(){Qt(a)});this.F=new dg;this.B=null;this.K=[];this.C=Infinity;this.s=!1;this.h=null}r=Pt.prototype;
890
- r.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.j&&this.j.presentationTimeline.R()&&this.A.kc();this.h&&this.h.configure(this.g);this.l&&(this.l.Ag(this.g.dash.multiTypeVariantsAllowed&&nb()),this.l.Hg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.o=[a],c.i=b,C(e,Rt(c),2);d=e.h;c.i&&St(c,d);if(!c.i)throw new Q(2,7,7001);return e.return(c.j)})};
891
- r.stop=function(){for(var a=u(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.o=[];this.j=null;this.m={};this.l=null;null!=this.A&&(this.A.stop(),this.A=null);this.h&&this.h.destroy();return this.F.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,Rt(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};
892
- r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Hb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.G=b.endTime-a,St(this,0))}}};r.banLocation=function(a){this.h&&this.h.banLocation(a)};
893
- function Rt(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.h&&(c=ct(a.h,"Location",!0),c.length&&(b=c)),d=jg(b,a.g.retryParameters),e=Date.now(),C(k,Tt(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return C(k,Ut(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.H.sample(1,h);return k.return(h)})}
894
- function Ut(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(t){if(1==t.g){d=b;e=a.g.dash.manifestPreprocessor;f=cm;if(e!=f){pb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");g=Ot(d,"MPD");if(!g)throw new Q(2,4,4001,c);e(g);d=pd(g.outerHTML)}h=Qg(d,"MPD");if(!h)throw new Q(2,4,4001,c);k=a.g.dash.manifestPreprocessorTXml;l=dm;k!=l&&k(h);if(m=a.g.dash.disableXlinkProcessing)return t.return(Vt(a,h,c));n=a.g.dash.xlinkFailGracefully;
895
- q=ps(h,a.g.retryParameters,n,c,a.i.networkingEngine);eg(a.F,q);return C(t,q.promise,2)}p=t.h;return t.return(Vt(a,p,c))})}
896
- function Vt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R,S,V,xa,Ca,db,Fa,Va,ua,lb,zb,hb,Za,cf,xd,Zd,kd,Bc,$d,df,ae,yd,si,tg,ti,ui,ef,be,ff;return L(function(Sb){switch(Sb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Xg(b,"Location");h=u(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Zg(l))q=Cd(d,[n])[0],m&&(a.h?bt(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(p=ct(a.h,"Location",!0),0<p.length&&(d=a.o=p)):e.length&&(d=a.o=e);t=Promise.resolve();
897
- if((w=ah(b,"ContentSteering"))&&a.i){x=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=x;else if(a.h=new Ys(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=x,z=Zg(w))(v=dh(w,"queryBeforeStart",nh,!1))?t=Zs(a.h,z):Zs(a.h,z);B=u(f.keys());for(A=B.next();!A.done;A=B.next())D=A.value,H=f.get(D),bt(a.h,"Location",D,H)}J=Xg(b,"BaseURL");E=!1;if(a.h)for(G=u(J),K=G.next();!K.done;K=G.next())M=K.value,O=M.attributes.serviceLocation,N=Zg(M),O&&N&&(bt(a.h,"BaseURL",O,N),E=!0);E&&a.h||
898
- (R=J.map(Zg),I=Cd(d,R));S=function(){return a.h&&E?ct(a.h,"BaseURL"):I?I:[]};V=0;J&&J.length&&(V=dh(J[0],"availabilityTimeOffset",mh)||0);xa=a.g.dash.ignoreMinBufferTime;Ca=0;xa||(Ca=dh(b,"minBufferTime",hh)||0);a.G=dh(b,"minimumUpdatePeriod",hh,-1);db=dh(b,"availabilityStartTime",gh);Fa=dh(b,"timeShiftBufferDepth",hh);Va=a.g.dash.ignoreSuggestedPresentationDelay;ua=null;Va||(ua=dh(b,"suggestedPresentationDelay",hh));lb=a.g.dash.ignoreMaxSegmentDuration;zb=null;lb||(zb=dh(b,"maxSegmentDuration",hh));
899
- hb=b.attributes.type||"static";if(a.j)for(Za=a.j.presentationTimeline,cf=u(Object.values(a.m)),xd=cf.next();!xd.done;xd=cf.next())Zd=xd.value,Zd.segmentIndex&&Zd.segmentIndex.La(Za.qb());else kd=a.g.defaultPresentationDelay||1.5*Ca,Bc=null!=ua?ua:kd,Za=new jk(db,Bc,a.g.dash.autoCorrectDrift);Za.Ec("static"==hb);($d=Za.R())&&!isNaN(a.g.availabilityWindowOverride)&&(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);Za.ke(Fa);df=b.attributes.profiles||"";ae={Fb:"static"!=hb,presentationTimeline:Za,
900
- za:null,ha:null,ua:null,J:null,bandwidth:0,kg:!1,Eb:V,profiles:df.split(",")};yd=Wt(a,ae,S,b);si=yd.duration;tg=yd.periods;"static"!=hb&&yd.Zf||Za.$a(si||Infinity);a.C&&!a.s&&(ti=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?Za.Bg(a.C):a.C&&Wa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");Za.hf(zb||1);
901
- return C(Sb,a.l.Uf(tg,ae.Fb),2);case 2:return C(Sb,t,3);case 3:a.s&&(Ca=0,ui=null!=ua?ua:a.g.defaultPresentationDelay,Za.Df(ui));if(a.j){a.j.variants=a.l.j;ef=a.l.We();0<ef.length&&(a.j.textStreams=ef);a.j.imageStreams=a.l.i;a.i.filter(a.j);Sb.u(4);break}a.j={presentationTimeline:Za,variants:a.l.j,textStreams:a.l.We(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Ca||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Xt(b)};if(!Za.Mg()){Sb.u(5);
902
- break}be=Xg(b,"UTCTiming");return C(Sb,Yt(a,S,be),6);case 6:ff=Sb.h;if(!a.i)return Sb.return();Za.Cg(ff);case 5:Za.Xd();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),F(Sb)}})}
903
- function Xt(a){var b=ah(a,"ServiceDescription");if(!b)return null;a=ah(b,"Latency");b=ah(b,"PlaybackRate");return a&&a.attributes.max||b?{maxLatency:a&&a.attributes.max?parseInt(a.attributes.max,10)/1E3:null,maxPlaybackRate:b?parseFloat(b.attributes.max):null,minLatency:a&&a.attributes.min?parseInt(a.attributes.min,10)/1E3:null,minPlaybackRate:b?parseFloat(b.attributes.min):null}:null}
904
- function Wt(a,b,c,d){var e=dh(d,"mediaPresentationDuration",hh),f=[],g=0;d=Xg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=dh(k,"start",hh,g),n=k.attributes.id,q=dh(k,"duration",hh),p=null;if(l){var t=dh(l,"start",hh);null!=t&&(p=t-m)}else null!=e&&(p=e-m);null==p&&(p=q);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=Zt(a,b,c,{start:m,duration:p,node:k,Ze:null==p||!l});f.push(g);b.za.id&&p&&(a.L[b.za.id]=p);if(null==
866
+ function jt(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I;return L(function(E){switch(E.g){case 1:g=[];for(h=0;h<d;h++)g.push(new Set);for(k=d;k<c.length;k++)g.push(new Set(c[k].values()));l=u(b);m=l.next();case 2:if(m.done){E.u(4);break}n=m.value;return C(E,qt(a,n,c,d,f,g),5);case 5:q=E.h;if(!q)throw new Q(2,4,4037);m=l.next();E.u(2);break;case 4:p=u(g);for(t=p.next();!t.done;t=p.next())for(w=t.value,x=u(w),z=x.next();!z.done;z=x.next())v=z.value,(B=rt(a,v,c,e,f,g))&&b.push(B);A=u(g);for(t=
867
+ A.next();!t.done;t=A.next())for(D=t.value,H={},J=u(D),z=J.next();!z.done;H={Bd:H.Bd},z=J.next())if(H.Bd=z.value,!st(H.Bd)&&(I=b.some(function(G){return function(K){return tt(a,G.Bd,K)}}(H))))throw new Q(2,4,4037);return E.return(b)}})}function qt(a,b,c,d,e,f){return L(function(g){if(1==g.g)return ut(a,c,b),b.matchedStreams?b.segmentIndex?C(g,vt(b,d),2):g.u(2):g.return(!1);wt(b,d,e,f);return g.return(!0)})}
868
+ function vt(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return C(l,Promise.all(c),2)}if(a.segmentIndex instanceof Hk)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);F(l)})}
869
+ function rt(a,b,c,d,e,f){if(st(b))return null;var g=d(b);ut(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return L(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Hk;return C(h,vt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;wt(g,0,e,f);return g}
870
+ function wt(a,b,c,d){for(var e=a.matchedStreams;b<e.length;b++){var f=e[b];c(a,f);var g=!0;"audio"==a.type&&0==we(a.language,f.language)&&(g=!1);if(g&&(d[b].delete(f),f.fullMimeTypes))for(f=u(f.fullMimeTypes.values()),g=f.next();!g.done;g=f.next())a.fullMimeTypes.add(g.value)}}
871
+ function kt(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=u(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
872
+ function ot(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
873
+ function lt(a,b){function c(g,h){g||(g=[]);h=u(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=u(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=ci(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new Q(2,4,4038);a.drmInfos=
874
+ d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=u(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=kt(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),lt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&lt(a.trickModeVideo,
875
+ b)}function pt(a,b){var c=a.roles;c||(c=[]);for(var d=u(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=u(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,y(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=u(b.closedCaptions),c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
876
+ function ut(a,b,c){var d=[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=xt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
877
+ function xt(a,b,c){var d={audio:et,video:ft,text:gt,image:ht}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return tt(a,l,m)},video:function(l,m){return tt(a,l,m)},text:yt,image:zt}[c.type];for(var g={audio:At,video:Bt,text:Ct,image:Dt}[c.type],h=u(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.o&&!st(e)&&b.delete(d(e));return e}
878
+ function Et(a,b){function c(d){if(!Ft.has(d)){var e=Vd(d);Ft.set(d,e)}return Ft.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}r.Ag=function(a){this.m=a};r.Hg=function(a){this.o=a};function tt(a,b,c){return!Et(b,c)&&!a.m||b.drmInfos&&!bi(b.drmInfos,c.drmInfos)?!1:!0}function yt(a,b){return b.language?a.forced!==b.forced||0==we(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function zt(){return!0}
879
+ function At(a,b,c){var d=Et(a,b),e=Et(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=we(a.language,b.language);e=we(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
880
+ if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Gt(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Ht)return!0;if(d==It)return!1;d=Gt(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Ht?!0:d==It?!1:a.bandwidth&&Jt(a.bandwidth,b.bandwidth,c.bandwidth)==Ht?!0:!1}
881
+ function Bt(a,b,c){var d=Et(a,b),e=Et(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Gt(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Ht)return!0;if(d==It)return!1;if(a.frameRate){d=Gt(a.frameRate,b.frameRate,c.frameRate);if(d==Ht)return!0;if(d==It)return!1}return a.bandwidth&&Jt(a.bandwidth,b.bandwidth,c.bandwidth)==Ht?!0:!1}
882
+ function Ct(a,b,c){var d=we(a.language,b.language),e=we(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
883
+ if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Dt(a,b,c){return Gt(a.width*a.height,b.width*b.height,c.width*c.height)==Ht?!0:!1}
884
+ function nt(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
885
+ function it(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ek([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
886
+ function Gt(a,b,c){if(b==a&&a!=c)return It;if(c==a&&a!=b)return Ht;if(b>a){if(c<=a||c-a<b-a)return Ht;if(c-a>b-a)return It}else{if(c>a)return It;if(a-c<a-b)return Ht;if(a-c>a-b)return It}return Kt}function Jt(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ht:b<a?It:Kt}function st(a){switch(a.type){case Kd:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
887
+ function ft(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function et(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function gt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
888
+ function ht(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}P("shaka.util.PeriodCombiner",ct);ct.prototype.setUseStreamOnce=ct.prototype.Hg;ct.prototype.setAllowMultiTypeVariants=ct.prototype.Ag;ct.prototype.combinePeriods=ct.prototype.Uf;ct.prototype.getImageStreams=ct.prototype.oh;ct.prototype.getTextStreams=ct.prototype.We;ct.prototype.getVariants=ct.prototype.Fh;var Ht=1,Kt=0,It=-1,Ft=new Map;function Lt(a,b){var c=new DOMParser,d=Mt.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Nt(a,b){try{var c=od(a);return Lt(c,b)}catch(d){return null}}
889
+ var Mt=new Jc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Ot(){var a=this;this.i=this.g=null;this.o=[];this.j=null;this.I=1;this.m={};this.L={};this.l=new ct;this.G=0;this.H=new Qa(5);this.A=new Mc(function(){Pt(a)});this.F=new dg;this.B=null;this.K=[];this.C=Infinity;this.s=!1;this.h=null}r=Ot.prototype;
890
+ r.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.j&&this.j.presentationTimeline.R()&&this.A.kc();this.h&&this.h.configure(this.g);this.l&&(this.l.Ag(this.g.dash.multiTypeVariantsAllowed&&nb()),this.l.Hg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.o=[a],c.i=b,C(e,Qt(c),2);d=e.h;c.i&&Rt(c,d);if(!c.i)throw new Q(2,7,7001);return e.return(c.j)})};
891
+ r.stop=function(){for(var a=u(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.o=[];this.j=null;this.m={};this.l=null;null!=this.A&&(this.A.stop(),this.A=null);this.h&&this.h.destroy();return this.F.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,Qt(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};
892
+ r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Hb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.G=b.endTime-a,Rt(this,0))}}};r.banLocation=function(a){this.h&&this.h.banLocation(a)};
893
+ function Qt(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.h&&(c=bt(a.h,"Location",!0),c.length&&(b=c)),d=jg(b,a.g.retryParameters),e=Date.now(),C(k,St(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return C(k,Tt(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.H.sample(1,h);return k.return(h)})}
894
+ function Tt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(t){if(1==t.g){d=b;e=a.g.dash.manifestPreprocessor;f=bm;if(e!=f){pb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");g=Nt(d,"MPD");if(!g)throw new Q(2,4,4001,c);e(g);d=pd(g.outerHTML)}h=Qg(d,"MPD");if(!h)throw new Q(2,4,4001,c);k=a.g.dash.manifestPreprocessorTXml;l=cm;k!=l&&k(h);if(m=a.g.dash.disableXlinkProcessing)return t.return(Ut(a,h,c));n=a.g.dash.xlinkFailGracefully;
895
+ q=os(h,a.g.retryParameters,n,c,a.i.networkingEngine);eg(a.F,q);return C(t,q.promise,2)}p=t.h;return t.return(Ut(a,p,c))})}
896
+ function Ut(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R,S,V,xa,Ca,db,Fa,Va,ua,lb,zb,hb,Za,cf,xd,Zd,kd,Bc,$d,df,ae,yd,si,tg,ti,ui,ef,be,ff;return L(function(Sb){switch(Sb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Xg(b,"Location");h=u(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Zg(l))q=Cd(d,[n])[0],m&&(a.h?at(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(p=bt(a.h,"Location",!0),0<p.length&&(d=a.o=p)):e.length&&(d=a.o=e);t=Promise.resolve();
897
+ if((w=ah(b,"ContentSteering"))&&a.i){x=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=x;else if(a.h=new Xs(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=x,z=Zg(w))(v=dh(w,"queryBeforeStart",nh,!1))?t=Ys(a.h,z):Ys(a.h,z);B=u(f.keys());for(A=B.next();!A.done;A=B.next())D=A.value,H=f.get(D),at(a.h,"Location",D,H)}J=Xg(b,"BaseURL");E=!1;if(a.h)for(G=u(J),K=G.next();!K.done;K=G.next())M=K.value,O=M.attributes.serviceLocation,N=Zg(M),O&&N&&(at(a.h,"BaseURL",O,N),E=!0);E&&a.h||
898
+ (R=J.map(Zg),I=Cd(d,R));S=function(){return a.h&&E?bt(a.h,"BaseURL"):I?I:[]};V=0;J&&J.length&&(V=dh(J[0],"availabilityTimeOffset",mh)||0);xa=a.g.dash.ignoreMinBufferTime;Ca=0;xa||(Ca=dh(b,"minBufferTime",hh)||0);a.G=dh(b,"minimumUpdatePeriod",hh,-1);db=dh(b,"availabilityStartTime",gh);Fa=dh(b,"timeShiftBufferDepth",hh);Va=a.g.dash.ignoreSuggestedPresentationDelay;ua=null;Va||(ua=dh(b,"suggestedPresentationDelay",hh));lb=a.g.dash.ignoreMaxSegmentDuration;zb=null;lb||(zb=dh(b,"maxSegmentDuration",hh));
899
+ hb=b.attributes.type||"static";if(a.j)for(Za=a.j.presentationTimeline,cf=u(Object.values(a.m)),xd=cf.next();!xd.done;xd=cf.next())Zd=xd.value,Zd.segmentIndex&&Zd.segmentIndex.La(Za.qb());else kd=a.g.defaultPresentationDelay||1.5*Ca,Bc=null!=ua?ua:kd,Za=new ik(db,Bc,a.g.dash.autoCorrectDrift);Za.Ec("static"==hb);($d=Za.R())&&!isNaN(a.g.availabilityWindowOverride)&&(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);Za.ke(Fa);df=b.attributes.profiles||"";ae={Fb:"static"!=hb,presentationTimeline:Za,
900
+ za:null,ha:null,ua:null,J:null,bandwidth:0,kg:!1,Eb:V,profiles:df.split(",")};yd=Vt(a,ae,S,b);si=yd.duration;tg=yd.periods;"static"!=hb&&yd.Zf||Za.ab(si||Infinity);a.C&&!a.s&&(ti=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?Za.Bg(a.C):a.C&&Wa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");Za.hf(zb||1);
901
+ return C(Sb,a.l.Uf(tg,ae.Fb),2);case 2:return C(Sb,t,3);case 3:a.s&&(Ca=0,ui=null!=ua?ua:a.g.defaultPresentationDelay,Za.Df(ui));if(a.j){a.j.variants=a.l.j;ef=a.l.We();0<ef.length&&(a.j.textStreams=ef);a.j.imageStreams=a.l.i;a.i.filter(a.j);Sb.u(4);break}a.j={presentationTimeline:Za,variants:a.l.j,textStreams:a.l.We(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Ca||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Wt(b)};if(!Za.Mg()){Sb.u(5);
902
+ break}be=Xg(b,"UTCTiming");return C(Sb,Xt(a,S,be),6);case 6:ff=Sb.h;if(!a.i)return Sb.return();Za.Cg(ff);case 5:Za.Xd();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),F(Sb)}})}
903
+ function Wt(a){var b=ah(a,"ServiceDescription");if(!b)return null;a=ah(b,"Latency");b=ah(b,"PlaybackRate");return a&&a.attributes.max||b?{maxLatency:a&&a.attributes.max?parseInt(a.attributes.max,10)/1E3:null,maxPlaybackRate:b?parseFloat(b.attributes.max):null,minLatency:a&&a.attributes.min?parseInt(a.attributes.min,10)/1E3:null,minPlaybackRate:b?parseFloat(b.attributes.min):null}:null}
904
+ function Vt(a,b,c,d){var e=dh(d,"mediaPresentationDuration",hh),f=[],g=0;d=Xg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=dh(k,"start",hh,g),n=k.attributes.id,q=dh(k,"duration",hh),p=null;if(l){var t=dh(l,"start",hh);null!=t&&(p=t-m)}else null!=e&&(p=e-m);null==p&&(p=q);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=Yt(a,b,c,{start:m,duration:p,node:k,Ze:null==p||!l});f.push(g);b.za.id&&p&&(a.L[b.za.id]=p);if(null==
905
905
  p){g=null;break}g=m+p}}a.K=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,Zf:!1}:{periods:f,duration:g,Zf:!0}}
906
- function Zt(a,b,c,d){b.za=$t(a,d.node,null,c);b.ha=d;b.za.Eb=b.Eb;b.za.id||(b.za.id="__shaka_period_"+d.start);var e=Xg(d.node,"EventStream");c=b.presentationTimeline.qb();e=u(e);for(var f=e.next();!f.done;f=e.next())mu(a,d.start,d.duration,f.value,c);c=Xg(d.node,"AdaptationSet").map(function(m){return nu(a,b,m)}).filter(pe);if(b.Fb){d=[];e=u(c);for(f=e.next();!f.done;f=e.next()){f=u(f.value.li);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new Q(2,4,4018);
907
- }d=c.filter(function(m){return!m.Kf});c=c.filter(function(m){return m.Kf});c=u(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Kf.split(" ");g=u(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=u(k.streams);for(var l=k.next();!l.done;h={Cd:h.Cd},l=k.next())h.Cd=l.value,h.Cd.trickModeVideo=e.streams.find(function(m){return function(n){return Vd(m.Cd.codecs)==Vd(n.codecs)}}(h))}}}c=ou(a.g.disableAudio,d,"audio");e=ou(a.g.disableVideo,d,"video");f=ou(a.g.disableText,
908
- d,Kd);d=ou(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new Q(2,4,4004);return{id:b.za.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function ou(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,y(e.streams));return d},[])}
909
- function nu(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=$t(a,c,b.za,null);var e=!1,f=Xg(c,"Role"),g=f.map(function(E){return E.attributes.value}).filter(pe),h=void 0,k=b.ua.contentType==Kd;k&&(h="subtitle");f=u(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.attributes.schemeIdUri;if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.attributes.value,l){case "main":e=!0;break;case "caption":case "subtitle":h=
906
+ function Yt(a,b,c,d){b.za=Zt(a,d.node,null,c);b.ha=d;b.za.Eb=b.Eb;b.za.id||(b.za.id="__shaka_period_"+d.start);var e=Xg(d.node,"EventStream");c=b.presentationTimeline.qb();e=u(e);for(var f=e.next();!f.done;f=e.next())$t(a,d.start,d.duration,f.value,c);c=Xg(d.node,"AdaptationSet").map(function(m){return mu(a,b,m)}).filter(pe);if(b.Fb){d=[];e=u(c);for(f=e.next();!f.done;f=e.next()){f=u(f.value.li);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new Q(2,4,4018);
907
+ }d=c.filter(function(m){return!m.Kf});c=c.filter(function(m){return m.Kf});c=u(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Kf.split(" ");g=u(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=u(k.streams);for(var l=k.next();!l.done;h={Cd:h.Cd},l=k.next())h.Cd=l.value,h.Cd.trickModeVideo=e.streams.find(function(m){return function(n){return Vd(m.Cd.codecs)==Vd(n.codecs)}}(h))}}}c=nu(a.g.disableAudio,d,"audio");e=nu(a.g.disableVideo,d,"video");f=nu(a.g.disableText,
908
+ d,Kd);d=nu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new Q(2,4,4004);return{id:b.za.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function nu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,y(e.streams));return d},[])}
909
+ function mu(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=Zt(a,c,b.za,null);var e=!1,f=Xg(c,"Role"),g=f.map(function(E){return E.attributes.value}).filter(pe),h=void 0,k=b.ua.contentType==Kd;k&&(h="subtitle");f=u(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.attributes.schemeIdUri;if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.attributes.value,l){case "main":e=!0;break;case "caption":case "subtitle":h=
910
910
  l}}var n;m=Xg(c,"EssentialProperty");f=null;var q=!1;l=!1;m=u(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==t?f=p.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=t&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=t&&("urn:mpeg:dash:ssr:2023"==t?q=!0:l=!0)}var w=null;m=Xg(c,"SupplementalProperty");m=u(m);for(p=m.next();!p.done;p=m.next())p=
911
911
  p.value,t=p.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==t?w=parseInt(p.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t&&(n=d(parseInt(p.attributes.value,10)));m=Xg(c,"Accessibility");var x=new Map,z;m=u(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.attributes.schemeIdUri,t=t.attributes.value,"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var v=u(t),B=v.next();!B.done;B=v.next()){var A=B.value,D=B=void 0;A.includes("=")?
912
912
  (A=A.split("="),B=A[0].startsWith("CC")?A[0]:"CC"+A[0],D=A[1]||"und"):(B="CC"+p,2==t.length?p+=2:p++,D=A);x.set(B,se(D))}}else x.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=t)for(t=u(t.split(";")),B=t.next();!B.done;B=t.next())B=B.value,A=v=void 0,B.includes("=")?(B=B.split("="),v="svc"+B[0],A=B[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,A=B),x.set(v,se(A));else x.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=t&&(g.push(t),"captions"==t&&(h="caption")):
913
- "urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==t?z="visually impaired":"2"==t&&(z="hard of hearing"));if(l)return null;l=Xg(c,"ContentProtection");var H=Zr(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=se(b.ua.language||"und"),I=c.attributes.label;(l=Xg(c,"Label"))&&l.length&&(l=Yg(l[0]))&&(I=l);l=Xg(c,"Representation");c=l.map(function(E){if(E=pu(a,b,H,h,J,I,e,g,x,E,z,w))E.hdr=E.hdr||n,E.fastSwitching=q;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ua.contentType;
914
- if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new Q(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=qu(c[0].mimeType,c[0].codecs),k=u(c),p=k.next();!p.done;p=k.next())p.value.type=b.ua.contentType;k=b.ua.id||"__fake__"+a.I++;m=u(c);for(p=m.next();!p.done;p=m.next()){p=p.value;t=u(H.drmInfos);for(v=t.next();!v.done;v=t.next())v=v.value,v.keyIds=v.keyIds&&p.keyIds?new Set([].concat(y(v.keyIds),y(p.keyIds))):v.keyIds||p.keyIds;a.g.dash.enableAudioGroups&&
913
+ "urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==t?z="visually impaired":"2"==t&&(z="hard of hearing"));if(l)return null;l=Xg(c,"ContentProtection");var H=Yr(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=se(b.ua.language||"und"),I=c.attributes.label;(l=Xg(c,"Label"))&&l.length&&(l=Yg(l[0]))&&(I=l);l=Xg(c,"Representation");c=l.map(function(E){if(E=ou(a,b,H,h,J,I,e,g,x,E,z,w))E.hdr=E.hdr||n,E.fastSwitching=q;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ua.contentType;
914
+ if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new Q(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=pu(c[0].mimeType,c[0].codecs),k=u(c),p=k.next();!p.done;p=k.next())p.value.type=b.ua.contentType;k=b.ua.id||"__fake__"+a.I++;m=u(c);for(p=m.next();!p.done;p=m.next()){p=p.value;t=u(H.drmInfos);for(v=t.next();!v.done;v=t.next())v=v.value,v.keyIds=v.keyIds&&p.keyIds?new Set([].concat(y(v.keyIds),y(p.keyIds))):v.keyIds||p.keyIds;a.g.dash.enableAudioGroups&&
915
915
  (p.groupId=k)}l=l.map(function(E){return E.attributes.id}).filter(pe);return{id:k,contentType:b.ua.contentType,language:J,Ej:e,streams:c,drmInfos:H.drmInfos,Kf:f,li:l}}
916
- function pu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=$t(a,l,b.ua,null);a.C=Math.min(a.C,b.J.Eb);if(!ru(b.J))return null;var q=b.ha.start;b.bandwidth=dh(l,"bandwidth",kh)||0;var p=b.J.contentType,t=p==Kd||"application"==p;p="image"==p;try{var w=void 0;if(c.ye){var x=b.J.nb,z=Cd(x(),[c.ye.Sh]),v=jg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.ye.iv,firstMediaSequenceNumber:0,fetchKey:function(){var E,G,K;return L(function(M){if(1==M.g)return C(M,Tt(a,v,6),2);if(3!=M.g){E=M.h;if(!E.data||16!=
917
- E.data.byteLength)throw new Q(2,4,4049);G={name:"AES-CBC"};K=w;return C(M,window.crypto.subtle.importKey("raw",E.data,G,!0,["decrypt"]),3)}K.cryptoKey=M.h;w.fetchKey=void 0;F(M)})}}}x=function(E,G,K,M){return su(a,E,G,K,M)};if(b.J.pd)var B=Cs(b,x,w);else if(b.J.Kb)B=Is(b,a.m,w);else if(b.J.qd)B=Ns(b,x,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.L,w,n);else{var A=b.ha.duration||0,D=b.J.nb;B={vc:function(){var E=Hk(q,A,D());E.tc(function(G){G.mimeType=b.J.mimeType;G.codecs=b.J.codecs});return Promise.resolve(E)}}}}catch(E){if((t||
918
- p)&&4002==E.code)return null;throw E;}n=Xg(l,"ContentProtection");n=cs(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);x=!1;Xg(l,"SupplementalProperty").some(function(E){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==E.attributes.schemeIdUri&&"JOC"==E.attributes.value})&&(x=!0);z=!1;t&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var H;if(p&&((l=Xg(l,"EssentialProperty").find(function(E){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(E.attributes.schemeIdUri)}))&&
916
+ function ou(a,b,c,d,e,f,g,h,k,l,m,n){b.J=Zt(a,l,b.ua,null);a.C=Math.min(a.C,b.J.Eb);if(!qu(b.J))return null;var q=b.ha.start;b.bandwidth=dh(l,"bandwidth",kh)||0;var p=b.J.contentType,t=p==Kd||"application"==p;p="image"==p;try{var w=void 0;if(c.ye){var x=b.J.nb,z=Cd(x(),[c.ye.Sh]),v=jg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.ye.iv,firstMediaSequenceNumber:0,fetchKey:function(){var E,G,K;return L(function(M){if(1==M.g)return C(M,St(a,v,6),2);if(3!=M.g){E=M.h;if(!E.data||16!=
917
+ E.data.byteLength)throw new Q(2,4,4049);G={name:"AES-CBC"};K=w;return C(M,window.crypto.subtle.importKey("raw",E.data,G,!0,["decrypt"]),3)}K.cryptoKey=M.h;w.fetchKey=void 0;F(M)})}}}x=function(E,G,K,M){return ru(a,E,G,K,M)};if(b.J.pd)var B=Bs(b,x,w);else if(b.J.Kb)B=Hs(b,a.m,w);else if(b.J.qd)B=Ms(b,x,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.L,w,n);else{var A=b.ha.duration||0,D=b.J.nb;B={vc:function(){var E=Gk(q,A,D());E.tc(function(G){G.mimeType=b.J.mimeType;G.codecs=b.J.codecs});return Promise.resolve(E)}}}}catch(E){if((t||
918
+ p)&&4002==E.code)return null;throw E;}n=Xg(l,"ContentProtection");n=bs(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);x=!1;Xg(l,"SupplementalProperty").some(function(E){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==E.attributes.schemeIdUri&&"JOC"==E.attributes.value})&&(x=!0);z=!1;t&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var H;if(p&&((l=Xg(l,"EssentialProperty").find(function(E){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(E.attributes.schemeIdUri)}))&&
919
919
  (H=l.attributes.value),!H))return null;var J;l=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");t=b.J.id?b.za.id+","+b.J.id:"";var I=t&&a.m[t]?a.m[t]:{id:a.I++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){I.segmentIndex&&(I.segmentIndex.release(),I.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:l,
920
920
  frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ua.language,label:f,type:b.ua.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.J.ee,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:J,videoLayout:void 0,tilesLayout:H,accessibilityPurpose:m,external:!1,
921
921
  fastSwitching:!1,fullMimeTypes:new Set([Od(b.J.mimeType,b.J.codecs)])};I.createSegmentIndex=function(){var E;return L(function(G){if(1==G.g){if(I.segmentIndex)return G.u(0);E=I;return C(G,B.vc(),3)}E.segmentIndex=G.h;F(G)})};t&&b.Fb&&!a.m[t]&&(a.m[t]=I);return I}
922
- function Qt(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),C(d,Rt(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=va(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();St(a,b);F(d)}})}function St(a,b){if(!(0>a.G)){var c=a.G;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.U(Math.max(c-b,Ra(a.H)))}}
923
- function $t(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ee:null,audioSamplingRate:null,Eb:0,zf:0};d=d||c.nb;var e=b.attributes.id,f=Xg(b,"BaseURL"),g,h=!1;if(a.h)for(var k=u(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=Zg(m);l&&m&&(bt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(Zg));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=b.attributes.codecs||c.codecs;var n=dh(b,"frameRate",
924
- oh)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,p=tu(Xg(b,"InbandEventStream"),c.emsgSchemeIdUris),t=Xg(b,"AudioChannelConfiguration");t=uu(t)||c.ee;var w=dh(b,"audioSamplingRate",lh)||c.audioSamplingRate;k||(k=qu(l,m));var x=ah(b,"SegmentBase"),z=ah(b,"SegmentTemplate"),v=x?dh(x,"availabilityTimeOffset",mh)||0:0,B=z?dh(z,"availabilityTimeOffset",mh)||0:0,A=f&&f.length?dh(f[0],"availabilityTimeOffset",mh)||0:0;v=c.Eb+A+v+B;B=null;(A=ah(b,"SegmentSequenceProperties"))&&(A=ah(A,"SAP"))&&(B=
925
- dh(A,"cadence",jh));return{nb:function(){return Cd(d(),f.length?a.h&&h?ct(a.h,e):g?g:[]:[])},pd:x||c.pd,Kb:ah(b,"SegmentList")||c.Kb,qd:z||c.qd,width:dh(b,"width",lh)||c.width,height:dh(b,"height",lh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,ee:t,audioSamplingRate:w,Eb:v,zf:B||c.zf}}
926
- function tu(a,b){b=b.slice();a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
927
- function uu(a){a=u(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
928
- parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function ru(a){var b=a.pd?1:0;b+=a.Kb?1:0;b+=a.qd?1:0;if(0==b)return a.contentType==Kd||"application"==a.contentType?!0:!1;1!=b&&(a.pd&&(a.Kb=null),a.qd=null);return!0}
929
- function vu(a,b,c,d){var e,f,g,h,k,l,m;return L(function(n){if(1==n.g)return e=[sd(c)],f=Cd(b(),e),g=jg(f,a.g.retryParameters),g.method=d,h=a.i.networkingEngine.request(4,g),eg(a.F,h),C(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=jd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
930
- function Yt(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=u(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ra(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(7);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 n.u(8);
931
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Wa("NTP UTCTiming scheme is not supported");break;default:Wa("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return C(n,vu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,vu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
922
+ function Pt(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),C(d,Qt(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=va(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Rt(a,b);F(d)}})}function Rt(a,b){if(!(0>a.G)){var c=a.G;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.U(Math.max(c-b,Ra(a.H)))}}
923
+ function Zt(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ee:null,audioSamplingRate:null,Eb:0,zf:0};d=d||c.nb;var e=b.attributes.id,f=Xg(b,"BaseURL"),g,h=!1;if(a.h)for(var k=u(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=Zg(m);l&&m&&(at(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(Zg));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=b.attributes.codecs||c.codecs;var n=dh(b,"frameRate",
924
+ oh)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,p=su(Xg(b,"InbandEventStream"),c.emsgSchemeIdUris),t=Xg(b,"AudioChannelConfiguration");t=tu(t)||c.ee;var w=dh(b,"audioSamplingRate",lh)||c.audioSamplingRate;k||(k=pu(l,m));var x=ah(b,"SegmentBase"),z=ah(b,"SegmentTemplate"),v=x?dh(x,"availabilityTimeOffset",mh)||0:0,B=z?dh(z,"availabilityTimeOffset",mh)||0:0,A=f&&f.length?dh(f[0],"availabilityTimeOffset",mh)||0:0;v=c.Eb+A+v+B;B=null;(A=ah(b,"SegmentSequenceProperties"))&&(A=ah(A,"SAP"))&&(B=
925
+ dh(A,"cadence",jh));return{nb:function(){return Cd(d(),f.length?a.h&&h?bt(a.h,e):g?g:[]:[])},pd:x||c.pd,Kb:ah(b,"SegmentList")||c.Kb,qd:z||c.qd,width:dh(b,"width",lh)||c.width,height:dh(b,"height",lh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,ee:t,audioSamplingRate:w,Eb:v,zf:B||c.zf}}
926
+ function su(a,b){b=b.slice();a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
927
+ function tu(a){a=u(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
928
+ parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function qu(a){var b=a.pd?1:0;b+=a.Kb?1:0;b+=a.qd?1:0;if(0==b)return a.contentType==Kd||"application"==a.contentType?!0:!1;1!=b&&(a.pd&&(a.Kb=null),a.qd=null);return!0}
929
+ function uu(a,b,c,d){var e,f,g,h,k,l,m;return L(function(n){if(1==n.g)return e=[sd(c)],f=Cd(b(),e),g=jg(f,a.g.retryParameters),g.method=d,h=a.i.networkingEngine.request(4,g),eg(a.F,h),C(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=jd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
930
+ function Xt(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=u(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ra(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(7);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 n.u(8);
931
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Wa("NTP UTCTiming scheme is not supported");break;default:Wa("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return C(n,uu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,uu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
932
932
  3);break;case 5:va(n);case 3:g=f.next();n.u(2);break;case 4:return Wa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
933
- function mu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=dh(d,"timescale",lh)||1;d=u(Xg(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=dh(k,"presentationTime",lh)||0,m=dh(k,"duration",lh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:ph(k),eventNode:k},a.i.onTimelineRegionAdded(k))}}
934
- function su(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g)return f=pg,g=e?0:1,h=jl(b,c,d,a.g.retryParameters),C(l,Tt(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function qu(a,b){b=Od(a,b);return fe(b)?Kd:a.split("/")[0]}function Tt(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);eg(a.F,b);return b.promise}P("shaka.dash.DashParser",Pt);ni["application/dash+xml"]=function(){return new Pt};ni["video/vnd.mpeg.dash.mpd"]=function(){return new Pt};function wu(){}P("shaka.dependencies",wu);wu.has=function(a){return xu.has(a)};wu.add=function(a,b){if(!yu[a])throw Error(a+" is not supported");a==zu?pb("mux.js","mux.js is no longer used in Shaka Player."):xu.set(a,function(){return b})};var zu="muxjs",yu={Fj:zu,ISOBoxer:"ISOBoxer"};wu.Allowed=yu;var xu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Au(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Bu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Bu.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
935
- function Cu(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Du(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Du(a,b))?a.value:c||null}function Eu(a,b){a=Du(a,b);if(!a)throw new Q(2,4,4023,b);return a.value}function Fu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.rb=c}function Gu(a,b){this.name=a;this.value=b};function Hu(a,b){return a.filter(function(c){return c.name==b})}function Iu(a,b){return a.filter(function(c){return Eu(c,"TYPE")==b})}function Ju(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Ku(a,b,c){c=void 0===c?0:c;return(a=Ju(a,b))?Number(a.value):c}function Lu(a,b,c){return b?Mu(a,[b],c):[]}
936
- function Mu(a,b,c){if(!b.length)return[];b=Cd(a,b);a=[];b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=u(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new Q(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Nu(a){this.h=a||"";this.g=0}function Ou(a){Pu(a,/[ \t]+/gm)}function Pu(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Qu(a){return a.g==a.h.length?null:(a=Pu(a,/[^ \t\n]*/gm))?a[0]:null};function Ru(){this.g=0}
937
- function Su(a,b){b=jd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new Q(2,4,4015);b=0;for(var d=!0,e=u(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Tu(a,f),--a.g,Uu.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Tu(a,g);if(Vu.includes(g.name)){if(1!=b)throw new Q(2,4,4017);g=
938
- c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=u(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Tu(a,k),Uu.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Fu(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Fu("",d,f)));return new Au(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
939
- g.name&&(g.attributes.push(new Gu("URI",h)),d=!0)}}return new Au(b,e)}function Tu(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new Q(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Nu(d);var f;(f=Pu(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Pu(d,g);)c.push(new Gu(f[1],f[2]||f[3])),Ou(d)}return new Bu(a,b,c,e)}
940
- var Uu="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Vu="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Wu(){}function Xu(a){try{var b=Yu(a);return Xf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Vf(c)}}
941
- function Yu(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new Q(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new Q(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=wd(a):e=pd(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",Wu);Wu.parse=Xu;gg("data",Xu);function Zu(a){var b=Yd(a),c=b.split("/")[0];a=ce(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Nf:null}}
942
- function $u(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":f.push(v+".42E01E");h=!0;break;case "hev1":case "hvc1":f.push(v+".1.6.L93.90");h=!0;break;case "dvh1":case "dvhe":f.push(v+".05.04");h=!0;break;case "vp09":f.push(v+".00.10.08");h=!0;break;case "av01":f.push(v+".0.01M.08");h=!0;break;case "mp4a":e.push("mp4a.40.2");g=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),g=!0}}var e=[],f=[],g=!1,h=!1,k=null,l=null,m=null,n=
943
- null,q=null,p=null,t;(new Bg).box("moov",Gg).box("trak",Gg).O("tkhd",function(v){v=Ri(v.reader,v.version);l=String(v.height);m=String(v.width)}).box("mdia",Gg).O("mdhd",function(v){k=Pi(v.reader,v.version).language}).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("mp4a",function(v){var B=v.reader;B.skip(6);B.skip(2);B.skip(8);var A=B.ra();B.skip(2);B.skip(2);B.skip(2);B=B.ra()+B.ra()/65536;n=A;q=B;v.reader.ka()?Gg(v):c(v)}).box("esds",function(v){v=v.reader;for(var B="mp4a",A,D;v.ka();){A=v.P();for(var H=
944
- v.P();H&128;)H=v.P();if(3==A)v.ra(),H=v.P(),H&128&&v.ra(),H&64&&v.skip(v.P()),H&32&&v.ra();else if(4==A)D=v.P(),v.skip(12);else if(5==A)break}D&&(B+="."+Ti(D),5==A&&v.ka()&&(A=v.P(),D=(A&248)>>3,31===D&&v.ka()&&(D=32+((A&7)<<3)+((v.P()&224)>>5)),B+="."+D));e.push(B);g=!0}).box("ac-3",c).box("ec-3",c).box("opus",c).box("Opus",c).box("fLaC",c).box("avc1",function(v){t=v.name;Lg(v)}).box("avc3",function(v){t=v.name;Lg(v)}).box("hev1",function(v){t=v.name;Lg(v)}).box("hvc1",function(v){t=v.name;Lg(v)}).box("dva1",
945
- function(v){t=v.name;Lg(v)}).box("dvav",function(v){t=v.name;Lg(v)}).box("dvh1",function(v){t=v.name;Lg(v)}).box("dvhe",function(v){t=v.name;Lg(v)}).box("vp09",function(v){t=v.name;Lg(v)}).box("av01",function(v){t=v.name;Lg(v)}).box("avcC",function(v){var B=t||"";switch(t){case "dvav":B="avc3";break;case "dva1":B="avc1"}v=v.reader;v.skip(1);v=B+"."+Ti(v.P())+Ti(v.P())+Ti(v.P());f.push(v);h=!0}).box("hvcC",function(v){var B=t||"";switch(t){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var A=v.reader;
946
- A.skip(1);v=A.P();var D=["","A","B","C"][v>>6],H=v&31,J=A.M(),I=(v&32)>>5?"H":"L";v=[A.P(),A.P(),A.P(),A.P(),A.P(),A.P()];A=A.P();for(var E=0,G=0;32>G;G++){E|=J&1;if(31==G)break;E<<=1;J>>=1}B=B+("."+D+H)+("."+Ti(E,!0));B+="."+I+A;D="";for(H=v.length;H--;)if((I=v[H])||D)D="."+I.toString(16).toUpperCase()+D;B+=D;f.push(B);h=!0}).box("dvcC",function(v){var B=t||"";switch(t){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var A=v.reader;A.skip(2);
947
- v=A.P();A=A.P();f.push(B+"."+Ui(v>>1&127)+"."+Ui(v<<5&32|A>>3&31));h=!0}).O("vpcC",function(v){var B=t||"",A=v.reader;v=A.P();var D=A.P();A=A.P()>>4&15;f.push(B+"."+Ui(v)+"."+Ui(D)+"."+Ui(A));h=!0}).box("av1C",function(v){var B=t||"",A=v.reader;A.skip(1);v=A.P();A=A.P();var D=v>>>5,H=(A&64)>>6;f.push(B+"."+D+"."+Ui(v&31)+(A>>>7?"H":"M")+"."+Ui(2===D&&H?(A&32)>>5?12:10:H?10:8)+"."+((A&16)>>4)+"."+((A&8)>>3)+((A&4)>>2)+(A&3)+"."+Ui(1)+"."+Ui(1)+"."+Ui(1)+".0");h=!0}).box("enca",Mg).box("encv",Lg).box("sinf",
948
- Gg).box("frma",function(v){v=Si(v.reader).Ea;d(v)}).box("colr",function(v){v=v.reader;var B=null,A=v.sb(4);var D=String.fromCharCode(A[0]);D+=String.fromCharCode(A[1]);D+=String.fromCharCode(A[2]);D+=String.fromCharCode(A[3]);if("nclx"===D)switch(v.ra(),A=v.ra(),v.ra(),A){case 1:case 6:case 13:case 14:case 15:B="SDR";break;case 16:B="PQ";break;case 18:B="HLG"}p=B}).parse(a||b,!0);if(!e.length&&!f.length)return null;var w=g&&!h,x=new Map;if(h){var z=new Gb("video/mp4");a&&z.init(a);z.i(b);a=u(z.j());
949
- for(b=a.next();!b.done;b=a.next())b=b.value,x.set(b,b);z.g()}return{type:w?"audio":"video",mimeType:w?"audio/mp4":"video/mp4",codecs:av(e.concat(f)).join(", "),language:k,height:l,width:m,channelCount:n,sampleRate:q,closedCaptions:x,Nf:p}}function av(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Xd(d);b.has(e)||(c.push(d),b.add(e))}b=Ld("audio",c);d=Ld("video",c);a=Ld(Kd,c);d=bv(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
950
- function bv(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?kb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function cv(a){var b=null;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("encv",Lg).box("enca",Mg).box("sinf",Gg).box("schi",Gg).O("tenc",function(c){c=c.reader;c.P();c.P();c.P();c.P();b=Ad(c.sb(16))}).parse(a,!0);return b};function dv(){var a=this;this.g=this.i=null;this.A=1;this.o=new Map;this.H=new Map;this.K=new Map;this.K.set("video",new Map);this.K.set("audio",new Map);this.K.set(Kd,new Map);this.K.set("image",new Map);this.Ia=new Set;this.h=new Map;this.l=null;this.aa="";this.Ga=new Ru;this.I=-1;this.T=Infinity;this.ea=this.mb=!1;this.s=new Mc(function(){ev(a)});this.qa=fv;this.C=null;this.Ha=0;this.m=Infinity;this.ta=this.sa=this.L=0;this.N=new dg;this.F=new Map;this.G=new Map;this.Y=new Map;this.ba=new Map;
951
- this.da=new Map;this.ia=new Map;this.pa=new Map;this.lb=this.B=!1;this.bb=new Qa(5);this.j=null}r=dv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return L(function(e){return 1==e.g?(c.i=b,c.B=b.isLowLatencyMode(),C(e,gv(c,[a]),2)):3!=e.g?(d=e.h,c.aa=d.uri,C(e,hv(c,d.data,a),3)):e.return(c.C)})};
933
+ function $t(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=dh(d,"timescale",lh)||1;d=u(Xg(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=dh(k,"presentationTime",lh)||0,m=dh(k,"duration",lh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:ph(k),eventNode:k},a.i.onTimelineRegionAdded(k))}}
934
+ function ru(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g)return f=pg,g=e?0:1,h=il(b,c,d,a.g.retryParameters),C(l,St(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function pu(a,b){b=Od(a,b);return fe(b)?Kd:a.split("/")[0]}function St(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);eg(a.F,b);return b.promise}P("shaka.dash.DashParser",Ot);mi["application/dash+xml"]=function(){return new Ot};mi["video/vnd.mpeg.dash.mpd"]=function(){return new Ot};function vu(){}P("shaka.dependencies",vu);vu.has=function(a){return wu.has(a)};vu.add=function(a,b){if(!xu[a])throw Error(a+" is not supported");a==yu?pb("mux.js","mux.js is no longer used in Shaka Player."):wu.set(a,function(){return b})};var yu="muxjs",xu={Fj:yu,ISOBoxer:"ISOBoxer"};vu.Allowed=xu;var wu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function zu(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Au(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Au.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
935
+ function Bu(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Cu(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Cu(a,b))?a.value:c||null}function Du(a,b){a=Cu(a,b);if(!a)throw new Q(2,4,4023,b);return a.value}function Eu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.rb=c}function Fu(a,b){this.name=a;this.value=b};function Gu(a,b){return a.filter(function(c){return c.name==b})}function Hu(a,b){return a.filter(function(c){return Du(c,"TYPE")==b})}function Iu(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Ju(a,b,c){c=void 0===c?0:c;return(a=Iu(a,b))?Number(a.value):c}function Ku(a,b,c){return b?Lu(a,[b],c):[]}
936
+ function Lu(a,b,c){if(!b.length)return[];b=Cd(a,b);a=[];b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=u(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new Q(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Mu(a){this.h=a||"";this.g=0}function Nu(a){Ou(a,/[ \t]+/gm)}function Ou(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Pu(a){return a.g==a.h.length?null:(a=Ou(a,/[^ \t\n]*/gm))?a[0]:null};function Qu(){this.g=0}
937
+ function Ru(a,b){b=jd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new Q(2,4,4015);b=0;for(var d=!0,e=u(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Su(a,f),--a.g,Tu.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Su(a,g);if(Uu.includes(g.name)){if(1!=b)throw new Q(2,4,4017);g=
938
+ c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=u(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Su(a,k),Tu.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Eu(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Eu("",d,f)));return new zu(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
939
+ g.name&&(g.attributes.push(new Fu("URI",h)),d=!0)}}return new zu(b,e)}function Su(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new Q(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Mu(d);var f;(f=Ou(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Ou(d,g);)c.push(new Fu(f[1],f[2]||f[3])),Nu(d)}return new Au(a,b,c,e)}
940
+ var Tu="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Uu="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Vu(){}function Wu(a){try{var b=Xu(a);return Xf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Vf(c)}}
941
+ function Xu(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new Q(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new Q(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=wd(a):e=pd(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",Vu);Vu.parse=Wu;gg("data",Wu);function Yu(a){var b=Yd(a),c=b.split("/")[0];a=ce(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Nf:null}}
942
+ function Zu(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":f.push(v+".42E01E");h=!0;break;case "hev1":case "hvc1":f.push(v+".1.6.L93.90");h=!0;break;case "dvh1":case "dvhe":f.push(v+".05.04");h=!0;break;case "vp09":f.push(v+".00.10.08");h=!0;break;case "av01":f.push(v+".0.01M.08");h=!0;break;case "mp4a":e.push("mp4a.40.2");g=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),g=!0}}var e=[],f=[],g=!1,h=!1,k=null,l=null,m=null,n=
943
+ null,q=null,p=null,t;(new Bg).box("moov",Gg).box("trak",Gg).O("tkhd",function(v){v=Qi(v.reader,v.version);l=String(v.height);m=String(v.width)}).box("mdia",Gg).O("mdhd",function(v){k=Oi(v.reader,v.version).language}).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("mp4a",function(v){var B=v.reader;B.skip(6);B.skip(2);B.skip(8);var A=B.ra();B.skip(2);B.skip(2);B.skip(2);B=B.ra()+B.ra()/65536;n=A;q=B;v.reader.ka()?Gg(v):c(v)}).box("esds",function(v){v=v.reader;for(var B="mp4a",A,D;v.ka();){A=v.P();for(var H=
944
+ v.P();H&128;)H=v.P();if(3==A)v.ra(),H=v.P(),H&128&&v.ra(),H&64&&v.skip(v.P()),H&32&&v.ra();else if(4==A)D=v.P(),v.skip(12);else if(5==A)break}D&&(B+="."+Si(D),5==A&&v.ka()&&(A=v.P(),D=(A&248)>>3,31===D&&v.ka()&&(D=32+((A&7)<<3)+((v.P()&224)>>5)),B+="."+D));e.push(B);g=!0}).box("ac-3",c).box("ec-3",c).box("opus",c).box("Opus",c).box("fLaC",c).box("avc1",function(v){t=v.name;Lg(v)}).box("avc3",function(v){t=v.name;Lg(v)}).box("hev1",function(v){t=v.name;Lg(v)}).box("hvc1",function(v){t=v.name;Lg(v)}).box("dva1",
945
+ function(v){t=v.name;Lg(v)}).box("dvav",function(v){t=v.name;Lg(v)}).box("dvh1",function(v){t=v.name;Lg(v)}).box("dvhe",function(v){t=v.name;Lg(v)}).box("vp09",function(v){t=v.name;Lg(v)}).box("av01",function(v){t=v.name;Lg(v)}).box("avcC",function(v){var B=t||"";switch(t){case "dvav":B="avc3";break;case "dva1":B="avc1"}v=v.reader;v.skip(1);v=B+"."+Si(v.P())+Si(v.P())+Si(v.P());f.push(v);h=!0}).box("hvcC",function(v){var B=t||"";switch(t){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var A=v.reader;
946
+ A.skip(1);v=A.P();var D=["","A","B","C"][v>>6],H=v&31,J=A.M(),I=(v&32)>>5?"H":"L";v=[A.P(),A.P(),A.P(),A.P(),A.P(),A.P()];A=A.P();for(var E=0,G=0;32>G;G++){E|=J&1;if(31==G)break;E<<=1;J>>=1}B=B+("."+D+H)+("."+Si(E,!0));B+="."+I+A;D="";for(H=v.length;H--;)if((I=v[H])||D)D="."+I.toString(16).toUpperCase()+D;B+=D;f.push(B);h=!0}).box("dvcC",function(v){var B=t||"";switch(t){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var A=v.reader;A.skip(2);
947
+ v=A.P();A=A.P();f.push(B+"."+Ti(v>>1&127)+"."+Ti(v<<5&32|A>>3&31));h=!0}).O("vpcC",function(v){var B=t||"",A=v.reader;v=A.P();var D=A.P();A=A.P()>>4&15;f.push(B+"."+Ti(v)+"."+Ti(D)+"."+Ti(A));h=!0}).box("av1C",function(v){var B=t||"",A=v.reader;A.skip(1);v=A.P();A=A.P();var D=v>>>5,H=(A&64)>>6;f.push(B+"."+D+"."+Ti(v&31)+(A>>>7?"H":"M")+"."+Ti(2===D&&H?(A&32)>>5?12:10:H?10:8)+"."+((A&16)>>4)+"."+((A&8)>>3)+((A&4)>>2)+(A&3)+"."+Ti(1)+"."+Ti(1)+"."+Ti(1)+".0");h=!0}).box("enca",Mg).box("encv",Lg).box("sinf",
948
+ Gg).box("frma",function(v){v=Ri(v.reader).Ea;d(v)}).box("colr",function(v){v=v.reader;var B=null,A=v.sb(4);var D=String.fromCharCode(A[0]);D+=String.fromCharCode(A[1]);D+=String.fromCharCode(A[2]);D+=String.fromCharCode(A[3]);if("nclx"===D)switch(v.ra(),A=v.ra(),v.ra(),A){case 1:case 6:case 13:case 14:case 15:B="SDR";break;case 16:B="PQ";break;case 18:B="HLG"}p=B}).parse(a||b,!0);if(!e.length&&!f.length)return null;var w=g&&!h,x=new Map;if(h){var z=new Gb("video/mp4");a&&z.init(a);z.i(b);a=u(z.j());
949
+ for(b=a.next();!b.done;b=a.next())b=b.value,x.set(b,b);z.g()}return{type:w?"audio":"video",mimeType:w?"audio/mp4":"video/mp4",codecs:$u(e.concat(f)).join(", "),language:k,height:l,width:m,channelCount:n,sampleRate:q,closedCaptions:x,Nf:p}}function $u(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Xd(d);b.has(e)||(c.push(d),b.add(e))}b=Ld("audio",c);d=Ld("video",c);a=Ld(Kd,c);d=av(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
950
+ function av(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?kb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function bv(a){var b=null;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("encv",Lg).box("enca",Mg).box("sinf",Gg).box("schi",Gg).O("tenc",function(c){c=c.reader;c.P();c.P();c.P();c.P();b=Ad(c.sb(16))}).parse(a,!0);return b};function cv(){var a=this;this.g=this.i=null;this.A=1;this.o=new Map;this.H=new Map;this.K=new Map;this.K.set("video",new Map);this.K.set("audio",new Map);this.K.set(Kd,new Map);this.K.set("image",new Map);this.Ia=new Set;this.h=new Map;this.l=null;this.aa="";this.Ga=new Qu;this.I=-1;this.T=Infinity;this.ea=this.mb=!1;this.s=new Mc(function(){dv(a)});this.qa=ev;this.C=null;this.Ha=0;this.m=Infinity;this.ta=this.sa=this.L=0;this.N=new dg;this.F=new Map;this.G=new Map;this.Y=new Map;this.ba=new Map;
951
+ this.da=new Map;this.ia=new Map;this.pa=new Map;this.lb=this.B=!1;this.cb=new Qa(5);this.j=null}r=cv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return L(function(e){return 1==e.g?(c.i=b,c.B=b.isLowLatencyMode(),C(e,fv(c,[a]),2)):3!=e.g?(d=e.h,c.aa=d.uri,C(e,gv(c,d.data,a),3)):e.return(c.C)})};
952
952
  r.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.i=null;this.Ia.clear();this.C=null;this.h.clear();this.H.clear();this.G.clear();this.o.clear();this.Y.clear();this.ba.clear();this.da.clear();this.ia.clear();this.pa.clear();this.j&&this.j.destroy();return Promise.all(a)};
953
- r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!iv(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(jv(a,g));return C(m,Promise.all(b),2)}kv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.fd});d.length&&!h&&(k=lv,mv(a,k.Rg),l=d.map(function(n){return n.yb}),a.l.$a(Math.min.apply(Math,y(l))),a.i.updateDuration());
954
- h&&nv(a);F(m)})};function ov(a,b){return iv(a)?a.K.get(b.type):b.$d}
955
- function jv(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R;return L(function(S){if(1==S.g){c=[];d=u(b.$());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rc(f),h=g.g,b.Gd&&(0<=b.gb&&h.add("_HLS_msn",String(b.gb)),0<=b.hb&&h.add("_HLS_part",String(b.hb))),b.Hd&&h.add("_HLS_skip","YES"),Hc(h)&&vc(g,h),c.push(g.toString());return C(S,gv(a,c,!0),2)}if(3!=S.g){k=S.h;if(!b.stream.segmentIndex)return S.return();l=Su(a.Ga,k.data);if(1!=l.type)throw new Q(2,4,4017);m=k.uri;m==k.originalUri||
956
- b.$().includes(m)||b.ug.push(m);n=Hu(l.g,"EXT-X-DEFINE");q=pv(a,n,m);p=b.stream;t=ov(a,b);return C(S,qv(a,l,p.mimeType,b.$,q),3)}w=S.h;x=w.keyIds;z=w.drmInfos;v=function(V,xa){return V.size===xa.size&&[].concat(y(V)).every(function(Ca){return xa.has(Ca)})};v(p.keyIds,x)||(p.keyIds=x,p.drmInfos=z,a.i.newDrmInfo(p));B=rv(a,l,p,t,q,b.$,b.type);A=B.segments;if(D=B.bandwidth)p.bandwidth=D;p.segmentIndex.kd(A,a.l.qb());A.length&&(H=Ku(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(J=Ju(l.g,"EXT-X-SKIP"))?Number(Z(J,
957
- "SKIPPED-SEGMENTS")):0,E=sv(H,A),G=E.gb,K=E.hb,b.gb=G+I,b.hb=K,M=t.get(H),p.segmentIndex.La(M));O=A[0];b.fc=O.startTime;N=A[A.length-1];b.yb=N.endTime;if(R=Ju(l.g,"EXT-X-ENDLIST"))b.fd=!0;tv(a,l);F(S)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
958
- function uv(a,b){for(var c=-1==a.I,d=u(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=ov(a,e);if(f=f.g[0]||null){g=u(g);for(var h=g.next();!h.done;h=g.next()){h=u(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.I=Math.max(a.I,k));e.Ee=k;break}}}}if(!(0>a.I))for(b=u(b),e=b.next();!e.done;e=b.next())if(c=e.value,vv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.I-c.Ee,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),wv(a,
953
+ r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!hv(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(iv(a,g));return C(m,Promise.all(b),2)}jv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.fd});d.length&&!h&&(k=kv,lv(a,k.Rg),l=d.map(function(n){return n.yb}),a.l.ab(Math.min.apply(Math,y(l))),a.i.updateDuration());
954
+ h&&mv(a);F(m)})};function nv(a,b){return hv(a)?a.K.get(b.type):b.$d}
955
+ function iv(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R;return L(function(S){if(1==S.g){c=[];d=u(b.$());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rc(f),h=g.g,b.Gd&&(0<=b.gb&&h.add("_HLS_msn",String(b.gb)),0<=b.hb&&h.add("_HLS_part",String(b.hb))),b.Hd&&h.add("_HLS_skip","YES"),Hc(h)&&vc(g,h),c.push(g.toString());return C(S,fv(a,c,!0),2)}if(3!=S.g){k=S.h;if(!b.stream.segmentIndex)return S.return();l=Ru(a.Ga,k.data);if(1!=l.type)throw new Q(2,4,4017);m=k.uri;m==k.originalUri||
956
+ b.$().includes(m)||b.ug.push(m);n=Gu(l.g,"EXT-X-DEFINE");q=ov(a,n,m);p=b.stream;t=nv(a,b);return C(S,pv(a,l,p.mimeType,b.$,q),3)}w=S.h;x=w.keyIds;z=w.drmInfos;v=function(V,xa){return V.size===xa.size&&[].concat(y(V)).every(function(Ca){return xa.has(Ca)})};v(p.keyIds,x)||(p.keyIds=x,p.drmInfos=z,a.i.newDrmInfo(p));B=qv(a,l,p,t,q,b.$,b.type);A=B.segments;if(D=B.bandwidth)p.bandwidth=D;p.segmentIndex.kd(A,a.l.qb());A.length&&(H=Ju(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(J=Iu(l.g,"EXT-X-SKIP"))?Number(Z(J,
957
+ "SKIPPED-SEGMENTS")):0,E=rv(H,A),G=E.gb,K=E.hb,b.gb=G+I,b.hb=K,M=t.get(H),p.segmentIndex.La(M));O=A[0];b.fc=O.startTime;N=A[A.length-1];b.yb=N.endTime;if(R=Iu(l.g,"EXT-X-ENDLIST"))b.fd=!0;sv(a,l);F(S)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
958
+ function tv(a,b){for(var c=-1==a.I,d=u(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=nv(a,e);if(f=f.g[0]||null){g=u(g);for(var h=g.next();!h.done;h=g.next()){h=u(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.I=Math.max(a.I,k));e.Ee=k;break}}}}if(!(0>a.I))for(b=u(b),e=b.next();!e.done;e=b.next())if(c=e.value,uv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.I-c.Ee,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),vv(a,
959
959
  c,d)}
960
- function xv(a,b){if(Infinity==a.T){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.T=Math.min(a.T,d.h))}}b=a.T;if(Infinity!=b)for(d=u(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!vv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$(),"Expect AV sync issues!");else for(wv(a,c,f.h-b-f.startTime),c=u(e),e=c.next();!e.done;e=c.next())e.value.Hf(b)}}}
961
- function wv(a,b,c){b.fc+=c;b.yb+=c;a=ov(a,b);for(var d=u(a),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.$()}
962
- function hv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R,S,V,xa,Ca,db,Fa,Va;return L(function(ua){switch(ua.g){case 1:d=Su(a.Ga,b);e=Hu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new jk(null,0);a.l.Ec(!0);k=function(){return[c]};if(1==d.type)return C(ua,yv(a,d,k),7);zv(a,e);l=Hu(d.g,"EXT-X-MEDIA");m=Hu(d.g,"EXT-X-STREAM-INF");n=Hu(d.g,"EXT-X-IMAGE-STREAM-INF");q=Hu(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Hu(d.g,"EXT-X-SESSION-KEY");t=Hu(d.g,"EXT-X-SESSION-DATA");w=Hu(d.g,"EXT-X-CONTENT-STEERING");
963
- Av(a,t);return C(ua,Bv(a,w),4);case 4:return Cv(a,m),Dv(a,l),C(ua,Ev(a,m,p,l,k,a.o),5);case 5:return f=ua.h,g=Fv(a,l),C(ua,Gv(a,n,q),6);case 6:h=ua.h;ua.u(3);break;case 7:return x=ua.h,z=x.type,v=x.mimeType,B=x.codecs,A=x.language,D=x.height,H=x.width,J=x.channelCount,I=x.sampleRate,E=x.closedCaptions,G=x.Nf,C(ua,Hv(a,a.A++,d,k,c,B,z,A,!0,"Media Playlist",J,E,null,!1,I,!1,v),8);case 8:K=ua.h,a.h.set(c,K),"video"==z&&Iv(K.stream,H,D,null,G,null),f.push({id:0,language:se(A||"und"),disabledUntilTime:0,
964
- primary:!0,audio:"audio"==z?K.stream:null,video:"video"==z?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new Q(2,7,7001);1==d.type&&(iv(a)&&(Jv(a,d),M=a.m,a.s.U(M)),O=Array.from(a.h.values()),Kv(a,O),nv(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
960
+ function wv(a,b){if(Infinity==a.T){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.T=Math.min(a.T,d.h))}}b=a.T;if(Infinity!=b)for(d=u(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!uv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$(),"Expect AV sync issues!");else for(vv(a,c,f.h-b-f.startTime),c=u(e),e=c.next();!e.done;e=c.next())e.value.Hf(b)}}}
961
+ function vv(a,b,c){b.fc+=c;b.yb+=c;a=nv(a,b);for(var d=u(a),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.$()}
962
+ function gv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R,S,V,xa,Ca,db,Fa,Va;return L(function(ua){switch(ua.g){case 1:d=Ru(a.Ga,b);e=Gu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new ik(null,0);a.l.Ec(!0);k=function(){return[c]};if(1==d.type)return C(ua,xv(a,d,k),7);yv(a,e);l=Gu(d.g,"EXT-X-MEDIA");m=Gu(d.g,"EXT-X-STREAM-INF");n=Gu(d.g,"EXT-X-IMAGE-STREAM-INF");q=Gu(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Gu(d.g,"EXT-X-SESSION-KEY");t=Gu(d.g,"EXT-X-SESSION-DATA");w=Gu(d.g,"EXT-X-CONTENT-STEERING");
963
+ zv(a,t);return C(ua,Av(a,w),4);case 4:return Bv(a,m),Cv(a,l),C(ua,Dv(a,m,p,l,k,a.o),5);case 5:return f=ua.h,g=Ev(a,l),C(ua,Fv(a,n,q),6);case 6:h=ua.h;ua.u(3);break;case 7:return x=ua.h,z=x.type,v=x.mimeType,B=x.codecs,A=x.language,D=x.height,H=x.width,J=x.channelCount,I=x.sampleRate,E=x.closedCaptions,G=x.Nf,C(ua,Gv(a,a.A++,d,k,c,B,z,A,!0,"Media Playlist",J,E,null,!1,I,!1,v),8);case 8:K=ua.h,a.h.set(c,K),"video"==z&&Hv(K.stream,H,D,null,G,null),f.push({id:0,language:se(A||"und"),disabledUntilTime:0,
964
+ primary:!0,audio:"audio"==z?K.stream:null,video:"video"==z?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new Q(2,7,7001);1==d.type&&(hv(a)&&(Iv(a,d),M=a.m,a.s.U(M)),O=Array.from(a.h.values()),Jv(a,O),mv(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
965
965
  type:"HLS",serviceDescription:null};if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(9);break}N=[];R=u(a.C.variants);for(S=R.next();!S.done;S=R.next())V=S.value,V.audio&&""===V.audio.codecs&&N.push(V.audio.createSegmentIndex()),V.video&&""===V.video.codecs&&N.push(V.video.createSegmentIndex());return C(ua,Promise.all(N),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.C);if(1==f.length){xa=[];Ca=f[0];db=u([Ca.video,Ca.audio]);for(Fa=db.next();!Fa.done;Fa=db.next())(Va=Fa.value)&&!Va.segmentIndex&&xa.push(Va.createSegmentIndex());
966
966
  if(0<xa.length)return C(ua,Promise.all(xa),0)}ua.u(0)}})}
967
- function yv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J;return L(function(I){switch(I.g){case 1:d=Zu(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return I.return(d);e=b.segments[0];f=Lu(c(),e.h);g=f[0];h=new rc(g);k=h.Pa.split(".").pop();if(l=Lv[k])return I.return(Zu(l));m=pg;n=null;q=Mv(a,b,e.g,c);a.Y.clear();if(!q){I.u(2);break}p=jl(q.$(),q.ac(),q.Yb(),a.g.retryParameters);return C(I,Nv(a,p,m,{type:0}),3);case 3:t=I.h,n=t.data;case 2:w=0;x=null;if(z=Ju(e.g,"EXT-X-BYTERANGE"))v=
968
- u(Ov(null,z.value)),w=v.next().value,x=v.next().value;B=jl(f,w,x,a.g.retryParameters);return C(I,Nv(a,B,m,{type:1}),4);case 4:A=I.h;(D=A.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==k||"video/mp2t"==D){var E=A.data;var G=Ab(E);G=(new kj).parse(G);var K=G.bd();G=G.Xe();var M=[],O=!1,N=!1;switch(K.audio){case "aac":case "aac-loas":M.push("mp4a.40.2");O=!0;break;case "mp3":M.push("mp4a.40.34");O=!0;break;case "ac3":M.push("ac-3");O=!0;break;case "ec3":M.push("ec-3");O=!0;break;
967
+ function xv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J;return L(function(I){switch(I.g){case 1:d=Yu(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return I.return(d);e=b.segments[0];f=Ku(c(),e.h);g=f[0];h=new rc(g);k=h.Pa.split(".").pop();if(l=Kv[k])return I.return(Yu(l));m=pg;n=null;q=Lv(a,b,e.g,c);a.Y.clear();if(!q){I.u(2);break}p=il(q.$(),q.ac(),q.Yb(),a.g.retryParameters);return C(I,Mv(a,p,m,{type:0}),3);case 3:t=I.h,n=t.data;case 2:w=0;x=null;if(z=Iu(e.g,"EXT-X-BYTERANGE"))v=
968
+ u(Nv(null,z.value)),w=v.next().value,x=v.next().value;B=il(f,w,x,a.g.retryParameters);return C(I,Mv(a,B,m,{type:1}),4);case 4:A=I.h;(D=A.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==k||"video/mp2t"==D){var E=A.data;var G=Ab(E);G=(new jj).parse(G);var K=G.bd();G=G.Xe();var M=[],O=!1,N=!1;switch(K.audio){case "aac":case "aac-loas":M.push("mp4a.40.2");O=!0;break;case "mp3":M.push("mp4a.40.34");O=!0;break;case "ac3":M.push("ac-3");O=!0;break;case "ec3":M.push("ec-3");O=!0;break;
969
969
  case "opus":M.push("opus"),O=!0}switch(K.video){case "avc":G.Ea?M.push(G.Ea):M.push("avc1.42E01E");N=!0;break;case "hvc":G.Ea?M.push(G.Ea):M.push("hvc1.1.6.L93.90");N=!0;break;case "av1":M.push("av01.0.01M.08"),N=!0}if(M.length){K=O&&!N;O=new Map;if(N){N=new Gb("video/mp2t");N.i(E);E=u(N.j());for(var R=E.next();!R.done;R=E.next())R=R.value,O.set(R,R);N.g()}G={type:K?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:G.height,width:G.width,channelCount:null,sampleRate:null,
970
- closedCaptions:O,Nf:null}}else G=null;if(H=G)return I.return(H)}else if("mp4"==k||"cmfv"==k||"m4s"==k||"fmp4"==k||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(J=$u(n,A.data))return I.return(J);return I.return(d)}})}
971
- function nv(a){if(iv(a)){if(a.qa==Pv){for(var b,c=b=Infinity,d=u(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.yb),c=Math.min(c,e.fc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ke(b)}}else a.l.$a(Qv(a));if(!a.l.o)for(b=u(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
972
- c.h&&a.l.Dg(c.h);a.l.Xd()}function zv(a,b){var c=(new rc(a.aa)).g;b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
973
- function pv(a,b,c){c=(new rc(c)).g;var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.o.get(f))&&d.set(f,e)}return d}
974
- function Cv(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Rv(a,d);if(f){var g=Id(Kd,d);a.G.set(f,g);Kb(d,g)}e&&(f=Id("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Id("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
975
- function Av(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Lu([a.aa],c,a.o)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new T("sessiondata",e);if(a.i)a.i.onEvent(c)}}
976
- function Bv(a,b){var c,d,e,f,g,h;return L(function(k){if(!a.i||!a.g)return k.return();d=u(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new Ys(a.i);a.j.configure(a.g);a.j.i=[a.aa];a.j.setManifestType("HLS");a.j.h=g;c=Zs(a.j,h);break}return C(k,c,0)})}
977
- function Fv(a,b){var c=Iu(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Sv(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=u(c);for(var d=c.next();!d.done;d=c.next()){var e=Eu(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=u(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Tv(Kd,d)||Uv(Kd),Vv(f.stream)}}return b.filter(function(g){return g})}
978
- function Vv(a){a.fullMimeTypes=new Set([Od(a.mimeType,a.codecs)])}
979
- function Gv(a,b,c){var d,e;return L(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return L(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ra(m,2);return C(m,Wv(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=va(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Eu(g,"URI"),k=Z(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
980
- q=Z(g,"CHARACTERISTICS"),p=Xv(a,a.A++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),t=Z(g,"RESOLUTION"),w=u(t?t.split("x"):[null,null]),x=w.next().value,z=w.next().value;p.stream.width=Number(x)||void 0;p.stream.height=Number(z)||void 0;var v=Z(g,"BANDWIDTH");v&&(p.stream.bandwidth=Number(v));a.h.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),C(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
981
- function Yv(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Cu(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Sv(a,d[g],c)}
982
- function Ev(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R,S,V,xa,Ca,db;return L(function(Fa){switch(Fa.g){case 1:g=[];h=new Set;if(!(0<c.length)){Fa.u(2);break}k=u(c);l=k.next();case 3:if(l.done){Fa.u(2);break}m=l.value;n=Eu(m,"METHOD");q=Z(m,"KEYFORMAT")||"identity";p=null;if("NONE"==n||Zv(n)){Fa.u(4);break}if("identity"!=q){p=(t=$v[q])?t(m,""):null;Fa.u(6);break}return C(Fa,aw(a,m,"",e,null,f),8);case 8:p=Fa.h;case 6:if(p){if(p.keyIds)for(w=u(p.keyIds),x=w.next();!x.done;x=
983
- w.next())z=x.value,h.add(z);g.push(p)}case 4:l=k.next();Fa.u(3);break;case 2:v={};B=u(b);for(A=B.next();!A.done;A=B.next())D=A.value,H=Cu(D),v[H]?v[H].push(D):v[H]=[D];J=[];for(I in v)E=v[I],G=E[0],K=Z(G,"FRAME-RATE"),M=Number(Z(G,"AVERAGE-BANDWIDTH"))||Number(Eu(G,"BANDWIDTH")),O=Z(G,"RESOLUTION"),N=u(O?O.split("x"):[null,null]),R=N.next().value,S=N.next().value,V=Z(G,"VIDEO-RANGE"),(xa=Z(G,"REQ-VIDEO-LAYOUT"))&&xa.includes(",")&&(Ca=xa.split(",").filter(function(Va){return"CH-STEREO"==Va||"CH-MONO"==
984
- Va}),xa=Ca[0]),xa=xa||"CH-MONO",db=bw(a,E,d,M),J.push.apply(J,y(cw(a,db.audio,db.video,M,R,S,K,V,xa,g,h)));return Fa.return(J.filter(function(Va){return null!=Va}))}})}
985
- function bw(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=u(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=Z(n,"AUDIO");var q=Z(n,"VIDEO"),p=m||q;p&&(g.includes(p)||g.push(p),(n=Z(n,"PATHWAY-ID"))&&f.set(p,n),m?h=!0:q&&(k=!0))}g.length&&c.length&&(l=c.filter(function(x){return g.includes(Eu(x,"GROUP-ID"))}),Yv(a,l,f));l=(f=g.sort().join(","))&&a.H.has(f)?a.H.get(f):[];h?e.audio.push.apply(e.audio,y(l)):k&&e.video.push.apply(e.video,y(l));m=!1;var t=b.map(function(x){return Eu(x,
986
- "URI")});k=e.audio.find(function(x){return x&&x.$().find(function(z){return t.includes(z)})});h=Rv(a,b[0]);q=Id("video",h);(p=Id("audio",h))&&!q?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&p&&q?(k="video",h=[[q,p].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var w=n=p=q=m=null;!l.length&&(c=c.find(function(x){var z=Z(x,"URI")||"",v=Z(x,"TYPE");x=Eu(x,"GROUP-ID");return"SUBTITLES"!=v&&""==z&&g.includes(x)}))&&(m=Z(c,"LANGUAGE"),
987
- q=Z(c,"NAME"),p=dw(c),ew(c),n=Z(c,"CHARACTERISTICS"),w=fw(c));a=gw(a,b,h,k,m,q,p,n,w);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
988
- function Rv(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.ea=0<c.length;a.ea||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,y(b)));return av(a)}function dw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
989
- function fw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function ew(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
990
- function cw(a,b,c,d,e,f,g,h,k,l,m){for(var n=u(c),q=n.next();!q.done;q=n.next())Iv(q.value.stream,e,f,g,h,k);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=u(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=u(c),h=g.next();!h.done;h=g.next()){var p=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=p?p.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;q=p?p.stream.drmInfos:null;p=p?p.$().sort().join(","):"";var t=f?f.$().sort().join(","):
970
+ closedCaptions:O,Nf:null}}else G=null;if(H=G)return I.return(H)}else if("mp4"==k||"cmfv"==k||"m4s"==k||"fmp4"==k||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(J=Zu(n,A.data))return I.return(J);return I.return(d)}})}
971
+ function mv(a){if(hv(a)){if(a.qa==Ov){for(var b,c=b=Infinity,d=u(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.yb),c=Math.min(c,e.fc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ke(b)}}else a.l.ab(Pv(a));if(!a.l.o)for(b=u(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
972
+ c.h&&a.l.Dg(c.h);a.l.Xd()}function yv(a,b){var c=(new rc(a.aa)).g;b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
973
+ function ov(a,b,c){c=(new rc(c)).g;var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.o.get(f))&&d.set(f,e)}return d}
974
+ function Bv(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Qv(a,d);if(f){var g=Id(Kd,d);a.G.set(f,g);Kb(d,g)}e&&(f=Id("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Id("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
975
+ function zv(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Ku([a.aa],c,a.o)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new T("sessiondata",e);if(a.i)a.i.onEvent(c)}}
976
+ function Av(a,b){var c,d,e,f,g,h;return L(function(k){if(!a.i||!a.g)return k.return();d=u(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new Xs(a.i);a.j.configure(a.g);a.j.i=[a.aa];a.j.setManifestType("HLS");a.j.h=g;c=Ys(a.j,h);break}return C(k,c,0)})}
977
+ function Ev(a,b){var c=Hu(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Rv(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=u(c);for(var d=c.next();!d.done;d=c.next()){var e=Du(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=u(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Sv(Kd,d)||Tv(Kd),Uv(f.stream)}}return b.filter(function(g){return g})}
978
+ function Uv(a){a.fullMimeTypes=new Set([Od(a.mimeType,a.codecs)])}
979
+ function Fv(a,b,c){var d,e;return L(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return L(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ra(m,2);return C(m,Vv(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=va(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Du(g,"URI"),k=Z(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
980
+ q=Z(g,"CHARACTERISTICS"),p=Wv(a,a.A++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),t=Z(g,"RESOLUTION"),w=u(t?t.split("x"):[null,null]),x=w.next().value,z=w.next().value;p.stream.width=Number(x)||void 0;p.stream.height=Number(z)||void 0;var v=Z(g,"BANDWIDTH");v&&(p.stream.bandwidth=Number(v));a.h.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),C(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
981
+ function Xv(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Bu(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Rv(a,d[g],c)}
982
+ function Dv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R,S,V,xa,Ca,db;return L(function(Fa){switch(Fa.g){case 1:g=[];h=new Set;if(!(0<c.length)){Fa.u(2);break}k=u(c);l=k.next();case 3:if(l.done){Fa.u(2);break}m=l.value;n=Du(m,"METHOD");q=Z(m,"KEYFORMAT")||"identity";p=null;if("NONE"==n||Yv(n)){Fa.u(4);break}if("identity"!=q){p=(t=Zv[q])?t(m,""):null;Fa.u(6);break}return C(Fa,$v(a,m,"",e,null,f),8);case 8:p=Fa.h;case 6:if(p){if(p.keyIds)for(w=u(p.keyIds),x=w.next();!x.done;x=
983
+ w.next())z=x.value,h.add(z);g.push(p)}case 4:l=k.next();Fa.u(3);break;case 2:v={};B=u(b);for(A=B.next();!A.done;A=B.next())D=A.value,H=Bu(D),v[H]?v[H].push(D):v[H]=[D];J=[];for(I in v)E=v[I],G=E[0],K=Z(G,"FRAME-RATE"),M=Number(Z(G,"AVERAGE-BANDWIDTH"))||Number(Du(G,"BANDWIDTH")),O=Z(G,"RESOLUTION"),N=u(O?O.split("x"):[null,null]),R=N.next().value,S=N.next().value,V=Z(G,"VIDEO-RANGE"),(xa=Z(G,"REQ-VIDEO-LAYOUT"))&&xa.includes(",")&&(Ca=xa.split(",").filter(function(Va){return"CH-STEREO"==Va||"CH-MONO"==
984
+ Va}),xa=Ca[0]),xa=xa||"CH-MONO",db=aw(a,E,d,M),J.push.apply(J,y(bw(a,db.audio,db.video,M,R,S,K,V,xa,g,h)));return Fa.return(J.filter(function(Va){return null!=Va}))}})}
985
+ function aw(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=u(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=Z(n,"AUDIO");var q=Z(n,"VIDEO"),p=m||q;p&&(g.includes(p)||g.push(p),(n=Z(n,"PATHWAY-ID"))&&f.set(p,n),m?h=!0:q&&(k=!0))}g.length&&c.length&&(l=c.filter(function(x){return g.includes(Du(x,"GROUP-ID"))}),Xv(a,l,f));l=(f=g.sort().join(","))&&a.H.has(f)?a.H.get(f):[];h?e.audio.push.apply(e.audio,y(l)):k&&e.video.push.apply(e.video,y(l));m=!1;var t=b.map(function(x){return Du(x,
986
+ "URI")});k=e.audio.find(function(x){return x&&x.$().find(function(z){return t.includes(z)})});h=Qv(a,b[0]);q=Id("video",h);(p=Id("audio",h))&&!q?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&p&&q?(k="video",h=[[q,p].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var w=n=p=q=m=null;!l.length&&(c=c.find(function(x){var z=Z(x,"URI")||"",v=Z(x,"TYPE");x=Du(x,"GROUP-ID");return"SUBTITLES"!=v&&""==z&&g.includes(x)}))&&(m=Z(c,"LANGUAGE"),
987
+ q=Z(c,"NAME"),p=cw(c),dw(c),n=Z(c,"CHARACTERISTICS"),w=ew(c));a=fw(a,b,h,k,m,q,p,n,w);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
988
+ function Qv(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.ea=0<c.length;a.ea||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,y(b)));return $u(a)}function cw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
989
+ function ew(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function dw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
990
+ function bw(a,b,c,d,e,f,g,h,k,l,m){for(var n=u(c),q=n.next();!q.done;q=n.next())Hv(q.value.stream,e,f,g,h,k);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=u(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=u(c),h=g.next();!h.done;h=g.next()){var p=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=p?p.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;q=p?p.stream.drmInfos:null;p=p?p.$().sort().join(","):"";var t=f?f.$().sort().join(","):
991
991
  "";p=p+" - "+t;h&&k&&!bi(n,q)||a.Ia.has(p)||(h={id:a.A++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Ia.add(p))}return e}
992
- function Dv(a,b){b=Iu(b,"CLOSED-CAPTIONS");b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=se(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Eu(d,"GROUP-ID");d=Eu(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
993
- function Sv(a,b,c){for(var d=[],e=[],f=new Map,g=u(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Eu(k,"URI");k=Eu(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Eu(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Kd);if(k==Kd)b=Z(h,"CODECS")||"";else{e=u(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.h.has(e))return a.h.get(e);l=a.A++;if(a.j){f=u(f);for(var m=f.next();!m.done;m=f.next()){var n=u(m.value);
994
- m=n.next().value;n=n.next().value;(m=c.get(m))&&bt(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?dw(h):null;var q="audio"==k?ew(h):!1,p=Z(h,"CHARACTERISTICS"),t="YES"==Z(h,"FORCED");h="audio"==k?fw(h):null;d=Xv(a,l,d,b,k,c,m,f,n,null,p,t,h,q);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.h.set(e,d);return d}
995
- function Wv(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Eu(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return q.return(a.h.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Xv(a,a.A++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?C(q,h.stream.createSegmentIndex(),3):q.u(2)}2!=q.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
992
+ function Cv(a,b){b=Hu(b,"CLOSED-CAPTIONS");b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=se(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Du(d,"GROUP-ID");d=Du(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
993
+ function Rv(a,b,c){for(var d=[],e=[],f=new Map,g=u(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Du(k,"URI");k=Du(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Du(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Kd);if(k==Kd)b=Z(h,"CODECS")||"";else{e=u(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.h.has(e))return a.h.get(e);l=a.A++;if(a.j){f=u(f);for(var m=f.next();!m.done;m=f.next()){var n=u(m.value);
994
+ m=n.next().value;n=n.next().value;(m=c.get(m))&&at(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?cw(h):null;var q="audio"==k?dw(h):!1,p=Z(h,"CHARACTERISTICS"),t="YES"==Z(h,"FORCED");h="audio"==k?ew(h):null;d=Wv(a,l,d,b,k,c,m,f,n,null,p,t,h,q);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.h.set(e,d);return d}
995
+ function Vv(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Du(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return q.return(a.h.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Wv(a,a.A++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?C(q,h.stream.createSegmentIndex(),3):q.u(2)}2!=q.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
996
996
  Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return q.return(h)})}
997
- function gw(a,b,c,d,e,f,g,h,k){for(var l=a.A++,m=[],n=u(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=Eu(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&bt(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}if(!b&&a.F.size)for(b=u(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=Hd(d,c);d=Xv(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
998
- function Xv(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function t(D){var H,J,I,E,G,K,M,O,N,R,S,V,xa,Ca,db,Fa,Va;return L(function(ua){switch(ua.g){case 1:return H=v.$(),C(ua,gv(a,v.$(),!0),2);case 2:J=ua.h;if(D.aborted)return ua.return();I=J.uri;I==J.originalUri||H.includes(I)||z.push(I);E=Su(a.Ga,J.data);G=void 0;if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(3);break}return C(ua,yv(a,E,w),4);case 4:K=ua.h,G=K.mimeType,d=K.codecs;case 3:return M=iv(a),C(ua,Hv(a,0,E,w,I,d,e,f,g,h,k,l,m,n,q,p,G),5);case 5:O=ua.h;
999
- if(D.aborted)return ua.return();N=O.stream;iv(a)&&!M&&Jv(a,E);v.fc=O.fc;v.yb=O.yb;v.Hd=O.Hd;v.Gd=O.Gd;v.fd=O.fd;v.$d=O.$d;v.gb=O.gb;v.hb=O.hb;v.ef=!0;x.segmentIndex=N.segmentIndex;x.encrypted=N.encrypted;x.drmInfos=N.drmInfos;x.keyIds=N.keyIds;x.mimeType=N.mimeType;x.bandwidth=x.bandwidth||N.bandwidth;x.codecs=x.codecs||N.codecs;Vv(x);x.drmInfos.length&&a.i.newDrmInfo(x);R=Md;if(e==R.fa||e==R.S)for(S=u(a.h.values()),V=S.next();!V.done;V=S.next())xa=V.value,xa.ef||xa.type!=e||(xa.stream.mimeType=N.mimeType,
1000
- Vv(xa.stream));e==R.ma&&(Ca=N.segmentIndex.get(0))&&Ca.ca&&(x.mimeType="application/mp4",Vv(x));hw(a)&&(a.mb?Kv(a,[v]):(a.mb=!0,db=Array.from(a.h.values()),Fa=db.filter(function(lb){return lb.stream.segmentIndex}),Kv(a,Fa),nv(a),Va=a.m,0<Va&&a.s.U(Va)));F(ua)}})}function w(){return a.j&&1<c.length?ct(a.j,b):z.concat(Mu([a.aa],c,a.o))}var x=iw(a,d,e,f,g,h,k,l,m,n,q,p),z=[],v={stream:x,type:e,ug:z,$:w,fc:0,yb:0,$d:new Map,Hd:!1,Gd:!1,fd:!1,Ee:-1,gb:-1,hb:-1,ef:!1},B=null,A=new AbortController;x.createSegmentIndex=
1001
- function(){if(B)return B;A=new AbortController;return B=new Promise(function(D){D(t(A.signal))})};x.closeSegmentIndex=function(){B&&!x.segmentIndex&&A.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);B=null};return v}function Qv(a){var b=Infinity;a=u(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.yb));return b}
1002
- function kv(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.tc(function(e){c.push(e)});a.l.ld(c)}function Kv(a,b){if(!iv(a))for(var c=Qv(a),d=u(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.sc(0,c);kv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?uv(a,b):(xv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&uv(a,b))}
1003
- function vv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function hw(a){if(!a.C)return!1;var b=[],c=[];a=u(a.C.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
1004
- function Hv(a,b,c,d,e,f,g,h,k,l,m,n,q,p,t,w,x){var z,v,B,A,D,H,J,I,E,G,K,M,O,N,R,S,V,xa,Ca,db,Fa,Va,ua;return L(function(lb){switch(lb.g){case 1:if(1!=c.type)throw new Q(2,4,4017);z=Hu(c.g,"EXT-X-DEFINE");v=pv(a,z,e);var zb=Ju(c.g,"EXT-X-PLAYLIST-TYPE"),hb=Ju(c.g,"EXT-X-ENDLIST");hb=zb&&"VOD"==zb.value||hb;zb=zb&&"EVENT"==zb.value&&!hb;zb=!hb&&!zb;hb?mv(a,fv):zb?mv(a,Pv):mv(a,jw);iv(a)&&tv(a,c);if(x){lb.u(2);break}return C(lb,kw(a,g,f,c,v,d),3);case 3:x=lb.h;case 2:return C(lb,qv(a,c,x,d,v),4);case 4:B=
1005
- lb.h;A=B.drmInfos;D=B.keyIds;H=B.encrypted;J=B.Vg;if(H&&!A.length&&!J)throw new Q(2,4,4026);I=iw(a,f,g,h,k,l,m,n,q,p,t,w);I.encrypted=H;I.drmInfos=A;I.keyIds=D;I.mimeType=x;Vv(I);E=iv(a)?a.K.get(g):new Map;G=rv(a,c,I,E,v,d,g);K=G.segments;if(M=G.bandwidth)I.bandwidth=M;iv(a)&&tv(a,c);O=K[0].startTime;N=K[K.length-1];R=N.endTime;S=new Fk(K);I.segmentIndex=S;xa=(V=Ju(c.g,"EXT-X-SERVER-CONTROL"))?null!=Du(V,"CAN-SKIP-UNTIL"):!1;Ca=V?null!=Du(V,"CAN-BLOCK-RELOAD"):!1;db=Ku(c.g,"EXT-X-MEDIA-SEQUENCE",
1006
- 0);Fa=sv(db,K);Va=Fa.gb;ua=Fa.hb;return lb.return({stream:I,type:g,ug:[],$:d,fc:O,yb:R,Hd:xa,Gd:Ca,fd:!1,Ee:-1,gb:Va,hb:ua,$d:E,ef:!1})}})}function sv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{gb:a,hb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{gb:a,hb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{gb:a,hb:c}}
1007
- function iw(a,b,c,d,e,f,g,h,k,l,m,n){var q=Tv(c,b)||Uv(c),p=[];if(k){k=u(k.split(","));for(var t=k.next();!t.done;t=k.next())p.push(t.value)}k=void 0;t=null;c==Kd?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(t="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");a={id:a.A++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
997
+ function fw(a,b,c,d,e,f,g,h,k){for(var l=a.A++,m=[],n=u(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=Du(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&at(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}if(!b&&a.F.size)for(b=u(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=Hd(d,c);d=Wv(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
998
+ function Wv(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function t(D){var H,J,I,E,G,K,M,O,N,R,S,V,xa,Ca,db,Fa,Va;return L(function(ua){switch(ua.g){case 1:return H=v.$(),C(ua,fv(a,v.$(),!0),2);case 2:J=ua.h;if(D.aborted)return ua.return();I=J.uri;I==J.originalUri||H.includes(I)||z.push(I);E=Ru(a.Ga,J.data);G=void 0;if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(3);break}return C(ua,xv(a,E,w),4);case 4:K=ua.h,G=K.mimeType,d=K.codecs;case 3:return M=hv(a),C(ua,Gv(a,0,E,w,I,d,e,f,g,h,k,l,m,n,q,p,G),5);case 5:O=ua.h;
999
+ if(D.aborted)return ua.return();N=O.stream;hv(a)&&!M&&Iv(a,E);v.fc=O.fc;v.yb=O.yb;v.Hd=O.Hd;v.Gd=O.Gd;v.fd=O.fd;v.$d=O.$d;v.gb=O.gb;v.hb=O.hb;v.ef=!0;x.segmentIndex=N.segmentIndex;x.encrypted=N.encrypted;x.drmInfos=N.drmInfos;x.keyIds=N.keyIds;x.mimeType=N.mimeType;x.bandwidth=x.bandwidth||N.bandwidth;x.codecs=x.codecs||N.codecs;Uv(x);x.drmInfos.length&&a.i.newDrmInfo(x);R=Md;if(e==R.fa||e==R.S)for(S=u(a.h.values()),V=S.next();!V.done;V=S.next())xa=V.value,xa.ef||xa.type!=e||(xa.stream.mimeType=N.mimeType,
1000
+ Uv(xa.stream));e==R.ma&&(Ca=N.segmentIndex.get(0))&&Ca.ca&&(x.mimeType="application/mp4",Uv(x));gw(a)&&(a.mb?Jv(a,[v]):(a.mb=!0,db=Array.from(a.h.values()),Fa=db.filter(function(lb){return lb.stream.segmentIndex}),Jv(a,Fa),mv(a),Va=a.m,0<Va&&a.s.U(Va)));F(ua)}})}function w(){return a.j&&1<c.length?bt(a.j,b):z.concat(Lu([a.aa],c,a.o))}var x=hw(a,d,e,f,g,h,k,l,m,n,q,p),z=[],v={stream:x,type:e,ug:z,$:w,fc:0,yb:0,$d:new Map,Hd:!1,Gd:!1,fd:!1,Ee:-1,gb:-1,hb:-1,ef:!1},B=null,A=new AbortController;x.createSegmentIndex=
1001
+ function(){if(B)return B;A=new AbortController;return B=new Promise(function(D){D(t(A.signal))})};x.closeSegmentIndex=function(){B&&!x.segmentIndex&&A.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);B=null};return v}function Pv(a){var b=Infinity;a=u(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.yb));return b}
1002
+ function jv(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.tc(function(e){c.push(e)});a.l.ld(c)}function Jv(a,b){if(!hv(a))for(var c=Pv(a),d=u(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.sc(0,c);jv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?tv(a,b):(wv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&tv(a,b))}
1003
+ function uv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function gw(a){if(!a.C)return!1;var b=[],c=[];a=u(a.C.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
1004
+ function Gv(a,b,c,d,e,f,g,h,k,l,m,n,q,p,t,w,x){var z,v,B,A,D,H,J,I,E,G,K,M,O,N,R,S,V,xa,Ca,db,Fa,Va,ua;return L(function(lb){switch(lb.g){case 1:if(1!=c.type)throw new Q(2,4,4017);z=Gu(c.g,"EXT-X-DEFINE");v=ov(a,z,e);var zb=Iu(c.g,"EXT-X-PLAYLIST-TYPE"),hb=Iu(c.g,"EXT-X-ENDLIST");hb=zb&&"VOD"==zb.value||hb;zb=zb&&"EVENT"==zb.value&&!hb;zb=!hb&&!zb;hb?lv(a,ev):zb?lv(a,Ov):lv(a,iw);hv(a)&&sv(a,c);if(x){lb.u(2);break}return C(lb,jw(a,g,f,c,v,d),3);case 3:x=lb.h;case 2:return C(lb,pv(a,c,x,d,v),4);case 4:B=
1005
+ lb.h;A=B.drmInfos;D=B.keyIds;H=B.encrypted;J=B.Vg;if(H&&!A.length&&!J)throw new Q(2,4,4026);I=hw(a,f,g,h,k,l,m,n,q,p,t,w);I.encrypted=H;I.drmInfos=A;I.keyIds=D;I.mimeType=x;Uv(I);E=hv(a)?a.K.get(g):new Map;G=qv(a,c,I,E,v,d,g);K=G.segments;if(M=G.bandwidth)I.bandwidth=M;hv(a)&&sv(a,c);O=K[0].startTime;N=K[K.length-1];R=N.endTime;S=new Ek(K);I.segmentIndex=S;xa=(V=Iu(c.g,"EXT-X-SERVER-CONTROL"))?null!=Cu(V,"CAN-SKIP-UNTIL"):!1;Ca=V?null!=Cu(V,"CAN-BLOCK-RELOAD"):!1;db=Ju(c.g,"EXT-X-MEDIA-SEQUENCE",
1006
+ 0);Fa=rv(db,K);Va=Fa.gb;ua=Fa.hb;return lb.return({stream:I,type:g,ug:[],$:d,fc:O,yb:R,Hd:xa,Gd:Ca,fd:!1,Ee:-1,gb:Va,hb:ua,$d:E,ef:!1})}})}function rv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{gb:a,hb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{gb:a,hb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{gb:a,hb:c}}
1007
+ function hw(a,b,c,d,e,f,g,h,k,l,m,n){var q=Sv(c,b)||Tv(c),p=[];if(k){k=u(k.split(","));for(var t=k.next();!t.done;t=k.next())p.push(t.value)}k=void 0;t=null;c==Kd?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(t="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");a={id:a.A++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1008
1008
  segmentIndex:null,mimeType:q,codecs:b,kind:c==Kd?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:se(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:p,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:t,external:!1,fastSwitching:!1,fullMimeTypes:new Set};
1009
- Vv(a);return a}
1010
- function qv(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R,S;return L(function(V){switch(V.g){case 1:f=new Map;if(b.segments)for(g=u(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Hu(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Mv(a,b,k.g,d,e),n=u(l),q=n.next();!q.done;q=n.next())p=q.value,f.set(p,m);w=t=!1;x=[];z=new Set;v=u(f);B=v.next();case 2:if(B.done){V.u(4);break}A=B.value;D=u(A);H=D.next().value;J=D.next().value;I=H;E=J;G=Eu(I,"METHOD");if("NONE"==G){V.u(3);break}t=
1011
- !0;K=Z(I,"KEYFORMAT")||"identity";M=null;if(Zv(G)){w=!0;V.u(3);break}if("identity"!=K){M=(O=$v[K])?O(I,c):null;V.u(6);break}return C(V,aw(a,I,c,d,E,e),8);case 8:M=V.h;case 6:if(M){if(M.keyIds)for(N=u(M.keyIds),R=N.next();!R.done;R=N.next())S=R.value,z.add(S);x.push(M)}case 3:B=v.next();V.u(2);break;case 4:return V.return({drmInfos:x,keyIds:z,encrypted:t,Vg:w})}})}
1012
- function lw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new Q(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=zd(g.substr(2));if(16!=h.byteLength)throw new Q(2,4,4048);}else f=Ku(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ba.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Eu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
1013
- 256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,q,p,t,w;return L(function(x){if(1==x.g)return l=Lu(d(),Eu(b,"URI"),e),m=l.sort().join(""),a.da.has(m)||(n=jg(l,a.g.retryParameters),q=Nv(a,n,6),a.da.set(m,q)),C(x,a.da.get(m),2);if(3!=x.g){p=x.h;if(!p.data||p.data.byteLength!=k.bitsKey/8)throw new Q(2,4,4049);t={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};w=k;return C(x,window.crypto.subtle.importKey("raw",p.data,t,!0,["decrypt"]),3)}w.cryptoKey=x.h;k.fetchKey=void 0;
1009
+ Uv(a);return a}
1010
+ function pv(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N,R,S;return L(function(V){switch(V.g){case 1:f=new Map;if(b.segments)for(g=u(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Gu(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Lv(a,b,k.g,d,e),n=u(l),q=n.next();!q.done;q=n.next())p=q.value,f.set(p,m);w=t=!1;x=[];z=new Set;v=u(f);B=v.next();case 2:if(B.done){V.u(4);break}A=B.value;D=u(A);H=D.next().value;J=D.next().value;I=H;E=J;G=Du(I,"METHOD");if("NONE"==G){V.u(3);break}t=
1011
+ !0;K=Z(I,"KEYFORMAT")||"identity";M=null;if(Yv(G)){w=!0;V.u(3);break}if("identity"!=K){M=(O=Zv[K])?O(I,c):null;V.u(6);break}return C(V,$v(a,I,c,d,E,e),8);case 8:M=V.h;case 6:if(M){if(M.keyIds)for(N=u(M.keyIds),R=N.next();!R.done;R=N.next())S=R.value,z.add(S);x.push(M)}case 3:B=v.next();V.u(2);break;case 4:return V.return({drmInfos:x,keyIds:z,encrypted:t,Vg:w})}})}
1012
+ function kw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new Q(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=zd(g.substr(2));if(16!=h.byteLength)throw new Q(2,4,4048);}else f=Ju(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ba.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Du(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
1013
+ 256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,q,p,t,w;return L(function(x){if(1==x.g)return l=Ku(d(),Du(b,"URI"),e),m=l.sort().join(""),a.da.has(m)||(n=jg(l,a.g.retryParameters),q=Mv(a,n,6),a.da.set(m,q)),C(x,a.da.get(m),2);if(3!=x.g){p=x.h;if(!p.data||p.data.byteLength!=k.bitsKey/8)throw new Q(2,4,4049);t={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};w=k;return C(x,window.crypto.subtle.importKey("raw",p.data,t,!0,["decrypt"]),3)}w.cryptoKey=x.h;k.fetchKey=void 0;
1014
1014
  F(x)})};a.ba.set(c,k)}return a.ba.get(c)}
1015
- function tv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Ju(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Ju(b.g,"EXT-X-TARGETDURATION");if(!d)throw new Q(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Ju(b.g,"EXT-X-PART-INF"))a.L=Number(Eu(e,"PART-TARGET"));b=Ju(b.g,"EXT-X-SERVER-CONTROL");a.B&&a.L?(a.m=a.lb?5*a.L<=c?Math.min(a.L,a.m):Math.min(c,a.m):Math.min(a.L,a.m),a.ta=b?Number(Eu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
1016
- Du(b,"HOLD-BACK"):null,a.sa=c?Number(c.value):0);a.Ha=Math.max(d,a.Ha)}function Jv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ta)b=a.ta;else if(a.sa)b=a.sa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Ha*c}a.l.Eg(0);a.l.Df(b);a.l.Ec(!1)}
1017
- function Mv(a,b,c,d,e){var f=Ju(c,"EXT-X-MAP");if(!f)return null;var g=Eu(f,"URI"),h=Lu(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.Y.has(g)){var k=void 0,l=null;c=u(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Zv(Eu(m,"METHOD"))&&m.id<f.id&&(k=lw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=mw(h,f,l,k);a.Y.set(g,b)}return a.Y.get(g)}
1018
- function mw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new vi(function(){return a},e,f,null,null,null,d)}
1019
- function nw(a,b,c,d,e,f,g,h,k){var l=d.g,m=Ju(l,"EXTINF"),n=0,q=0,p=null;d.rb.length&&!a.B&&Wa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var t=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Ju(l,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(t=gh(w.value))}var x=yi;Ju(l,"EXT-X-GAP")&&(x=2);if(!m){if(0==d.rb.length)throw new Q(2,4,4024,"EXTINF");
1015
+ function sv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Iu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Iu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new Q(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Iu(b.g,"EXT-X-PART-INF"))a.L=Number(Du(e,"PART-TARGET"));b=Iu(b.g,"EXT-X-SERVER-CONTROL");a.B&&a.L?(a.m=a.lb?5*a.L<=c?Math.min(a.L,a.m):Math.min(c,a.m):Math.min(a.L,a.m),a.ta=b?Number(Du(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
1016
+ Cu(b,"HOLD-BACK"):null,a.sa=c?Number(c.value):0);a.Ha=Math.max(d,a.Ha)}function Iv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ta)b=a.ta;else if(a.sa)b=a.sa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Ha*c}a.l.Eg(0);a.l.Df(b);a.l.Ec(!1)}
1017
+ function Lv(a,b,c,d,e){var f=Iu(c,"EXT-X-MAP");if(!f)return null;var g=Du(f,"URI"),h=Ku(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.Y.has(g)){var k=void 0,l=null;c=u(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Yv(Du(m,"METHOD"))&&m.id<f.id&&(k=kw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=lw(h,f,l,k);a.Y.set(g,b)}return a.Y.get(g)}
1018
+ function lw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new ri(function(){return a},e,f,null,null,null,d)}
1019
+ function mw(a,b,c,d,e,f,g,h,k){var l=d.g,m=Iu(l,"EXTINF"),n=0,q=0,p=null;d.rb.length&&!a.B&&Wa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var t=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Iu(l,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(t=gh(w.value))}var x=xi;Iu(l,"EXT-X-GAP")&&(x=2);if(!m){if(0==d.rb.length)throw new Q(2,4,4024,"EXTINF");
1020
1020
  if(!a.B)return null}var z=[];w=!1;var v=null,B=!1,A=!1;if(a.B&&d.rb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=t,H={},J=0;J<d.rb.length;H={Qc:H.Qc,yd:H.yd},J++){var I=d.rb[J],E=0==J?c:z[z.length-1],G=0==J?e:E.endTime,K=Number(Z(I,"DURATION"))||a.L;if(K){var M=G+K,O=0,N=null;"EXT-X-PRELOAD-HINT"==I.name?(O=(O=Z(I,"BYTERANGE-START"))?Number(O):0,(E=Z(I,"BYTERANGE-LENGTH"))?N=O+Number(E)-1:O&&(N=Number.MAX_SAFE_INTEGER)):
1021
- (O=Z(I,"BYTERANGE"),N=u(Ov(E,O)),O=N.next().value,N=N.next().value);H.yd=Z(I,"URI");if(H.yd){E=yi;"YES"==Z(I,"GAP")&&(E=2,B=!0);H.Qc=null;var R=function(V){return function(){null==V.Qc&&(V.Qc=Lu(h(),V.yd,f));return V.Qc}}(H);n&&0<=O&&null!=N&&(v=R,w=!0);G=new xi(G,M,R,O,N,b,0,0,Infinity,[],"",null,D,E,k);"EXT-X-PRELOAD-HINT"==I.name&&(G.ff(),A=!0);"YES"!=Z(I,"INDEPENDENT")&&0<J&&G.Zd();z.push(G);D&&(D+=K)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
1022
- 1].endTime;else return null;w&&(B||0!=z[0].Aa?(w=!1,v=null):z=[]);(m=Ju(l,"EXT-X-BYTERANGE"))?(p=u(Ov(c,m.value)),q=p.next().value,p=p.next().value):z.length&&(q=z[0].Aa,p=z[z.length-1].ja);c="";m=null;"image"==g.type&&(c="1x1",g=Ju(l,"EXT-X-TILES"))&&(c=Eu(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var S=null;b=new xi(e,n,function(){if(v)return v();null==S&&(S=Lu(h(),d.h,f));return S||[]},q,p,b,0,0,Infinity,z,c,m,t,x,k,0<z.length&&!!d.h);w&&(a.lb=!0,b.ng(),A&&b.ff());return b}
1023
- function Ov(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ja+1,d=c+b-1);return[c,d]}
1024
- function rv(a,b,c,d,e,f,g){var h=b.segments,k=void 0,l=Ku(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),m=Ku(b.g,"EXT-X-MEDIA-SEQUENCE",0),n=Ju(b.g,"EXT-X-SKIP"),q=n?Number(Z(n,"SKIPPED-SEGMENTS")):0,p=m+q,t=0;iv(a)&&d.has(p)&&(t=d.get(p));0===t&&a.qa==Pv&&0<d.size&&!d.has(p)&&(t=a.l.qb());var w=[],x=null;n=[];for(var z=0;z<h.length;z++){var v=h[z],B=0==z?t:x.endTime;p=m+q+z;Ju(v.g,"EXT-X-DISCONTINUITY")&&l++;var A=u(v.g);for(var D=A.next();!D.done;D=A.next())D=D.value,"EXT-X-KEY"==D.name&&(Zv(Eu(D,"METHOD"))?
1025
- k=lw(a,D,b,f,e):k=void 0);d.set(p,B);A=Mv(a,b,v.g,f,e);!a.B&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.B=a.i.isLowLatencyMode());if(B=nw(a,A,x,v,B,e,c,f,k))(x=Ku(v.g,"EXT-X-BITRATE"))?n.push({bitrate:x,duration:B.endTime-B.startTime}):n.length&&(x=n.pop(),x.duration+=B.endTime-B.startTime,n.push(x)),x=B,B.j=l,vv(a,g)&&null!=a.I&&p<a.I||w.push(B)}b=void 0;n.length&&(b=n.reduce(function(H,J){return H+J.duration},0),b=Math.round(n.reduce(function(H,J){return H+J.bitrate*J.duration},0)/
1021
+ (O=Z(I,"BYTERANGE"),N=u(Nv(E,O)),O=N.next().value,N=N.next().value);H.yd=Z(I,"URI");if(H.yd){E=xi;"YES"==Z(I,"GAP")&&(E=2,B=!0);H.Qc=null;var R=function(V){return function(){null==V.Qc&&(V.Qc=Ku(h(),V.yd,f));return V.Qc}}(H);n&&0<=O&&null!=N&&(v=R,w=!0);G=new wi(G,M,R,O,N,b,0,0,Infinity,[],"",null,D,E,k);"EXT-X-PRELOAD-HINT"==I.name&&(G.ff(),A=!0);"YES"!=Z(I,"INDEPENDENT")&&0<J&&G.Zd();z.push(G);D&&(D+=K)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
1022
+ 1].endTime;else return null;w&&(B||0!=z[0].Aa?(w=!1,v=null):z=[]);(m=Iu(l,"EXT-X-BYTERANGE"))?(p=u(Nv(c,m.value)),q=p.next().value,p=p.next().value):z.length&&(q=z[0].Aa,p=z[z.length-1].ja);c="";m=null;"image"==g.type&&(c="1x1",g=Iu(l,"EXT-X-TILES"))&&(c=Du(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var S=null;b=new wi(e,n,function(){if(v)return v();null==S&&(S=Ku(h(),d.h,f));return S||[]},q,p,b,0,0,Infinity,z,c,m,t,x,k,0<z.length&&!!d.h);w&&(a.lb=!0,b.ng(),A&&b.ff());return b}
1023
+ function Nv(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ja+1,d=c+b-1);return[c,d]}
1024
+ function qv(a,b,c,d,e,f,g){var h=b.segments,k=void 0,l=Ju(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),m=Ju(b.g,"EXT-X-MEDIA-SEQUENCE",0),n=Iu(b.g,"EXT-X-SKIP"),q=n?Number(Z(n,"SKIPPED-SEGMENTS")):0,p=m+q,t=0;hv(a)&&d.has(p)&&(t=d.get(p));0===t&&a.qa==Ov&&0<d.size&&!d.has(p)&&(t=a.l.qb());var w=[],x=null;n=[];for(var z=0;z<h.length;z++){var v=h[z],B=0==z?t:x.endTime;p=m+q+z;Iu(v.g,"EXT-X-DISCONTINUITY")&&l++;var A=u(v.g);for(var D=A.next();!D.done;D=A.next())D=D.value,"EXT-X-KEY"==D.name&&(Yv(Du(D,"METHOD"))?
1025
+ k=kw(a,D,b,f,e):k=void 0);d.set(p,B);A=Lv(a,b,v.g,f,e);!a.B&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.B=a.i.isLowLatencyMode());if(B=mw(a,A,x,v,B,e,c,f,k))(x=Ju(v.g,"EXT-X-BITRATE"))?n.push({bitrate:x,duration:B.endTime-B.startTime}):n.length&&(x=n.pop(),x.duration+=B.endTime-B.startTime,n.push(x)),x=B,B.j=l,uv(a,g)&&null!=a.I&&p<a.I||w.push(B)}b=void 0;n.length&&(b=n.reduce(function(H,J){return H+J.duration},0),b=Math.round(n.reduce(function(H,J){return H+J.bitrate*J.duration},0)/
1026
1026
  b*1E3));if(n=w.some(function(H){return null!=H.h}))for(c={},d=0;d<w.length;c={Jc:c.Jc,Ic:c.Ic,td:c.td,Cb:c.Cb,Fc:c.Fc},d++)if(c.Cb=w[d],null==c.Cb.h)for(c.Ic=0,c.Jc=d,e=function(H){return function(){var J=w[H.Jc];if(J){if(null!=J.h)return J.h+H.Ic;H.Ic-=J.endTime-J.startTime;H.Jc+=1}return null}}(c),c.Fc=0,c.td=d,f=function(H){return function(){var J=w[H.td];if(J){J!=H.Cb&&(H.Fc+=J.endTime-J.startTime);if(null!=J.h)return J.h+H.Fc;--H.td}return null}}(c);null==c.Cb.h;)c.Cb.h=f(),null==c.Cb.h&&(c.Cb.h=
1027
- e());if(n)for(c=u(w),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=u(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.T;if(n&&Infinity!=c&&!vv(a,g))for(a=u(w),d=a.next();!d.done;d=a.next())d.value.Hf(c);return{segments:w,bandwidth:b}}function Tv(a,b){if(a==Kd){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
1028
- function Uv(a){return a==Kd?"text/vtt":ow[a].mp4}
1029
- function kw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v;return L(function(B){switch(B.g){case 1:g=pg;h=Math.trunc((d.segments.length-1)/2);k=Lu(f(),d.segments[h].h,e);l=new rc(k[0]);m=l.Pa.split(".").pop();n=ow[b];if((q=n[m])||(q=Lv[m])||(q=Tv(b,c)))return B.return(q);t=1;w=jg(k,a.g.retryParameters);ra(B,2);w.method="HEAD";return C(B,Nv(a,w,g,{type:t}),4);case 4:x=B.h;p=x.headers["content-type"];ta(B,3);break;case 2:z=va(B);if(!z||1002!=z.code&&1001!=z.code){B.u(3);break}w.method="GET";return C(B,
1030
- Nv(a,w,g,{type:t}),6);case 6:v=B.h,p=v.headers["content-type"];case 3:return p?B.return(p.split(";")[0]):B.return(Uv(b))}})}function Iv(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function gv(a,b,c){return Nv(a,jg(b,a.g.retryParameters),0,{type:c?2:3})}
1031
- function ev(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();iv(a)&&(d=(c-b)/1E3,a.bb.sample(1,d),e=a.m,f=Math.max(0,e-Ra(a.bb)),a.s.U(f));ta(h,3);break;case 2:g=va(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.U(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();F(h)}})}
1032
- function iv(a){return a.qa!=fv}function mv(a,b){a.qa=b;a.l&&a.l.Ec(!iv(a));iv(a)||a.s.stop()}function Nv(a,b,c,d){if(!a.N)throw new Q(2,7,7001);b=a.i.networkingEngine.request(c,b,d);eg(a.N,b);return b.promise}function Zv(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1033
- function aw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B,A;return L(function(D){switch(D.g){case 1:if("video/mp2t"==c)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);g=Eu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return D.return(null);k=Lu(d(),Eu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Ad(wd(k[0].split("data:text/plain;base64,").pop()));D.u(2);break}m=k.sort().join("");a.ia.has(m)||(n=jg(k,a.g.retryParameters),q=Nv(a,n,6),a.ia.set(m,
1034
- q));return C(D,a.ia.get(m),3);case 3:p=D.h,l=Ad(p.data);case 2:t="00000000000000000000000000000000";if(!e){D.u(4);break}if(a.pa.has(e)){w=a.pa.get(e);D.u(5);break}x=jl(e.$(),e.ac(),e.Yb(),a.g.retryParameters);z=pg;return C(D,Nv(a,x,z,{type:0}),6);case 6:v=D.h,w=cv(v.data),a.pa.set(e,w);case 5:w&&(t=w);case 4:return B=new Map,B.set(t,l),A="cenc","SAMPLE-AES"==g&&(A="cbcs"),D.return(Gd(B,A))}})}P("shaka.hls.HlsParser",dv);
1035
- var Lv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},ow={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",tsa:"video/mp2t"},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",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
1036
- vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},$v={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);a=Eu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Fd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
1037
- "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Eu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Eu(a,"URI");b=Yu(b);b=Ab(b.data);c=Fd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Eu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==
1038
- b&&(c="cbcs");a=Eu(a,"URI");a=Yu(a);a=Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Pg(a,b,new Set,0);return Fd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},fv="VOD",jw="EVENT",Pv="LIVE",lv={Rg:fv,Qi:jw,Yi:Pv};ni["application/x-mpegurl"]=function(){return new dv};ni["application/vnd.apple.mpegurl"]=function(){return new dv};function pw(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function qw(a){if(a=rw(a))a:{a=u($g(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=ah(b.value,"LA_URL")){a=Yg(b);break a}a=""}else a="";return a}
1039
- function rw(a){a=wd(Yg(a));a=pw(a).filter(function(b){return b.type===sw})[0];if(!a)return null;a=md(a.value,!0);return(a=Rg(a,"WRMHEADER"))?a:null}var sw=1,tw=(new Map).set("com.microsoft.playready",qw).set("com.microsoft.playready.recommendation",qw).set("com.microsoft.playready.software",qw).set("com.microsoft.playready.hardware",qw);function uw(a){if(!vw){vw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);ww=xw("ftyp",b,d,b,c);b=xw("dref",yw);zw=xw("dinf",b)}this.g=a}
1040
- function Aw(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=xw;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Bw+1));m=Math.floor(m%(Bw+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Cw(h,4)),[0,0,0,0],y(Cw(n,4)),y(Cw(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(Cw(k,2)),[0,0],y(Cw(l,
1041
- 2)),[0,0]));h=xw("tkhd",h);k=xw;n=g.duration*g.timescale;l=Math.floor(n/(Bw+1));n=Math.floor(n%(Bw+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Cw(g.timescale,4)),y(Cw(l,4)),y(Cw(n,4)),y(Cw(m,2)),[0,0]));l=xw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Dw;break;case "audio":m=Ew}n=xw("hdlr",m);a:{switch(g.type){case "video":g=xw("minf",xw("vmhd",Fw),zw,Gw(g));break a;
1042
- case "audio":g=xw("minf",xw("smhd",Hw),zw,Gw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Bd.apply(td,y(b));f=a.g[0];c=xw;d=f.duration*f.timescale;e=Math.floor(d/(Bw+1));d=Math.floor(d%(Bw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Cw(f.timescale,4)),y(Cw(e,4)),y(Cw(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
1043
- 255]));e=xw("mvhd",e);d=[];a=u(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(y(Cw(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=xw("trex",k),h.call(g,k);a=Bd.apply(td,y(d));a=xw("mvex",a);d=[];if(f.encrypted){f=u(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=u(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Bd.apply(td,y(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(ww.byteLength+
1044
- a.byteLength);b.set(ww);b.set(a,ww.byteLength);return b}
1045
- function Gw(a){var b=xw,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.oa.byteLength)var e=xw("avcC",a.oa);else{e=xw;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Ta.length;n++){var q=Iw(a.Ta[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),f+=q.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
1046
- 0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(Cw(c,2)),y(Cw(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Jw(a);g=new Uint8Array([]);
1047
- a.encrypted&&(g=Kw(a),d="encv");c=xw(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.oa.byteLength&&(c=xw("hvcC",a.oa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(Cw(d,2)),y(Cw(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Jw(a),g=new Uint8Array([]),a.encrypted&&(g=Kw(a),e="encv"),c=xw(e,d,
1048
- c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=xw(".mp3",Lw(a));else if(a.codecs.includes("ac-3"))c=xw("dac3",a.ga),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Kw(a),d="enca"),a=xw(d,Lw(a),c,e);else if(a.codecs.includes("ec-3"))c=xw("dec3",a.ga),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Kw(a),d="enca"),a=xw(d,Lw(a),c,e);else if(a.codecs.includes("opus"))c=xw("dOps",a.ga),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Kw(a),d="enca"),a=xw(d,Lw(a),c,e);else{if(0<a.ga.byteLength)c=xw("esds",
1049
- a.ga);else{c=xw;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Hd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(y(Cw(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Kw(a),d="enca");
1050
- a=xw(d,Lw(a),c,e)}c=a}a=xw("stsd",Mw,c);return b("stbl",a,xw("stts",Nw),xw("stsc",Ow),xw("stsz",Pw),xw("stco",Qw))}function Jw(a){if(!a.xa&&!a.ya)return new Uint8Array([]);var b=a.ya;a=new Uint8Array([].concat(y(Cw(a.xa,4)),y(Cw(b,4))));return xw("pasp",a)}function Lw(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(y(Cw(a.stream.audioSamplingRate||44100,2)),[0,0]))}
1051
- function Kw(a){var b=xw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(y(Cw(d,4))));c=xw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=xw("schm",d);e=xw;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=u(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=u(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Iw(h.value)}a=new Uint8Array([0,
1052
- 0,0,0,0,0,1,8]);f=xw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
1053
- function Rw(a){var b=[];a=u(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=xw;var g=new Uint8Array([0,0,0,0].concat(y(Cw(c.data?c.data.jb:0,4))));g=xw("mfhd",g);var h;var k=c.data?c.data.Ra:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ka<<4|m.Na<<2|m.Ma}k=xw("sdtp",l);var n=k.length+92;l=xw;h=new Uint8Array([0,0,0,58].concat(y(Cw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=xw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
1054
- 0;var q=Math.floor(m%(Bw+1));m=new Uint8Array([1,0,0,0].concat(y(Cw(Math.floor(m/(Bw+1)),4)),y(Cw(q,4))));m=xw("tfdt",m);var p=n;n=c.data?c.data.Ra:[];q=n.length;var t=12+16*q,w=new Uint8Array(t);p+=8+t;w.set(["video"===c.type?1:0,0,15,1].concat(y(Cw(q,4)),y(Cw(p,4))),0);for(p=0;p<q;p++){var x=n[p];t=Cw(x.duration,4);var z=Cw(x.size,4),v=x.flags;x=Cw(x.Ua,4);w.set([].concat(y(t),y(z),[v.Wa<<2|v.Ka,v.Na<<6|v.Ma<<4|v.Xa,v.Ja&61440,v.Ja&15],y(x)),12+16*p)}n=xw("trun",w);k=l("traf",h,m,n,k);f=f("moof",
1055
- g,k);e.call(d,b,[f,Sw(c)])}return Bd.apply(td,y(b))}function Sw(a){a=(a.data?a.data.Ra:[]).map(function(b){return b.data});a=Bd.apply(td,y(a));return xw("mdat",a)}function Cw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Iw(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
1056
- function xw(a){var b=Ha.apply(1,arguments),c=Tw[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Tw[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
1057
- var vw=!1,Bw=Math.pow(2,32)-1,Tw={},Dw=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Ew=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Nw=new Uint8Array([0,0,0,0,0,0,0,0]),Ow=new Uint8Array([0,0,0,0,0,0,0,0]),Qw=new Uint8Array([0,0,0,0,0,0,0,0]),Pw=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Fw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Hw=new Uint8Array([0,
1058
- 0,0,0,0,0,0,0]),Mw=new Uint8Array([0,0,0,0,0,0,0,1]),ww=new Uint8Array([]),yw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),zw=new Uint8Array([]);function Uw(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Qa(5);this.o=new Mc(function(){Vw(a)});this.A=new dg;this.m=new Map}r=Uw.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return L(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,Ww(c),2);if(!c.h)throw new Q(2,7,7001);return d.return(c.j)})};
1059
- function Vw(a){var b;L(function(c){switch(c.g){case 1:return ra(c,2),C(c,Ww(a),4);case 4:ta(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();F(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
1060
- r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,Ww(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);F(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
1061
- function Ww(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=jg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),eg(a.A,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=cm){pb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Ot(m,"SmoothStreamingMedia");if(!m)throw new Q(2,4,4046,
1062
- l);n(m);m=pd(m.outerHTML)}var q=Qg(m,"SmoothStreamingMedia");if(!q)throw new Q(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=dm&&l(q);a.i||(a.i=new jk(null,0));if(l=dh(q,"IsLive",nh,!1))throw new Q(2,4,4047);a.i.Ec(!l);n=dh(q,"TimeScale",lh,1E7);m=dh(q,"DVRWindowLength",lh);l&&(0===m||isNaN(m))&&(m=Infinity);var p=dh(q,"CanSeek",nh,!1);0===m&&p&&(m=Infinity);p=null;m&&0<m&&(p=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.ke(p);m=dh(q,
1063
- "Duration",lh,Infinity);l||a.i.$a(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};p=Xg(q,"Protection");var t;n=a.g.mss.keySystemsBySystemId;m=[];p=u(p);for(t=p.next();!t.done;t=p.next())m=m.concat(Xg(t.value,"ProtectionHeader"));if(m.length){p=[];for(t=0;t<m.length;t++){var w=m[t],x=w.attributes.SystemID.toLowerCase(),z=n[x];if(z){var v=rw(w);if(v)a:{v=u($g(v,"DATA"));for(var B=v.next();!B.done;B=v.next())if(B=ah(B.value,"KID")){v=wd(Yg(B));v=new Uint8Array([v[3],v[2],v[1],v[0],v[5],
1064
- v[4],v[7],v[6]].concat(y(v.slice(8))));v=Ad(v);break a}v=null}else v=null;B=wd(Yg(w));x=zd(x.replace(/-/g,""));x=[{initData:Pg(B,x,new Set,0),initDataType:"cenc",keyId:v}];x=Fd(z,"cenc",x);v&&x.keyIds.add(v);if(z=tw.get(z))x.licenseServerUri=z(w);p.push(x)}}n=p}else n=[];t=n;p=[];n=[];m=[];q=Xg(q,"StreamIndex");q=u(q);for(w=q.next();!w.done;w=q.next()){w=w.value;z=Xg(w,"QualityLevel");x=l.timescale;v=l.duration;B=Xg(w,"c");for(var A=[],D=0,H=0;H<B.length;++H){var J=B[H],I=B[H+1],E=dh(J,"t",lh),G=
1065
- dh(J,"d",lh);J=dh(J,"r",jh);if(!G)break;E=null!=E?E:D;J=J||0;if(0>J)if(I){I=dh(I,"t",lh);if(null==I)break;else if(E>=I)break;J=Math.ceil((I-E)/G)-1}else{if(Infinity==v)break;else if(E/x>=v)break;J=Math.ceil((v*x-E)/G)-1}for(I=0;I<=J;++I)D=E+G,A.push({start:E/x,end:D/x,Mf:E}),E=D}x=A;z=u(z);for(v=z.next();!v.done;v=z.next())(v=Xw(a,w,v.value,x,t,l))&&("audio"!=v.type||a.g.disableAudio?"video"!=v.type||a.g.disableVideo?v.type!=Kd||a.g.disableText||m.push(v):n.push(v):p.push(v))}q=[];p=u(0<p.length?
1027
+ e());if(n)for(c=u(w),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=u(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.T;if(n&&Infinity!=c&&!uv(a,g))for(a=u(w),d=a.next();!d.done;d=a.next())d.value.Hf(c);return{segments:w,bandwidth:b}}function Sv(a,b){if(a==Kd){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
1028
+ function Tv(a){return a==Kd?"text/vtt":nw[a].mp4}
1029
+ function jw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v;return L(function(B){switch(B.g){case 1:g=pg;h=Math.trunc((d.segments.length-1)/2);k=Ku(f(),d.segments[h].h,e);l=new rc(k[0]);m=l.Pa.split(".").pop();n=nw[b];if((q=n[m])||(q=Kv[m])||(q=Sv(b,c)))return B.return(q);t=1;w=jg(k,a.g.retryParameters);ra(B,2);w.method="HEAD";return C(B,Mv(a,w,g,{type:t}),4);case 4:x=B.h;p=x.headers["content-type"];ta(B,3);break;case 2:z=va(B);if(!z||1002!=z.code&&1001!=z.code){B.u(3);break}w.method="GET";return C(B,
1030
+ Mv(a,w,g,{type:t}),6);case 6:v=B.h,p=v.headers["content-type"];case 3:return p?B.return(p.split(";")[0]):B.return(Tv(b))}})}function Hv(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function fv(a,b,c){return Mv(a,jg(b,a.g.retryParameters),0,{type:c?2:3})}
1031
+ function dv(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();hv(a)&&(d=(c-b)/1E3,a.cb.sample(1,d),e=a.m,f=Math.max(0,e-Ra(a.cb)),a.s.U(f));ta(h,3);break;case 2:g=va(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.U(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();F(h)}})}
1032
+ function hv(a){return a.qa!=ev}function lv(a,b){a.qa=b;a.l&&a.l.Ec(!hv(a));hv(a)||a.s.stop()}function Mv(a,b,c,d){if(!a.N)throw new Q(2,7,7001);b=a.i.networkingEngine.request(c,b,d);eg(a.N,b);return b.promise}function Yv(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1033
+ function $v(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B,A;return L(function(D){switch(D.g){case 1:if("video/mp2t"==c)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);g=Du(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return D.return(null);k=Ku(d(),Du(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Ad(wd(k[0].split("data:text/plain;base64,").pop()));D.u(2);break}m=k.sort().join("");a.ia.has(m)||(n=jg(k,a.g.retryParameters),q=Mv(a,n,6),a.ia.set(m,
1034
+ q));return C(D,a.ia.get(m),3);case 3:p=D.h,l=Ad(p.data);case 2:t="00000000000000000000000000000000";if(!e){D.u(4);break}if(a.pa.has(e)){w=a.pa.get(e);D.u(5);break}x=il(e.$(),e.ac(),e.Yb(),a.g.retryParameters);z=pg;return C(D,Mv(a,x,z,{type:0}),6);case 6:v=D.h,w=bv(v.data),a.pa.set(e,w);case 5:w&&(t=w);case 4:return B=new Map,B.set(t,l),A="cenc","SAMPLE-AES"==g&&(A="cbcs"),D.return(Gd(B,A))}})}P("shaka.hls.HlsParser",cv);
1035
+ var Kv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},nw={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",tsa:"video/mp2t"},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",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
1036
+ vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Zv={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);a=Du(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Fd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
1037
+ "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Du(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Du(a,"URI");b=Xu(b);b=Ab(b.data);c=Fd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Du(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==
1038
+ b&&(c="cbcs");a=Du(a,"URI");a=Xu(a);a=Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Pg(a,b,new Set,0);return Fd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},ev="VOD",iw="EVENT",Ov="LIVE",kv={Rg:ev,Qi:iw,Yi:Ov};mi["application/x-mpegurl"]=function(){return new cv};mi["application/vnd.apple.mpegurl"]=function(){return new cv};function ow(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function pw(a){if(a=qw(a))a:{a=u($g(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=ah(b.value,"LA_URL")){a=Yg(b);break a}a=""}else a="";return a}
1039
+ function qw(a){a=wd(Yg(a));a=ow(a).filter(function(b){return b.type===rw})[0];if(!a)return null;a=md(a.value,!0);return(a=Rg(a,"WRMHEADER"))?a:null}var rw=1,sw=(new Map).set("com.microsoft.playready",pw).set("com.microsoft.playready.recommendation",pw).set("com.microsoft.playready.software",pw).set("com.microsoft.playready.hardware",pw);function tw(a){if(!uw){uw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);vw=ww("ftyp",b,d,b,c);b=ww("dref",xw);yw=ww("dinf",b)}this.g=a}
1040
+ function zw(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=ww;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Aw+1));m=Math.floor(m%(Aw+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Bw(h,4)),[0,0,0,0],y(Bw(n,4)),y(Bw(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(Bw(k,2)),[0,0],y(Bw(l,
1041
+ 2)),[0,0]));h=ww("tkhd",h);k=ww;n=g.duration*g.timescale;l=Math.floor(n/(Aw+1));n=Math.floor(n%(Aw+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Bw(g.timescale,4)),y(Bw(l,4)),y(Bw(n,4)),y(Bw(m,2)),[0,0]));l=ww("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Cw;break;case "audio":m=Dw}n=ww("hdlr",m);a:{switch(g.type){case "video":g=ww("minf",ww("vmhd",Ew),yw,Fw(g));break a;
1042
+ case "audio":g=ww("minf",ww("smhd",Gw),yw,Fw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Bd.apply(td,y(b));f=a.g[0];c=ww;d=f.duration*f.timescale;e=Math.floor(d/(Aw+1));d=Math.floor(d%(Aw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Bw(f.timescale,4)),y(Bw(e,4)),y(Bw(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
1043
+ 255]));e=ww("mvhd",e);d=[];a=u(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(y(Bw(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=ww("trex",k),h.call(g,k);a=Bd.apply(td,y(d));a=ww("mvex",a);d=[];if(f.encrypted){f=u(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=u(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Bd.apply(td,y(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(vw.byteLength+
1044
+ a.byteLength);b.set(vw);b.set(a,vw.byteLength);return b}
1045
+ function Fw(a){var b=ww,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.oa.byteLength)var e=ww("avcC",a.oa);else{e=ww;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Ta.length;n++){var q=Hw(a.Ta[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),f+=q.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
1046
+ 0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(Bw(c,2)),y(Bw(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Iw(a);g=new Uint8Array([]);
1047
+ a.encrypted&&(g=Jw(a),d="encv");c=ww(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.oa.byteLength&&(c=ww("hvcC",a.oa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(Bw(d,2)),y(Bw(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Iw(a),g=new Uint8Array([]),a.encrypted&&(g=Jw(a),e="encv"),c=ww(e,d,
1048
+ c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=ww(".mp3",Kw(a));else if(a.codecs.includes("ac-3"))c=ww("dac3",a.ga),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Jw(a),d="enca"),a=ww(d,Kw(a),c,e);else if(a.codecs.includes("ec-3"))c=ww("dec3",a.ga),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Jw(a),d="enca"),a=ww(d,Kw(a),c,e);else if(a.codecs.includes("opus"))c=ww("dOps",a.ga),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Jw(a),d="enca"),a=ww(d,Kw(a),c,e);else{if(0<a.ga.byteLength)c=ww("esds",
1049
+ a.ga);else{c=ww;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Hd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(y(Bw(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Jw(a),d="enca");
1050
+ a=ww(d,Kw(a),c,e)}c=a}a=ww("stsd",Lw,c);return b("stbl",a,ww("stts",Mw),ww("stsc",Nw),ww("stsz",Ow),ww("stco",Pw))}function Iw(a){if(!a.xa&&!a.ya)return new Uint8Array([]);var b=a.ya;a=new Uint8Array([].concat(y(Bw(a.xa,4)),y(Bw(b,4))));return ww("pasp",a)}function Kw(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(y(Bw(a.stream.audioSamplingRate||44100,2)),[0,0]))}
1051
+ function Jw(a){var b=ww;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(y(Bw(d,4))));c=ww("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=ww("schm",d);e=ww;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=u(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=u(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Hw(h.value)}a=new Uint8Array([0,
1052
+ 0,0,0,0,0,1,8]);f=ww("tenc",a,f);return b("sinf",c,d,e("schi",f))}
1053
+ function Qw(a){var b=[];a=u(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=ww;var g=new Uint8Array([0,0,0,0].concat(y(Bw(c.data?c.data.jb:0,4))));g=ww("mfhd",g);var h;var k=c.data?c.data.Ra:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ka<<4|m.Na<<2|m.Ma}k=ww("sdtp",l);var n=k.length+92;l=ww;h=new Uint8Array([0,0,0,58].concat(y(Bw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=ww("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
1054
+ 0;var q=Math.floor(m%(Aw+1));m=new Uint8Array([1,0,0,0].concat(y(Bw(Math.floor(m/(Aw+1)),4)),y(Bw(q,4))));m=ww("tfdt",m);var p=n;n=c.data?c.data.Ra:[];q=n.length;var t=12+16*q,w=new Uint8Array(t);p+=8+t;w.set(["video"===c.type?1:0,0,15,1].concat(y(Bw(q,4)),y(Bw(p,4))),0);for(p=0;p<q;p++){var x=n[p];t=Bw(x.duration,4);var z=Bw(x.size,4),v=x.flags;x=Bw(x.Va,4);w.set([].concat(y(t),y(z),[v.Xa<<2|v.Ka,v.Na<<6|v.Ma<<4|v.Ya,v.Ja&61440,v.Ja&15],y(x)),12+16*p)}n=ww("trun",w);k=l("traf",h,m,n,k);f=f("moof",
1055
+ g,k);e.call(d,b,[f,Rw(c)])}return Bd.apply(td,y(b))}function Rw(a){a=(a.data?a.data.Ra:[]).map(function(b){return b.data});a=Bd.apply(td,y(a));return ww("mdat",a)}function Bw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Hw(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
1056
+ function ww(a){var b=Ha.apply(1,arguments),c=Sw[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Sw[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
1057
+ var uw=!1,Aw=Math.pow(2,32)-1,Sw={},Cw=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Dw=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Mw=new Uint8Array([0,0,0,0,0,0,0,0]),Nw=new Uint8Array([0,0,0,0,0,0,0,0]),Pw=new Uint8Array([0,0,0,0,0,0,0,0]),Ow=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ew=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Gw=new Uint8Array([0,
1058
+ 0,0,0,0,0,0,0]),Lw=new Uint8Array([0,0,0,0,0,0,0,1]),vw=new Uint8Array([]),xw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),yw=new Uint8Array([]);function Tw(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Qa(5);this.o=new Mc(function(){Uw(a)});this.A=new dg;this.m=new Map}r=Tw.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return L(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,Vw(c),2);if(!c.h)throw new Q(2,7,7001);return d.return(c.j)})};
1059
+ function Uw(a){var b;L(function(c){switch(c.g){case 1:return ra(c,2),C(c,Vw(a),4);case 4:ta(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();F(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
1060
+ r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,Vw(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);F(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
1061
+ function Vw(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=jg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),eg(a.A,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=bm){pb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Nt(m,"SmoothStreamingMedia");if(!m)throw new Q(2,4,4046,
1062
+ l);n(m);m=pd(m.outerHTML)}var q=Qg(m,"SmoothStreamingMedia");if(!q)throw new Q(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=cm&&l(q);a.i||(a.i=new ik(null,0));if(l=dh(q,"IsLive",nh,!1))throw new Q(2,4,4047);a.i.Ec(!l);n=dh(q,"TimeScale",lh,1E7);m=dh(q,"DVRWindowLength",lh);l&&(0===m||isNaN(m))&&(m=Infinity);var p=dh(q,"CanSeek",nh,!1);0===m&&p&&(m=Infinity);p=null;m&&0<m&&(p=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.ke(p);m=dh(q,
1063
+ "Duration",lh,Infinity);l||a.i.ab(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};p=Xg(q,"Protection");var t;n=a.g.mss.keySystemsBySystemId;m=[];p=u(p);for(t=p.next();!t.done;t=p.next())m=m.concat(Xg(t.value,"ProtectionHeader"));if(m.length){p=[];for(t=0;t<m.length;t++){var w=m[t],x=w.attributes.SystemID.toLowerCase(),z=n[x];if(z){var v=qw(w);if(v)a:{v=u($g(v,"DATA"));for(var B=v.next();!B.done;B=v.next())if(B=ah(B.value,"KID")){v=wd(Yg(B));v=new Uint8Array([v[3],v[2],v[1],v[0],v[5],
1064
+ v[4],v[7],v[6]].concat(y(v.slice(8))));v=Ad(v);break a}v=null}else v=null;B=wd(Yg(w));x=zd(x.replace(/-/g,""));x=[{initData:Pg(B,x,new Set,0),initDataType:"cenc",keyId:v}];x=Fd(z,"cenc",x);v&&x.keyIds.add(v);if(z=sw.get(z))x.licenseServerUri=z(w);p.push(x)}}n=p}else n=[];t=n;p=[];n=[];m=[];q=Xg(q,"StreamIndex");q=u(q);for(w=q.next();!w.done;w=q.next()){w=w.value;z=Xg(w,"QualityLevel");x=l.timescale;v=l.duration;B=Xg(w,"c");for(var A=[],D=0,H=0;H<B.length;++H){var J=B[H],I=B[H+1],E=dh(J,"t",lh),G=
1065
+ dh(J,"d",lh);J=dh(J,"r",jh);if(!G)break;E=null!=E?E:D;J=J||0;if(0>J)if(I){I=dh(I,"t",lh);if(null==I)break;else if(E>=I)break;J=Math.ceil((I-E)/G)-1}else{if(Infinity==v)break;else if(E/x>=v)break;J=Math.ceil((v*x-E)/G)-1}for(I=0;I<=J;++I)D=E+G,A.push({start:E/x,end:D/x,Mf:E}),E=D}x=A;z=u(z);for(v=z.next();!v.done;v=z.next())(v=Ww(a,w,v.value,x,t,l))&&("audio"!=v.type||a.g.disableAudio?"video"!=v.type||a.g.disableVideo?v.type!=Kd||a.g.disableText||m.push(v):n.push(v):p.push(v))}q=[];p=u(0<p.length?
1066
1066
  p:[null]);for(t=p.next();!t.done;t=p.next())for(t=t.value,w=u(0<n.length?n:[null]),v=w.next();!v.done;v=w.next())z=q,x=z.push,v=v.value,B=0,t&&t.bandwidth&&0<t.bandwidth&&(B+=t.bandwidth),v&&v.bandwidth&&0<v.bandwidth&&(B+=v.bandwidth),v={id:a.s++,language:t?t.language:"und",disabledUntilTime:0,primary:!!t&&t.primary||!!v&&v.primary,audio:t,video:v,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},x.call(z,v);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
1067
1067
  l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null},a.i.Xd());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);F(k)})}
1068
- function Xw(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Wa("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=dh(c,"Bitrate",kh),m=dh(c,"MaxWidth",kh),n=dh(c,"MaxHeight",kh),q=dh(c,"Channels",kh),p=dh(c,"SamplingRate",kh),t=f.duration;d.length&&(t=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.$a(Math.min(t,w));var x={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1068
+ function Ww(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Wa("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=dh(c,"Bitrate",kh),m=dh(c,"MaxWidth",kh),n=dh(c,"MaxHeight",kh),q=dh(c,"Channels",kh),p=dh(c,"SamplingRate",kh),t=f.duration;d.length&&(t=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.ab(Math.min(t,w));var x={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1069
1069
  closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:se(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:q,audioSamplingRate:p,spatialAudio:!1,closedCaptions:null,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],
1070
- mssPrivateData:{duration:t,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=Yw[e])&&x.roles.push(e),"main"===e&&(x.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return Wa('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!Zw.includes(e.toUpperCase()))return Wa("Codec not supported:",
1071
- e),null;c=$w(c,g,e,x);x.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Wa("Quality unsupported without CodecPrivateData",g),null;x.type="audio";x.mimeType="mss/audio/mp4";x.codecs=ax(e,c);break;case "video":if(!c)return Wa("Quality unsupported without CodecPrivateData",g),null;x.type="video";x.mimeType="mss/video/mp4";x.codecs=bx(c);break;case "text":if(x.type=Kd,x.mimeType="application/mp4","TTML"===e||"DFXP"===e)x.codecs="stpp"}x.fullMimeTypes.add(Od(x.mimeType,x.codecs));
1072
- x.createSegmentIndex=function(){if(x.segmentIndex)return Promise.resolve();if(a.m.has(x.id))var z=a.m.get(x.id);else z=[],"video"==x.type&&(z=x.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:x.id,type:x.type,codecs:x.codecs,encrypted:x.encrypted,timescale:x.mssPrivateData.timescale,duration:x.mssPrivateData.duration,Ta:z,ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:null,stream:x},z=Aw(new uw([z])),a.m.set(x.id,z);z=cx(a,new vi(function(){return[]},0,null,null,void 0,
1073
- z),x,b,d);x.segmentIndex=new Fk(z);return Promise.resolve()};x.closeSegmentIndex=function(){x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null)};return x}
1074
- function $w(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
1075
- b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function ax(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function bx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1076
- function cx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=u(e);for(var h=e.next();!h.done;g={Pc:g.Pc},h=e.next())g.Pc=h.value,d.push(new xi(g.Pc.start,g.Pc.end,function(k){return function(){return Cd(a.l,[f.replace("{start time}",String(k.Pc.Mf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",Uw);var Zw="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Yw={CAPT:"main",SUBT:"alternate",DESC:"main"};
1077
- ni["application/vnd.ms-sstr+xml"]=function(){return new Uw};function dx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=od(b)}catch(g){}throw new Q(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function ex(){}function fx(a,b,c,d,e){var f=new gx;wg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new hx,h={Tf:!1,Lg:!1};a=ix(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Uf(a,function(){h.Tf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Lg=!0;g.abort()});k.U(b/1E3);a.finally(function(){k.stop()})}return a}
1078
- function ix(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:return h=jx,k=kx,q=n=0,p=Date.now(),ra(A,2),C(A,h(a,c),4);case 4:l=A.h;f(lx(l.headers));if("HEAD"==c.method){A.u(5);break}t=l.clone().body.getReader();x=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;z=function(D){function H(){var J,I,E;return L(function(G){switch(G.g){case 1:return ra(G,2),C(G,t.read(),4);case 4:J=G.h;ta(G,3);break;case 2:return va(G),G.return();case 3:if(J.done){G.u(5);break}n+=
1079
- J.value.byteLength;if(!g){G.u(5);break}return C(G,g(J.value),5);case 5:I=Date.now();if(100<I-p||J.done)E=J.done?0:x-n,e(I-p,n-q,E),q=n,p=I;J.done?D.close():(D.enqueue(J.value),H());F(G)}})}H()};new k({start:z});return C(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:ta(A,3);break;case 2:v=va(A);if(d.Tf)throw new Q(1,1,7001,a,b);if(d.Lg)throw new Q(1,1,1003,a,b);throw new Q(1,1,1002,a,v,b);case 3:return B=lx(l.headers),A.return(dx(B,m,l.status,a,l.url,b))}})}
1080
- function lx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function mx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}P("shaka.net.HttpFetchPlugin",ex);ex.isSupported=mx;ex.parse=fx;var jx=window.fetch,hx=window.AbortController,kx=window.ReadableStream,gx=window.Headers;
1081
- mx()&&(gg("http",fx,2,!0),gg("https",fx,2,!0),gg("blob",fx,2,!0));function nx(){}
1082
- function ox(a,b,c,d,e){var f=new px,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new Q(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var p=qx(f);e(p);n=!0}};f.onload=function(p){var t=qx(f),w=f.response;try{d(Date.now()-g,p.loaded-h,0);var x=dx(t,w,f.status,a,f.responseURL,c);l(x)}catch(z){m(z)}};f.onerror=function(p){m(new Q(1,
1070
+ mssPrivateData:{duration:t,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=Xw[e])&&x.roles.push(e),"main"===e&&(x.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return Wa('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!Yw.includes(e.toUpperCase()))return Wa("Codec not supported:",
1071
+ e),null;c=Zw(c,g,e,x);x.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Wa("Quality unsupported without CodecPrivateData",g),null;x.type="audio";x.mimeType="mss/audio/mp4";x.codecs=$w(e,c);break;case "video":if(!c)return Wa("Quality unsupported without CodecPrivateData",g),null;x.type="video";x.mimeType="mss/video/mp4";x.codecs=ax(c);break;case "text":if(x.type=Kd,x.mimeType="application/mp4","TTML"===e||"DFXP"===e)x.codecs="stpp"}x.fullMimeTypes.add(Od(x.mimeType,x.codecs));
1072
+ x.createSegmentIndex=function(){if(x.segmentIndex)return Promise.resolve();if(a.m.has(x.id))var z=a.m.get(x.id);else z=[],"video"==x.type&&(z=x.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:x.id,type:x.type,codecs:x.codecs,encrypted:x.encrypted,timescale:x.mssPrivateData.timescale,duration:x.mssPrivateData.duration,Ta:z,ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:null,stream:x},z=zw(new tw([z])),a.m.set(x.id,z);z=bx(a,new ri(function(){return[]},0,null,null,void 0,
1073
+ z),x,b,d);x.segmentIndex=new Ek(z);return Promise.resolve()};x.closeSegmentIndex=function(){x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null)};return x}
1074
+ function Zw(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
1075
+ b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function $w(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function ax(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1076
+ function bx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=u(e);for(var h=e.next();!h.done;g={Pc:g.Pc},h=e.next())g.Pc=h.value,d.push(new wi(g.Pc.start,g.Pc.end,function(k){return function(){return Cd(a.l,[f.replace("{start time}",String(k.Pc.Mf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",Tw);var Yw="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Xw={CAPT:"main",SUBT:"alternate",DESC:"main"};
1077
+ mi["application/vnd.ms-sstr+xml"]=function(){return new Tw};function cx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=od(b)}catch(g){}throw new Q(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function dx(){}function ex(a,b,c,d,e){var f=new fx;wg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new gx,h={Tf:!1,Lg:!1};a=hx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Uf(a,function(){h.Tf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Lg=!0;g.abort()});k.U(b/1E3);a.finally(function(){k.stop()})}return a}
1078
+ function hx(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:return h=ix,k=jx,q=n=0,p=Date.now(),ra(A,2),C(A,h(a,c),4);case 4:l=A.h;f(kx(l.headers));if("HEAD"==c.method){A.u(5);break}t=l.clone().body.getReader();x=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;z=function(D){function H(){var J,I,E;return L(function(G){switch(G.g){case 1:return ra(G,2),C(G,t.read(),4);case 4:J=G.h;ta(G,3);break;case 2:return va(G),G.return();case 3:if(J.done){G.u(5);break}n+=
1079
+ J.value.byteLength;if(!g){G.u(5);break}return C(G,g(J.value),5);case 5:I=Date.now();if(100<I-p||J.done)E=J.done?0:x-n,e(I-p,n-q,E),q=n,p=I;J.done?D.close():(D.enqueue(J.value),H());F(G)}})}H()};new k({start:z});return C(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:ta(A,3);break;case 2:v=va(A);if(d.Tf)throw new Q(1,1,7001,a,b);if(d.Lg)throw new Q(1,1,1003,a,b);throw new Q(1,1,1002,a,v,b);case 3:return B=kx(l.headers),A.return(cx(B,m,l.status,a,l.url,b))}})}
1080
+ function kx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function lx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}P("shaka.net.HttpFetchPlugin",dx);dx.isSupported=lx;dx.parse=ex;var ix=window.fetch,gx=window.AbortController,jx=window.ReadableStream,fx=window.Headers;
1081
+ lx()&&(gg("http",ex,2,!0),gg("https",ex,2,!0),gg("blob",ex,2,!0));function mx(){}
1082
+ function nx(a,b,c,d,e){var f=new ox,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new Q(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var p=px(f);e(p);n=!0}};f.onload=function(p){var t=px(f),w=f.response;try{d(Date.now()-g,p.loaded-h,0);var x=cx(t,w,f.status,a,f.responseURL,c);l(x)}catch(z){m(z)}};f.onerror=function(p){m(new Q(1,
1083
1083
  1,1002,a,p,c))};f.ontimeout=function(){m(new Q(1,1,1003,a,c))};f.onprogress=function(p){var t=Date.now();if(100<t-g||p.lengthComputable&&p.loaded==p.total)d(t-g,p.loaded-h,4==f.readyState?0:p.total-p.loaded),h=p.loaded,g=t};for(var q in b.headers)f.setRequestHeader(q.toLowerCase(),b.headers[q]);f.send(b.body)});return new Uf(k,function(){f.abort();return Promise.resolve()})}
1084
- function qx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}P("shaka.net.HttpXHRPlugin",nx);nx.parse=ox;var px=window.XMLHttpRequest;gg("http",ox,1,!0);gg("https",ox,1,!0);gg("blob",ox,1,!0);function rx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function sx(a){return a.$().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Aa+":"+a.ja}function tx(a,b){return jl(a.g.$(),a.g.Aa,a.g.ja,b.streaming.retryParameters)};function ux(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function vx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}ux.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function wx(a){var b=this;this.o=a;this.j=new Map;this.i=new rg(function(){return xx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new ux}wx.prototype.destroy=function(){return this.i.destroy()};function yx(a,b,c){a.m=b;a.l=c}function xx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
1085
- function zx(a,b,c,d,e,f){sg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,p;return L(function(t){if(1==t.g)return C(t,Ax(a,c),2);h=t.h;if(a.i.g)throw new Q(2,9,7001);if(e)for(m in k=Ab(h),l=new Og(k),l.data)n=Number(m),q=l.data[n],p=l.g[n],a.l(q,p);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return t.return(f(h))})});a.j.set(b,g)}function Bx(a){return L(function(b){return 1==b.g?C(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
1086
- function Ax(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=pg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;Kb(a.h,e);return g.return(f.data)})};function Cx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Tf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Cx.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ra(b,2);return C(b,a.g,4)}if(2!=b.g)return ta(b,0);va(b);F(b)})};
1087
- function Dx(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return C(g,b(f.key,f.value,f),2)}f.continue();F(g)})}})}Cx.prototype.store=function(){return this.h};Cx.prototype.promise=function(){return this.g};function Ex(a){this.h=a;this.g=[]}Ex.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Fx(a,b){return Gx(a,b,"readwrite")}function Gx(a,b,c){c=a.h.transaction([b],c);var d=new Cx(c,b);a.g.push(d);d.promise().then(function(){Kb(a.g,d)},function(){Kb(a.g,d)});return d};function Hx(a,b,c){this.h=new Ex(a);this.i=b;this.g=c}r=Hx.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Ix(this.i)};r.removeSegments=function(a,b){return Jx(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,Kx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Vf(e)}))})};r.addManifests=function(){return Ix(this.g)};
1088
- r.updateManifest=function(){return Promise.reject(new Q(2,9,9016,"Cannot modify values in "+this.g))};function Lx(a,b,c){a=Fx(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Fx(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Jx(this,this.g,a,b)};
1089
- r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,Kx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Yc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Gx(a.h,a.g,"readonly"),c=new Map,C(d,Dx(b,function(e,f){var g;return L(function(h){if(1==h.g)return C(h,a.Yc(f),2);g=h.h;c.set(e,g);F(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};r.Vf=function(a){return a};r.Yc=function(a){return Promise.resolve(a)};
1090
- function Ix(a){return Promise.reject(new Q(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Fx(c.h,a);e=d.store();f=[];g={};h=u(b);for(k=h.next();!k.done;g={zd:g.zd},k=h.next())l=k.value,g.zd=e.add(l),g.zd.onsuccess=function(n){return function(){f.push(n.zd.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
1091
- function Jx(a,b,c,d){a=Fx(a.h,b);b=a.store();var e={};c=u(c);for(var f=c.next();!f.done;e={xd:e.xd},f=c.next())e.xd=f.value,b.delete(e.xd).onsuccess=function(g){return function(){return d(g.xd)}}(e);return a.promise()}
1092
- function Kx(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Gx(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=u(c);for(l=k.next();!l.done;h={Nc:h.Nc,Lc:h.Lc},l=k.next())h.Lc=l.value,h.Nc=e.get(h.Lc),h.Nc.onsuccess=function(n){return function(){void 0==n.Nc.result&&g.push(n.Lc);f[n.Lc]=n.Nc.result}}(h);return C(m,d.promise(),2)}if(g.length)throw new Q(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Mx(a){this.g=new Ex(a)}Mx.prototype.destroy=function(){return this.g.destroy()};Mx.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Gx(a.g,"session-ids","readonly"),c=[],C(d,Dx(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};Mx.prototype.add=function(a){var b=Fx(this.g,"session-ids"),c=b.store();a=u(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1093
- Mx.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Fx(b.g,"session-ids"),C(d,Dx(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function Nx(){this.g=new Map}Nx.prototype.destroy=function(){for(var a=[],b=u(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Nx.prototype.init=function(){var a=this;Ox.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=u(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
1094
- function Px(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{fb:d,Ba:f},Ba:e})})});if(b)return b;throw new Q(2,9,9013,"Could not find a cell that supports add-operations");}function Qx(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({fb:d,Ba:f},e)})})}
1095
- function Rx(a,b,c){a=a.g.get(b);if(!a)throw new Q(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new Q(2,9,9013,"Could not find cell with name "+c);return b}function Sx(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Tx(a){var b=Array.from(a.g.keys());if(!b.length)throw new Q(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
1096
- function Ux(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Ox,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Vx(a,b){Ox.set(a,b)}P("shaka.offline.StorageMuxer",Nx);Nx.unregister=function(a){Ox.delete(a)};Nx.register=Vx;Nx.prototype.destroy=Nx.prototype.destroy;var Ox=new Map;function Wx(){Hx.apply(this,arguments)}na(Wx,Hx);Wx.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=Fx(c.h,c.g);e=d.store();f=new Tf;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new Q(2,9,9012,"Could not find values for "+a))};return C(g,Promise.all([d.promise(),f]),0)})};
1097
- Wx.prototype.Yc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Xx(a.periods[c],e),b.push(f);return C(h,nt(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
1098
- function Xx(a,b){Yx(a);for(var c=u(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Zx(e,a.startTime,b)})}
1099
- function Zx(a,b,c){var d=a.initSegmentUri?$x(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
1100
- $x(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Wx.prototype.Vf=function(a){return{data:a.data}};
1101
- function $x(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new Q(2,9,9004,"Could not parse uri "+a);}
1102
- function Yx(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=u(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=u(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=u(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
1103
- f=u(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=u(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=u(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function ay(){Hx.apply(this,arguments)}na(ay,Hx);
1104
- ay.prototype.Yc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=u(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(by(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,nt(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1084
+ function px(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}P("shaka.net.HttpXHRPlugin",mx);mx.parse=nx;var ox=window.XMLHttpRequest;gg("http",nx,1,!0);gg("https",nx,1,!0);gg("blob",nx,1,!0);function qx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function rx(a){return a.$().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Aa+":"+a.ja}function sx(a,b){return il(a.g.$(),a.g.Aa,a.g.ja,b.streaming.retryParameters)};function tx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function ux(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}tx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function vx(a){var b=this;this.o=a;this.j=new Map;this.i=new rg(function(){return wx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new tx}vx.prototype.destroy=function(){return this.i.destroy()};function xx(a,b,c){a.m=b;a.l=c}function wx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
1085
+ function yx(a,b,c,d,e,f){sg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,p;return L(function(t){if(1==t.g)return C(t,zx(a,c),2);h=t.h;if(a.i.g)throw new Q(2,9,7001);if(e)for(m in k=Ab(h),l=new Og(k),l.data)n=Number(m),q=l.data[n],p=l.g[n],a.l(q,p);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return t.return(f(h))})});a.j.set(b,g)}function Ax(a){return L(function(b){return 1==b.g?C(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
1086
+ function zx(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=pg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;Kb(a.h,e);return g.return(f.data)})};function Bx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Tf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Bx.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ra(b,2);return C(b,a.g,4)}if(2!=b.g)return ta(b,0);va(b);F(b)})};
1087
+ function Cx(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return C(g,b(f.key,f.value,f),2)}f.continue();F(g)})}})}Bx.prototype.store=function(){return this.h};Bx.prototype.promise=function(){return this.g};function Dx(a){this.h=a;this.g=[]}Dx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Ex(a,b){return Fx(a,b,"readwrite")}function Fx(a,b,c){c=a.h.transaction([b],c);var d=new Bx(c,b);a.g.push(d);d.promise().then(function(){Kb(a.g,d)},function(){Kb(a.g,d)});return d};function Gx(a,b,c){this.h=new Dx(a);this.i=b;this.g=c}r=Gx.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Hx(this.i)};r.removeSegments=function(a,b){return Ix(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,Jx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Vf(e)}))})};r.addManifests=function(){return Hx(this.g)};
1088
+ r.updateManifest=function(){return Promise.reject(new Q(2,9,9016,"Cannot modify values in "+this.g))};function Kx(a,b,c){a=Ex(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Ex(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Ix(this,this.g,a,b)};
1089
+ r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,Jx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Yc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Fx(a.h,a.g,"readonly"),c=new Map,C(d,Cx(b,function(e,f){var g;return L(function(h){if(1==h.g)return C(h,a.Yc(f),2);g=h.h;c.set(e,g);F(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};r.Vf=function(a){return a};r.Yc=function(a){return Promise.resolve(a)};
1090
+ function Hx(a){return Promise.reject(new Q(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Ex(c.h,a);e=d.store();f=[];g={};h=u(b);for(k=h.next();!k.done;g={zd:g.zd},k=h.next())l=k.value,g.zd=e.add(l),g.zd.onsuccess=function(n){return function(){f.push(n.zd.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
1091
+ function Ix(a,b,c,d){a=Ex(a.h,b);b=a.store();var e={};c=u(c);for(var f=c.next();!f.done;e={xd:e.xd},f=c.next())e.xd=f.value,b.delete(e.xd).onsuccess=function(g){return function(){return d(g.xd)}}(e);return a.promise()}
1092
+ function Jx(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Fx(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=u(c);for(l=k.next();!l.done;h={Nc:h.Nc,Lc:h.Lc},l=k.next())h.Lc=l.value,h.Nc=e.get(h.Lc),h.Nc.onsuccess=function(n){return function(){void 0==n.Nc.result&&g.push(n.Lc);f[n.Lc]=n.Nc.result}}(h);return C(m,d.promise(),2)}if(g.length)throw new Q(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Lx(a){this.g=new Dx(a)}Lx.prototype.destroy=function(){return this.g.destroy()};Lx.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Fx(a.g,"session-ids","readonly"),c=[],C(d,Cx(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};Lx.prototype.add=function(a){var b=Ex(this.g,"session-ids"),c=b.store();a=u(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1093
+ Lx.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Ex(b.g,"session-ids"),C(d,Cx(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function Mx(){this.g=new Map}Mx.prototype.destroy=function(){for(var a=[],b=u(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Mx.prototype.init=function(){var a=this;Nx.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=u(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
1094
+ function Ox(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{fb:d,Ba:f},Ba:e})})});if(b)return b;throw new Q(2,9,9013,"Could not find a cell that supports add-operations");}function Px(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({fb:d,Ba:f},e)})})}
1095
+ function Qx(a,b,c){a=a.g.get(b);if(!a)throw new Q(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new Q(2,9,9013,"Could not find cell with name "+c);return b}function Rx(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Sx(a){var b=Array.from(a.g.keys());if(!b.length)throw new Q(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
1096
+ function Tx(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Nx,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Ux(a,b){Nx.set(a,b)}P("shaka.offline.StorageMuxer",Mx);Mx.unregister=function(a){Nx.delete(a)};Mx.register=Ux;Mx.prototype.destroy=Mx.prototype.destroy;var Nx=new Map;function Vx(){Gx.apply(this,arguments)}na(Vx,Gx);Vx.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=Ex(c.h,c.g);e=d.store();f=new Tf;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new Q(2,9,9012,"Could not find values for "+a))};return C(g,Promise.all([d.promise(),f]),0)})};
1097
+ Vx.prototype.Yc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Wx(a.periods[c],e),b.push(f);return C(h,mt(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
1098
+ function Wx(a,b){Xx(a);for(var c=u(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Yx(e,a.startTime,b)})}
1099
+ function Yx(a,b,c){var d=a.initSegmentUri?Zx(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
1100
+ Zx(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Vx.prototype.Vf=function(a){return{data:a.data}};
1101
+ function Zx(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new Q(2,9,9004,"Could not parse uri "+a);}
1102
+ function Xx(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=u(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=u(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=u(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
1103
+ f=u(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=u(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=u(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function $x(){Gx.apply(this,arguments)}na($x,Gx);
1104
+ $x.prototype.Yc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=u(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(ay(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,mt(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1105
1105
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
1106
- function by(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
1107
- appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function cy(){Hx.apply(this,arguments)}na(cy,Hx);r=cy.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Lx(this,a,b)};r.Yc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function dy(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=dy.prototype;
1108
- r.init=function(){var a=this,b=new Tf,c=!1,d=new Mc(function(){c=!0;b.reject(new Q(2,9,9017))});d.U(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Wx(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new ay(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1109
- new ay(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new cy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Mx(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=u(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new Q(2,
1106
+ function ay(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
1107
+ appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function by(){Gx.apply(this,arguments)}na(by,Gx);r=by.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Kx(this,a,b)};r.Yc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function cy(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=cy.prototype;
1108
+ r.init=function(){var a=this,b=new Tf,c=!1,d=new Mc(function(){c=!0;b.reject(new Q(2,9,9017))});d.U(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Vx(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new $x(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1109
+ new $x(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new by(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Lx(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=u(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new Q(2,
1110
1110
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return C(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return C(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),F(b)}})};
1111
1111
  r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
1112
- r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,ey(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,C(b,a.init(),0)}})};
1113
- function ey(){var a=new Tf,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new Q(2,9,9001,b.error));c.preventDefault()};return a}Vx("idb",function(){return $c()||Sc()||!window.indexedDB?null:new dy});function fy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}fy.prototype.fb=function(){return this.i};fy.prototype.Ba=function(){return this.h};fy.prototype.key=function(){return this.l};fy.prototype.toString=function(){return this.j};
1114
- function gy(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new fy(b,c,d,Number(a[4])):null};function hy(a,b){this.h=a;this.g=b}
1115
- function iy(a,b){var c=new jk(null,0);c.$a(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=jy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Kd}).map(function(l){return ky(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ky(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=u(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
1112
+ r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,dy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,C(b,a.init(),0)}})};
1113
+ function dy(){var a=new Tf,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new Q(2,9,9001,b.error));c.preventDefault()};return a}Ux("idb",function(){return $c()||Sc()||!window.indexedDB?null:new cy});function ey(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}ey.prototype.fb=function(){return this.i};ey.prototype.Ba=function(){return this.h};ey.prototype.key=function(){return this.l};ey.prototype.toString=function(){return this.j};
1114
+ function fy(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new ey(b,c,d,Number(a[4])):null};function gy(a,b){this.h=a;this.g=b}
1115
+ function hy(a,b){var c=new ik(null,0);c.ab(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=iy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Kd}).map(function(l){return jy(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return jy(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=u(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
1116
1116
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null}}
1117
- function jy(a,b,c,d){for(var e=new Set,f=u(b),g=f.next();!g.done;g=f.next()){var h=u(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=u(c);for(g=f.next();!g.done;g=f.next())for(h=u(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=u(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=u(b);for(e=b.next();!e.done;e=
1118
- b.next())for(e=e.value,g=ky(a,e,d),h=u(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=u(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=ky(a,e,d),g=u(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
1119
- function ky(a,b,c){var d=b.segments.map(function(e){return ly(a,e,b)});c.ld(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fk(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1117
+ function iy(a,b,c,d){for(var e=new Set,f=u(b),g=f.next();!g.done;g=f.next()){var h=u(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=u(c);for(g=f.next();!g.done;g=f.next())for(h=u(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=u(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=u(b);for(e=b.next();!e.done;e=
1118
+ b.next())for(e=e.value,g=jy(a,e,d),h=u(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=u(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=jy(a,e,d),g=u(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
1119
+ function jy(a,b,c){var d=b.segments.map(function(e){return ky(a,e,b)});c.ld(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ek(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1120
1120
  null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Od(b.mimeType,b.codecs)])}}
1121
- function ly(a,b,c){var d=new fy("segment",a.h,a.g,b.dataKey);a=new xi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?my(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function my(a,b){var c=new fy("segment",a.h,a.g,b);return new vi(function(){return[c.toString()]},0,null)};function ny(){this.g=null}r=ny.prototype;r.configure=function(){};
1122
- r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=gy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new Q(2,1,9004,a);e=new Nx;sa(m,2);return C(m,e.init(),4);case 4:return C(m,Rx(e,d.fb(),d.Ba()),5);case 5:return f=m.h,C(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new hy(d.fb(),d.Ba()),l=iy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),C(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
1121
+ function ky(a,b,c){var d=new ey("segment",a.h,a.g,b.dataKey);a=new wi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?ly(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function ly(a,b){var c=new ey("segment",a.h,a.g,b);return new ri(function(){return[c.toString()]},0,null)};function my(){this.g=null}r=my.prototype;r.configure=function(){};
1122
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=fy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new Q(2,1,9004,a);e=new Mx;sa(m,2);return C(m,e.init(),4);case 4:return C(m,Qx(e,d.fb(),d.Ba()),5);case 5:return f=m.h,C(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new gy(d.fb(),d.Ba()),l=hy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),C(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
1123
1123
  r.update=function(){};
1124
- r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new Nx,ra(m,2,3),C(m,e.init(),5);case 5:return C(m,Rx(e,d.fb(),d.Ba()),6);case 6:return f=m.h,C(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),C(m,e.destroy(),10);case 10:ya(m,0);break;case 2:va(m),m.u(3)}})};
1125
- r.onInitialVariantChosen=function(){};r.banLocation=function(){};ni["application/x-offline-manifest"]=function(){return new ny};function oy(){}function py(a){var b=gy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Xf(a)):a=b&&"segment"==b.g?qy(b.key(),b):Vf(new Q(2,1,9004,a));return a}
1126
- function qy(a,b){var c=new Nx;return Xf(void 0).va(function(){return c.init()}).va(function(){return Rx(c,b.fb(),b.Ba())}).va(function(d){return d.getSegments([b.key()])}).va(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}P("shaka.offline.OfflineScheme",oy);oy.plugin=py;gg("offline",py);function ry(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=u(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,t=u(m),w=t.next();!w.done;w=t.next())if(w=w.value,sy(w.info,q)){w.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=u(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=ty(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
1127
- function ty(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new qh({zb:b,onError:function(){},fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),C(f,yh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return va(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==
1128
- h.g)return ra(h,2),C(h,Kh(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);va(h);F(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function sy(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Lb(a.audioCapabilities,b.audioCapabilities,c)&&Lb(a.videoCapabilities,b.videoCapabilities,c)};function uy(a,b,c){var d=b.presentationTimeline.getDuration();b=vy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function wy(a,b){var c=iy(new hy(a.fb(),a.Ba()),b),d=b.appMetadata||{};c=vy(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
1129
- function vy(a){var b=[],c=mf(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(Ze(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push($e(c.value));return b};function xy(){this.g={}}function yy(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function zy(a,b){a.g[b.id]=b.bandwidth||2048}function Ay(a,b){a=a.g[b];null==a&&(a=0);return a};function By(a){var b=this;if(a&&a.constructor!=X)throw new Q(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Zb()):(this.h=bm(),this.g=new fg);this.i=[];this.j=[];var c=!a;this.l=new rg(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return xx(l)})),2);case 2:d=function(){};e=[];f=u(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return C(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return C(k,b.g.destroy(),4);
1130
- case 4:b.h=null,b.g=null,F(k)}})})}function Cy(){if(Nc())a:{var a=u(Ox.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=By.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ul(a,b));return fm(this.h,a)};r.getConfiguration=function(){var a=bm();fm(a,this.h,bm());return a};r.Zb=function(){return this.g};
1131
- r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new wx(this.g);this.j.push(f);b=Dy(this,a,b||{},function(){var g;return L(function(h){if(1==h.g)return c?h.u(2):C(h,Mm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=mi(a,c||null);return h.return(g())})},e,f);b=new Uf(b,function(){return xx(f)});b.finally(function(){Kb(d.j,f)});return Ey(this,b)};
1132
- function Dy(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:return Fy(),h=g=null,k=new Nx,n=m=l=null,ra(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Gy(a,b,g,e),6);case 6:q=A.h;Hy(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.dc();if(!p)throw new Q(2,9,9005,b);return C(A,a.rc(q,function(D){n=n||D},e),7);case 7:h=A.h;Hy(a);if(n)throw n;return C(A,Iy(q,h,e),8);case 8:return C(A,k.init(),9);case 9:return Hy(a),C(A,Px(k),10);case 10:return l=A.h,Hy(a),t=Jy(h,
1133
- q,b,c,e,f),w=t.Th,x=t.Jf,C(A,l.Ba.addManifests([w]),11);case 11:z=A.h;Hy(a);m=z[0];Hy(a);if(n)throw n;return C(A,Ky(a,x,m,w,f,e,l.Ba,q,h),12);case 12:return Hy(a),Ly(q,w,h,e),C(A,l.Ba.updateManifest(m,w),13);case 13:return Hy(a),v=new fy("manifest",l.path.fb,l.path.Ba,m),A.return(wy(v,w));case 3:return wa(A),C(A,k.destroy(),14);case 14:if(!g){A.u(15);break}return C(A,g.stop(),15);case 15:if(!h){A.u(17);break}return C(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=va(A);if(null==m){A.u(19);break}return C(A,
1134
- My(m),19);case 19:throw n||B;}})}
1135
- function Ky(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,t,w,x,z,v;return L(function(B){switch(B.g){case 1:l={};m=0;n=function(A,D){var H,J,I,E,G,K,M;return L(function(O){if(1==O.g){H={};J=u(A);for(I=J.next();!I.done;H={Pb:H.Pb},I=J.next())H.Pb=I.value,E=tx(H.Pb,f),G=H.Pb.i,K=H.Pb.h,M=function(N){return function(R){var S,V,xa;return L(function(Ca){if(1==Ca.g)return C(Ca,g.addSegments([{data:R}]),2);S=Ca.h;Hy(a);V=N.Pb.g;xa=sx(V);l[xa]=S[0];m+=R.byteLength;F(Ca)})}}(H),zx(e,H.Pb.groupId,E,G,K,M);return C(O,Bx(e),
1136
- 2)}if(!D)return O.u(0);Hy(a);Ly(h,d,k,f);return C(O,g.updateManifest(c,d),0)})};q=!1;ra(B,2);if(!Ny(h)||!q||Oy(h)){B.u(4);break}return C(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return Hy(a),b=b.filter(function(A){return!A.h}),p=l,t=m,l={},m=0,C(B,Py(g,c,d,p,t,function(){return Hy(a)}),6);case 6:Hy(a);case 4:if(q){B.u(7);break}return C(B,n(b,!1),8);case 8:return Hy(a),w=l,x=m,l={},m=0,C(B,Py(g,c,d,w,x,function(){return Hy(a)}),9);case 9:Hy(a);case 7:ta(B,0);break;case 2:return z=va(B),
1137
- v=Object.values(l),C(B,g.removeSegments(v,function(){}),10);case 10:throw z;}})}function My(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new Nx,C(f,b.init(),2);case 2:return C(f,Px(b),3);case 3:return c=f.h,d=new fy("manifest",c.path.fb,c.path.Ba,a),C(f,b.destroy(),4);case 4:return e=new By,C(f,e.remove(d.toString()),0)}})}
1138
- function Py(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x;return L(function(z){switch(z.g){case 1:g=!1;ra(z,2);h=!0;k=u(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=u(m.segments),q=n.next();!q.done;q=n.next())p=q.value,t=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=t&&(p.dataKey=t,p.pendingSegmentRefId=void 0),t=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=t&&(p.initSegmentKey=t,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
1139
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(z,a.updateManifest(b,c),4);case 4:g=!0;f();ta(z,0);break;case 2:return w=va(z),C(z,My(b),5);case 5:if(g){z.u(6);break}x=Object.values(d);return C(z,a.removeSegments(x,function(){}),6);case 6:throw w;}})}
1140
- function Iy(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N;return L(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Fe(a,c.restrictions,d),C(R,Je(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;De(a,g,h,f);k=u(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(Ze(m));n=u(a.textStreams);for(q=n.next();!q.done;q=n.next())p=q.value,e.push($e(p));
1124
+ r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new Mx,ra(m,2,3),C(m,e.init(),5);case 5:return C(m,Qx(e,d.fb(),d.Ba()),6);case 6:return f=m.h,C(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),C(m,e.destroy(),10);case 10:ya(m,0);break;case 2:va(m),m.u(3)}})};
1125
+ r.onInitialVariantChosen=function(){};r.banLocation=function(){};mi["application/x-offline-manifest"]=function(){return new my};function ny(){}function oy(a){var b=fy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Xf(a)):a=b&&"segment"==b.g?py(b.key(),b):Vf(new Q(2,1,9004,a));return a}
1126
+ function py(a,b){var c=new Mx;return Xf(void 0).va(function(){return c.init()}).va(function(){return Qx(c,b.fb(),b.Ba())}).va(function(d){return d.getSegments([b.key()])}).va(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}P("shaka.offline.OfflineScheme",ny);ny.plugin=oy;gg("offline",oy);function qy(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=u(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,t=u(m),w=t.next();!w.done;w=t.next())if(w=w.value,ry(w.info,q)){w.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=u(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=sy(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
1127
+ function sy(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new qh({zb:b,onError:function(){},fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),C(f,yh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return va(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==
1128
+ h.g)return ra(h,2),C(h,Kh(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);va(h);F(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function ry(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Lb(a.audioCapabilities,b.audioCapabilities,c)&&Lb(a.videoCapabilities,b.videoCapabilities,c)};function ty(a,b,c){var d=b.presentationTimeline.getDuration();b=uy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function vy(a,b){var c=hy(new gy(a.fb(),a.Ba()),b),d=b.appMetadata||{};c=uy(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
1129
+ function uy(a){var b=[],c=mf(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(Ze(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push($e(c.value));return b};function wy(){this.g={}}function xy(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function yy(a,b){a.g[b.id]=b.bandwidth||2048}function zy(a,b){a=a.g[b];null==a&&(a=0);return a};function Ay(a){var b=this;if(a&&a.constructor!=X)throw new Q(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Zb()):(this.h=am(),this.g=new fg);this.i=[];this.j=[];var c=!a;this.l=new rg(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return wx(l)})),2);case 2:d=function(){};e=[];f=u(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return C(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return C(k,b.g.destroy(),4);
1130
+ case 4:b.h=null,b.g=null,F(k)}})})}function By(){if(Nc())a:{var a=u(Nx.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=Ay.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Tl(a,b));return em(this.h,a)};r.getConfiguration=function(){var a=am();em(a,this.h,am());return a};r.Zb=function(){return this.g};
1131
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new vx(this.g);this.j.push(f);b=Cy(this,a,b||{},function(){var g;return L(function(h){if(1==h.g)return c?h.u(2):C(h,ym(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=li(a,c||null);return h.return(g())})},e,f);b=new Uf(b,function(){return wx(f)});b.finally(function(){Kb(d.j,f)});return Dy(this,b)};
1132
+ function Cy(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:return Ey(),h=g=null,k=new Mx,n=m=l=null,ra(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Fy(a,b,g,e),6);case 6:q=A.h;Gy(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.dc();if(!p)throw new Q(2,9,9005,b);return C(A,a.rc(q,function(D){n=n||D},e),7);case 7:h=A.h;Gy(a);if(n)throw n;return C(A,Hy(q,h,e),8);case 8:return C(A,k.init(),9);case 9:return Gy(a),C(A,Ox(k),10);case 10:return l=A.h,Gy(a),t=Iy(h,
1133
+ q,b,c,e,f),w=t.Th,x=t.Jf,C(A,l.Ba.addManifests([w]),11);case 11:z=A.h;Gy(a);m=z[0];Gy(a);if(n)throw n;return C(A,Jy(a,x,m,w,f,e,l.Ba,q,h),12);case 12:return Gy(a),Ky(q,w,h,e),C(A,l.Ba.updateManifest(m,w),13);case 13:return Gy(a),v=new ey("manifest",l.path.fb,l.path.Ba,m),A.return(vy(v,w));case 3:return wa(A),C(A,k.destroy(),14);case 14:if(!g){A.u(15);break}return C(A,g.stop(),15);case 15:if(!h){A.u(17);break}return C(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=va(A);if(null==m){A.u(19);break}return C(A,
1134
+ Ly(m),19);case 19:throw n||B;}})}
1135
+ function Jy(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,t,w,x,z,v;return L(function(B){switch(B.g){case 1:l={};m=0;n=function(A,D){var H,J,I,E,G,K,M;return L(function(O){if(1==O.g){H={};J=u(A);for(I=J.next();!I.done;H={Pb:H.Pb},I=J.next())H.Pb=I.value,E=sx(H.Pb,f),G=H.Pb.i,K=H.Pb.h,M=function(N){return function(R){var S,V,xa;return L(function(Ca){if(1==Ca.g)return C(Ca,g.addSegments([{data:R}]),2);S=Ca.h;Gy(a);V=N.Pb.g;xa=rx(V);l[xa]=S[0];m+=R.byteLength;F(Ca)})}}(H),yx(e,H.Pb.groupId,E,G,K,M);return C(O,Ax(e),
1136
+ 2)}if(!D)return O.u(0);Gy(a);Ky(h,d,k,f);return C(O,g.updateManifest(c,d),0)})};q=!1;ra(B,2);if(!My(h)||!q||Ny(h)){B.u(4);break}return C(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return Gy(a),b=b.filter(function(A){return!A.h}),p=l,t=m,l={},m=0,C(B,Oy(g,c,d,p,t,function(){return Gy(a)}),6);case 6:Gy(a);case 4:if(q){B.u(7);break}return C(B,n(b,!1),8);case 8:return Gy(a),w=l,x=m,l={},m=0,C(B,Oy(g,c,d,w,x,function(){return Gy(a)}),9);case 9:Gy(a);case 7:ta(B,0);break;case 2:return z=va(B),
1137
+ v=Object.values(l),C(B,g.removeSegments(v,function(){}),10);case 10:throw z;}})}function Ly(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new Mx,C(f,b.init(),2);case 2:return C(f,Ox(b),3);case 3:return c=f.h,d=new ey("manifest",c.path.fb,c.path.Ba,a),C(f,b.destroy(),4);case 4:return e=new Ay,C(f,e.remove(d.toString()),0)}})}
1138
+ function Oy(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x;return L(function(z){switch(z.g){case 1:g=!1;ra(z,2);h=!0;k=u(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=u(m.segments),q=n.next();!q.done;q=n.next())p=q.value,t=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=t&&(p.dataKey=t,p.pendingSegmentRefId=void 0),t=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=t&&(p.initSegmentKey=t,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
1139
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(z,a.updateManifest(b,c),4);case 4:g=!0;f();ta(z,0);break;case 2:return w=va(z),C(z,Ly(b),5);case 5:if(g){z.u(6);break}x=Object.values(d);return C(z,a.removeSegments(x,function(){}),6);case 6:throw w;}})}
1140
+ function Hy(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,H,J,I,E,G,K,M,O,N;return L(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Fe(a,c.restrictions,d),C(R,Je(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;De(a,g,h,f);k=u(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(Ze(m));n=u(a.textStreams);for(q=n.next();!q.done;q=n.next())p=q.value,e.push($e(p));
1141
1141
  t=u(a.imageStreams);for(w=t.next();!w.done;w=t.next())x=w.value,e.push(af(x));return C(R,c.offline.trackSelectionCallback(e),3);case 3:z=R.h;v=a.presentationTimeline.getDuration();B=0;A=u(z);for(D=A.next();!D.done;D=A.next())H=D.value,J=H.bandwidth*v/8,B+=J;ra(R,4);return C(R,c.offline.downloadSizeCallback(B),6);case 6:I=R.h;if(!I)throw new Q(2,9,9014);ta(R,5);break;case 4:E=va(R);if(E instanceof Q)throw E;throw new Q(2,9,9015);case 5:G=new Set;K=new Set;M=new Set;O=u(z);for(D=O.next();!D.done;D=
1142
- O.next())N=D.value,"variant"==N.type&&G.add(N.id),"text"==N.type&&K.add(N.id),"image"==N.type&&M.add(N.id);a.variants=a.variants.filter(function(S){return G.has(S.id)});a.textStreams=a.textStreams.filter(function(S){return K.has(S.id)});a.imageStreams=a.imageStreams.filter(function(S){return M.has(S.id)});Qy(a);F(R)}})}
1143
- function Jy(a,b,c,d,e,f){var g=uy(c,b,d),h=e.offline.progressCallback;yx(f,function(p,t){g.size=t;h(g,p)},function(p,t){k&&e.offline.usePersistentLicense&&l==t&&Gh(a,"cenc",p)});var k=Ny(b)&&!Oy(b),l=null;k&&(l=Ry.get(a.g.keySystem));for(var m=new xy,n=u(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=u(b.imageStreams);for(q=n.next();!q.done;q=n.next())zy(m,q.value);q=u(b.variants);for(n=q.next();!n.done;n=q.next())yy(m,n.value);m=Sy(f,m,b,e);f=m.streams;m=m.Jf;q=a.g;n=e.offline.usePersistentLicense;
1144
- q&&n&&(q.initData=[]);return{Th:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cd(),streams:f,sessionIds:n?Qh(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Jf:m}}function Ny(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1145
- function Oy(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Ly(a,b,c,d){b.expiration=c.cd();c=Qh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Ny(a)&&d.offline.usePersistentLicense&&!c.length)throw new Q(2,9,9007);}r.remove=function(a){return Ty(this,Uy(this,a))};
1146
- function Uy(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:Fy();c=gy(b);if(null==c||"manifest"!=c.g)throw new Q(2,9,9004,b);d=c;e=new Nx;sa(k,2);return C(k,e.init(),4);case 4:return C(k,Rx(e,d.fb(),d.Ba()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([Vy(a,h,e),Wy(f,d,h)]),2);case 2:return wa(k),C(k,e.destroy(),8);case 8:ya(k,0)}})}
1147
- function Xy(a,b){for(var c=[],d=u(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Od(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Od(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Vy(a,b,c){return L(function(d){return C(d,Yy(a.g,a.h.drm,c,b),0)})}
1148
- function Wy(a,b,c){function d(){}var e=Zy(c);wy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.ki=function(){return Ty(this,$y(this))};
1149
- function $y(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return Fy(),b=a.g,c=a.h.drm,d=new Nx,e=!1,sa(n,2),C(n,d.init(),4);case 4:f=[],Sx(d,function(q){return f.push(q)}),g=u(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return C(n,k.getAll(),8);case 8:return l=n.h,C(n,ry(c,b,l),9);case 9:return m=n.h,C(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return wa(n),C(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
1150
- r.list=function(){return Ty(this,az())};function az(){var a,b,c;return L(function(d){switch(d.g){case 1:return Fy(),a=[],b=new Nx,sa(d,2),C(d,b.init(),4);case 4:return c=Promise.resolve(),Qx(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return C(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=wy(new fy("manifest",e.fb,e.Ba,l),k);a.push(k)});F(h)})})}),C(d,c,2);case 2:return wa(d),C(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
1151
- function Gy(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
1152
- c.configure(d.manifest),Hy(a),C(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Hy(a),k=bz(h),C(l,Promise.all(ug(k,function(m){return m.createSegmentIndex()})),3);Hy(a);if(e)throw e;return l.return(h)})}r.rc=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=new qh({zb:d.g,onError:b,fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),C(f,vh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?C(f,Ih(e),3):f.return(e)})};
1153
- function Sy(a,b,c,d){var e=new Map,f=bz(c),g=new Map;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=cz(a,b,c,h,d,e);g.set(h.id,k)}a=u(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Jf:Array.from(e.values())}}
1154
- function cz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,
1155
- spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;dz(d,c.presentationTimeline.qb(),function(l){var m=sx(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=Ay(b,d.id)*q;q=vx(a.g,q);f.set(m,new rx(l,q,k,!1))}l.ca&&(n=sx(l.ca),f.has(n)||(q=.5*Ay(b,d.id),q=vx(a.g,q),f.set(n,new rx(l.ca,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
1156
- endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function dz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Hy(a){if(a.l.g)throw new Q(2,9,7001);}function Fy(){if(!Cy())throw new Q(2,9,9E3);}
1157
- function Ty(a,b){return L(function(c){if(1==c.g)return a.i.push(b),sa(c,2),C(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);Kb(a.i,b);return ya(c,0)})}function Ey(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Kb(a.i,c)})}function Zy(a){var b=new Set;a=u(a.streams);for(var c=a.next();!c.done;c=a.next()){c=u(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
1158
- function Yy(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Tx(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Xy(d,!1),videoCapabilities:Xy(d,!0)}});return C(h,ry(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1159
- function bz(a){for(var b=new Set,c=u(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=u(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=u(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
1160
- function Qy(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=u(b),d=c.next();!d.done;d=c.next()){d=u(b);for(var e=d.next();!e.done;e=d.next());}b=u(a);for(c=b.next();!c.done;c=b.next())for(c=u(a),d=c.next();!d.done;d=c.next());}P("shaka.offline.Storage",By);By.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new Nx,sa(b,2),C(b,Ux(a),2)):5!=b.g?(wa(b),C(b,a.destroy(),5)):ya(b,0)})};
1161
- By.prototype.list=By.prototype.list;By.prototype.removeEmeSessions=By.prototype.ki;By.prototype.remove=By.prototype.remove;By.prototype.store=By.prototype.store;By.prototype.getNetworkingEngine=By.prototype.Zb;By.prototype.getConfiguration=By.prototype.getConfiguration;By.prototype.configure=By.prototype.configure;By.prototype.destroy=By.prototype.destroy;By.support=Cy;
1162
- var Ry=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");$o.offline=Cy;function ez(){}function fz(a,b){a={priority:b||0,callback:a};for(b=0;b<gz.length;b++)if(gz[b].priority<a.priority){gz.splice(b,0,a);return}gz.push(a)}P("shaka.polyfill",ez);ez.register=fz;ez.installAll=function(){for(var a=u(gz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Wa("Error installing polyfill!",c)}}};var gz=[];function hz(){this.g=new iz}function jz(){window.AbortController||(window.AbortController=hz,window.AbortSignal=iz)}hz.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new T("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(hz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});ez.AbortController=hz;hz.install=jz;
1163
- function iz(){cg.call(this);this.h=!1;this.g=void 0;this.onabort=null}na(iz,cg);da.Object.defineProperties(iz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});fz(jz);function kz(){}function lz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=u(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())mz(b.value)}function mz(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}ez.Aria=kz;kz.install=lz;fz(lz);function nz(){}function oz(){pz()}ez.EncryptionScheme=nz;nz.install=oz;fz(oz,-2);function qz(){}
1164
- function rz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
1165
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",sz);document.addEventListener("webkitfullscreenerror",sz);document.addEventListener("mozfullscreenchange",sz);document.addEventListener("mozfullscreenerror",sz);document.addEventListener("MSFullscreenChange",sz);document.addEventListener("MSFullscreenError",sz)}}
1166
- function sz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}ez.Fullscreen=qz;qz.install=rz;fz(rz);function tz(){}function uz(){var a=!0;!$c()||$c()&&Tc("Android")||$c()&&Tc("Fuchsia")||(a=!1);if(ad()||cd()||bd()||Xc()||Uc()||Tc("PC=EOS")||dd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),vz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=wz)}
1167
- function wz(a){var b,c,d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Oc(e),!f)||d&&(g=d.contentType,h=Oc(g),!h))return q.return(b)}else return q.return(b);q.u(2);break}if(!Nc())return q.return(b);if(!c){q.u(3);break}return C(q,xz(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var p=d.contentType;$c()&&d.spatialRendering&&
1168
- (p+="; spatialRendering=true");l=kb(p);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return C(q,yz(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}
1169
- function xz(a){var b,c;return L(function(d){return 1==d.g?$c()?C(d,zz(a),3):Uc()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(kb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(kb(a.contentType))})}
1170
- function yz(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Uc()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
1171
- distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=(a?a.contentType:"")+"#"+(b?b.contentType:"")+"#"+c.keySystem;l=null;ra(m,2);if(k in Az){l=Az[k];m.u(4);break}return C(m,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:l=m.h,Az[k]=l;case 4:ta(m,3);break;case 2:va(m);case 3:return m.return(l)}})}
1172
- function zz(a){var b,c;return L(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(kb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Bz?(c=Bz[b],d.u(2)):C(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Bz[b]=c);return d.return(c)})}ez.MediaCapabilities=tz;tz.install=uz;
1173
- var vz=null;tz.originalMcap=vz;var Az={};tz.memoizedMediaKeySystemAccessRequests_=Az;var Bz={};tz.memoizedCanDisplayTypeRequests_=Bz;fz(uz,-1);function Cz(){}function Dz(){var a=ed();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(Ez(),Fz()):15>=a&&Ez():(Wc()||Vc()||Tc("Tizen 4"))&&Gz();(window.MediaSource||window.ManagedMediaSource)&&Hz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Iz()}
1174
- function Ez(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function Fz(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
1175
- function Hz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Ud(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Ud(c)&&b(c)}}}
1176
- function Gz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Xd(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Xd(c)&&b(c)}}}
1177
- function Iz(){var a=MediaSource.isTypeSupported;Xc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}ez.MediaSource=Cz;Cz.install=Dz;fz(Dz);function Jz(){}function Kz(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Lz():void 0!=window.orientation&&Mz())}function Lz(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1178
- function Mz(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Nz;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new T("change");b.dispatchEvent(c)})}ez.Orientation=Jz;Jz.install=Kz;function Nz(){cg.call(this);this.type="";this.angle=0}na(Nz,cg);
1179
- Nz.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
1180
- Nz.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};fz(Kz);function Oz(){}var Pz,Qz,Rz,Sz,Tz,Uz;function Vz(a,b){try{var c=new Wz(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Xz(a){var b=this.mediaKeys;b&&b!=a&&Yz(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Yz(a,this):Promise.resolve()}
1181
- function Zz(a){a=Ab(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=md(a.subarray(4),!0);a=pd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Bb(a);this.dispatchEvent(b)}ez.PatchedMediaKeysApple=Oz;
1182
- Oz.uninstall=function(){Pz&&(Pz=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Qz),HTMLMediaElement.prototype.setMediaKeys=Rz,window.MediaKeys=Sz,window.MediaKeySystemAccess=Tz,navigator.requestMediaKeySystemAccess=Uz,Qz=Uz=Rz=Tz=Sz=null,window.shakaMediaKeysPolyfill=!1)};
1183
- Oz.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Pz=!0,Qz=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Rz=HTMLMediaElement.prototype.setMediaKeys,Sz=window.MediaKeys,Tz=window.MediaKeySystemAccess,Uz=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Xz;window.MediaKeys=$z;window.MediaKeySystemAccess=Wz;navigator.requestMediaKeySystemAccess=
1184
- Vz;window.shakaMediaKeysPolyfill=!0}};
1185
- function Wz(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=u(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=u(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1142
+ O.next())N=D.value,"variant"==N.type&&G.add(N.id),"text"==N.type&&K.add(N.id),"image"==N.type&&M.add(N.id);a.variants=a.variants.filter(function(S){return G.has(S.id)});a.textStreams=a.textStreams.filter(function(S){return K.has(S.id)});a.imageStreams=a.imageStreams.filter(function(S){return M.has(S.id)});Py(a);F(R)}})}
1143
+ function Iy(a,b,c,d,e,f){var g=ty(c,b,d),h=e.offline.progressCallback;xx(f,function(p,t){g.size=t;h(g,p)},function(p,t){k&&e.offline.usePersistentLicense&&l==t&&Gh(a,"cenc",p)});var k=My(b)&&!Ny(b),l=null;k&&(l=Qy.get(a.g.keySystem));for(var m=new wy,n=u(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=u(b.imageStreams);for(q=n.next();!q.done;q=n.next())yy(m,q.value);q=u(b.variants);for(n=q.next();!n.done;n=q.next())xy(m,n.value);m=Ry(f,m,b,e);f=m.streams;m=m.Jf;q=a.g;n=e.offline.usePersistentLicense;
1144
+ q&&n&&(q.initData=[]);return{Th:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cd(),streams:f,sessionIds:n?Qh(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Jf:m}}function My(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1145
+ function Ny(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Ky(a,b,c,d){b.expiration=c.cd();c=Qh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(My(a)&&d.offline.usePersistentLicense&&!c.length)throw new Q(2,9,9007);}r.remove=function(a){return Sy(this,Ty(this,a))};
1146
+ function Ty(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:Ey();c=fy(b);if(null==c||"manifest"!=c.g)throw new Q(2,9,9004,b);d=c;e=new Mx;sa(k,2);return C(k,e.init(),4);case 4:return C(k,Qx(e,d.fb(),d.Ba()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([Uy(a,h,e),Vy(f,d,h)]),2);case 2:return wa(k),C(k,e.destroy(),8);case 8:ya(k,0)}})}
1147
+ function Wy(a,b){for(var c=[],d=u(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Od(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Od(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Uy(a,b,c){return L(function(d){return C(d,Xy(a.g,a.h.drm,c,b),0)})}
1148
+ function Vy(a,b,c){function d(){}var e=Yy(c);vy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.ki=function(){return Sy(this,Zy(this))};
1149
+ function Zy(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return Ey(),b=a.g,c=a.h.drm,d=new Mx,e=!1,sa(n,2),C(n,d.init(),4);case 4:f=[],Rx(d,function(q){return f.push(q)}),g=u(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return C(n,k.getAll(),8);case 8:return l=n.h,C(n,qy(c,b,l),9);case 9:return m=n.h,C(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return wa(n),C(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
1150
+ r.list=function(){return Sy(this,$y())};function $y(){var a,b,c;return L(function(d){switch(d.g){case 1:return Ey(),a=[],b=new Mx,sa(d,2),C(d,b.init(),4);case 4:return c=Promise.resolve(),Px(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return C(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=vy(new ey("manifest",e.fb,e.Ba,l),k);a.push(k)});F(h)})})}),C(d,c,2);case 2:return wa(d),C(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
1151
+ function Fy(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
1152
+ c.configure(d.manifest),Gy(a),C(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Gy(a),k=az(h),C(l,Promise.all(ug(k,function(m){return m.createSegmentIndex()})),3);Gy(a);if(e)throw e;return l.return(h)})}r.rc=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=new qh({zb:d.g,onError:b,fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),C(f,vh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?C(f,Ih(e),3):f.return(e)})};
1153
+ function Ry(a,b,c,d){var e=new Map,f=az(c),g=new Map;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=bz(a,b,c,h,d,e);g.set(h.id,k)}a=u(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Jf:Array.from(e.values())}}
1154
+ function bz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,
1155
+ spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;cz(d,c.presentationTimeline.qb(),function(l){var m=rx(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=zy(b,d.id)*q;q=ux(a.g,q);f.set(m,new qx(l,q,k,!1))}l.ca&&(n=rx(l.ca),f.has(n)||(q=.5*zy(b,d.id),q=ux(a.g,q),f.set(n,new qx(l.ca,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
1156
+ endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function cz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Gy(a){if(a.l.g)throw new Q(2,9,7001);}function Ey(){if(!By())throw new Q(2,9,9E3);}
1157
+ function Sy(a,b){return L(function(c){if(1==c.g)return a.i.push(b),sa(c,2),C(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);Kb(a.i,b);return ya(c,0)})}function Dy(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Kb(a.i,c)})}function Yy(a){var b=new Set;a=u(a.streams);for(var c=a.next();!c.done;c=a.next()){c=u(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
1158
+ function Xy(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Sx(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Wy(d,!1),videoCapabilities:Wy(d,!0)}});return C(h,qy(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1159
+ function az(a){for(var b=new Set,c=u(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=u(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=u(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
1160
+ function Py(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=u(b),d=c.next();!d.done;d=c.next()){d=u(b);for(var e=d.next();!e.done;e=d.next());}b=u(a);for(c=b.next();!c.done;c=b.next())for(c=u(a),d=c.next();!d.done;d=c.next());}P("shaka.offline.Storage",Ay);Ay.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new Mx,sa(b,2),C(b,Tx(a),2)):5!=b.g?(wa(b),C(b,a.destroy(),5)):ya(b,0)})};
1161
+ Ay.prototype.list=Ay.prototype.list;Ay.prototype.removeEmeSessions=Ay.prototype.ki;Ay.prototype.remove=Ay.prototype.remove;Ay.prototype.store=Ay.prototype.store;Ay.prototype.getNetworkingEngine=Ay.prototype.Zb;Ay.prototype.getConfiguration=Ay.prototype.getConfiguration;Ay.prototype.configure=Ay.prototype.configure;Ay.prototype.destroy=Ay.prototype.destroy;Ay.support=By;
1162
+ var Qy=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");Zo.offline=By;function dz(){}function ez(a,b){a={priority:b||0,callback:a};for(b=0;b<fz.length;b++)if(fz[b].priority<a.priority){fz.splice(b,0,a);return}fz.push(a)}P("shaka.polyfill",dz);dz.register=ez;dz.installAll=function(){for(var a=u(fz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Wa("Error installing polyfill!",c)}}};var fz=[];function gz(){this.g=new hz}function iz(){window.AbortController||(window.AbortController=gz,window.AbortSignal=hz)}gz.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new T("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(gz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});dz.AbortController=gz;gz.install=iz;
1163
+ function hz(){cg.call(this);this.h=!1;this.g=void 0;this.onabort=null}na(hz,cg);da.Object.defineProperties(hz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});ez(iz);function jz(){}function kz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=u(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())lz(b.value)}function lz(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}dz.Aria=jz;jz.install=kz;ez(kz);function mz(){}function nz(){oz()}dz.EncryptionScheme=mz;mz.install=nz;ez(nz,-2);function pz(){}
1164
+ function qz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
1165
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",rz);document.addEventListener("webkitfullscreenerror",rz);document.addEventListener("mozfullscreenchange",rz);document.addEventListener("mozfullscreenerror",rz);document.addEventListener("MSFullscreenChange",rz);document.addEventListener("MSFullscreenError",rz)}}
1166
+ function rz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}dz.Fullscreen=pz;pz.install=qz;ez(qz);function sz(){}function tz(){var a=!0;!$c()||$c()&&Tc("Android")||$c()&&Tc("Fuchsia")||(a=!1);if(ad()||cd()||bd()||Xc()||Uc()||Tc("PC=EOS")||dd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),uz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=vz)}
1167
+ function vz(a){var b,c,d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Oc(e),!f)||d&&(g=d.contentType,h=Oc(g),!h))return q.return(b)}else return q.return(b);q.u(2);break}if(!Nc())return q.return(b);if(!c){q.u(3);break}return C(q,wz(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var p=d.contentType;$c()&&d.spatialRendering&&
1168
+ (p+="; spatialRendering=true");l=kb(p);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return C(q,xz(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}
1169
+ function wz(a){var b,c;return L(function(d){return 1==d.g?$c()?C(d,yz(a),3):Uc()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(kb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(kb(a.contentType))})}
1170
+ function xz(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Uc()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
1171
+ distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=(a?a.contentType:"")+"#"+(b?b.contentType:"")+"#"+c.keySystem;l=null;ra(m,2);if(k in zz){l=zz[k];m.u(4);break}return C(m,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:l=m.h,zz[k]=l;case 4:ta(m,3);break;case 2:va(m);case 3:return m.return(l)}})}
1172
+ function yz(a){var b,c;return L(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(kb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Az?(c=Az[b],d.u(2)):C(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Az[b]=c);return d.return(c)})}dz.MediaCapabilities=sz;sz.install=tz;
1173
+ var uz=null;sz.originalMcap=uz;var zz={};sz.memoizedMediaKeySystemAccessRequests_=zz;var Az={};sz.memoizedCanDisplayTypeRequests_=Az;ez(tz,-1);function Bz(){}function Cz(){var a=ed();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(Dz(),Ez()):15>=a&&Dz():(Wc()||Vc()||Tc("Tizen 4"))&&Fz();(window.MediaSource||window.ManagedMediaSource)&&Gz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Hz()}
1174
+ function Dz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function Ez(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
1175
+ function Gz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Ud(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Ud(c)&&b(c)}}}
1176
+ function Fz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Xd(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Xd(c)&&b(c)}}}
1177
+ function Hz(){var a=MediaSource.isTypeSupported;Xc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}dz.MediaSource=Bz;Bz.install=Cz;ez(Cz);function Iz(){}function Jz(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Kz():void 0!=window.orientation&&Lz())}function Kz(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1178
+ function Lz(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Mz;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new T("change");b.dispatchEvent(c)})}dz.Orientation=Iz;Iz.install=Jz;function Mz(){cg.call(this);this.type="";this.angle=0}na(Mz,cg);
1179
+ Mz.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
1180
+ Mz.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};ez(Jz);function Nz(){}var Oz,Pz,Qz,Rz,Sz,Tz;function Uz(a,b){try{var c=new Vz(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Wz(a){var b=this.mediaKeys;b&&b!=a&&Xz(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Xz(a,this):Promise.resolve()}
1181
+ function Yz(a){a=Ab(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=md(a.subarray(4),!0);a=pd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Bb(a);this.dispatchEvent(b)}dz.PatchedMediaKeysApple=Nz;
1182
+ Nz.uninstall=function(){Oz&&(Oz=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Pz),HTMLMediaElement.prototype.setMediaKeys=Qz,window.MediaKeys=Rz,window.MediaKeySystemAccess=Sz,navigator.requestMediaKeySystemAccess=Tz,Pz=Tz=Qz=Sz=Rz=null,window.shakaMediaKeysPolyfill=!1)};
1183
+ Nz.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Oz=!0,Pz=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Qz=HTMLMediaElement.prototype.setMediaKeys,Rz=window.MediaKeys,Sz=window.MediaKeySystemAccess,Tz=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Wz;window.MediaKeys=Zz;window.MediaKeySystemAccess=Vz;navigator.requestMediaKeySystemAccess=
1184
+ Uz;window.shakaMediaKeysPolyfill=!0}};
1185
+ function Vz(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=u(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=u(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1186
1186
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=u(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
1187
- Wz.prototype.createMediaKeys=function(){var a=new $z(this.keySystem);return Promise.resolve(a)};Wz.prototype.getConfiguration=function(){return this.g};function $z(a){this.h=new WebKitMediaKeys(a);this.g=new eb}$z.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new aA(this.h,a)};$z.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1188
- function Yz(a,b){a.g.ib();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",Zz);try{return qk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}$z.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function aA(a){cg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new eb;this.sessionId="";this.expiration=NaN;this.closed=new Tf;this.keyStatuses=new bA}na(aA,cg);r=aA.prototype;
1189
- r.generateRequest=function(a,b){var c=this;this.h=new Tf;try{var d=this.l.createSession("video/mp4",Ab(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.bc()?"license-request":"license-renewal").set("message",Bb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(cA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1190
- function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:cA(c,"output-not-allowed");break;default:cA(c,"internal-error")}});cA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1191
- r.update=function(a){this.g=new Tf;try{this.i.update(Ab(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function cA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}
1192
- function bA(){this.size=0;this.g=void 0}r=bA.prototype;r.bc=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,di.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=di.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function dA(){}function eA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||Vc()||Tc("Tizen 4")||Tc("Tizen 5.0")||Yc())&&(MediaKeys.prototype.setServerCertificate=fA)}function fA(){return Promise.resolve(!1)}ez.PatchedMediaKeysCert=dA;dA.install=eA;fz(eA);function gA(){}function hA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=iA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=jA,window.MediaKeys=kA,window.MediaKeySystemAccess=lA,window.shakaMediaKeysPolyfill=!0)}function iA(){return Promise.reject(Error("The key system specified is not supported."))}
1193
- function jA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}ez.PatchedMediaKeysNop=gA;gA.install=hA;function kA(){throw new TypeError("Illegal constructor.");}kA.prototype.createSession=function(){};kA.prototype.setServerCertificate=function(){};kA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function lA(){this.keySystem="";throw new TypeError("Illegal constructor.");}lA.prototype.getConfiguration=function(){};
1194
- lA.prototype.createMediaKeys=function(){};fz(hA,-10);function mA(){}
1195
- function nA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)oA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=pA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=qA;window.MediaKeys=rA;window.MediaKeySystemAccess=sA;window.shakaMediaKeysPolyfill=!0}}
1196
- function tA(a){var b=oA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function pA(a,b){try{var c=new sA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function qA(a){var b=this.mediaKeys;b&&b!=a&&uA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&uA(a,this);return Promise.resolve()}ez.PatchedMediaKeysWebkit=mA;mA.install=nA;
1197
- function sA(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=u(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=u(f.audioCapabilities),
1187
+ Vz.prototype.createMediaKeys=function(){var a=new Zz(this.keySystem);return Promise.resolve(a)};Vz.prototype.getConfiguration=function(){return this.g};function Zz(a){this.h=new WebKitMediaKeys(a);this.g=new eb}Zz.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new $z(this.h,a)};Zz.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1188
+ function Xz(a,b){a.g.ib();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",Yz);try{return pk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Zz.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function $z(a){cg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new eb;this.sessionId="";this.expiration=NaN;this.closed=new Tf;this.keyStatuses=new aA}na($z,cg);r=$z.prototype;
1189
+ r.generateRequest=function(a,b){var c=this;this.h=new Tf;try{var d=this.l.createSession("video/mp4",Ab(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.bc()?"license-request":"license-renewal").set("message",Bb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(bA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1190
+ function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:bA(c,"output-not-allowed");break;default:bA(c,"internal-error")}});bA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1191
+ r.update=function(a){this.g=new Tf;try{this.i.update(Ab(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function bA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}
1192
+ function aA(){this.size=0;this.g=void 0}r=aA.prototype;r.bc=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,di.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=di.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function cA(){}function dA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||Vc()||Tc("Tizen 4")||Tc("Tizen 5.0")||Yc())&&(MediaKeys.prototype.setServerCertificate=eA)}function eA(){return Promise.resolve(!1)}dz.PatchedMediaKeysCert=cA;cA.install=dA;ez(dA);function fA(){}function gA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=hA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=iA,window.MediaKeys=jA,window.MediaKeySystemAccess=kA,window.shakaMediaKeysPolyfill=!0)}function hA(){return Promise.reject(Error("The key system specified is not supported."))}
1193
+ function iA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}dz.PatchedMediaKeysNop=fA;fA.install=gA;function jA(){throw new TypeError("Illegal constructor.");}jA.prototype.createSession=function(){};jA.prototype.setServerCertificate=function(){};jA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function kA(){this.keySystem="";throw new TypeError("Illegal constructor.");}kA.prototype.getConfiguration=function(){};
1194
+ kA.prototype.createMediaKeys=function(){};ez(gA,-10);function lA(){}
1195
+ function mA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)nA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=oA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=pA;window.MediaKeys=qA;window.MediaKeySystemAccess=rA;window.shakaMediaKeysPolyfill=!0}}
1196
+ function sA(a){var b=nA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function oA(a,b){try{var c=new rA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function pA(a){var b=this.mediaKeys;b&&b!=a&&tA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&tA(a,this);return Promise.resolve()}dz.PatchedMediaKeysWebkit=lA;lA.install=mA;
1197
+ function rA(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=u(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=u(f.audioCapabilities),
1198
1198
  l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=u(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
1199
- d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}sA.prototype.createMediaKeys=function(){var a=new rA(this.g);return Promise.resolve(a)};sA.prototype.getConfiguration=function(){return this.h};function rA(a){this.l=a;this.h=null;this.g=new eb;this.i=[];this.j=new Map}
1200
- function uA(a,b){a.h=b;a.g.ib();var c=oA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Bb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=vA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.bc()?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=vA(a,d.sessionId))wA(d,"usable"),
1201
- d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=vA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?wA(e,"output-restricted"):1==f?wA(e,"expired"):wA(e,"internal-error"))}}))}
1202
- rA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new xA(b,this.l,a);this.i.push(a);return a};rA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};rA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1203
- function vA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function xA(a,b,c){cg.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Tf;this.keyStatuses=new yA}na(xA,cg);
1204
- function zA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(pd("LOAD_SESSION|"+c));else{var e=pd("PERSISTENT|");d=Bd(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Tf;var f=tA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Mc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
1205
- function AA(a,b,c){if(a.g)a.g.then(function(){return AA(a,b,c)}).catch(function(){return AA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=jd(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=wd(e.keys[0].k);e=wd(e.keys[0].kid)}else d=Ab(c),e=null;var f=tA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1206
- function wA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}r=xA.prototype;r.generateRequest=function(a,b){return zA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?zA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Tf;AA(this,b,a);return b};
1207
- r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=tA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function yA(){this.size=0;this.g=void 0}r=yA.prototype;r.bc=function(){return this.g};
1208
- r.forEach=function(a){this.g&&a(this.g,di.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=di.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var oA="";fz(nA);function BA(){}function CA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=DA,Object.defineProperty(a,"disablePictureInPicture",{get:EA,set:FA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=GA,document.addEventListener("webkitpresentationmodechanged",HA,!0))}}
1209
- function HA(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
1210
- function DA(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function GA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1211
- function EA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function FA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}ez.PiPWebkit=BA;BA.install=CA;fz(CA);function IA(){}function JA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=KA))}function KA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}ez.RandomUUID=IA;IA.install=JA;fz(JA);function LA(){}function MA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:NA})}function NA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}ez.Symbol=LA;LA.install=MA;fz(MA);function OA(){}function PA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}ez.VideoPlayPromise=OA;OA.install=PA;fz(PA);function QA(){}function RA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Yc())&&(a.getVideoPlaybackQuality=SA)}}function SA(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}ez.VideoPlaybackQuality=QA;QA.install=RA;fz(RA);function TA(){}function UA(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=VA;else if(6==b)a=WA;else{try{var c=!!VA(1,2,"")}catch(d){c=!1}c&&(a=VA)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function VA(a,b,c){return new window.TextTrackCue(a,b,c)}function WA(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}ez.VTTCue=TA;TA.install=UA;fz(UA);function XA(){}XA.prototype.parseInit=function(){};XA.prototype.setSequenceMode=function(){};XA.prototype.setManifestType=function(){};XA.prototype.parseMedia=function(a,b){var c=null,d=[];a=jd(a).split(/\r?\n/);a=u(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=YA.exec(e))){var f=ZA.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Nb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1212
- P("shaka.text.LrcTextParser",XA);XA.prototype.parseMedia=XA.prototype.parseMedia;XA.prototype.setManifestType=XA.prototype.setManifestType;XA.prototype.setSequenceMode=XA.prototype.setSequenceMode;XA.prototype.parseInit=XA.prototype.parseInit;var YA=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,ZA=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;he["application/x-subtitle-lrc"]=function(){return new XA};function $A(){}$A.prototype.parseInit=function(){};$A.prototype.setSequenceMode=function(){};$A.prototype.setManifestType=function(){};
1213
- $A.prototype.parseMedia=function(a,b,c){var d=jd(a);a=[];if(""==d)return a;var e=Rg(d,"tt");if(!e)throw new Q(2,2,2005,"Failed to parse TTML.");d=$g(e,"body")[0];if(!d)return[];var f=fh(e,aB,"frameRate"),g=fh(e,aB,"subFrameRate"),h=fh(e,aB,"frameRateMultiplier"),k=fh(e,aB,"tickRate"),l=fh(e,aB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=fh(e,bB,"extent");if("default"!=m&&"preserve"!=m)throw new Q(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new cB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
1214
- {Sb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=$g(e,"metadata")[0])?g.children:[];h=$g(e,"style");e=$g(e,"region");k=[];for(var q=u(e),p=q.next();!p.done;p=q.next()){var t=p.value;p=new Ob;var w=t.attributes["xml:id"];if(w){p.id=w;var x=null;n&&(x=dB.exec(n)||eB.exec(n));w=x?Number(x[1]):null;x=x?Number(x[2]):null;var z,v=fB(t,h,"extent");if(v){var B=(z=dB.exec(v))||eB.exec(v);null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=w&&(p.width=100*p.width/w),null!=x&&(p.height=
1215
- 100*p.height/x)),p.widthUnits=z||null!=w?gc:0,p.heightUnits=z||null!=x?gc:0)}if(t=fB(t,h,"origin"))if(B=(z=dB.exec(t))||eB.exec(t),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?v||(p.width=100-p.viewportAnchorX,p.widthUnits=gc,p.height=100-p.viewportAnchorY,p.heightUnits=gc):(null!=x&&(p.viewportAnchorY=100*p.viewportAnchorY/x),null!=w&&(p.viewportAnchorX=100*p.viewportAnchorX/w)),p.viewportAnchorUnits=z||null!=w?gc:0}else p=null;p&&k.push(p)}if(Xg(d,"p").length)throw new Q(2,
1216
- 2,2001,"<p> can only be inside <div> in TTML");n=u(Xg(d,"div"));for(q=n.next();!q.done;q=n.next())if(Xg(q.value,"span").length)throw new Q(2,2,2001,"<span> can only be inside <p> in TTML");if(b=gB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1217
- function gB(a,b,c,d,e,f,g,h,k,l,m,n){var q=l;if(Vg(a)){if(!m)return null;var p={tagName:"span",children:[Yg(a)],attributes:{},parent:null}}else p=a;for(var t=null,w=u(hB),x=w.next();!x.done&&!(t=iB(p,"backgroundImage",d,"#",x.value)[0]);x=w.next());w=null;var z=fh(p,hB,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new rc(n),z=new rc(z),(x=x.resolve(z).toString())&&(w=x));if("p"==a.tagName||t||w)m=!0;a=m;x="default"==(p.attributes["xml:space"]||(h?"default":"preserve"));z=p.children.every(Vg);h=
1218
- [];if(!z)for(var v=u(p.children),B=v.next();!B.done;B=v.next())(B=gB(B.value,b,c,d,e,f,g,x,k,p,m,n))&&h.push(B);d=null!=l;n=Yg(p);n=p.children.length&&n&&/\S/.test(n);B=p.attributes.begin||p.attributes.end||p.attributes.dur;if(!(B||n||"br"==p.tagName||0!=h.length||d&&!x))return null;v=jB(p,c);n=v.start;for(v=v.end;q&&q.tagName&&"tt"!=q.tagName;)v=kB(q,c,n,v),n=v.start,v=v.end,q=q.parent;null==n&&(n=0);n+=b.periodStart;v=null==v?Infinity:v+b.periodStart;n=Math.max(n,b.segmentStart);v=Math.min(v,b.segmentEnd);
1219
- if(!B&&0<h.length)for(n=Infinity,v=0,b=u(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new Nb(n,v,""),e.lineBreak=!0,e;b="";z&&(b=sd(Yg(p)||""),x&&(b=b.replace(/\s+/g," ")));b=new Nb(n,v,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=iB(p,"region",f,"")[0];if(p.attributes.region&&k&&k.attributes["xml:id"]){var A=k.attributes["xml:id"];b.region=g.filter(function(D){return D.id==A})[0]}g=k;l&&d&&!p.attributes.region&&
1220
- !p.attributes.style&&(g=iB(l,"region",f,"")[0]);lB(b,p,g,t,w,e,a,0==h.length);return b}
1221
- function lB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==mB(b,c,f,"direction",g)&&(a.direction="rtl");h=mB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Rb);(h=mB(b,c,f,"textAlign",!0))?(a.positionAlign=nB[h],a.lineAlign=oB[h],a.textAlign=ac[h.toUpperCase()]):a.textAlign=Qb;if(h=mB(b,c,f,"displayAlign",!0))a.displayAlign=bc[h.toUpperCase()];if(h=mB(b,c,f,"color",g))a.color=h;if(h=mB(b,c,f,"backgroundColor",
1222
- g))a.backgroundColor=h;if(h=mB(b,c,f,"border",g))a.border=h;if(h=mB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=mB(b,c,f,"fontWeight",g))&&
1223
- "bold"==h&&(a.fontWeight=700);h=mB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=mB(b,c,f,"lineHeight",g))&&h.match(pB)&&(a.lineHeight=h);(h=mB(b,c,f,"fontSize",g))&&(h.match(pB)||h.match(qB))&&(a.fontSize=h);if(h=mB(b,c,f,"fontStyle",g))a.fontStyle=fc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=Yg(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=mB(b,c,f,"textOutline",g))d=
1224
- d.split(" "),d[0].match(pB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(pB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=mB(b,c,f,"letterSpacing",g))&&d.match(pB)&&(a.letterSpacing=d);(d=mB(b,c,f,"linePadding",g))&&d.match(pB)&&(a.linePadding=d);if(d=mB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=fB(c,f,"textDecoration"))&&rB(a,d);(d=sB(b,f,"textDecoration"))&&rB(a,d);if(d=mB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(mB(b,c,f,"ruby",g)){case "container":a.rubyTag=
1199
+ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}rA.prototype.createMediaKeys=function(){var a=new qA(this.g);return Promise.resolve(a)};rA.prototype.getConfiguration=function(){return this.h};function qA(a){this.l=a;this.h=null;this.g=new eb;this.i=[];this.j=new Map}
1200
+ function tA(a,b){a.h=b;a.g.ib();var c=nA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Bb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=uA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.bc()?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=uA(a,d.sessionId))vA(d,"usable"),
1201
+ d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=uA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?vA(e,"output-restricted"):1==f?vA(e,"expired"):vA(e,"internal-error"))}}))}
1202
+ qA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new wA(b,this.l,a);this.i.push(a);return a};qA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};qA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1203
+ function uA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function wA(a,b,c){cg.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Tf;this.keyStatuses=new xA}na(wA,cg);
1204
+ function yA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(pd("LOAD_SESSION|"+c));else{var e=pd("PERSISTENT|");d=Bd(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Tf;var f=sA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Mc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
1205
+ function zA(a,b,c){if(a.g)a.g.then(function(){return zA(a,b,c)}).catch(function(){return zA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=jd(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=wd(e.keys[0].k);e=wd(e.keys[0].kid)}else d=Ab(c),e=null;var f=sA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1206
+ function vA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}r=wA.prototype;r.generateRequest=function(a,b){return yA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?yA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Tf;zA(this,b,a);return b};
1207
+ r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=sA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function xA(){this.size=0;this.g=void 0}r=xA.prototype;r.bc=function(){return this.g};
1208
+ r.forEach=function(a){this.g&&a(this.g,di.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=di.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var nA="";ez(mA);function AA(){}function BA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=CA,Object.defineProperty(a,"disablePictureInPicture",{get:DA,set:EA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=FA,document.addEventListener("webkitpresentationmodechanged",GA,!0))}}
1209
+ function GA(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
1210
+ function CA(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function FA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1211
+ function DA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function EA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}dz.PiPWebkit=AA;AA.install=BA;ez(BA);function HA(){}function IA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=JA))}function JA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}dz.RandomUUID=HA;HA.install=IA;ez(IA);function KA(){}function LA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:MA})}function MA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}dz.Symbol=KA;KA.install=LA;ez(LA);function NA(){}function OA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}dz.VideoPlayPromise=NA;NA.install=OA;ez(OA);function PA(){}function QA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Yc())&&(a.getVideoPlaybackQuality=RA)}}function RA(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}dz.VideoPlaybackQuality=PA;PA.install=QA;ez(QA);function SA(){}function TA(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=UA;else if(6==b)a=VA;else{try{var c=!!UA(1,2,"")}catch(d){c=!1}c&&(a=UA)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function UA(a,b,c){return new window.TextTrackCue(a,b,c)}function VA(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}dz.VTTCue=SA;SA.install=TA;ez(TA);function WA(){}WA.prototype.parseInit=function(){};WA.prototype.setSequenceMode=function(){};WA.prototype.setManifestType=function(){};WA.prototype.parseMedia=function(a,b){var c=null,d=[];a=jd(a).split(/\r?\n/);a=u(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=XA.exec(e))){var f=YA.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Nb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1212
+ P("shaka.text.LrcTextParser",WA);WA.prototype.parseMedia=WA.prototype.parseMedia;WA.prototype.setManifestType=WA.prototype.setManifestType;WA.prototype.setSequenceMode=WA.prototype.setSequenceMode;WA.prototype.parseInit=WA.prototype.parseInit;var XA=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,YA=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;he["application/x-subtitle-lrc"]=function(){return new WA};function ZA(){}ZA.prototype.parseInit=function(){};ZA.prototype.setSequenceMode=function(){};ZA.prototype.setManifestType=function(){};
1213
+ ZA.prototype.parseMedia=function(a,b,c){var d=jd(a);a=[];if(""==d)return a;var e=Rg(d,"tt");if(!e)throw new Q(2,2,2005,"Failed to parse TTML.");d=$g(e,"body")[0];if(!d)return[];var f=fh(e,$A,"frameRate"),g=fh(e,$A,"subFrameRate"),h=fh(e,$A,"frameRateMultiplier"),k=fh(e,$A,"tickRate"),l=fh(e,$A,"cellResolution"),m=e.attributes["xml:space"]||"default",n=fh(e,aB,"extent");if("default"!=m&&"preserve"!=m)throw new Q(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new bB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
1214
+ {Sb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=$g(e,"metadata")[0])?g.children:[];h=$g(e,"style");e=$g(e,"region");k=[];for(var q=u(e),p=q.next();!p.done;p=q.next()){var t=p.value;p=new Ob;var w=t.attributes["xml:id"];if(w){p.id=w;var x=null;n&&(x=cB.exec(n)||dB.exec(n));w=x?Number(x[1]):null;x=x?Number(x[2]):null;var z,v=eB(t,h,"extent");if(v){var B=(z=cB.exec(v))||dB.exec(v);null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=w&&(p.width=100*p.width/w),null!=x&&(p.height=
1215
+ 100*p.height/x)),p.widthUnits=z||null!=w?gc:0,p.heightUnits=z||null!=x?gc:0)}if(t=eB(t,h,"origin"))if(B=(z=cB.exec(t))||dB.exec(t),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?v||(p.width=100-p.viewportAnchorX,p.widthUnits=gc,p.height=100-p.viewportAnchorY,p.heightUnits=gc):(null!=x&&(p.viewportAnchorY=100*p.viewportAnchorY/x),null!=w&&(p.viewportAnchorX=100*p.viewportAnchorX/w)),p.viewportAnchorUnits=z||null!=w?gc:0}else p=null;p&&k.push(p)}if(Xg(d,"p").length)throw new Q(2,
1216
+ 2,2001,"<p> can only be inside <div> in TTML");n=u(Xg(d,"div"));for(q=n.next();!q.done;q=n.next())if(Xg(q.value,"span").length)throw new Q(2,2,2001,"<span> can only be inside <p> in TTML");if(b=fB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1217
+ function fB(a,b,c,d,e,f,g,h,k,l,m,n){var q=l;if(Vg(a)){if(!m)return null;var p={tagName:"span",children:[Yg(a)],attributes:{},parent:null}}else p=a;for(var t=null,w=u(gB),x=w.next();!x.done&&!(t=hB(p,"backgroundImage",d,"#",x.value)[0]);x=w.next());w=null;var z=fh(p,gB,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new rc(n),z=new rc(z),(x=x.resolve(z).toString())&&(w=x));if("p"==a.tagName||t||w)m=!0;a=m;x="default"==(p.attributes["xml:space"]||(h?"default":"preserve"));z=p.children.every(Vg);h=
1218
+ [];if(!z)for(var v=u(p.children),B=v.next();!B.done;B=v.next())(B=fB(B.value,b,c,d,e,f,g,x,k,p,m,n))&&h.push(B);d=null!=l;n=Yg(p);n=p.children.length&&n&&/\S/.test(n);B=p.attributes.begin||p.attributes.end||p.attributes.dur;if(!(B||n||"br"==p.tagName||0!=h.length||d&&!x))return null;v=iB(p,c);n=v.start;for(v=v.end;q&&q.tagName&&"tt"!=q.tagName;)v=jB(q,c,n,v),n=v.start,v=v.end,q=q.parent;null==n&&(n=0);n+=b.periodStart;v=null==v?Infinity:v+b.periodStart;n=Math.max(n,b.segmentStart);v=Math.min(v,b.segmentEnd);
1219
+ if(!B&&0<h.length)for(n=Infinity,v=0,b=u(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new Nb(n,v,""),e.lineBreak=!0,e;b="";z&&(b=sd(Yg(p)||""),x&&(b=b.replace(/\s+/g," ")));b=new Nb(n,v,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=hB(p,"region",f,"")[0];if(p.attributes.region&&k&&k.attributes["xml:id"]){var A=k.attributes["xml:id"];b.region=g.filter(function(D){return D.id==A})[0]}g=k;l&&d&&!p.attributes.region&&
1220
+ !p.attributes.style&&(g=hB(l,"region",f,"")[0]);kB(b,p,g,t,w,e,a,0==h.length);return b}
1221
+ function kB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==lB(b,c,f,"direction",g)&&(a.direction="rtl");h=lB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Rb);(h=lB(b,c,f,"textAlign",!0))?(a.positionAlign=mB[h],a.lineAlign=nB[h],a.textAlign=ac[h.toUpperCase()]):a.textAlign=Qb;if(h=lB(b,c,f,"displayAlign",!0))a.displayAlign=bc[h.toUpperCase()];if(h=lB(b,c,f,"color",g))a.color=h;if(h=lB(b,c,f,"backgroundColor",
1222
+ g))a.backgroundColor=h;if(h=lB(b,c,f,"border",g))a.border=h;if(h=lB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=lB(b,c,f,"fontWeight",g))&&
1223
+ "bold"==h&&(a.fontWeight=700);h=lB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=lB(b,c,f,"lineHeight",g))&&h.match(oB)&&(a.lineHeight=h);(h=lB(b,c,f,"fontSize",g))&&(h.match(oB)||h.match(pB))&&(a.fontSize=h);if(h=lB(b,c,f,"fontStyle",g))a.fontStyle=fc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=Yg(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=lB(b,c,f,"textOutline",g))d=
1224
+ d.split(" "),d[0].match(oB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(oB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=lB(b,c,f,"letterSpacing",g))&&d.match(oB)&&(a.letterSpacing=d);(d=lB(b,c,f,"linePadding",g))&&d.match(oB)&&(a.linePadding=d);if(d=lB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=eB(c,f,"textDecoration"))&&qB(a,d);(d=rB(b,f,"textDecoration"))&&qB(a,d);if(d=lB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(lB(b,c,f,"ruby",g)){case "container":a.rubyTag=
1225
1225
  "ruby";break;case "text":a.rubyTag="rt"}}
1226
- function rB(a,b){b=u(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Kb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Kb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1227
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Kb(a.textDecoration,"overline")}}function mB(a,b,c,d,e){e=void 0===e?!0:e;return(a=sB(a,c,d))?a:e?fB(b,c,d):null}function fB(a,b,c){if(!a)return null;var d=fh(a,bB,c);return d?d:tB(a,b,c)}function sB(a,b,c){var d=fh(a,bB,c);return d?d:tB(a,b,c)}
1228
- function tB(a,b,c){a=iB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=eh(a[e],"urn:ebu:tt:style",c);f||(f=fh(a[e],bB,c));f||(f=sB(a[e],b,c));f&&(d=f)}return d}function iB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?eh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=u(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=u(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
1229
- function kB(a,b,c,d){a=jB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function jB(a,b){var c=uB(a.attributes.begin,b),d=uB(a.attributes.end,b);a=uB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1230
- function uB(a,b){var c=null;if(vB.test(a)){a=vB.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(wB.test(a))c=xB(wB,a);else if(yB.test(a))c=xB(yB,a);else if(zB.test(a))a=zB.exec(a),c=Number(a[1])/b.frameRate;else if(AB.test(a))a=AB.exec(a),c=Number(a[1])/b.g;else if(BB.test(a))c=xB(BB,a);else if(a)throw new Q(2,2,2001,"Could not parse cue time range in TTML");return c}
1231
- function xB(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}P("shaka.text.TtmlTextParser",$A);$A.prototype.parseMedia=$A.prototype.parseMedia;$A.prototype.setManifestType=$A.prototype.setManifestType;$A.prototype.setSequenceMode=$A.prototype.setSequenceMode;$A.prototype.parseInit=$A.prototype.parseInit;
1232
- function cB(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1233
- var dB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,qB=/^(\d{1,2}(?:\.\d+)?|100)%$/,pB=/^(\d+px|\d+em|\d*\.?\d+c)$/,eB=/^(\d+)px (\d+)px$/,vB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,wB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,yB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,zB=/^(\d*(?:\.\d*)?)f$/,AB=/^(\d*(?:\.\d*)?)t$/,BB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),oB={left:Vb,center:"center",right:"end",start:Vb,
1234
- end:"end"},nB={left:"line-left",center:"center",right:"line-right"},aB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],bB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],hB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];he["application/ttml+xml"]=function(){return new $A};function CB(){this.g=new $A}CB.prototype.parseInit=function(a){var b=!1;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new Q(2,2,2007);};CB.prototype.setSequenceMode=function(){};CB.prototype.setManifestType=function(){};
1235
- CB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Bg).box("mdat",Ng(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new Q(2,2,2007);return f};P("shaka.text.Mp4TtmlParser",CB);CB.prototype.parseMedia=CB.prototype.parseMedia;CB.prototype.setManifestType=CB.prototype.setManifestType;CB.prototype.setSequenceMode=CB.prototype.setSequenceMode;CB.prototype.parseInit=CB.prototype.parseInit;he['application/mp4; codecs="stpp"']=function(){return new CB};
1236
- he['application/mp4; codecs="stpp.ttml"']=function(){return new CB};he['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new CB};he['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new CB};function DB(){this.h=!1;this.g="UNKNOWN"}DB.prototype.parseInit=function(){};DB.prototype.setSequenceMode=function(a){this.h=a};DB.prototype.setManifestType=function(a){this.g=a};
1237
- DB.prototype.parseMedia=function(a,b){a=jd(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new Q(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new Q(2,2,2E3);a=EB(new Nu(a[1]));if(null==a)throw new Q(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=u(c[0].split("\n"));
1238
- for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Nu(e);var f=new Ob;Qu(e);Ou(e);for(var g=Qu(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
1239
- h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Ou(e);g=Qu(e)}b.push(f)}d=new Map;FB(d);e=[];c=u(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=u(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=
1226
+ function qB(a,b){b=u(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Kb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Kb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1227
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Kb(a.textDecoration,"overline")}}function lB(a,b,c,d,e){e=void 0===e?!0:e;return(a=rB(a,c,d))?a:e?eB(b,c,d):null}function eB(a,b,c){if(!a)return null;var d=fh(a,aB,c);return d?d:sB(a,b,c)}function rB(a,b,c){var d=fh(a,aB,c);return d?d:sB(a,b,c)}
1228
+ function sB(a,b,c){a=hB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=eh(a[e],"urn:ebu:tt:style",c);f||(f=fh(a[e],aB,c));f||(f=rB(a[e],b,c));f&&(d=f)}return d}function hB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?eh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=u(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=u(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
1229
+ function jB(a,b,c,d){a=iB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function iB(a,b){var c=tB(a.attributes.begin,b),d=tB(a.attributes.end,b);a=tB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1230
+ function tB(a,b){var c=null;if(uB.test(a)){a=uB.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(vB.test(a))c=wB(vB,a);else if(xB.test(a))c=wB(xB,a);else if(yB.test(a))a=yB.exec(a),c=Number(a[1])/b.frameRate;else if(zB.test(a))a=zB.exec(a),c=Number(a[1])/b.g;else if(AB.test(a))c=wB(AB,a);else if(a)throw new Q(2,2,2001,"Could not parse cue time range in TTML");return c}
1231
+ function wB(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}P("shaka.text.TtmlTextParser",ZA);ZA.prototype.parseMedia=ZA.prototype.parseMedia;ZA.prototype.setManifestType=ZA.prototype.setManifestType;ZA.prototype.setSequenceMode=ZA.prototype.setSequenceMode;ZA.prototype.parseInit=ZA.prototype.parseInit;
1232
+ function bB(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1233
+ var cB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,pB=/^(\d{1,2}(?:\.\d+)?|100)%$/,oB=/^(\d+px|\d+em|\d*\.?\d+c)$/,dB=/^(\d+)px (\d+)px$/,uB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,vB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,xB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,yB=/^(\d*(?:\.\d*)?)f$/,zB=/^(\d*(?:\.\d*)?)t$/,AB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),nB={left:Vb,center:"center",right:"end",start:Vb,
1234
+ end:"end"},mB={left:"line-left",center:"center",right:"line-right"},$A=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],aB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],gB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];he["application/ttml+xml"]=function(){return new ZA};function BB(){this.g=new ZA}BB.prototype.parseInit=function(a){var b=!1;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new Q(2,2,2007);};BB.prototype.setSequenceMode=function(){};BB.prototype.setManifestType=function(){};
1235
+ BB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Bg).box("mdat",Ng(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new Q(2,2,2007);return f};P("shaka.text.Mp4TtmlParser",BB);BB.prototype.parseMedia=BB.prototype.parseMedia;BB.prototype.setManifestType=BB.prototype.setManifestType;BB.prototype.setSequenceMode=BB.prototype.setSequenceMode;BB.prototype.parseInit=BB.prototype.parseInit;he['application/mp4; codecs="stpp"']=function(){return new BB};
1236
+ he['application/mp4; codecs="stpp.ttml"']=function(){return new BB};he['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new BB};he['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new BB};function CB(){this.h=!1;this.g="UNKNOWN"}CB.prototype.parseInit=function(){};CB.prototype.setSequenceMode=function(a){this.h=a};CB.prototype.setManifestType=function(a){this.g=a};
1237
+ CB.prototype.parseMedia=function(a,b){a=jd(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new Q(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new Q(2,2,2E3);a=DB(new Mu(a[1]));if(null==a)throw new Q(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=u(c[0].split("\n"));
1238
+ for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Mu(e);var f=new Ob;Pu(e);Nu(e);for(var g=Pu(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
1239
+ h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Nu(e);g=Pu(e)}b.push(f)}d=new Map;EB(d);e=[];c=u(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=u(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=
1240
1240
  l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Nb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var p=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=p;break;case "color":m=!0;l.color=p;break;case "font-family":m=!0;l.fontFamily=p;break;case "font-size":m=!0;l.fontSize=p;break;case "font-weight":if(700<=parseInt(p,10)||"bold"==p)m=!0,l.fontWeight=
1241
1241
  700;break;case "font-style":switch(p){case "normal":m=!0;l.fontStyle=Yb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(p);break;case "text-combine-upright":m=!0;l.textCombineUpright=p;break;case "text-shadow":m=!0;l.textShadow=p;break;case "white-space":m=!0,l.wrapLine="noWrap"!=p}}}m&&d.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,
1242
- f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Nu(f[0]),k=EB(g),n=Pu(g,/[ \t]+--\x3e[ \t]+/g),l=EB(g),null==k||null==n||null==l)Wa("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Nb(k,l,"");Ou(g);for(k=Qu(g);k;)GB(m,k,b),Ou(g),k=Qu(g);HB(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
1243
- function FB(a){for(var b=u(Object.entries(dc)),c=b.next();!c.done;c=b.next()){var d=u(c.value);c=d.next().value;d=d.next().value;var e=new Nb(0,0,"");e.color=d;a.set("."+c,e)}b=u(Object.entries(ec));for(c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,e=new Nb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1244
- function HB(a,b,c){if(a.includes("<")){0===c.size&&FB(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(IB)&&a.push(e),e=-1);a=u(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
1245
- k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=u(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=JB(a);try{var m=Rg("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=u(m),a=m.next();!a.done;a=
1246
- m.next())KB(a.value,b,c);else b.payload=sd(a);else b.payload=sd(a)}else b.payload=sd(a)}function JB(a){var b={"< ":""," >":" &gt;"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function LB(a,b){return a&&0<a.length?a:b}
1247
- function KB(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Ob;d.position=null;d.size=0;if(a.tagName)for(var e=u(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=LB(g.backgroundColor,d.backgroundColor),d.color=LB(g.color,d.color),d.fontFamily=LB(g.fontFamily,d.fontFamily),d.fontSize=
1248
- LB(g.fontSize,d.fontSize),d.textShadow=LB(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Zb(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
1249
- if(!f)break;if(f=EB(new Nu(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Vg(a)||1==e.length&&Vg(e[0]))for(c=Yg(a).split("\n"),a=!0,c=u(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Zb(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=sd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=u(e),a=b.next();!a.done;a=b.next())KB(a.value,d,c)}
1250
- function GB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Qb:a.textAlign=ac[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1251
- b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Pb);else if(d=/^region:(.*)$/.exec(b)){if(b=MB(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=cc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ub,a.line=Number(c[1]),c[2]&&(a.lineAlign=cc[c[2].toUpperCase()])}
1252
- function MB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function EB(a){a=Pu(a,IB);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}P("shaka.text.VttTextParser",DB);DB.prototype.parseMedia=DB.prototype.parseMedia;DB.prototype.setManifestType=DB.prototype.setManifestType;DB.prototype.setSequenceMode=DB.prototype.setSequenceMode;DB.prototype.parseInit=DB.prototype.parseInit;var IB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
1253
- he["text/vtt"]=function(){return new DB};he['text/vtt; codecs="vtt"']=function(){return new DB};he['text/vtt; codecs="wvtt"']=function(){return new DB};function NB(){this.g=null}NB.prototype.parseInit=function(a){var b=this,c=!1;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).O("mdhd",function(d){d=Pi(d.reader,d.version);b.g=d.timescale}).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new Q(2,2,2008);if(!c)throw new Q(2,2,2008);};NB.prototype.setSequenceMode=function(){};NB.prototype.setManifestType=function(){};
1254
- NB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new Q(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Bg).box("moof",Gg).box("traf",Gg).O("tfdt",function(B){g=!0;c=Oi(B.reader,B.version).baseMediaDecodeTime}).O("tfhd",function(B){l=Ni(B.reader,B.flags).Yf}).O("trun",function(B){h=!0;d=Qi(B.reader,B.version,B.flags).xg}).box("mdat",Ng(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new Q(2,2,2008);a=c;for(var m=new yg(e,0),n=u(d),q=n.next();!q.done;q=n.next()){q=
1255
- q.value;var p=q.yf||l,t=q.ie?c+q.ie:a;a=t+(p||0);var w=0;do{var x=m.M();w+=x;var z=m.M(),v=null;"vttc"==Fg(z)?8<x&&(v=m.sb(x-8)):m.skip(x-8);p&&v&&(x=OB(v,b.periodStart+t/this.g,b.periodStart+a/this.g),f.push(x))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(pe)};function OB(a,b,c){var d,e,f;(new Bg).box("payl",Ng(function(g){d=jd(g)})).box("iden",Ng(function(g){e=jd(g)})).box("sttg",Ng(function(g){f=jd(g)})).parse(a);return d?PB(d,e,f,b,c):null}
1256
- function PB(a,b,c,d,e){d=new Nb(d,e,"");HB(a,d,new Map);b&&(d.id=b);if(c)for(a=new Nu(c),b=Qu(a);b;)GB(d,b,[]),Ou(a),b=Qu(a);return d}P("shaka.text.Mp4VttParser",NB);NB.prototype.parseMedia=NB.prototype.parseMedia;NB.prototype.setManifestType=NB.prototype.setManifestType;NB.prototype.setSequenceMode=NB.prototype.setSequenceMode;NB.prototype.parseInit=NB.prototype.parseInit;he['application/mp4; codecs="wvtt"']=function(){return new NB};function QB(){}QB.prototype.parseInit=function(){};QB.prototype.setSequenceMode=function(){};QB.prototype.setManifestType=function(){};QB.prototype.parseMedia=function(a){var b=jd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=u(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Nu(c[0]),e=RB(d),f=Pu(d,/,/g);d=RB(d);if(null==e||null==f||null==d)throw new Q(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Nb(e,d,c.slice(1).join("\n").trim()))}return a};
1257
- function RB(a){a=Pu(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}P("shaka.text.SbvTextParser",QB);QB.prototype.parseMedia=QB.prototype.parseMedia;QB.prototype.setManifestType=QB.prototype.setManifestType;QB.prototype.setSequenceMode=QB.prototype.setSequenceMode;QB.prototype.parseInit=QB.prototype.parseInit;he["text/x-subviewer"]=function(){return new QB};function SB(){this.g=new DB}SB.prototype.parseInit=function(){};SB.prototype.setSequenceMode=function(){};SB.prototype.setManifestType=function(){};SB.prototype.parseMedia=function(a,b,c){a=jd(a);a=TB(a);a=Ab(pd(a));return this.g.parseMedia(a,b,c)};
1258
- function TB(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=u(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}P("shaka.text.SrtTextParser",SB);SB.srt2webvtt=TB;SB.prototype.parseMedia=SB.prototype.parseMedia;
1259
- SB.prototype.setManifestType=SB.prototype.setManifestType;SB.prototype.setSequenceMode=SB.prototype.setSequenceMode;SB.prototype.parseInit=SB.prototype.parseInit;he["text/srt"]=function(){return new SB};function UB(){}UB.prototype.parseInit=function(){};UB.prototype.setSequenceMode=function(){};UB.prototype.setManifestType=function(){};
1260
- UB.prototype.parseMedia=function(a){var b="",c="";a=jd(a).split(/\r?\n\s*\r?\n/);a=u(a);for(var d=a.next();!d.done;d=a.next()){var e=VB.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=u(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=WB.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(XB);else if("Style"==e){e=f.split(XB);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1261
- [];b=null;e={};c=u(c.split(/\r?\n/));for(f=c.next();!f.done;e={se:e.se},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=WB.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(XB);else if("Dialogue"==f){g=g.split(XB);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=YB(f.Start);var k=YB(f.End);g=new Nb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.se=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.se}}(e)))&&ZB(g,f);d.push(g)}return d};
1262
- function ZB(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=$B(c))a.color=c;if(c=b.BackColour)if(c=$B(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Wb;a.textAlign="start";break;case 2:a.displayAlign=Wb;a.textAlign=Qb;break;case 3:a.displayAlign=Wb;a.textAlign="end";
1242
+ f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Mu(f[0]),k=DB(g),n=Ou(g,/[ \t]+--\x3e[ \t]+/g),l=DB(g),null==k||null==n||null==l)Wa("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Nb(k,l,"");Nu(g);for(k=Pu(g);k;)FB(m,k,b),Nu(g),k=Pu(g);GB(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
1243
+ function EB(a){for(var b=u(Object.entries(dc)),c=b.next();!c.done;c=b.next()){var d=u(c.value);c=d.next().value;d=d.next().value;var e=new Nb(0,0,"");e.color=d;a.set("."+c,e)}b=u(Object.entries(ec));for(c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,e=new Nb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1244
+ function GB(a,b,c){if(a.includes("<")){0===c.size&&EB(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(HB)&&a.push(e),e=-1);a=u(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
1245
+ k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=u(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=IB(a);try{var m=Rg("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=u(m),a=m.next();!a.done;a=
1246
+ m.next())JB(a.value,b,c);else b.payload=sd(a);else b.payload=sd(a)}else b.payload=sd(a)}function IB(a){var b={"< ":""," >":" &gt;"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function KB(a,b){return a&&0<a.length?a:b}
1247
+ function JB(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Ob;d.position=null;d.size=0;if(a.tagName)for(var e=u(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=KB(g.backgroundColor,d.backgroundColor),d.color=KB(g.color,d.color),d.fontFamily=KB(g.fontFamily,d.fontFamily),d.fontSize=
1248
+ KB(g.fontSize,d.fontSize),d.textShadow=KB(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Zb(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
1249
+ if(!f)break;if(f=DB(new Mu(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Vg(a)||1==e.length&&Vg(e[0]))for(c=Yg(a).split("\n"),a=!0,c=u(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Zb(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=sd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=u(e),a=b.next();!a.done;a=b.next())JB(a.value,d,c)}
1250
+ function FB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Qb:a.textAlign=ac[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1251
+ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Pb);else if(d=/^region:(.*)$/.exec(b)){if(b=LB(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=cc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ub,a.line=Number(c[1]),c[2]&&(a.lineAlign=cc[c[2].toUpperCase()])}
1252
+ function LB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function DB(a){a=Ou(a,HB);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}P("shaka.text.VttTextParser",CB);CB.prototype.parseMedia=CB.prototype.parseMedia;CB.prototype.setManifestType=CB.prototype.setManifestType;CB.prototype.setSequenceMode=CB.prototype.setSequenceMode;CB.prototype.parseInit=CB.prototype.parseInit;var HB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
1253
+ he["text/vtt"]=function(){return new CB};he['text/vtt; codecs="vtt"']=function(){return new CB};he['text/vtt; codecs="wvtt"']=function(){return new CB};function MB(){this.g=null}MB.prototype.parseInit=function(a){var b=this,c=!1;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).O("mdhd",function(d){d=Oi(d.reader,d.version);b.g=d.timescale}).box("minf",Gg).box("stbl",Gg).O("stsd",Kg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new Q(2,2,2008);if(!c)throw new Q(2,2,2008);};MB.prototype.setSequenceMode=function(){};MB.prototype.setManifestType=function(){};
1254
+ MB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new Q(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Bg).box("moof",Gg).box("traf",Gg).O("tfdt",function(B){g=!0;c=Ni(B.reader,B.version).baseMediaDecodeTime}).O("tfhd",function(B){l=Mi(B.reader,B.flags).Yf}).O("trun",function(B){h=!0;d=Pi(B.reader,B.version,B.flags).xg}).box("mdat",Ng(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new Q(2,2,2008);a=c;for(var m=new yg(e,0),n=u(d),q=n.next();!q.done;q=n.next()){q=
1255
+ q.value;var p=q.yf||l,t=q.ie?c+q.ie:a;a=t+(p||0);var w=0;do{var x=m.M();w+=x;var z=m.M(),v=null;"vttc"==Fg(z)?8<x&&(v=m.sb(x-8)):m.skip(x-8);p&&v&&(x=NB(v,b.periodStart+t/this.g,b.periodStart+a/this.g),f.push(x))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(pe)};function NB(a,b,c){var d,e,f;(new Bg).box("payl",Ng(function(g){d=jd(g)})).box("iden",Ng(function(g){e=jd(g)})).box("sttg",Ng(function(g){f=jd(g)})).parse(a);return d?OB(d,e,f,b,c):null}
1256
+ function OB(a,b,c,d,e){d=new Nb(d,e,"");GB(a,d,new Map);b&&(d.id=b);if(c)for(a=new Mu(c),b=Pu(a);b;)FB(d,b,[]),Nu(a),b=Pu(a);return d}P("shaka.text.Mp4VttParser",MB);MB.prototype.parseMedia=MB.prototype.parseMedia;MB.prototype.setManifestType=MB.prototype.setManifestType;MB.prototype.setSequenceMode=MB.prototype.setSequenceMode;MB.prototype.parseInit=MB.prototype.parseInit;he['application/mp4; codecs="wvtt"']=function(){return new MB};function PB(){}PB.prototype.parseInit=function(){};PB.prototype.setSequenceMode=function(){};PB.prototype.setManifestType=function(){};PB.prototype.parseMedia=function(a){var b=jd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=u(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Mu(c[0]),e=QB(d),f=Ou(d,/,/g);d=QB(d);if(null==e||null==f||null==d)throw new Q(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Nb(e,d,c.slice(1).join("\n").trim()))}return a};
1257
+ function QB(a){a=Ou(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}P("shaka.text.SbvTextParser",PB);PB.prototype.parseMedia=PB.prototype.parseMedia;PB.prototype.setManifestType=PB.prototype.setManifestType;PB.prototype.setSequenceMode=PB.prototype.setSequenceMode;PB.prototype.parseInit=PB.prototype.parseInit;he["text/x-subviewer"]=function(){return new PB};function RB(){this.g=new CB}RB.prototype.parseInit=function(){};RB.prototype.setSequenceMode=function(){};RB.prototype.setManifestType=function(){};RB.prototype.parseMedia=function(a,b,c){a=jd(a);a=SB(a);a=Ab(pd(a));return this.g.parseMedia(a,b,c)};
1258
+ function SB(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=u(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}P("shaka.text.SrtTextParser",RB);RB.srt2webvtt=SB;RB.prototype.parseMedia=RB.prototype.parseMedia;
1259
+ RB.prototype.setManifestType=RB.prototype.setManifestType;RB.prototype.setSequenceMode=RB.prototype.setSequenceMode;RB.prototype.parseInit=RB.prototype.parseInit;he["text/srt"]=function(){return new RB};function TB(){}TB.prototype.parseInit=function(){};TB.prototype.setSequenceMode=function(){};TB.prototype.setManifestType=function(){};
1260
+ TB.prototype.parseMedia=function(a){var b="",c="";a=jd(a).split(/\r?\n\s*\r?\n/);a=u(a);for(var d=a.next();!d.done;d=a.next()){var e=UB.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=u(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=VB.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(WB);else if("Style"==e){e=f.split(WB);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1261
+ [];b=null;e={};c=u(c.split(/\r?\n/));for(f=c.next();!f.done;e={se:e.se},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=VB.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(WB);else if("Dialogue"==f){g=g.split(WB);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=XB(f.Start);var k=XB(f.End);g=new Nb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.se=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.se}}(e)))&&YB(g,f);d.push(g)}return d};
1262
+ function YB(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=ZB(c))a.color=c;if(c=b.BackColour)if(c=ZB(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Wb;a.textAlign="start";break;case 2:a.displayAlign=Wb;a.textAlign=Qb;break;case 3:a.displayAlign=Wb;a.textAlign="end";
1263
1263
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Qb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Qb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
1264
- function $B(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function YB(a){a=aC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",UB);UB.prototype.parseMedia=UB.prototype.parseMedia;UB.prototype.setManifestType=UB.prototype.setManifestType;UB.prototype.setSequenceMode=UB.prototype.setSequenceMode;UB.prototype.parseInit=UB.prototype.parseInit;
1265
- var VB=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,WB=/^\s*([^:]+):\s*(.*)/,XB=/\s*,\s*/,aC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;he["text/x-ssa"]=function(){return new UB};function bC(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Qd:c,V:a}:null}function cC(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,Ea:"mp4a.40."+e}}
1266
- function dC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
1267
- function eC(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1268
- 2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function fC(a){this.i=a;this.h=0;this.g=new Map}r=fC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(ce(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
1269
- r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Mi(e),g=f.length;g<e.length&&!dC(e,g);g++);a=1E3*c.endTime;f=Li(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=cC(e,g);if(!c)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=bC(e,g);if(!h)return Promise.reject(new Q(2,3,3018));var k=h.Qd+h.V;g+k<=e.length&&f.push({data:e.subarray(g+h.Qd,g+k),size:h.V,
1270
- duration:1024,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.Ea,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ta:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:f},stream:b};a=new uw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Aw(a),this.g.set(b.id,d));b=Rw(a);this.h++;b=Bd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.AacTransmuxer",fC);
1271
- fC.prototype.transmux=fC.prototype.transmux;fC.prototype.getOriginalMimeType=fC.prototype.getOriginalMimeType;fC.prototype.convertCodecs=fC.prototype.convertCodecs;fC.prototype.isSupported=fC.prototype.isSupported;fC.prototype.destroy=fC.prototype.destroy;jc("audio/aac",function(){return new fC("audio/aac")},pc);function gC(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1264
+ function ZB(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function XB(a){a=$B.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",TB);TB.prototype.parseMedia=TB.prototype.parseMedia;TB.prototype.setManifestType=TB.prototype.setManifestType;TB.prototype.setSequenceMode=TB.prototype.setSequenceMode;TB.prototype.parseInit=TB.prototype.parseInit;
1265
+ var UB=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,VB=/^\s*([^:]+):\s*(.*)/,WB=/\s*,\s*/,$B=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;he["text/x-ssa"]=function(){return new TB};function aC(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Qd:c,V:a}:null}function bC(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,Ea:"mp4a.40."+e}}
1266
+ function cC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
1267
+ function dC(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1268
+ 2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function eC(a){this.i=a;this.h=0;this.g=new Map}r=eC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(ce(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
1269
+ r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Li(e),g=f.length;g<e.length&&!cC(e,g);g++);a=1E3*c.endTime;f=Ki(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=bC(e,g);if(!c)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=aC(e,g);if(!h)return Promise.reject(new Q(2,3,3018));var k=h.Qd+h.V;g+k<=e.length&&f.push({data:e.subarray(g+h.Qd,g+k),size:h.V,
1270
+ duration:1024,Va:0,flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:2,Ya:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.Ea,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ta:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:f},stream:b};a=new tw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=zw(a),this.g.set(b.id,d));b=Qw(a);this.h++;b=Bd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.AacTransmuxer",eC);
1271
+ eC.prototype.transmux=eC.prototype.transmux;eC.prototype.getOriginalMimeType=eC.prototype.getOriginalMimeType;eC.prototype.convertCodecs=eC.prototype.convertCodecs;eC.prototype.isSupported=eC.prototype.isSupported;eC.prototype.destroy=eC.prototype.destroy;jc("audio/aac",function(){return new eC("audio/aac")},pc);function fC(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1272
1272
  1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ga:a,V:e}}
1273
- function hC(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function iC(a){this.i=a;this.h=0;this.g=new Map}r=iC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
1274
- r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Mi(a),f=e.length;f<a.length&&!hC(a,f);f++);var g=1E3*c.endTime;e=Li(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=gC(a,f);if(!k)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.V),size:k.V,duration:1536,Ua:0,flags:{Wa:0,
1275
- Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ta:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:h},stream:b};a=new uw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Aw(a),this.g.set(b.id,d));b=Rw(a);this.h++;b=Bd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",iC);iC.prototype.transmux=iC.prototype.transmux;
1276
- iC.prototype.getOriginalMimeType=iC.prototype.getOriginalMimeType;iC.prototype.convertCodecs=iC.prototype.convertCodecs;iC.prototype.isSupported=iC.prototype.isSupported;iC.prototype.destroy=iC.prototype.destroy;jc("audio/ac3",function(){return new iC("audio/ac3")},pc);function jC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Vi(a.subarray(b+2));Xi(c,2);Xi(c,3);var d=Yi(c,11)+1<<1,e=Yi(c,2);if(3==e){e=Yi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Yi(c,2);var g=Yi(c,3),h=Yi(c,1);c=Yi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ga:a,V:d}};function kC(a){this.i=a;this.h=0;this.g=new Map}r=kC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1277
- r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Mi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Li(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=jC(a,f);if(!k)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.V),size:k.V,duration:1536,
1278
- Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ta:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:h},stream:b};a=new uw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Aw(a),this.g.set(b.id,d));b=Rw(a);this.h++;b=Bd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",kC);kC.prototype.transmux=kC.prototype.transmux;
1279
- kC.prototype.getOriginalMimeType=kC.prototype.getOriginalMimeType;kC.prototype.convertCodecs=kC.prototype.convertCodecs;kC.prototype.isSupported=kC.prototype.isSupported;kC.prototype.destroy=kC.prototype.destroy;jc("audio/ec3",function(){return new kC("audio/ec3")},pc);function lC(a){if(!a.length)return null;var b=a.find(function(w){return 7==w.type});a=a.find(function(w){return 8==w.type});if(!b||!a)return null;var c=new Vi(b.data),d=bj(c);bj(c);bj(c);$i(c);if(mC.includes(d)&&(d=U(c),3===d&&Xi(c,1),$i(c),$i(c),Xi(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?ij(c,16):ij(c,64))}$i(c);d=U(c);if(0===d)U(c);else if(1===d)for(Xi(c,1),$i(c),$i(c),d=U(c),e=0;e<d;e++)$i(c);$i(c);Xi(c,1);var f=U(c),g=U(c),h=Yi(c,1);0===h&&Xi(c,1);Xi(c,1);var k=0,l=0,m=0,n=0;W(c)&&
1280
- (k=U(c),l=U(c),m=U(c),n=U(c));e=d=1;if(W(c)&&W(c)){var q=bj(c),p=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],t=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<q&&16>=q?(d=p[q-1],e=t[q-1]):255===q&&(d=Yi(c,16),e=Yi(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,y(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,y(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
1273
+ function gC(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function hC(a){this.i=a;this.h=0;this.g=new Map}r=hC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
1274
+ r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Li(a),f=e.length;f<a.length&&!gC(a,f);f++);var g=1E3*c.endTime;e=Ki(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=fC(a,f);if(!k)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.V),size:k.V,duration:1536,Va:0,flags:{Xa:0,
1275
+ Na:0,Ma:0,Ja:0,Ka:2,Ya:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ta:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:h},stream:b};a=new tw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=zw(a),this.g.set(b.id,d));b=Qw(a);this.h++;b=Bd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",hC);hC.prototype.transmux=hC.prototype.transmux;
1276
+ hC.prototype.getOriginalMimeType=hC.prototype.getOriginalMimeType;hC.prototype.convertCodecs=hC.prototype.convertCodecs;hC.prototype.isSupported=hC.prototype.isSupported;hC.prototype.destroy=hC.prototype.destroy;jc("audio/ac3",function(){return new hC("audio/ac3")},pc);function iC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Ui(a.subarray(b+2));Wi(c,2);Wi(c,3);var d=Xi(c,11)+1<<1,e=Xi(c,2);if(3==e){e=Xi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Xi(c,2);var g=Xi(c,3),h=Xi(c,1);c=Xi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ga:a,V:d}};function jC(a){this.i=a;this.h=0;this.g=new Map}r=jC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1277
+ r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Li(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ki(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=iC(a,f);if(!k)return Promise.reject(new Q(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.V),size:k.V,duration:1536,
1278
+ Va:0,flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:2,Ya:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ta:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Ra:h},stream:b};a=new tw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=zw(a),this.g.set(b.id,d));b=Qw(a);this.h++;b=Bd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",jC);jC.prototype.transmux=jC.prototype.transmux;
1279
+ jC.prototype.getOriginalMimeType=jC.prototype.getOriginalMimeType;jC.prototype.convertCodecs=jC.prototype.convertCodecs;jC.prototype.isSupported=jC.prototype.isSupported;jC.prototype.destroy=jC.prototype.destroy;jc("audio/ec3",function(){return new jC("audio/ec3")},pc);function kC(a){if(!a.length)return null;var b=a.find(function(w){return 7==w.type});a=a.find(function(w){return 8==w.type});if(!b||!a)return null;var c=new Ui(b.data),d=aj(c);aj(c);aj(c);Zi(c);if(lC.includes(d)&&(d=U(c),3===d&&Wi(c,1),Zi(c),Zi(c),Wi(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?bj(c,16):bj(c,64))}Zi(c);d=U(c);if(0===d)U(c);else if(1===d)for(Wi(c,1),Zi(c),Zi(c),d=U(c),e=0;e<d;e++)Zi(c);Zi(c);Wi(c,1);var f=U(c),g=U(c),h=Xi(c,1);0===h&&Wi(c,1);Wi(c,1);var k=0,l=0,m=0,n=0;W(c)&&
1280
+ (k=U(c),l=U(c),m=U(c),n=U(c));e=d=1;if(W(c)&&W(c)){var q=aj(c),p=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],t=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<q&&16>=q?(d=p[q-1],e=t[q-1]):255===q&&(d=Xi(c,16),e=Xi(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,y(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,y(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
1281
1281
  225].concat(k,[1],b));return{height:c,width:f,oa:a,xa:d,ya:e}}
1282
- function nC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=u(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=jj(new Vi(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
1283
- {data:Bd.apply(td,y(c)),jd:b}:null}var mC=[100,110,122,244,44,83,86,118,128,138,139,134];function oC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=pC(b.fullData);a=qC(c.fullData);var f=rC(d.fullData);b=sC(b.fullData,c.fullData,d.fullData,{jf:e.jf,If:e.If,Re:a.Re,Se:a.Se,Le:a.Le,Qe:a.Qe,Me:a.Me,Ne:a.Ne,Oe:a.Oe,Pe:a.Pe,Fe:a.Fe,Ge:a.Ge,He:a.He,Ie:a.Ie,Je:a.Je,Ke:a.Ke,Ce:a.Ce,be:a.be,Be:a.Be,Ae:a.Ae,ze:a.ze,pf:f.pf});return{height:a.height,width:a.width,
1284
- oa:b,xa:a.ri,ya:a.pi}}function pC(a){var b=new Vi(a,!0);bj(b);bj(b);Yi(b,4);Yi(b,2);Yi(b,6);a=Yi(b,3);b=W(b);return{jf:a+1,If:b}}
1285
- function qC(a){a=new Vi(a,!0);bj(a);bj(a);var b=0,c=0,d=0,e=0;Yi(a,4);var f=Yi(a,3);W(a);for(var g=Yi(a,2),h=Yi(a,1),k=Yi(a,5),l=bj(a),m=bj(a),n=bj(a),q=bj(a),p=bj(a),t=bj(a),w=bj(a),x=bj(a),z=bj(a),v=bj(a),B=bj(a),A=[],D=[],H=0;H<f;H++)A.push(W(a)),D.push(W(a));if(0<f)for(H=f;8>H;H++)Yi(a,2);for(H=0;H<f;H++)A[H]&&Yi(a,88),D[H]&&bj(a);U(a);A=U(a);3==A&&Yi(a,1);D=U(a);H=U(a);W(a)&&(b+=U(a),c+=U(a),d+=U(a),e+=U(a));var J=U(a),I=U(a),E=U(a);if(W(a))for(var G=0;G<=f;G++)U(a),U(a),U(a);else U(a),U(a),
1286
- U(a);U(a);U(a);U(a);U(a);U(a);U(a);if(W(a)&&W(a))for(G=0;4>G;G++)for(var K=0;K<(3===G?2:6);K++)if(W(a)){var M=Math.min(64,1<<4+(G<<1));1<G&&aj(a);for(var O=0;O<M;O++)aj(a)}else U(a);W(a);W(a);W(a)&&(bj(a),U(a),U(a),W(a));G=U(a);for(M=K=0;M<G;M++)if(O=!1,0!==M&&(O=W(a)),O){M===G&&U(a);W(a);U(a);for(var N=O=0;N<=K;N++){var R=W(a),S=!1;R||(S=W(a));(R||S)&&O++}K=O}else{N=U(a);O=U(a);K=N+O;for(R=0;R<N;R++)U(a),W(a);for(N=0;N<O;N++)U(a),W(a)}if(W(a))for(G=U(a),K=0;K<G;K++){for(M=0;M<E+4;M++)Yi(a,1);Yi(a,
1287
- 1)}G=E=1;K=0;W(a);W(a);if(W(a)){W(a)&&(M=bj(a),O=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],N=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(E=O[M-1],G=N[M-1]):255===M&&(E=Yi(a,16),G=Yi(a,16)));W(a)&&W(a);W(a)&&(Yi(a,3),W(a),W(a)&&(bj(a),bj(a),bj(a)));W(a)&&(U(a),U(a));W(a);W(a);W(a);if(M=W(a))U(a),U(a),U(a),U(a);if(W(a)&&(Yi(a,32),Yi(a,32),W(a)&&U(a),W(a))){N=!1;M=W(a);O=W(a);if(M||O){if(N=W(a))bj(a),Yi(a,5),W(a),Yi(a,5);Yi(a,4);Yi(a,4);N&&Yi(a,4);Yi(a,5);Yi(a,5);Yi(a,5)}for(R=0;R<=
1282
+ function mC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=u(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=ij(new Ui(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
1283
+ {data:Bd.apply(td,y(c)),jd:b}:null}var lC=[100,110,122,244,44,83,86,118,128,138,139,134];function nC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=oC(b.fullData);a=pC(c.fullData);var f=qC(d.fullData);b=rC(b.fullData,c.fullData,d.fullData,{jf:e.jf,If:e.If,Re:a.Re,Se:a.Se,Le:a.Le,Qe:a.Qe,Me:a.Me,Ne:a.Ne,Oe:a.Oe,Pe:a.Pe,Fe:a.Fe,Ge:a.Ge,He:a.He,Ie:a.Ie,Je:a.Je,Ke:a.Ke,Ce:a.Ce,be:a.be,Be:a.Be,Ae:a.Ae,ze:a.ze,pf:f.pf});return{height:a.height,width:a.width,
1284
+ oa:b,xa:a.ri,ya:a.pi}}function oC(a){var b=new Ui(a,!0);aj(b);aj(b);Xi(b,4);Xi(b,2);Xi(b,6);a=Xi(b,3);b=W(b);return{jf:a+1,If:b}}
1285
+ function pC(a){a=new Ui(a,!0);aj(a);aj(a);var b=0,c=0,d=0,e=0;Xi(a,4);var f=Xi(a,3);W(a);for(var g=Xi(a,2),h=Xi(a,1),k=Xi(a,5),l=aj(a),m=aj(a),n=aj(a),q=aj(a),p=aj(a),t=aj(a),w=aj(a),x=aj(a),z=aj(a),v=aj(a),B=aj(a),A=[],D=[],H=0;H<f;H++)A.push(W(a)),D.push(W(a));if(0<f)for(H=f;8>H;H++)Xi(a,2);for(H=0;H<f;H++)A[H]&&Xi(a,88),D[H]&&aj(a);U(a);A=U(a);3==A&&Xi(a,1);D=U(a);H=U(a);W(a)&&(b+=U(a),c+=U(a),d+=U(a),e+=U(a));var J=U(a),I=U(a),E=U(a);if(W(a))for(var G=0;G<=f;G++)U(a),U(a),U(a);else U(a),U(a),
1286
+ U(a);U(a);U(a);U(a);U(a);U(a);U(a);if(W(a)&&W(a))for(G=0;4>G;G++)for(var K=0;K<(3===G?2:6);K++)if(W(a)){var M=Math.min(64,1<<4+(G<<1));1<G&&$i(a);for(var O=0;O<M;O++)$i(a)}else U(a);W(a);W(a);W(a)&&(aj(a),U(a),U(a),W(a));G=U(a);for(M=K=0;M<G;M++)if(O=!1,0!==M&&(O=W(a)),O){M===G&&U(a);W(a);U(a);for(var N=O=0;N<=K;N++){var R=W(a),S=!1;R||(S=W(a));(R||S)&&O++}K=O}else{N=U(a);O=U(a);K=N+O;for(R=0;R<N;R++)U(a),W(a);for(N=0;N<O;N++)U(a),W(a)}if(W(a))for(G=U(a),K=0;K<G;K++){for(M=0;M<E+4;M++)Xi(a,1);Xi(a,
1287
+ 1)}G=E=1;K=0;W(a);W(a);if(W(a)){W(a)&&(M=aj(a),O=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],N=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(E=O[M-1],G=N[M-1]):255===M&&(E=Xi(a,16),G=Xi(a,16)));W(a)&&W(a);W(a)&&(Xi(a,3),W(a),W(a)&&(aj(a),aj(a),aj(a)));W(a)&&(U(a),U(a));W(a);W(a);W(a);if(M=W(a))U(a),U(a),U(a),U(a);if(W(a)&&(Xi(a,32),Xi(a,32),W(a)&&U(a),W(a))){N=!1;M=W(a);O=W(a);if(M||O){if(N=W(a))aj(a),Xi(a,5),W(a),Xi(a,5);Xi(a,4);Xi(a,4);N&&Xi(a,4);Xi(a,5);Xi(a,5);Xi(a,5)}for(R=0;R<=
1288
1288
  f;R++){var V=!0;S=1;W(a)||(V=W(a));var xa=!1;V?U(a):xa=W(a);xa||(S=U(a)+1);if(M){for(V=0;V<S;V++)U(a),U(a),N&&(U(a),U(a));W(a)}if(O){for(V=0;V<S;V++)U(a),U(a),N&&(U(a),U(a));W(a)}}}W(a)&&(W(a),W(a),W(a),K=U(a),U(a),U(a),U(a),U(a))}return{Le:B,Re:g,Se:h,Qe:k,Me:l,Ne:m,Oe:n,Pe:q,Fe:p,Ge:t,He:w,Ie:x,Je:z,Ke:v,be:K,Ce:0,Be:A,Ae:J,ze:I,width:D-(b+c)*(1===A||2===A?2:1),height:H-(d+e)*(1===A?2:1),ri:E,pi:G}}
1289
- function rC(a){var b=new Vi(a,!0);bj(b);bj(b);U(b);U(b);W(b);W(b);Yi(b,3);W(b);W(b);U(b);U(b);aj(b);W(b);W(b);W(b)&&U(b);aj(b);aj(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{pf:c}}
1290
- function sC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Re&3)<<6|(d.Se?1:0)<<5|d.Qe&31;e[2]=d.Me;e[3]=d.Ne;e[4]=d.Oe;e[5]=d.Pe;e[6]=d.Fe;e[7]=d.Ge;e[8]=d.He;e[9]=d.Ie;e[10]=d.Je;e[11]=d.Ke;e[12]=d.Le;e[13]=240|(d.be&3840)>>8;e[14]=d.be&255;e[15]=252|d.pf&3;e[16]=252|d.Be&3;e[17]=248|d.Ae&7;e[18]=248|d.ze&7;e[19]=0;e[20]=0;e[21]=(d.Ce&3)<<6|(d.jf&7)<<3|(d.If?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1291
- 255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function tC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*uC[14*(3===c?3-d:3===d?3:4)+e-1];f=vC[3*(3===c?0:2===c?1:2)+f];c=wC[c][d];var h=xC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,V:k,oi:8*c*h}}return null}
1292
- function yC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function zC(a,b){if(b+1<a.length&&yC(a,b)){var c=tC(a,b),d=4;c&&c.V&&(d=c.V);b+=d;return b===a.length||b+1<a.length&&yC(a,b)}return!1}
1293
- var uC=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],vC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],wC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],xC=[0,1,1,4];function AC(a){this.i=a;this.h=0;this.g=new Map}r=AC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
1294
- r.transmux=function(a,b,c,d){c=Ab(a);for(var e=Mi(c).length;e<c.length&&!zC(c,e);e++);var f;for(a=[];e<c.length;){var g=tC(c,e);if(!g)return Promise.reject(new Q(2,3,3018));f||(f=g);e+g.V<=c.length&&a.push({data:c.subarray(e,e+g.V),size:g.V,duration:1152,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});e+=g.V}if(!f)return Promise.reject(new Q(2,3,3018));c=9E4*f.oi/f.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:f.sampleRate,duration:d,Ta:[],
1295
- ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:c,Ra:a},stream:b};f=new uw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Aw(f),this.g.set(b.id,d));b=Rw(f);this.h++;b=Bd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",AC);AC.prototype.transmux=AC.prototype.transmux;AC.prototype.getOriginalMimeType=AC.prototype.getOriginalMimeType;AC.prototype.convertCodecs=AC.prototype.convertCodecs;AC.prototype.isSupported=AC.prototype.isSupported;
1296
- AC.prototype.destroy=AC.prototype.destroy;jc("audio/mpeg",function(){return new AC("audio/mpeg")},pc);function BC(a){this.h=a;this.g=null}r=BC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=ce(a).split(","),c=Id("audio",b);b=Id("video",b);return!c||b||"mp3"!=Vd(c)?!1:kb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
1297
- r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new kj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.bd().audio||"audio"!=e)return Promise.reject(new Q(2,3,3018));e=new Uint8Array([]);a=u(a.Gb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=tC(b,c))?(c+d.V<=b.length&&(e=Bd(e,b.subarray(c,c+d.V))),c+=d.V):c++;return Promise.resolve(e)};P("shaka.transmuxer.MpegTsTransmuxer",BC);BC.prototype.transmux=BC.prototype.transmux;BC.prototype.getOriginalMimeType=BC.prototype.getOriginalMimeType;
1298
- BC.prototype.convertCodecs=BC.prototype.convertCodecs;BC.prototype.isSupported=BC.prototype.isSupported;BC.prototype.destroy=BC.prototype.destroy;jc("video/mp2t",function(){return new BC("video/mp2t")},oc);/*
1289
+ function qC(a){var b=new Ui(a,!0);aj(b);aj(b);U(b);U(b);W(b);W(b);Xi(b,3);W(b);W(b);U(b);U(b);$i(b);W(b);W(b);W(b)&&U(b);$i(b);$i(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{pf:c}}
1290
+ function rC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Re&3)<<6|(d.Se?1:0)<<5|d.Qe&31;e[2]=d.Me;e[3]=d.Ne;e[4]=d.Oe;e[5]=d.Pe;e[6]=d.Fe;e[7]=d.Ge;e[8]=d.He;e[9]=d.Ie;e[10]=d.Je;e[11]=d.Ke;e[12]=d.Le;e[13]=240|(d.be&3840)>>8;e[14]=d.be&255;e[15]=252|d.pf&3;e[16]=252|d.Be&3;e[17]=248|d.Ae&7;e[18]=248|d.ze&7;e[19]=0;e[20]=0;e[21]=(d.Ce&3)<<6|(d.jf&7)<<3|(d.If?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1291
+ 255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function sC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*tC[14*(3===c?3-d:3===d?3:4)+e-1];f=uC[3*(3===c?0:2===c?1:2)+f];c=vC[c][d];var h=wC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,V:k,oi:8*c*h}}return null}
1292
+ function xC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function yC(a,b){if(b+1<a.length&&xC(a,b)){var c=sC(a,b),d=4;c&&c.V&&(d=c.V);b+=d;return b===a.length||b+1<a.length&&xC(a,b)}return!1}
1293
+ var tC=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],uC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],vC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],wC=[0,1,1,4];function zC(a){this.i=a;this.h=0;this.g=new Map}r=zC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
1294
+ r.transmux=function(a,b,c,d){c=Ab(a);for(var e=Li(c).length;e<c.length&&!yC(c,e);e++);var f;for(a=[];e<c.length;){var g=sC(c,e);if(!g)return Promise.reject(new Q(2,3,3018));f||(f=g);e+g.V<=c.length&&a.push({data:c.subarray(e,e+g.V),size:g.V,duration:1152,Va:0,flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:2,Ya:0}});e+=g.V}if(!f)return Promise.reject(new Q(2,3,3018));c=9E4*f.oi/f.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:f.sampleRate,duration:d,Ta:[],
1295
+ ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:c,Ra:a},stream:b};f=new tw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=zw(f),this.g.set(b.id,d));b=Qw(f);this.h++;b=Bd(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",zC);zC.prototype.transmux=zC.prototype.transmux;zC.prototype.getOriginalMimeType=zC.prototype.getOriginalMimeType;zC.prototype.convertCodecs=zC.prototype.convertCodecs;zC.prototype.isSupported=zC.prototype.isSupported;
1296
+ zC.prototype.destroy=zC.prototype.destroy;jc("audio/mpeg",function(){return new zC("audio/mpeg")},pc);function AC(a){this.h=a;this.g=null}r=AC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=ce(a).split(","),c=Id("audio",b);b=Id("video",b);return!c||b||"mp3"!=Vd(c)?!1:kb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
1297
+ r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new jj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.bd().audio||"audio"!=e)return Promise.reject(new Q(2,3,3018));e=new Uint8Array([]);a=u(a.Gb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=sC(b,c))?(c+d.V<=b.length&&(e=Bd(e,b.subarray(c,c+d.V))),c+=d.V):c++;return Promise.resolve(e)};P("shaka.transmuxer.MpegTsTransmuxer",AC);AC.prototype.transmux=AC.prototype.transmux;AC.prototype.getOriginalMimeType=AC.prototype.getOriginalMimeType;
1298
+ AC.prototype.convertCodecs=AC.prototype.convertCodecs;AC.prototype.isSupported=AC.prototype.isSupported;AC.prototype.destroy=AC.prototype.destroy;jc("video/mp2t",function(){return new AC("video/mp2t")},oc);/*
1299
1299
  @license
1300
1300
  MSS Transmuxer
1301
1301
  Copyright 2015 Dash Industry Forum
1302
1302
  SPDX-License-Identifier: BSD-3-Clause
1303
1303
  */
1304
- function CC(a){this.h=a;(this.g=xu.get("ISOBoxer")())&&DC(this)}
1305
- function DC(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
1304
+ function BC(a){this.h=a;(this.g=wu.get("ISOBoxer")())&&CC(this)}
1305
+ function CC(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
1306
1306
  "uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
1307
- "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==EC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=CC.prototype;r.destroy=function(){};
1307
+ "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==DC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=BC.prototype;r.destroy=function(){};
1308
1308
  r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return kb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return kb(b)||kb(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
1309
1309
  r.transmux=function(a,b,c){if(!c)return Promise.resolve(Ab(a));if(!b.mssPrivateData)return Promise.reject(new Q(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
1310
1310
  1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var p=this.g.createFullBox("saiz",h);p.version=0;p.flags=0;p.sample_count=n.sample_count;p.default_sample_info_size=0;p.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)p.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else p.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
1311
- 1;var t=e.fetch("moof");k.data_offset=t.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=FC(t,"traf")+FC(h,"senc")+16);var x=Ab(e.write());return Promise.resolve(x)}catch(z){return z instanceof Q?Promise.reject(z):Promise.reject(new Q(2,3,3022))}};function FC(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}P("shaka.transmuxer.MssTransmuxer",CC);CC.prototype.transmux=CC.prototype.transmux;CC.prototype.getOriginalMimeType=CC.prototype.getOriginalMimeType;
1312
- CC.prototype.convertCodecs=CC.prototype.convertCodecs;CC.prototype.isSupported=CC.prototype.isSupported;CC.prototype.destroy=CC.prototype.destroy;var EC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);jc("mss/audio/mp4",function(){return new CC("mss/audio/mp4")},pc);jc("mss/video/mp4",function(){return new CC("mss/video/mp4")},pc);function GC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=GC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1313
- r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=ce(c).split(",");c=Id("audio",d);d=Id("video",d);if(c&&(c=Vd(c),!HC.includes(c))||d&&(c=Vd(d),!IC.includes(c)))return!1;if(b)return kb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return kb(b)||kb(a)};
1311
+ 1;var t=e.fetch("moof");k.data_offset=t.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=EC(t,"traf")+EC(h,"senc")+16);var x=Ab(e.write());return Promise.resolve(x)}catch(z){return z instanceof Q?Promise.reject(z):Promise.reject(new Q(2,3,3022))}};function EC(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}P("shaka.transmuxer.MssTransmuxer",BC);BC.prototype.transmux=BC.prototype.transmux;BC.prototype.getOriginalMimeType=BC.prototype.getOriginalMimeType;
1312
+ BC.prototype.convertCodecs=BC.prototype.convertCodecs;BC.prototype.isSupported=BC.prototype.isSupported;BC.prototype.destroy=BC.prototype.destroy;var DC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);jc("mss/audio/mp4",function(){return new BC("mss/audio/mp4")},pc);jc("mss/video/mp4",function(){return new BC("mss/video/mp4")},pc);function FC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=FC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1313
+ r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=ce(c).split(",");c=Id("audio",d);d=Id("video",d);if(c&&(c=Vd(c),!GC.includes(c))||d&&(c=Vd(d),!HC.includes(c)))return!1;if(b)return kb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return kb(b)||kb(a)};
1314
1314
  r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=ce(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Qe(c,"audio/mp4")}).map(Pe).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
1315
- r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!rj(f)){for(var g=Mi(f),h=g.length;h<f.length;h++)if(zC(f,h))return Promise.reject(new Q(2,3,3018));for(h=g.length;h<f.length;h++)if(dC(f,h))return this.h||(this.h=new fC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new Q(2,3,3018))}this.j?this.j.clearData():this.j=new kj;var k=this.j.parse(f),l=[],m=k.bd();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],p=null,t=[],w=k.xc();if(!w.length)throw new Q(2,3,
1316
- 3023);for(var x=0;x<w.length;x++){var z=w[x],v=z.nalus;t.push.apply(t,y(v));var B=nC(v);if(B){null==p&&(p=z.dts);var A=void 0;A=x+1<w.length?(w[x+1].dts||0)-(z.dts||0):1<w.length?(z.dts||0)-(w[x-1].dts||0):9E4*(c.endTime-c.startTime);q.push({data:B.data,size:B.data.byteLength,duration:A,Ua:Math.round((z.pts||0)-(z.dts||0)),flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:B.jd?2:1,Xa:B.jd?0:1}})}}var D=lC(t);if(!D||null==p)throw new Q(2,3,3018);b.height=D.height;b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",
1315
+ r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!qj(f)){for(var g=Li(f),h=g.length;h<f.length;h++)if(yC(f,h))return Promise.reject(new Q(2,3,3018));for(h=g.length;h<f.length;h++)if(cC(f,h))return this.h||(this.h=new eC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new Q(2,3,3018))}this.j?this.j.clearData():this.j=new jj;var k=this.j.parse(f),l=[],m=k.bd();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],p=null,t=[],w=k.xc();if(!w.length)throw new Q(2,3,
1316
+ 3023);for(var x=0;x<w.length;x++){var z=w[x],v=z.nalus;t.push.apply(t,y(v));var B=mC(v);if(B){null==p&&(p=z.dts);var A=void 0;A=x+1<w.length?(w[x+1].dts||0)-(z.dts||0):1<w.length?(z.dts||0)-(w[x-1].dts||0):9E4*(c.endTime-c.startTime);q.push({data:B.data,size:B.data.byteLength,duration:A,Va:Math.round((z.pts||0)-(z.dts||0)),flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:B.jd?2:1,Ya:B.jd?0:1}})}}var D=kC(t);if(!D||null==p)throw new Q(2,3,3018);b.height=D.height;b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",
1317
1317
  encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ta:[],ga:new Uint8Array([]),oa:D.oa,xa:D.xa,ya:D.ya,data:{jb:this.g,baseMediaDecodeTime:p,Ra:q},stream:b};break;case "hvc":var H=[],J=null,I=[],E=k.xc();if(!E.length)throw new Q(2,3,3023);for(var G=0;G<E.length;G++){var K=E[G],M=K.nalus;I.push.apply(I,y(M));for(var O=!1,N=[],R=!1,S=u(M),V=S.next();!V.done;V=S.next()){var xa=V.value;switch(xa.type){case 1:case 0:var Ca=R=!0;break;case 19:case 20:case 21:O=Ca=R=!0;break;case 32:Ca=
1318
1318
  !0;break;case 33:Ca=!0;break;case 34:Ca=!0;break;case 35:R=Ca=!0;break;case 39:case 40:Ca=!0;break;default:Ca=!1}if(R&&Ca){var db=xa.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=db>>24&255;Fa[1]=db>>16&255;Fa[2]=db>>8&255;Fa[3]=db&255;N.push(Fa);N.push(xa.fullData)}}var Va=N.length?{data:Bd.apply(td,y(N)),jd:O}:null;if(Va){null==J&&null!=K.dts&&(J=K.dts);var ua=void 0;ua=G+1<E.length?(E[G+1].dts||0)-(K.dts||0):1<E.length?(K.dts||0)-(E[G-1].dts||0):9E4*(c.endTime-c.startTime);H.push({data:Va.data,
1319
- size:Va.data.byteLength,duration:ua,Ua:Math.round((K.pts||0)-(K.dts||0)),flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:Va.jd?2:1,Xa:Va.jd?0:1}})}}var lb=oC(I);if(!lb||null==J)throw new Q(2,3,3018);b.height=lb.height;b.width=lb.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ta:[],ga:new Uint8Array([]),oa:lb.oa,xa:lb.xa,ya:lb.ya,data:{jb:this.g,baseMediaDecodeTime:J,Ra:H},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var zb=
1320
- [],hb,Za=null,cf=u(k.Gb()),xd=cf.next();!xd.done;xd=cf.next()){var Zd=xd.value,kd=Zd.data;if(kd){var Bc=0;hb=cC(kd,Bc);if(!hb)throw new Q(2,3,3018);b.audioSamplingRate=hb.sampleRate;b.channelsCount=hb.channelCount;null==Za&&null!==Zd.pts&&(Za=Zd.pts);for(;Bc<kd.length;){var $d=bC(kd,Bc);if($d){var df=$d.Qd+$d.V;Bc+df<=kd.length&&zb.push({data:kd.subarray(Bc+$d.Qd,Bc+df),size:$d.V,duration:1024,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});Bc+=df}else Bc++}}}if(!hb||null==Za){if(!k.xc().length)throw new Q(2,
1321
- 3,3018);Za=9E4*c.startTime;var ae=Id("audio",b.codecs.split(","));if(!ae||!b.channelsCount||!b.audioSamplingRate)throw new Q(2,3,3018);hb={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ea:ae};var yd=eC(ae,b.channelsCount);if(!yd)throw new Q(2,3,3018);for(var si=Za+9E4*(c.endTime-c.startTime),tg=Za;tg<si;)zb.push({data:yd,size:yd.byteLength,duration:1024,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}}),tg+=1024/hb.sampleRate*9E4}var ti=hb.sampleRate,ui=Za/9E4*ti;n={id:b.id,type:"audio",codecs:hb.Ea,
1322
- encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ti,duration:d,Ta:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:ui,Ra:zb},stream:b};break;case "ac3":for(var ef=[],be=0,ff=new Uint8Array([]),Sb=null,au=u(k.Gb()),ym=au.next();!ym.done;ym=au.next()){var zm=ym.value,Am=zm.data;null==Sb&&null!==zm.pts&&(Sb=zm.pts);for(var pf=0;pf<Am.length;){var Dd=gC(Am,pf);Dd?(b.audioSamplingRate=Dd.sampleRate,b.channelsCount=Dd.channelCount,be=Dd.sampleRate,ff=Dd.ga,
1323
- ef.push({data:Am.subarray(pf,pf+Dd.V),size:Dd.V,duration:1536,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}}),pf+=Dd.V):pf++}}if(0==be||0==ff.byteLength||null==Sb)throw new Q(2,3,3018);var XC=Sb/9E4*be;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:be,duration:d,Ta:[],ga:ff,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:XC,Ra:ef},stream:b};break;case "ec3":for(var bu=[],cj=0,Bm=new Uint8Array([]),dj=null,cu=u(k.Gb()),Cm=cu.next();!Cm.done;Cm=
1324
- cu.next()){var Dm=Cm.value,Em=Dm.data;null==dj&&null!==Dm.pts&&(dj=Dm.pts);for(var qf=0;qf<Em.length;){var Ed=jC(Em,qf);Ed?(b.audioSamplingRate=Ed.sampleRate,b.channelsCount=Ed.channelCount,cj=Ed.sampleRate,Bm=Ed.ga,bu.push({data:Em.subarray(qf,qf+Ed.V),size:Ed.V,duration:1536,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}}),qf+=Ed.V):qf++}}if(0==cj||0==Bm.byteLength||null==dj)throw new Q(2,3,3018);var YC=dj/9E4*cj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:cj,
1325
- duration:d,Ta:[],ga:Bm,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:YC,Ra:bu},stream:b};break;case "mp3":for(var du=[],ej,fj=null,eu=u(k.Gb()),Fm=eu.next();!Fm.done;Fm=eu.next()){var Gm=Fm.value,Hg=Gm.data;if(Hg){null==fj&&null!==Gm.pts&&(fj=Gm.pts);for(var ge=0;ge<Hg.length;){var rf=tC(Hg,ge);rf?(ej||(ej=rf),ge+rf.V<=Hg.length&&du.push({data:Hg.subarray(ge,ge+rf.V),size:rf.V,duration:1152,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}}),ge+=rf.V):ge++}}}if(!ej||null==fj)throw new Q(2,
1326
- 3,3018);var fu=ej.sampleRate,ZC=fj/9E4*fu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:fu,duration:d,Ta:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:ZC,Ra:du},stream:b};break;case "opus":var gu=[],gj=null,Kc=k.F;if(!Kc)throw new Q(2,3,3018);var vb=[];switch(Kc.ah){case 1:case 2:vb=[0];break;case 0:vb=[255,1,1,0,1];break;case 128:vb=[255,2,0,0,1];break;case 3:vb=[1,2,1,0,2,1];break;case 4:vb=[1,2,2,0,1,2,3];
1319
+ size:Va.data.byteLength,duration:ua,Va:Math.round((K.pts||0)-(K.dts||0)),flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:Va.jd?2:1,Ya:Va.jd?0:1}})}}var lb=nC(I);if(!lb||null==J)throw new Q(2,3,3018);b.height=lb.height;b.width=lb.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ta:[],ga:new Uint8Array([]),oa:lb.oa,xa:lb.xa,ya:lb.ya,data:{jb:this.g,baseMediaDecodeTime:J,Ra:H},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var zb=
1320
+ [],hb,Za=null,cf=u(k.Gb()),xd=cf.next();!xd.done;xd=cf.next()){var Zd=xd.value,kd=Zd.data;if(kd){var Bc=0;hb=bC(kd,Bc);if(!hb)throw new Q(2,3,3018);b.audioSamplingRate=hb.sampleRate;b.channelsCount=hb.channelCount;null==Za&&null!==Zd.pts&&(Za=Zd.pts);for(;Bc<kd.length;){var $d=aC(kd,Bc);if($d){var df=$d.Qd+$d.V;Bc+df<=kd.length&&zb.push({data:kd.subarray(Bc+$d.Qd,Bc+df),size:$d.V,duration:1024,Va:0,flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:2,Ya:0}});Bc+=df}else Bc++}}}if(!hb||null==Za){if(!k.xc().length)throw new Q(2,
1321
+ 3,3018);Za=9E4*c.startTime;var ae=Id("audio",b.codecs.split(","));if(!ae||!b.channelsCount||!b.audioSamplingRate)throw new Q(2,3,3018);hb={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ea:ae};var yd=dC(ae,b.channelsCount);if(!yd)throw new Q(2,3,3018);for(var si=Za+9E4*(c.endTime-c.startTime),tg=Za;tg<si;)zb.push({data:yd,size:yd.byteLength,duration:1024,Va:0,flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:2,Ya:0}}),tg+=1024/hb.sampleRate*9E4}var ti=hb.sampleRate,ui=Za/9E4*ti;n={id:b.id,type:"audio",codecs:hb.Ea,
1322
+ encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ti,duration:d,Ta:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:ui,Ra:zb},stream:b};break;case "ac3":for(var ef=[],be=0,ff=new Uint8Array([]),Sb=null,au=u(k.Gb()),zm=au.next();!zm.done;zm=au.next()){var Am=zm.value,Bm=Am.data;null==Sb&&null!==Am.pts&&(Sb=Am.pts);for(var pf=0;pf<Bm.length;){var Dd=fC(Bm,pf);Dd?(b.audioSamplingRate=Dd.sampleRate,b.channelsCount=Dd.channelCount,be=Dd.sampleRate,ff=Dd.ga,
1323
+ ef.push({data:Bm.subarray(pf,pf+Dd.V),size:Dd.V,duration:1536,Va:0,flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:2,Ya:0}}),pf+=Dd.V):pf++}}if(0==be||0==ff.byteLength||null==Sb)throw new Q(2,3,3018);var WC=Sb/9E4*be;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:be,duration:d,Ta:[],ga:ff,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:WC,Ra:ef},stream:b};break;case "ec3":for(var bu=[],cj=0,Cm=new Uint8Array([]),dj=null,cu=u(k.Gb()),Dm=cu.next();!Dm.done;Dm=
1324
+ cu.next()){var Em=Dm.value,Fm=Em.data;null==dj&&null!==Em.pts&&(dj=Em.pts);for(var qf=0;qf<Fm.length;){var Ed=iC(Fm,qf);Ed?(b.audioSamplingRate=Ed.sampleRate,b.channelsCount=Ed.channelCount,cj=Ed.sampleRate,Cm=Ed.ga,bu.push({data:Fm.subarray(qf,qf+Ed.V),size:Ed.V,duration:1536,Va:0,flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:2,Ya:0}}),qf+=Ed.V):qf++}}if(0==cj||0==Cm.byteLength||null==dj)throw new Q(2,3,3018);var XC=dj/9E4*cj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:cj,
1325
+ duration:d,Ta:[],ga:Cm,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:XC,Ra:bu},stream:b};break;case "mp3":for(var du=[],ej,fj=null,eu=u(k.Gb()),Gm=eu.next();!Gm.done;Gm=eu.next()){var Hm=Gm.value,Hg=Hm.data;if(Hg){null==fj&&null!==Hm.pts&&(fj=Hm.pts);for(var ge=0;ge<Hg.length;){var rf=sC(Hg,ge);rf?(ej||(ej=rf),ge+rf.V<=Hg.length&&du.push({data:Hg.subarray(ge,ge+rf.V),size:rf.V,duration:1152,Va:0,flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:2,Ya:0}}),ge+=rf.V):ge++}}}if(!ej||null==fj)throw new Q(2,
1326
+ 3,3018);var fu=ej.sampleRate,YC=fj/9E4*fu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:fu,duration:d,Ta:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:YC,Ra:du},stream:b};break;case "opus":var gu=[],gj=null,Kc=k.F;if(!Kc)throw new Q(2,3,3018);var vb=[];switch(Kc.ah){case 1:case 2:vb=[0];break;case 0:vb=[255,1,1,0,1];break;case 128:vb=[255,2,0,0,1];break;case 3:vb=[1,2,1,0,2,1];break;case 4:vb=[1,2,2,0,1,2,3];
1327
1327
  break;case 5:vb=[1,3,2,0,4,1,2,3];break;case 6:vb=[1,4,2,0,4,1,2,3,5];break;case 7:vb=[1,4,2,0,4,1,2,3,5,6];break;case 8:vb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:vb=[1,1,2,0,1];break;case 131:vb=[1,1,3,0,1,2];break;case 132:vb=[1,1,4,0,1,2,3];break;case 133:vb=[1,1,5,0,1,2,3,4];break;case 134:vb=[1,1,6,0,1,2,3,4,5];break;case 135:vb=[1,1,7,0,1,2,3,4,5,6];break;case 136:vb=[1,1,8,0,1,2,3,4,5,6,7]}var hu=new Uint8Array([0,Kc.channelCount,0,0,Kc.sampleRate>>>24&255,Kc.sampleRate>>>17&255,Kc.sampleRate>>>
1328
- 8&255,Kc.sampleRate>>>0&255,0,0].concat(y(vb)));for(var iu=Kc.sampleRate,ju=u(k.Gb()),Hm=ju.next();!Hm.done;Hm=ju.next()){var Im=Hm.value,sf=Im.data;null==gj&&null!==Im.pts&&(gj=Im.pts);for(var Ig=0;Ig<sf.length;){for(var $C=0!==(sf[Ig+1]&16),aD=0!==(sf[Ig+1]&8),ld=Ig+2,hj=0;255===sf[ld];)hj+=255,ld+=1;hj+=sf[ld];ld+=1;ld+=$C?2:0;ld+=aD?2:0;var ku=sf.slice(ld,ld+hj);gu.push({data:ku,size:ku.byteLength,duration:960,Ua:0,flags:{Wa:0,Na:0,Ma:0,Ja:0,Ka:2,Xa:0}});Ig=ld+hj}}if(0==hu.byteLength||null==gj)throw new Q(2,
1329
- 3,3018);b.audioSamplingRate=Kc.sampleRate;b.channelsCount=Kc.channelCount;var bD=gj/9E4*iu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:iu,duration:d,Ta:[],ga:hu,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:bD,Ra:gu},stream:b}}n&&(l.push(n),n=null)}}catch(Jm){return Jm&&3023==Jm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Jm)}if(!l.length)return Promise.reject(new Q(2,3,3018));var lu=new uw(l);if(this.i.has(b.id))var Km=
1330
- this.i.get(b.id);else Km=Aw(lu),this.i.set(b.id,Km);var cD=Rw(lu);this.g++;var dD=Bd(Km,cD);return Promise.resolve(dD)};P("shaka.transmuxer.TsTransmuxer",GC);GC.prototype.transmux=GC.prototype.transmux;GC.prototype.getOriginalMimeType=GC.prototype.getOriginalMimeType;GC.prototype.convertCodecs=GC.prototype.convertCodecs;GC.prototype.isSupported=GC.prototype.isSupported;GC.prototype.destroy=GC.prototype.destroy;var HC=["aac","ac-3","ec-3","mp3","opus"],IC=["avc","hevc"];
1331
- jc("video/mp2t",function(){return new GC("video/mp2t")},nc);/*
1328
+ 8&255,Kc.sampleRate>>>0&255,0,0].concat(y(vb)));for(var iu=Kc.sampleRate,ju=u(k.Gb()),Im=ju.next();!Im.done;Im=ju.next()){var Jm=Im.value,sf=Jm.data;null==gj&&null!==Jm.pts&&(gj=Jm.pts);for(var Ig=0;Ig<sf.length;){for(var ZC=0!==(sf[Ig+1]&16),$C=0!==(sf[Ig+1]&8),ld=Ig+2,hj=0;255===sf[ld];)hj+=255,ld+=1;hj+=sf[ld];ld+=1;ld+=ZC?2:0;ld+=$C?2:0;var ku=sf.slice(ld,ld+hj);gu.push({data:ku,size:ku.byteLength,duration:960,Va:0,flags:{Xa:0,Na:0,Ma:0,Ja:0,Ka:2,Ya:0}});Ig=ld+hj}}if(0==hu.byteLength||null==gj)throw new Q(2,
1329
+ 3,3018);b.audioSamplingRate=Kc.sampleRate;b.channelsCount=Kc.channelCount;var aD=gj/9E4*iu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:iu,duration:d,Ta:[],ga:hu,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:aD,Ra:gu},stream:b}}n&&(l.push(n),n=null)}}catch(Km){return Km&&3023==Km.code?Promise.resolve(new Uint8Array([])):Promise.reject(Km)}if(!l.length)return Promise.reject(new Q(2,3,3018));var lu=new tw(l);if(this.i.has(b.id))var Lm=
1330
+ this.i.get(b.id);else Lm=zw(lu),this.i.set(b.id,Lm);var bD=Qw(lu);this.g++;var cD=Bd(Lm,bD);return Promise.resolve(cD)};P("shaka.transmuxer.TsTransmuxer",FC);FC.prototype.transmux=FC.prototype.transmux;FC.prototype.getOriginalMimeType=FC.prototype.getOriginalMimeType;FC.prototype.convertCodecs=FC.prototype.convertCodecs;FC.prototype.isSupported=FC.prototype.isSupported;FC.prototype.destroy=FC.prototype.destroy;var GC=["aac","ac-3","ec-3","mp3","opus"],HC=["avc","hevc"];
1331
+ jc("video/mp2t",function(){return new FC("video/mp2t")},nc);/*
1332
1332
  @license
1333
1333
  EME Encryption Scheme Polyfill
1334
1334
  Copyright 2019 Google LLC
1335
1335
  SPDX-License-Identifier: Apache-2.0
1336
1336
  */
1337
- function JC(){}var KC;function LC(){KC?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(KC=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=MC):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1338
- function MC(a,b){var c=this,d;return L(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,KC.call(c,a,b),2);d=e.h;if(NC(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=KC,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=OC;return e.return(OC.call(c,
1337
+ function IC(){}var JC;function KC(){JC?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(JC=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=LC):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1338
+ function LC(a,b){var c=this,d;return L(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,JC.call(c,a,b),2);d=e.h;if(MC(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=JC,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=NC;return e.return(NC.call(c,
1339
1339
  a,b))})}
1340
- function OC(a,b){var c=this,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=PC(a);e=[];f=u(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=QC(h.videoCapabilities,d),l=QC(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
1341
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,KC.call(c,a,e),2)}q=p.h;return p.return(new RC(q,d))})}function QC(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}P("EmeEncryptionSchemePolyfill",JC);JC.install=LC;function SC(){}var TC;
1342
- function UC(){TC?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(TC=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=VC):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1343
- function VC(a){var b=this,c,d,e;return L(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,TC.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&NC(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=TC,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1344
- navigator.mediaCapabilities.decodingInfo=WC;if(d){f.u(3);break}e=c;return C(f,eD(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(WC.call(b,a))}})}
1345
- function WC(a){var b=this,c,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=PC(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,TC.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1346
- new RC(k.keySystemAccess,c);m.u(3);break}if(!a.keySystemConfiguration){m.u(3);break}l=k;return C(m,eD(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1347
- function eD(a){var b,c;return L(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return C(d,
1348
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",SC);SC.install=UC;function RC(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1349
- RC.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=u(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=u(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};RC.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1350
- function PC(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function NC(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
1351
- function fD(){}function pz(){LC();UC()}P("EncryptionSchemePolyfills",fD);fD.install=pz;"undefined"!==typeof module&&module.exports&&(module.exports=fD);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1340
+ function NC(a,b){var c=this,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=OC(a);e=[];f=u(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=PC(h.videoCapabilities,d),l=PC(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
1341
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,JC.call(c,a,e),2)}q=p.h;return p.return(new QC(q,d))})}function PC(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}P("EmeEncryptionSchemePolyfill",IC);IC.install=KC;function RC(){}var SC;
1342
+ function TC(){SC?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(SC=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=UC):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1343
+ function UC(a){var b=this,c,d,e;return L(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,SC.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&MC(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=SC,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1344
+ navigator.mediaCapabilities.decodingInfo=VC;if(d){f.u(3);break}e=c;return C(f,dD(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(VC.call(b,a))}})}
1345
+ function VC(a){var b=this,c,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=OC(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,SC.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1346
+ new QC(k.keySystemAccess,c);m.u(3);break}if(!a.keySystemConfiguration){m.u(3);break}l=k;return C(m,dD(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1347
+ function dD(a){var b,c;return L(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return C(d,
1348
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",RC);RC.install=TC;function QC(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1349
+ QC.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=u(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=u(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};QC.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1350
+ function OC(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function MC(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
1351
+ function eD(){}function oz(){KC();TC()}P("EncryptionSchemePolyfills",eD);eD.install=oz;"undefined"!==typeof module&&module.exports&&(module.exports=eD);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1352
1352
 
1353
1353
  //# sourceMappingURL=shaka-player.compiled.map