shaka-player 3.2.11 → 3.2.12

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.
@@ -65,10 +65,10 @@ var ib=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
65
65
  Copyright 2006 The Closure Library Authors
66
66
  SPDX-License-Identifier: Apache-2.0
67
67
  */
68
- function jb(a){var b;a instanceof jb?(lb(this,a.Ta),this.Mb=a.Mb,this.Ua=a.Ua,mb(this,a.ac),this.Ma=a.Ma,nb(this,a.g.clone()),this.Ab=a.Ab):a&&(b=String(a).match(ib))?(lb(this,b[1]||"",!0),this.Mb=ob(b[2]||""),this.Ua=ob(b[3]||"",!0),mb(this,b[4]),this.Ma=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Ab=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Ta="";q.Mb="";q.Ua="";q.ac=null;q.Ma="";q.Ab="";
68
+ function jb(a){var b;a instanceof jb?(kb(this,a.Ta),this.Mb=a.Mb,this.Ua=a.Ua,mb(this,a.ac),this.Ma=a.Ma,nb(this,a.g.clone()),this.Ab=a.Ab):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Mb=ob(b[2]||""),this.Ua=ob(b[3]||"",!0),mb(this,b[4]),this.Ma=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Ab=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Ta="";q.Mb="";q.Ua="";q.ac=null;q.Ma="";q.Ab="";
69
69
  q.toString=function(){var a=[],b=this.Ta;b&&a.push(qb(b,rb,!0),":");if(b=this.Ua){a.push("//");var c=this.Mb;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.ac;null!=b&&a.push(":",String(b))}if(b=this.Ma)this.Ua&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ab)&&a.push("#",qb(b,ub));return a.join("")};
70
- q.resolve=function(a){var b=this.clone();"data"===b.Ta&&(b=new jb);var c=!!a.Ta;c?lb(b,a.Ta):c=!!a.Mb;c?b.Mb=a.Mb:c=!!a.Ua;c?b.Ua=a.Ua:c=null!=a.ac;var d=a.Ma;if(c)mb(b,a.ac);else if(c=!!a.Ma){if("/"!=d.charAt(0))if(this.Ua&&!this.Ma)d="/"+d;else{var e=b.Ma.lastIndexOf("/");-1!=e&&(d=b.Ma.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
71
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ma=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Ab;c&&(b.Ab=a.Ab);return b};q.clone=function(){return new jb(this)};function lb(a,b,c){a.Ta=c?ob(b,!0):b;a.Ta&&(a.Ta=a.Ta.replace(/:$/,""))}function mb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ac=b}else a.ac=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
70
+ q.resolve=function(a){var b=this.clone();"data"===b.Ta&&(b=new jb);var c=!!a.Ta;c?kb(b,a.Ta):c=!!a.Mb;c?b.Mb=a.Mb:c=!!a.Ua;c?b.Ua=a.Ua:c=null!=a.ac;var d=a.Ma;if(c)mb(b,a.ac);else if(c=!!a.Ma){if("/"!=d.charAt(0))if(this.Ua&&!this.Ma)d="/"+d;else{var e=b.Ma.lastIndexOf("/");-1!=e&&(d=b.Ma.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
71
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ma=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Ab;c&&(b.Ab=a.Ab);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Ta=c?ob(b,!0):b;a.Ta&&(a.Ta=a.Ta.replace(/:$/,""))}function mb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ac=b}else a.ac=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
72
72
  function ob(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function qb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,wb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function wb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var rb=/[#\/\?@]/g,tb=/[#\?:]/g,sb=/[#\?]/g,vb=/[#\?@]/g,ub=/#/g;function pb(a){this.g=a||null}q=pb.prototype;q.Ka=null;q.Tc=null;
73
73
  q.add=function(a,b){if(!this.Ka&&(this.Ka={},this.Tc=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.Ka.hasOwnProperty(a)&&this.Ka[a])||(this.Ka[a]=c=[]);c.push(b);this.Tc++;return this};
74
74
  q.toString=function(){if(this.g)return this.g;if(!this.Ka)return"";var a=[],b;for(b in this.Ka)for(var c=encodeURIComponent(b),d=this.Ka[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new pb;a.g=this.g;if(this.Ka){var b={},c;for(c in this.Ka)b[c]=this.Ka[c].concat();a.Ka=b;a.Tc=this.Tc}return a};function M(a,b,c){var d=Ea.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}M.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};J("shaka.util.Error",M);M.Severity={RECOVERABLE:1,CRITICAL:2};M.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
@@ -93,8 +93,8 @@ q.Ie=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a
93
93
  q.ba=function(a,b,c){a=Ob(a);void 0===c&&(c=Yb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Yb||d.set(f,e)});this.h.set(a,d);Xb(this);this.dispatchEvent(new L("locale-updated"));return this};q.Lg=function(a){for(var b=t(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new L("unknown-localization",a));return""};
94
94
  function Xb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=t(d),h=g.next();!h.done;f={Rb:f.Rb},h=g.next()){f.Rb=h.value;e.add(f.Rb);e.add(Tb(f.Rb));h=hb(b.keys(),function(l){return function(m){var n=l.Rb,p=Tb(m),r=Tb(n);return m!=p&&n!=r&&p==r}}(f));h.sort();var k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Tb(m)==l.Rb}}(f));h.sort();k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=t(e);for(h=e.next();!h.done;h=e.next())(h=
95
95
  b.get(h.value))&&c.push(h);c.reverse();a.i.clear();b=t(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Zb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new L("missing-localizations",d)))}function Zb(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}J("shaka.ui.Localization",Wb);
96
- Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Lg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.Ie;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={BACK:"BACK",Dh:"NOT_APPLICABLE",nh:"EXIT_PICTURE_IN_PICTURE",uh:"LOOP",qh:"FAST_FORWARD",lh:"EXIT_FULL_SCREEN",Ih:"PAUSE",bi:"UNMUTE",Jh:"PICTURE_IN_PICTURE",Sh:"SKIP_TO_LIVE",ih:"ENTER_LOOP_MODE",ei:"VOLUME",Bh:"MUTE",Rh:"SKIP_AD",ai:"UNDETERMINED_LANGUAGE",Ee:"LIVE",Mh:"REPLAY",sh:"LANGUAGE",Qh:"SEEK",ah:"AUTO_QUALITY",yh:"MORE_SETTINGS",Xg:"AD_DURATION",Oh:"REWIND",Yg:"AD_TIME",Eh:"OFF",rh:"FULL_SCREEN",gh:"CAST",ci:"UNRECOGNIZED_LANGUAGE",Zg:"AIRPLAY",Fh:"ON",fh:"CAPTIONS",AD_PROGRESS:"AD_PROGRESS",
97
- jh:"ENTER_PICTURE_IN_PICTURE",wf:"SUBTITLE_FORCED",Ah:"MULTIPLE_LANGUAGES",Lh:"PLAYBACK_RATE",Nh:"RESOLUTION",Kh:"PLAY",mh:"EXIT_LOOP_MODE"};function ac(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}ac.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function bc(a){return a.g/(1-Math.pow(a.i,a.h))};function cc(){this.h=new ac(2);this.i=new ac(5);this.g=0}cc.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};cc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(bc(this.h),bc(this.i))};function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={wd:d.wd},e=a.next()){d.wd=e.value;e=b.findIndex(function(f){return function(g){return c(f.wd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
96
+ Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Lg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.Ie;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={Eh:"OFF",fh:"CAPTIONS",Rh:"SKIP_AD",ai:"UNDETERMINED_LANGUAGE",jh:"ENTER_PICTURE_IN_PICTURE",uh:"LOOP",Bh:"MUTE",Ih:"PAUSE",rh:"FULL_SCREEN",bi:"UNMUTE",Yg:"AD_TIME",Oh:"REWIND",Xg:"AD_DURATION",Kh:"PLAY",yh:"MORE_SETTINGS",Dh:"NOT_APPLICABLE",qh:"FAST_FORWARD",Ah:"MULTIPLE_LANGUAGES",gh:"CAST",nh:"EXIT_PICTURE_IN_PICTURE",Lh:"PLAYBACK_RATE",ah:"AUTO_QUALITY",Mh:"REPLAY",lh:"EXIT_FULL_SCREEN",ih:"ENTER_LOOP_MODE",ci:"UNRECOGNIZED_LANGUAGE",Ee:"LIVE",BACK:"BACK",Sh:"SKIP_TO_LIVE",Fh:"ON",Zg:"AIRPLAY",
97
+ sh:"LANGUAGE",AD_PROGRESS:"AD_PROGRESS",wf:"SUBTITLE_FORCED",Qh:"SEEK",mh:"EXIT_LOOP_MODE",ei:"VOLUME",Nh:"RESOLUTION",Jh:"PICTURE_IN_PICTURE"};function ac(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}ac.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function bc(a){return a.g/(1-Math.pow(a.i,a.h))};function cc(){this.h=new ac(2);this.i=new ac(5);this.g=0}cc.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};cc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(bc(this.h),bc(this.i))};function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={wd:d.wd},e=a.next()){d.wd=e.value;e=b.findIndex(function(f){return function(g){return c(f.wd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
98
98
  function gc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function hc(a,b,c){this.startTime=a;this.direction=ic;this.endTime=b;this.payload=c;this.region=new jc;this.position=null;this.positionAlign=kc;this.size=0;this.textAlign=lc;this.writingMode=mc;this.lineInterpretation=nc;this.line=null;this.lineHeight="";this.lineAlign=oc;this.displayAlign=pc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=qc;this.fontStyle=rc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
99
99
  [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}hc.prototype.clone=function(){var a=new hc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
100
100
  function sc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!gc(a.nestedCues,b.nestedCues,sc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!gc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}J("shaka.text.Cue",hc);var kc="auto";
@@ -168,7 +168,7 @@ function cf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSit
168
168
  q.request=function(a,b){var c=this,d=new df;if(this.i){var e=Promise.reject(new M(2,7,7001));e["catch"](function(){});return new ef(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ve(b.retryParameters):Me();b.uris=Ve(b.uris);e=ff(this,a,b);var f=e.ma(function(){return gf(c,a,b,new Le(b.retryParameters,!1),0,null,d)}),g=f.ma(function(n){return hf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
169
169
  var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ma(function(n){var p=Date.now()-l,r=n.response;r.timeMs+=k;r.timeMs+=p;n.qg||!c.j||r.fromCache||a!=jf||c.j(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new ef(m.promise,function(){return m.abort()},d);Ye(this.l,e);return e};
170
170
  function ff(a,b,c){var d=Re(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Dd:e.Dd},f=a.next())e.Dd=f.value,d=d.ma(function(g){return function(){c.body&&(c.body=Fc(c.body));return g.Dd(b,c)}}(e));return d.ma(void 0,function(g){if(g instanceof M&&7001==g.code)throw g;throw new M(2,1,1006,g);})}
171
- function gf(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Ta,l=!1;k||(k=location.protocol,k=k.slice(0,-1),lb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=bf[k])?k.Cg:null;if(!m)return Pe(new M(2,1,1E3,h));var n=k.Dg,p=null,r=null,v=!1,y;return Se(Ne(d)).ma(function(){if(a.i)return Qe();y=Date.now();var x=m(c.uris[e],c,b,function(D,B,E){p&&p.stop();r&&r.P(C/1E3);a.j&&b==jf&&(a.j(D,B),l=!0,g.g=E)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
171
+ function gf(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Ta,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=bf[k])?k.Cg:null;if(!m)return Pe(new M(2,1,1E3,h));var n=k.Dg,p=null,r=null,v=!1,y;return Se(Ne(d)).ma(function(){if(a.i)return Qe();y=Date.now();var x=m(c.uris[e],c,b,function(D,B,E){p&&p.stop();r&&r.P(C/1E3);a.j&&b==jf&&(a.j(D,B),l=!0,g.g=E)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
172
172
  w&&(p=new P(function(){v=!0;x.abort()}),p.P(w/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new P(function(){v=!0;x.abort()}));return x}).ma(function(x){p&&p.stop();r&&r.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);return{response:x,qg:l}},function(x){p&&p.stop();r&&r.stop();if(a.i)return Qe();v&&(x=new M(1,1,1003,c.uris[e],b));if(x instanceof M){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity){var w=(new Map).set("error",x);w=new L("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
173
173
  return gf(a,b,c,d,e,x,g)}}throw x;})}function hf(a,b,c){var d=Re(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={Ed:e.Ed},f=a.next())e.Ed=f.value,d=d.ma(function(g){return function(){var h=c.response;h.data&&(h.data=Fc(h.data));return g.Ed(b,h)}}(e));return d.ma(function(){return c},function(g){var h=2;if(g instanceof M){if(7001==g.code)throw g;h=g.severity}throw new M(h,1,1007,g);})}J("shaka.net.NetworkingEngine",Ze);Ze.prototype.request=Ze.prototype.request;Ze.prototype.destroy=Ze.prototype.destroy;
174
174
  Ze.makeRequest=cf;Ze.defaultRetryParameters=function(){return Me()};Ze.prototype.clearAllResponseFilters=Ze.prototype.Ff;Ze.prototype.unregisterResponseFilter=Ze.prototype.Ug;Ze.prototype.registerResponseFilter=Ze.prototype.Fg;Ze.prototype.clearAllRequestFilters=Ze.prototype.Ef;Ze.prototype.unregisterRequestFilter=Ze.prototype.Tg;Ze.prototype.registerRequestFilter=Ze.prototype.Eg;Ze.unregisterScheme=function(a){delete bf[a]};Ze.registerScheme=$e;Ze.prototype.setForceHTTPS=Ze.prototype.oe;
@@ -337,11 +337,11 @@ p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(k=h.next();!k.done;k=h.
337
337
  function Vj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&yb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&Wj(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.v.has(c.id))c=a.v.get(c.id);else{e=R("span");var g=c.heightUnits==zc?"%":"px",h=c.widthUnits==zc?"%":"px",k=c.viewportAnchorUnits==zc?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+
338
338
  g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.v.set(c.id,e);c=e}e=f;d&&(e=R("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Kd:f,vf:e,Ec:c})}
339
339
  function Wj(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.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Xj(c.linePadding,c,a.m);f.paddingRight=Xj(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
340
- "center";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Yj(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-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=
341
- c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Xj(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==mc?(f.width="100%",c.lineAlign==oc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==oc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==oc?f.right=c.line+"%":"end"==
342
- c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==mc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");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==mc?f.width=c.size+"%":f.height=
343
- c.size+"%")}function Xj(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 Yj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}J("shaka.text.UITextDisplayer",Sj);Sj.prototype.setTextVisibility=Sj.prototype.setTextVisibility;
344
- Sj.prototype.isTextVisible=Sj.prototype.isTextVisible;Sj.prototype.remove=Sj.prototype.remove;Sj.prototype.destroy=Sj.prototype.destroy;Sj.prototype.append=Sj.prototype.append;function Zj(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,r){return p+"<"+r+">"},
340
+ "center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Yj(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-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");
341
+ g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Xj(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==mc?(f.width="100%",c.lineAlign==oc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==oc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
342
+ oc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==mc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");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==
343
+ mc?f.width=c.size+"%":f.height=c.size+"%")}function Xj(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 Yj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}J("shaka.text.UITextDisplayer",Sj);
344
+ Sj.prototype.setTextVisibility=Sj.prototype.setTextVisibility;Sj.prototype.isTextVisible=Sj.prototype.isTextVisible;Sj.prototype.remove=Sj.prototype.remove;Sj.prototype.destroy=Sj.prototype.destroy;Sj.prototype.append=Sj.prototype.append;function Zj(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,r){return p+"<"+r+">"},
345
345
  "");k=k.reduceRight(function(p,r){return p+"</"+r+">"},"");return h.lineBreak||h.spacer?(h.spacer&&yb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
346
346
  break;case "right":k.push("align:right");break;case lc:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}J("shaka.text.WebVttGenerator",function(){});function ak(){}
347
347
  function bk(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]=Ve(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ve(l)),k=bk(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?(Oa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Pa("Unexpected number of arguments for "+k),a[h]=b[h]):(Oa("Invalid config, unrecognized key "+
@@ -355,7 +355,7 @@ minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLa
355
355
  e.trackSelectionCallback=function(g){return H(function(h){return h["return"](gk(g,f.preferredAudioLanguage))})};return f}function hk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return bk(a,b,c||fk(),d,"")}
356
356
  function gk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Vb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Ob(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
357
357
  2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Lb&&"image"!=g.type||c.push(g);return c}J("shaka.util.PlayerConfiguration",ek);ek.mergeConfigObjects=hk;function ik(){this.g=null;this.h=[]}function jk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function kk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
358
- function lk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(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 mk(){this.i=this.h=null;this.g=[]}function nk(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 ok(){this.v=this.A=this.G=this.D=this.m=this.j=this.F=this.l=this.i=this.H=this.I=this.J=this.B=this.M=NaN;this.g=new ik;this.h=new mk};function S(a,b){db.call(this);var c=this;this.l=pk;this.xb=this.g=null;this.$=!1;this.bd=new mf;this.eb=new mf;this.v=new mf;this.Rd=this.B=this.cb=this.i=this.cd=this.I=this.j=this.dd=this.J=this.Qc=this.H=this.Ba=this.F=this.M=this.m=this.G=null;this.fe=1E9;this.h=qk(this);this.be={width:Infinity,height:Infinity};this.A=null;this.qa=new De(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.va=this.h.preferredTextLanguage;this.ab=this.h.preferredTextRole;
358
+ function lk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(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 mk(){this.i=this.h=null;this.g=[]}function nk(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 ok(){this.B=this.D=this.H=this.F=this.A=this.j=this.G=this.m=this.i=this.I=this.J=this.M=this.l=this.v=NaN;this.g=new ik;this.h=new mk};function S(a,b){db.call(this);var c=this;this.l=pk;this.xb=this.g=null;this.$=!1;this.bd=new mf;this.eb=new mf;this.v=new mf;this.Rd=this.B=this.cb=this.i=this.cd=this.I=this.j=this.dd=this.J=this.Qc=this.H=this.Ba=this.F=this.M=this.m=this.G=null;this.fe=1E9;this.h=qk(this);this.be={width:Infinity,height:Infinity};this.A=null;this.qa=new De(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.va=this.h.preferredTextLanguage;this.ab=this.h.preferredTextRole;
359
359
  this.gb=this.h.preferForcedSubs;this.fb=[];b&&b(this);this.G=rk(this);this.G.oe(this.h.streaming.forceHTTPS);this.D=null;sk&&(this.D=Fb(sk));this.bd.o(window,"online",function(){c.ee()});this.R={name:"detach"};this.W={name:"attach"};this.Z={name:"unload"};this.Ae={name:"manifest-parser"};this.ae={name:"manifest"};this.Aa={name:"media-source"};this.Ud={name:"drm-engine"};this.Y={name:"load"};this.De={name:"src-equals-drm-engine"};this.Na={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Se(tk(c,
360
360
  e,f))});d.set(this.R,function(e){e.K&&(c.eb.ob(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Se(e)});d.set(this.Z,function(e){return Se(uk(c,e))});d.set(this.Aa,function(e){e=vk(c,e);return Se(e)});d.set(this.Ae,function(e,f){var g=wk(c,e,f);return Se(g)});d.set(this.ae,function(e){return xk(c,e)});d.set(this.Ud,function(e){e=yk(c,e);return Se(e)});d.set(this.Y,function(e,f){return Se(zk(c,e,f))});d.set(this.De,function(e,f){var g=Ak(c,e,f);return Se(g)});d.set(this.Na,function(e,
361
361
  f){return Bk(c,e,f)});this.aa=new Fj(this.R,{eg:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.W);e==c.W&&(k=g==c.R||f.K!=h.K?c.R:g==c.W?c.W:g==c.Aa||g==c.Y?c.Aa:g==c.Na?c.De:null);e==c.Aa&&(k=g==c.Y&&f.K==h.K?c.Ae:c.Z);e==c.Ae&&(k=Ck(c.Y,c.ae,c.Z,g,f,h));e==c.ae&&(k=Ck(c.Y,c.Ud,c.Z,g,f,h));e==c.Ud&&(k=Ck(c.Y,c.Y,c.Z,g,f,h));e==c.De&&(k=g==c.Na&&f.K==h.K?c.Na:c.Z);if(e==c.Y||e==c.Na)k=c.Z;e==c.Z&&(k=h.K&&f.K==h.K?c.W:c.R);return k},Jf:function(e,f,g){c.dispatchEvent(Dk(Ek,(new Map).set("state",
@@ -374,18 +374,18 @@ function vk(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=new Mh,d=a.
374
374
  function wk(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.G,a.cb=d,f=a,u(h,kg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.cd=h.h;a.I=Fb(a.cd);g=Ve(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
375
375
  function xk(a,b){var c=b.uri,d=a.G;a.dd=new Zi(function(){return a.Ja()});a.dd.addEventListener("regionadd",function(g){g=g.region;Uk(a,Vk,g);if(a.D)a.D.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return Wk(a,g)},makeTextStreamsForClosedCaptions:function(g){return Xk(a,g)},onTimelineRegionAdded:function(g){var h=a.dd;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=
376
376
  l;break a}k=null}null==k&&(h.g.add(g),g=new L("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Pk(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Oe(function(){var g,h,k,l;return H(function(m){if(1==m.g)return g=a,u(m,
377
- a.I.start(c,e),2);g.i=m.h;h=Dk(Yk);a.dispatchEvent(h);if(0==a.i.variants.length)throw new M(2,4,4036);Zk(a.i);k=Date.now()/1E3;l=k-f;a.A.F=l;z(m)})}(),function(){return a.I.stop()})}
377
+ a.I.start(c,e),2);g.i=m.h;h=Dk(Yk);a.dispatchEvent(h);if(0==a.i.variants.length)throw new M(2,4,4036);Zk(a.i);k=Date.now()/1E3;l=k-f;a.A.G=l;z(m)})}(),function(){return a.I.stop()})}
378
378
  function yk(a,b){var c,d;return H(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=$k(a,{Jb:a.G,onError:function(f){Pk(a,f)},hd:function(f){al(a,f)},onExpirationUpdated:function(f,g){bl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==cl&&d&&(d=!1,a.A.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Ef(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.pc(b.K),3):u(e,Wk(a,a.i),0)})}
379
379
  function zk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v;return H(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.K;e=b.uri;a.cb=e;a.H=new Si({$c:function(){return d.playbackRate},Xc:function(){return d.defaultPlaybackRate},qe:function(x){d.playbackRate=x},bf:function(x){d.currentTime+=x}});f=function(){return dl(a)};g=function(){return el(a)};a.v.o(d,"playing",f);a.v.o(d,"pause",f);a.v.o(d,"ended",f);a.v.o(d,"ratechange",g);h=a.h.abrFactory;a.B&&a.Rd==h||(a.Rd=h,a.B=Fb(h),"function"!=typeof a.B.playbackRateChanged&&
380
380
  (yb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.qa=new De(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.va=a.h.preferredTextLanguage;a.ab=a.h.preferredTextRole;a.gb=a.h.preferForcedSubs;fl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(x,w,C){a.j&&x!=a.j.l&&gl(a,x,!0,void 0===w?!1:w,void 0===C?0:C)});a.F=hl(a,b.startTime);a.Ba=il(a);
381
381
  k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);jl(a,k);Jd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=kl(a);a.j.configure(a.h.streaming);a.l=ll;d.textTracks&&a.v.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":ml(a,x)}});a.dispatchEvent(Dk(nl));l=null;if(m=a.Db().find(function(x){return x.active})){y.C(2);break}l=ol(a)?a.B.chooseVariant():null;gl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.C(3);
382
382
  break}n=a.F.m();return u(y,pl(l,n),4);case 4:p=y.h,a.F.v(p);case 3:ql(a,null,he(l));case 2:return r=a.kb().find(function(x){return x.active}),r||((v=re(a.i.textStreams,a.va,a.ab,a.gb)[0]||null)&&nk(a.A.h,v,!0),l&&(v?(l.audio&&rl(a,l.audio,v)&&(a.$=!0),a.$&&a.M.l.setTextVisibility(!0),sl(a)):a.$=!1),v&&(a.h.streaming.alwaysStreamText||a.Ib())&&oj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),tl(a)),Zd(a.j?a.j.l:null,a.i),ul(a.i),vl(a),ol(a),a.i.variants.some(function(x){return x.primary}),
383
- a.v.Ga(d,"loadedmetadata",function(){a.A.l=Date.now()/1E3-c.we}),z(y)}})}
383
+ a.v.Ga(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.we}),z(y)}})}
384
384
  function Ak(a,b,c){var d,e,f,g,h,k,l;return H(function(m){return 1==m.g?(d=Mb,e=Date.now()/1E3,f=!0,a.m=$k(a,{Jb:a.G,onError:function(n){Pk(a,n)},hd:function(n){al(a,n)},onExpirationUpdated:function(n,p){bl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==cl&&f&&(f=!1,a.A.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=mg(g),k=Nk[h],"application/x-mpegurl"==k&&Xc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
385
385
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?yd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.bb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,u(m,Ef(a.m,[l],[]),2)):u(m,a.m.pc(b.K),
386
386
  0)})}
387
387
  function Bk(a,b,c){function d(){return dl(a)}b.uri=c.uri;b.startTime=c.startTime;a.cb=b.uri;var e=b.K;a.F=new Hi(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.F.v(b.startTime);a.H=new Si({$c:function(){return e.playbackRate},Xc:function(){return e.defaultPlaybackRate},qe:function(h){e.playbackRate=h},bf:function(h){e.currentTime+=h}});jl(a,a.h.streaming.rebufferingGoal);a.v.o(e,"playing",d);a.v.o(e,"pause",d);a.v.o(e,"ended",d);a.v.o(e,"ratechange",function(){return el(a)});"none"!=e.preload&&
388
- a.v.Ga(e,"loadedmetadata",function(){a.A.l=Date.now()/1E3-c.we});e.audioTracks&&(a.v.o(e.audioTracks,"addtrack",function(){return vl(a)}),a.v.o(e.audioTracks,"removetrack",function(){return vl(a)}),a.v.o(e.audioTracks,"change",function(){return vl(a)}));e.textTracks&&(a.v.o(e.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":wl(a,h);break;case "chapters":ml(a,h);break;default:vl(a)}}),a.v.o(e.textTracks,"removetrack",function(){return vl(a)}),a.v.o(e.textTracks,
388
+ a.v.Ga(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.we});e.audioTracks&&(a.v.o(e.audioTracks,"addtrack",function(){return vl(a)}),a.v.o(e.audioTracks,"removetrack",function(){return vl(a)}),a.v.o(e.audioTracks,"change",function(){return vl(a)}));e.textTracks&&(a.v.o(e.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":wl(a,h);break;case "chapters":ml(a,h);break;default:vl(a)}}),a.v.o(e.textTracks,"removetrack",function(){return vl(a)}),a.v.o(e.textTracks,
389
389
  "change",function(){return vl(a)}));e.src=b.uri;(Uc()||Vc())&&e.load();a.l=xl;a.dispatchEvent(Dk(nl));var g=new Lc;wi(e,HTMLMediaElement.HAVE_METADATA,a.v,function(){g.resolve()});wi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.v,function(){var h;return H(function(k){if(1==k.g)return yl(a),h=zl(a),h.find(function(l){return"disabled"!=l.mode})?k.C(2):u(k,new Promise(function(l){a.v.Ga(e.textTracks,"change",l);(new P(l)).P(1)}),2);if(f)return k["return"]();Al(a);z(k)})});e.error?g.reject(Ok(a)):"none"==e.preload&&
390
390
  (Pa('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.'),g.resolve());a.v.Ga(e,"error",function(){g.reject(Ok(a))});return new Oe(g,function(){g.reject(new M(2,7,7001));return Promise.resolve()})}function yl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.od(b);var c=a.h.preferredVariantRole;""!=c&&a.od(b,c)}}
391
391
  function Al(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.ie(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.ie(b,d,c)}}
@@ -421,9 +421,9 @@ q.ue=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==ll)this.M.l.setTextVisi
421
421
  q.fg=function(){if(!this.V())return null;var a=this.aa.l,b=0;if(this.F)b=this.F.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
422
422
  q.Te=function(){if(!this.V())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.Wc=function(){if(this.l==ll)return this.M.Wc();var a={total:[],audio:[],video:[],text:[]};this.l==xl&&(a.total=Rh(this.g.buffered));return a};
423
423
  q.getStats=function(){if(this.l!=ll&&this.l!=xl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};dl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.A;b=Math.round(100*b);c.i=isNaN(c.i)?
424
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.A,b=Number(a.totalVideoFrames),c.J=Number(a.droppedVideoFrames),c.I=b,this.A.H=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.H?a.H:NaN):a=NaN;this.A.m=a;if(this.l==ll){if(a=this.j.l)this.A.A=(this.H?this.H.i:1)*a.bandwidth;a&&a.video&&(c=this.A,b=a.video.height||NaN,c.M=a.video.width||NaN,c.B=b);this.V()&&(a=this.Te().valueOf()+1E3*this.Ja().end,this.A.D=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
425
- (this.A.G=this.i.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.A.v=a}var d=this.A;a=d.M;c=d.B;b=d.A;var e=d.I,f=d.J,g=d.H,h=d.v,k=d.i,l=d.l,m=d.F,n=d.j,p=kk(d.g,"playing"),r=kk(d.g,"paused"),v=kk(d.g,"buffering"),y=d.m,x=d.D,w=d.G,C=lk(d.g),D=[];d=t(d.h.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
426
- estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:r,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:C,switchHistory:D}};
424
+ b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.A;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.J=d;this.A.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.H?c.H:NaN):c=NaN;this.A.A=c;if(this.l==ll){if(c=this.j.l)this.A.D=(this.H?this.H.i:1)*c.bandwidth;c&&c.video&&(b=this.A,d=c.video.height||NaN,b.v=c.video.width||NaN,b.l=d);this.V()&&(c=this.Te().valueOf()+1E3*this.Ja().end,this.A.F=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
425
+ (this.A.H=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.A.B=c}this.l==xl&&(c=this.A,b=a.videoHeight||NaN,c.v=a.videoWidth||NaN,c.l=b);var e=this.A;a=e.v;c=e.l;b=e.D;d=e.J;var f=e.M,g=e.I,h=e.B,k=e.i,l=e.m,m=e.G,n=e.j,p=kk(e.g,"playing"),r=kk(e.g,"paused"),v=kk(e.g,"buffering"),y=e.A,x=e.F,w=e.H,C=lk(e.g),D=[];e=t(e.h.g);for(var B=e.next();!B.done;B=e.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,
426
+ height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:r,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:C,switchHistory:D}};
427
427
  q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;yb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=ll&&this.l!=xl)throw new M(1,7,7004);if(!d){var h=mg(a);d=Ol[h];if(!d)throw new M(1,2,2011,h);}if(this.l==xl){if("text/vtt"!=d)throw new M(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.kb().find(function(k){return k.language==
428
428
  b&&k.label==(f||"")&&k.kind==c}))return vl(this),a;throw new M(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new M(1,4,4033);a={id:this.fe++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Qi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Lb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
429
429
  closedCaptions:null};if(!Bd(ud(a.mimeType,a.codecs)))throw new M(2,2,2014,d);this.i.textStreams.push(a);vl(this);return ie(a)};
@@ -463,13 +463,13 @@ S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return H(function(h
463
463
  Oc()?!!ng[p]:Pc(l[p]);c=k;k={};p=t('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
464
464
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Oc()?Bd(l)?!0:MediaSource.isTypeSupported(l)||qd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=hm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=Hk;S.setAdManagerFactory=function(a){sk=a};S.registerSupportPlugin=function(a,b){hm[a]=b};S.prototype.destroy=S.prototype.destroy;
465
465
  var dm="abrstatuschanged",Yl="adaptation",Vl="buffering",cl="drmsessionupdate",Dj="emsg",em="error",gm="expirationupdated",Mk="loaded",Kk="loading",Yk="manifestparsed",Cl="metadata",Ek="onstatechange",Fk="onstateidle",Wl="ratechange",nl="streaming",bm="textchanged",cm="texttrackvisibility",Vk="timelineregionadded",El="timelineregionenter",Fl="timelineregionexit",$l="trackschanged",Qk="unloading",am="variantchanged",im={bh:dm,dh:Yl,eh:Vl,hh:cl,oh:Dj,Error:em,ph:gm,vh:"largegap",wh:Mk,xh:Kk,Ch:Yk,Metadata:Cl,
466
- Gh:Ek,Hh:Fk,Ph:Wl,Th:"sessiondata",Uh:nl,Vh:bm,Wh:cm,Xh:Vk,Yh:El,Zh:Fl,$h:$l,di:Qk,gi:am},Gk=0,pk=1,ll=2,xl=3;S.LoadMode={DESTROYED:Gk,NOT_LOADED:pk,MEDIA_SOURCE:ll,SRC_EQUALS:xl};S.version="v3.2.11";var jm=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(jm[0]),Number(jm[1])));
466
+ Gh:Ek,Hh:Fk,Ph:Wl,Th:"sessiondata",Uh:nl,Vh:bm,Wh:cm,Xh:Vk,Yh:El,Zh:Fl,$h:$l,di:Qk,gi:am},Gk=0,pk=1,ll=2,xl=3;S.LoadMode={DESTROYED:Gk,NOT_LOADED:pk,MEDIA_SOURCE:ll,SRC_EQUALS:xl};S.version="v3.2.12";var jm=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(jm[0]),Number(jm[1])));
467
467
  var fm=["output-restricted","internal-error"],hm={},sk=null,Nk={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",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Ol={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
468
468
  ssa:"text/x-ssa",ass:"text/x-ssa"};function km(){this.h=[];this.j=this.i=this.g=0};function lm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new mf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=lm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
469
469
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
470
470
  q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};J("shaka.ads.ClientSideAd",lm);
471
471
  lm.prototype.release=lm.prototype.release;lm.prototype.getPositionInSequence=lm.prototype.getPositionInSequence;lm.prototype.getSequenceLength=lm.prototype.getSequenceLength;lm.prototype.setMuted=lm.prototype.setMuted;lm.prototype.resize=lm.prototype.resize;lm.prototype.isMuted=lm.prototype.isMuted;lm.prototype.setVolume=lm.prototype.setVolume;lm.prototype.getVolume=lm.prototype.getVolume;lm.prototype.play=lm.prototype.play;lm.prototype.pause=lm.prototype.pause;lm.prototype.skip=lm.prototype.skip;
472
- lm.prototype.canSkipNow=lm.prototype.canSkipNow;lm.prototype.getTimeUntilSkippable=lm.prototype.getTimeUntilSkippable;lm.prototype.isSkippable=lm.prototype.isSkippable;lm.prototype.isPaused=lm.prototype.isPaused;lm.prototype.getRemainingTime=lm.prototype.getRemainingTime;lm.prototype.getMinSuggestedDuration=lm.prototype.getMinSuggestedDuration;lm.prototype.getDuration=lm.prototype.getDuration;function mm(a,b,c,d){var e=this;this.m=a;this.i=b;this.A=null;this.B=NaN;this.j=d;this.v=null;this.h=new mf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.11");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){nm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
472
+ lm.prototype.canSkipNow=lm.prototype.canSkipNow;lm.prototype.getTimeUntilSkippable=lm.prototype.getTimeUntilSkippable;lm.prototype.isSkippable=lm.prototype.isSkippable;lm.prototype.isPaused=lm.prototype.isPaused;lm.prototype.getRemainingTime=lm.prototype.getRemainingTime;lm.prototype.getMinSuggestedDuration=lm.prototype.getMinSuggestedDuration;lm.prototype.getDuration=lm.prototype.getDuration;function mm(a,b,c,d){var e=this;this.m=a;this.i=b;this.A=null;this.B=NaN;this.j=d;this.v=null;this.h=new mf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.12");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){nm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
473
473
  function(f){om(e,f)});this.i.onended=function(){e.l.contentComplete()}}mm.prototype.stop=function(){this.g&&this.g.stop();this.m&&Rj(this.m)};mm.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function om(a,b){b.getError();pm(a,null);a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
474
474
  function nm(a,b){a.j(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.B)));a.g=b.getAdsManager(a.i);a.j(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",d)))}qm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
475
475
  a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)),a.g.start()}catch(f){pm(a,null)}}
@@ -490,8 +490,8 @@ f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}tm.prototyp
490
490
  function um(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.G||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.v=d,a.l.currentTime=e.start)}})};function T(){db.call(this);this.g=this.i=null;this.h=new km;this.j=navigator.language}pa(T,db);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.i&&this.i.release();this.i=new mm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
491
491
  q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new km};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.B=Date.now()/1E3;b.l.requestAds(a)};
492
492
  q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new tm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
493
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Pa('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="v3.2.11";c=this.g;var d=b;c.j?c=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
494
- (c.G=!0),c.j=new Lc,c.g.requestStream(a),c.D=d||"",c.H=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Pa('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="v3.2.11";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.F};
493
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Pa('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="v3.2.12";c=this.g;var d=b;c.j?c=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
494
+ (c.G=!0),c.j=new Lc,c.g.requestStream(a),c.D=d||"",c.H=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Pa('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="v3.2.12";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.F};
495
495
  q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};J("shaka.ads.AdManager",T);
496
496
  T.prototype.onCueMetadataChange=T.prototype.onCueMetadataChange;T.prototype.onHlsTimedMetadata=T.prototype.onHlsTimedMetadata;T.prototype.onDashTimedMetadata=T.prototype.onDashTimedMetadata;T.prototype.getStats=T.prototype.getStats;T.prototype.getServerSideCuePoints=T.prototype.getServerSideCuePoints;T.prototype.replaceServerSideAdTagParameters=T.prototype.replaceServerSideAdTagParameters;T.prototype.requestServerSideStream=T.prototype.requestServerSideStream;T.prototype.initServerSide=T.prototype.initServerSide;
497
497
  T.prototype.requestClientSideAds=T.prototype.requestClientSideAds;T.prototype.onAssetUnload=T.prototype.onAssetUnload;T.prototype.release=T.prototype.release;T.prototype.initClientSide=T.prototype.initClientSide;T.prototype.setLocale=T.prototype.setLocale;T.ADS_LOADED="ads-loaded";T.AD_STARTED="ad-started";T.AD_FIRST_QUARTILE="ad-first-quartile";T.AD_MIDPOINT="ad-midpoint";T.AD_THIRD_QUARTILE="ad-third-quartile";T.AD_COMPLETE="ad-complete";T.AD_STOPPED="ad-stopped";T.AD_SKIPPED="ad-skipped";
@@ -673,10 +673,10 @@ v="YES"==r;return u(x,Pq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.B.has(c)?a.B.get
673
673
  function Jq(a,b){var c,d,e,f,g,h,k,l,m,n;return H(function(p){if(1==p.g){c=Oq(Xp(b,"URI"),a.v);d=U(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Nq(b);f=U(b,"NAME");g=U(b,"CHARACTERISTICS");return u(p,Pq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=U(b,"RESOLUTION"))if(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=
674
674
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=U(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
675
675
  function Lq(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){e=Oq(Xp(b,"URI"),a.v);if(a.h.has(e))return k["return"](a.h.get(e));var l=U(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=Ib(d,c);return u(k,Pq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
676
- function Pq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Fa,Ua,Qc,Ad,Ya,Ce,$f,Lo,Mo,No,Bi,Ci,ag,Oo,Po,Qo,Ro;return H(function(kb){switch(kb.g){case 1:return p=Gb([a.M],[b])[0],u(kb,sq(a,cf([p],a.g.retryParameters),0),2);case 2:r=kb.h;p=r.uri;v=iq(a.ua,r.data,p);if(1!=v.type)throw new M(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())C=w.value,D=$p(C.g,"EXT-X-KEY"),y.push.apply(y,ha(D));B=!1;E=[];G=new Set;I=t(y);for(N=I.next();!N.done;N=
677
- I.next())if(K=N.value,O=Xp(K,"METHOD"),"NONE"!=O){B=!0;if("AES-128"==O)return a.Ba=!0,kb["return"](null);V=Xp(K,"KEYFORMAT");if(W=(Z=Qq[V])?Z(K):null){if(W.keyIds)for(ma=t(W.keyIds),ya=ma.next();!ya.done;ya=ma.next())Ta=ya.value,G.add(Ta);E.push(W)}}if(B&&!E.length)throw new M(2,4,4026);Qa=$p(v.g,"EXT-X-DEFINE");Fa=wq(a,Qa);Rq(a,v);return u(kb,Sq(a,d,c,v,Fa),3);case 3:return Ua=kb.h,Tq.includes(Ua)&&(c=""),Qc=new Map,Ad=new Map,A(kb,4),u(kb,xq(a,b,v,d,Ua,Qc,Fa,Ad),6);case 6:Ya=kb.h;ua(kb,5);break;
678
- case 4:Ce=F(kb);if(4035==Ce.code)return Pa("Skipping unsupported HLS stream",Ua,b),kb["return"](null);throw Ce;case 5:$f=Ya[0].startTime;Lo=Ya[Ya.length-1].endTime;Mo=new Oi(Ya);No=d==Lb?"subtitle":void 0;Bi=[];if(l)for(Ci=t(l.split(",")),ag=Ci.next();!ag.done;ag=Ci.next())Oo=ag.value,Bi.push(Oo);Qo=(Po=bq(v.g,"EXT-X-SERVER-CONTROL"))?null!=Po.getAttribute("CAN-SKIP-UNTIL"):!1;Ro={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mo,mimeType:Ua,codecs:c,kind:No,
679
- encrypted:B,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Bi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return kb["return"]({stream:Ro,qd:b,yf:p,$e:$f,xg:Lo,Sd:Qc,If:Ad,Df:Qo})}})}
676
+ function Pq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Fa,Ua,Qc,Ad,Ya,Ce,$f,Lo,Mo,No,Bi,Ci,ag,Oo,Po,Qo,Ro;return H(function(lb){switch(lb.g){case 1:return p=Gb([a.M],[b])[0],u(lb,sq(a,cf([p],a.g.retryParameters),0),2);case 2:r=lb.h;p=r.uri;v=iq(a.ua,r.data,p);if(1!=v.type)throw new M(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())C=w.value,D=$p(C.g,"EXT-X-KEY"),y.push.apply(y,ha(D));B=!1;E=[];G=new Set;I=t(y);for(N=I.next();!N.done;N=
677
+ I.next())if(K=N.value,O=Xp(K,"METHOD"),"NONE"!=O){B=!0;if("AES-128"==O)return a.Ba=!0,lb["return"](null);V=Xp(K,"KEYFORMAT");if(W=(Z=Qq[V])?Z(K):null){if(W.keyIds)for(ma=t(W.keyIds),ya=ma.next();!ya.done;ya=ma.next())Ta=ya.value,G.add(Ta);E.push(W)}}if(B&&!E.length)throw new M(2,4,4026);Qa=$p(v.g,"EXT-X-DEFINE");Fa=wq(a,Qa);Rq(a,v);return u(lb,Sq(a,d,c,v,Fa),3);case 3:return Ua=lb.h,Tq.includes(Ua)&&(c=""),Qc=new Map,Ad=new Map,A(lb,4),u(lb,xq(a,b,v,d,Ua,Qc,Fa,Ad),6);case 6:Ya=lb.h;ua(lb,5);break;
678
+ case 4:Ce=F(lb);if(4035==Ce.code)return Pa("Skipping unsupported HLS stream",Ua,b),lb["return"](null);throw Ce;case 5:$f=Ya[0].startTime;Lo=Ya[Ya.length-1].endTime;Mo=new Oi(Ya);No=d==Lb?"subtitle":void 0;Bi=[];if(l)for(Ci=t(l.split(",")),ag=Ci.next();!ag.done;ag=Ci.next())Oo=ag.value,Bi.push(Oo);Qo=(Po=bq(v.g,"EXT-X-SERVER-CONTROL"))?null!=Po.getAttribute("CAN-SKIP-UNTIL"):!1;Ro={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mo,mimeType:Ua,codecs:c,kind:No,
679
+ encrypted:B,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Bi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:Ro,qd:b,yf:p,$e:$f,xg:Lo,Sd:Qc,If:Ad,Df:Qo})}})}
680
680
  function Rq(a,b){var c=bq(b.g,"EXT-X-PLAYLIST-TYPE"),d=bq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)yq(a,rq);else{c?yq(a,Uq):yq(a,Vq);d=bq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=bq(b.g,"EXT-X-PART-INF");a.l&&c?(a.aa=Number(Xp(c,"PART-TARGET")),a.H=Math.min(a.aa,a.H),c=bq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(Xp(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.$=Math.max(d,a.$)}}
681
681
  function Wq(a,b,c,d){c=bq(c,"EXT-X-MAP");if(!c)return null;var e=Xp(c,"URI");d=Oq(Gb([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=Xq(d,c),a.Z.set(b,c));return a.Z.get(b)}function Xq(a,b){var c=0,d=null,e=U(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new ni(function(){return[a]},c,d)}
682
682
  function Yq(a,b,c,d,e,f,g,h,k){var l=d.g,m=Oq(d.h,g),n=bq(l,"EXTINF"),p=g=0,r=null;if(!n){if(0==d.i.length)throw new M(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},x=0;x<d.i.length;y={zd:y.zd},x++){var w=d.i[x],C=0==x?c:v[v.length-1],D=0==x?e:C.endTime,B=Number(U(w,"DURATION"))||a.aa;if(B){B=D+B;var E=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?E=(C=U(w,"BYTERANGE-START"))?Number(C):0:(E=U(w,"BYTERANGE"),C=t(Zq(C,E)),E=C.next().value,G=C.next().value);if(w=U(w,"URI"))y.zd=Gb([h],