shaka-player 4.10.5 → 4.10.6

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.
@@ -57,7 +57,7 @@ function P(a,b){a=a.split(".");var c=Ma;a[0]in c||"undefined"==typeof c.execScri
57
57
  function Na(){}function Oa(){};function S(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
58
58
  function Pa(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};P("shaka.util.FakeEvent",S);
59
59
  var Qa={al:"abrstatuschanged",cl:"adaptation",fl:"audiotrackchanged",hl:"buffering",il:"complete",jl:"downloadfailed",kl:"downloadheadersreceived",ll:"drmsessionupdate",ql:"emsg",Jl:"prft",Error:"error",rl:"expirationupdated",ul:"firstquartile",vl:"gapjumped",yl:"keystatuschanged",Al:"loaded",Bl:"loading",Dl:"manifestparsed",El:"manifestupdated",Fl:"mediaqualitychanged",Metadata:"metadata",Gl:"midpoint",Hl:"nospatialvideoinfo",Il:"onstatechange",Ll:"ratechange",Ml:"segmentappended",Nl:"sessiondata",
60
- Ol:"spatialvideoinfo",Pl:"stalldetected",Ql:"started",Rl:"statechanged",Sl:"streaming",Tl:"textchanged",Ul:"texttrackvisibility",Vl:"thirdquartile",Wl:"timelineregionadded",Xl:"timelineregionenter",Yl:"timelineregionexit",Zl:"trackschanged",am:"unloading",cm:"variantchanged"};function Sa(){}function Ua(){}function Va(){}function Wa(a){var b=Ga.apply(1,arguments);$a.has(a)||($a.add(a),Va.apply(Sa,x(b)))}function ab(){}function cb(){}function eb(){}var $a=new Set;window.console&&(Va=function(){return console.warn.apply(console,x(Ga.apply(0,arguments)))},Ua=function(){console.error.apply(console,x(Ga.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.Ga=new fb;this.Ke=this}gb.prototype.addEventListener=function(a,b){this.Ga&&this.Ga.push(a,b)};gb.prototype.removeEventListener=function(a,b){this.Ga&&this.Ga.remove(a,b)};gb.prototype.dispatchEvent=function(a){if(!this.Ga)return!0;var b=this.Ga.get(a.type)||[],c=this.Ga.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Ke;a.currentTarget=this.Ke;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
60
+ Ol:"spatialvideoinfo",Pl:"stalldetected",Ql:"started",Rl:"statechanged",Sl:"streaming",Tl:"textchanged",Ul:"texttrackvisibility",Vl:"thirdquartile",Wl:"timelineregionadded",Xl:"timelineregionenter",Yl:"timelineregionexit",Zl:"trackschanged",am:"unloading",cm:"variantchanged"};function Sa(){}function Ua(){}function Va(){}function Wa(a){var b=Ga.apply(1,arguments);ab.has(a)||(ab.add(a),Va.apply(Sa,x(b)))}function bb(){}function db(){}function eb(){}var ab=new Set;window.console&&(Va=function(){return console.warn.apply(console,x(Ga.apply(0,arguments)))},Ua=function(){console.error.apply(console,x(Ga.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.Ga=new fb;this.Ke=this}gb.prototype.addEventListener=function(a,b){this.Ga&&this.Ga.push(a,b)};gb.prototype.removeEventListener=function(a,b){this.Ga&&this.Ga.remove(a,b)};gb.prototype.dispatchEvent=function(a){if(!this.Ga)return!0;var b=this.Ga.get(a.type)||[],c=this.Ga.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Ke;a.currentTarget=this.Ke;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
61
61
  gb.prototype.release=function(){this.Ga=null};function hb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function ib(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function jb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function kb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
62
62
  @license
63
63
  Copyright 2008 The Closure Library Authors
@@ -68,10 +68,10 @@ var lb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
68
68
  Copyright 2006 The Closure Library Authors
69
69
  SPDX-License-Identifier: Apache-2.0
70
70
  */
71
- function nb(a){var b;a instanceof nb?(ob(this,a.Zb),this.Vc=a.Vc,pb(this,a.cc),qb(this,a.sd),this.sb=a.sb,rb(this,a.g.clone()),this.Fc=a.Fc):a&&(b=String(a).match(lb))?(ob(this,b[1]||"",!0),this.Vc=sb(b[2]||""),pb(this,b[3]||"",!0),qb(this,b[4]),this.sb=sb(b[5]||"",!0),rb(this,b[6]||"",!0),this.Fc=sb(b[7]||"")):this.g=new ub(null)}q=nb.prototype;q.Zb="";q.Vc="";q.cc="";q.sd=null;q.sb="";q.Fc="";
72
- q.toString=function(){var a=[],b=this.Zb;b&&a.push(vb(b,wb,!0),":");if(b=this.cc){a.push("//");var c=this.Vc;c&&a.push(vb(c,wb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.sd;null!=b&&a.push(":",String(b))}if(b=this.sb)this.cc&&"/"!=b.charAt(0)&&a.push("/"),a.push(vb(b,"/"==b.charAt(0)?xb:yb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Fc)&&a.push("#",vb(b,zb));return a.join("")};
73
- q.resolve=function(a){var b=this.clone();"data"===b.Zb&&(b=new nb);var c=!!a.Zb;c?ob(b,a.Zb):c=!!a.Vc;c?b.Vc=a.Vc:c=!!a.cc;c?pb(b,a.cc):c=null!=a.sd;var d=a.sb;if(c)qb(b,a.sd);else if(c=!!a.sb){if("/"!=d.charAt(0))if(this.cc&&!this.sb)d="/"+d;else{var e=b.sb.lastIndexOf("/");-1!=e&&(d=b.sb.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(""):".."==
74
- 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.sb=d:c=""!==a.g.toString();c?rb(b,a.g.clone()):c=!!a.Fc;c&&(b.Fc=a.Fc);return b};q.clone=function(){return new nb(this)};function ob(a,b,c){a.Zb=c?sb(b,!0):b;a.Zb&&(a.Zb=a.Zb.replace(/:$/,""))}function pb(a,b,c){a.cc=c?sb(b,!0):b}function qb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.sd=b}else a.sd=null}
71
+ function nb(a){var b;a instanceof nb?(ob(this,a.Zb),this.Wc=a.Wc,pb(this,a.cc),qb(this,a.sd),this.sb=a.sb,rb(this,a.g.clone()),this.Hc=a.Hc):a&&(b=String(a).match(lb))?(ob(this,b[1]||"",!0),this.Wc=sb(b[2]||""),pb(this,b[3]||"",!0),qb(this,b[4]),this.sb=sb(b[5]||"",!0),rb(this,b[6]||"",!0),this.Hc=sb(b[7]||"")):this.g=new ub(null)}q=nb.prototype;q.Zb="";q.Wc="";q.cc="";q.sd=null;q.sb="";q.Hc="";
72
+ q.toString=function(){var a=[],b=this.Zb;b&&a.push(vb(b,wb,!0),":");if(b=this.cc){a.push("//");var c=this.Wc;c&&a.push(vb(c,wb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.sd;null!=b&&a.push(":",String(b))}if(b=this.sb)this.cc&&"/"!=b.charAt(0)&&a.push("/"),a.push(vb(b,"/"==b.charAt(0)?xb:yb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hc)&&a.push("#",vb(b,zb));return a.join("")};
73
+ q.resolve=function(a){var b=this.clone();"data"===b.Zb&&(b=new nb);var c=!!a.Zb;c?ob(b,a.Zb):c=!!a.Wc;c?b.Wc=a.Wc:c=!!a.cc;c?pb(b,a.cc):c=null!=a.sd;var d=a.sb;if(c)qb(b,a.sd);else if(c=!!a.sb){if("/"!=d.charAt(0))if(this.cc&&!this.sb)d="/"+d;else{var e=b.sb.lastIndexOf("/");-1!=e&&(d=b.sb.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(""):".."==
74
+ 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.sb=d:c=""!==a.g.toString();c?rb(b,a.g.clone()):c=!!a.Hc;c&&(b.Hc=a.Hc);return b};q.clone=function(){return new nb(this)};function ob(a,b,c){a.Zb=c?sb(b,!0):b;a.Zb&&(a.Zb=a.Zb.replace(/:$/,""))}function pb(a,b,c){a.cc=c?sb(b,!0):b}function qb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.sd=b}else a.sd=null}
75
75
  function rb(a,b,c){b instanceof ub?a.g=b:(c||(b=vb(b,Ab)),a.g=new ub(b))}function sb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function vb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Bb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Bb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var wb=/[#\/\?@]/g,yb=/[#\?:]/g,xb=/[#\?]/g,Ab=/[#\?@]/g,zb=/#/g;function ub(a){this.g=a||null}
76
76
  function Cb(a){if(!a.cb&&(a.cb={},a.Ud=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=ub.prototype;q.cb=null;q.Ud=null;function Db(a){Cb(a);return a.Ud}q.add=function(a,b){Cb(this);this.g=null;var c=this.cb.hasOwnProperty(a)?this.cb[a]:null;c||(this.cb[a]=c=[]);c.push(b);this.Ud++;return this};
77
77
  q.set=function(a,b){Cb(this);this.g=null;this.cb.hasOwnProperty(a)?this.cb[a]=[b]:this.add(a,b);return this};q.get=function(a){Cb(this);return this.cb[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.cb)return"";var a=[],b;for(b in this.cb)for(var c=encodeURIComponent(b),d=this.cb[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
@@ -112,7 +112,7 @@ function Mc(a){var b=Hb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c
112
112
  function Pc(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
113
113
  function Qc(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Jc(Lc(h),!1));var l=g;22!=l.length&&(l=Jc(Lc(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Hb(Dc(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
114
114
  audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Rc(a,b){if(1==b.length)return b[0];a=Sc(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Sc(a,b){for(var c=t(Tc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Uc?"":null}
115
- function Vc(a,b){var c=[];a=t(Tc[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Uc="text",Wc={ua:"video",ha:"audio",Ka:Uc,ag:"image",Zk:"application"},Yc=1/15,Tc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Zc(){}function $c(a,b){a=ad(a);b=ad(b);return a.split("-")[0]==b.split("-")[0]}function bd(a,b){a=ad(a);b=ad(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function cd(a,b){a=ad(a);b=ad(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
115
+ function Vc(a,b){var c=[];a=t(Tc[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Uc="text",Wc={ua:"video",ia:"audio",Ka:Uc,ag:"image",Zk:"application"},Yc=1/15,Tc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Zc(){}function $c(a,b){a=ad(a);b=ad(b);return a.split("-")[0]==b.split("-")[0]}function bd(a,b){a=ad(a);b=ad(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function cd(a,b){a=ad(a);b=ad(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
116
116
  function ad(a){a=t(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=t(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=dd.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function ed(a,b){var c=fd(a),d=fd(b);return a!=c&&b!=d&&c==d}function gd(a,b){a=ad(a);b=ad(b);return b==a?4:bd(b,a)?3:cd(b,a)?2:bd(a,b)?1:0}
117
117
  function fd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=dd.get(a)||a}function hd(a){return a.language?ad(a.language):a.audio&&a.audio.language?ad(a.audio.language):a.video&&a.video.language?ad(a.video.language):"und"}
118
118
  function jd(a,b){a=ad(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(ad(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,bd(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,cd(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,bd(a,b))return b;return null}P("shaka.util.LanguageUtils",Zc);Zc.findClosestLocale=jd;Zc.getLocaleForVariant=hd;
@@ -126,15 +126,15 @@ var dd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
126
126
  q.Lh=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(ad(c.value));ld(this);a=kb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new S("unknown-locales",(new Map).set("locales",a)));a=kb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new S("locale-changed",a))};
127
127
  q.Ma=function(a,b,c){a=ad(a);void 0===c&&(c=md);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=md||d.set(f,e)});this.h.set(a,d);ld(this);this.dispatchEvent(new S("locale-updated"));return this};q.Dk=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 S("unknown-localization",a));return""};
128
128
  q.pj=function(){return this.g};
129
- function ld(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={$c:f.$c},h=g.next()){f.$c=h.value;e.add(f.$c);e.add(fd(f.$c));h=kb(b.keys(),function(l){return function(m){return ed(m,l.$c)}}(f));h.sort();var k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=kb(b.keys(),function(l){return function(m){return fd(m)==l.$c}}(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=b.get(h.value))&&c.push(h);
129
+ function ld(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={bd:f.bd},h=g.next()){f.bd=h.value;e.add(f.bd);e.add(fd(f.bd));h=kb(b.keys(),function(l){return function(m){return ed(m,l.bd)}}(f));h.sort();var k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=kb(b.keys(),function(l){return function(m){return fd(m)==l.bd}}(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=b.get(h.value))&&c.push(h);
130
130
  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,nd(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new S("missing-localizations",d)))}function nd(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)}P("shaka.ui.Localization",kd);kd.prototype.getCurrentLocales=kd.prototype.pj;
131
- kd.prototype.resolve=kd.prototype.resolve;kd.prototype.resolveDictionary=kd.prototype.Dk;kd.prototype.insert=kd.prototype.Ma;kd.prototype.changeLocale=kd.prototype.Lh;kd.prototype.release=kd.prototype.release;var md=1;kd.ConflictResolution={USE_OLD:0,USE_NEW:md};kd.UNKNOWN_LOCALES="unknown-locales";kd.UNKNOWN_LOCALIZATION="unknown-localization";kd.MISSING_LOCALIZATIONS="missing-localizations";kd.LOCALE_CHANGED="locale-changed";kd.LOCALE_UPDATED="locale-updated";function od(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}od.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function pd(a){return a.h/(1-Math.pow(a.g,a.i))};function qd(){this.h=new od(2);this.j=new od(5);this.g=0;this.i=128E3;this.l=16E3}qd.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};qd.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};qd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(pd(this.h),pd(this.j))};function rd(){this.g=new fb}q=rd.prototype;q.release=function(){this.Za();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new sd(a,b,c,d),this.g.push(b,a))};q.ia=function(a,b,c,d){function e(g){f.Pa(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.Pa=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Pa(),this.g.remove(b,e))}};
132
- q.Za=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Pa();this.g.g={}}};P("shaka.util.EventManager",rd);rd.prototype.removeAll=rd.prototype.Za;rd.prototype.unlisten=rd.prototype.Pa;rd.prototype.listenOnce=rd.prototype.ia;rd.prototype.listen=rd.prototype.o;rd.prototype.release=rd.prototype.release;function sd(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=td(a,d);this.target.addEventListener(b,c,this.g)}
131
+ kd.prototype.resolve=kd.prototype.resolve;kd.prototype.resolveDictionary=kd.prototype.Dk;kd.prototype.insert=kd.prototype.Ma;kd.prototype.changeLocale=kd.prototype.Lh;kd.prototype.release=kd.prototype.release;var md=1;kd.ConflictResolution={USE_OLD:0,USE_NEW:md};kd.UNKNOWN_LOCALES="unknown-locales";kd.UNKNOWN_LOCALIZATION="unknown-localization";kd.MISSING_LOCALIZATIONS="missing-localizations";kd.LOCALE_CHANGED="locale-changed";kd.LOCALE_UPDATED="locale-updated";function od(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}od.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function pd(a){return a.h/(1-Math.pow(a.g,a.i))};function qd(){this.h=new od(2);this.j=new od(5);this.g=0;this.i=128E3;this.l=16E3}qd.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};qd.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};qd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(pd(this.h),pd(this.j))};function rd(){this.g=new fb}q=rd.prototype;q.release=function(){this.Za();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new sd(a,b,c,d),this.g.push(b,a))};q.ka=function(a,b,c,d){function e(g){f.Pa(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.Pa=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Pa(),this.g.remove(b,e))}};
132
+ q.Za=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Pa();this.g.g={}}};P("shaka.util.EventManager",rd);rd.prototype.removeAll=rd.prototype.Za;rd.prototype.unlisten=rd.prototype.Pa;rd.prototype.listenOnce=rd.prototype.ka;rd.prototype.listen=rd.prototype.o;rd.prototype.release=rd.prototype.release;function sd(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=td(a,d);this.target.addEventListener(b,c,this.g)}
133
133
  sd.prototype.Pa=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function td(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return ud(a)?b:b.capture||!1}
134
134
  function ud(a){var b=vd;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}vd=b}return b||!1}var vd=void 0;function wd(a){if(xd.has(a))return xd.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);xd.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),xd.set(a,b),b):!1}function yd(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var xd=new Map;function zd(a,b){this.g=a;this.h=b}zd.prototype.toString=function(){return"v"+this.g+"."+this.h};function Ad(a,b){var c=new zd(5,0),d=Bd,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Cd(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Dd(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Bd=null;function Ed(){}Ed.prototype.extract=function(){};Ed.prototype.decode=function(){return[]};Ed.prototype.clear=function(){};Ed.prototype.getStreams=function(){return[]};function Fd(){}Fd.prototype.init=function(){};Fd.prototype.parse=function(){return[]};function Gd(){}Gd.prototype.init=function(){};Gd.prototype.i=function(){};Gd.prototype.g=function(){};Gd.prototype.j=function(){};P("shaka.media.IClosedCaptionParser",Gd);function Hd(a){this.l=new Fd;if(a=Id[a.toLowerCase()])this.l=a();this.h=new Ed;if(a=Jd)this.h=a()}Hd.prototype.init=function(a,b){void 0!==b&&b||(this.g(),this.l.init(a))};Hd.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Hb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
135
135
  Hd.prototype.g=function(){this.h.clear()};Hd.prototype.j=function(){return this.h.getStreams()};P("shaka.media.ClosedCaptionParser",Hd);Hd.findDecoder=function(){return Jd};Hd.unregisterDecoder=function(){Jd=null};Hd.registerDecoder=function(a){Jd=a};Hd.findParser=function(a){return Id[a]};Hd.unregisterParser=function(a){delete Id[a]};Hd.registerParser=function(a,b){Id[a]=b};var Id={},Jd=null;function Kd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ld;this.scroll=Nd}P("shaka.text.CueRegion",Kd);var Ld=1;Kd.units={PX:0,PERCENTAGE:Ld,LINES:2};var Nd="";Kd.scrollMode={NONE:Nd,UP:"up"};function Od(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Pd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Qd(a,b,c){c||(c=Od);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Of:d.Of},e=a.next()){d.Of=e.value;e=b.findIndex(function(f){return function(g){return c(f.Of,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
136
136
  function Rd(a,b,c){c||(c=Od);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 Sd(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Kd;this.position=null;this.positionAlign=Td;this.size=0;this.textAlign=Ud;this.direction=Vd;this.writingMode=Wd;this.lineInterpretation=Xd;this.line=null;this.lineHeight="";this.lineAlign=Yd;this.displayAlign=Zd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=$d;this.fontStyle=ce;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
137
- "";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Ec:32,rows:15}}function de(a,b){a=new Sd(a,b,"");a.lineBreak=!0;return a}Sd.prototype.clone=function(){var a=new Sd(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
137
+ "";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Gc:32,rows:15}}function de(a,b){a=new Sd(a,b,"");a.lineBreak=!0;return a}Sd.prototype.clone=function(){var a=new Sd(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
138
138
  function ge(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(!Rd(a.nestedCues,b.nestedCues,ge))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(!Rd(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}P("shaka.text.Cue",Sd);Sd.equal=ge;Sd.prototype.clone=Sd.prototype.clone;var Td="auto";
139
139
  Sd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Td};var Ud="center",he={LEFT:"left",RIGHT:"right",CENTER:Ud,START:"start",END:"end"};Sd.textAlign=he;var Zd="after",ie={BEFORE:"before",CENTER:"center",AFTER:Zd};Sd.displayAlign=ie;var Vd="ltr";Sd.direction={HORIZONTAL_LEFT_TO_RIGHT:Vd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Wd="horizontal-tb";Sd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Wd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Xd=0;
140
140
  Sd.lineInterpretation={LINE_NUMBER:Xd,PERCENTAGE:1};var Yd="start",je={CENTER:"center",START:Yd,END:"end"};Sd.lineAlign=je;var ke={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Sd.defaultTextColor=ke;var le={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Sd.defaultTextBackgroundColor=le;var $d=400;Sd.fontWeight={NORMAL:$d,BOLD:700};
@@ -162,7 +162,7 @@ function mf(a,b){var c=ac(),d=bc("Firefox")&&qc(),e=a.video,f=e&&e.width||0,g=e&
162
162
  if(e){d=pf(e.codecs,e.mimeType);c=ze(e.mimeType,d,"audio");if(!wd(c))return!1;e.codecs=d}return a.decodingInfos.some(function(h){return!h.supported||b&&(h=h.keySystemAccess)&&h.keySystem!=b?!1:!0})}function qf(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=qf(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
163
163
  function rf(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=$e(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f={};g=t(b);for(h=g.next();!h.done;f={Bd:f.Bd,Cd:f.Cd},h=g.next())k=h.value,f.Cd=qf(k),f.Bd=sf,f.Bd[f.Cd]?d=c(d,f.Bd[f.Cd]):e.push(tf(k).then(function(m){return function(n){var p=
164
164
  null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())p=c(p,r.value);p&&(m.Bd[m.Cd]=p,d=c(d,p))}}(f)));return G(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);I(l)})}
165
- function tf(a){var b=[""];a.video&&(b=Me(a.video.contentType).split(","));var c=[""];a.audio&&(c=Me(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={Ac:f.Ac},h=g.next())h=h.value,f.Ac=Ze(a),a.video&&(f.Ac.video.contentType=we(Le(f.Ac.video.contentType),e)),a.audio&&(f.Ac.audio.contentType=we(Le(f.Ac.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Ac).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
165
+ function tf(a){var b=[""];a.video&&(b=Me(a.video.contentType).split(","));var c=[""];a.audio&&(c=Me(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={Cc:f.Cc},h=g.next())h=h.value,f.Cc=Ze(a),a.video&&(f.Cc.video.contentType=we(Le(f.Cc.video.contentType),e)),a.audio&&(f.Cc.audio.contentType=we(Le(f.Cc.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Cc).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
166
166
  return null})}
167
167
  function lf(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;return O(function(B){switch(B.g){case 1:if(e=a.some(function(D){return D.decodingInfos.length}))return B.return();f={};g=t(d);h=g.next();case 2:if(h.done){B.B(4);break}f.Rf=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){B.B(7);break}n=m.value;p=uf(n,b,c).filter(function(D){return function(F){F=F[0];return(F.keySystemConfiguration&&F.keySystemConfiguration.keySystem)===D.Rf}}(f));r=t(p);u=r.next();case 8:if(u.done){B.B(10);break}w=u.value;
168
168
  return G(B,rf(n,w),9);case 9:u=r.next();B.B(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();B.B(5);break;case 7:if(k)return B.return();f={Rf:f.Rf};h=g.next();B.B(2);break;case 4:v=t(a),m=v.next();case 12:if(m.done){B.B(0);break}A=m.value;z=uf(A,b,c).filter(function(D){D=D[0];D=D.keySystemConfiguration&&D.keySystemConfiguration.keySystem;return!D||!d.includes(D)});C=t(z);u=C.next();case 15:if(u.done){m=v.next();B.B(12);break}y=u.value;return G(B,rf(A,y),16);case 16:u=C.next(),B.B(15)}})}
@@ -222,12 +222,12 @@ yg.prototype.request=yg.prototype.request;yg.prototype.destroy=yg.prototype.dest
222
222
  yg.registerScheme=zg;yg.prototype.setForceHTTPS=yg.prototype.qh;yg.prototype.setForceHTTP=yg.prototype.ph;function Eg(){this.g=0}yg.NumBytesRemainingClass=Eg;function Fg(a,b,c){pg.call(this,a,b);this.h=c}pa(Fg,pg);yg.PendingRequest=Fg;var Jg=1;yg.RequestType={MANIFEST:0,SEGMENT:Jg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};yg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6};var Ag=3;
223
223
  yg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ag};var Bg={};function Lg(a){this.g=!1;this.h=new og;this.i=a}Lg.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Mg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Ng(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Og(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Pg(a,b){this.h=Mb(a);this.i=b==Qg;this.g=0}q=Pg.prototype;q.Ea=function(){return this.g<this.h.byteLength};q.La=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.$=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Rg();}};q.za=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Rg();}};q.V=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Rg();}};
224
224
  q.ri=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Rg();}};q.td=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Rg();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Rb=function(a){if(this.g+a>this.h.byteLength)throw Rg();var b=Hb(this.h,this.g,a);this.g+=a;return b};
225
- q.skip=function(a){if(this.g+a>this.h.byteLength)throw Rg();this.g+=a};q.Ek=function(a){if(this.g<a)throw Rg();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Rg();this.g=a};q.Qc=function(){for(var a=this.g;this.Ea()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Hb(this.h,a,this.g-a);this.g+=1;return zc(a)};function Rg(){return new T(2,3,3E3)}P("shaka.util.DataViewReader",Pg);Pg.prototype.readTerminatedString=Pg.prototype.Qc;Pg.prototype.seek=Pg.prototype.seek;Pg.prototype.rewind=Pg.prototype.Ek;
226
- Pg.prototype.skip=Pg.prototype.skip;Pg.prototype.readBytes=Pg.prototype.Rb;Pg.prototype.readUint64=Pg.prototype.td;Pg.prototype.readInt32=Pg.prototype.ri;Pg.prototype.readUint32=Pg.prototype.V;Pg.prototype.readUint16=Pg.prototype.za;Pg.prototype.readUint8=Pg.prototype.$;Pg.prototype.getLength=Pg.prototype.getLength;Pg.prototype.getPosition=Pg.prototype.La;Pg.prototype.hasMoreData=Pg.prototype.Ea;var Qg=1;Pg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Qg};function Sg(){this.i=[];this.h=[];this.g=!1}q=Sg.prototype;q.box=function(a,b){a=Tg(a);this.i[a]=Ug;this.h[a]=b;return this};q.Y=function(a,b){a=Tg(a);this.i[a]=Vg;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Pg(a,0);for(this.g=!1;a.Ea()&&!this.g;)this.rd(0,a,b,c)};
225
+ q.skip=function(a){if(this.g+a>this.h.byteLength)throw Rg();this.g+=a};q.Ek=function(a){if(this.g<a)throw Rg();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Rg();this.g=a};q.Rc=function(){for(var a=this.g;this.Ea()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Hb(this.h,a,this.g-a);this.g+=1;return zc(a)};function Rg(){return new T(2,3,3E3)}P("shaka.util.DataViewReader",Pg);Pg.prototype.readTerminatedString=Pg.prototype.Rc;Pg.prototype.seek=Pg.prototype.seek;Pg.prototype.rewind=Pg.prototype.Ek;
226
+ Pg.prototype.skip=Pg.prototype.skip;Pg.prototype.readBytes=Pg.prototype.Rb;Pg.prototype.readUint64=Pg.prototype.td;Pg.prototype.readInt32=Pg.prototype.ri;Pg.prototype.readUint32=Pg.prototype.V;Pg.prototype.readUint16=Pg.prototype.za;Pg.prototype.readUint8=Pg.prototype.$;Pg.prototype.getLength=Pg.prototype.getLength;Pg.prototype.getPosition=Pg.prototype.La;Pg.prototype.hasMoreData=Pg.prototype.Ea;var Qg=1;Pg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Qg};function Sg(){this.i=[];this.h=[];this.g=!1}q=Sg.prototype;q.box=function(a,b){a=Tg(a);this.i[a]=Ug;this.h[a]=b;return this};q.Z=function(a,b){a=Tg(a);this.i[a]=Vg;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Pg(a,0);for(this.g=!1;a.Ea()&&!this.g;)this.rd(0,a,b,c)};
227
227
  q.rd=function(a,b,c,d){var e=b.La();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.V(),g=b.V(),h=Wg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.La()+8>b.getLength()){this.g=!0;return}f=b.td();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Vg){if(d&&b.La()+4>b.getLength()){this.g=!0;return}n=b.V();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.La(),b=0<d?b.Rb(d):new Uint8Array(0),b=new Pg(b,0),l({name:h,parser:this,
228
228
  partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.La(),b.getLength()-b.La()))}};function Xg(a){for(var b=Yg(a);a.reader.Ea()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}function Zg(a){for(var b=Yg(a),c=a.reader.V(),d=0;d<c&&(a.parser.rd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function $g(a){var b=Yg(a);for(a.reader.skip(78);a.reader.Ea()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}
229
229
  function ah(a){var b=Yg(a);a.reader.skip(8);var c=a.reader.za();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.Ea()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}function bh(a){return function(b){a(b.reader.Rb(b.reader.getLength()-b.reader.La()))}}function Tg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Wg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
230
- function Yg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",Sg);Sg.headerSize=Yg;Sg.typeToString=Wg;Sg.allData=bh;Sg.audioSampleEntry=ah;Sg.visualSampleEntry=$g;Sg.sampleDescription=Zg;Sg.children=Xg;Sg.prototype.parseNext=Sg.prototype.rd;Sg.prototype.parse=Sg.prototype.parse;Sg.prototype.stop=Sg.prototype.stop;Sg.prototype.fullBox=Sg.prototype.Y;Sg.prototype.box=Sg.prototype.box;var Ug=0,Vg=1;function ch(a){var b=this;this.g=[];this.h=[];this.data=[];(new Sg).box("moov",Xg).box("moof",Xg).Y("pssh",function(c){if(!(1<c.version)){var d=Hb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Mc(c.reader.Rb(16)));if(0<c.version){d=c.reader.V();for(var e=0;e<d;e++){var f=Mc(c.reader.Rb(16));b.h.push(f)}}}}).parse(a)}
230
+ function Yg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",Sg);Sg.headerSize=Yg;Sg.typeToString=Wg;Sg.allData=bh;Sg.audioSampleEntry=ah;Sg.visualSampleEntry=$g;Sg.sampleDescription=Zg;Sg.children=Xg;Sg.prototype.parseNext=Sg.prototype.rd;Sg.prototype.parse=Sg.prototype.parse;Sg.prototype.stop=Sg.prototype.stop;Sg.prototype.fullBox=Sg.prototype.Z;Sg.prototype.box=Sg.prototype.box;var Ug=0,Vg=1;function ch(a){var b=this;this.g=[];this.h=[];this.data=[];(new Sg).box("moov",Xg).box("moof",Xg).Z("pssh",function(c){if(!(1<c.version)){var d=Hb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Mc(c.reader.Rb(16)));if(0<c.version){d=c.reader.V();for(var e=0;e<d;e++){var f=Mc(c.reader.Rb(16));b.h.push(f)}}}}).parse(a)}
231
231
  function dh(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Mb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Lc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
232
232
  @license
233
233
  tXml
@@ -247,14 +247,14 @@ function yh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]
247
247
  function Gh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
248
248
  function Hh(a){var b=[];a=Gc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,position:f?Number(f[1])-1:null,pc:c.split("/@")[1]||null})}else c.startsWith("@")&&b.length&&(b[b.length-1].pc=c.slice(1))}return b}
249
249
  function Ih(a,b){var c=Hh(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.pc)?Jh(a[c],e,d,oh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}function Jh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
250
- function Kh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&Kh(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=Kh(b,!1,!0),d.appendChild(c);return d}var ih=new Map([]);function Lh(a){var b=this;this.G=a;this.J=new Set;this.m=this.u=null;this.ka=this.aa=!1;this.K=0;this.g=null;this.C=new rd;this.i=new Map;this.A=new Map;this.l=new og;this.h=null;this.s=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.W=new Map;this.ea=new Map;this.M=new Vb(function(){return Mh(b)});this.P=!1;this.O=[];this.S=!1;this.L=new Vb(function(){Nh(b)});this.l.catch(function(){});this.j=new Lg(function(){return Oh(b)});this.Z=!1;this.H=this.I=null}q=Lh.prototype;q.destroy=function(){return this.j.destroy()};
251
- function Oh(a){return O(function(b){switch(b.g){case 1:return a.C.release(),a.C=null,a.l.reject(),a.L.stop(),a.L=null,a.M.stop(),a.M=null,G(b,Ph(a),2);case 2:if(!a.m){b.B(3);break}ta(b,4);return G(b,a.m.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.m=null;case 3:a.g=null,a.J.clear(),a.u=null,a.A=new Map,a.h=null,a.s=function(){},a.G=null,a.Z=!1,a.I=null,I(b)}})}q.configure=function(a){this.h=a;this.L&&this.L.wa(this.h.updateExpirationTime)};
252
- function Qh(a,b,c){a.ka=!0;a.A=new Map;a.P=c;return Rh(a,b)}function Sh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.P=0<a.A.size;return Rh(a,b)}
250
+ function Kh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&Kh(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=Kh(b,!1,!0),d.appendChild(c);return d}var ih=new Map([]);function Lh(a){var b=this;this.G=a;this.J=new Set;this.m=this.u=null;this.ha=this.aa=!1;this.K=0;this.g=null;this.C=new rd;this.i=new Map;this.A=new Map;this.l=new og;this.h=null;this.s=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.W=new Map;this.ea=new Map;this.M=new Vb(function(){return Mh(b)});this.P=!1;this.O=[];this.S=!1;this.L=new Vb(function(){Nh(b)});this.l.catch(function(){});this.j=new Lg(function(){return Oh(b)});this.Y=!1;this.H=this.I=null}q=Lh.prototype;q.destroy=function(){return this.j.destroy()};
251
+ function Oh(a){return O(function(b){switch(b.g){case 1:return a.C.release(),a.C=null,a.l.reject(),a.L.stop(),a.L=null,a.M.stop(),a.M=null,G(b,Ph(a),2);case 2:if(!a.m){b.B(3);break}ta(b,4);return G(b,a.m.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.m=null;case 3:a.g=null,a.J.clear(),a.u=null,a.A=new Map,a.h=null,a.s=function(){},a.G=null,a.Y=!1,a.I=null,I(b)}})}q.configure=function(a){this.h=a;this.L&&this.L.wa(this.h.updateExpirationTime)};
252
+ function Qh(a,b,c){a.ha=!0;a.A=new Map;a.P=c;return Rh(a,b)}function Sh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.P=0<a.A.size;return Rh(a,b)}
253
253
  function Th(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Uh(a,g,[])}
254
254
  function Rh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z;return O(function(C){if(1==C.g){if(c=Vh(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(y){return y.video&&y.video.drmInfos.length||y.audio&&y.audio.drmInfos.length?!0:!1});g||(h=Ng(a.h.servers),Wh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Xh(m),p=t(n),r=p.next();!r.done;r=p.next())u=r.value,k.add(u);w=t(k);for(r=w.next();!r.done;r=
255
- w.next())v=r.value,Yh(v,Ng(a.h.servers),Ng(a.h.advanced||{}),a.h.keySystemsMapping);return G(C,lf(b,a.P,a.Z,a.h.preferredKeySystems),2)}Mg(a.j);A=g||Object.keys(a.h.servers).length;if(!A)return a.aa=!0,C.return(Promise.resolve());z=Uh(a,void 0,b);return C.return(g?z:z.catch(function(){}))})}
255
+ w.next())v=r.value,Yh(v,Ng(a.h.servers),Ng(a.h.advanced||{}),a.h.keySystemsMapping);return G(C,lf(b,a.P,a.Y,a.h.preferredKeySystems),2)}Mg(a.j);A=g||Object.keys(a.h.servers).length;if(!A)return a.aa=!0,C.return(Promise.resolve());z=Uh(a,void 0,b);return C.return(g?z:z.catch(function(){}))})}
256
256
  function Zh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.I){c.B(2);break}return G(c,a.I,3);case 3:return Mg(a.j),c.return();case 2:return ta(c,4),a.I=a.m.setMediaKeys(a.u),G(c,a.I,6);case 6:va(c,5);break;case 4:b=wa(c),a.s(new T(2,6,6003,b.message));case 5:Mg(a.j),I(c)}})}function $h(a,b){return O(function(c){if(1==c.g)return G(c,Zh(a),2);ai(a,b.initDataType,Hb(b.initData));I(c)})}
257
- q.ac=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.u)return b.C.ia(a,"encrypted",function(){b.s(new T(2,6,6010))}),c.return();b.m=a;b.C.ia(b.m,"play",function(){for(var d=t(b.O),e=d.next();!e.done;e=d.next())bi(b,e.value);b.S=!0;b.O=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.C.o(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ph(b)});b.H=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.H||"com.apple.fps"!==b.g.keySystem||
257
+ q.ac=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.u)return b.C.ka(a,"encrypted",function(){b.s(new T(2,6,6010))}),c.return();b.m=a;b.C.ka(b.m,"play",function(){for(var d=t(b.O),e=d.next();!e.done;e=d.next())bi(b,e.value);b.S=!0;b.O=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.C.o(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ph(b)});b.H=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.H||"com.apple.fps"!==b.g.keySystem||
258
258
  b.A.size?G(c,Zh(b),2):c.B(2)}ci(b).catch(function(){});b.H||b.A.size||b.h.parseInbandPsshEnabled||b.C.o(b.m,"encrypted",function(d){return $h(b,d)});I(c)})};
259
259
  function di(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=Dg([a.g.serverCertificateUri],a.h.retryParameters);ta(g,3);c=a.G.hc.request(5,b);return G(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Hb(d.data);va(g,4);break;case 3:throw e=wa(g),new T(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();
260
260
  ta(g,6);return G(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new T(2,6,6004,f.message);}})}function ei(a,b){var c,d,e;return O(function(f){if(1==f.g)return G(f,fi(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.Db=new og,d.push(e.Db);d.push(c.remove());return G(f,Promise.all(d),3)}a.i.delete(c);I(f)})}
@@ -284,11 +284,11 @@ function qi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function
284
284
  function si(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L;return O(function(H){if(1==H.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
285
285
  {contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(E,K){var M,N,Q,U,R,ca,fa,Xa;return O(function(Aa){switch(Aa.g){case 1:return ta(Aa,2),G(Aa,K.createMediaKeys(),4);case 4:va(Aa,3);break;case 2:return wa(Aa),Aa.return();case 3:N=(M=K.getConfiguration().sessionTypes)?M.includes("persistent-license"):
286
286
  !1,dc()&&(N=!1),Q=K.getConfiguration().videoCapabilities,U=K.getConfiguration().audioCapabilities,R={persistentState:N,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(E)&&k.get(E)?R=k.get(E):k.set(E,R),(ca=Q[0].encryptionScheme)&&!R.encryptionSchemes.includes(ca)&&R.encryptionSchemes.push(ca),(fa=Q[0].robustness)&&!R.videoRobustnessLevels.includes(fa)&&R.videoRobustnessLevels.push(fa),(Xa=U[0].robustness)&&!R.audioRobustnessLevels.includes(Xa)&&R.audioRobustnessLevels.push(Xa),
287
- I(Aa)}})};m=function(E,K,M,N){var Q,U,R,ca,fa,Xa,Aa,Ra,bb;return O(function(Ya){switch(Ya.g){case 1:ta(Ya,2);Q=Ze(g);U=t(Q.videoCapabilities);for(R=U.next();!R.done;R=U.next())ca=R.value,ca.encryptionScheme=K,ca.robustness=M;fa=t(Q.audioCapabilities);for(R=fa.next();!R.done;R=fa.next())Xa=R.value,Xa.encryptionScheme=K,Xa.robustness=N;Aa=Ze(Q);Aa.persistentState="required";Aa.sessionTypes=["persistent-license"];Ra=[Aa,Q];return G(Ya,navigator.requestMediaKeySystemAccess(E,Ra),4);case 4:return bb=Ya.h,
288
- G(Ya,l(E,bb),5);case 5:va(Ya,0);break;case 2:wa(Ya),I(Ya)}})};n=function(E,K,M,N){var Q,U,R;return O(function(ca){switch(ca.g){case 1:return ta(ca,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:E,video:{encryptionScheme:K,robustness:M},audio:{encryptionScheme:K,robustness:N}}},G(ca,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return U=
287
+ I(Aa)}})};m=function(E,K,M,N){var Q,U,R,ca,fa,Xa,Aa,Ra,cb;return O(function(Ya){switch(Ya.g){case 1:ta(Ya,2);Q=Ze(g);U=t(Q.videoCapabilities);for(R=U.next();!R.done;R=U.next())ca=R.value,ca.encryptionScheme=K,ca.robustness=M;fa=t(Q.audioCapabilities);for(R=fa.next();!R.done;R=fa.next())Xa=R.value,Xa.encryptionScheme=K,Xa.robustness=N;Aa=Ze(Q);Aa.persistentState="required";Aa.sessionTypes=["persistent-license"];Ra=[Aa,Q];return G(Ya,navigator.requestMediaKeySystemAccess(E,Ra),4);case 4:return cb=Ya.h,
288
+ G(Ya,l(E,cb),5);case 5:va(Ya,0);break;case 2:wa(Ya),I(Ya)}})};n=function(E,K,M,N){var Q,U,R;return O(function(ca){switch(ca.g){case 1:return ta(ca,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:E,video:{encryptionScheme:K,robustness:M},audio:{encryptionScheme:K,robustness:N}}},G(ca,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return U=
289
289
  ca.h,R=U.keySystemAccess,G(ca,l(E,R),5);case 5:va(ca,0);break;case 2:wa(ca),I(ca)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);w=[];v=t(h);for(A=v.next();!A.done;A=v.next())for(z=A.value,C=t(a),r=C.next();!r.done;r=C.next())y=r.value,"org.w3.clearkey"===y&&oc()||(w.push(m(y,z,"","")),w.push(n(y,z,"","")));B=t(a);for(r=B.next();!r.done;r=B.next())for(D=r.value,F=t(d[D]||[]),J=F.next();!J.done;J=F.next())L=J.value,w.push(m(D,null,L,"")),w.push(m(D,null,"",L)),w.push(n(D,null,
290
290
  L,"")),w.push(n(D,null,"",L));return G(H,Promise.all(w),2)}return H.return(Og(k))})}function ti(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Vb(e)).X(ui)}),ta(c,2),G(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);wa(c);I(c)})}
291
- function Ph(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return G(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return ta(g,2),a.ka||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?G(g,ti(e),5):G(g,e.remove(),5);if(2!=g.g)return va(g,0);wa(g);I(g)})})),0)})}function Xh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
291
+ function Ph(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return G(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return ta(g,2),a.ha||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?G(g,ti(e),5):G(g,e.remove(),5);if(2!=g.g)return va(g,0);wa(g);I(g)})})),0)})}function Xh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
292
292
  function Nh(a){a.i.forEach(function(b,c){var d=b.Zg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Zg=e)})}function hi(a){a=a.i.values();return ib(a,function(b){return b.loaded})}function gi(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.W.get(c.value))return!1;return!0}
293
293
  function Wh(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
294
294
  function mi(a,b,c,d,e,f,g,h){var k=[],l={};a=t(a);for(var m=a.next();!m.done;l={Da:l.Da},m=a.next()){l.Da=m.value;b.includes(l.Da.encryptionScheme)||b.push(l.Da.encryptionScheme);"org.w3.clearkey"==l.Da.keySystem&&l.Da.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(l.Da.licenseServerUri)||k.push(l.Da.licenseServerUri):c.includes(l.Da.licenseServerUri)||c.push(l.Da.licenseServerUri);e.includes(l.Da.serverCertificateUri)||e.push(l.Da.serverCertificateUri);l.Da.serverCertificate&&
@@ -304,18 +304,18 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
304
304
  function vi(a,b,c){this.h=a;this.i=b;this.g=c}function wi(a,b){return O(function(c){if(1==c.g)return G(c,gf(a.g,b,a.h.drm.preferredKeySystems),2);a.h.streaming.dontChooseCodecs||bf(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(Gf))throw new T(2,4,4032);return c.return(xi(a,b))})}
305
305
  function xi(a,b){var c=ff(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.u)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,yi(a,d.keySystem,f.video),yi(a,d.keySystem,f.audio);zi(a,b)}return c}function yi(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,ai(a.g,e.initDataType,e.initData)}}}
306
306
  function zi(a,b){a=a.g?a.g.Xe():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(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=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?Ai.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
307
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var Ai=["output-restricted","internal-error"];function Bi(){}function Ci(a,b){if(b){var c=Di[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}P("shaka.media.ManifestParser",Bi);Bi.unregisterParserByMime=function(a){delete Di[a]};Bi.registerParserByMime=function(a,b){Di[a]=b};Bi.registerParserByExtension=function(){Ad("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Bi.AccessibilityPurpose={bm:"visually impaired",wl:"hard of hearing"};var Di={};function Ei(a,b){function c(){f=!0}function d(m){h.push(m);Xg(m)}var e=a=Hb(a),f=!1,g,h=[],k=[];(new Sg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).Y("stsd",function(m){g=m;h.push(m);Zg(m)}).Y("encv",c).Y("enca",c).Y("dvav",function(m){k.push({box:m,Bb:1701733238})}).Y("dva1",function(m){k.push({box:m,Bb:1701733238})}).Y("dvh1",function(m){k.push({box:m,Bb:1701733238})}).Y("dvhe",function(m){k.push({box:m,Bb:1701733238})}).Y("hev1",function(m){k.push({box:m,Bb:1701733238})}).Y("hvc1",
308
- function(m){k.push({box:m,Bb:1701733238})}).Y("avc1",function(m){k.push({box:m,Bb:1701733238})}).Y("avc3",function(m){k.push({box:m,Bb:1701733238})}).Y("ac-3",function(m){k.push({box:m,Bb:1701733217})}).Y("ec-3",function(m){k.push({box:m,Bb:1701733217})}).Y("ac-4",function(m){k.push({box:m,Bb:1701733217})}).Y("mp4a",function(m){k.push({box:m,Bb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw eb(Mc(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
307
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var Ai=["output-restricted","internal-error"];function Bi(){}function Ci(a,b){if(b){var c=Di[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}P("shaka.media.ManifestParser",Bi);Bi.unregisterParserByMime=function(a){delete Di[a]};Bi.registerParserByMime=function(a,b){Di[a]=b};Bi.registerParserByExtension=function(){Ad("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Bi.AccessibilityPurpose={bm:"visually impaired",wl:"hard of hearing"};var Di={};function Ei(a,b){function c(){f=!0}function d(m){h.push(m);Xg(m)}var e=a=Hb(a),f=!1,g,h=[],k=[];(new Sg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).Z("stsd",function(m){g=m;h.push(m);Zg(m)}).Z("encv",c).Z("enca",c).Z("dvav",function(m){k.push({box:m,Bb:1701733238})}).Z("dva1",function(m){k.push({box:m,Bb:1701733238})}).Z("dvh1",function(m){k.push({box:m,Bb:1701733238})}).Z("dvhe",function(m){k.push({box:m,Bb:1701733238})}).Z("hev1",function(m){k.push({box:m,Bb:1701733238})}).Z("hvc1",
308
+ function(m){k.push({box:m,Bb:1701733238})}).Z("avc1",function(m){k.push({box:m,Bb:1701733238})}).Z("avc3",function(m){k.push({box:m,Bb:1701733238})}).Z("ac-3",function(m){k.push({box:m,Bb:1701733217})}).Z("ec-3",function(m){k.push({box:m,Bb:1701733217})}).Z("ac-4",function(m){k.push({box:m,Bb:1701733217})}).Z("mp4a",function(m){k.push({box:m,Bb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw eb(Mc(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
309
309
  e=Fi(e,g,l.box,h,l.Bb);return $b()&&pc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
310
310
  function Fi(a,b,c,d,e){var f=Gi.value(),g=a.subarray(c.start,c.start+c.size),h=Mb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Mb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Hi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=ac()||$b()?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=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Hi(e,d.start,d.size+k.byteLength);k=Mb(e,b.start);b=Yg(b);
311
- a=k.getUint32(b);k.setUint32(b,a+1);return e}function Hi(a,b,c){a=Mb(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 Gi=new Ob(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 Ii(a,b,c,d,e,f,g){this.R=a;this.$a=b;this.Ja=c;this.nd=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}Ii.prototype.Ib=function(){return this.$a};Ii.prototype.Fb=function(){return this.Ja};Ii.prototype.Zd=function(){return this.g};function Ji(a,b){return a===b?!0:a&&b?a.Ib()==b.Ib()&&a.Fb()==b.Fb()&&Rd(a.R().sort(),b.R().sort())&&Fb(a.Zd(),b.Zd()):a==b}P("shaka.media.InitSegmentReference",Ii);
311
+ a=k.getUint32(b);k.setUint32(b,a+1);return e}function Hi(a,b,c){a=Mb(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 Gi=new Ob(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 Ii(a,b,c,d,e,f,g){this.R=a;this.$a=b;this.Ja=c;this.od=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}Ii.prototype.Ib=function(){return this.$a};Ii.prototype.Fb=function(){return this.Ja};Ii.prototype.Zd=function(){return this.g};function Ji(a,b){return a===b?!0:a&&b?a.Ib()==b.Ib()&&a.Fb()==b.Fb()&&Rd(a.R().sort(),b.R().sort())&&Fb(a.Zd(),b.Zd()):a==b}P("shaka.media.InitSegmentReference",Ii);
312
312
  Ii.prototype.getEndByte=Ii.prototype.Fb;Ii.prototype.getStartByte=Ii.prototype.Ib;
313
313
  function Ki(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w){l=void 0===l?[]:l;r=void 0===r?Li:r;this.startTime=a;this.i=this.endTime=b;this.G=c;this.$a=d;this.Ja=e;this.ma=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===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.u=null;this.j=0;this.s=void 0===w?!1:w;this.kf=this.oe=!1;a=t(this.g);for(b=a.next();!b.done;b=
314
- a.next())b.value.li();this.s&&this.g.length&&this.g[this.g.length-1].ki();this.C=this.mimeType=this.codecs=null}q=Ki.prototype;q.R=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.rj=function(){return this.endTime};q.Ib=function(){return this.$a};q.Fb=function(){return this.Ja};q.Lj=function(){return this.tilesLayout};q.Kj=function(){return this.A};q.tc=function(){return this.status};q.ik=function(){this.status=Mi};q.Wg=function(){this.preload=!0};q.$j=function(){return this.preload};
314
+ a.next())b.value.li();this.s&&this.g.length&&this.g[this.g.length-1].ki();this.C=this.mimeType=this.codecs=null}q=Ki.prototype;q.R=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.rj=function(){return this.endTime};q.Ib=function(){return this.$a};q.Fb=function(){return this.Ja};q.Lj=function(){return this.tilesLayout};q.Kj=function(){return this.A};q.uc=function(){return this.status};q.ik=function(){this.status=Mi};q.Wg=function(){this.preload=!0};q.$j=function(){return this.preload};
315
315
  q.nf=function(){this.l=!1};q.Xj=function(){return this.l};q.li=function(){this.oe=!0};q.Zj=function(){return this.oe};q.ki=function(){this.kf=!0};q.Yj=function(){return this.kf};q.ji=function(){this.m=!0};q.Tj=function(){return this.m};q.Fi=function(a){this.u=a};q.Jj=function(){return this.u};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
316
316
  q.wh=function(a){null==this.h?Ua("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.Qk=function(a){this.C=a};q.Zd=function(){return this.C};function Ni(a,b){a.ma=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ni(c.value,b)}P("shaka.media.SegmentReference",Ki);Ki.prototype.getSegmentData=Ki.prototype.Zd;Ki.prototype.setSegmentData=Ki.prototype.Qk;Ki.prototype.syncAgainst=Ki.prototype.wh;Ki.prototype.offset=Ki.prototype.offset;
317
317
  Ki.prototype.getThumbnailSprite=Ki.prototype.Jj;Ki.prototype.setThumbnailSprite=Ki.prototype.Fi;Ki.prototype.hasByterangeOptimization=Ki.prototype.Tj;Ki.prototype.markAsByterangeOptimization=Ki.prototype.ji;Ki.prototype.isLastPartial=Ki.prototype.Yj;Ki.prototype.markAsLastPartial=Ki.prototype.ki;Ki.prototype.isPartial=Ki.prototype.Zj;Ki.prototype.markAsPartial=Ki.prototype.li;Ki.prototype.isIndependent=Ki.prototype.Xj;Ki.prototype.markAsNonIndependent=Ki.prototype.nf;Ki.prototype.isPreload=Ki.prototype.$j;
318
- Ki.prototype.markAsPreload=Ki.prototype.Wg;Ki.prototype.markAsUnavailable=Ki.prototype.ik;Ki.prototype.getStatus=Ki.prototype.tc;Ki.prototype.getTileDuration=Ki.prototype.Kj;Ki.prototype.getTilesLayout=Ki.prototype.Lj;Ki.prototype.getEndByte=Ki.prototype.Fb;Ki.prototype.getStartByte=Ki.prototype.Ib;Ki.prototype.getEndTime=Ki.prototype.rj;Ki.prototype.getStartTime=Ki.prototype.getStartTime;Ki.prototype.getUris=Ki.prototype.R;var Li=0,Mi=1;Ki.Status={$k:Li,$l:Mi,Cl:2};function Oi(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Pi(a){return!a||Oi(a)?null:a.length?a.end(a.length-1):null}function Qi(a,b){return!a||!a.length||Oi(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ri(a,b){if(!a||!a.length||Oi(a))return 0;var c=0;a=t(Si(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}
318
+ Ki.prototype.markAsPreload=Ki.prototype.Wg;Ki.prototype.markAsUnavailable=Ki.prototype.ik;Ki.prototype.getStatus=Ki.prototype.uc;Ki.prototype.getTileDuration=Ki.prototype.Kj;Ki.prototype.getTilesLayout=Ki.prototype.Lj;Ki.prototype.getEndByte=Ki.prototype.Fb;Ki.prototype.getStartByte=Ki.prototype.Ib;Ki.prototype.getEndTime=Ki.prototype.rj;Ki.prototype.getStartTime=Ki.prototype.getStartTime;Ki.prototype.getUris=Ki.prototype.R;var Li=0,Mi=1;Ki.Status={$k:Li,$l:Mi,Cl:2};function Oi(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Pi(a){return!a||Oi(a)?null:a.length?a.end(a.length-1):null}function Qi(a,b){return!a||!a.length||Oi(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ri(a,b){if(!a||!a.length||Oi(a))return 0;var c=0;a=t(Si(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}
319
319
  function Ti(a,b,c){if(!a||!a.length||Oi(a))return null;a=Si(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Si(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};/*
320
320
  @license
321
321
  Shaka Player
@@ -359,142 +359,142 @@ a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);ret
359
359
  q.bh=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 p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Nc(b.data,p),b.fullData=Nc(b.fullData,p)));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=Nc(b.data,k),b.fullData=Nc(b.fullData,k)));if(n>=e-f)return h;
360
360
  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=Nc(b.data,a),b.fullData=Nc(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Nc.apply(Hc,x(c.value)),(c=wj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Zi(c.data),dts:c.dts,pts:c.pts});return a};
361
361
  q.rc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Nc.apply(Hc,x(c.value)),e=wj(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=Nc(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};
362
- q.jd=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Nc.apply(Hc,x(d.value)),f=wj(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=Nc(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.bh(e,
363
- g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}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)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.rc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.jd(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.Wd=function(){return{audio:this.A,video:this.m}};
364
- q.bf=function(){for(var a=[],b=t(this.jd()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.Qj=function(){Ad("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Ng();return{height:a.height,width:a.width}};q.Ng=function(){return"hvc"==this.m?Bj(this):Cj(this)};
362
+ q.kd=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Nc.apply(Hc,x(d.value)),f=wj(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=Nc(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.bh(e,
363
+ g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}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)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.rc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.kd(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.Wd=function(){return{audio:this.A,video:this.m}};
364
+ q.bf=function(){for(var a=[],b=t(this.kd()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.Qj=function(){Ad("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Ng();return{height:a.height,width:a.width}};q.Ng=function(){return"hvc"==this.m?yj(this):Cj(this)};
365
365
  function Cj(a){var b={height:null,width:null,gb:null};a=a.bf();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new jj(a.data);var c=rj(a),d=rj(a),e=rj(a);oj(a);if(Dj.includes(c)){var f=V(a);3===f&&lj(a,1);oj(a);oj(a);lj(a,1);if(qj(a)){f=3!==f?8:12;for(var g=0;g<f;g++)qj(a)&&(6>g?sj(a,16):sj(a,64))}}oj(a);f=V(a);if(0===f)V(a);else if(1===f)for(lj(a,1),oj(a),oj(a),f=V(a),g=0;g<f;g++)oj(a);oj(a);lj(a,1);f=V(a);g=V(a);var h=mj(a,1);0===h&&lj(a,1);lj(a,1);var k=0,l=0,m=0,
366
366
  n=0;qj(a)&&(k=V(a),l=V(a),m=V(a),n=V(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.gb="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
367
- function Bj(a){var b={height:null,width:null,gb:null};a=a.bf();if(!a.length)return b;a=a.find(function(y){return 33==y.type});if(!a)return b;var c=new jj(a.fullData,!0);rj(c);rj(c);mj(c,4);var d=mj(c,3);qj(c);var e=mj(c,2),f=mj(c,1),g=mj(c,5),h=mj(c,32);a=rj(c);for(var k=rj(c),l=rj(c),m=rj(c),n=rj(c),p=rj(c),r=rj(c),u=[],w=[],v=0;v<d;v++)u.push(qj(c)),w.push(qj(c));if(0<d)for(v=d;8>v;v++)mj(c,2);for(v=0;v<d;v++)u[v]&&mj(c,88),w[v]&&rj(c);V(c);d=V(c);3==d&&mj(c,1);u=V(c);w=V(c);var A=v=0,z=0,C=0;qj(c)&&
367
+ function yj(a){var b={height:null,width:null,gb:null};a=a.bf();if(!a.length)return b;a=a.find(function(y){return 33==y.type});if(!a)return b;var c=new jj(a.fullData,!0);rj(c);rj(c);mj(c,4);var d=mj(c,3);qj(c);var e=mj(c,2),f=mj(c,1),g=mj(c,5),h=mj(c,32);a=rj(c);for(var k=rj(c),l=rj(c),m=rj(c),n=rj(c),p=rj(c),r=rj(c),u=[],w=[],v=0;v<d;v++)u.push(qj(c)),w.push(qj(c));if(0<d)for(v=d;8>v;v++)mj(c,2);for(v=0;v<d;v++)u[v]&&mj(c,88),w[v]&&rj(c);V(c);d=V(c);3==d&&mj(c,1);u=V(c);w=V(c);var A=v=0,z=0,C=0;qj(c)&&
368
368
  (v+=V(c),A+=V(c),z+=V(c),C+=V(c));b.width=String(u-(v+A)*(1===d||2===d?2:1));b.height=String(w-(z+C)*(1===d?2:1));c=function(y){for(var B=0,D=0;32>D;D++)B|=(y>>D&1)<<31-D;return B>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+r;p&&(e+="."+p.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+="."+
369
369
  a.toString(16).toUpperCase());b.gb=e;return b}function xj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Ej(a){return 0>vj(a)?!1:!0}function vj(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",uj);uj.syncOffset=vj;uj.probe=Ej;uj.prototype.getVideoInfo=uj.prototype.Ng;uj.prototype.getVideoResolution=uj.prototype.Qj;uj.prototype.getVideoNalus=uj.prototype.bf;
370
- uj.prototype.getCodecs=uj.prototype.Wd;uj.prototype.getStartTime=uj.prototype.getStartTime;uj.prototype.getVideoData=uj.prototype.jd;uj.prototype.getAudioData=uj.prototype.rc;uj.prototype.getMetadata=uj.prototype.getMetadata;uj.prototype.parseNalus=uj.prototype.bh;uj.prototype.parseAvcNalus=uj.prototype.pk;uj.prototype.parse=uj.prototype.parse;uj.prototype.clearData=uj.prototype.clearData;uj.Timescale=9E4;var Dj=[100,110,122,244,44,83,86,118,128,138,139,134];function Fj(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Va("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,Ad("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Va("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Va("Could not find LCEVC Library on this page"),
370
+ uj.prototype.getCodecs=uj.prototype.Wd;uj.prototype.getStartTime=uj.prototype.getStartTime;uj.prototype.getVideoData=uj.prototype.kd;uj.prototype.getAudioData=uj.prototype.rc;uj.prototype.getMetadata=uj.prototype.getMetadata;uj.prototype.parseNalus=uj.prototype.bh;uj.prototype.parseAvcNalus=uj.prototype.pk;uj.prototype.parse=uj.prototype.parse;uj.prototype.clearData=uj.prototype.clearData;uj.Timescale=9E4;var Dj=[100,110,122,244,44,83,86,118,128,138,139,134];function Fj(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Va("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,Ad("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Va("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Va("Could not find LCEVC Library on this page"),
371
371
  a=!1):(this.h.SupportObject.SupportStatus||Va(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 Gj(a){a.g&&a.i.classList.add("shaka-hidden")}
372
- Fj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Hj(a,b,c){var d=Ij,e=Jj;switch(b.mimeType){case "video/webm":d=Kj;break;case "video/mp4":d=Lj}switch(c){case "DASH":e=Mj;break;case "HLS":e=Nj}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",Fj);Fj.prototype.release=Fj.prototype.release;var Ij=0,Kj=1,Lj=2,Nj=0,Mj=1,Jj=-1;function Oj(a,b,c,d){var e=this;this.i=a;this.aa=c;this.A=null;this.H=b;this.h={};this.I={};this.Fa={};this.g=null;this.ka=!1;this.W=d||null;this.j={};this.u=new rd;this.s={};this.J=null;this.M=new og;this.O="";this.sa=!1;this.l=Pj(this,this.M);this.G=!1;this.K=new Lg(function(){return Qj(e)});this.C=!1;this.Z="UNKNOWN";this.Ha=this.Ia=!1;this.Aa=new og;this.m=!1;this.xa=!0;this.ra=this.P=this.Ga=this.S=this.L=this.ea=null;this.qa=new og}
373
- function Pj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.u.o(c,"startstreaming",function(){a.xa=!0});a.u.o(c,"endstreaming",function(){a.xa=!1});a.u.ia(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.u.ia(a.i,"playing",function(){a.sa=!0});a.O=Rj(c);a.i.src=a.O;return c}c=new MediaSource;a.u.ia(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.u.ia(a.i,"playing",function(){a.sa=!0});a.O=Rj(c);a.i.src=a.O;return c}
374
- function Sj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g)return a.createSegmentIndex?G(r,a.createSegmentIndex(),2):r.B(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Wc;d=new Set;e=t(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.Ka){if(m=we(h,k),!Pe(m))return r.return(!1)}else if(b==c.ua?k=of(k):b==c.ha&&(k=pf(k,h)),n=
372
+ Fj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Hj(a,b,c){var d=Ij,e=Jj;switch(b.mimeType){case "video/webm":d=Kj;break;case "video/mp4":d=Lj}switch(c){case "DASH":e=Mj;break;case "HLS":e=Nj}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",Fj);Fj.prototype.release=Fj.prototype.release;var Ij=0,Kj=1,Lj=2,Nj=0,Mj=1,Jj=-1;function Oj(a,b,c,d){var e=this;this.i=a;this.aa=c;this.A=null;this.H=b;this.h={};this.I={};this.Fa={};this.g=null;this.ha=!1;this.W=d||null;this.j={};this.u=new rd;this.s={};this.J=null;this.M=new og;this.O="";this.sa=!1;this.l=Pj(this,this.M);this.G=!1;this.K=new Lg(function(){return Qj(e)});this.C=!1;this.Y="UNKNOWN";this.Ha=this.Ia=!1;this.Aa=new og;this.m=!1;this.xa=!0;this.ra=this.P=this.Ga=this.S=this.L=this.ea=null;this.qa=new og}
373
+ function Pj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.u.o(c,"startstreaming",function(){a.xa=!0});a.u.o(c,"endstreaming",function(){a.xa=!1});a.u.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.u.ka(a.i,"playing",function(){a.sa=!0});a.O=Rj(c);a.i.src=a.O;return c}c=new MediaSource;a.u.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.u.ka(a.i,"playing",function(){a.sa=!0});a.O=Rj(c);a.i.src=a.O;return c}
374
+ function Sj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g)return a.createSegmentIndex?G(r,a.createSegmentIndex(),2):r.B(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Wc;d=new Set;e=t(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.Ka){if(m=we(h,k),!Pe(m))return r.return(!1)}else if(b==c.ua?k=of(k):b==c.ia&&(k=pf(k,h)),n=
375
375
  Ae(a,h,k),p=ye(h,k),!wd(n)&&!qe(p))return r.return(!1);return r.return(!0)})}q=Oj.prototype;q.destroy=function(){return this.K.destroy()};
376
376
  function Qj(a){var b,c,d,e,f,g,h,k;return O(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(Xe)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.H&&b.push(a.H.destroy());for(k in a.s)b.push(a.s[k].destroy());return G(l,Promise.all(b),2)}a.u&&(a.u.release(),a.u=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.H=null;a.h={};a.s={};a.J=null;
377
- a.j={};a.W=null;a.L=null;a.aa=null;I(l)})}q.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 O(function(m){switch(m.g){case 1:return f=Wc,G(m,e.M,2);case 2:e.C=b,e.Z=c,e.Ia=d,e.Ha=!e.C&&"HLS"==e.Z&&!e.Ia,e.L=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.B(0);break}k=h.value;l=a.get(k);return G(m,Tj(e,k,l,l.codecs),6);case 6:e.m?(e.j[f.ha]=[],e.j[f.ua]=[]):e.j[k]=[],h=g.next(),m.B(3)}})};
378
- function Tj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w;return O(function(v){switch(v.g){case 1:return e=Wc,f=Na,g=Oa,G(v,Sj(c,b),2);case 2:g.call(f,v.h,"Type negotiation should happen before MediaSourceEngine.init!");h=we(c.mimeType,d);if(b==e.Ka){Uj(a,h,a.C,c.external);v.B(0);break}k=a.A.forceTransmux;if(!wd(h)||!a.C&&xe.includes(h))k=!0;l=ye(c.mimeType,d);if(!k){v.B(4);break}m=Sc(e.ha,(d||"").split(","));n=Sc(e.ua,(d||"").split(","));if(!m||!n){v.B(5);break}a.m=!0;return G(v,Tj(a,e.ha,c,m),6);case 6:return G(v,
377
+ a.j={};a.W=null;a.L=null;a.aa=null;I(l)})}q.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 O(function(m){switch(m.g){case 1:return f=Wc,G(m,e.M,2);case 2:e.C=b,e.Y=c,e.Ia=d,e.Ha=!e.C&&"HLS"==e.Y&&!e.Ia,e.L=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.B(0);break}k=h.value;l=a.get(k);return G(m,Tj(e,k,l,l.codecs),6);case 6:e.m?(e.j[f.ia]=[],e.j[f.ua]=[]):e.j[k]=[],h=g.next(),m.B(3)}})};
378
+ function Tj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w;return O(function(v){switch(v.g){case 1:return e=Wc,f=Na,g=Oa,G(v,Sj(c,b),2);case 2:g.call(f,v.h,"Type negotiation should happen before MediaSourceEngine.init!");h=we(c.mimeType,d);if(b==e.Ka){Uj(a,h,a.C,c.external);v.B(0);break}k=a.A.forceTransmux;if(!wd(h)||!a.C&&xe.includes(h))k=!0;l=ye(c.mimeType,d);if(!k){v.B(4);break}m=Sc(e.ia,(d||"").split(","));n=Sc(e.ua,(d||"").split(","));if(!m||!n){v.B(5);break}a.m=!0;return G(v,Tj(a,e.ia,c,m),6);case 6:return G(v,
379
379
  Tj(a,e.ua,c,n),7);case 7:return v.return();case 5:if(p=qe(l))r=p(),a.s[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Mg(a.K);try{w=a.l.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.l.readyState+" expected 'open'",null);}a.C&&(w.mode=Vj);a.u.o(w,"error",function(){var A=a.j[b][0];A.p.reject(new T(2,3,3014,a.i.error?a.i.error.code:0,A.uri))});a.u.o(w,"updateend",function(){return Wj(a,b)});a.h[b]=w;a.I[b]=h;a.Fa[b]=!!c.drmInfos.length;
380
380
  I(v)}})}q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
381
- function Uj(a,b,c,d){a.g||(a.g=new Oe(a.H),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ka;a=a.Z;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Qe[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Ad("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Ad("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.C=d)}
381
+ function Uj(a,b,c,d){a.g||(a.g=new Oe(a.H),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ha;a=a.Y;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Qe[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Ad("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Ad("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.C=d)}
382
382
  function Xj(a){return a.G?!1:a.l?"ended"==a.l.readyState:!0}function Yj(a,b){a.G||!Object.keys(a.h).length?a=null:b==Uc?a=a.g.g:(a=Zj(a,b),a=!a||Oi(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function ak(a,b){return a.G?null:b==Uc?a.g.h:Pi(Zj(a,b))}function bk(a,b,c){if(a.G)return 0;if(b==Uc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Zj(a,b);return Ri(a,c)}
383
383
  q.Wb=function(){var a={total:this.G?[]:Si(this.i.buffered),audio:this.G?[]:Si(Zj(this,"audio")),video:this.G?[]:Si(Zj(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 Zj(a,b){try{return a.h[b].buffered}catch(c){return null}}
384
- function ck(a,b,c,d,e,f){var g=null,h=Hb(c);if(xe.includes(e))f=Zi(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.aa.onMetadata([{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.ma&&d.ma.timescale){var k=d.ma.timescale;if(!isNaN(k)){var l=0,m=!1;(new Sg).box("moof",Xg).box("traf",Xg).Y("tfdt",function(n){l=
384
+ function ck(a,b,c,d,e,f){var g=null,h=Hb(c);if(xe.includes(e))f=Zi(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.aa.onMetadata([{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.ma&&d.ma.timescale){var k=d.ma.timescale;if(!isNaN(k)){var l=0,m=!1;(new Sg).box("moof",Xg).box("traf",Xg).Z("tfdt",function(n){l=
385
385
  bj(n.reader,n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else if(!e.includes("/mp4")&&!e.includes("/webm")&&Ej(h)&&(a.L?a.L.clearData():a.L=new uj,h=a.L.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length))a.aa.onMetadata(h,f,d?d.endTime:null);return g}
386
- function dk(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,p,r,u,w,v,A,z,C,y,B,D,F;return O(function(J){switch(J.g){case 1:m=Wc;if(b!=m.Ka){J.B(2);break}if(!a.C){J.B(3);break}return G(J,a.Aa,4);case 4:n=J.h,a.g.u=n;case 3:return G(J,Re(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.R()[0]:null),5);case 5:return J.return();case 2:if(l||!a.m){J.B(6);break}return G(J,dk(a,m.ha,c,d,e,f,g,h,k,!0),7);case 7:return G(J,dk(a,m.ua,c,d,e,f,g,h,k,!0),8);case 8:return J.return();
387
- case 6:if(!a.h[b])return J.return();p=a.h[b].timestampOffset;r=a.I[b];a.s[b]&&(r=a.s[b].getOriginalMimeType());d&&(u=ck(a,b,c,d,r,p),null!=u&&(null==a.S&&b==m.ua&&(a.S=u,a.Ga=d.startTime,null!=a.P&&(w=0,a.Ga==a.ra&&(w=a.S-a.P),a.qa.resolve(w))),null==a.P&&b==m.ha&&(a.P=u,a.ra=d.startTime,null!=a.S&&(v=0,a.Ga==a.ra&&(v=a.S-a.P),a.qa.resolve(v))),A=d.startTime-u,z=Math.abs(p-A),(.001<=z||g||h)&&(!k||0<A||!p)&&(p=A,a.Ha&&(ek(a,b,function(){return fk(a,b)},null),ek(a,b,function(){return gk(a,b,p)},null))),
388
- C=b==m.ua||!(m.ua in a.h),a.C&&C&&a.Aa.resolve(p)));f&&b==m.ua&&(a.g||Uj(a,"application/cea-608",a.C,!1),a.J||(y=r.split(";",1)[0],a.J=new Hd(y)),d?(B=a.J.i(c),B.length&&Ve(a.g,B,d.startTime,d.endTime,p)):a.J.init(c,h));if(!a.s[b]){J.B(9);break}return G(J,a.s[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=J.h;case 9:c=hk(a,c,d?d.startTime:null,b,d?d.R()[0]:null);if(!d||!a.C||b==m.Ka){J.B(11);break}if(!g&&!h){J.B(11);break}D=d.startTime;if("HLS"!=a.Z||a.m||b!=m.ha||!a.h[m.ua]){J.B(13);break}return G(J,
389
- a.qa,14);case 14:F=J.h,.1<Math.abs(F)&&(D-=F);case 13:ek(a,b,function(){return fk(a,b)},null),ek(a,b,function(){return gk(a,b,D)},null);case 11:return G(J,ek(a,b,function(){var L=c;if("video"==b&&a.W){var H=a.W;H.g&&H.g.appendBuffer(L,"video",H.s,-p)}a.h[b].appendBuffer(L)},d?d.R()[0]:null),15);case 15:I(J)}})}function ik(a,b){var c=ak(a,"video")||0;Te(a.g,b,c)}function qk(a){a.g&&Te(a.g,"",0)}
390
- q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Wc,a==e.Ka?G(f,d.g.remove(b,c),0):G(f,ek(d,a,function(){return rk(d,a,b,c)},null),4)):d.m?G(f,ek(d,e.ha,function(){return rk(d,e.ha,b,c)},null),0):f.B(0)})};function sk(a,b){var c;return O(function(d){return 1==d.g?(c=Wc,b==c.Ka?a.g?G(d,a.g.remove(0,Infinity),0):d.return():G(d,ek(a,b,function(){return rk(a,b,0,a.l.duration)},null),4)):a.m?G(d,ek(a,c.ha,function(){return rk(a,c.ha,0,a.l.duration)},null),0):d.B(0)})}
391
- q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Wc,a==c.Ka?d.return():G(d,ek(b,a,function(){b.i.currentTime-=.001;Wj(b,a)},null),2)):b.m?G(d,ek(b,c.ha,function(){var e=c.ha;b.i.currentTime-=.001;Wj(b,e)},null),0):d.B(0)})};
392
- function tk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Wc;if(b==l.Ka)return f||(a.g.u=c),Se(a.g,d,e),p.return();m=[];return G(p,uk(a,b,g,h,k),2)}n=p.h;n||(m.push(ek(a,b,function(){return fk(a,b)},null)),a.m&&m.push(ek(a,l.ha,function(){return fk(a,l.ha)},null)));f||(m.push(ek(a,b,function(){return gk(a,b,c)},null)),a.m&&m.push(ek(a,l.ha,function(){return gk(a,l.ha,c)},null)));m.push(ek(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=
393
- d;Wj(a,b)},null));a.m&&m.push(ek(a,l.ha,function(){var r=l.ha;a.h[r].appendWindowStart=0;a.h[r].appendWindowEnd=e;a.h[r].appendWindowStart=d;Wj(a,r)},null));return G(p,Promise.all(m),0)})}
394
- function vk(a,b,c){var d;return O(function(e){if(1==e.g){d=Wc;if(b==d.Ka)return e.return();b==d.ua&&(a.Aa=new og);ek(a,b,function(){return fk(a,b)},null);a.m&&ek(a,d.ha,function(){return fk(a,d.ha)},null);return G(e,ek(a,b,function(){return gk(a,b,c)},null),2)}return a.m?G(e,ek(a,d.ha,function(){return gk(a,d.ha,c)},null),0):e.B(0)})}q.endOfStream=function(a){var b=this;return O(function(c){return G(c,wk(b,function(){Xj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};
386
+ function dk(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,p,r,u,w,v,A,z,C,y,B,D,F;return O(function(J){switch(J.g){case 1:m=Wc;if(b!=m.Ka){J.B(2);break}if(!a.C){J.B(3);break}return G(J,a.Aa,4);case 4:n=J.h,a.g.u=n;case 3:return G(J,Re(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.R()[0]:null),5);case 5:return J.return();case 2:if(l||!a.m){J.B(6);break}return G(J,dk(a,m.ia,c,d,e,f,g,h,k,!0),7);case 7:return G(J,dk(a,m.ua,c,d,e,f,g,h,k,!0),8);case 8:return J.return();
387
+ case 6:if(!a.h[b])return J.return();p=a.h[b].timestampOffset;r=a.I[b];a.s[b]&&(r=a.s[b].getOriginalMimeType());d&&(u=ck(a,b,c,d,r,p),null!=u&&(null==a.S&&b==m.ua&&(a.S=u,a.Ga=d.startTime,null!=a.P&&(w=0,a.Ga==a.ra&&(w=a.S-a.P),a.qa.resolve(w))),null==a.P&&b==m.ia&&(a.P=u,a.ra=d.startTime,null!=a.S&&(v=0,a.Ga==a.ra&&(v=a.S-a.P),a.qa.resolve(v))),A=d.startTime-u,z=Math.abs(p-A),(.001<=z||g||h)&&(!k||0<A||!p)&&(p=A,a.Ha&&(ek(a,b,function(){return fk(a,b)},null),ek(a,b,function(){return gk(a,b,p)},null))),
388
+ C=b==m.ua||!(m.ua in a.h),a.C&&C&&a.Aa.resolve(p)));f&&b==m.ua&&(a.g||Uj(a,"application/cea-608",a.C,!1),a.J||(y=r.split(";",1)[0],a.J=new Hd(y)),d?(B=a.J.i(c),B.length&&Ve(a.g,B,d.startTime,d.endTime,p)):a.J.init(c,h));if(!a.s[b]){J.B(9);break}return G(J,a.s[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=J.h;case 9:c=hk(a,c,d?d.startTime:null,b,d?d.R()[0]:null);if(!d||!a.C||b==m.Ka){J.B(11);break}if(!g&&!h){J.B(11);break}D=d.startTime;if("HLS"!=a.Y||a.m||b!=m.ia||!a.h[m.ua]){J.B(13);break}return G(J,
389
+ a.qa,14);case 14:F=J.h,.1<Math.abs(F)&&(D-=F);case 13:ek(a,b,function(){return fk(a,b)},null),ek(a,b,function(){return gk(a,b,D)},null);case 11:return G(J,ek(a,b,function(){var L=c;if("video"==b&&a.W){var H=a.W;H.g&&H.g.appendBuffer(L,"video",H.s,-p)}a.h[b].appendBuffer(L)},d?d.R()[0]:null),15);case 15:I(J)}})}function ik(a,b){var c=ak(a,"video")||0;Te(a.g,b,c)}function jk(a){a.g&&Te(a.g,"",0)}
390
+ q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Wc,a==e.Ka?G(f,d.g.remove(b,c),0):G(f,ek(d,a,function(){return rk(d,a,b,c)},null),4)):d.m?G(f,ek(d,e.ia,function(){return rk(d,e.ia,b,c)},null),0):f.B(0)})};function sk(a,b){var c;return O(function(d){return 1==d.g?(c=Wc,b==c.Ka?a.g?G(d,a.g.remove(0,Infinity),0):d.return():G(d,ek(a,b,function(){return rk(a,b,0,a.l.duration)},null),4)):a.m?G(d,ek(a,c.ia,function(){return rk(a,c.ia,0,a.l.duration)},null),0):d.B(0)})}
391
+ q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Wc,a==c.Ka?d.return():G(d,ek(b,a,function(){b.i.currentTime-=.001;Wj(b,a)},null),2)):b.m?G(d,ek(b,c.ia,function(){var e=c.ia;b.i.currentTime-=.001;Wj(b,e)},null),0):d.B(0)})};
392
+ function tk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Wc;if(b==l.Ka)return f||(a.g.u=c),Se(a.g,d,e),p.return();m=[];return G(p,uk(a,b,g,h,k),2)}n=p.h;n||(m.push(ek(a,b,function(){return fk(a,b)},null)),a.m&&m.push(ek(a,l.ia,function(){return fk(a,l.ia)},null)));f||(m.push(ek(a,b,function(){return gk(a,b,c)},null)),a.m&&m.push(ek(a,l.ia,function(){return gk(a,l.ia,c)},null)));m.push(ek(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=
393
+ d;Wj(a,b)},null));a.m&&m.push(ek(a,l.ia,function(){var r=l.ia;a.h[r].appendWindowStart=0;a.h[r].appendWindowEnd=e;a.h[r].appendWindowStart=d;Wj(a,r)},null));return G(p,Promise.all(m),0)})}
394
+ function vk(a,b,c){var d;return O(function(e){if(1==e.g){d=Wc;if(b==d.Ka)return e.return();b==d.ua&&(a.Aa=new og);ek(a,b,function(){return fk(a,b)},null);a.m&&ek(a,d.ia,function(){return fk(a,d.ia)},null);return G(e,ek(a,b,function(){return gk(a,b,c)},null),2)}return a.m?G(e,ek(a,d.ia,function(){return gk(a,d.ia,c)},null),0):e.B(0)})}q.endOfStream=function(a){var b=this;return O(function(c){return G(c,wk(b,function(){Xj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};
395
395
  q.vb=function(a){var b=this;return O(function(c){return G(c,wk(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new og,uri:null};b.j[d].unshift(e)}b.l.duration=a;b.ea=a}),0)})};q.getDuration=function(){return this.l.duration};function rk(a,b,c,d){d<=c?Wj(a,b):a.h[b].remove(c,d)}function fk(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;Wj(a,b)}
396
396
  function gk(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Wj(a,b)}function Wj(a,b){if(!a.G){var c=a.j[b][0];c&&(c.p.resolve(),xk(a,b))}}function ek(a,b,c,d){Mg(a.K);c={start:c,p:new og,uri:d};a.j[b].push(c);1==a.j[b].length&&yk(a,b);return c.p}
397
397
  function wk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Mg(a.K);c=[];d={};for(e in a.h)d.Id=new og,f={start:function(m){return function(){return m.Id.resolve()}}(d),p:d.Id,uri:null},a.j[e].push(f),c.push(d.Id),1==a.j[e].length&&f.start(),d={Id:d.Id};ta(l,2);return G(l,Promise.all(c),4);case 4:va(l,3);break;case 2:throw g=wa(l),g;case 3:return ta(l,5,6),G(l,b(),6);case 6:xa(l);for(h in a.h)xk(a,h);ya(l,0);break;case 5:throw k=wa(l),new T(2,3,3015,k,a.i.error||"No error in the media element",
398
398
  null);}})}function xk(a,b){a.j[b].shift();yk(a,b)}function yk(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.i.error||"No error in the media element",c.uri)),xk(a,b)}}function hk(a,b,c,d,e){var f=null==c,g=a.Fa[d];c=a.aa.uj();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Rb(c),f=cc()||ac()||kc()||$b()&&pc()&&c;f&&"mp4"==Ce(a.I[d])&&(b=Ei(b,e));return b}
399
399
  function zk(a,b,c,d){return ek(a,b,function(){b!==Uc&&(yd()&&(a.s[b]&&(a.s[b].destroy(),delete a.s[b]),d&&(a.s[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.I[b]=c),Wj(a,b))},null)}
400
400
  function Ak(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L;return O(function(H){switch(H.g){case 1:c=Wc;a.G=!0;a.m=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.sa&&(a.i.autoplay=!1);ua(H,2);a.u.Za();g=[];for(h in a.s)g.push(a.s[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(Xe)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.p.reject(new T(2,7,7003,void 0));for(u in a.h){w=a.h[u];try{a.l.removeSourceBuffer(w)}catch(E){}}return G(H,
401
- Promise.all(g),4);case 4:return a.s={},a.h={},v=a.l.duration,a.M=new og,a.l=Pj(a,a.M),G(H,a.M,5);case 5:!isNaN(v)&&v?a.l.duration=v:!isNaN(a.ea)&&a.ea&&(a.l.duration=a.ea),A=new og,z=a.l.sourceBuffers,C=b.size,y=0,B=function(){y++;y===C&&(A.resolve(),a.u.Pa(z,"addsourcebuffer",B))},a.u.o(z,"addsourcebuffer",B),D=t(b.keys()),F=D.next();case 6:if(F.done)return a.i.currentTime=d,G(H,A,2);J=F.value;L=b.get(J);return G(H,Tj(a,J,L,L.codecs),9);case 9:a.m?(a.j[c.ha]=[],a.j[c.ua]=[]):a.j[J]=[];F=D.next();
402
- H.B(6);break;case 2:xa(H),a.G=!1,Mg(a.K),a.u.ia(a.i,"canplaythrough",function(){a.K.g||(a.i.autoplay=e,f||a.i.play())}),ya(H,0)}})}function Bk(a,b){return wk(a,function(){return Ak(a,b)})}
403
- function uk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,w,v,A,z,C;return O(function(y){if(1==y.g){f=Wc;if(b==f.Ka)return y.return(!1);g=Je(Me(a.I[b]));h=Le(a.I[b]);l=!1;m=we(c,d);n=a.A.forceTransmux;if(!wd(m)||!a.C&&xe.includes(m))n=!0;n&&(p=ye(c,d),r=qe(p))&&(k=r(),u=Sc(f.ha,(d||"").split(",")),w=Sc(f.ua,(d||"").split(",")),u&&w?(l=!0,v=w,b==f.ha&&(v=u),m=k.convertCodecs(b,ye(c,v))):m=k.convertCodecs(b,p));A=Je(Me(m));z=Le(m);if(g===A&&h===z)return y.return(!1);C=!0;if(a.m||l&&k&&!a.s[b])C=!1;if(C&&"smooth"===
404
- a.A.codecSwitchingStrategy&&yd())return G(y,zk(a,b,m,k),3);k&&k.destroy();return G(y,Bk(a,e),3)}return y.return(!0)})}function Ck(a,b,c,d){if(b==Uc)var e=!1;else{e=Je(Me(a.I[b]));var f=Le(a.I[b]),g=we(c,d),h=a.A.forceTransmux;if(!wd(g)||!a.C&&xe.includes(g))h=!0;c=ye(c,d);h&&(h=qe(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Je(Me(g));g=Le(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!yd()||a.m:!1}var Rj=window.URL.createObjectURL,Vj="sequence";function Dk(a,b,c){this.i=a;this.A=b;this.s=this.j=Infinity;this.g=1;this.h=this.l=null;this.C=0;this.I=!0;this.J=0;this.G=void 0===c?!0:c;this.H=0;this.u=!1;this.m=a}q=Dk.prototype;q.getDuration=function(){return this.j};q.zj=function(){return this.g};q.Ei=function(a){this.i=a};q.vb=function(a){this.j=a};q.Dj=function(){return this.i};q.Ai=function(a){this.C=a};q.Tc=function(a){this.I=a};q.Bf=function(a){this.s=a};q.$e=function(){return this.s};q.nh=function(a){this.A=a};q.qj=function(){return this.A};
401
+ Promise.all(g),4);case 4:return a.s={},a.h={},v=a.l.duration,a.M=new og,a.l=Pj(a,a.M),G(H,a.M,5);case 5:!isNaN(v)&&v?a.l.duration=v:!isNaN(a.ea)&&a.ea&&(a.l.duration=a.ea),A=new og,z=a.l.sourceBuffers,C=b.size,y=0,B=function(){y++;y===C&&(A.resolve(),a.u.Pa(z,"addsourcebuffer",B))},a.u.o(z,"addsourcebuffer",B),D=t(b.keys()),F=D.next();case 6:if(F.done)return a.i.currentTime=d,G(H,A,2);J=F.value;L=b.get(J);return G(H,Tj(a,J,L,L.codecs),9);case 9:a.m?(a.j[c.ia]=[],a.j[c.ua]=[]):a.j[J]=[];F=D.next();
402
+ H.B(6);break;case 2:xa(H),a.G=!1,Mg(a.K),a.u.ka(a.i,"canplaythrough",function(){a.K.g||(a.i.autoplay=e,f||a.i.play())}),ya(H,0)}})}function Bk(a,b){return wk(a,function(){return Ak(a,b)})}
403
+ function uk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,w,v,A,z,C;return O(function(y){if(1==y.g){f=Wc;if(b==f.Ka)return y.return(!1);g=Je(Me(a.I[b]));h=Le(a.I[b]);l=!1;m=we(c,d);n=a.A.forceTransmux;if(!wd(m)||!a.C&&xe.includes(m))n=!0;n&&(p=ye(c,d),r=qe(p))&&(k=r(),u=Sc(f.ia,(d||"").split(",")),w=Sc(f.ua,(d||"").split(",")),u&&w?(l=!0,v=w,b==f.ia&&(v=u),m=k.convertCodecs(b,ye(c,v))):m=k.convertCodecs(b,p));A=Je(Me(m));z=Le(m);if(g===A&&h===z)return y.return(!1);C=!0;if(a.m||l&&k&&!a.s[b])C=!1;if(C&&"smooth"===
404
+ a.A.codecSwitchingStrategy&&yd())return G(y,zk(a,b,m,k),3);k&&k.destroy();return G(y,Bk(a,e),3)}return y.return(!0)})}function Ck(a,b,c,d){if(b==Uc)var e=!1;else{e=Je(Me(a.I[b]));var f=Le(a.I[b]),g=we(c,d),h=a.A.forceTransmux;if(!wd(g)||!a.C&&xe.includes(g))h=!0;c=ye(c,d);h&&(h=qe(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Je(Me(g));g=Le(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!yd()||a.m:!1}var Rj=window.URL.createObjectURL,Vj="sequence";function Dk(a,b,c){this.i=a;this.A=b;this.s=this.j=Infinity;this.g=1;this.h=this.l=null;this.C=0;this.I=!0;this.J=0;this.G=void 0===c?!0:c;this.H=0;this.u=!1;this.m=a}q=Dk.prototype;q.getDuration=function(){return this.j};q.zj=function(){return this.g};q.Ei=function(a){this.i=a};q.vb=function(a){this.j=a};q.Dj=function(){return this.i};q.Ai=function(a){this.C=a};q.Uc=function(a){this.I=a};q.Bf=function(a){this.s=a};q.$e=function(){return this.s};q.nh=function(a){this.A=a};q.qj=function(){return this.A};
405
405
  q.oi=function(a,b){if(0!=a.length){var c=(Date.now()+this.C)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.uf(a[0].start+b);this.g=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.g);this.h=Math.max(this.h,d);null!=this.i&&this.G&&!this.u&&(this.i=c-this.h-this.g)}}};
406
406
  q.le=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.C)/1E3;a=t(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.uf(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.u&&(this.i=d-this.h-this.g)}};q.Aj=function(){return this.h};q.mf=function(){this.u=!0};q.ck=function(){return this.u};q.Ci=function(a){this.m=a};q.tj=function(){return this.m};
407
- q.uf=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.Xg=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.I};q.Mc=function(){return Infinity!=this.j&&!this.I};q.Hb=function(){return Math.max(this.J,this.sc()-this.s)};q.Hi=function(a){this.J=a};
408
- q.sc=function(){return this.U()||this.Mc()?Math.min(Math.max(0,(Date.now()+this.C)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};q.Yd=function(a){var b=Math.max(this.l,this.J);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.sc()-this.s+a,this.Xb()))};q.Ic=function(){return this.Yd(0)};q.Xb=function(){return Math.max(0,this.sc()-(this.U()||this.Mc()?this.A:0))};q.Ni=function(){return null==this.i||null!=this.h&&this.G?!1:!0};
409
- q.zi=function(a){this.H=a};q.ij=function(){return this.H};P("shaka.media.PresentationTimeline",Dk);Dk.prototype.getAvailabilityTimeOffset=Dk.prototype.ij;Dk.prototype.setAvailabilityTimeOffset=Dk.prototype.zi;Dk.prototype.usingPresentationStartTime=Dk.prototype.Ni;Dk.prototype.getSeekRangeEnd=Dk.prototype.Xb;Dk.prototype.getSeekRangeStart=Dk.prototype.Ic;Dk.prototype.getSafeSeekRangeStart=Dk.prototype.Yd;Dk.prototype.getSegmentAvailabilityEnd=Dk.prototype.sc;Dk.prototype.setUserSeekStart=Dk.prototype.Hi;
410
- Dk.prototype.getSegmentAvailabilityStart=Dk.prototype.Hb;Dk.prototype.isInProgress=Dk.prototype.Mc;Dk.prototype.isLive=Dk.prototype.U;Dk.prototype.offset=Dk.prototype.offset;Dk.prototype.notifyMaxSegmentDuration=Dk.prototype.Xg;Dk.prototype.notifyMinSegmentStartTime=Dk.prototype.uf;Dk.prototype.getInitialProgramDateTime=Dk.prototype.tj;Dk.prototype.setInitialProgramDateTime=Dk.prototype.Ci;Dk.prototype.isStartTimeLocked=Dk.prototype.ck;Dk.prototype.lockStartTime=Dk.prototype.mf;
411
- Dk.prototype.getMaxSegmentEndTime=Dk.prototype.Aj;Dk.prototype.notifySegments=Dk.prototype.le;Dk.prototype.notifyTimeRange=Dk.prototype.oi;Dk.prototype.getDelay=Dk.prototype.qj;Dk.prototype.setDelay=Dk.prototype.nh;Dk.prototype.getSegmentAvailabilityDuration=Dk.prototype.$e;Dk.prototype.setSegmentAvailabilityDuration=Dk.prototype.Bf;Dk.prototype.setStatic=Dk.prototype.Tc;Dk.prototype.setClockOffset=Dk.prototype.Ai;Dk.prototype.getPresentationStartTime=Dk.prototype.Dj;Dk.prototype.setDuration=Dk.prototype.vb;
407
+ q.uf=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.Xg=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.I};q.Nc=function(){return Infinity!=this.j&&!this.I};q.Hb=function(){return Math.max(this.J,this.tc()-this.s)};q.Hi=function(a){this.J=a};
408
+ q.tc=function(){return this.U()||this.Nc()?Math.min(Math.max(0,(Date.now()+this.C)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};q.Yd=function(a){var b=Math.max(this.l,this.J);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.tc()-this.s+a,this.Xb()))};q.sc=function(){return this.Yd(0)};q.Xb=function(){return Math.max(0,this.tc()-(this.U()||this.Nc()?this.A:0))};q.Ni=function(){return null==this.i||null!=this.h&&this.G?!1:!0};
409
+ q.zi=function(a){this.H=a};q.ij=function(){return this.H};P("shaka.media.PresentationTimeline",Dk);Dk.prototype.getAvailabilityTimeOffset=Dk.prototype.ij;Dk.prototype.setAvailabilityTimeOffset=Dk.prototype.zi;Dk.prototype.usingPresentationStartTime=Dk.prototype.Ni;Dk.prototype.getSeekRangeEnd=Dk.prototype.Xb;Dk.prototype.getSeekRangeStart=Dk.prototype.sc;Dk.prototype.getSafeSeekRangeStart=Dk.prototype.Yd;Dk.prototype.getSegmentAvailabilityEnd=Dk.prototype.tc;Dk.prototype.setUserSeekStart=Dk.prototype.Hi;
410
+ Dk.prototype.getSegmentAvailabilityStart=Dk.prototype.Hb;Dk.prototype.isInProgress=Dk.prototype.Nc;Dk.prototype.isLive=Dk.prototype.U;Dk.prototype.offset=Dk.prototype.offset;Dk.prototype.notifyMaxSegmentDuration=Dk.prototype.Xg;Dk.prototype.notifyMinSegmentStartTime=Dk.prototype.uf;Dk.prototype.getInitialProgramDateTime=Dk.prototype.tj;Dk.prototype.setInitialProgramDateTime=Dk.prototype.Ci;Dk.prototype.isStartTimeLocked=Dk.prototype.ck;Dk.prototype.lockStartTime=Dk.prototype.mf;
411
+ Dk.prototype.getMaxSegmentEndTime=Dk.prototype.Aj;Dk.prototype.notifySegments=Dk.prototype.le;Dk.prototype.notifyTimeRange=Dk.prototype.oi;Dk.prototype.getDelay=Dk.prototype.qj;Dk.prototype.setDelay=Dk.prototype.nh;Dk.prototype.getSegmentAvailabilityDuration=Dk.prototype.$e;Dk.prototype.setSegmentAvailabilityDuration=Dk.prototype.Bf;Dk.prototype.setStatic=Dk.prototype.Uc;Dk.prototype.setClockOffset=Dk.prototype.Ai;Dk.prototype.getPresentationStartTime=Dk.prototype.Dj;Dk.prototype.setDuration=Dk.prototype.vb;
412
412
  Dk.prototype.setPresentationStartTime=Dk.prototype.Ei;Dk.prototype.getMaxSegmentDuration=Dk.prototype.zj;Dk.prototype.getDuration=Dk.prototype.getDuration;function Ek(a,b,c){this.j=c;this.l=a;this.u=Fk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.A=b;this.i=function(){}}Ek.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function Gk(a,b){a.i=b}function Hk(a){this.g=a}function Fk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Si(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 Ik(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.C=b;this.u=c;this.l=new rd;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.s=!1;this.l.o(a,"waiting",function(){return Jk(f)});this.m=(new Vb(function(){Jk(f)})).wa(this.u.gapJumpTimerTime)}Ik.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.C=this.A=null};Ik.prototype.$g=function(){this.s=!0;Jk(this)};
413
413
  function Jk(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.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=Fk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=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.s++,b.j(new S("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Ti(c,b,a.u.gapDetectionThreshold),
414
- null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||ac())e=Math.ceil(100*(e+.01))/100;e>=a.C.Xb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.A(new S("gapjumped")))}}}};function Kk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Lk.value().get(b),c.ia(a,b,d))}var Lk=new Ob(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Mk(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new rd;this.i=new Nk(a);Kk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ok(e,e.j())})}Mk.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 Pk(a){return a.s?a.g.currentTime:a.j()}
415
- function Qk(a,b){0<a.g.readyState?Rk(a.i,b):Kk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ok(a,a.j())})}function Ok(a,b){.001>Math.abs(a.g.currentTime-b)?Sk(a):(a.h.ia(a.g,"seeking",function(){Sk(a)}),Rk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Sk(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
416
- function Nk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Vb(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Nk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Rk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.wa(.1)};function Tk(a){this.h=a;this.j=!1;this.g=null;this.i=new rd}q=Tk.prototype;q.dg=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.ia(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;Kk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.eg=function(a){this.g=this.j?this.g:a};
414
+ null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||ac())e=Math.ceil(100*(e+.01))/100;e>=a.C.Xb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.A(new S("gapjumped")))}}}};function Kk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Lk.value().get(b),c.ka(a,b,d))}var Lk=new Ob(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Mk(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new rd;this.i=new Nk(a);Kk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ok(e,e.j())})}Mk.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 Pk(a){return a.s?a.g.currentTime:a.j()}
415
+ function Qk(a,b){0<a.g.readyState?Rk(a.i,b):Kk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ok(a,a.j())})}function Ok(a,b){.001>Math.abs(a.g.currentTime-b)?Sk(a):(a.h.ka(a.g,"seeking",function(){Sk(a)}),Rk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Sk(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
416
+ function Nk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Vb(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Nk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Rk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.wa(.1)};function Tk(a){this.h=a;this.j=!1;this.g=null;this.i=new rd}q=Tk.prototype;q.dg=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.ka(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;Kk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.eg=function(a){this.g=this.j?this.g:a};
417
417
  q.Oe=function(){return(this.j?this.h.currentTime:this.g)||0};q.Eh=function(){return 0};q.Dh=function(){return 0};q.ni=function(){};
418
418
  function Uk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.C=b.minBufferTime||0;this.l=c;this.A=e;this.u=null;this.s=Vk(a,c,f);this.j=new Ik(a,b.presentationTimeline,c,this.s,f);this.h=new Mk(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Pk(g.h);h=Wk(g,k);if(.001<Math.abs(h-k)){k=!1;if(!ic()||ic()&&qc())k=!0;else{var l=Date.now()/1E3;if(!g.u||g.u<l-1)g.u=l,k=!0}if(k){Qk(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)},
419
- function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Ic():g.g.Xb():0>h&&(h=g.g.Xb()+h);return Xk(g,Yk(g,h))});this.m=new Vb(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Pk(g.h),k=g.g.Ic(),l=g.g.Xb();3>l-k&&(k=l-3);h<k&&(h=Wk(g,h),g.i.currentTime=h)}})}q=Uk.prototype;q.dg=function(){this.m.wa(.25)};q.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(){}};
419
+ function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.sc():g.g.Xb():0>h&&(h=g.g.Xb()+h);return Xk(g,Yk(g,h))});this.m=new Vb(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Pk(g.h),k=g.g.sc(),l=g.g.Xb();3>l-k&&(k=l-3);h<k&&(h=Wk(g,h),g.i.currentTime=h)}})}q=Uk.prototype;q.dg=function(){this.m.wa(.25)};q.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(){}};
420
420
  q.eg=function(a){Qk(this.h,a)};q.Oe=function(){var a=Pk(this.h);return 0<this.i.readyState&&!this.i.paused?Yk(this,a):a};q.Eh=function(){return this.s?this.s.s:0};q.Dh=function(){return this.j.G};q.ni=function(){this.j.$g()};function Xk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
421
- function Wk(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Ic(),f=a.g.Xb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Yd(c),k=a.g.Yd(d);c=a.g.Yd(c+d);return b>=g?Xk(a,b):b>f?f:b<e?Qi(a.i.buffered,k)?k:c:b>=h||Qi(a.i.buffered,b)?b:c}function Yk(a,b){var c=a.g.Ic();if(b<c)return c;a=a.g.Xb();return b>a?a:b}
421
+ function Wk(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.sc(),f=a.g.Xb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Yd(c),k=a.g.Yd(d);c=a.g.Yd(c+d);return b>=g?Xk(a,b):b>f?f:b<e?Qi(a.i.buffered,k)?k:c:b>=h||Qi(a.i.buffered,b)?b:c}function Yk(a,b){var c=a.g.sc();if(b<c)return c;a=a.g.Xb();return b>a?a:b}
422
422
  function Vk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Ek(new Hk(a),b.stallThreshold,c);Gk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Zk(a){this.T=a;this.l=null;this.i=0;this.m=!1}q=Zk.prototype;q.getNumReferences=function(){return this.T.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.m||(this.T=[],this.l&&this.l.stop(),this.l=null)};q.jk=function(){this.m=!0};q.qc=function(a){for(var b=t(this.T),c=b.next();!c.done;c=b.next())a(c.value)};
423
423
  q.find=function(a){for(var b=this.T.length-1,c=b;0<=c;--c){var d=this.T[c],e=c<b?this.T[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.T.length&&a<this.T[0].startTime?this.i:null};q.get=function(a){if(0==this.T.length)return null;a-=this.i;return 0>a||a>=this.T.length?null:this.T[a]};q.offset=function(a){if(!this.m)for(var b=t(this.T),c=b.next();!c.done;c=b.next())c.value.offset(a)};
424
424
  q.qf=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.T=this.T.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.T.push.apply(this.T,x(a))}};q.je=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.T.length||d.endTime>c.T[0].startTime)});this.qf(a);this.hb(b)};q.hb=function(a){if(!this.m){var b=this.T.length;this.T=this.T.filter(function(c){return c.endTime>a});this.i+=b-this.T.length}};
425
- q.dd=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.T.length;)if(this.T[this.T.length-1].startTime>=b)this.T.pop();else break;for(;this.T.length;)if(this.T[0].endTime<=a)this.T.shift(),c||this.i++;else break;0!=this.T.length&&(a=this.T[this.T.length-1],b=new Ki(a.startTime,b,a.G,a.$a,a.Ja,a.ma,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.T[this.T.length-1]=b)}};
425
+ q.ed=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.T.length;)if(this.T[this.T.length-1].startTime>=b)this.T.pop();else break;for(;this.T.length;)if(this.T[0].endTime<=a)this.T.shift(),c||this.i++;else break;0!=this.T.length&&(a=this.T[this.T.length-1],b=new Ki(a.startTime,b,a.G,a.$a,a.Ja,a.ma,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.T[this.T.length-1]=b)}};
426
426
  q.Ff=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Vb(function(){var d=b();d?c.T.push.apply(c.T,x(d)):(c.l.stop(),c.l=null)}),this.l.wa(a))};Zk.prototype[Symbol.iterator]=function(){return this.dc(0)};
427
427
  Zk.prototype.dc=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;var e=this.get(d);c?d++:d--;var 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}c?d--:d++;f=g-1;break}}return new $k(this,d,f,c)};function al(a,b,c){a=new Ki(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Zk([a])}
428
- P("shaka.media.SegmentIndex",Zk);Zk.forSingleSegment=al;Zk.prototype.getIteratorForTime=Zk.prototype.dc;Zk.prototype.updateEvery=Zk.prototype.Ff;Zk.prototype.fit=Zk.prototype.dd;Zk.prototype.evict=Zk.prototype.hb;Zk.prototype.mergeAndEvict=Zk.prototype.je;Zk.prototype.offset=Zk.prototype.offset;Zk.prototype.get=Zk.prototype.get;Zk.prototype.find=Zk.prototype.find;Zk.prototype.markImmutable=Zk.prototype.jk;Zk.prototype.release=Zk.prototype.release;Zk.prototype.getNumEvicted=Zk.prototype.getNumEvicted;
428
+ P("shaka.media.SegmentIndex",Zk);Zk.forSingleSegment=al;Zk.prototype.getIteratorForTime=Zk.prototype.dc;Zk.prototype.updateEvery=Zk.prototype.Ff;Zk.prototype.fit=Zk.prototype.ed;Zk.prototype.evict=Zk.prototype.hb;Zk.prototype.mergeAndEvict=Zk.prototype.je;Zk.prototype.offset=Zk.prototype.offset;Zk.prototype.get=Zk.prototype.get;Zk.prototype.find=Zk.prototype.find;Zk.prototype.markImmutable=Zk.prototype.jk;Zk.prototype.release=Zk.prototype.release;Zk.prototype.getNumEvicted=Zk.prototype.getNumEvicted;
429
429
  Zk.prototype.getNumReferences=Zk.prototype.getNumReferences;function $k(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}$k.prototype.xd=function(a){this.reverse=a};$k.prototype.dj=function(){return this.h};$k.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.s&&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};
430
430
  $k.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.s&&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",$k);$k.prototype.next=$k.prototype.next;$k.prototype.current=$k.prototype.current;$k.prototype.currentPosition=$k.prototype.dj;
431
431
  $k.prototype.setReverse=$k.prototype.xd;function bl(){Zk.call(this,[]);this.g=[]}pa(bl,Zk);q=bl.prototype;q.clone=function(){var a=new bl;a.g=this.g.slice();return a};q.release=function(){for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};q.qc=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.qc(a)};q.find=function(a){for(var b=0,c=t(this.g),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};
432
- q.get=function(a){for(var b=0,c=t(this.g),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};q.offset=function(){};q.qf=function(){};q.hb=function(){};q.je=function(){};q.dd=function(){};q.Ff=function(){};P("shaka.media.MetaSegmentIndex",bl);bl.prototype.updateEvery=bl.prototype.Ff;bl.prototype.fit=bl.prototype.dd;bl.prototype.mergeAndEvict=bl.prototype.je;bl.prototype.evict=bl.prototype.hb;bl.prototype.merge=bl.prototype.qf;
433
- bl.prototype.offset=bl.prototype.offset;bl.prototype.get=bl.prototype.get;bl.prototype.find=bl.prototype.find;bl.prototype.forEachTopLevelReference=bl.prototype.qc;bl.prototype.release=bl.prototype.release;function cl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ze();this.h=new Vb(function(){b.g.mi(.25*b.i)})}cl.prototype.release=function(){this.set(this.Hc());this.h&&(this.h.stop(),this.h=null);this.g=null};cl.prototype.set=function(a){this.i=a;dl(this)};cl.prototype.Hc=function(){return this.g.Hc()};function dl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ze()!=b&&a.g.rh(b);return}catch(c){}a.h.wa(.25);0!=a.g.Ze()&&a.g.rh(0)};function el(a){var b=this;this.h=a;this.g=new Set;this.i=(new Vb(function(){fl(b,!1)})).wa(.25)}el.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function fl(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function gl(){this.g=null;this.h=[]}function hl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(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 il(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 jl(){this.i=this.h=null;this.g=[]}function kl(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 ll(){this.Pe=this.ii=this.A=this.C=this.K=this.G=this.u=this.j=this.J=this.m=this.i=this.S=this.W=this.M=this.O=this.P=this.l=this.s=NaN;this.L=0;this.H=this.I=NaN;this.g=new gl;this.h=new jl};function ml(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.s=d}function nl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
434
- function ol(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.dc(b,!0,a.s)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.Ja&&(c=!1);2==b.tc()&&(c=!1);c&&b.ma&&pl(a,b.ma);c&&!a.h.has(b)&&(c=new ql(a.l),rl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.oe&&b.kf)break}sl(a)}}function pl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Ji(d,b)})){var c=new ql(a.l);rl(c,b,a.i);a.j.set(b,c)}}
432
+ q.get=function(a){for(var b=0,c=t(this.g),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};q.offset=function(){};q.qf=function(){};q.hb=function(){};q.je=function(){};q.ed=function(){};q.Ff=function(){};P("shaka.media.MetaSegmentIndex",bl);bl.prototype.updateEvery=bl.prototype.Ff;bl.prototype.fit=bl.prototype.ed;bl.prototype.mergeAndEvict=bl.prototype.je;bl.prototype.evict=bl.prototype.hb;bl.prototype.merge=bl.prototype.qf;
433
+ bl.prototype.offset=bl.prototype.offset;bl.prototype.get=bl.prototype.get;bl.prototype.find=bl.prototype.find;bl.prototype.forEachTopLevelReference=bl.prototype.qc;bl.prototype.release=bl.prototype.release;function cl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ze();this.h=new Vb(function(){b.g.mi(.25*b.i)})}cl.prototype.release=function(){this.set(this.Jc());this.h&&(this.h.stop(),this.h=null);this.g=null};cl.prototype.set=function(a){this.i=a;dl(this)};cl.prototype.Jc=function(){return this.g.Jc()};function dl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ze()!=b&&a.g.rh(b);return}catch(c){}a.h.wa(.25);0!=a.g.Ze()&&a.g.rh(0)};function el(a){var b=this;this.h=a;this.g=new Set;this.i=(new Vb(function(){fl(b,!1)})).wa(.25)}el.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function fl(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function gl(){this.g=null;this.h=[]}function hl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(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 il(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 jl(){this.i=this.h=null;this.g=[]}function kl(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 ll(){this.Pe=this.ii=this.A=this.C=this.K=this.G=this.u=this.j=this.J=this.m=this.i=this.S=this.W=this.M=this.O=this.P=this.l=this.s=NaN;this.L=0;this.H=this.I=NaN;this.g=new gl;this.h=new jl};function ml(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.s=d}function nl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
434
+ function ol(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.dc(b,!0,a.s)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.Ja&&(c=!1);2==b.uc()&&(c=!1);c&&b.ma&&pl(a,b.ma);c&&!a.h.has(b)&&(c=new ql(a.l),rl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.oe&&b.kf)break}sl(a)}}function pl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Ji(d,b)})){var c=new ql(a.l);rl(c,b,a.i);a.j.set(b,c)}}
435
435
  function tl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&ul(a,c)}function vl(a){tl(a,a.h);tl(a,a.j);a.g=null}ml.prototype.hb=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&ul(this,d);b&&sl(this)};ml.prototype.xd=function(a){this.s=a;this.g&&this.g.xd(a)};
436
436
  function sl(a){for(var b=Array.from(a.h.keys()),c={},d=t(a.j.keys()),e=d.next();!e.done;c={Ee:c.Ee},e=d.next())c.Ee=e.value,b.some(function(f){return function(g){return Ji(g.ma,f.Ee)}}(c))||ul(a,c.Ee)}function wl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&ul(a,d)}sl(a)}function xl(a,b){b&&b!==a.i&&(vl(a),a.i=b)}function ul(a,b){var c=a.h;b instanceof Ii&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function ql(a){this.g=a;this.wf=this.vh=null}
437
- function rl(a,b,c){var d=new Uint8Array(0);a.wf=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Nc(d,e):d=e,a.vh?G(f,a.vh(d),3):f.B(0);d=new Uint8Array(0);I(f)})})}ql.prototype.abort=function(){this.wf&&this.wf.abort()};function yl(a){gb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Vb(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).wa(2)}pa(yl,gb);yl.prototype.release=function(){this.g.clear();this.h.stop();gb.prototype.release.call(this)};function zl(a){gb.call(this);this.g=new Map;this.h=a}pa(zl,gb);zl.prototype.release=function(){this.g.clear();gb.prototype.release.call(this)};function Al(a,b){var c=a.g.get(b);c||(c={re:[],pg:null,contentType:b},a.g.set(b,c));return c}function Bl(a,b,c){var d=Al(a,b.contentType);Cl(a,d);a={nd:b,position:c};d=d.re;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
438
- zl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.pg;a:{var e=c.re;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.nd;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
437
+ function rl(a,b,c){var d=new Uint8Array(0);a.wf=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Nc(d,e):d=e,a.vh?G(f,a.vh(d),3):f.B(0);d=new Uint8Array(0);I(f)})})}ql.prototype.abort=function(){this.wf&&this.wf.abort()};function yl(a){gb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Vb(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).wa(2)}pa(yl,gb);yl.prototype.release=function(){this.g.clear();this.h.stop();gb.prototype.release.call(this)};function zl(a){gb.call(this);this.g=new Map;this.h=a}pa(zl,gb);zl.prototype.release=function(){this.g.clear();gb.prototype.release.call(this)};function Al(a,b){var c=a.g.get(b);c||(c={re:[],pg:null,contentType:b},a.g.set(b,c));return c}function Bl(a,b,c){var d=Al(a,b.contentType);Cl(a,d);a={od:b,position:c};d=d.re;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
438
+ zl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.pg;a:{var e=c.re;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.od;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
439
439
  g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Rd(d.roles,e.roles);(g||h||d)&&Dl(this,a,e.contentType)&&(c.pg=e,d=new S("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Dl(this,a,e.contentType)&&(c.pg=e,JSON.stringify(e),c=new S("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
440
440
  function Dl(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Cl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.re;b.re=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.re=[]}
441
441
  function El(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
442
442
  a.language);return b};function Fl(a){var b=Le(a),c=b.split("/")[0];a=Me(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,ze:null,colorGamut:null}}
443
443
  function Gl(a,b){function c(y){v=y.name;var B=y.reader;B.skip(24);var D=B.za(),F=B.za();B.skip(50);n=String(D);m=String(F);y.reader.Ea()&&Xg(y)}function d(y){var B=ej(y.reader);p=B.channelCount;r=B.sampleRate;e(y.name)}function e(y){y=y.toLowerCase();switch(y){case "avc1":case "avc3":g.push(y+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(y+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(y+".05.04");k=!0;break;case "vp09":g.push(y+".00.10.08");k=!0;break;case "av01":g.push(y+".0.01M.08");
444
- k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(y),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,r=null,u=null,w=null,v;(new Sg).box("moov",Xg).box("trak",Xg).box("mdia",Xg).Y("mdhd",function(y){l=cj(y.reader,y.version).language}).box("minf",Xg).box("stbl",Xg).Y("stsd",Zg).box("mp4a",function(y){var B=ej(y.reader);p=B.channelCount;r=B.sampleRate;y.reader.Ea()?Xg(y):e(y.name)}).box("esds",function(y){y=y.reader;for(var B=
444
+ k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(y),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,r=null,u=null,w=null,v;(new Sg).box("moov",Xg).box("trak",Xg).box("mdia",Xg).Z("mdhd",function(y){l=cj(y.reader,y.version).language}).box("minf",Xg).box("stbl",Xg).Z("stsd",Zg).box("mp4a",function(y){var B=ej(y.reader);p=B.channelCount;r=B.sampleRate;y.reader.Ea()?Xg(y):e(y.name)}).box("esds",function(y){y=y.reader;for(var B=
445
445
  "mp4a",D,F;y.Ea();){D=y.$();for(var J=y.$();J&128;)J=y.$();if(3==D)y.za(),J=y.$(),J&128&&y.za(),J&64&&y.skip(y.$()),J&32&&y.za();else if(4==D)F=y.$(),y.skip(12);else if(5==D)break}F&&(B+="."+hj(F),5==D&&y.Ea()&&(D=y.$(),F=(D&248)>>3,31===F&&y.Ea()&&(F=32+((D&7)<<3)+((y.$()&224)>>5)),B+="."+F));f.push(B);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",
446
446
  c).box("av01",c).box("avcC",function(y){var B=v||"";switch(v){case "dvav":B="avc3";break;case "dva1":B="avc1"}y=y.reader;y.skip(1);y=B+"."+hj(y.$())+hj(y.$())+hj(y.$());g.push(y);k=!0}).box("hvcC",function(y){var B=v||"";switch(v){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var D=y.reader;D.skip(1);y=D.$();var F=["","A","B","C"][y>>6],J=y&31,L=D.V(),H=(y&32)>>5?"H":"L";y=[D.$(),D.$(),D.$(),D.$(),D.$(),D.$()];D=D.$();for(var E=0,K=0;32>K;K++){E|=L&1;if(31==K)break;E<<=1;L>>=1}B=B+("."+F+J)+("."+
447
447
  hj(E,!0));B+="."+H+D;F="";for(J=y.length;J--;)if((H=y[J])||F)F="."+H.toString(16).toUpperCase()+F;B+=F;g.push(B);k=!0}).box("dvcC",function(y){var B=v||"";switch(v){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var D=y.reader;D.skip(2);y=D.$();D=D.$();g.push(B+"."+ij(y>>1&127)+"."+ij(y<<5&32|D>>3&31));k=!0}).box("dvvC",function(y){var B=v||"";switch(v){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B=
448
- "dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var D=y.reader;D.skip(2);y=D.$();D=D.$();g.push(B+"."+ij(y>>1&127)+"."+ij(y<<5&32|D>>3&31));k=!0}).Y("vpcC",function(y){var B=v||"",D=y.reader;y=D.$();var F=D.$();D=D.$()>>4&15;g.push(B+"."+ij(y)+"."+ij(F)+"."+ij(D));k=!0}).box("av1C",function(y){var B=v||"";switch(v){case "dav1":B="av01"}var D=y.reader;D.skip(1);y=D.$();D=D.$();var F=y>>>5,J=(D&64)>>6;g.push(B+"."+F+"."+ij(y&31)+(D>>>7?"H":"M")+"."+ij(2===F&&J?(D&32)>>5?12:10:J?10:8)+"."+
448
+ "dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var D=y.reader;D.skip(2);y=D.$();D=D.$();g.push(B+"."+ij(y>>1&127)+"."+ij(y<<5&32|D>>3&31));k=!0}).Z("vpcC",function(y){var B=v||"",D=y.reader;y=D.$();var F=D.$();D=D.$()>>4&15;g.push(B+"."+ij(y)+"."+ij(F)+"."+ij(D));k=!0}).box("av1C",function(y){var B=v||"";switch(v){case "dav1":B="av01"}var D=y.reader;D.skip(1);y=D.$();D=D.$();var F=y>>>5,J=(D&64)>>6;g.push(B+"."+F+"."+ij(y&31)+(D>>>7?"H":"M")+"."+ij(2===F&&J?(D&32)>>5?12:10:J?10:8)+"."+
449
449
  ((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+ij(1)+"."+ij(1)+"."+ij(1)+".0");k=!0}).box("enca",ah).box("encv",$g).box("sinf",Xg).box("frma",function(y){y=fj(y.reader).gb;e(y)}).box("colr",function(y){g=g.map(function(F){if(F.startsWith("av01.")){var J=y.reader,L=J.La(),H=J.Rb(4);var E=String.fromCharCode(H[0]);E+=String.fromCharCode(H[1]);E+=String.fromCharCode(H[2]);E+=String.fromCharCode(H[3]);if("nclx"===E){H=J.za();E=J.za();var K=J.za(),M=J.$()>>7,N=F.split(".");10==N.length&&(N[6]=ij(H),N[7]=
450
450
  ij(E),N[8]=ij(K),N[9]=String(M),F=N.join("."))}J.seek(L)}return F});var B=gj(y.reader),D=B.colorGamut;u=B.ze;w=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,z=new Map;if(k){var C=new Hd("video/mp4");a&&C.init(a);C.i(b);a=t(C.j());for(b=a.next();!b.done;b=a.next())b=b.value,z.set(b,b);C.g()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:Hl(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:z,ze:u,colorGamut:w}}
451
451
  function Hl(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Je(d);b.has(e)||(c.push(d),b.add(e))}b=Vc("audio",c);d=Vc("video",c);a=Vc(Uc,c);d=Il(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}function Il(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?wd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
452
- function Jl(a){var b=null;(new Sg).box("moov",Xg).box("trak",Xg).box("mdia",Xg).box("minf",Xg).box("stbl",Xg).Y("stsd",Zg).box("encv",$g).box("enca",ah).box("sinf",Xg).box("schi",Xg).Y("tenc",function(c){c=c.reader;c.$();c.$();c.$();c.$();b=Mc(c.Rb(16))}).parse(a,!0);return b}
452
+ function Jl(a){var b=null;(new Sg).box("moov",Xg).box("trak",Xg).box("mdia",Xg).box("minf",Xg).box("stbl",Xg).Z("stsd",Zg).box("encv",$g).box("enca",ah).box("sinf",Xg).box("schi",Xg).Z("tenc",function(c){c=c.reader;c.$();c.$();c.$();c.$();b=Mc(c.Rb(16))}).parse(a,!0);return b}
453
453
  function Kl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.B(2):G(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Hb(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))})};function Ll(a,b,c,d,e){a=Dg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Ml(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.C=1;this.u=this.j=null;this.J=0;this.H=!1;this.i=new Map;this.G=!1;this.K=null;this.A=!1;this.m=new Lg(function(){return Nl(c)});this.L=Date.now()/1E3;this.s=new Map;this.I={projection:null,hfov:null};this.O=0;this.M=Infinity}q=Ml.prototype;q.destroy=function(){return this.m.destroy()};
454
454
  function Nl(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Ol(e),b.push(Pl(e)),e.ba&&(vl(e.ba),e.ba=null);f=t(a.s.values());for(g=f.next();!g.done;g=f.next())h=g.value,vl(h);return G(k,Promise.all(b),2)}a.i.clear();a.s.clear();a.g=null;a.l=null;a.h=null;I(k)})}
455
455
  q.configure=function(a){this.h=a;this.K=new lg({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.ba&&(vl(b.ba),b.ba=null);b=t(this.s.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,vl(this.s.get(c)),this.s.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Uc))&&
456
456
  b.ba&&(vl(b.ba),b.ba=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ba&&(vl(b.ba),b.ba=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.ba?(wl(c.ba,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(vl(c.ba),c.ba=null)):0<a.segmentPrefetchLimit&&(c.ba=Ql(this,c.stream));a.disableAudioPrefetch||Rl(this)};function Sl(a,b,c){a.l.presentationTimeline.U()||(a.O=b,a.M=c)}
457
457
  q.start=function(a){var b=this;return O(function(c){if(1==c.g)return G(c,Tl(b,a||new Map),2);Mg(b.m);b.G=!0;I(c)})};function Ul(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Wc,a.J++,d=a.J,ta(l,2),G(l,sk(a.g.oa,c.Ka),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=we(b.mimeType,b.codecs),Uj(a.g.oa,f,a.l.sequenceMode,b.external),g=a.g.oa.H,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.J==d&&(k=Vl(a,b),a.i.set(c.Ka,k),Wl(a,k,0)),I(l)}})}
458
- function Xl(a){var b=a.i.get(Uc);b&&(Ol(b),Pl(b).catch(function(){}),a.i.delete(Uc));a.u=null}function Yl(a,b){for(var c=0>a.g.Ua(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.va&&e.va.xd(c),e.ba&&e.ba.xd(c);d=t(a.s.values());for(e=d.next();!e.done;e=d.next())e.value.xd(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Sc&&(Zl(a,b,!1,0,!1),c.Sc=d);else if(b=c.Sc)c.Sc=null,Zl(a,b,!0,0,!1)}
458
+ function Xl(a){var b=a.i.get(Uc);b&&(Ol(b),Pl(b).catch(function(){}),a.i.delete(Uc));a.u=null}function Yl(a,b){for(var c=0>a.g.Ua(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.va&&e.va.xd(c),e.ba&&e.ba.xd(c);d=t(a.s.values());for(e=d.next();!e.done;e=d.next())e.value.xd(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Tc&&(Zl(a,b,!1,0,!1),c.Tc=d);else if(b=c.Tc)c.Tc=null,Zl(a,b,!0,0,!1)}
459
459
  function $l(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.G&&(b.video&&Zl(a,b.video,c,d,e,f),b.audio&&Zl(a,b.audio,c,d,e,f))}function am(a,b){O(function(c){if(1==c.g)return a.u=b,a.G?b.segmentIndex?c.B(2):G(c,b.createSegmentIndex(),2):c.return();Zl(a,b,!0,0,!1);I(c)})}
460
- function Zl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Uc?g&&(g.Sc&&(b.trickModeVideo?(g.Sc=b,b=b.trickModeVideo):g.Sc=null),g.stream!=b||e)&&(a.s.has(b)?g.ba=a.s.get(b):g.ba&&xl(g.ba,b),b.type==Uc&&(e=we(b.mimeType,b.codecs),Uj(a.g.oa,e,a.l.sequenceMode,b.external)),a.s.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.va=null,g.Gh=!!f,c?g.Sd?g.If=!0:g.ib?(g.zc=!0,g.Te=d,g.If=!0):(Ol(g),bm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.ib||g.Tb||Wl(a,
460
+ function Zl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Uc?g&&(g.Tc&&(b.trickModeVideo?(g.Tc=b,b=b.trickModeVideo):g.Tc=null),g.stream!=b||e)&&(a.s.has(b)?g.ba=a.s.get(b):g.ba&&xl(g.ba,b),b.type==Uc&&(e=we(b.mimeType,b.codecs),Uj(a.g.oa,e,a.l.sequenceMode,b.external)),a.s.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.va=null,g.Gh=!!f,c?g.Sd?g.If=!0:g.ib?(g.Bc=!0,g.Te=d,g.If=!0):(Ol(g),bm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.ib||g.Tb||Wl(a,
461
461
  g,0),cm(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Ul(a,b)}
462
462
  function cm(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.Cb)return e.return();c=b.stream;d=b.Cb;return c.segmentIndex?e.B(2):G(e,c.createSegmentIndex(),2)}if(b.Cb!=d||b.stream!=c)return e.return();var f=a.g.Ye();var g=ak(a.g.oa,b.type),h=b.stream.segmentIndex.find(b.rb?b.rb.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ja?k.Ja-k.$a:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ma)&&(h+=(k.Ja?k.Ja-k.$a:null)||0),k=a.g.getBandwidthEstimate(),
463
463
  f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.Cb.h.g>h?!0:!1):f=!1;f&&b.Cb.abort();I(e)})}
464
464
  q.ve=function(){if(this.g)for(var a=this.g.Ye(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.oa;e.G?e=!1:d==Uc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Zj(e,d),e=Qi(e,a));if(!e){c.ba&&(c.ba.g=null);if("audio"===c.type){e=t(this.s.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.va=null;(null!=ak(this.g.oa,d)||c.ib)&&dm(this,c);c.Cb&&(c.Cb.abort(),c.Cb=null);d===Uc&&(d=this.g.oa,d.J&&d.J.g());c.ve=!0}}};
465
- function dm(a,b){b.Sd||b.zc||(b.ib?(b.zc=!0,b.Te=0):null==Yj(a.g.oa,b.type)?null==b.Tb&&Wl(a,b,0):(Ol(b),bm(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
466
- function Tl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Wc;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.ha,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ua,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Ka,a.u),e.add(a.u));f=a.g.oa;return G(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Mg(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=Vl(a,l),b.has(l.id)&&(n=
467
- b.get(l.id),nl(n,function(r,u,w){return em(r,u,w||null,a.h.retryParameters,a.g.hc)}),m.ba=n),a.i.set(k,m),Wl(a,m,0));I(p)})}function Vl(a,b){return{stream:b,type:b.type,va:null,ba:Ql(a,b),rb:null,md:null,lf:null,jf:null,hf:null,Sc:null,endOfStream:!1,ib:!1,Tb:null,zc:!1,Te:0,If:!1,Sd:!1,ve:!0,fh:!1,ae:!1,Cb:null}}
465
+ function dm(a,b){b.Sd||b.Bc||(b.ib?(b.Bc=!0,b.Te=0):null==Yj(a.g.oa,b.type)?null==b.Tb&&Wl(a,b,0):(Ol(b),bm(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
466
+ function Tl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Wc;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.ia,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ua,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Ka,a.u),e.add(a.u));f=a.g.oa;return G(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Mg(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=Vl(a,l),b.has(l.id)&&(n=
467
+ b.get(l.id),nl(n,function(r,u,w){return em(r,u,w||null,a.h.retryParameters,a.g.hc)}),m.ba=n),a.i.set(k,m),Wl(a,m,0));I(p)})}function Vl(a,b){return{stream:b,type:b.type,va:null,ba:Ql(a,b),rb:null,nd:null,lf:null,jf:null,hf:null,Tc:null,endOfStream:!1,ib:!1,Tb:null,Bc:!1,Te:0,If:!1,Sd:!1,ve:!0,fh:!1,ae:!1,Cb:null}}
468
468
  function Ql(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Uc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Uc&&a.h.disableTextPrefetch)return null;if(a.s.has(b))return a.s.get(b);var c=a.i.get(b.type);return(c=c&&c.ba)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new ml(a.h.segmentPrefetchLimit,b,function(d,e,f){return em(d,e,f||null,a.h.retryParameters,a.g.hc)},0>a.g.Ua()):null}
469
469
  function Rl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.l.variants),f=e.next();!f.done;d={jb:d.jb},f=e.next())if(d.jb=f.value,d.jb.audio)if(a.s.has(d.jb.audio)){if(f=a.s.get(d.jb.audio),wl(f,b),!(0<b&&c.some(function(h){return function(k){return $c(h.jb.audio.language,k)}}(d)))){var g=a.i.get(d.jb.audio.type);f!==(g&&g.ba)&&vl(f);a.s.delete(d.jb.audio)}}else 0>=b||!c.some(function(h){return function(k){return $c(h.jb.audio.language,k)}}(d))||!(f=Ql(a,d.jb.audio))||
470
470
  (d.jb.audio.segmentIndex||d.jb.audio.createSegmentIndex(),a.s.set(d.jb.audio,f))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.oa.vb(a):this.g.oa.vb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
471
- function fm(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Mg(a.m);if(b.ib||null==b.Tb||b.Sd)return k.return();b.Tb=null;if(!b.zc){k.B(2);break}return G(k,bm(a,b,b.If,b.Te),3);case 3:return k.return();case 2:if(b.stream.segmentIndex){k.B(4);break}c=b.stream;ta(k,5);return G(k,b.stream.createSegmentIndex(),7);case 7:va(k,6);break;case 5:return d=wa(k),G(k,gm(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ib||b.Tb||Wl(a,b,0),
471
+ function fm(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Mg(a.m);if(b.ib||null==b.Tb||b.Sd)return k.return();b.Tb=null;if(!b.Bc){k.B(2);break}return G(k,bm(a,b,b.If,b.Te),3);case 3:return k.return();case 2:if(b.stream.segmentIndex){k.B(4);break}c=b.stream;ta(k,5);return G(k,b.stream.createSegmentIndex(),7);case 7:va(k,6);break;case 5:return d=wa(k),G(k,gm(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ib||b.Tb||Wl(a,b,0),
472
472
  k.return();case 4:ta(k,9);e=hm(a,b);null!=e&&(Wl(a,b,e),b.ae=!1);va(k,10);break;case 9:return f=wa(k),G(k,gm(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.G||!g.every(function(l){return l.endOfStream})){k.B(0);break}return G(k,a.g.oa.endOfStream(),13);case 13:Mg(a.m),h=a.g.oa.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.vb(h),I(k)}})}
473
- function hm(a,b){if(im(b))return ik(a.g.oa,b.stream.originalId||""),null;b.type==Uc&&qk(a.g.oa);if(!a.g.oa.xa&&b.type!=Uc)return a.h.updateIntervalSeconds/2;var c=a.g.Ye();if("audio"===b.type)for(var d=t(a.s.keys()),e=d.next();!e.done;e=d.next())e=a.s.get(e.value),e.hb(c,!0),ol(e,c);d=b.rb?b.rb.endTime:c;e=bk(a.g.oa,b.type,c);var f=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C),g=a.l.presentationTimeline.getDuration()-d,h=ak(a.g.oa,b.type);if(1E-6>g&&h)return b.endOfStream=
473
+ function hm(a,b){if(im(b))return ik(a.g.oa,b.stream.originalId||""),null;b.type==Uc&&jk(a.g.oa);if(!a.g.oa.xa&&b.type!=Uc)return a.h.updateIntervalSeconds/2;var c=a.g.Ye();if("audio"===b.type)for(var d=t(a.s.keys()),e=d.next();!e.done;e=d.next())e=a.s.get(e.value),e.hb(c,!0),ol(e,c);d=b.rb?b.rb.endTime:c;e=bk(a.g.oa,b.type,c);var f=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C),g=a.l.presentationTimeline.getDuration()-d,h=ak(a.g.oa,b.type);if(1E-6>g&&h)return b.endOfStream=
474
474
  !0,"video"==b.type&&(a=a.i.get(Uc))&&im(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=jm(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,im(h)||h.va&&!h.va.current()||(f=Math.min(f,h.rb?h.rb.endTime:c));if(d>=f+a.l.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ba&&b.va&&!a.s.has(b.stream)&&(b.ba.hb(e.startTime),ol(b.ba,e.startTime));km(a,b,c,e).catch(function(){});
475
475
  return null}function jm(a,b,c,d){if(b.va)return b.va.current();if(b.rb||d)return b.va=b.stream.segmentIndex.dc(b.rb?b.rb.endTime:d,!1,0>a.g.Ua()),b.va&&b.va.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ua();var f=null;d&&(b.va=b.stream.segmentIndex.dc(e,!1,a),f=b.va&&b.va.next().value);f||(b.va=b.stream.segmentIndex.dc(c,!1,a),f=b.va&&b.va.next().value);return f}
476
- function km(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;return O(function(B){switch(B.g){case 1:e=Wc;f=b.stream;g=b.va;b.ib=!0;ta(B,2);if(2==d.tc())throw new T(1,1,1011);return G(B,lm(a,b,d),4);case 4:Mg(a.m);if(a.A)return B.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if((l=a.h.lowLatencyMode&&a.l.isLowLatency)&&k&&h&&("HLS"!=a.l.type||d.m))return p=new Uint8Array(0),u=r=!1,v=function(D){var F,J,L,H;return O(function(E){switch(E.g){case 1:if(r)return E.return();
477
- u=!0;Mg(a.m);if(a.A)return E.return();ta(E,2);p=mm(p,D);F=!1;J=0;(new Sg).box("mdat",function(K){J=K.size+K.start;F=!0}).parse(p,!1,!0);if(!F){E.B(4);break}L=p.subarray(0,J);p=p.subarray(J);return G(E,nm(a,b,c,f,d,L,!0),5);case 5:b.ba&&b.va&&ol(b.ba,d.startTime,!0);case 4:va(E,0);break;case 2:w=H=wa(E),I(E)}})},G(B,om(a,b,d,v),9);m=om(a,b,d);return G(B,m,7);case 7:n=B.h;Mg(a.m);if(a.A)return B.return();Mg(a.m);return b.zc?(b.ib=!1,Wl(a,b,0),B.return()):G(B,nm(a,b,c,f,d,n),6);case 9:A=B.h;if(w)throw w;
478
- if(u){B.B(10);break}r=!0;Mg(a.m);return a.A?B.return():b.zc?(b.ib=!1,Wl(a,b,0),B.return()):G(B,nm(a,b,c,f,d,A),10);case 10:b.ba&&b.va&&ol(b.ba,d.startTime,!0);case 6:Mg(a.m);if(a.A)return B.return();b.rb=d;g.next();b.ib=!1;b.fh=!1;z=a.g.oa.Wb();C=z[b.type];cb(JSON.stringify(C));b.zc||a.g.$g(d,b.stream);Wl(a,b,0);va(B,0);break;case 2:y=wa(B);Mg(a.m,y);if(a.A)return B.return();b.ib=!1;if(7001==y.code)b.ib=!1,Ol(b),Wl(a,b,0),B.B(0);else if(b.type==e.Ka&&a.h.ignoreTextStreamFailures)a.i.delete(e.Ka),
476
+ function km(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;return O(function(B){switch(B.g){case 1:e=Wc;f=b.stream;g=b.va;b.ib=!0;ta(B,2);if(2==d.uc())throw new T(1,1,1011);return G(B,lm(a,b,d),4);case 4:Mg(a.m);if(a.A)return B.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if((l=a.h.lowLatencyMode&&a.l.isLowLatency)&&k&&h&&("HLS"!=a.l.type||d.m))return p=new Uint8Array(0),u=r=!1,v=function(D){var F,J,L,H;return O(function(E){switch(E.g){case 1:if(r)return E.return();
477
+ u=!0;Mg(a.m);if(a.A)return E.return();ta(E,2);p=mm(p,D);F=!1;J=0;(new Sg).box("mdat",function(K){J=K.size+K.start;F=!0}).parse(p,!1,!0);if(!F){E.B(4);break}L=p.subarray(0,J);p=p.subarray(J);return G(E,nm(a,b,c,f,d,L,!0),5);case 5:b.ba&&b.va&&ol(b.ba,d.startTime,!0);case 4:va(E,0);break;case 2:w=H=wa(E),I(E)}})},G(B,om(a,b,d,v),9);m=om(a,b,d);return G(B,m,7);case 7:n=B.h;Mg(a.m);if(a.A)return B.return();Mg(a.m);return b.Bc?(b.ib=!1,Wl(a,b,0),B.return()):G(B,nm(a,b,c,f,d,n),6);case 9:A=B.h;if(w)throw w;
478
+ if(u){B.B(10);break}r=!0;Mg(a.m);return a.A?B.return():b.Bc?(b.ib=!1,Wl(a,b,0),B.return()):G(B,nm(a,b,c,f,d,A),10);case 10:b.ba&&b.va&&ol(b.ba,d.startTime,!0);case 6:Mg(a.m);if(a.A)return B.return();b.rb=d;g.next();b.ib=!1;b.fh=!1;z=a.g.oa.Wb();C=z[b.type];db(JSON.stringify(C));b.Bc||a.g.$g(d,b.stream);Wl(a,b,0);va(B,0);break;case 2:y=wa(B);Mg(a.m,y);if(a.A)return B.return();b.ib=!1;if(7001==y.code)b.ib=!1,Ol(b),Wl(a,b,0),B.B(0);else if(b.type==e.Ka&&a.h.ignoreTextStreamFailures)a.i.delete(e.Ka),
479
479
  B.B(0);else if(3017==y.code)pm(a,b,y),B.B(0);else return b.ae=!0,1==y.category&&b.ba&&ul(b.ba,d),y.severity=2,G(B,gm(a,b,y),0)}})}function mm(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
480
480
  function pm(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.fh})){if(0<a.h.maxDisabledTime&&a.g.disableStream(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.ae=!0;a.A=!0;a.g.onError(c);return}b.fh=!0}Wl(a,b,4)}
481
- function lm(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return O(function(w){switch(w.g){case 1:d=Wc;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.O)-.1);g=Math.min(c.appendWindowEnd,a.M)+.01;h=Je(b.stream.codecs);k=Le(b.stream.mimeType);l=c.timestampOffset;if(l==b.lf&&f==b.jf&&g==b.hf&&h==b.Tg&&k==b.Ug){w.B(2);break}m=b.Tg&&b.Ug&&Ck(a.g.oa,b.type,k,h);if(!m){w.B(3);break}n=null;b.type===d.ua?n=a.i.get(d.ha):b.type===d.ha&&(n=a.i.get(d.ua));if(!n){w.B(3);break}return G(w,Pl(n).catch(function(){}),5);case 5:n.md=
482
- null,dm(a,n);case 3:return G(w,qm(a,b,l,f,g,c,h,k),2);case 2:return Ji(c.ma,b.md)||(b.md=c.ma,c.l&&c.ma&&(p=om(a,b,c.ma),r=function(){var v,A,z,C,y,B,D;return O(function(F){switch(F.g){case 1:return ta(F,2),G(F,p,4);case 4:return v=F.h,Mg(a.m),A=null,z=new Map,C={projection:null,hfov:null},y=new Sg,y.box("moov",Xg).box("trak",Xg).box("mdia",Xg).Y("mdhd",function(J){A=cj(J.reader,J.version).timescale}).box("hdlr",function(J){J=J.reader;J.skip(8);switch(J.Qc()){case "soun":z.set(d.ha,A);break;case "vide":z.set(d.ua,
483
- A)}A=null}).box("minf",Xg).box("stbl",Xg).Y("stsd",Zg).box("encv",$g).box("avc1",$g).box("avc3",$g).box("hev1",$g).box("hvc1",$g).box("dvav",$g).box("dva1",$g).box("dvh1",$g).box("dvhe",$g).box("vexu",Xg).box("proj",Xg).Y("prji",function(J){J=J.reader.Qc();C.projection=J}).box("hfov",function(J){J=J.reader.V()/1E3;C.hfov=J}).parse(v),rm(a,C),z.has(b.type)?c.ma.timescale=z.get(b.type):null!=A&&(c.ma.timescale=A),B=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,G(F,a.g.Jh(b.type,v),5);case 5:return G(F,
484
- dk(a.g.oa,b.type,v,null,b.stream,B),6);case 6:va(F,0);break;case 2:throw D=wa(F),b.md=null,D;}})},a.g.lk(c.startTime,c.ma),e.push(r()))),a.l.sequenceMode&&(u=b.rb?b.rb.j:null,c.j!=u&&e.push(vk(a.g.oa,b.type,c.startTime))),G(w,Promise.all(e),0)}})}
485
- function qm(a,b,c,d,e,f,g,h){var k,l,m,n;return O(function(p){if(1==p.g)return k=Wc,l=new Map,a.j.audio&&l.set(k.ha,a.j.audio),a.j.video&&l.set(k.ua,a.j.video),ta(p,2),b.jf=d,b.hf=e,g&&(b.Tg=g),h&&(b.Ug=h),b.lf=c,m=a.l.sequenceMode||"HLS"==a.l.type,G(p,tk(a.g.oa,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return va(p,0);n=wa(p);b.jf=null;b.hf=null;b.Tg=null;b.Ug=null;b.lf=null;throw n;})}
486
- function nm(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p,r,u,w;return O(function(v){switch(v.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.H;n="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;p=null;e.ma&&(p=e.ma.timescale);r=n&&p&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(l||m||r)k=new Sg;l&&k.Y("emsg",function(A){var z=d.emsgSchemeIdUris;if(0===A.version){var C=
487
- A.reader.Qc();var y=A.reader.Qc();var B=A.reader.V();var D=A.reader.V();var F=A.reader.V();var J=A.reader.V();var L=e.startTime+D/B}else B=A.reader.V(),L=A.reader.td()/B+e.timestampOffset,D=L-e.startTime,F=A.reader.V(),J=A.reader.V(),C=A.reader.Qc(),y=A.reader.Qc();A=A.reader.Rb(A.reader.getLength()-A.reader.La());if(z&&z.includes(C)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==C)a.g.nk();else if(z=(new Map).set("detail",{startTime:L,endTime:L+F/B,schemeIdUri:C,value:y,timescale:B,presentationTimeDelta:D,
488
- eventDuration:F,id:J,messageData:A}),z=new S("emsg",z),z.cancelable=!0,a.g.onEvent(z),!z.defaultPrevented&&("https://aomedia.org/emsg/ID3"==C||"https://developer.apple.com/streaming/emsg-id3"==C)&&(C=Zi(A),C.length&&e))a.g.onMetadata([{cueTime:e.startTime,data:A,frames:C,dts:e.startTime,pts:e.startTime}],0,e.endTime)});m&&k.Y("prft",function(A){if(!a.H&&e.ma.timescale){var z=A.reader,C=A.version;z.V();A=z.V();var y=z.V();A=1E3*A+y/Math.pow(2,32)*1E3;0===C?z=z.V():(C=z.V(),z=z.V(),z=C*Math.pow(2,32)+
489
- z);A=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+A)).getTime();z=(new Map).set("detail",{wallClockTime:A,programStartDate:new Date(A-z/e.ma.timescale*1E3)});z=new S("prft",z);a.g.onEvent(z);a.H=!0}});r&&k.box("moof",Xg).box("traf",Xg).Y("tfdt",function(A){var z,C,y,B,D,F;return O(function(J){z=bj(A.reader,A.version);C=z.baseMediaDecodeTime;if(!C)return J.return();y=-C/p;B=Number(b.lf)||0;if(!(B<y))return J.B(0);D=b.jf;F=b.hf;return G(J,qm(a,b,y,D,F,e),0)})});(l||m||r)&&k.parse(f,!1,g);
481
+ function lm(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return O(function(w){switch(w.g){case 1:d=Wc;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.O)-.1);g=Math.min(c.appendWindowEnd,a.M)+.01;h=Je(b.stream.codecs);k=Le(b.stream.mimeType);l=c.timestampOffset;if(l==b.lf&&f==b.jf&&g==b.hf&&h==b.Tg&&k==b.Ug){w.B(2);break}m=b.Tg&&b.Ug&&Ck(a.g.oa,b.type,k,h);if(!m){w.B(3);break}n=null;b.type===d.ua?n=a.i.get(d.ia):b.type===d.ia&&(n=a.i.get(d.ua));if(!n){w.B(3);break}return G(w,Pl(n).catch(function(){}),5);case 5:n.nd=
482
+ null,dm(a,n);case 3:return G(w,qm(a,b,l,f,g,c,h,k),2);case 2:return Ji(c.ma,b.nd)||(b.nd=c.ma,c.l&&c.ma&&(p=om(a,b,c.ma),r=function(){var v,A,z,C,y,B,D;return O(function(F){switch(F.g){case 1:return ta(F,2),G(F,p,4);case 4:return v=F.h,Mg(a.m),A=null,z=new Map,C={projection:null,hfov:null},y=new Sg,y.box("moov",Xg).box("trak",Xg).box("mdia",Xg).Z("mdhd",function(J){A=cj(J.reader,J.version).timescale}).box("hdlr",function(J){J=J.reader;J.skip(8);switch(J.Rc()){case "soun":z.set(d.ia,A);break;case "vide":z.set(d.ua,
483
+ A)}A=null}).box("minf",Xg).box("stbl",Xg).Z("stsd",Zg).box("encv",$g).box("avc1",$g).box("avc3",$g).box("hev1",$g).box("hvc1",$g).box("dvav",$g).box("dva1",$g).box("dvh1",$g).box("dvhe",$g).box("vexu",Xg).box("proj",Xg).Z("prji",function(J){J=J.reader.Rc();C.projection=J}).box("hfov",function(J){J=J.reader.V()/1E3;C.hfov=J}).parse(v),rm(a,C),z.has(b.type)?c.ma.timescale=z.get(b.type):null!=A&&(c.ma.timescale=A),B=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,G(F,a.g.Jh(b.type,v),5);case 5:return G(F,
484
+ dk(a.g.oa,b.type,v,null,b.stream,B),6);case 6:va(F,0);break;case 2:throw D=wa(F),b.nd=null,D;}})},a.g.lk(c.startTime,c.ma),e.push(r()))),a.l.sequenceMode&&(u=b.rb?b.rb.j:null,c.j!=u&&e.push(vk(a.g.oa,b.type,c.startTime))),G(w,Promise.all(e),0)}})}
485
+ function qm(a,b,c,d,e,f,g,h){var k,l,m,n;return O(function(p){if(1==p.g)return k=Wc,l=new Map,a.j.audio&&l.set(k.ia,a.j.audio),a.j.video&&l.set(k.ua,a.j.video),ta(p,2),b.jf=d,b.hf=e,g&&(b.Tg=g),h&&(b.Ug=h),b.lf=c,m=a.l.sequenceMode||"HLS"==a.l.type,G(p,tk(a.g.oa,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return va(p,0);n=wa(p);b.jf=null;b.hf=null;b.Tg=null;b.Ug=null;b.lf=null;throw n;})}
486
+ function nm(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p,r,u,w;return O(function(v){switch(v.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.H;n="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;p=null;e.ma&&(p=e.ma.timescale);r=n&&p&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(l||m||r)k=new Sg;l&&k.Z("emsg",function(A){var z=d.emsgSchemeIdUris;if(0===A.version){var C=
487
+ A.reader.Rc();var y=A.reader.Rc();var B=A.reader.V();var D=A.reader.V();var F=A.reader.V();var J=A.reader.V();var L=e.startTime+D/B}else B=A.reader.V(),L=A.reader.td()/B+e.timestampOffset,D=L-e.startTime,F=A.reader.V(),J=A.reader.V(),C=A.reader.Rc(),y=A.reader.Rc();A=A.reader.Rb(A.reader.getLength()-A.reader.La());if(z&&z.includes(C)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==C)a.g.nk();else if(z=(new Map).set("detail",{startTime:L,endTime:L+F/B,schemeIdUri:C,value:y,timescale:B,presentationTimeDelta:D,
488
+ eventDuration:F,id:J,messageData:A}),z=new S("emsg",z),z.cancelable=!0,a.g.onEvent(z),!z.defaultPrevented&&("https://aomedia.org/emsg/ID3"==C||"https://developer.apple.com/streaming/emsg-id3"==C)&&(C=Zi(A),C.length&&e))a.g.onMetadata([{cueTime:e.startTime,data:A,frames:C,dts:e.startTime,pts:e.startTime}],0,e.endTime)});m&&k.Z("prft",function(A){if(!a.H&&e.ma.timescale){var z=A.reader,C=A.version;z.V();A=z.V();var y=z.V();A=1E3*A+y/Math.pow(2,32)*1E3;0===C?z=z.V():(C=z.V(),z=z.V(),z=C*Math.pow(2,32)+
489
+ z);A=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+A)).getTime();z=(new Map).set("detail",{wallClockTime:A,programStartDate:new Date(A-z/e.ma.timescale*1E3)});z=new S("prft",z);a.g.onEvent(z);a.H=!0}});r&&k.box("moof",Xg).box("traf",Xg).Z("tfdt",function(A){var z,C,y,B,D,F;return O(function(J){z=bj(A.reader,A.version);C=z.baseMediaDecodeTime;if(!C)return J.return();y=-C/p;B=Number(b.lf)||0;if(!(B<y))return J.B(0);D=b.jf;F=b.hf;return G(J,qm(a,b,y,D,F,e),0)})});(l||m||r)&&k.parse(f,!1,g);
490
490
  return G(v,sm(a,b,c),2);case 2:return Mg(a.m),u=b.ve,b.ve=!1,w=b.Gh,b.Gh=!1,G(v,a.g.Jh(b.type,f),3);case 3:return G(v,dk(a.g.oa,b.type,f,e,d,h,u,w,g),4);case 4:Mg(a.m),I(v)}})}function sm(a,b,c){var d,e,f,g;return O(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.l.presentationTimeline.g);e=Yj(a.g.oa,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():G(h,a.g.oa.remove(b.type,e,e+g),2)}Mg(a.m);I(h)})}
491
491
  function im(a){return a&&a.type==Uc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
492
492
  function om(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.Zd())return l.return(e);f=null;if(b.ba){var m=b.ba,n=m.h;c instanceof Ii&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.vh=d),f=m.wf):f=null}f||(f=em(c,b.stream,d||null,a.h.retryParameters,a.g.hc));g=0;b.va&&(g=b.va.h);b.Cb=f;return G(l,f.promise,2);case 2:h=l.h;b.Cb=null;k=h.data;if(!c.aesKey){l.B(3);break}return G(l,Kl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
493
493
  function em(a,b,c,d,e){var f=a instanceof Ki?a:void 0,g=f?1:0;a=Ll(a.R(),a.$a,a.Ja,d,c);a.contentType=b.type;return e.request(Jg,a,{type:g,stream:b,segment:f})}
494
- function bm(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.zc=!1,b.If=!1,b.Te=0,b.Sd=!0,b.rb=null,b.va=null,b.ba&&!a.s.has(b.stream)&&vl(b.ba),d?(e=a.g.Ye(),f=a.g.oa.getDuration(),G(g,a.g.oa.remove(b.type,e+d,f),3)):G(g,sk(a.g.oa,b.type),4);if(3!=g.g)return Mg(a.m),c?G(g,a.g.oa.flush(b.type),3):g.B(3);Mg(a.m);b.Sd=!1;b.endOfStream=!1;b.ib||b.Tb||Wl(a,b,0);I(g)})}
494
+ function bm(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Bc=!1,b.If=!1,b.Te=0,b.Sd=!0,b.rb=null,b.va=null,b.ba&&!a.s.has(b.stream)&&vl(b.ba),d?(e=a.g.Ye(),f=a.g.oa.getDuration(),G(g,a.g.oa.remove(b.type,e+d,f),3)):G(g,sk(a.g.oa,b.type),4);if(3!=g.g)return Mg(a.m),c?G(g,a.g.oa.flush(b.type),3):g.B(3);Mg(a.m);b.Sd=!1;b.endOfStream=!1;b.ib||b.Tb||Wl(a,b,0);I(g)})}
495
495
  function Wl(a,b,c){var d=b.type;if(d!=Uc||a.i.has(d))b.Tb=(new Ub(function(){var e;return O(function(f){if(1==f.g)return ta(f,2),G(f,fm(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);I(f)})})).X(c)}function Ol(a){null!=a.Tb&&(a.Tb.stop(),a.Tb=null)}function Pl(a){return O(function(b){return a.Cb?G(b,a.Cb.abort(),0):b.B(0)})}
496
496
  function gm(a,b,c){var d;return O(function(e){if(1==e.g)return G(e,ng(a.K),2);Mg(a.m);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.disableStream(b.stream,d),c.handled&&(c.severity=1));if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);I(e)})}
497
- function tm(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.L<c)return h.return(!1);a.L=b;d=Wc;if(e=a.i.get(d.ha))e.md=null,dm(a,e),Pl(e).catch(function(){});if(f=a.i.get(d.ua))f.md=null,dm(a,f),Pl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.ha,a.j.audio);a.j.video&&g.set(d.ua,a.j.video);return G(h,Bk(a.g.oa,g),2)}return h.return(!0)})}
497
+ function tm(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.L<c)return h.return(!1);a.L=b;d=Wc;if(e=a.i.get(d.ia))e.nd=null,dm(a,e),Pl(e).catch(function(){});if(f=a.i.get(d.ua))f.nd=null,dm(a,f),Pl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.ia,a.j.audio);a.j.video&&g.set(d.ua,a.j.video);return G(h,Bk(a.g.oa,g),2)}return h.return(!0)})}
498
498
  function rm(a,b){if(a.I.projection!=b.projection||a.I.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new S("spatialvideoinfo",c)}else c=new S("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.I=b}};function um(){}
499
499
  function vm(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Ze(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Ze(n)),m=vm(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(Ua("Invalid config, wrong type for "+m),
500
500
  k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&Va("Unexpected number of arguments for "+m),a[l]=b[l]):(Ua("Invalid config, unrecognized key "+m),k=!1)}return k}function wm(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 xm(a,b){return a&&b}
@@ -519,19 +519,19 @@ minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinit
519
519
  supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(Im(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
520
520
  function Jm(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:"",headers:{}}};return vm(a,b,c||Fm(),d,"")}
521
521
  function Im(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=jd(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return ad(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-
522
- 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=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Uc&&"image"!=c.type||b.push(c);return b}function Gm(a){return xm([a],a)}function Hm(a){return xm([a],a)}P("shaka.util.PlayerConfiguration",Em);Em.mergeConfigObjects=Jm;Em.createDefault=Fm;function Km(a,b,c,d){gb.call(this);this.M=a;this.S=b;this.xa=d.networkingEngine;this.A=c;this.s=null;this.sa=0;this.Ia=d.cd;this.G=d.gk;this.Xa=d.hk;this.g=d.config;this.j=this.H=this.h=null;this.ea=!1;this.I=d.tk;this.qa=!1;this.l=null;this.aa=!1;this.i=this.C=null;this.Z=!1;this.L=new Map;this.ra=!1;this.Aa=d.rk;this.W=new ll;this.m=new og;this.O=null;this.u=!1;this.Fa=d.aj;this.ka=null;this.Ha=d.$i;this.P=!1;this.K=[];this.J=[]}pa(Km,gb);function Lm(a,b,c){(a=b?a.J:a.K)?a.push(c):c()}
523
- function Mm(a){if(a.J)for(var b=t(a.J),c=b.next();!c.done;c=b.next())c=c.value,c();a.J=null}function Nm(a,b){a.O=b;a.P=!0;if(a.K){b=t(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}q=Km.prototype;q.getStartTime=function(){return this.A};q.fd=function(){return this.M};q.Jg=function(){return this.h};function Om(a){a.Z=!0;return a.i}function Pm(a){a.ea=!0;return a.j}function Qm(a){a.qa=!0;return a.I}q.getStats=function(){return this.W};function Rm(a){a.aa=!0;return a.l}
522
+ 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=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Uc&&"image"!=c.type||b.push(c);return b}function Gm(a){return xm([a],a)}function Hm(a){return xm([a],a)}P("shaka.util.PlayerConfiguration",Em);Em.mergeConfigObjects=Jm;Em.createDefault=Fm;function Km(a,b,c,d){gb.call(this);this.M=a;this.S=b;this.xa=d.networkingEngine;this.A=c;this.s=null;this.sa=0;this.Ia=d.dd;this.G=d.gk;this.Xa=d.hk;this.g=d.config;this.j=this.H=this.h=null;this.ea=!1;this.I=d.tk;this.qa=!1;this.l=null;this.aa=!1;this.i=this.C=null;this.Y=!1;this.L=new Map;this.ra=!1;this.Aa=d.rk;this.W=new ll;this.m=new og;this.O=null;this.u=!1;this.Fa=d.aj;this.ha=null;this.Ha=d.$i;this.P=!1;this.K=[];this.J=[]}pa(Km,gb);function Lm(a,b,c){(a=b?a.J:a.K)?a.push(c):c()}
523
+ function Mm(a){if(a.J)for(var b=t(a.J),c=b.next();!c.done;c=b.next())c=c.value,c();a.J=null}function Nm(a,b){a.O=b;a.P=!0;if(a.K){b=t(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}q=Km.prototype;q.getStartTime=function(){return this.A};q.gd=function(){return this.M};q.Jg=function(){return this.h};function Om(a){a.Y=!0;return a.i}function Pm(a){a.ea=!0;return a.j}function Qm(a){a.qa=!0;return a.I}q.getStats=function(){return this.W};function Rm(a){a.aa=!0;return a.l}
524
524
  function Sm(a){a.ra=!0;return a.L}
525
525
  q.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return G(c,Promise.resolve(),2);case 2:return ta(c,3),G(c,Tm(a),5);case 5:return Um(a),G(c,Vm(a),6);case 6:Um(a);a.s||(a.s=new Yf(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,a.g.manifest.dash.enableAudioGroups));if(a.Ha){var d=
526
- a.g.abrFactory;a.C=d;a.i=d();a.i.configure(a.g.abr)}if(a.Fa){d=a.h.presentationTimeline.U();var e=Hf(a.h.variants);e=a.s.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ka=e,e.video&&Wm(a,e.video,d),e.audio&&Wm(a,e.audio,d)}return G(c,void 0,7);case 7:Um(a);a.m.resolve();va(c,0);break;case 3:b=wa(c),a.m.reject(b),I(c)}})})()};q.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):gb.prototype.dispatchEvent.call(this,a)};
526
+ a.g.abrFactory;a.C=d;a.i=d();a.i.configure(a.g.abr)}if(a.Fa){d=a.h.presentationTimeline.U();var e=Hf(a.h.variants);e=a.s.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ha=e,e.video&&Wm(a,e.video,d),e.audio&&Wm(a,e.audio,d)}return G(c,void 0,7);case 7:Um(a);a.m.resolve();va(c,0);break;case 3:b=wa(c),a.m.reject(b),I(c)}})})()};q.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):gb.prototype.dispatchEvent.call(this,a)};
527
527
  q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new S("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Um(a){if(a.u)throw new T(2,7,7003);}function Xm(a,b){a.dispatchEvent(new S("onstatechange",(new Map).set("state",b)))}
528
528
  function Tm(a){var b,c,d,e,f;return O(function(g){if(1==g.g){Xm(a,"manifest-parser");a.j||(a.H=Ci(a.M,a.S),a.j=a.H(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Xm(a,"manifest");if(a.h)return g.B(2);c=a;return G(g,a.j.start(a.M,a.Xa),3)}2!=g.g&&(c.h=g.h);d=new S("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new T(2,4,4036);Ym(a.h);e=Date.now()/1E3;f=e-b;a.W.J=f;I(g)})}
529
529
  function Vm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Xm(a,"drm-engine");a.sa=Date.now()/1E3;a.l=a.Ia();a.G.g=a.l;a.l.configure(a.g.drm);var h=a.G;b=ff(a.h.variants,h.h.restrictions,h.i);if(!b){g.B(2);break}c=new S("trackschanged",void 0);return G(g,Promise.resolve(),3);case 3:Um(a),a.dispatchEvent(c);case 2:return d=Hf(a.h.variants),G(g,Sh(a.l,d,a.h.offlineSessionIds),4);case 4:return Um(a),G(g,wi(a.G,a.h),5);case 5:e=g.h;if(!e){g.B(0);break}f=new S("trackschanged",void 0);return G(g,
530
530
  Promise.resolve(),7);case 7:a.dispatchEvent(f),I(g)}})}q.configure=function(a,b){a=wm(a,b);Jm(this.g,a)};q.getConfiguration=function(){return Ze(this.g)};
531
531
  function Wm(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new ml(d,b,function(l,m,n){return em(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.L.set(b.id,e),G(k,b.createSegmentIndex(),2);f=a.A||0;(h=(g=b.segmentIndex.dc(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ma&&pl(e,h.ma):ol(e,h.startTime));I(k)})}q.Yk=function(){return this.m};
532
- q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.u=!0;if(!a.j||a.ea){e.B(2);break}return G(e,a.j.stop(),2);case 2:if(!a.i||a.Z){e.B(4);break}return G(e,a.i.stop(),4);case 4:a.I&&!a.qa&&a.I.release();if(!a.l||a.aa){e.B(6);break}return G(e,a.l.destroy(),6);case 6:if(0<a.L.size&&!a.ra)for(b=t(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,vl(d);I(e)}})};
533
- function Ym(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",Km);Km.prototype.destroy=Km.prototype.destroy;Km.prototype.waitForFinish=Km.prototype.Yk;function Zm(a,b){gb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Xc:null,Wc:$m,Kc:function(d,e){return an(c,"enter",d,e)}},{Xc:bn,Wc:$m,Kc:function(d,e){return an(c,"enter",d,e)}},{Xc:cn,Wc:$m,Kc:function(d,e){return an(c,"enter",d,e)}},{Xc:$m,Wc:bn,Kc:function(d,e){return an(c,"exit",d,e)}},{Xc:$m,Wc:cn,Kc:function(d,e){return an(c,"exit",d,e)}},{Xc:bn,Wc:cn,Kc:function(d,e){return an(c,"skip",d,e)}},{Xc:cn,Wc:bn,Kc:function(d,e){return an(c,"skip",d,e)}}];this.h=new rd;this.h.o(this.i,
534
- "regionremove",function(d){c.g.delete(d.region)})}pa(Zm,gb);Zm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;gb.prototype.release.call(this)};Zm.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?bn:a>d.endTime?cn:$m;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Xc==e&&h.Wc==f&&h.Kc(d,b)}}};
532
+ q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.u=!0;if(!a.j||a.ea){e.B(2);break}return G(e,a.j.stop(),2);case 2:if(!a.i||a.Y){e.B(4);break}return G(e,a.i.stop(),4);case 4:a.I&&!a.qa&&a.I.release();if(!a.l||a.aa){e.B(6);break}return G(e,a.l.destroy(),6);case 6:if(0<a.L.size&&!a.ra)for(b=t(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,vl(d);I(e)}})};
533
+ function Ym(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",Km);Km.prototype.destroy=Km.prototype.destroy;Km.prototype.waitForFinish=Km.prototype.Yk;function Zm(a,b){gb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Yc:null,Xc:$m,Lc:function(d,e){return an(c,"enter",d,e)}},{Yc:bn,Xc:$m,Lc:function(d,e){return an(c,"enter",d,e)}},{Yc:cn,Xc:$m,Lc:function(d,e){return an(c,"enter",d,e)}},{Yc:$m,Xc:bn,Lc:function(d,e){return an(c,"exit",d,e)}},{Yc:$m,Xc:cn,Lc:function(d,e){return an(c,"exit",d,e)}},{Yc:bn,Xc:cn,Lc:function(d,e){return an(c,"skip",d,e)}},{Yc:cn,Xc:bn,Lc:function(d,e){return an(c,"skip",d,e)}}];this.h=new rd;this.h.o(this.i,
534
+ "regionremove",function(d){c.g.delete(d.region)})}pa(Zm,gb);Zm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;gb.prototype.release.call(this)};Zm.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?bn:a>d.endTime?cn:$m;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Yc==e&&h.Xc==f&&h.Lc(d,b)}}};
535
535
  function an(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var bn=1,$m=2,cn=3;function dn(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new nb(a)).sb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=en[d])return m.return(e);f=0;g=Dg([a],c);ta(m,2);g.method="HEAD";return G(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=wa(m);if(!k||1002!=k.code&&1001!=k.code){m.B(3);break}g.method="GET";return G(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
536
536
  e.toLowerCase().split(";").shift():"")}})}
537
537
  var en={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 fn(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return fn(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=gn(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=gn(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;k=k.next().value;
@@ -541,18 +541,18 @@ case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0
541
541
  function jn(a){var b=[],c={};a=t(a);for(var d=a.next();!d.done;c={Be:c.Be},d=a.next())c.Be=d.value,b.some(function(e){return function(f){return ge(e.Be,f)}}(c))||b.push(c.Be);return b}
542
542
  function kn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
543
543
  (c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function ln(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}q=ln.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;mn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
544
- q.append=function(a){var b=hn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={Zc:d.Zc},e=b.next())d.Zc=e.value,a.some(function(f){return function(g){return g.startTime==f.Zc.startTime&&g.endTime==f.Zc.endTime&&g.text==f.Zc.payload?!0:!1}}(d))||(e=kn(d.Zc))&&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)-
544
+ q.append=function(a){var b=hn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={$c:d.$c},e=b.next())d.$c=e.value,a.some(function(f){return function(g){return g.startTime==f.$c.startTime&&g.endTime==f.$c.endTime&&g.text==f.$c.payload?!0:!1}}(d))||(e=kn(d.$c))&&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)-
545
545
  c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(mn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
546
546
  function mn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(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",ln);ln.prototype.setTextVisibility=ln.prototype.setTextVisibility;ln.prototype.isTextVisible=ln.prototype.isTextVisible;ln.prototype.destroy=ln.prototype.destroy;ln.prototype.append=ln.prototype.append;ln.prototype.remove=ln.prototype.remove;ln.prototype.configure=ln.prototype.configure;function nn(){}q=nn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};P("shaka.text.StubTextDisplayer",nn);nn.prototype.setTextVisibility=nn.prototype.setTextVisibility;nn.prototype.isTextVisible=nn.prototype.isTextVisible;nn.prototype.destroy=nn.prototype.destroy;nn.prototype.append=nn.prototype.append;nn.prototype.remove=nn.prototype.remove;nn.prototype.configure=nn.prototype.configure;function on(){}function W(a){return document.createElement(a)}function pn(){var a=document.createElement("button");a.setAttribute("type","button");return a}function qn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",on);on.removeAllChildren=qn;function rn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.u=b;this.l=null;this.g=W("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.u.appendChild(this.g);c&&c.captionsUpdatePeriod||Ad("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.G=(new Vb(function(){d.A.paused||sn(d)})).wa(c&&
547
547
  c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new rd;this.j.o(document,"fullscreenchange",function(){sn(d,!0)});this.j.o(this.A,"seeking",function(){sn(d,!0)});this.j.o(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){sn(d,!0)}),this.s.observe(this.g));this.C=new Map}q=rn.prototype;q.configure=function(a){this.G&&this.G.wa(a.captionsUpdatePeriod)};
548
548
  q.append=function(a){var b=[].concat(x(this.h)),c={};a=t(jn(a));for(var d=a.next();!d.done;c={Ce:c.Ce},d=a.next())c.Ce=d.value,b.some(function(e){return function(f){return ge(f,e.Ce)}}(c))||this.h.push(c.Ce);sn(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.G&&this.G.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.s&&(this.s.disconnect(),this.s=null);return Promise.resolve()};
549
549
  q.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});sn(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function tn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
550
- function un(a,b,c,d,e){var f=!1,g=[],h=[];b=t(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.Ri:null;l&&(g.push(l.og),l.Rc&&g.push(l.Rc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?tn(a,n)||(f=!0):(vn(a,k,e),l=a.i.get(k),n=l.Ri,f=!0));0<k.nestedCues.length&&n&&un(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
551
- r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.Rc?(d.Rc.contains(c)&&d.Rc.removeChild(c),c.appendChild(d.Rc),d.Rc.appendChild(d.og)):c.appendChild(d.og)}}function sn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.C.values());for(var d=b.next();!d.done;d=b.next())qn(d.value);qn(a.g);a.i.clear();a.C.clear()}a.m&&un(a,a.h,a.g,c,[])}}
550
+ function un(a,b,c,d,e){var f=!1,g=[],h=[];b=t(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.Ri:null;l&&(g.push(l.og),l.Sc&&g.push(l.Sc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?tn(a,n)||(f=!0):(vn(a,k,e),l=a.i.get(k),n=l.Ri,f=!0));0<k.nestedCues.length&&n&&un(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
551
+ r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.Sc?(d.Sc.contains(c)&&d.Sc.removeChild(c),c.appendChild(d.Sc),d.Sc.appendChild(d.og)):c.appendChild(d.og)}}function sn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.C.values());for(var d=b.next();!d.done;d=b.next())qn(d.value);qn(a.g);a.i.clear();a.C.clear()}a.m&&un(a,a.h,a.g,c,[])}}
552
552
  function vn(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=W(e);"br"!=e&&wn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Ld?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Ld?"%":"px");if(a.C.has(c))c=a.C.get(c);else{e=W("span");var k=g.heightUnits==Ld?"%":"px",l=g.widthUnits==Ld?"%":"px",m=g.viewportAnchorUnits==
553
553
  Ld?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";e.style.height=2===g.heightUnits?5.33*g.height+"%":g.height+k;e.style.width=2===g.widthUnits?g.width*h+"%":g.width+l;2===g.viewportAnchorUnits?(k=g.viewportAnchorY/75*100,l=g.viewportAnchorX/(a.l===4/3?160:210)*100,k-=g.regionAnchorY*g.height*5.33/100,l-=g.regionAnchorX*g.width*h/100,e.style.top=k+"%",e.style.left=l+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*g.height/100+m,e.style.left=
554
554
  g.viewportAnchorX-g.regionAnchorX*g.width/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?
555
- "flex-start":"center"==b.displayAlign?"center":"flex-end";a.C.set(c,e);c=e}}e=f;d&&(e=W("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{og:f,Ri:e,Rc:c})}function xn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Td?c:"left"===a||"start"===a&&b===Vd||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Vd?"line-right":"center"}
555
+ "flex-start":"center"==b.displayAlign?"center":"flex-end";a.C.set(c,e);c=e}}e=f;d&&(e=W("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{og:f,Ri:e,Sc:c})}function xn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Td?c:"left"===a||"start"===a&&b===Vd||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Vd?"line-right":"center"}
556
556
  function wn(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=yn(c.linePadding,c,a.u);f.paddingRight=yn(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
557
557
  "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=W("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=zn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=zn(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=
558
558
  b);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=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=yn(c.fontSize,c,a.u);d=c.line;null!=d&&(g=c.lineInterpretation,g==Xd&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:
@@ -570,62 +570,62 @@ function In(a){function b(n){return 100*c(n/100)}function c(n){return Math.round
570
570
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Nn(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=t(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=In(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
571
571
  function Jn(a,b){if(!b||a.includes("offline:"))return a;a=new nb(a);a.g.set("CMCD",b);return a.toString()}var Hn="m",Fn="a",Ln="v",Gn="av",Pn="i",Rn="c",Qn="tt";P("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Ti:"s",OTHER:"o"});function Vn(a){this.h=a;this.g=null}q=Vn.prototype;q.configure=function(a){this.h=a};q.Yh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Wn)?1E3*this.g.get(Wn):null};q.Xh=function(){return this.h.enabled&&this.g&&this.g.has(Xn)?1E3*this.g.get(Xn):null};q.Ej=function(){return this.h.enabled&&this.g&&this.g.has(Yn)?this.g.get(Yn):null};q.Fj=function(){return this.h.enabled&&this.g&&this.g.has(Zn)?this.g.get(Zn):null};
572
572
  q.getBandwidthEstimate=function(a){var b=this.Xh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function $n(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",Vn);Vn.prototype.getBandwidthEstimate=Vn.prototype.getBandwidthEstimate;Vn.prototype.getRoundTripTime=Vn.prototype.Fj;Vn.prototype.getResponseDelay=Vn.prototype.Ej;Vn.prototype.getEstimatedThroughput=Vn.prototype.Xh;
573
- Vn.prototype.getMaxBitrate=Vn.prototype.Yh;var Xn="etp",Wn="mb",Yn="rd",Zn="rtt";function ao(){this.g=null;this.h=[]}function bo(a,b){return O(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;I(c)})}ao.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){gb.call(this);var c=this;this.l=qo;this.Hf=this.h=null;this.qa=!1;this.Le=new rd;this.me=new rd;this.m=new rd;this.Ia=new rd;this.ob=new rd;this.G=this.I=this.C=this.J=null;this.Me=0;this.W=new ao;this.ra=this.Xf=this.aa=this.i=this.Xa=this.H=this.j=this.ie=this.L=this.Fh=this.ea=this.O=this.ke=this.M=this.Jf=this.K=this.Lb=null;this.Ha=!1;this.xa=this.s=null;this.Zf=1E9;this.ye=[];this.S=NaN;this.g=ro(this);this.P=null;this.Ne=-1;this.Fa=null;this.ka={width:Infinity,height:Infinity};
574
- this.Gf=new vi(this.g,this.ka,null);this.Lf=[];this.A=null;this.Aa=new Yf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Kb=this.g.preferredTextLanguage;this.ue=this.g.preferredTextRole;this.se=this.g.preferForcedSubs;this.qe=[];b&&
575
- b(this);this.O=so(this);this.ea=new Vn(this.g.cmsd);this.J=to(this);this.J.ph(this.g.streaming.forceHTTP);this.J.qh(this.g.streaming.forceHTTPS);this.Nb=this.Z=this.u=null;this.cg=!1;this.$f=new Vb(function(){return O(function(d){if(1==d.g)return c.Z?G(d,c.ac(c.Nb,!0),3):d.B(0);if(4!=d.g)return G(d,c.load(c.Z),4);c.cg?c.Nb.pause():c.Nb.play();c.Z=null;c.cg=!1;I(d)})});uo&&(this.u=uo(),this.u.configure(this.g.ads),this.ob.o(this.u,"ad-content-pause-requested",function(d){var e,f;return O(function(g){if(1==
576
- g.g){c.$f.stop();if(c.Z)return g.B(0);c.Nb=c.h;c.cg=c.h.ended;e=d.saveLivePosition||!1;f=c;return G(g,c.Rh(!0,e),3)}f.Z=g.h;I(g)})}),this.ob.o(this.u,"ad-content-resume-requested",function(d){d=d.offset||0;if(c.Z){var e=c.Z;e.A&&d&&(e.A+=d)}c.$f.X(.1)}),this.ob.o(this.u,"ad-content-attach-requested",function(){return O(function(d){return c.h||!c.Nb?d.B(0):G(d,c.ac(c.Nb,!0),0)})}));this.Le.o(window,"online",function(){vo(c);c.gh()});this.Kf=new Vb(function(){for(var d=Date.now()/1E3,e=!1,f=!0,g=t(c.i.variants),
573
+ Vn.prototype.getMaxBitrate=Vn.prototype.Yh;var Xn="etp",Wn="mb",Yn="rd",Zn="rtt";function ao(){this.g=null;this.h=[]}function bo(a,b){return O(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;I(c)})}ao.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){gb.call(this);var c=this;this.l=co;this.Hf=this.h=null;this.qa=!1;this.Le=new rd;this.me=new rd;this.m=new rd;this.Ia=new rd;this.ob=new rd;this.G=this.I=this.C=this.J=null;this.Me=0;this.W=new ao;this.ra=this.Xf=this.aa=this.i=this.Xa=this.H=this.j=this.ie=this.L=this.Fh=this.ea=this.O=this.ke=this.M=this.Jf=this.K=this.Lb=null;this.Ha=!1;this.xa=this.s=null;this.Zf=1E9;this.ye=[];this.S=NaN;this.g=ro(this);this.P=null;this.Ne=-1;this.Fa=null;this.ha={width:Infinity,height:Infinity};
574
+ this.Gf=new vi(this.g,this.ha,null);this.Lf=[];this.A=null;this.Aa=new Yf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Kb=this.g.preferredTextLanguage;this.ue=this.g.preferredTextRole;this.se=this.g.preferForcedSubs;this.qe=[];b&&
575
+ b(this);this.O=so(this);this.ea=new Vn(this.g.cmsd);this.J=to(this);this.J.ph(this.g.streaming.forceHTTP);this.J.qh(this.g.streaming.forceHTTPS);this.Nb=this.Y=this.u=null;this.cg=!1;this.$f=new Vb(function(){return O(function(d){if(1==d.g)return c.Y?G(d,c.ac(c.Nb,!0),3):d.B(0);if(4!=d.g)return G(d,c.load(c.Y),4);c.cg?c.Nb.pause():c.Nb.play();c.Y=null;c.cg=!1;I(d)})});uo&&(this.u=uo(),this.u.configure(this.g.ads),this.ob.o(this.u,"ad-content-pause-requested",function(d){var e,f;return O(function(g){if(1==
576
+ g.g){c.$f.stop();if(c.Y)return g.B(0);c.Nb=c.h;c.cg=c.h.ended;e=d.saveLivePosition||!1;f=c;return G(g,c.Rh(!0,e),3)}f.Y=g.h;I(g)})}),this.ob.o(this.u,"ad-content-resume-requested",function(d){d=d.offset||0;if(c.Y){var e=c.Y;e.A&&d&&(e.A+=d)}c.$f.X(.1)}),this.ob.o(this.u,"ad-content-attach-requested",function(){return O(function(d){return c.h||!c.Nb?d.B(0):G(d,c.ac(c.Nb,!0),0)})}));this.Le.o(window,"online",function(){vo(c);c.gh()});this.Kf=new Vb(function(){for(var d=Date.now()/1E3,e=!1,f=!0,g=t(c.i.variants),
577
577
  h=g.next();!h.done;h=g.next())h=h.value,0<h.disabledUntilTime&&h.disabledUntilTime<=d&&(h.disabledUntilTime=0,e=!0),0<h.disabledUntilTime&&(f=!1);f&&c.Kf.stop();e&&wo(c,!1,void 0,!1,!1)});this.sa=null;a&&(Ad("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.ac(a,!0))}pa(X,gb);function xo(a){null!=a.L&&(Gj(a.L),a.L.release(),a.L=null)}
578
578
  function yo(a,b){b.lcevc.enabled?(xo(a),null==a.L&&(a.L=new Fj(a.h,a.Fh,b.lcevc),a.I&&(a.I.W=a.L))):xo(a)}function zo(a,b){return new S(a,b)}q=X.prototype;
579
579
  q.destroy=function(){var a=this,b;return O(function(c){switch(c.g){case 1:if(a.l==Ao)return c.return();xo(a);b=a.detach();a.l=Ao;return G(c,b,2);case 2:return G(c,a.qg(),3);case 3:a.Le&&(a.Le.release(),a.Le=null);a.me&&(a.me.release(),a.me=null);a.m&&(a.m.release(),a.m=null);a.Ia&&(a.Ia.release(),a.Ia=null);a.ob&&(a.ob.release(),a.ob=null);a.xa=null;a.g=null;a.A=null;a.Hf=null;a.O=null;a.ea=null;if(!a.J){c.B(4);break}return G(c,a.J.destroy(),5);case 5:a.J=null;case 4:a.s&&(a.s.release(),a.s=null),
580
580
  gb.prototype.release.call(a),I(c)}})};function Bo(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||bc("Trident/"))return!1;var a=oc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Wb()?!0:Xb("application/x-mpegurl")}
581
581
  function Co(a,b){a.dispatchEvent(zo("onstatechange",(new Map).set("state",b)))}
582
582
  q.ac=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==Ao)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return G(g,c.detach(),2);case 2:return G(g,Do(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(Co(c,"attach"),e=function(){var h=Eo(c);h&&Fo(c,h)},c.me.o(a,"error",e),c.h=a);if(!b||!Wb()||c.I){g.B(6);break}return G(g,Go(c),6);case 6:xa(g);c.W.release();ya(g,0);break;case 5:return f=wa(g),G(g,c.detach(),10);case 10:throw f;
583
- }})};q.Hh=function(a){this.Fh=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==Ao)throw new T(2,7,7E3);return G(c,b.yc(!1,a),2)}if(3!=c.g)return G(c,Do(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.me.Za(),b.h=null),Co(b,"detach"),b.u&&!a&&b.u.release()}finally{b.W.release()}I(c)})};function Do(a,b){var c;return O(function(d){return 1==d.g?(c=++a.Me,G(d,bo(a.W,b),2)):c!=a.Me?(a.W.release(),d.return(!0)):d.return(!1)})}
584
- q.yc=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 O(function(p){switch(p.g){case 1:return c.l!=Ao&&(c.l=qo),G(p,Do(c,"unload"),2);case 2:if(p.h)return p.return();ua(p,3);c.Ha=!1;Co(c,"unload");a&&!Wb()&&(a=!1);xo(c);d=c.qe.map(function(r){return r()});c.qe=[];return G(p,Promise.all(d),5);case 5:c.dispatchEvent(zo("unloading"));c.ke&&(c.ke.release(),c.ke=null);c.h&&(c.m.Za(),c.Ia.Za());c.Kf.stop();c.Lb&&(c.Lb.release(),c.Lb=null);c.Jf&&(c.Jf.stop(),c.Jf=null);
585
- if(!c.H){p.B(6);break}return G(p,c.H.stop(),7);case 7:c.H=null,c.Xa=null;case 6:if(!c.s){p.B(8);break}return G(p,c.s.stop(),8);case 8:if(!c.j){p.B(10);break}return G(p,c.j.destroy(),11);case 11:c.j=null;case 10:c.K&&(c.K.release(),c.K=null);c.G&&(c.G.release(),c.G=null);if(!uc("webkit")||!c.C){p.B(12);break}return G(p,c.C.destroy(),13);case 13:c.C=null;case 12:if(!c.I){p.B(14);break}return G(p,c.I.destroy(),15);case 15:c.I=null;case 14:if(c.u&&!b)c.u.onAssetUnload();c.Z&&!b&&(c.Z.destroy(),c.Z=null);
586
- b||c.$f.stop();c.O&&Cn(c.O);c.ea&&(c.ea.g=null);c.h&&qn(c.h);if(!c.h||!c.h.src){p.B(16);break}return G(p,new Promise(function(r){return(new Vb(r)).X(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.C){p.B(18);break}return G(p,c.C.destroy(),19);case 19:c.C=null;case 18:c.sa&&c.aa!=c.sa.fd()&&(c.sa.u||c.sa.destroy(),c.sa=null);c.aa=null;c.Xf=null;c.M=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=
583
+ }})};q.Hh=function(a){this.Fh=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==Ao)throw new T(2,7,7E3);return G(c,b.Ac(!1,a),2)}if(3!=c.g)return G(c,Do(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.me.Za(),b.h=null),Co(b,"detach"),b.u&&!a&&b.u.release()}finally{b.W.release()}I(c)})};function Do(a,b){var c;return O(function(d){return 1==d.g?(c=++a.Me,G(d,bo(a.W,b),2)):c!=a.Me?(a.W.release(),d.return(!0)):d.return(!1)})}
584
+ q.Ac=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 O(function(p){switch(p.g){case 1:return c.l!=Ao&&(c.l=co),G(p,Do(c,"unload"),2);case 2:if(p.h)return p.return();ua(p,3);c.Ha=!1;Co(c,"unload");a&&!Wb()&&(a=!1);xo(c);d=c.qe.map(function(r){return r()});c.qe=[];return G(p,Promise.all(d),5);case 5:c.dispatchEvent(zo("unloading"));c.ke&&(c.ke.release(),c.ke=null);c.h&&(c.m.Za(),c.Ia.Za());c.Kf.stop();c.Lb&&(c.Lb.release(),c.Lb=null);c.Jf&&(c.Jf.stop(),c.Jf=null);
585
+ if(!c.H){p.B(6);break}return G(p,c.H.stop(),7);case 7:c.H=null,c.Xa=null;case 6:if(!c.s){p.B(8);break}return G(p,c.s.stop(),8);case 8:if(!c.j){p.B(10);break}return G(p,c.j.destroy(),11);case 11:c.j=null;case 10:c.K&&(c.K.release(),c.K=null);c.G&&(c.G.release(),c.G=null);if(!uc("webkit")||!c.C){p.B(12);break}return G(p,c.C.destroy(),13);case 13:c.C=null;case 12:if(!c.I){p.B(14);break}return G(p,c.I.destroy(),15);case 15:c.I=null;case 14:if(c.u&&!b)c.u.onAssetUnload();c.Y&&!b&&(c.Y.destroy(),c.Y=null);
586
+ b||c.$f.stop();c.O&&Cn(c.O);c.ea&&(c.ea.g=null);c.h&&qn(c.h);if(!c.h||!c.h.src){p.B(16);break}return G(p,new Promise(function(r){return(new Vb(r)).X(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.C){p.B(18);break}return G(p,c.C.destroy(),19);case 19:c.C=null;case 18:c.sa&&c.aa!=c.sa.gd()&&(c.sa.u||c.sa.destroy(),c.sa=null);c.aa=null;c.Xf=null;c.M=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=
587
587
  k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(sf={},Tb.clear());c.i=null;c.A=new ll;c.Yf=null;c.Fa=null;c.P=null;c.Ne=-1;c.ye=[];c.S=NaN;Ho(c);case 3:xa(p);c.W.release();ya(p,4);break;case 4:if(a&&Wb()&&!c.I&&c.h)return G(p,Go(c),0);p.B(0)}})};q.Xk=function(a){this.ra=a};
588
- q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,w,v;return O(function(A){switch(A.g){case 1:if(d.l==Ao)throw new T(2,7,7E3);e=null;f="";a instanceof Km?(e=a,f=e.fd()||""):f=a||"";return G(A,bo(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new T(2,7,7002);if(!d.aa){A.B(3);break}d.aa=f;return G(A,d.yc(!1),3);case 3:g=++d.Me;h=function(){return O(function(z){if(1==z.g)return d.Me==g?z.B(0):e?G(z,e.destroy(),3):z.B(3);throw new T(2,7,7E3);})};k=function(z,C){return O(function(y){switch(y.g){case 1:return ua(y,
588
+ q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,w,v;return O(function(A){switch(A.g){case 1:if(d.l==Ao)throw new T(2,7,7E3);e=null;f="";a instanceof Km?(e=a,f=e.gd()||""):f=a||"";return G(A,bo(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new T(2,7,7002);if(!d.aa){A.B(3);break}d.aa=f;return G(A,d.Ac(!1),3);case 3:g=++d.Me;h=function(){return O(function(z){if(1==z.g)return d.Me==g?z.B(0):e?G(z,e.destroy(),3):z.B(3);throw new T(2,7,7E3);})};k=function(z,C){return O(function(y){switch(y.g){case 1:return ua(y,
589
589
  2),G(y,bo(d.W,C),4);case 4:return G(y,h(),5);case 5:return G(y,z(),6);case 6:return G(y,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:xa(y),d.W.release(),ya(y,0)}})};ta(A,5,6);null==b&&e&&(b=e.getStartTime());d.ra=b;d.Ha=!1;d.dispatchEvent(zo("loading"));if(e){c=e.S;A.B(8);break}if(c){A.B(8);break}return G(A,k(function(){return O(function(z){if(1==z.g)return G(z,Io(d,f),2);c=z.h;I(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Nm(e,d);d.A=e.getStats();A.B(11);break}return G(A,Jo(d,f,b,c,!0),12);case 12:(e=
590
590
  A.h)?(Nm(e,d),d.A=e.getStats(),e.start(),e.m.catch(function(){})):d.A=new ll;case 11:m=!e;n=Date.now()/1E3;d.A=e?e.getStats():new ll;d.aa=f;d.Xf=c||null;if(m)return G(A,k(function(){return O(function(z){return G(z,Ko(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.I){A.B(15);break}return G(A,k(function(){return O(function(z){return G(z,Go(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return G(A,k(function(){return O(function(z){return G(z,e.m,0)})},"waitForFinish"),17);case 17:d.g=
591
591
  e.getConfiguration();d.Gf=e.G;d.Xa=e.H;d.H=Pm(e);d.H&&d.H.setMediaElement&&d.h&&d.H.setMediaElement(d.h);d.ke=Qm(e);d.ie=e.Aa;d.i=e.Jg();if(p=e.s)d.Aa=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(Lo(d),d.configure("manifest.disableVideo",!0));d.C=Rm(e);return G(A,k(function(){return O(function(z){return G(z,d.C.ac(d.h),0)})},"drmEngine_.attach"),18);case 18:return!(r=e.C)||d.xa&&d.xa==r||(d.s=Om(e),d.xa=e.C,"function"!=typeof d.s.setMediaElement&&(Ad("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),
592
- d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(Ad("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(Ad("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=function(){})),u=Sm(e),w=e.ka,G(A,k(function(){return O(function(z){return G(z,Mo(d,n,w,u),0)})},"loadInner_"),19);case 19:Mm(e);A.B(14);
593
- break;case 20:return G(A,k(function(){return O(function(z){return G(z,No(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(zo("loaded"));case 6:xa(A);if(!e){A.B(22);break}return G(A,e.destroy(),22);case 22:d.sa=null;ya(A,0);break;case 5:v=wa(A);if(7E3==v.code){A.B(24);break}return G(A,d.yc(!1),24);case 24:throw v;}})};
594
- function Lo(a){for(var b=t(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})}q.Tk=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?G(e,Oo(c),2):3!=e.g?(d=e.h,G(e,c.yc(a,b),3)):e.return(d)})};
592
+ d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(Ad("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(Ad("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=function(){})),u=Sm(e),w=e.ha,G(A,k(function(){return O(function(z){return G(z,Mo(d,n,w,u),0)})},"loadInner_"),19);case 19:Mm(e);A.B(14);
593
+ break;case 20:return G(A,k(function(){return O(function(z){return G(z,No(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(zo("loaded"));case 6:xa(A);if(!e){A.B(22);break}return G(A,e.destroy(),22);case 22:d.sa=null;ya(A,0);break;case 5:v=wa(A);if(7E3==v.code){A.B(24);break}return G(A,d.Ac(!1),24);case 24:throw v;}})};
594
+ function Lo(a){for(var b=t(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})}q.Tk=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?G(e,Oo(c),2):3!=e.g?(d=e.h,G(e,c.Ac(a,b),3)):e.return(d)})};
595
595
  q.Rh=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?G(e,Oo(c,b),2):3!=e.g?(d=e.h,G(e,c.detach(a),3)):e.return(d)})};
596
596
  function Oo(a,b){b=void 0===b?!1:b;var c,d;return O(function(e){if(1==e.g){c=null;if(!(a.i&&a.H&&a.Xa&&a.aa))return e.B(2);d=a.h.currentTime;a.U()&&!b&&(d=null);return G(e,Po(a,a.aa,d,a.Xf,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.Lf.push(c);a.H&&a.H.setMediaElement&&a.H.setMediaElement(null);var f=c,g=a.H,h=a.Xa;f.h=a.i;f.j=g;f.H=h;f=c;g=a.xa;f.i=a.s;f.C=g;c.s=a.Aa;c.start();a.i=null;a.H=null;a.Xa=null;a.s=null;a.xa=null}return e.return(c)})}
597
597
  q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return G(f,Jo(d,a,b,c),2);(e=f.h)?e.start():Fo(d,new T(2,7,7005));return f.return(e)})};q.qg=function(){var a=this,b,c,d,e;return O(function(f){b=[];c=t(a.Lf);for(d=c.next();!d.done;d=c.next())e=d.value,e.u||b.push(e.destroy());a.Lf=[];return G(f,Promise.all(b),0)})};
598
598
  function Jo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return d?l.B(2):G(l,Io(a,b),3);2!=l.g&&(d=l.h);if(f=Qo(a,d))return l.return(null);g=!1;h=!0;e&&(a.s&&a.xa==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=Po(a,b,c,d||null,!e,g,h);e||(k=k.then(function(m){a.Lf.push(m);return m}));return l.return(k)})}
599
- function Po(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,r,u,w,v,A,z,C,y,B;return O(function(D){if(1==D.g)return h=null,k=Ze(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.P&&h.u?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(F,J){l()?h.configure(F,J):a.configure(F,J)},Infinity!=a.ka.width||Infinity!=a.ka.height?D.B(2):G(D,vc(),3);2!=D.g&&(p=D.h,a.ka.width=p.width,a.ka.height=p.height);r=new vi(k,a.ka,null);u={networkingEngine:a.J,
599
+ function Po(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,r,u,w,v,A,z,C,y,B;return O(function(D){if(1==D.g)return h=null,k=Ze(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.P&&h.u?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(F,J){l()?h.configure(F,J):a.configure(F,J)},Infinity!=a.ha.width||Infinity!=a.ha.height?D.B(2):G(D,vc(),3);2!=D.g&&(p=D.h,a.ha.width=p.width,a.ha.height=p.height);r=new vi(k,a.ha,null);u={networkingEngine:a.J,
600
600
  filter:function(F){var J,L;return O(function(H){if(1==H.g)return G(H,wi(r,F),2);if(4!=H.g){J=H.h;if(!J)return H.B(0);L=zo("trackschanged");return G(H,Promise.resolve(),4)}h.dispatchEvent(L);I(H)})},makeTextStreamsForClosedCaptions:function(F){return Ro(a,F)},onTimelineRegionAdded:function(F){var J=h.I;a:{var L=t(J.g);for(var H=L.next();!H.done;H=L.next())if(H=H.value,H.schemeIdUri==F.schemeIdUri&&H.id==F.id&&H.startTime==F.startTime&&H.endTime==F.endTime){L=H;break a}L=null}null==L&&(J.g.add(F),F=
601
601
  new S("regionadd",new Map([["region",F]])),J.dispatchEvent(F))},onEvent:function(F){return h.dispatchEvent(F)},onError:function(F){return h.onError(F)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.P&&a.j.updateDuration()},newDrmInfo:function(F){var J=h.l,L=J?J.g:null;L&&J.u&&yi(r,L.keySystem,F)},onManifestUpdated:function(){var F=
602
602
  (new Map).set("isLive",a.U());h.dispatchEvent(zo("manifestupdated",F));Lm(h,!1,function(){if(a.u)a.u.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},onMetadata:function(F,J,L,H){var E=F;if("com.apple.hls.interstitial"==F&&(E="com.apple.quicktime.HLS",F={startTime:J,endTime:L,values:H},a.u))a.u.onInterstitialMetadata(a,a.h,F);F={};H=t(H);for(var K=H.next();!K.done;F={Qf:F.Qf},K=H.next())F.Qf=K.value,Lm(h,!1,function(M){return function(){So(a,J,L,E,M.Qf)}}(F))},
603
603
  disableStream:function(F){return a.disableStream(F,a.g.streaming.maxDisabledTime)}};w=new yl(function(){return a.Oa()});w.addEventListener("regionadd",function(F){var J=F.region;To(a,"timelineregionadded",J,h);Lm(h,!1,function(){if(a.u)a.u.onDashTimedMetadata(J)})});v=null;k.streaming.observeQualityChanges&&(v=new zl(function(){return a.Wb()}),v.addEventListener("qualitychange",function(F){Uo(a,F.quality,F.position)}),v.addEventListener("audiotrackchange",function(F){Uo(a,F.quality,F.position,!0)}));
604
604
  A=!0;z={hc:a.J,onError:function(F){return h.onError(F)},vf:function(F){Lm(h,!0,function(){a:{var J=F,L=zo("keystatuschanged");a.dispatchEvent(L);var H=Object.keys(J);1==H.length&&""==H[0]&&(H=["00"],J={"00":J[""]});L=1==H.length&&"00"==H[0];var E=!1;if(H.length){H=t(a.i.variants);for(var K=H.next();!K.done;K=H.next()){K=K.value;var M=[];K.audio&&M.push(K.audio);K.video&&M.push(K.video);M=t(M);for(var N=M.next();!N.done;N=M.next()){var Q=N.value;N=K.allowedByKeySystem;if(Q.keyIds.size){K.allowedByKeySystem=
605
605
  !0;Q=t(Q.keyIds);for(var U=Q.next();!U.done;U=Q.next())if(U=U.value,(U=J[L?"00":U])||a.C.H)K.allowedByKeySystem=K.allowedByKeySystem&&!!U&&!Ai.includes(U)}N!=K.allowedByKeySystem&&(E=!0)}}}if(E&&(Vo(a),!Wo(a)))break a;(J=a.j.j)&&!J.allowedByKeySystem&&wo(a)}})},onExpirationUpdated:function(F,J){var L=zo("expirationupdated");h.dispatchEvent(L);if((L=h.j)&&L.onExpirationUpdated)L.onExpirationUpdated(F,J)},onEvent:function(F){h.dispatchEvent(F);"drmsessionupdate"==F.type&&A&&(A=!1,F=Date.now()/1E3-h.sa,
606
- (a.A||h.getStats()).j=F,a.L&&Gj(a.L))}};C=to(a,l);Cg(a.J,C);y=function(){return a.cd(z)};B={config:k,hk:u,tk:w,rk:v,cd:y,gk:r,networkingEngine:C,aj:e,$i:g};h=new Km(b,d,c,B);return D.return(h)})}function Io(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,G(e,dn(b,a.J,c),2);d=e.h;"application/x-mpegurl"==d&&jc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
606
+ (a.A||h.getStats()).j=F,a.L&&Gj(a.L))}};C=to(a,l);Cg(a.J,C);y=function(){return a.dd(z)};B={config:k,hk:u,tk:w,rk:v,dd:y,gk:r,networkingEngine:C,aj:e,$i:g};h=new Km(b,d,c,B);return D.return(h)})}function Io(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,G(e,dn(b,a.J,c),2);d=e.h;"application/x-mpegurl"==d&&jc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
607
607
  function Qo(a,b){if(!Wb())return!0;if(b){if(""==(a.h||Zb()).canPlayType(b))return!1;if(!(Wb()&&b in Di))return!0;if(Ne(b))return jc()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls}return!1}
608
- function Go(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return Co(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):Ad("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Yf=b,d=Xo(a.h,c,{uj:function(){return a.keySystem()},onMetadata:function(h,k,l){Yo(a,h,k,l)}},a.L),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ka=f,G(g,d.M,2);a.I=d;I(g)})}
609
- function Mo(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L;return O(function(H){switch(H.g){case 1:Co(a,"load"),e=a.h,a.K=new cl({Ze:function(){return e.playbackRate},Hc:function(){return e.defaultPlaybackRate},rh:function(E){e.playbackRate=E},mi:function(E){e.currentTime+=E}}),f=function(){return Zo(a)},g=function(){return $o(a)},a.m.o(e,"playing",f),a.m.o(e,"pause",f),a.m.o(e,"ended",f),a.m.o(e,"ratechange",g),yo(a,a.g),a.Kb=a.g.preferredTextLanguage,a.ue=a.g.preferredTextRole,a.se=a.g.preferForcedSubs,
608
+ function Go(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return Co(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):Ad("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Yf=b,d=Xo(a.h,c,{uj:function(){return a.keySystem()},onMetadata:function(h,k,l){Yo(a,h,k,l)}},a.L),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ha=f,G(g,d.M,2);a.I=d;I(g)})}
609
+ function Mo(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L;return O(function(H){switch(H.g){case 1:Co(a,"load"),e=a.h,a.K=new cl({Ze:function(){return e.playbackRate},Jc:function(){return e.defaultPlaybackRate},rh:function(E){e.playbackRate=E},mi:function(E){e.currentTime+=E}}),f=function(){return Zo(a)},g=function(){return $o(a)},a.m.o(e,"playing",f),a.m.o(e,"pause",f),a.m.o(e,"ended",f),a.m.o(e,"ratechange",g),yo(a,a.g),a.Kb=a.g.preferredTextLanguage,a.ue=a.g.preferredTextRole,a.se=a.g.preferForcedSubs,
610
610
  ap(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.s.init(function(E,K,M){a.i&&a.j&&E!=a.j.j&&bp(a,E,!0,void 0===K?!1:K,void 0===M?0:M)}),a.s.setMediaElement(e),a.s.setCmsdManager(a.ea),a.j=cp(a),a.j.configure(a.g.streaming),a.l=dp,e.textTracks&&a.m.o(e.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":ep(a,E)}}),a.dispatchEvent(zo("streaming")),h=c;case 2:(l=a.j.j)||h||(h=fp(a,!0));m=[];k=l||h;n=t([k.video,k.audio]);for(p=n.next();!p.done;p=n.next())(r=
611
611
  p.value)&&!r.segmentIndex&&m.push(r.createSegmentIndex());if(!(0<m.length)){H.B(4);break}return G(H,Promise.all(m),4);case 4:if(!k||0!=k.disabledUntilTime){H.B(2);break}if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(k);a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&Va("Low-latency 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.");ap(a.i.presentationTimeline,
612
- a.g.playRangeStart,a.g.playRangeEnd);Sl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(E){a.G=gp(a,E);a.Lb=hp(a,E);ip(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ra);if(l){H.B(7);break}if(!a.g.streaming.startAtSegmentBoundary){H.B(8);break}w=a.i.presentationTimeline;v=a.ra||a.h.currentTime;A=w.Ic();z=w.Xb();v<A?v=A:v>z&&(v=z);return G(H,jp(h,v),9);case 9:C=H.h,u(C);case 8:bp(a,h,!0,!1,0);case 7:return a.G.dg(),y=a.uc().find(function(E){return E.active}),
613
- y||((B=If(a.i.textStreams,a.Kb,a.ue,a.se)[0]||null)&&kl(a.A.h,B,!0),h&&(B?(kp(a,h.audio,B)&&(a.qa=!0),a.qa&&a.I.H.setTextVisibility(!0),lp(a)):a.qa=!1),B&&(a.g.streaming.alwaysStreamText||a.Nc())&&am(a.j,B)),G(H,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),mp(a));Vo(a);Wo(a);a.i.variants.some(function(E){return E.primary});if((D=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)F=
612
+ a.g.playRangeStart,a.g.playRangeEnd);Sl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(E){a.G=gp(a,E);a.Lb=hp(a,E);ip(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ra);if(l){H.B(7);break}if(!a.g.streaming.startAtSegmentBoundary){H.B(8);break}w=a.i.presentationTimeline;v=a.ra||a.h.currentTime;A=w.sc();z=w.Xb();v<A?v=A:v>z&&(v=z);return G(H,jp(h,v),9);case 9:C=H.h,u(C);case 8:bp(a,h,!0,!1,0);case 7:return a.G.dg(),y=a.vc().find(function(E){return E.active}),
613
+ y||((B=If(a.i.textStreams,a.Kb,a.ue,a.se)[0]||null)&&kl(a.A.h,B,!0),h&&(B?(kp(a,h.audio,B)&&(a.qa=!0),a.qa&&a.I.H.setTextVisibility(!0),lp(a)):a.qa=!1),B&&(a.g.streaming.alwaysStreamText||a.Oc())&&am(a.j,B)),G(H,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),mp(a));Vo(a);Wo(a);a.i.variants.some(function(E){return E.primary});if((D=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)F=
614
614
  function(){return np(a)},a.m.o(e,"timeupdate",F);D||(J=function(){return op(a)},a.m.o(e,"timeupdate",J),op(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(L=function(){var E,K;return O(function(M){if(1==M.g){E=a.h.duration-a.h.currentTime;if(isNaN(E)||!(E<=a.g.streaming.preloadNextUrlWindow))return M.B(0);a.m.Pa(e,"timeupdate",L);K=a;return G(M,a.preload(a.i.nextUrl),4)}K.sa=M.h;I(M)})},a.m.o(e,"timeupdate",L)),a.m.o(e,"ended",function(){a.load(a.sa||a.i.nextUrl)})));if(a.u)a.u.onManifestUpdated(D);
615
- a.Ha=!0;a.m.ia(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-b});I(H)}})}
616
- function Ko(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Wc,d=Date.now()/1E3,e=!0,a.C=a.cd({hc:a.J,onError:function(k){Fo(a,k)},vf:function(){},onExpirationUpdated:function(){var k=zo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.A.j=Date.now()/1E3-d)}}),a.C.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
615
+ a.Ha=!0;a.m.ka(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-b});I(H)}})}
616
+ function Ko(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Wc,d=Date.now()/1E3,e=!0,a.C=a.dd({hc:a.J,onError:function(k){Fo(a,k)},vf:function(){},onExpirationUpdated:function(){var k=zo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.A.j=Date.now()/1E3-d)}}),a.C.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
617
617
  g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Le(b):"",codecs:b?Me(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ua,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(we(g.mimeType,
618
- g.codecs)),b.startsWith("audio/")?(g.type=c.ha,f.audio=g):f.video=g,a.C.Z=!0,G(h,Sh(a.C,[f],[]),2)):G(h,a.C.ac(a.h),0)})}
619
- function No(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return Co(a,"src-equals"),d=a.h,a.G=new Tk(d),e=!1,a.qe.push(function(){e=!0}),null!=a.ra&&a.G.eg(a.ra),a.K=new cl({Ze:function(){return d.playbackRate},Hc:function(){return d.defaultPlaybackRate},rh:function(w){d.playbackRate=w},mi:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,ip(a,d,f),g=function(){return Zo(a)},h=function(){return $o(a)},a.m.o(d,"playing",g),a.m.o(d,"pause",g),a.m.o(d,"ended",g),a.m.o(d,
620
- "ratechange",h),"none"!=d.preload&&a.m.ia(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.o(d.audioTracks,"addtrack",function(){return Vo(a)}),a.m.o(d.audioTracks,"removetrack",function(){return Vo(a)}),a.m.o(d.audioTracks,"change",function(){return Vo(a)})),d.textTracks&&(a.m.o(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":pp(a,w);break;case "chapters":ep(a,w);break;default:Vo(a)}}),a.m.o(d.textTracks,"removetrack",function(){return Vo(a)}),
621
- a.m.o(d.textTracks,"change",function(){return Vo(a)})),d.src=Dn(a.O,a.aa,c),(cc()||fc())&&d.load(),"none"!=d.preload&&!d.autoplay&&Ne(c)&&oc()&&d.load(),a.l=qp,a.dispatchEvent(zo("streaming")),k=new og,Kk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.G.dg();k.resolve()}),Kk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(v){if(1==v.g)return rp(a),w=sp(a),w.find(function(A){return"disabled"!=A.mode})?(0<w.length&&(a.qa=!0),v.B(2)):G(v,new Promise(function(A){a.m.ia(d.textTracks,
622
- "change",A);(new Vb(A)).X(1)}),2);if(e)return v.return();tp(a);I(v)})}),d.error?k.reject(Eo(a)):"none"==d.preload&&(Va('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.ia(d,"error",function(){k.reject(Eo(a))}),l=new Promise(function(w,v){(new Vb(v)).X(a.g.streaming.loadTimeout)}),G(u,Promise.race([k,
618
+ g.codecs)),b.startsWith("audio/")?(g.type=c.ia,f.audio=g):f.video=g,a.C.Y=!0,G(h,Sh(a.C,[f],[]),2)):G(h,a.C.ac(a.h),0)})}
619
+ function No(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return Co(a,"src-equals"),d=a.h,a.G=new Tk(d),e=!1,a.qe.push(function(){e=!0}),null!=a.ra&&a.G.eg(a.ra),a.K=new cl({Ze:function(){return d.playbackRate},Jc:function(){return d.defaultPlaybackRate},rh:function(w){d.playbackRate=w},mi:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,ip(a,d,f),g=function(){return Zo(a)},h=function(){return $o(a)},a.m.o(d,"playing",g),a.m.o(d,"pause",g),a.m.o(d,"ended",g),a.m.o(d,
620
+ "ratechange",h),"none"!=d.preload&&a.m.ka(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.o(d.audioTracks,"addtrack",function(){return Vo(a)}),a.m.o(d.audioTracks,"removetrack",function(){return Vo(a)}),a.m.o(d.audioTracks,"change",function(){return Vo(a)})),d.textTracks&&(a.m.o(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":pp(a,w);break;case "chapters":ep(a,w);break;default:Vo(a)}}),a.m.o(d.textTracks,"removetrack",function(){return Vo(a)}),
621
+ a.m.o(d.textTracks,"change",function(){return Vo(a)})),d.src=Dn(a.O,a.aa,c),(cc()||fc())&&d.load(),"none"!=d.preload&&!d.autoplay&&Ne(c)&&oc()&&d.load(),a.l=qp,a.dispatchEvent(zo("streaming")),k=new og,Kk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.G.dg();k.resolve()}),Kk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(v){if(1==v.g)return rp(a),w=sp(a),w.find(function(A){return"disabled"!=A.mode})?(0<w.length&&(a.qa=!0),v.B(2)):G(v,new Promise(function(A){a.m.ka(d.textTracks,
622
+ "change",A);(new Vb(A)).X(1)}),2);if(e)return v.return();tp(a);I(v)})}),d.error?k.reject(Eo(a)):"none"==d.preload&&(Va('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.ka(d,"error",function(){k.reject(Eo(a))}),l=new Promise(function(w,v){(new Vb(v)).X(a.g.streaming.loadTimeout)}),G(u,Promise.race([k,
623
623
  l]),2);if((m=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return np(a)},a.m.o(d,"timeupdate",n);m||(p=function(){return op(a)},a.m.o(d,"timeupdate",p),op(a));a.u&&(a.u.onManifestUpdated(m),m&&(r=a.Oa().end,a.m.o(d,"progress",function(){var w=a.Oa().end;r!=w&&(a.u.onManifestUpdated(a.U()),r=w)})));a.Ha=!0;I(u)})}
624
624
  function rp(a){var b=a.g.preferredAudioLanguage;""!=b&&a.jh(b,a.g.preferredVariantRole)}function tp(a){var b=a.g.preferredTextLanguage;""!=b&&a.kh(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
625
625
  function pp(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.o(b,"cuechange",function(){if(b.activeCues){for(var d=[],e={},f=t(b.activeCues),g=f.next();!g.done;e={fb:e.fb},g=f.next()){e.fb=g.value;So(a,e.fb.startTime,e.fb.endTime,e.fb.type,e.fb.value);if(a.u)a.u.onCueMetadataChange(e.fb.value);"com.apple.quicktime.HLS"==e.fb.type&&null!=e.fb.startTime&&(g=d.find(function(h){return function(k){return k.startTime==h.fb.startTime&&k.endTime==h.fb.endTime}}(e)),g||(g={startTime:e.fb.startTime,endTime:e.fb.endTime,
626
626
  values:[]},d.push(g)),g.values.push(e.fb.value))}d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.u&&(e.values.push({key:"CUE",description:"",data:"ONCE",mimeType:null,pictureType:null}),a.u.onInterstitialMetadata(a,a.h,e))}});var c=(new Vb(function(){var d=up(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Sa().X(.5);a.qe.push(function(){c.stop()})}}
627
627
  function Yo(a,b,c,d){b=t(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=t(e.frames),k=h.next();!k.done;k=h.next())So(a,f,g,"org.id3",k.value);if(a.u)a.u.onHlsTimedMetadata(e,f)}}function So(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(zo("metadata",b))}
628
- function ep(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Vb(function(){b.mode="hidden"})).Sa().X(.5);a.qe.push(function(){c.stop()})}}q.yk=function(){for(var a=this.W;a.g;)a.release()};q.cd=function(a){return new Lh(a)};
628
+ function ep(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Vb(function(){b.mode="hidden"})).Sa().X(.5);a.qe.push(function(){c.stop()})}}q.yk=function(){for(var a=this.W;a.g;)a.release()};q.dd=function(a){return new Lh(a)};
629
629
  function to(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?Lm(b(),!0,e):e()}b||(b=function(){return null});return new yg(function(e,f,g,h){var k=b()?b().i:a.s;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(zo("downloadheadersreceived",f));d(function(){if(a.ea){var h=a.ea;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],
630
630
  $n(n[1]))}}catch(v){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],$n(u[1]))}var w=p}catch(v){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(zo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.O,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Kn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
631
631
  "d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Kn(h,f,{ot:Hn,su:!h.i})}}catch(N){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case Jg: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.U()?"l":"v"};n.ot=On(k);var p=n.ot===Ln||n.ot===Fn||n.ot===Gn||n.ot===Qn,r=k.stream;if(r){var u=h.h.Ua();if(p&&(n.bl=Sn(h,r.type),n.ot!==Qn)){var w=Tn(h,r.type);n.dl=u?w/Math.abs(u):w}r.bandwidth&&(n.br=r.bandwidth/1E3);
@@ -634,10 +634,10 @@ if(r.segmentIndex&&m){var v=r.segmentIndex.dc(m.endTime,!0,0>u);if(v){var A=v.ne
634
634
  function gp(a,b){return new Uk(a.h,a.i,a.g.streaming,b,function(){a.Lb&&fl(a.Lb,!0);a.j&&a.j.ve();a.M&&vp(a)},function(c){return a.dispatchEvent(c)})}
635
635
  function hp(a,b){b=new Zm(a.ke,a.U()||0<b);b.addEventListener("enter",function(d){To(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){To(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(To(a,"timelineregionenter",e),To(a,"timelineregionexit",e))});var c=new el(a.h);c.g.add(b);a.ie&&c.g.add(a.ie);return c}
636
636
  function ip(a,b,c){a.M=new hg;a.M.g=jg;kg(a.M,c,Math.min(.5,c/2));Ho(a);a.Jf=(new Vb(function(){vp(a)})).wa(.25);a.m.o(b,"waiting",function(){return vp(a)});a.m.o(b,"stalled",function(){return vp(a)});a.m.o(b,"canplaythrough",function(){return vp(a)});a.m.o(b,"progress",function(){return vp(a)})}
637
- function vp(a){switch(a.l){case qp:if(a.h.ended)var b=!0;else{var c=Pi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case dp:a:if(a.h.ended||Xj(a.I))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.sc();var d=Pi(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ri(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?ig:jg;c.g=d;(b=b!=d)&&d===ig&&(c.h=Date.now());b&&Ho(a)}function Xo(a,b,c,d){return new Oj(a,b,c,d)}
637
+ function vp(a){switch(a.l){case qp:if(a.h.ended)var b=!0;else{var c=Pi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case dp:a:if(a.h.ended||Xj(a.I))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.tc();var d=Pi(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ri(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?ig:jg;c.g=d;(b=b!=d)&&d===ig&&(c.h=Date.now());b&&Ho(a)}function Xo(a,b,c,d){return new Oj(a,b,c,d)}
638
638
  function so(a){return new Bn({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Wb:function(){return a.Wb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Ua:function(){return a.Ua()},Gb:function(){return a.Gb()},Jb:function(){return a.Jb()},U:function(){return a.U()}},a.g.cmcd)}
639
639
  function cp(a){return new Ml(a.i,{Ye:function(){return a.G?a.G.Oe():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Ua:function(){return a.Ua()},oa:a.I,hc:a.J,onError:function(b){return Fo(a,b)},onEvent:function(b){return a.dispatchEvent(b)},nk:function(){a.H&&a.H.update&&a.H.update()},$g:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(a.G){a.G.ni();var h=Yj(a.I,f);!a.U()&&a.h.paused&&null!=h&&0<h&&a.G.Oe()<h&&a.G.eg(h)}vp(a);d=(new Map).set("start",
640
- d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(zo("segmentappended",d));a.s&&c.fastSwitching&&b.oe&&b.kf&&a.s.trySuggestStreams()},lk:function(b,c){(c=c.nd)&&a.ie&&Bl(a.ie,c,b)},Jh:function(b,c){var d=a.C;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){c=new ch(Hb(c));var e=0,f=t(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=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,
640
+ d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(zo("segmentappended",d));a.s&&c.fastSwitching&&b.oe&&b.kf&&a.s.trySuggestStreams()},lk:function(b,c){(c=c.od)&&a.ie&&Bl(a.ie,c,b)},Jh:function(b,c){var d=a.C;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){c=new ch(Hb(c));var e=0,f=t(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=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,
641
641
  f),f+=b.length;ai(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){Yo(a,b,c,d)},disableStream:function(b,c){return a.disableStream(b,c)}})}
642
642
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=wm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Ad("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Ad("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
643
643
  a.streaming&&"useNativeHlsOnSafari"in a.streaming&&(Ad("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&jc(),delete a.streaming.useNativeHlsOnSafari);if(a.streaming&&"boolean"==typeof a.streaming.liveSync){Ad("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var c=a.streaming.liveSync;a.streaming.liveSync={};a.streaming.liveSync.enabled=
@@ -650,28 +650,28 @@ a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if
650
650
  (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.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=
651
651
  100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),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));c=Jm(this.g,a,
652
652
  ro(this));wp(this);return c};
653
- function wp(a){a.Gf=new vi(a.g,a.ka,a.C);if(a.H){var b=Ze(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.C&&a.C.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=Ao&&xi(a.Gf,a.i)&&Vo(a)}catch(f){Fo(a,f)}a.s&&Wo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||wo(a)}a.J&&(a.J.ph(a.g.streaming.forceHTTP),a.J.qh(a.g.streaming.forceHTTPS));if(a.I)if(a.I.configure(a.g.mediaSource),a.I.ka=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
653
+ function wp(a){a.Gf=new vi(a.g,a.ha,a.C);if(a.H){var b=Ze(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.C&&a.C.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=Ao&&xi(a.Gf,a.i)&&Vo(a)}catch(f){Fo(a,f)}a.s&&Wo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||wo(a)}a.J&&(a.J.ph(a.g.streaming.forceHTTP),a.J.qh(a.g.streaming.forceHTTPS));if(a.I)if(a.I.configure(a.g.mediaSource),a.I.ha=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
654
654
  a.Yf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):Ad("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.I,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Yf=b;a.j&&(b=a.j,(c=b.i.get(Uc))&&Zl(b,c.stream,!0,0,!0))}else b=a.I.H,b.configure&&b.configure(a.g.textDisplayer);a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?a.s.enable():a.s.disable(),mp(a));a.M&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
655
655
  kg(a.M,b,Math.min(.5,b/2)));a.i&&ap(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u&&a.u.configure(a.g.ads);a.O&&a.O.configure(a.g.cmcd);a.ea&&a.ea.configure(a.g.cmsd)}q.getConfiguration=function(){var a=ro(this);Jm(a,this.g,ro(this));return a};q.Zh=function(){var a=ro(this);Jm(a,this.g,ro(this));return ym(this.g,ro(this))};
656
- q.Vh=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Oa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Ck=function(){for(var a in this.g)delete this.g[a];Jm(this.g,ro(this),ro(this));wp(this)};q.gd=function(){return this.l};q.Kg=function(){return this.i?this.i.type:null};q.Bj=function(){return this.h};
657
- q.Gb=function(){return this.J};q.fd=function(){return this.aa};q.Ve=function(){return this.u?this.u:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};q.Mc=function(){return this.i?this.i.presentationTimeline.Mc():!1};q.Lc=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
658
- q.Oa=function(){if(this.i){if(!this.Ha&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Ic(),end:a.Xb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Rj=function(){this.U()&&(this.h.currentTime=this.Oa().end)};q.ei=function(){return this.Ha};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.C?this.C.g:null};
656
+ q.Vh=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Oa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Ck=function(){for(var a in this.g)delete this.g[a];Jm(this.g,ro(this),ro(this));wp(this)};q.hd=function(){return this.l};q.Kg=function(){return this.i?this.i.type:null};q.Bj=function(){return this.h};
657
+ q.Gb=function(){return this.J};q.gd=function(){return this.aa};q.Ve=function(){return this.u?this.u:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};q.Nc=function(){return this.i?this.i.presentationTimeline.Nc():!1};q.Mc=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
658
+ q.Oa=function(){if(this.i){if(!this.Ha&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.sc(),end:a.Xb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Rj=function(){this.U()&&(this.h.currentTime=this.Oa().end)};q.ei=function(){return this.Ha};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.C?this.C.g:null};
659
659
  q.Xd=function(){return this.C?this.C.Xd():Infinity};q.Hg=function(){return this.C?this.C.Hg():[]};q.Xe=function(){return this.C?this.C.Xe():{}};q.ce=function(){return this.M?this.M.g==jg:!1};q.Ua=function(){return this.h?this.K?this.K.i:1:0};
660
- q.Uc=function(a){var b=this;0==a?Va("A trick play rate of 0 is unsupported!"):(this.Ia.Za(),this.h.paused&&this.h.play(),this.K.set(a),this.l==dp&&(this.s.playbackRateChanged(a),Yl(this.j,1<Math.abs(a))),this.U()&&this.Ia.o(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Oa(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.bd():Math.floor(c)<=Math.floor(d.start+e)&&b.bd()}))};
661
- q.bd=function(){var a=this.K.Hc();this.l==qp&&this.K.set(a);this.l==dp&&(this.K.set(a),this.s.playbackRateChanged(a),Yl(this.j,!1));this.Ia.Za()};
660
+ q.Vc=function(a){var b=this;0==a?Va("A trick play rate of 0 is unsupported!"):(this.Ia.Za(),this.h.paused&&this.h.play(),this.K.set(a),this.l==dp&&(this.s.playbackRateChanged(a),Yl(this.j,1<Math.abs(a))),this.U()&&this.Ia.o(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Oa(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.cd():Math.floor(c)<=Math.floor(d.start+e)&&b.cd()}))};
661
+ q.cd=function(){var a=this.K.Jc();this.l==qp&&this.K.set(a);this.l==dp&&(this.K.set(a),this.s.playbackRateChanged(a),Yl(this.j,!1));this.Ia.Za()};
662
662
  q.Jb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Gf(e)){var f=yf(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.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return Ff(g)}):[]};
663
- q.uc=function(){if(this.i){for(var a=this.j?this.j.u:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=zf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?sp(this).map(function(f){return Df(f)}):[]};q.We=function(){var a=this.ye;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Af(b)})};
664
- q.fj=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=dp&&b.l!=qp)return g.return(null);c=b.ye;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.qc(function(h){var k=xp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Ec;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.Mg(a,h.startTime+l*m/k))}}),G(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
665
- function xp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Ec:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
666
- q.Mg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;return O(function(B){if(1==B.g){if(c.l!=dp&&c.l!=qp)return B.return(null);d=c.ye;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?B.B(2):G(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=xp(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.Ec;n=l/h.rows;p=h.Ec*h.rows;r=g.i-g.startTime;
667
- u=g.A||r/p;w=g.startTime;A=v=0;1<p&&(z=Math.floor((b-g.startTime)/u),w=g.startTime+z*u,v=z%h.Ec*m,A=Math.floor(z/h.Ec)*n);C=!1;if(y=g.u)C=!0,n=y.height,v=y.positionX,A=y.positionY,m=y.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:v,positionY:A,startTime:w,duration:u,uris:g.R(),width:m,sprite:C})})};
663
+ q.vc=function(){if(this.i){for(var a=this.j?this.j.u:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=zf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?sp(this).map(function(f){return Df(f)}):[]};q.We=function(){var a=this.ye;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Af(b)})};
664
+ q.fj=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=dp&&b.l!=qp)return g.return(null);c=b.ye;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.qc(function(h){var k=xp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Gc;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.Mg(a,h.startTime+l*m/k))}}),G(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
665
+ function xp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Gc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
666
+ q.Mg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;return O(function(B){if(1==B.g){if(c.l!=dp&&c.l!=qp)return B.return(null);d=c.ye;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?B.B(2):G(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=xp(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.Gc;n=l/h.rows;p=h.Gc*h.rows;r=g.i-g.startTime;
667
+ u=g.A||r/p;w=g.startTime;A=v=0;1<p&&(z=Math.floor((b-g.startTime)/u),w=g.startTime+z*u,v=z%h.Gc*m,A=Math.floor(z/h.Gc)*n);C=!1;if(y=g.u)C=!0,n=y.height,v=y.positionX,A=y.positionY,m=y.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:v,positionY:A,startTime:w,duration:u,uris:g.R(),width:m,sprite:C})})};
668
668
  q.lh=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.u&&(kl(this.A.h,b,!1),am(this.j,b),yp(this),this.Kb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=sp(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,Bf(c)==a.id?c.mode=this.qa?"showing":"hidden":c.mode="disabled";yp(this)}};
669
669
  q.Af=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&Gf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");bp(this,d,!1,b,c);this.Aa=new Xf(d,
670
- this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);Wo(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,Bf(c)==a.id){zp(this,c);break}};q.hj=function(){return Ap(this.Jb())};q.Ij=function(){return Ap(this.uc())};q.gj=function(){return Array.from(Bp(this.Jb()))};q.Hj=function(){return Array.from(Bp(this.uc()))};
670
+ this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);Wo(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,Bf(c)==a.id){zp(this,c);break}};q.hj=function(){return Ap(this.Jb())};q.Ij=function(){return Ap(this.vc())};q.gj=function(){return Array.from(Bp(this.Jb()))};q.Hj=function(){return Array.from(Bp(this.vc()))};
671
671
  q.jh=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.G){this.Aa=new Yf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,e);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;e=this.Aa.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())f=f.value,
672
- Gf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=yf(c),this.Af(a,!0,d)):wo(this))}else this.h&&this.h.audioTracks&&(d=If(this.Jb(),a,b||"",!1)[0])&&this.Af(d)};q.kh=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Kb=a,this.ue=b||"",this.se=c,(a=If(this.i.textStreams,this.Kb,this.ue,this.se)[0]||null)&&a!=this.j.u&&(kl(this.A.h,a,!1),this.g.streaming.alwaysStreamText||this.Nc()))am(this.j,a),yp(this)}else(a=If(this.uc(),a,b||"",c)[0])&&this.lh(a)};
672
+ Gf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=yf(c),this.Af(a,!0,d)):wo(this))}else this.h&&this.h.audioTracks&&(d=If(this.Jb(),a,b||"",!1)[0])&&this.Af(d)};q.kh=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Kb=a,this.ue=b||"",this.se=c,(a=If(this.i.textStreams,this.Kb,this.ue,this.se)[0]||null)&&a!=this.j.u&&(kl(this.A.h,a,!1),this.g.streaming.alwaysStreamText||this.Oc()))am(this.j,a),yp(this)}else(a=If(this.vc(),a,b||"",c)[0])&&this.lh(a)};
673
673
  q.Jk=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.G){for(var d=null,e=t(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.Aa=new Yf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),wo(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&zp(this,b)}};
674
- q.Nc=function(){var a=this.qa;return this.I&&this.l==dp?this.I.H.isTextVisible():this.h&&this.h.src&&this.h.textTracks?sp(this).some(function(b){return"showing"==b.mode}):a};q.Wh=function(){return this.h&&this.h.src&&this.h.textTracks?Cp(this).map(function(a){return Df(a)}):[]};
674
+ q.Oc=function(){var a=this.qa;return this.I&&this.l==dp?this.I.H.isTextVisible():this.h&&this.h.src&&this.h.textTracks?sp(this).some(function(b){return"showing"==b.mode}):a};q.Wh=function(){return this.h&&this.h.src&&this.h.textTracks?Cp(this).map(function(a){return Df(a)}):[]};
675
675
  q.kj=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=ad(a),c=Cp(this).filter(function(h){return ad(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(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};
676
676
  function sp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function up(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function Cp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
677
677
  q.Cf=function(a){a=!!a;if(this.qa!=a){this.qa=a;if(this.l==dp)this.I.H.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=If(this.i.textStreams,this.Kb,this.ue,this.se),0<a.length&&(am(this.j,a[0]),yp(this))):Xl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=sp(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}lp(this)}};
@@ -682,18 +682,18 @@ stateHistory:[]};Zo(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&
682
682
  var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.A.C=e}c&&c.video&&(b=this.A,d=c.video.height||NaN,b.s=c.video.width||NaN,b.l=d);this.U()&&(c=this.$h().valueOf()+1E3*a.currentTime,this.A.G=(Date.now()-c)/1E3);this.i&&(this.A.I=this.i.periodCount,this.A.H=this.i.gapCount,this.i.presentationTimeline&&(this.A.K=this.i.presentationTimeline.g));c=this.s.getBandwidthEstimate();this.A.A=c}this.l==qp&&(c=this.A,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var f=this.A;a=f.s;c=f.l;b=f.C;d=
683
683
  f.O;e=f.P;var g=f.M,h=f.W,k=f.S,l=f.A,m=f.i,n=f.m,p=f.J,r=f.j,u=hl(f.g,"playing"),w=hl(f.g,"paused"),v=hl(f.g,"buffering"),A=f.u,z=f.G,C=f.K,y=f.ii,B=f.Pe,D=f.L,F=f.I,J=f.H,L=il(f.g),H=[];f=t(f.h.g);for(var E=f.next();!E.done;E=f.next())E=E.value,H.push({timestamp:E.timestamp,id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,
684
684
  loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:w,bufferingTime:v,licenseTime:A,liveLatency:z,maxSegmentDuration:C,manifestSizeBytes:y,bytesDownloaded:B,nonFatalErrorCount:D,manifestPeriodCount:F,manifestGapCount:J,stateHistory:L,switchHistory:H}};
685
- q.Wi=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,w,v,A,z,C;return O(function(y){switch(y.g){case 1:if(h.l!=dp&&h.l!=qp)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&Va("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){y.B(2);break}return G(y,Dp(h,a),3);case 3:d=y.h;case 2:k=[];h.u&&(k=h.u.getCuePoints());if(h.l!=qp){y.B(4);break}g&&(c="forced");return G(y,Ep(h,a,b,c,d,f||"",k),5);case 5:l=ad(b);m=h.uc();if(n=m.find(function(B){return ad(B.language)==
685
+ q.Wi=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,w,v,A,z,C;return O(function(y){switch(y.g){case 1:if(h.l!=dp&&h.l!=qp)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&Va("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){y.B(2);break}return G(y,Dp(h,a),3);case 3:d=y.h;case 2:k=[];h.u&&(k=h.u.getCuePoints());if(h.l!=qp){y.B(4);break}g&&(c="forced");return G(y,Ep(h,a,b,c,d,f||"",k),5);case 5:l=ad(b);m=h.vc();if(n=m.find(function(B){return ad(B.language)==
686
686
  l&&B.label==(f||"")&&B.kind==c}))return Vo(h),y.return(n);throw new T(1,2,2012);case 4:p=Wc;r=h.h.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new T(1,4,4033);if(!k.length){y.B(6);break}return G(y,Fp(h,a,h.J,h.g.streaming.retryParameters),7);case 7:u=y.h,w=Gp(h,u,d,k),v=new Blob([w],{type:"text/vtt"}),a=Rj(v),d="text/vtt";case 6:A={id:h.Zf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:al(0,r,[a]),mimeType:d||"",
687
687
  codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.Ka,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([we(d||"",e||"")])};z=we(A.mimeType,A.codecs);C=Pe(z);if(!C)throw new T(2,2,2014,d);h.i.textStreams.push(A);Vo(h);return y.return(zf(A))}})};
688
688
  q.Xi=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z;return O(function(C){switch(C.g){case 1:if(c.l!=dp&&c.l!=qp)throw new T(1,7,7004);if(b){C.B(2);break}return G(C,Dp(c,a),3);case 3:b=C.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Wc;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return G(C,Fp(c,a,c.J,c.g.streaming.retryParameters),4);case 4:f=C.h;g=Qe[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
689
- vttOffset:0};l=Hb(f);m=h.parseMedia(l,k,a);n=[];p={};r=t(m);for(u=r.next();!u.done;p={Md:p.Md,Bc:p.Bc},u=r.next())p.Bc=u.value,p.Md=null,w=function(y){return function(){null==y.Md&&(y.Md=Oc([a],[y.Bc.payload]));return y.Md||[]}}(p),v=new Ki(p.Bc.startTime,p.Bc.endTime,w,0,null,null,0,0,Infinity),p.Bc.payload.includes("#xywh")&&(A=p.Bc.payload.split("#xywh=")[1].split(","),4===A.length&&v.Fi({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
689
+ vttOffset:0};l=Hb(f);m=h.parseMedia(l,k,a);n=[];p={};r=t(m);for(u=r.next();!u.done;p={Md:p.Md,Dc:p.Dc},u=r.next())p.Dc=u.value,p.Md=null,w=function(y){return function(){null==y.Md&&(y.Md=Oc([a],[y.Dc.payload]));return y.Md||[]}}(p),v=new Ki(p.Dc.startTime,p.Dc.endTime,w,0,null,null,0,0,Infinity),p.Dc.payload.includes("#xywh")&&(A=p.Dc.payload.split("#xywh=")[1].split(","),4===A.length&&v.Fi({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
690
690
  n.push(v);z={id:c.Zf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Zk(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.ag,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([we(b||
691
691
  "","")])};c.l==qp?c.ye.push(z):c.i.imageStreams.push(z);Vo(c);return C.return(Af(z))}})};
692
- q.Vi=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=dp&&d.l!=qp)throw new T(1,7,7004);if(c){k.B(2);break}return G(k,Dp(d,a),3);case 3:c=k.h;case 2:return e=[],d.u&&(e=d.u.getCuePoints()),G(k,Ep(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Wh();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return G(k,new Promise(function(l,m){d.m.ia(f,"load",l);d.m.ia(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return Vo(d),k.return(h);case 5:throw new T(1,
692
+ q.Vi=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=dp&&d.l!=qp)throw new T(1,7,7004);if(c){k.B(2);break}return G(k,Dp(d,a),3);case 3:c=k.h;case 2:return e=[],d.u&&(e=d.u.getCuePoints()),G(k,Ep(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Wh();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return G(k,new Promise(function(l,m){d.m.ka(f,"load",l);d.m.ka(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return Vo(d),k.return(h);case 5:throw new T(1,
693
693
  2,2012);}})};function Dp(a,b){var c;return O(function(d){switch(d.g){case 1:return ta(d,2),G(d,dn(b,a.J,a.g.streaming.retryParameters),4);case 4:c=d.h;va(d,3);break;case 2:wa(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
694
694
  function Ep(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?G(n,Fp(a,b,a.J,a.g.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=Gp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Rj(l),e="text/vtt");m=document.createElement("track");var p=a.O,r=b;try{if(p.g.enabled){var u=En(p);u.ot=Rn;u.su=!0;var w=In(u);var v=Jn(r,w)}else v=r}catch(A){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),v=r}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
695
695
  a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function Fp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=Jg;f=Dg([b],d);f.method="GET";var k=a.O;try{k.g.enabled&&Kn(k,f,{ot:Rn,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return G(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
696
- function Gp(a,b,c,d){var e=Qe[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Hb(b),b=c.parseMedia(b,a,null),An(b,d);throw new T(2,2,2014,c);}q.Pk=function(a,b){this.ka.width=a;this.ka.height=b};q.gh=function(a){if(this.l==dp){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.ae||d.ib||d.Tb||(d.ae=!1,Wl(b,d,a));b=!0}}else b=!1;return b};
696
+ function Gp(a,b,c,d){var e=Qe[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Hb(b),b=c.parseMedia(b,a,null),An(b,d);throw new T(2,2,2014,c);}q.Pk=function(a,b){this.ha.width=a;this.ha.height=b};q.gh=function(a){if(this.l==dp){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.ae||d.ib||d.Tb||(d.ae=!1,Wl(b,d,a));b=!0}}else b=!1;return b};
697
697
  q.Jg=function(){Va("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};q.yj=function(){return this.Xa};
698
698
  function ro(a){var b=Fm();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.gh(d))}};b.textDisplayFactory=function(){if(a.Hf){var c=a.getConfiguration();return new rn(a.h,a.Hf,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new ln(a.h,"Shaka Player TextTrack"):new nn};return b}q.uh=function(a){this.Hf=a};
699
699
  function Ro(a,b){for(var c=new Set,d=t(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=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(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 bl,l=e.closedCaptions.get(g);h={id:a.Zf++,originalId:g,groupId:null,
@@ -702,10 +702,10 @@ function jp(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d
702
702
  function Ho(a){var b=a.ce();if(a.A&&a.M&&a.G){var c=a.K;c.j=b;dl(c);a.O&&(c=a.O,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Zo(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Ne<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.P&&(a.P=Math.min(a.P+ ++a.Ne*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(zo("buffering",
703
703
  b))}function $o(a){var b=a.h.playbackRate;0!=b&&(a.K&&a.K.set(b),b=zo("ratechange"),a.dispatchEvent(b))}
704
704
  function Zo(a){if(a.A&&a.M){var b=a.A.g,c="playing";a.M.g==jg?c="buffering":a.h.paused?c="paused":a.h.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(zo("statechanged",c)))}}
705
- function np(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Vh();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Uc(d):1==e&&b!==a.K.Hc()&&a.bd()}if(c&&(c=a.Oa(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(a.g.streaming.liveSync&&
705
+ function np(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Vh();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Vc(d):1==e&&b!==a.K.Jc()&&a.cd()}if(c&&(c=a.Oa(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(a.g.streaming.liveSync&&
706
706
  a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?k=Math.max(0,a.i.serviceDescription.targetLatency-
707
707
  d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.P||"number"!==typeof g||(a.P=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Fa&&null!==a.P&&"number"===typeof g&&a.Ne<n&&Date.now()-a.Fa>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,a.P=Math.max(a.P-(g-f)/2,f+d),
708
- a.Fa=Date.now());e&&null!==a.P&&(h=a.P+d,k=a.P-d);g=c.end-a.h.currentTime;d=0;a.l==qp&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.M.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Uc(m):h&&l&&g-d>h?(b!=l&&a.Uc(l),a.Fa=null):k&&m&&g-d<k?(b!=m&&a.Uc(m),a.Fa=null):b!==a.K.Hc()&&(a.bd(),a.Fa=Date.now())}}
708
+ a.Fa=Date.now());e&&null!==a.P&&(h=a.P+d,k=a.P-d);g=c.end-a.h.currentTime;d=0;a.l==qp&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.M.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Vc(m):h&&l&&g-d>h?(b!=l&&a.Vc(l),a.Fa=null):k&&m&&g-d<k?(b!=m&&a.Vc(m),a.Fa=null):b!==a.K.Jc()&&(a.cd(),a.Fa=Date.now())}}
709
709
  function op(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.S)?(a.S=c,b=!0):(c=Math.max(a.S,c),a.S!=c&&(a.S=c,b=!0)));if(b){var d;0==a.S?d=zo("started"):25==a.S?d=zo("firstquartile"):50==a.S?d=zo("midpoint"):75==a.S?d=zo("thirdquartile"):100==a.S&&(d=zo("complete"));d&&a.dispatchEvent(d)}}}function Wo(a){try{zi(a.Gf,a.i)}catch(c){return Fo(a,c),!1}var b=Hf(a.i.variants);b=a.Aa.create(b);a.s.setVariants(Array.from(b.values()));return!0}
710
710
  function fp(a,b){b=void 0===b?!1:b;return Wo(a)?a.s.chooseVariant(b):null}function wo(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=fp(a);f&&bp(a,f,e,b,c,d)}
711
711
  function bp(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&$l(a.j,b,d,e,!0);else{var h=a.A.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));$l(a.j,b,d,e,f,c);d=null;g&&(d=yf(g));b=yf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&Hj(a.L,b,a.Kg()),c=zo("adaptation",c),Hp(a,c)):Ip(a,d,b)}}
@@ -720,15 +720,15 @@ function Eo(a){if(!a.h.error)return null;var b=a.h.error.code;if(1==b)return nul
720
720
  function Bp(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(ad(c.language)):b.add("und");return b}
721
721
  function Ap(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=ad(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(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=t(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));
722
722
  h.push({language:l,role:m,label:n})}});return h}P("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.uh;X.prototype.getManifestParserFactory=X.prototype.yj;X.prototype.getManifest=X.prototype.Jg;X.prototype.retryStreaming=X.prototype.gh;X.prototype.setMaxHardwareResolution=X.prototype.Pk;X.prototype.addChaptersTrack=X.prototype.Vi;X.prototype.addThumbnailsTrack=X.prototype.Xi;X.prototype.addTextTrackAsync=X.prototype.Wi;X.prototype.getStats=X.prototype.getStats;
723
- X.prototype.getBufferedInfo=X.prototype.Wb;X.prototype.getSegmentAvailabilityDuration=X.prototype.$e;X.prototype.getPresentationStartTimeAsDate=X.prototype.$h;X.prototype.getPlayheadTimeAsDate=X.prototype.Cj;X.prototype.setTextTrackVisibility=X.prototype.Cf;X.prototype.getChapters=X.prototype.kj;X.prototype.getChaptersTracks=X.prototype.Wh;X.prototype.isTextTrackVisible=X.prototype.Nc;X.prototype.selectVariantsByLabel=X.prototype.Jk;X.prototype.selectTextLanguage=X.prototype.kh;
724
- X.prototype.selectAudioLanguage=X.prototype.jh;X.prototype.getTextLanguages=X.prototype.Hj;X.prototype.getAudioLanguages=X.prototype.gj;X.prototype.getTextLanguagesAndRoles=X.prototype.Ij;X.prototype.getAudioLanguagesAndRoles=X.prototype.hj;X.prototype.selectVariantTrack=X.prototype.Af;X.prototype.selectTextTrack=X.prototype.lh;X.prototype.getThumbnails=X.prototype.Mg;X.prototype.getAllThumbnails=X.prototype.fj;X.prototype.getImageTracks=X.prototype.We;X.prototype.getTextTracks=X.prototype.uc;
725
- X.prototype.getVariantTracks=X.prototype.Jb;X.prototype.cancelTrickPlay=X.prototype.bd;X.prototype.trickPlay=X.prototype.Uc;X.prototype.getPlaybackRate=X.prototype.Ua;X.prototype.isBuffering=X.prototype.ce;X.prototype.getKeyStatuses=X.prototype.Xe;X.prototype.getActiveSessionsMetadata=X.prototype.Hg;X.prototype.getExpiration=X.prototype.Xd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.ei;X.prototype.goToLive=X.prototype.Rj;
726
- X.prototype.seekRange=X.prototype.Oa;X.prototype.isAudioOnly=X.prototype.Lc;X.prototype.isInProgress=X.prototype.Mc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.Ve;X.prototype.getAssetUri=X.prototype.fd;X.prototype.getNetworkingEngine=X.prototype.Gb;X.prototype.getMediaElement=X.prototype.Bj;X.prototype.getManifestType=X.prototype.Kg;X.prototype.getLoadMode=X.prototype.gd;X.prototype.resetConfiguration=X.prototype.Ck;X.prototype.getBufferFullness=X.prototype.Vh;
727
- X.prototype.getNonDefaultConfiguration=X.prototype.Zh;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.yk;X.prototype.destroyAllPreloads=X.prototype.qg;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Rh;X.prototype.unloadAndSavePreload=X.prototype.Tk;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Xk;X.prototype.unload=X.prototype.yc;
723
+ X.prototype.getBufferedInfo=X.prototype.Wb;X.prototype.getSegmentAvailabilityDuration=X.prototype.$e;X.prototype.getPresentationStartTimeAsDate=X.prototype.$h;X.prototype.getPlayheadTimeAsDate=X.prototype.Cj;X.prototype.setTextTrackVisibility=X.prototype.Cf;X.prototype.getChapters=X.prototype.kj;X.prototype.getChaptersTracks=X.prototype.Wh;X.prototype.isTextTrackVisible=X.prototype.Oc;X.prototype.selectVariantsByLabel=X.prototype.Jk;X.prototype.selectTextLanguage=X.prototype.kh;
724
+ X.prototype.selectAudioLanguage=X.prototype.jh;X.prototype.getTextLanguages=X.prototype.Hj;X.prototype.getAudioLanguages=X.prototype.gj;X.prototype.getTextLanguagesAndRoles=X.prototype.Ij;X.prototype.getAudioLanguagesAndRoles=X.prototype.hj;X.prototype.selectVariantTrack=X.prototype.Af;X.prototype.selectTextTrack=X.prototype.lh;X.prototype.getThumbnails=X.prototype.Mg;X.prototype.getAllThumbnails=X.prototype.fj;X.prototype.getImageTracks=X.prototype.We;X.prototype.getTextTracks=X.prototype.vc;
725
+ X.prototype.getVariantTracks=X.prototype.Jb;X.prototype.cancelTrickPlay=X.prototype.cd;X.prototype.trickPlay=X.prototype.Vc;X.prototype.getPlaybackRate=X.prototype.Ua;X.prototype.isBuffering=X.prototype.ce;X.prototype.getKeyStatuses=X.prototype.Xe;X.prototype.getActiveSessionsMetadata=X.prototype.Hg;X.prototype.getExpiration=X.prototype.Xd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.ei;X.prototype.goToLive=X.prototype.Rj;
726
+ X.prototype.seekRange=X.prototype.Oa;X.prototype.isAudioOnly=X.prototype.Mc;X.prototype.isInProgress=X.prototype.Nc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.Ve;X.prototype.getAssetUri=X.prototype.gd;X.prototype.getNetworkingEngine=X.prototype.Gb;X.prototype.getMediaElement=X.prototype.Bj;X.prototype.getManifestType=X.prototype.Kg;X.prototype.getLoadMode=X.prototype.hd;X.prototype.resetConfiguration=X.prototype.Ck;X.prototype.getBufferFullness=X.prototype.Vh;
727
+ X.prototype.getNonDefaultConfiguration=X.prototype.Zh;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.yk;X.prototype.destroyAllPreloads=X.prototype.qg;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Rh;X.prototype.unloadAndSavePreload=X.prototype.Tk;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Xk;X.prototype.unload=X.prototype.Ac;
728
728
  X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Hh;X.prototype.attach=X.prototype.ac;
729
729
  X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.B(2);break}return G(k,si(),3);case 3:b=k.h;case 2:var l={};if(Wb())for(var m in Di)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Wb()?!!Di[n]:Xb(n);c=l;m='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.02.01.01",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(x(xe));
730
- l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Pe(n)?!0:Wb()?wd(n)||(qe(n)?!0:!1):Xb(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return G(k,vc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=Jp;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=Bo;X.setAdManagerFactory=function(a){uo=a};X.registerSupportPlugin=function(a,b){Jp[a]=b};X.prototype.destroy=X.prototype.destroy;var Ao=0,qo=1,dp=2,qp=3;
731
- X.LoadMode={DESTROYED:Ao,NOT_LOADED:qo,MEDIA_SOURCE:dp,SRC_EQUALS:qp};X.version="v4.10.5";var Kp=["4","10"];Bd=new function(a){this.g=a;this.i=Cd;this.h=Dd}(new zd(Number(Kp[0]),Number(Kp[1])));var Jp={},uo=null;function Lp(){this.g=[];this.i=this.l=this.j=this.h=0}function Mp(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Np(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 rd;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Np.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
730
+ l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Pe(n)?!0:Wb()?wd(n)||(qe(n)?!0:!1):Xb(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return G(k,vc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=Jp;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=Bo;X.setAdManagerFactory=function(a){uo=a};X.registerSupportPlugin=function(a,b){Jp[a]=b};X.prototype.destroy=X.prototype.destroy;var Ao=0,co=1,dp=2,qp=3;
731
+ X.LoadMode={DESTROYED:Ao,NOT_LOADED:co,MEDIA_SOURCE:dp,SRC_EQUALS:qp};X.version="v4.10.6";var Kp=["4","10"];Bd=new function(a){this.g=a;this.i=Cd;this.h=Dd}(new zd(Number(Kp[0]),Number(Kp[1])));var Jp={},uo=null;function Lp(){this.g=[];this.i=this.l=this.j=this.h=0}function Mp(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Np(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 rd;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Np.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
732
732
  q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
733
733
  q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.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)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
734
734
  q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
@@ -737,12 +737,12 @@ Np.prototype.getPodIndex=Np.prototype.getPodIndex;Np.prototype.getTimeOffset=Np.
737
737
  Np.prototype.getDescription=Np.prototype.getDescription;Np.prototype.getTitle=Np.prototype.getTitle;Np.prototype.getPositionInSequence=Np.prototype.getPositionInSequence;Np.prototype.getSequenceLength=Np.prototype.getSequenceLength;Np.prototype.setMuted=Np.prototype.setMuted;Np.prototype.resize=Np.prototype.resize;Np.prototype.isLinear=Np.prototype.isLinear;Np.prototype.isMuted=Np.prototype.isMuted;Np.prototype.setVolume=Np.prototype.setVolume;Np.prototype.getVolume=Np.prototype.getVolume;
738
738
  Np.prototype.play=Np.prototype.play;Np.prototype.pause=Np.prototype.pause;Np.prototype.skip=Np.prototype.skip;Np.prototype.canSkipNow=Np.prototype.canSkipNow;Np.prototype.getTimeUntilSkippable=Np.prototype.getTimeUntilSkippable;Np.prototype.isSkippable=Np.prototype.isSkippable;Np.prototype.isPaused=Np.prototype.isPaused;Np.prototype.getRemainingTime=Np.prototype.getRemainingTime;Np.prototype.getMinSuggestedDuration=Np.prototype.getMinSuggestedDuration;Np.prototype.getDuration=Np.prototype.getDuration;function Op(){}P("shaka.ads.Utils",Op);Op.ADS_LOADED="ads-loaded";Op.AD_STARTED="ad-started";Op.AD_FIRST_QUARTILE="ad-first-quartile";Op.AD_MIDPOINT="ad-midpoint";Op.AD_THIRD_QUARTILE="ad-third-quartile";Op.AD_COMPLETE="ad-complete";Op.AD_STOPPED="ad-stopped";Op.AD_SKIPPED="ad-skipped";Op.AD_VOLUME_CHANGED="ad-volume-changed";Op.AD_MUTED="ad-muted";Op.AD_PAUSED="ad-paused";Op.AD_RESUMED="ad-resumed";Op.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Op.CUEPOINTS_CHANGED="ad-cue-points-changed";
739
739
  Op.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Op.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Op.AD_CLICKED="ad-clicked";Op.AD_PROGRESS="ad-progress";Op.AD_BUFFERING="ad-buffering";Op.AD_IMPRESSION="ad-impression";Op.AD_DURATION_CHANGED="ad-duration-changed";Op.AD_CLOSED="ad-closed";Op.AD_LOADED="ad-loaded";Op.ALL_ADS_COMPLETED="all-ads-completed";Op.AD_LINEAR_CHANGED="ad-linear-changed";Op.AD_METADATA="ad-metadata";Op.AD_RECOVERABLE_ERROR="ad-recoverable-error";Op.AD_ERROR="ad-error";
740
- Op.AD_BREAK_READY="ad-break-ready";Op.AD_INTERACTION="ad-interaction";Op.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Op.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Op.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Pp(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.H=!1;this.A=this.s=null;this.I=NaN;this.l=e;this.j=null;this.h=new rd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.u,this.i);this.G.initialize();this.m=new google.ima.AdsLoader(this.G);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.10.5");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m,
741
- google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Qp(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Rp(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.ia(this.i,"play",function(){f.H=!0})}Pp.prototype.configure=function(a){this.s=a};Pp.prototype.stop=function(){this.g&&this.g.stop();this.u&&qn(this.u)};
740
+ Op.AD_BREAK_READY="ad-break-ready";Op.AD_INTERACTION="ad-interaction";Op.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Op.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Op.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Pp(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.H=!1;this.A=this.s=null;this.I=NaN;this.l=e;this.j=null;this.h=new rd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.u,this.i);this.G.initialize();this.m=new google.ima.AdsLoader(this.G);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.10.6");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m,
741
+ google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Qp(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Rp(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.ka(this.i,"play",function(){f.H=!0})}Pp.prototype.configure=function(a){this.s=a};Pp.prototype.stop=function(){this.g&&this.g.stop();this.u&&qn(this.u)};
742
742
  Pp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.G.destroy()};function Rp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new S("ad-error",b));Sp(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
743
743
  function Qp(a,b){a.l(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(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.C);a.l(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
744
744
  a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Tp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Up(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Up(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
745
- a.i.offsetHeight,Up(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Up(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.s.skipPlayDetection?a.g.start():a.h.ia(a.i,"play",function(){a.H=!0;a.g.start()})}catch(f){Sp(a,null)}}
745
+ a.i.offsetHeight,Up(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Up(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.s.skipPlayDetection?a.g.start():a.h.ka(a.i,"play",function(){a.H=!0;a.g.start()})}catch(f){Sp(a,null)}}
746
746
  function Up(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
747
747
  function Tp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new S(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Rp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Vp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Vp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
748
748
  function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Sp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Sp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
@@ -760,18 +760,18 @@ Wp.prototype.getDuration=Wp.prototype.getDuration;function Xp(a,b,c,d){var e=thi
760
760
  k=t(g);l=k.next();case 3:if(l.done){w.B(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.m;0<p&&10>=p&&(e.s.has(m)||e.s.set(m,e.h.preload(m.uri)));w.B(4);break}if(!e.s.has(m)){w.B(7);break}return G(w,e.s.get(m),8);case 8:(r=w.h)&&r.destroy(),e.s.delete(m);case 7:u=JSON.stringify(m),e.I.has(u)&&e.I.delete(u),e.A.delete(m),f=!0;case 4:l=k.next();w.B(3);break;case 5:f&&aq(e),I(w)}})})).wa(1)}
761
761
  Xp.prototype.configure=function(a){this.H&&this.l==a.supportsMultipleMediaElements&&((this.l=!a.supportsMultipleMediaElements)?(this.u=this.i,this.G&&(this.G.parentElement&&this.H.removeChild(this.G),this.G=null)):(this.G||(a=document.createElement(this.i.tagName),a.autoplay=!0,a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",a.style.backgroundColor="rgb(0, 0, 0)",a.setAttribute("playsinline",""),this.G=a),this.u=this.G))};
762
762
  Xp.prototype.stop=function(){this.j&&this.j.Za();this.I.clear();this.A.clear();this.h.qg();this.s.clear();this.h.detach();this.J=!1;this.m=null};Xp.prototype.release=function(){this.stop();this.K&&this.K.release();this.j&&this.j.release();this.H&&qn(this.H);this.h.destroy()};
763
- function bq(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.C.gd()==qp&&a.l)return Va("Unsupported interstitial when using single media element",b),m.return();Yp(a);c=!1;return G(m,cq(a,b),2)}d=m.h;if(d.length)for(e=t(d),f=e.next();!f.done;f=e.next())(g=f.value,h=JSON.stringify(g),a.I.has(h))||(c=!0,a.I.add(h),a.A.add(g),k=!1,b.ic&&null==a.m?k=!0:0!=g.startTime||g.jg?null!=a.m&&(l=b.startTime-a.m,0<l&&10>=l&&(k=!0)):k=!0,k&&(a.s.has(g)||a.s.set(g,a.h.preload(g.uri))));else Va("Unsupported interstitial",
764
- b);c&&aq(a);I(m)})}function Zp(a,b,c){c=void 0===c?0:c;var d=0,e=null;if(a.A.size&&null!=a.m){var f=a.i.ended,g=Array.from(a.A).sort(function(l,m){return m.startTime-l.startTime});g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;b?k=h.ic:f?k=h.Pc:h.ic||h.Pc||(k=a.m-Math.round(1E3*h.startTime)/1E3,k=0<k&&(1>=k||!h.jg));if(k){if(d==c){e=h;break}d++}}}return e}
765
- function $p(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,w,v,A,z,C;O(function(y){switch(y.g){case 1:g=Date.now();!a.u.parentElement&&a.H&&a.H.appendChild(a.u);1==d&&1==c&&(c=Array.from(a.A).filter(function(B){return b.ic?B.ic==b.ic:b.Pc?B.Pc==b.Pc:.001>Math.abs(B.startTime-b.startTime)}).length);b.once&&(f++,a.A.delete(b),aq(a));a.J=!0;if(!a.l||1!=d){y.B(2);break}a.g(new S("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new og;k=function(B){return O(function(D){if(1==
763
+ function bq(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.C.hd()==qp&&a.l)return Va("Unsupported interstitial when using single media element",b),m.return();Yp(a);c=!1;return G(m,cq(a,b),2)}d=m.h;if(d.length)for(e=t(d),f=e.next();!f.done;f=e.next())(g=f.value,h=JSON.stringify(g),a.I.has(h))||(c=!0,a.I.add(h),a.A.add(g),k=!1,b.ic&&null==a.m?k=!0:0!=g.startTime||g.jg?null!=a.m&&(l=b.startTime-a.m,0<l&&10>=l&&(k=!0)):k=!0,k&&(a.s.has(g)||a.s.set(g,a.h.preload(g.uri))));else Va("Unsupported interstitial",
764
+ b);c&&aq(a);I(m)})}function Zp(a,b,c){c=void 0===c?0:c;var d=0,e=null;if(a.A.size&&null!=a.m){var f=a.i.ended,g=Array.from(a.A).sort(function(l,m){return m.startTime-l.startTime});g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;b?k=h.ic:f?k=h.Qc:h.ic||h.Qc||(k=a.m-Math.round(1E3*h.startTime)/1E3,k=0<k&&(1>=k||!h.jg));if(k){if(d==c){e=h;break}d++}}}return e}
765
+ function $p(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,w,v,A,z,C;O(function(y){switch(y.g){case 1:g=Date.now();!a.u.parentElement&&a.H&&a.H.appendChild(a.u);1==d&&1==c&&(c=Array.from(a.A).filter(function(B){return b.ic?B.ic==b.ic:b.Qc?B.Qc==b.Qc:.001>Math.abs(B.startTime-b.startTime)}).length);b.once&&(f++,a.A.delete(b),aq(a));a.J=!0;if(!a.l||1!=d){y.B(2);break}a.g(new S("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new og;k=function(B){return O(function(D){if(1==
766
766
  D.g)return"detach"!=B.state?D.B(0):rc()?G(D,new Promise(function(F){return(new Vb(F)).X(.1)}),3):D.B(3);h.resolve();a.j.Pa(a.C,"onstatechange",k);I(D)})};a.j.o(a.C,"onstatechange",k);return G(y,h,2);case 2:return a.l||(a.i.pause(),null!=b.ud&&0!=b.ud&&(a.i.currentTime+=b.ud)),l=!1,m=null,n=function(){if(!a.l&&null==b.ud)if(b.Df&&b.endTime)a.i.currentTime!=b.endTime&&(a.i.currentTime=b.endTime);else{var B=Date.now();a.i.currentTime+=(B-e)/1E3;e=B}},p=function(){var B,D;return O(function(F){if(1==F.g)return n(),
767
- m&&m.stop(),(B=Zp(a,b.ic,d-f))?(a.g(new S("ad-stopped")),a.j.Za(),$p(a,B,c,++d,e,f),F.B(0)):a.l?G(F,a.h.detach(),4):G(F,a.h.yc(),4);a.l&&(D=b.ud,null==D&&(D=b.Df&&b.endTime?b.endTime-(a.m||0):(Date.now()-e)/1E3),a.g(new S("ad-content-resume-requested",(new Map).set("offset",D))));a.g(new S("ad-stopped"));a.j.Za();a.J=!1;a.l||(n(),a.i.ended||a.i.play());I(F)})},r=function(B){return O(function(D){if(l)return D.return();l=!0;a.g(new S("ad-error",(new Map).set("originalEvent",B)));return G(D,p(),0)})},
768
- u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return G(B,p(),2)}a.g(new S("ad-complete"));I(B)})},w=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new S("ad-skipped"));return G(B,p(),0)})},v=new Wp(a.u,b.isSkippable,w,c,d),a.l||(v.setMuted(a.i.muted),v.setVolume(a.i.volume)),a.g(new S("ad-started",(new Map).set("ad",v))),v.canSkipNow()&&a.g(new S("ad-skip-state-changed")),a.j.ia(a.h,"error",r),a.j.ia(a.h,"firstquartile",function(){n();a.g(new S("ad-first-quartile"))}),
769
- a.j.ia(a.h,"midpoint",function(){n();a.g(new S("ad-midpoint"))}),a.j.ia(a.h,"thirdquartile",function(){n();a.g(new S("ad-third-quartile"))}),a.j.ia(a.h,"complete",u),a.j.o(a.u,"play",function(){a.g(new S("ad-resumed"))}),a.j.o(a.u,"pause",function(){a.g(new S("ad-paused"))}),a.j.o(a.u,"volumechange",function(){a.u.muted?a.g(new S("ad-muted")):a.g(new S("ad-volume-changed"))}),ta(y,4),b.eh&&(m=(new Vb(function(){v.skip()})).X(b.eh)),Yp(a),G(y,a.h.ac(a.u),6);case 6:return a.s.has(b)?G(y,a.s.get(b),
767
+ m&&m.stop(),(B=Zp(a,b.ic,d-f))?(a.g(new S("ad-stopped")),a.j.Za(),$p(a,B,c,++d,e,f),F.B(0)):a.l?G(F,a.h.detach(),4):G(F,a.h.Ac(),4);a.l&&(D=b.ud,null==D&&(D=b.Df&&b.endTime?b.endTime-(a.m||0):(Date.now()-e)/1E3),a.g(new S("ad-content-resume-requested",(new Map).set("offset",D))));a.g(new S("ad-stopped"));a.j.Za();a.J=!1;a.l||(n(),a.i.ended||a.i.play());I(F)})},r=function(B){return O(function(D){if(l)return D.return();l=!0;a.g(new S("ad-error",(new Map).set("originalEvent",B)));return G(D,p(),0)})},
768
+ u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return G(B,p(),2)}a.g(new S("ad-complete"));I(B)})},w=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new S("ad-skipped"));return G(B,p(),0)})},v=new Wp(a.u,b.isSkippable,w,c,d),a.l||(v.setMuted(a.i.muted),v.setVolume(a.i.volume)),a.g(new S("ad-started",(new Map).set("ad",v))),v.canSkipNow()&&a.g(new S("ad-skip-state-changed")),a.j.ka(a.h,"error",r),a.j.ka(a.h,"firstquartile",function(){n();a.g(new S("ad-first-quartile"))}),
769
+ a.j.ka(a.h,"midpoint",function(){n();a.g(new S("ad-midpoint"))}),a.j.ka(a.h,"thirdquartile",function(){n();a.g(new S("ad-third-quartile"))}),a.j.ka(a.h,"complete",u),a.j.o(a.u,"play",function(){a.g(new S("ad-resumed"))}),a.j.o(a.u,"pause",function(){a.g(new S("ad-paused"))}),a.j.o(a.u,"volumechange",function(){a.u.muted?a.g(new S("ad-muted")):a.g(new S("ad-volume-changed"))}),ta(y,4),b.eh&&(m=(new Vb(function(){v.skip()})).X(b.eh)),Yp(a),G(y,a.h.ac(a.u),6);case 6:return a.s.has(b)?G(y,a.s.get(b),
770
770
  10):G(y,a.h.load(b.uri),8);case 10:return A=y.h,a.s.delete(b),A?G(y,a.h.load(A),8):G(y,a.h.load(b.uri),8);case 8:z=(Date.now()-g)/1E3;a.g(new S("ads-loaded",(new Map).set("loadTime",z)));a.l&&a.i.play();va(y,0);break;case 4:C=wa(y),r(C),I(y)}})}
771
771
  function cq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U;return O(function(R){switch(R.g){case 1:c=[];if(!b)return R.return(c);d=b.values.find(function(ca){return"X-ASSET-URI"==ca.key});e=b.values.find(function(ca){return"X-ASSET-LIST"==ca.key});if(!d&&!e)return R.return(c);f=b.values.find(function(ca){return"X-RESTRICT"==ca.key});h=g=!0;f&&f.data&&(k=f.data,g=!k.includes("SKIP"),h=!k.includes("JUMP"));l=null;if(m=b.values.find(function(ca){return"X-RESUME-OFFSET"==ca.key}))n=
772
772
  m.data,l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(r=b.values.find(function(ca){return"X-PLAYOUT-LIMIT"==ca.key}))u=r.data,p=parseFloat(u),isNaN(p)&&(p=null);A=v=w=!1;if(z=b.values.find(function(ca){return"CUE"==ca.key}))C=z.data,w=C.includes("ONCE"),v=C.includes("PRE"),A=C.includes("POST");y=!0;(B=b.values.find(function(ca){return"X-TIMELINE-OCCUPIES"==ca.key}))?(D=B.data,y=D.includes("RANGE")):!m&&a.C.U()&&(y=!0);if(d){F=d.data;if(!F)return R.return(c);c.push({startTime:b.startTime,endTime:b.endTime,
773
- uri:F,isSkippable:g,jg:h,ud:l,eh:p,once:w,ic:v,Pc:A,Df:y});R.B(2);break}if(!e){R.B(2);break}J=e.data;if(!J)return R.return(c);L=Dg([J],mg());H=a.C.Gb().request(7,L);ta(R,4);return G(R,H.promise,6);case 6:E=R.h;K=zc(E.data);M=JSON.parse(K);N=t(M.ASSETS);for(Q=N.next();!Q.done;Q=N.next())U=Q.value,U.URI&&c.push({startTime:b.startTime,endTime:b.endTime,uri:U.URI,isSkippable:g,jg:h,ud:l,eh:p,once:w,ic:v,Pc:A,Df:y});va(R,2);break;case 4:wa(R);case 2:return R.return(c)}})}
774
- function aq(a){for(var b=[],c={},d=t(a.A),e=d.next();!e.done;c={Ub:c.Ub},e=d.next())e=e.value,c.Ub={start:e.startTime,end:null},e.ic?(c.Ub.start=0,c.Ub.end=null):e.Pc?(c.Ub.start=-1,c.Ub.end=null):e.Df&&(c.Ub.end=e.endTime),b.find(function(f){return function(g){return f.Ub.start==g.start&&f.Ub.end==g.end}}(c))||b.push(c.Ub);a.g(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}function Yp(a){a.h.configure(a.C.Zh());var b=a.h.Gb();b.Nh();b.Oh();Cg(a.C.Gb(),b)};function dq(a){this.h=a||"";this.g=0}function eq(a){fq(a,/[ \t]+/gm)}function fq(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 gq(a){return a.g==a.h.length?null:(a=fq(a,/[^ \t\n]*/gm))?a[0]:null};function hq(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=fq(new dq(a),iq),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.s=d;this.m=!1}q=hq.prototype;q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
773
+ uri:F,isSkippable:g,jg:h,ud:l,eh:p,once:w,ic:v,Qc:A,Df:y});R.B(2);break}if(!e){R.B(2);break}J=e.data;if(!J)return R.return(c);L=Dg([J],mg());H=a.C.Gb().request(7,L);ta(R,4);return G(R,H.promise,6);case 6:E=R.h;K=zc(E.data);M=JSON.parse(K);N=t(M.ASSETS);for(Q=N.next();!Q.done;Q=N.next())U=Q.value,U.URI&&c.push({startTime:b.startTime,endTime:b.endTime,uri:U.URI,isSkippable:g,jg:h,ud:l,eh:p,once:w,ic:v,Qc:A,Df:y});va(R,2);break;case 4:wa(R);case 2:return R.return(c)}})}
774
+ function aq(a){for(var b=[],c={},d=t(a.A),e=d.next();!e.done;c={Ub:c.Ub},e=d.next())e=e.value,c.Ub={start:e.startTime,end:null},e.ic?(c.Ub.start=0,c.Ub.end=null):e.Qc?(c.Ub.start=-1,c.Ub.end=null):e.Df&&(c.Ub.end=e.endTime),b.find(function(f){return function(g){return f.Ub.start==g.start&&f.Ub.end==g.end}}(c))||b.push(c.Ub);a.g(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}function Yp(a){a.h.configure(a.C.Zh());var b=a.h.Gb();b.Nh();b.Oh();Cg(a.C.Gb(),b)};function dq(a){this.h=a||"";this.g=0}function eq(a){fq(a,/[ \t]+/gm)}function fq(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 gq(a){return a.g==a.h.length?null:(a=fq(a,/[^ \t\n]*/gm))?a[0]:null};function hq(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=fq(new dq(a),iq),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.s=d;this.m=!1}q=hq.prototype;q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
775
775
  q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};
776
776
  q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return this.s};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};
777
777
  q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",hq);hq.prototype.release=hq.prototype.release;hq.prototype.getPodIndex=hq.prototype.getPodIndex;hq.prototype.getTimeOffset=hq.prototype.getTimeOffset;
@@ -811,8 +811,8 @@ q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!goo
811
811
  q.onAssetUnload=function(){this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.dispatchEvent(new S("ad-content-attach-requested"));this.m=new Lp};q.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.I=Date.now()/1E3;b.m.requestAds(a)};
812
812
  q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new jq(a,b,c,function(e){return yq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new og,mq(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
813
813
  q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.I=a;b.i(new S("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new vq(a,b,this.s,function(d){return yq(c,d)});this.g.configure(this.l)};
814
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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.10.5";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
815
- (c.I=!0),c.j=new og,c.g.requestStream(a),c.C=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Va('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.10.5";this.g.g.replaceAdTagParameters(a)};
814
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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.10.6";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
815
+ (c.I=!0),c.j=new og,c.g.requestStream(a),c.C=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Va('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.10.6";this.g.g.replaceAdTagParameters(a)};
816
816
  q.getServerSideCuePoints=function(){Ad("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:Mp(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
817
817
  q.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)};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)};q.onInterstitialMetadata=function(a,b,c){this.j||this.initInterstitial(null,a,b);this.j&&bq(this.j,c)};
818
818
  function yq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}P("shaka.ads.AdManager",xq);xq.prototype.onInterstitialMetadata=xq.prototype.onInterstitialMetadata;xq.prototype.onCueMetadataChange=xq.prototype.onCueMetadataChange;xq.prototype.onHlsTimedMetadata=xq.prototype.onHlsTimedMetadata;xq.prototype.onDashTimedMetadata=xq.prototype.onDashTimedMetadata;
@@ -830,27 +830,27 @@ Mq=["attach","attachCanvas","detach","load","unload"];function Nq(a,b,c,d,e,f,g)
830
830
  p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;Pq.add(this)}q=Nq.prototype;q.destroy=function(){Pq.delete(this);Qq(this);Rq&&Sq(this);this.l&&(this.l.stop(),this.l=null);this.H=this.A=null;this.h=this.m=!1;this.G=this.C=this.j=this.i=this.g=this.s=null;return Promise.resolve()};q.Ra=function(){return this.h};q.yf=function(){return this.K};
831
831
  q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Sa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Pq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new og;d.u=!0;Tq(d,e)}},function(b){for(var c=t(Pq),d=c.next();!d.done;d=c.next())d=d.value,Uq="available"==b,d.l.Sa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Uq&&this.l.X(Vq);(a=Rq)&&
832
832
  a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new og,this.u=!0,Tq(this,a)):Rq=null}else window.__onGCastApiAvailable!==Wq&&(Xq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Wq)};q.mh=function(a){this.s=a;this.h&&Yq(this,{type:"appData",appData:this.s})};
833
- q.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!Uq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new og;chrome.cast.requestSession(function(c){return Tq(a,c)},function(c){return Zq(a,c)});return G(b,a.j,0)})};function $q(a){a.h&&chrome.cast.requestSession(function(b){return Tq(a,b)},function(b){return Zq(a,b)})}q.ed=function(){if(this.h){Qq(this);if(Rq){Sq(this);try{Rq.stop(function(){},function(){})}catch(a){}Rq=null}Oq(this)}};
833
+ q.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!Uq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new og;chrome.cast.requestSession(function(c){return Tq(a,c)},function(c){return Zq(a,c)});return G(b,a.j,0)})};function $q(a){a.h&&chrome.cast.requestSession(function(b){return Tq(a,b)},function(b){return Zq(a,b)})}q.fd=function(){if(this.h){Qq(this);if(Rq){Sq(this);try{Rq.stop(function(){},function(){})}catch(a){}Rq=null}Oq(this)}};
834
834
  q.get=function(a,b){var c=this;if("video"==a){if(Fq.includes(b))return function(){return c.ti.apply(c,[a,b].concat(x(Ga.apply(0,arguments))))}}else if("player"==a){if(Iq[b]&&!this.get("player","isLive")())return function(){};if(Lq.includes(b))return function(){return c.ti.apply(c,[a,b].concat(x(Ga.apply(0,arguments))))};if(Mq.includes(b))return function(){return c.zk.apply(c,[a,b].concat(x(Ga.apply(0,arguments))))};if(Gq[b]||Hq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
835
835
  q.set=function(a,b,c){this.g[a][b]=c;Yq(this,{type:"set",targetName:a,property:b,value:c})};function Tq(a,b){var c=a.O();Rq=b;b.addUpdateListener(a.C);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Oq(a);Yq(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function Zq(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 T(2,8,c,b))}
836
836
  q.ti=function(a,b){Yq(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};q.zk=function(a,b){var c=Ga.apply(2,arguments),d=new og,e=this.J.toString();this.J++;this.i[e]=d;try{Yq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Sq(a){var b=Rq;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
837
- function Oq(a){var b=Rq?"connected"==Rq.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Qq(a)}a.h=b;a.K=b?Rq.receiver.friendlyName:"";a.l.Sa()}function Qq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function Yq(a,b){b=zq(b);var c=Rq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},ab)}catch(d){throw b=new T(2,8,8005,d),c=new S("error",(new Map).set("detail",b)),a.A("player",c),a.ed(),b;}}var Vq=.02,Uq=!1,Rq=null,Xq=null,Pq=new Set;
837
+ function Oq(a){var b=Rq?"connected"==Rq.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Qq(a)}a.h=b;a.K=b?Rq.receiver.friendlyName:"";a.l.Sa()}function Qq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function Yq(a,b){b=zq(b);var c=Rq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},bb)}catch(d){throw b=new T(2,8,8005,d),c=new S("error",(new Map).set("detail",b)),a.A("player",c),a.fd(),b;}}var Vq=.02,Uq=!1,Rq=null,Xq=null,Pq=new Set;
838
838
  function Wq(a){Xq?window.__onGCastApiAvailable=Xq:delete window.__onGCastApiAvailable;Xq=null;if(a)for(var b=t(Pq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function ar(a,b,c,d){d=void 0===d?!1:d;gb.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.u=this.l=null;this.G=c;this.C=d;this.A=new Map;this.g=new Nq(c,function(){return br(e)},function(){return cr(e)},function(f,g){return dr(e,f,g)},function(){return er(e)},function(){return fr(e)},d);gr(this)}pa(ar,gb);q=ar.prototype;
839
- q.destroy=function(a){a&&this.g.ed();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.u=this.l=this.i=null;gb.prototype.release.call(this);return Promise.all(a)};q.vc=function(){return this.l};q.hd=function(){return this.u};q.ig=function(){return this.g.m&&Uq};q.Ra=function(){return this.g.Ra()};q.yf=function(){return this.g.yf()};
840
- q.cast=function(){var a=this;return O(function(b){return 1==b.g?G(b,a.g.cast(),2):a.h?G(b,a.h.yc(),0):b.return()})};q.mh=function(a){this.g.mh(a)};q.Ji=function(){$q(this.g)};q.ed=function(){this.g.ed()};
841
- q.Mh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.G&&b==c.C)return d.return();c.G=a;c.C=b;c.g.ed();return G(d,c.g.destroy(),2)}c.g=null;c.g=new Nq(a,function(){return br(c)},function(){return cr(c)},function(e,f){return dr(c,e,f)},function(){return er(c)},function(){return fr(c)},b);c.g.init();I(d)})};
839
+ q.destroy=function(a){a&&this.g.fd();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.u=this.l=this.i=null;gb.prototype.release.call(this);return Promise.all(a)};q.wc=function(){return this.l};q.jd=function(){return this.u};q.ig=function(){return this.g.m&&Uq};q.Ra=function(){return this.g.Ra()};q.yf=function(){return this.g.yf()};
840
+ q.cast=function(){var a=this;return O(function(b){return 1==b.g?G(b,a.g.cast(),2):a.h?G(b,a.h.Ac(),0):b.return()})};q.mh=function(a){this.g.mh(a)};q.Ji=function(){$q(this.g)};q.fd=function(){this.g.fd()};
841
+ q.Mh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.G&&b==c.C)return d.return();c.G=a;c.C=b;c.g.fd();return G(d,c.g.destroy(),2)}c.g=null;c.g=new Nq(a,function(){return br(c)},function(){return cr(c)},function(e,f){return dr(c,e,f)},function(){return er(c)},function(){return fr(c)},b);c.g.init();I(d)})};
842
842
  function gr(a){a.g.init();a.m=new rd;for(var b=t(Cq),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ra()||(f=Pa(f),a.j.dispatchEvent(f))});for(var d in Qa)a.m.o(a.h,Qa[d],function(f){a.g.Ra()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Fd=e,Object.defineProperty(a.l,b.Fd,{configurable:!1,enumerable:!0,get:function(f){return function(){return hr(a,f.Fd)}}(b),set:function(f){return function(g){var h=f.Fd;a.g.Ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Fd:b.Fd};a.u={};ir(a,
843
843
  function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return jr(a,f)}})});kr(a);a.j=new gb;a.j.Ke=a.l;a.s=new gb;a.s.Ke=a.u}function kr(a){var b=new Map;ir(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)})}
844
844
  function ir(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=t(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)}}
845
- function fr(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.fd(),startTime:null};a.i.pause();for(var c=t(Eq),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=t(Jq);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=t(Kq);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 br(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
845
+ function fr(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.gd(),startTime:null};a.i.pause();for(var c=t(Eq),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=t(Jq);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=t(Kq);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 br(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
846
846
  function cr(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
847
847
  function er(a){for(var b=t(Jq),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=t(Eq);for(d=c.next();!d.done;d=c.next())d=
848
848
  d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Eq),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Kq);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.Cf(h);g&&a.h.kh(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new S("error",l);a.h.dispatchEvent(l)})}
849
849
  function hr(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.Ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ra()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
850
850
  function jr(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.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.Gb()};if("getDrmEngine"==b)return function(){return a.h.C};if("getAdManager"==b)return function(){return a.h.Ve()};
851
851
  if("setVideoContainer"==b)return function(c){return a.h.uh(c)};if(a.g.Ra()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ra()&&0==Object.keys(a.g.g.video).length&&(Gq[b]||Hq[b])||!a.g.Ra()?a.h[b].bind(a.h):a.g.get("player",b)}
852
- function dr(a,b,c){a.g.Ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}P("shaka.cast.CastProxy",ar);ar.prototype.changeReceiverId=ar.prototype.Mh;ar.prototype.forceDisconnect=ar.prototype.ed;ar.prototype.suggestDisconnect=ar.prototype.Ji;ar.prototype.setAppData=ar.prototype.mh;ar.prototype.cast=ar.prototype.cast;ar.prototype.receiverName=ar.prototype.yf;ar.prototype.isCasting=ar.prototype.Ra;ar.prototype.canCast=ar.prototype.ig;ar.prototype.getPlayer=ar.prototype.hd;
853
- ar.prototype.getVideo=ar.prototype.vc;ar.prototype.destroy=ar.prototype.destroy;function lr(a,b,c,d){gb.call(this);var e=this;this.g=a;this.h=b;this.j=new rd;this.J={video:a,player:b};this.H=c||function(){};this.K=d||function(f){return f};this.i=null;this.I=!1;this.s=!0;this.m=0;this.C=!1;this.A=!0;this.u=this.l=null;this.G=new Vb(function(){mr(e)});nr(this)}pa(lr,gb);q=lr.prototype;q.isConnected=function(){return this.I};q.Wj=function(){return this.s};q.Mk=function(a){this.i=a};q.cj=function(){this.i=null};
852
+ function dr(a,b,c){a.g.Ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}P("shaka.cast.CastProxy",ar);ar.prototype.changeReceiverId=ar.prototype.Mh;ar.prototype.forceDisconnect=ar.prototype.fd;ar.prototype.suggestDisconnect=ar.prototype.Ji;ar.prototype.setAppData=ar.prototype.mh;ar.prototype.cast=ar.prototype.cast;ar.prototype.receiverName=ar.prototype.yf;ar.prototype.isCasting=ar.prototype.Ra;ar.prototype.canCast=ar.prototype.ig;ar.prototype.getPlayer=ar.prototype.jd;
853
+ ar.prototype.getVideo=ar.prototype.wc;ar.prototype.destroy=ar.prototype.destroy;function lr(a,b,c,d){gb.call(this);var e=this;this.g=a;this.h=b;this.j=new rd;this.J={video:a,player:b};this.H=c||function(){};this.K=d||function(f){return f};this.i=null;this.I=!1;this.s=!0;this.m=0;this.C=!1;this.A=!0;this.u=this.l=null;this.G=new Vb(function(){mr(e)});nr(this)}pa(lr,gb);q=lr.prototype;q.isConnected=function(){return this.I};q.Wj=function(){return this.s};q.Mk=function(a){this.i=a};q.cj=function(){this.i=null};
854
854
  q.Nk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Lk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Kk=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
855
855
  q.destroy=function(){var a=this,b,c;return O(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.J=null,a.H=null,a.I=!1,a.s=!0,a.l=null,a.u=null,gb.prototype.release.call(a),G(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();I(d)})};
856
856
  function nr(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return or(a)};b.onSenderDisconnected=function(){return or(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&pr(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);pr(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return qr(a,
@@ -859,10 +859,10 @@ a.j.o(a.g,"ended",function(){(new Vb(function(){a.g&&a.g.ended&&(a.s=!0,tr(a))})
859
859
  function xr(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.H(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ta(r,5),G(r,a.h.load(b.manifest,b.startTime),7)):G(r,Promise.resolve(),3);case 7:va(r,3);break;case 5:return g=wa(r),h=(new Map).set("detail",g),k=new S("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
860
860
  a.g.autoplay=f;b.manifest&&(a.g.play(),wr(a));I(r)}})}function sr(a,b,c){a.h&&(mr(a),pr(a,{type:"event",targetName:b,event:c},a.l))}
861
861
  function mr(a){a.G.X(yr);for(var b={video:{},player:{}},c=t(Dq),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in Iq)0==a.m%Iq[e]&&(b.player[e]=a.h[e]());for(var f in Gq)0==a.m%Gq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;pr(a,{type:"update",update:b},a.l);for(var g in Hq)0==a.m%Hq[g]&&(b={player:{}},b.player[g]=a.h[g](),pr(a,{type:"update",update:b},a.l));a.C&&(a.m+=
862
- 1);vr(a)}function vr(a){return a.A&&(a.g.duration||a.h.U())?(zr(a),a.A=!1,!0):!1}function zr(a,b){var c={contentId:a.h.fd(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);wr(a,void 0===b?0:b,c)}
862
+ 1);vr(a)}function vr(a){return a.A&&(a.g.duration||a.h.U())?(zr(a),a.A=!1,!0):!1}function zr(a,b){var c={contentId:a.h.gd(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);wr(a,void 0===b?0:b,c)}
863
863
  function rr(a,b){var c=Aq(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.A=!0;xr(a,c.initState,c.appData);mr(a);break;case "appData":a.H(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.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
864
864
  "player"==d&&"load"==e&&(a.m=0,a.C=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Ar(a,g,f,null)},function(h){return Ar(a,g,f,h)})}}
865
- function qr(a,b){var c=Aq(b.data);switch(c.type){case "PLAY":a.g.play();wr(a);break;case "PAUSE":a.g.pause();wr(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(),wr(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),wr(a));break;case "STOP":a.h.yc().then(function(){a.h&&wr(a)});break;case "GET_STATUS":zr(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));
865
+ function qr(a,b){var c=Aq(b.data);switch(c.type){case "PLAY":a.g.play();wr(a);break;case "PAUSE":a.g.pause();wr(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(),wr(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),wr(a));break;case "STOP":a.h.Ac().then(function(){a.h&&wr(a)});break;case "GET_STATUS":zr(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));
866
866
  null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||wr(a);break;case "LOAD":a.m=0;a.C=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.H(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&zr(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");pr(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:pr(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
867
867
  function Ar(a,b,c,d){a.h&&pr(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function pr(a,b,c,d){a.I&&(a=zq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function wr(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?Br:a.h.ce()?Cr:a.g.paused?Dr:Er,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);pr(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
868
868
  P("shaka.cast.CastReceiver",lr);lr.prototype.destroy=lr.prototype.destroy;lr.prototype.setContentArtist=lr.prototype.Kk;lr.prototype.setContentImage=lr.prototype.Lk;lr.prototype.setContentTitle=lr.prototype.Nk;lr.prototype.clearContentMetadata=lr.prototype.cj;lr.prototype.setContentMetadata=lr.prototype.Mk;lr.prototype.isIdle=lr.prototype.Wj;lr.prototype.isConnected=lr.prototype.isConnected;var yr=.5,ur=5,Br="IDLE",Er="PLAYING",Cr="BUFFERING",Dr="PAUSED";function Fr(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(y){return null!=y&&""!=y.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(y){return null!=y&&""!=y.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Gr(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){r=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){u=w;break}if(-1===
@@ -891,10 +891,10 @@ function Os(a,b){var c=[];try{for(;b.Ea();){var d=Cs(b).value,e=(d&224)>>5,f=d&3
891
891
  0,w=1;16>w;w++,u++)p.i[u]=p.i[w];for(w=0;1>w;w++,u++)p.i[u]=ks()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=ns(r,p,g.i));r.i[r.h]=ks();r.g=0;break;case 12:r.isVisible()&&(e=ns(r,p,g.i)),js(r),p=r,p.h=0,p.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=Es(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?ls(g.g,
892
892
  "\u266a"):ls(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&ls(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Ks.has(e)){var A=Ks.get(e);ls(g.g,A)}else ls(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?ls(g.g,"_"):ls(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(z){if(z instanceof T&&3E3===z.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw z;}return c}function Ps(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
893
893
  Ls.prototype.getStreams=function(){return Array.from(this.A)};P("shaka.cea.CeaDecoder",Ls);Jd=function(){return new Ls};function Qs(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(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 Rs(){this.j=new Map;this.i=this.h=0;this.g=Ss}
894
- Rs.prototype.init=function(a){function b(f){f=f.name;f in Ts&&(c.g=Ts[f])}var c=this,d=[],e=[];(new Sg).box("moov",Xg).box("mvex",Xg).Y("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.V();g=g.V();c.h=f;c.i=g}).box("trak",Xg).Y("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.V();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.za();g.za();g.za();g.za();d.push(h)}).box("mdia",Xg).Y("mdhd",
895
- function(f){f=cj(f.reader,f.version);e.push(f.timescale)}).box("minf",Xg).box("stbl",Xg).Y("stsd",Zg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("encv",$g).box("sinf",Xg).box("frma",function(f){f=fj(f.reader).gb;f in Ts&&(c.g=Ts[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==Ss&&Va("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,
894
+ Rs.prototype.init=function(a){function b(f){f=f.name;f in Ts&&(c.g=Ts[f])}var c=this,d=[],e=[];(new Sg).box("moov",Xg).box("mvex",Xg).Z("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.V();g=g.V();c.h=f;c.i=g}).box("trak",Xg).Z("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.V();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.za();g.za();g.za();g.za();d.push(h)}).box("mdia",Xg).Z("mdhd",
895
+ function(f){f=cj(f.reader,f.version);e.push(f.timescale)}).box("minf",Xg).box("stbl",Xg).Z("stsd",Zg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("encv",$g).box("sinf",Xg).box("frma",function(f){f=fj(f.reader).gb;f in Ts&&(c.g=Ts[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==Ss&&Va("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,
896
896
  g){c.j.set(f,e[g])})};
897
- Rs.prototype.parse=function(a){var b=this;if(this.g==Ss)return[];var c=[],d=0,e=[];(new Sg).box("moof",function(f){d=f.start;e=[];Xg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Vd:b.h,Ue:b.i,pi:[],timescale:9E4});Xg(f)}).Y("trun",function(f){var g=e[e.length-1];f=dj(f.reader,f.version,f.flags);g.pi.push(f)}).Y("tfhd",function(f){var g=e[e.length-1];f=aj(f.reader,f.flags);g.Vd=f.Vd||b.h;g.Ue=f.Ue||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).Y("tfdt",function(f){var g=e[e.length-
897
+ Rs.prototype.parse=function(a){var b=this;if(this.g==Ss)return[];var c=[],d=0,e=[];(new Sg).box("moof",function(f){d=f.start;e=[];Xg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Vd:b.h,Ue:b.i,pi:[],timescale:9E4});Xg(f)}).Z("trun",function(f){var g=e[e.length-1];f=dj(f.reader,f.version,f.flags);g.pi.push(f)}).Z("tfhd",function(f){var g=e[e.length-1];f=aj(f.reader,f.flags);g.Vd=f.Vd||b.h;g.Ue=f.Ue||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).Z("tfdt",function(f){var g=e[e.length-
898
898
  1];f=bj(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.La(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Va("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Us(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Vd,l.Ue,g,l.pi,c)}}).parse(a,!1);return c};
899
899
  function Us(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.wi});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].ej);b.Ea();){g=b.V();var p=b.$(),r=null;r=!1;h=1;switch(a.g){case Vs:r=p&31;r=6==r;break;case Ws:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;case Xs:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].zf||0),p=(c+p)/d,h=t(Qs(b.Rb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-
900
900
  h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].hh||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",Rs);var Ss=0,Vs=1,Ws=2,Xs=3,Ts={avc1:Vs,avc3:Vs,hev1:Ws,hvc1:Ws,dvav:Vs,dva1:Vs,dvh1:Ws,dvhe:Ws,vvc1:Xs,vvi1:Xs};Id["video/mp4"]=function(){return new Rs};function Ys(){this.g=null}Ys.prototype.init=function(){};Ys.prototype.parse=function(a){this.g?this.g.clearData():this.g=new uj;var b=[];a=Hb(a);if(!Ej(a))return b;a=this.g.parse(a);var c=a.Wd(),d=a.bf();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Qs(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
@@ -916,43 +916,43 @@ p)break;else if(r>=p)break;w=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else
916
916
  function mt(a,b,c){b=nt(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=qh(d.value,c));d=b.next());return a}
917
917
  function ot(a,b,c,d,e,f){for(var g=uh(a,"http://www.w3.org/1999/xlink","href"),h=uh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=hh("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return qg(new T(2,4,4028));if("onLoad"!=h)return qg(new T(2,4,4027));var p=Oc([d],[g]);return e.request(0,Dg(p,b)).Ta(function(r){r=eh(r.data,a.tagName);if(!r)return qg(new T(2,4,4001,g));for(a.children=
918
918
  [];r.children.length;){var u=r.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(r.attributes));for(var w=u.next();!w.done;w=u.next())w=w.value,a.attributes[w]=r.attributes[w];return pt(a,b,c,p[0],e,f+1)})}
919
- function pt(a,b,c,d,e,f){f=void 0===f?0:f;if(uh(a,"http://www.w3.org/1999/xlink","href")){var g=ot(a,b,c,d,e,f);c&&(g=g.Ta(void 0,function(){return pt(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(kh(a)),l=k.next();!l.done;h={Yc:h.Yc},l=k.next())h.Yc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==uh(h.Yc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Yc}}(h)):"SegmentTimeline"!=h.Yc.tagName&&g.push(pt(h.Yc,b,c,d,e,f));return ug(g).Ta(function(){return a})}
920
- ;function qt(a,b,c,d,e,f,g){var h,k=(new Sg).Y("sidx",function(l){h=rt(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
919
+ function pt(a,b,c,d,e,f){f=void 0===f?0:f;if(uh(a,"http://www.w3.org/1999/xlink","href")){var g=ot(a,b,c,d,e,f);c&&(g=g.Ta(void 0,function(){return pt(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(kh(a)),l=k.next();!l.done;h={Zc:h.Zc},l=k.next())h.Zc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==uh(h.Zc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Zc}}(h)):"SegmentTimeline"!=h.Zc.tagName&&g.push(pt(h.Zc,b,c,d,e,f));return ug(g).Ta(function(){return a})}
920
+ ;function qt(a,b,c,d,e,f,g){var h,k=(new Sg).Z("sidx",function(l){h=rt(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
921
921
  function rt(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.V();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.V();var m=g.reader.V()}else l=g.reader.td(),m=g.reader.td();g.reader.skip(2);var n=g.reader.za();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.V(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.V();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new Ki(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function st(a){this.h=Mb(a);this.g=new Pg(this.h,0)}st.prototype.Ea=function(){return this.g.Ea()};
922
922
  function tt(a){var b=ut(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=ut(a);a:{d=t(vt);for(var e=d.next();!e.done;e=d.next())if(Fb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.La();else{if(8==b.length&&b[1]&224)throw new T(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.La()+b<=a.h.byteLength?b:a.h.byteLength-a.g.La();d=Mb(a.h,a.g.La(),b);a.g.skip(b);return new wt(c,
923
923
  d)}function ut(a){var b=a.g.La(),c=a.g.$();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Hb(a.h,b,c)}var vt=[[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 wt(a,b){this.id=a;this.g=b}
924
924
  function xt(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(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 yt(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new st(a.g);for(var n=null,p=null;a.Ea();){var r=tt(a);if(187==r.id){var u=zt(r);u&&(r=c*u.Wk,u=b+u.xk,null!=n&&m.push(new Ki(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Ki(n+g,d+g,l,p,null,f,g,h,k));return m}
925
925
  function zt(a){var b=new st(a.g);a=tt(b);if(179!=a.id)throw new T(2,3,3013);a=xt(a);b=tt(b);if(183!=b.id)throw new T(2,3,3012);b=new st(b.g);for(var c=0;b.Ea();){var d=tt(b);if(241==d.id){c=xt(d);break}}return{Wk:a,xk:c}};function At(a,b,c){b=mt(a,b,"Initialization");if(!b)return null;var d=a.N.Ya(),e=b.attributes.sourceURL;e&&(d=Oc(d,[Gc(e)]));e=0;var f=null;if(b=th(b,"range",yh))e=b.start,f=b.end;c=new Ii(function(){return d},e,f,Bt(a),null,null,c);c.codecs=a.N.codecs;c.mimeType=a.N.mimeType;return c}
926
- function Ct(a,b,c){var d=Number(lt(a,Dt,"presentationTimeOffset"))||0,e=lt(a,Dt,"timescale"),f=1;e&&(f=Ch(e)||1);var g=d/f||0,h=At(a,Dt,c);Et(a,h);var k=$e(a);return{Gc:function(){var l=mt(k,Dt,"RepresentationIndex");var m=k.N.Ya();l&&(l=Gc(l.attributes.sourceURL))&&(m=Oc(m,[l]));l=Ft(k);return Gt(k,b,h,m,l.start,l.end,g)}}}
926
+ function Ct(a,b,c){var d=Number(lt(a,Dt,"presentationTimeOffset"))||0,e=lt(a,Dt,"timescale"),f=1;e&&(f=Ch(e)||1);var g=d/f||0,h=At(a,Dt,c);Et(a,h);var k=$e(a);return{Ic:function(){var l=mt(k,Dt,"RepresentationIndex");var m=k.N.Ya();l&&(l=Gc(l.attributes.sourceURL))&&(m=Oc(m,[l]));l=Ft(k);return Gt(k,b,h,m,l.start,l.end,g)}}}
927
927
  function Gt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J;return O(function(L){if(1==L.g)return h=a.presentationTimeline,k=!a.Vb||!a.ya.ge,l=a.ya.start,m=a.ya.duration,n=a.N.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.R(),c.$a,c.Ja,!0):null],p=null,G(L,Promise.all(u),2);w=L.h;v=w[0];A=w[1]||null;z=null;C=l-g;y=l;B=m?l+m:Infinity;if("mp4"==n)var H=qt(v,e,d,c,C,y,B);else{H=new st(A);if(440786851!=tt(H).id)throw new T(2,3,3008);var E=tt(H);if(408125543!=E.id)throw new T(2,
928
928
  3,3009);H=E.g.byteOffset;E=new st(E.g);for(var K=null;E.Ea();){var M=tt(E);if(357149030==M.id){K=M;break}}if(!K)throw new T(2,3,3010);K=new st(K.g);M=1E6;for(E=null;K.Ea();){var N=tt(K);if(2807729==N.id)M=xt(N);else if(17545==N.id)if(4==N.g.byteLength)E=N.g.getFloat32(0);else if(8==N.g.byteLength)E=N.g.getFloat64(0);else throw new T(2,3,3003);}if(null==E)throw new T(2,3,3011);K=M/1E9;E*=K;M=tt(new st(v));if(475249515!=M.id)throw new T(2,3,3007);H=yt(M,H,K,E,d,c,C,y,B)}z=H;D=t(z);for(F=D.next();!F.done;F=
929
- D.next())J=F.value,J.codecs=a.N.codecs,J.mimeType=a.N.mimeType;h.le(z);r=new Zk(z);k&&r.dd(y,B,!0);return L.return(r)})}function Dt(a){return a.wd}function Ft(a){var b=mt(a,Dt,"RepresentationIndex");a=lt(a,Dt,"indexRange");a=yh(a||"");b&&(a=th(b,"range",yh,a));return a}function Et(a,b){Ht(a,b);if(!Ft(a))throw new T(2,4,4002);}function Ht(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Uc&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
930
- function Bt(a){var b=a.N;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.qd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.Ba.label||null,roles:a.roles||null,language:a.Ba.language||null}};function It(a,b,c){var d=At(a,Jt,c),e=Kt(a);if(!e.eb&&!e.timeline&&1<e.od.length)throw new T(2,4,4002);if(!e.eb&&!a.ya.duration&&!e.timeline&&1==e.od.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.Na.id&&a.N.id&&(g=b[a.Na.id+","+a.N.id])&&(f=g.segmentIndex);var h=Lt(a.ya.start,a.ya.duration,a.N.Ya,e,d,c,a.N.mimeType,a.N.codecs);b=!f;f?f.je(h,a.presentationTimeline.Hb()):f=new Zk(h);a.presentationTimeline.le(h);a.Vb&&a.ya.ge||f.dd(a.ya.start,
931
- a.ya.duration?a.ya.start+a.ya.duration:Infinity,b);g&&(g.segmentIndex=f);return{Gc:function(){f&&0!=f.getNumReferences()||f.qf(h);return Promise.resolve(f)}}}function Jt(a){return a.lc}function Kt(a){var b=Mt(a);a=kt(a,Jt);var c=a.we;0==c&&(c=1);var d=0;a.eb?d=a.eb*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{eb:a.eb,startTime:d,we:c,kc:a.kc,timeline:a.timeline,od:b}}
932
- function Lt(a,b,c,d,e,f,g,h){var k=d.od.length;d.timeline&&d.timeline.length!=d.od.length&&(k=Math.min(d.timeline.length,d.od.length));for(var l=a-d.kc,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={Nd:r.Nd,Kd:r.Kd},u++){r.Kd=d.od[u];var w=p;p=void 0;p=null!=d.eb?w+d.eb:d.timeline?d.timeline[u].end:w+b;r.Nd=null;w=new Ki(a+w,a+p,function(v){return function(){null==v.Nd&&(v.Nd=Oc(c(),[v.Kd.kk]));return v.Nd}}(r),r.Kd.start,r.Kd.end,e,l,a,m,[],"",null,null,Li,f);w.codecs=h;w.mimeType=g;n.push(w)}return n}
933
- function Mt(a){return[a.N.lc,a.Ba.lc,a.Na.lc].filter(Ye).map(function(b){return lh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Rg&&(a.Rg=!0);var c=Gc(b.attributes.media);b=th(b,"mediaRange",yh,{start:0,end:null});return{kk:c,start:b.start,end:b.end}})};function Nt(a,b,c,d,e,f,g,h,k){k||a.N.kd||(a.N.kd=lt(a,Ot,"initialization"));var l=a.N.kd?Pt(a,g):null,m=Qt(a);Rt(m);var n=$e(a);if(m.be)return Ht(a,l),{Gc:function(){var v=jt(m.be,n.N.id,null,null,n.bandwidth||null,null);v=Oc(n.N.Ya(),[v]);return Gt(n,b,l,v,0,null,m.kc)}};if(m.eb)return d||"image"===a.Ba.contentType||(a.presentationTimeline.Xg(m.eb),a.presentationTimeline.uf(a.ya.start)),{Gc:function(){return St(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.Na.id&&a.N.id&&(d=a.Na.id+","+a.N.id,d=c[d])&&
934
- (p=d.segmentIndex);var r=a.ya.start,u=a.ya.duration?r+a.ya.duration:Infinity,w=!(a.Vb&&a.ya.ge);p?(c=p,Tt(c,m,r,u,w,l),c.hb(a.presentationTimeline.Hb())):p=new Ut(m,a.N.id,a.bandwidth,a.N.Ya,r,u,l,w,g,a.N.ih);m.timeline&&"image"!==a.Ba.contentType&&a.presentationTimeline.oi(m.timeline,r);d&&a.Vb&&(d.segmentIndex=p);return{Gc:function(){p instanceof Ut&&0==p.getNumReferences()&&Tt(p,m,r,u,w,l);return Promise.resolve(p)}}}function Ot(a){return a.xc}
935
- function Qt(a){var b=kt(a,Ot),c=lt(a,Ot,"media"),d=lt(a,Ot,"index");return{eb:b.eb,timescale:b.timescale,we:b.we,kc:b.kc,Bh:b.Bh,timeline:b.timeline,pd:c&&Gc(c),be:d,mimeType:a.N.mimeType,codecs:a.N.codecs}}function Rt(a){var b=a.be?1:0;b+=a.timeline?1:0;b+=a.eb?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.be&&(a.timeline=null),a.eb=null);if(!a.be&&!a.pd)throw new T(2,4,4002);}
936
- function St(a,b,c,d,e,f,g){function h(E){var K=(E-w)*u,M=K+b.kc,N=K+n;K=N+u;var Q=Math.min(K,l());N=new Ki(N,Q,function(){var U=M*v;"BigInt"in window&&U>Number.MAX_SAFE_INTEGER&&(U=BigInt(M)*BigInt(v));U=jt(A,C,E,null,z,U);return Oc(y(),[U])},0,null,d,B,n,l(),[],"",null,null,Li,f);N.codecs=a.N.codecs;N.mimeType=a.N.mimeType;N.i=K;return N}function k(){var E=[Math.max(m.Hb(),n),Math.min(m.sc(),l())].map(function(K){return K-n});E=[Math.ceil(E[0]/u),Math.ceil(E[1]/u)-1];a.N.ab&&E[1]++;return E.map(function(K){return K+
937
- w})}function l(){var E=null!=p&&e[p]||r;return E?n+E:Infinity}var m=a.presentationTimeline,n=a.ya.start,p=a.Na.id,r=a.ya.duration,u=b.eb,w=b.we,v=b.timescale,A=b.pd,z=a.bandwidth||null,C=a.N.id,y=a.N.Ya,B=n-b.kc,D=k();c=a.Vb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var F=c;F<=g;++F){var J=h(F);D.push(J)}var L=new Zk(D);D=m.sc()<l();F=m.U();if(D||F){var H=Math.max(c,g+1);c=u;a.N.ab&&(c=.1);L.Ff(c,function(){var E=m.Hb();L.hb(E);var K=t(k());K.next();K=K.next().value;for(var M=[];H<=K;){var N=
938
- h(H);M.push(N);H++}return E>l()&&!M.length?null:M})}return Promise.resolve(L)}function Pt(a,b){var c=a.N.kd;c||(c=lt(a,Ot,"initialization"));if(!c)return null;c=Gc(c);var d=a.N.id,e=a.bandwidth||null,f=a.N.Ya;b=new Ii(function(){var g=jt(c,d,null,null,e,null);return Oc(f(),[g])},0,null,Bt(a),null,null,b);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;return b}
929
+ D.next())J=F.value,J.codecs=a.N.codecs,J.mimeType=a.N.mimeType;h.le(z);r=new Zk(z);k&&r.ed(y,B,!0);return L.return(r)})}function Dt(a){return a.wd}function Ft(a){var b=mt(a,Dt,"RepresentationIndex");a=lt(a,Dt,"indexRange");a=yh(a||"");b&&(a=th(b,"range",yh,a));return a}function Et(a,b){Ht(a,b);if(!Ft(a))throw new T(2,4,4002);}function Ht(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Uc&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
930
+ function Bt(a){var b=a.N;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.qd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.Ba.label||null,roles:a.roles||null,language:a.Ba.language||null}};function It(a,b,c){var d=At(a,Jt,c),e=Kt(a);if(!e.eb&&!e.timeline&&1<e.pd.length)throw new T(2,4,4002);if(!e.eb&&!a.ya.duration&&!e.timeline&&1==e.pd.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.Na.id&&a.N.id&&(g=b[a.Na.id+","+a.N.id])&&(f=g.segmentIndex);var h=Lt(a.ya.start,a.ya.duration,a.N.Ya,e,d,c,a.N.mimeType,a.N.codecs);b=!f;f?f.je(h,a.presentationTimeline.Hb()):f=new Zk(h);a.presentationTimeline.le(h);a.Vb&&a.ya.ge||f.ed(a.ya.start,
931
+ a.ya.duration?a.ya.start+a.ya.duration:Infinity,b);g&&(g.segmentIndex=f);return{Ic:function(){f&&0!=f.getNumReferences()||f.qf(h);return Promise.resolve(f)}}}function Jt(a){return a.lc}function Kt(a){var b=Mt(a);a=kt(a,Jt);var c=a.we;0==c&&(c=1);var d=0;a.eb?d=a.eb*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{eb:a.eb,startTime:d,we:c,kc:a.kc,timeline:a.timeline,pd:b}}
932
+ function Lt(a,b,c,d,e,f,g,h){var k=d.pd.length;d.timeline&&d.timeline.length!=d.pd.length&&(k=Math.min(d.timeline.length,d.pd.length));for(var l=a-d.kc,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={Nd:r.Nd,Kd:r.Kd},u++){r.Kd=d.pd[u];var w=p;p=void 0;p=null!=d.eb?w+d.eb:d.timeline?d.timeline[u].end:w+b;r.Nd=null;w=new Ki(a+w,a+p,function(v){return function(){null==v.Nd&&(v.Nd=Oc(c(),[v.Kd.kk]));return v.Nd}}(r),r.Kd.start,r.Kd.end,e,l,a,m,[],"",null,null,Li,f);w.codecs=h;w.mimeType=g;n.push(w)}return n}
933
+ function Mt(a){return[a.N.lc,a.Ba.lc,a.Na.lc].filter(Ye).map(function(b){return lh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Rg&&(a.Rg=!0);var c=Gc(b.attributes.media);b=th(b,"mediaRange",yh,{start:0,end:null});return{kk:c,start:b.start,end:b.end}})};function Nt(a,b,c,d,e,f,g,h,k){k||a.N.ld||(a.N.ld=lt(a,Ot,"initialization"));var l=a.N.ld?Pt(a,g):null,m=Qt(a);Rt(m);var n=$e(a);if(m.be)return Ht(a,l),{Ic:function(){var v=jt(m.be,n.N.id,null,null,n.bandwidth||null,null);v=Oc(n.N.Ya(),[v]);return Gt(n,b,l,v,0,null,m.kc)}};if(m.eb)return d||"image"===a.Ba.contentType||(a.presentationTimeline.Xg(m.eb),a.presentationTimeline.uf(a.ya.start)),{Ic:function(){return St(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.Na.id&&a.N.id&&(d=a.Na.id+","+a.N.id,d=c[d])&&
934
+ (p=d.segmentIndex);var r=a.ya.start,u=a.ya.duration?r+a.ya.duration:Infinity,w=!(a.Vb&&a.ya.ge);p?(c=p,Tt(c,m,r,u,w,l),c.hb(a.presentationTimeline.Hb())):p=new Ut(m,a.N.id,a.bandwidth,a.N.Ya,r,u,l,w,g,a.N.ih);m.timeline&&"image"!==a.Ba.contentType&&a.presentationTimeline.oi(m.timeline,r);d&&a.Vb&&(d.segmentIndex=p);return{Ic:function(){p instanceof Ut&&0==p.getNumReferences()&&Tt(p,m,r,u,w,l);return Promise.resolve(p)}}}function Ot(a){return a.zc}
935
+ function Qt(a){var b=kt(a,Ot),c=lt(a,Ot,"media"),d=lt(a,Ot,"index");return{eb:b.eb,timescale:b.timescale,we:b.we,kc:b.kc,Bh:b.Bh,timeline:b.timeline,yc:c&&Gc(c),be:d,mimeType:a.N.mimeType,codecs:a.N.codecs}}function Rt(a){var b=a.be?1:0;b+=a.timeline?1:0;b+=a.eb?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.be&&(a.timeline=null),a.eb=null);if(!a.be&&!a.yc)throw new T(2,4,4002);}
936
+ function St(a,b,c,d,e,f,g){function h(E){var K=(E-w)*u,M=K+b.kc,N=K+n;K=N+u;var Q=Math.min(K,l());N=new Ki(N,Q,function(){var U=M*v;"BigInt"in window&&U>Number.MAX_SAFE_INTEGER&&(U=BigInt(M)*BigInt(v));U=jt(A,C,E,null,z,U);return Oc(y(),[U])},0,null,d,B,n,l(),[],"",null,null,Li,f);N.codecs=a.N.codecs;N.mimeType=a.N.mimeType;N.i=K;return N}function k(){var E=[Math.max(m.Hb(),n),Math.min(m.tc(),l())].map(function(K){return K-n});E=[Math.ceil(E[0]/u),Math.ceil(E[1]/u)-1];a.N.ab&&E[1]++;return E.map(function(K){return K+
937
+ w})}function l(){var E=null!=p&&e[p]||r;return E?n+E:Infinity}var m=a.presentationTimeline,n=a.ya.start,p=a.Na.id,r=a.ya.duration,u=b.eb,w=b.we,v=b.timescale,A=b.yc,z=a.bandwidth||null,C=a.N.id,y=a.N.Ya,B=n-b.kc,D=k();c=a.Vb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var F=c;F<=g;++F){var J=h(F);D.push(J)}var L=new Zk(D);D=m.tc()<l();F=m.U();if(D||F){var H=Math.max(c,g+1);c=u;a.N.ab&&(c=.1);L.Ff(c,function(){var E=m.Hb();L.hb(E);var K=t(k());K.next();K=K.next().value;for(var M=[];H<=K;){var N=
938
+ h(H);M.push(N);H++}return E>l()&&!M.length?null:M})}return Promise.resolve(L)}function Pt(a,b){var c=a.N.ld;c||(c=lt(a,Ot,"initialization"));if(!c)return null;c=Gc(c);var d=a.N.id,e=a.bandwidth||null,f=a.N.Ya;b=new Ii(function(){var g=jt(c,d,null,null,e,null);return Oc(f(),[g])},0,null,Bt(a),null,null,b);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;return b}
939
939
  function Ut(a,b,c,d,e,f,g,h,k,l){Zk.call(this,[]);this.g=a;this.G=b;this.A=c;this.C=d;this.h=e;this.j=f;this.s=g;this.u=k;this.H=l;h&&Vt(this)}pa(Ut,Zk);q=Ut.prototype;q.getNumReferences=function(){return this.g?this.g.timeline.length:0};q.release=function(){Zk.prototype.release.call(this);this.g=null};
940
940
  q.hb=function(a){if(this.g){for(var b=0,c=this.g.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.h<=a)b+=1;else break;0<b&&(this.g.timeline=c.slice(b),this.T.length>=b&&(this.T=this.T.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
941
- function Tt(a,b,c,d,e,f){Wt(a,f);if(a.g){c=a.g.timeline;a.g.pd=b.pd;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.g.timeline.push.apply(a.g.timeline,x(b));a.j!==d&&(a.j=d)}else a.g=b,a.h=c,a.j=d;e&&Vt(a)}function Wt(a,b){if(a.s!==b){a.s=b;a=t(a.T);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ni(c,b)}}
941
+ function Tt(a,b,c,d,e,f){Wt(a,f);if(a.g){c=a.g.timeline;a.g.yc!==b.yc&&(a.g.yc=b.yc);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.g.timeline.push.apply(a.g.timeline,x(b));a.j!==d&&(a.j=d)}else a.g=b,a.h=c,a.j=d;e&&Vt(a)}function Wt(a,b){if(a.s!==b){a.s=b;a=t(a.T);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ni(c,b)}}
942
942
  function Vt(a){if(!a.m){for(var b=a.g.timeline;b.length;)if(b[b.length-1].start>=a.j)b.pop();else break;a.hb(a.h)}}q.find=function(a){if(this.g&&this.g.timeline&&this.g.timeline.length&&a<this.g.timeline[0].start+this.h)return this.i;if(!this.g)return null;var b=this.g.timeline;if(a<this.h||a>=this.j)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.h;e=d<c?b[d+1].start+this.h:Infinity===this.j?e.end+this.h:this.j;if(a>=f&&a<e)return d+this.i}return null};
943
- q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.g)return null;var c=this.T[a];if(!c){var d=this.g.pd,e=this.g.timeline[a],f=e.Ik,g=this.g.Bh+e.Ch;c=this.h-this.g.kc;var h=this.h+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.j&&(k=this.j);for(var l=this.g.codecs,m=this.g.mimeType,n=[],p=(e.end-e.start)/e.Yb,r={},u=0;u<e.Yb;r={Od:r.Od,Vf:r.Vf},u++){var w=e.start+p*u,v=w+p;r.Vf=u+1;r.Od=null;w=new Ki(this.h+w,this.h+v,function(A){return function(){if(!b.g)return[];
944
- null==A.Od&&(A.Od=Xt(b.g.pd,b.G,f,b.A,g,A.Vf,b.C));return A.Od}}(r),0,null,this.s,c,this.h,this.j,[],"",null,null,Li,this.u);w.codecs=l;w.mimeType=m;0==this.H?0<u&&w.nf():0!=u%this.H&&w.nf();n.push(w)}c=new Ki(this.h+e.start,k,function(){return 0<e.Yb?[]:Xt(d,b.G,f,b.A,g,null,b.C)},0,null,this.s,c,this.h,this.j,n,"",null,null,Li,this.u,0<e.Yb);c.codecs=l;c.mimeType=m;c.i=h;this.T[a]=c}return c};
943
+ q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.g)return null;var c=this.T[a];if(!c){var d=this.g.timeline[a],e=d.Ik,f=this.g.Bh+d.Ch;c=this.h-this.g.kc;var g=this.h+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.j&&(h=this.j);for(var k=this.g.codecs,l=this.g.mimeType,m=[],n=(d.end-d.start)/d.Yb,p={},r=0;r<d.Yb;p={Od:p.Od,Vf:p.Vf},r++){var u=d.start+n*r,w=u+n;p.Vf=r+1;p.Od=null;u=new Ki(this.h+u,this.h+w,function(v){return function(){if(!b.g)return[];null==
944
+ v.Od&&(v.Od=Xt(b.g.yc,b.G,e,b.A,f,v.Vf,b.C));return v.Od}}(p),0,null,this.s,c,this.h,this.j,[],"",null,null,Li,this.u);u.codecs=k;u.mimeType=l;0==this.H?0<r&&u.nf():0!=r%this.H&&u.nf();m.push(u)}c=new Ki(this.h+d.start,h,function(){return 0<d.Yb||!b.g?[]:Xt(b.g.yc,b.G,e,b.A,f,null,b.C)},0,null,this.s,c,this.h,this.j,m,"",null,null,Li,this.u,0<d.Yb);c.codecs=k;c.mimeType=l;c.i=g;this.T[a]=c}return c};
945
945
  function Xt(a,b,c,d,e,f,g){a=jt(a,b,c,f,d||null,e);return Oc(g(),[a]).map(function(h){return h.toString()})};function Yt(a){this.s=null;this.A=a;this.I=new wg;this.i=[];this.h=null;this.m=[];this.C=null;this.H=[];this.G=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}Yt.prototype.configure=function(a){this.s=a};Yt.prototype.destroy=function(){this.A=this.s=null;this.i=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};Yt.prototype.setManifestType=function(a){this.u=a};
946
946
  function Zt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Oc(a.i,[$t(a,b)]),d=Dg(c,a.s.retryParameters),e=a.A.networkingEngine.request(8,d),xg(a.I,e),ta(l,2),G(l,e.promise,4);if(2!=l.g)return f=l.h,g=zc(f.data),h=JSON.parse(g),1==h.VERSION&&au(a,h,f.uri),va(l,0);if((k=wa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Vb(function(){Zt(a,b)});a.g.X(a.G);I(l)})}
947
947
  function $t(a,b){if(!a.m.length)return b;b=new nb(b);var c=a.C||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Db(e)&&rb(b,e);return b.toString()}function au(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Vb(function(){Zt(a,d)});if(c=b.TTL)a.G=c;a.g.X(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
948
948
  function bu(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Yt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
949
- function cu(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={Dc:e.Dc},g=f.next())if(e.Dc=g.value,g=b.get(e.Dc))d.push({dh:e.Dc,location:g});else if(g=a.H.find(function(k){return function(l){return l.xl==k.Dc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Si?(h=new nb(h),pb(h,g["URI-REPLACEMENT"].Si),d.push({dh:e.Dc,location:h.toString()})):d.push({dh:e.Dc,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
949
+ function cu(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={Fc:e.Fc},g=f.next())if(e.Fc=g.value,g=b.get(e.Fc))d.push({dh:e.Fc,location:g});else if(g=a.H.find(function(k){return function(l){return l.xl==k.Fc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Si?(h=new nb(h),pb(h,g["URI-REPLACEMENT"].Si),d.push({dh:e.Fc,location:h.toString()})):d.push({dh:e.Fc,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
950
950
  h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new nb(k.location)).cc))return!1;return!0});d.length&&(a.C=d[0].dh);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.C=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Oc(a.i,d)};function du(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.u=this.s=!1;this.m=new Set}q=du.prototype;q.release=function(){for(var a=t(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=[]};q.Oj=function(){return this.j};q.Lg=function(){return this.l.slice()};q.sj=function(){return this.i};
951
951
  function eu(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[fu(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[gu(n),n]})),l=new Map(h.textStreams.map(function(n){return[hu(n),n]}));h=new Map(h.imageStreams.map(function(n){return[iu(n),n]}));if(b){var m=ju(Uc);l.set(hu(m),m);m=ju("image");h.set(iu(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Ih:c,Pi:d,Ki:e,ci:f}}
952
952
  q.mg=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R;return O(function(ca){if(1==ca.g){e=Wc;if(!b&&1==a.length)return f=eu(a,!1),g=f.Ih,h=f.Pi,k=f.Ki,l=f.ci,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.l=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ca.B(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return ca.return();u=eu(a,!0);w=u.Ih;v=u.Pi;A=u.Ki;z=u.ci;
953
953
  return G(ca,Promise.all([ku(d,d.h,w,n,lu,mu,m),ku(d,d.g,v,n,lu,mu,m),ku(d,d.l,A,n,lu,mu,m),ku(d,d.i,z,n,lu,mu,m)]),2)}C=0;y=[];if(d.g.length&&d.h.length)for(H=t(d.h),E=H.next();!E.done;E=H.next())for(K=E.value,M=t(d.g),N=M.next();!N.done;N=M.next())Q=N.value,U=Qb(K.drmInfos,Q.drmInfos),K.drmInfos.length&&Q.drmInfos.length&&!U.length||(R=C++,y.push({id:R,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K,video:Q,bandwidth:(K.bandwidth||0)+(Q.bandwidth||0),drmInfos:U,allowedByApplication:!0,
954
- allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),F=D.next();!F.done;F=D.next())J=F.value,L=C++,y.push({id:L,language:J.language,disabledUntilTime:0,primary:J.primary,audio:J.type==e.ha?J:null,video:J.type==e.ua?J:null,bandwidth:J.bandwidth||0,drmInfos:J.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=y;I(ca)})};
955
- function nu(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N;return O(function(Q){switch(Q.g){case 1:b=Wc;if(1==a.length)return Q.return(a[0]);c=a.map(function(U){return new Map(U.filter(function(R){return R.type===b.ha}).map(function(R){return[fu(R),R]}))});d=a.map(function(U){return new Map(U.filter(function(R){return R.type===b.ua}).map(function(R){return[gu(R),R]}))});e=a.map(function(U){return new Map(U.filter(function(R){return R.type===b.Ka}).map(function(R){return[hu(R),
954
+ allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),F=D.next();!F.done;F=D.next())J=F.value,L=C++,y.push({id:L,language:J.language,disabledUntilTime:0,primary:J.primary,audio:J.type==e.ia?J:null,video:J.type==e.ua?J:null,bandwidth:J.bandwidth||0,drmInfos:J.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=y;I(ca)})};
955
+ function nu(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N;return O(function(Q){switch(Q.g){case 1:b=Wc;if(1==a.length)return Q.return(a[0]);c=a.map(function(U){return new Map(U.filter(function(R){return R.type===b.ia}).map(function(R){return[fu(R),R]}))});d=a.map(function(U){return new Map(U.filter(function(R){return R.type===b.ua}).map(function(R){return[gu(R),R]}))});e=a.map(function(U){return new Map(U.filter(function(R){return R.type===b.Ka}).map(function(R){return[hu(R),
956
956
  R]}))});f=a.map(function(U){return new Map(U.filter(function(R){return R.type===b.ag}).map(function(R){return[iu(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=ou(b.Ka),k.set(hu(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=ou(b.ag),p.set(iu(r),r);u=new du;return G(Q,ku(u,[],c,0,pu,qu,0),2);case 2:return w=Q.h,G(Q,ku(u,[],d,0,pu,qu,0),3);case 3:return v=Q.h,G(Q,ku(u,[],e,0,pu,qu,0),4);case 4:return A=Q.h,G(Q,ku(u,[],f,0,pu,qu,0),5);case 5:z=Q.h;C=0;if(v.length&&w.length)for(J=
957
957
  t(w),L=J.next();!L.done;L=J.next())for(H=L.value,E=t(v),K=E.next();!K.done;K=E.next())M=K.value,N=C++,M.variantIds.push(N),H.variantIds.push(N);else for(y=v.concat(w),B=t(y),D=B.next();!D.done;D=B.next())F=D.value,F.variantIds=[C++];return Q.return(v.concat(w).concat(A).concat(z))}})}
958
958
  function ku(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J;return O(function(L){switch(L.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){L.B(4);break}n=m.value;return G(L,ru(a,n,c,d,f,h,g),5);case 5:p=L.h;if(!p)throw new T(2,4,4037);m=l.next();L.B(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(w=u.value,v=t(w),A=v.next();!A.done;A=v.next())z=A.value,(C=su(a,z,c,e,f,h))&&b.push(C);y=t(h);for(u=y.next();!u.done;u=
@@ -967,7 +967,7 @@ d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions|
967
967
  b)}function qu(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(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,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
968
968
  function vu(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=yu(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
969
969
  function yu(a,b,c){var d={audio:fu,video:gu,text:hu,image:iu}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return uu(a,l,m)},video:function(l,m){return uu(a,l,m)},text:zu,image:Au}[c.type];for(var g={audio:Bu,video:Cu,text:Du,image:Eu}[c.type],h=t(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.u&&!tu(e)&&b.delete(d(e));return e}
970
- function Fu(a,b){function c(d){if(!Gu.has(d)){var e=De(d);Gu.set(d,e)}return Gu.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}q.xi=function(a){this.s=a};q.Gi=function(a){this.u=a};function uu(a,b,c){return!Fu(b,c)&&!a.s||b.drmInfos&&!Pb(b.drmInfos,c.drmInfos)?!1:!0}function zu(a,b){return b.language?a.forced!==b.forced||0==gd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Au(){return!0}
970
+ function Fu(a,b){return a.mimeType!=b.mimeType?!1:Gu(a.codecs)===Gu(b.codecs)}q.xi=function(a){this.s=a};q.Gi=function(a){this.u=a};function uu(a,b,c){return!Fu(b,c)&&!a.s||b.drmInfos&&!Pb(b.drmInfos,c.drmInfos)?!1:!0}function zu(a,b){return b.language?a.forced!==b.forced||0==gd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Au(){return!0}
971
971
  function Bu(a,b,c){var d=Fu(a,b),e=Fu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=gd(a.language,b.language);e=gd(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;
972
972
  if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Hu(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Iu)return!0;if(d==Ju)return!1;d=Hu(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Iu?!0:d==Ju?!1:a.bandwidth&&Ku(a.bandwidth,b.bandwidth,c.bandwidth)==Iu?!0:!1}
973
973
  function Cu(a,b,c){var d=Fu(a,b),e=Fu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Hu(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Iu)return!0;if(d==Ju)return!1;if(a.frameRate){d=Hu(a.frameRate,b.frameRate,c.frameRate);if(d==Iu)return!0;if(d==Ju)return!1}return a.bandwidth&&Ku(a.bandwidth,b.bandwidth,c.bandwidth)==Iu?!0:!1}
@@ -976,484 +976,484 @@ if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.cod
976
976
  function ou(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}}
977
977
  function ju(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Zk([]),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}}
978
978
  function Hu(a,b,c){if(b==a&&a!=c)return Ju;if(c==a&&a!=b)return Iu;if(b>a){if(c<=a||c-a<b-a)return Iu;if(c-a>b-a)return Ju}else{if(c>a)return Ju;if(a-c<a-b)return Iu;if(a-c>a-b)return Ju}return Lu}function Ku(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Iu:b<a?Ju:Lu}function tu(a){switch(a.type){case Uc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
979
- function gu(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 fu(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 hu(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
980
- function iu(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}P("shaka.util.PeriodCombiner",du);du.prototype.setUseStreamOnce=du.prototype.Gi;du.prototype.setAllowMultiTypeVariants=du.prototype.xi;du.prototype.combinePeriods=du.prototype.mg;du.prototype.getImageStreams=du.prototype.sj;du.prototype.getTextStreams=du.prototype.Lg;du.prototype.getVariants=du.prototype.Oj;var Iu=1,Lu=0,Ju=-1,Gu=new Map;function Mu(a,b){var c=new DOMParser,d=Nu.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 Ou(a,b){try{var c=Cc(a);return Mu(c,b)}catch(d){return null}}
981
- var Nu=new Ob(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 Pu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.aa=1;this.C=[];this.l={tf:"",type:"",profiles:[],fc:null,ab:0,Ya:null,pe:0};this.s=new Map;this.u={};this.W={};this.m=new du;this.J=0;this.Z=new od(5);this.K=new Vb(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.G.Pa(a.I,"timeupdate"),a.I.paused)){a.G.ia(a.I,"timeupdate",function(){return Qu(a)});return}Qu(a)});this.O=new wg;this.M=null;this.ea=[];this.P=Infinity;this.H=!1;this.h=null;this.L=0;this.S=!1;this.G=new rd;this.I=
982
- null}q=Pu.prototype;q.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.U()&&this.K.Sa();this.h&&this.h.configure(this.g);this.m&&(this.m.xi(this.g.dash.multiTypeVariantsAllowed&&yd()),this.m.Gi(this.g.dash.useStreamOnceInPeriodFlattening))};
983
- q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.H=b.isLowLatencyMode(),c.A=[a],c.j=b,G(e,Ru(c),2);d=e.h;c.j&&Su(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
979
+ function gu(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,Gu(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function fu(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,Gu(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function hu(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
980
+ function iu(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Gu(a){if(!Mu.has(a)){var b=De(a);Mu.set(a,b)}return Mu.get(a)}P("shaka.util.PeriodCombiner",du);du.prototype.setUseStreamOnce=du.prototype.Gi;du.prototype.setAllowMultiTypeVariants=du.prototype.xi;du.prototype.combinePeriods=du.prototype.mg;du.prototype.getImageStreams=du.prototype.sj;du.prototype.getTextStreams=du.prototype.Lg;du.prototype.getVariants=du.prototype.Oj;var Iu=1,Lu=0,Ju=-1,Mu=new Map;function Nu(a,b){var c=new DOMParser,d=Ou.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 Pu(a,b){try{var c=Cc(a);return Nu(c,b)}catch(d){return null}}
981
+ var Ou=new Ob(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 Qu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.ea=1;this.C=[];this.l={tf:"",type:"",profiles:[],fc:null,ab:0,Ya:null,pe:0};this.s=new Map;this.u={};this.Y={};this.m=new du;this.J=0;this.aa=new od(5);this.K=new Vb(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.G.Pa(a.I,"timeupdate"),a.I.paused)){a.G.ka(a.I,"timeupdate",function(){return Ru(a)});return}Ru(a)});this.O=new wg;this.M=null;this.ha=[];this.P=Infinity;this.H=!1;this.h=null;this.L=0;this.S=!1;this.G=new rd;this.I=
982
+ null;this.W=!1}q=Qu.prototype;q.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.U()&&this.K.Sa();this.h&&this.h.configure(this.g);this.m&&(this.m.xi(this.g.dash.multiTypeVariantsAllowed&&yd()),this.m.Gi(this.g.dash.useStreamOnceInPeriodFlattening))};
983
+ q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.H=b.isLowLatencyMode(),c.A=[a],c.j=b,G(e,Su(c),2);d=e.h;c.j&&Tu(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
984
984
  q.stop=function(){for(var a=t(Object.values(this.u)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.u={};this.s.clear();this.l={tf:"",type:"",profiles:[],fc:null,ab:0,Ya:null,pe:0};this.m=null;null!=this.K&&(this.K.stop(),this.K=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.O.destroy()};
985
- q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),G(c,Ru(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.j||!b)return c.return();a.j.onError(b);I(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.sc();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.J=b.endTime-a,Su(this,0))}}};
985
+ q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),G(c,Su(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.j||!b)return c.return();a.j.onError(b);I(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.tc();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.J=b.endTime-a,Tu(this,0))}}};
986
986
  q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=function(a){this.I=a};
987
- function Ru(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return b=4,c="MPD",d=Tu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=cu(a.h,"Location",!0),f.length&&(e=f)),g=Dg(e,a.g.retryParameters),h=Date.now(),G(n,Uu(a,g,0,{type:b}),2);if(3!=n.g){k=n.h;if(!a.j)return n.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);return G(n,Vu(a,k.data,k.uri,c),3)}l=Date.now();m=(l-h)/1E3;a.Z.sample(1,m);return n.return(m)})}
988
- function Vu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=Gm;if(f!=g){Ad("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Ou(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Dc(h.outerHTML)}k=eh(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Hm;l!=m&&l(k);if("Patch"===d)return w.return(Wu(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(Xu(a,k,c));
989
- p=a.g.dash.xlinkFailGracefully;r=pt(k,a.g.retryParameters,p,c,a.j.networkingEngine);xg(a.O,r);return G(w,r.promise,2)}u=w.h;return w.return(Xu(a,u,c))})}
990
- function Xu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R,ca,fa,Xa,Aa,Ra,bb,Ya,mb,db,Za,wc,Ta,tb,Yb,Xc,Ee,Fe,Ge,ae,yj,be,zj,Aj,mh,He;return O(function(xc){switch(xc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=lh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=oh(l))p=Oc(d,[n])[0],m&&(a.h?bu(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=cu(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.tf=
987
+ function Su(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return b=4,c="MPD",d=Uu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=cu(a.h,"Location",!0),f.length&&(e=f)),g=Dg(e,a.g.retryParameters),h=Date.now(),G(n,Vu(a,g,0,{type:b}),2);if(3!=n.g){k=n.h;if(!a.j)return n.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);return G(n,Wu(a,k.data,k.uri,c),3)}l=Date.now();m=(l-h)/1E3;a.aa.sample(1,m);return n.return(m)})}
988
+ function Wu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=Gm;if(f!=g){Ad("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Pu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Dc(h.outerHTML)}k=eh(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Hm;l!=m&&l(k);if("Patch"===d)return w.return(Xu(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(Yu(a,k,c));
989
+ p=a.g.dash.xlinkFailGracefully;r=pt(k,a.g.retryParameters,p,c,a.j.networkingEngine);xg(a.O,r);return G(w,r.promise,2)}u=w.h;return w.return(Yu(a,u,c))})}
990
+ function Yu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R,ca,fa,Xa,Aa,Ra,cb,Ya,mb,$a,Za,wc,Ta,tb,Yb,Xc,Ee,Fe,Ge,ae,zj,be,Aj,Bj,mh,He;return O(function(xc){switch(xc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=lh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=oh(l))p=Oc(d,[n])[0],m&&(a.h?bu(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=cu(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.tf=
991
991
  b.attributes.id||"";a.l.pe=th(b,"publishTime",wh)||0;a.C=lh(b,"PatchLocation");u=Promise.resolve();if((w=qh(b,"ContentSteering"))&&a.j){v=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=v;else if(a.h=new Yt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=v,A=oh(w))(z=th(w,"queryBeforeStart",Fh,!1))?u=Zt(a.h,A):Zt(a.h,A);C=t(f.keys());for(y=C.next();!y.done;y=C.next())B=y.value,D=f.get(B),bu(a.h,"Location",B,D)}F=lh(b,"BaseURL");L=!1;if(a.h)for(H=t(F),E=H.next();!E.done;E=
992
- H.next())K=E.value,M=K.attributes.serviceLocation,N=oh(K),M&&N&&(bu(a.h,"BaseURL",M,N),L=!0);L&&a.h||(Q=F.map(oh),J=Oc(d,Q));U=function(){return a.h&&L?cu(a.h,"BaseURL"):J?J:[]};a.l.Ya=U;R=0;F&&F.length&&(R=th(F[0],"availabilityTimeOffset",Eh)||0);a.l.ab=R;ca=a.g.dash.ignoreMinBufferTime;fa=0;ca||(fa=th(b,"minBufferTime",xh)||0);a.J=th(b,"minimumUpdatePeriod",xh,-1);Xa=th(b,"availabilityStartTime",wh);Aa=th(b,"timeShiftBufferDepth",xh);Ra=a.g.dash.ignoreSuggestedPresentationDelay;bb=null;Ra||(bb=
993
- th(b,"suggestedPresentationDelay",xh));Ya=a.g.dash.ignoreMaxSegmentDuration;mb=null;Ya||(mb=th(b,"maxSegmentDuration",xh));db=b.attributes.type||"static";a.l.type=db;if(a.i)for(Za=a.i.presentationTimeline,wc=t(Object.values(a.u)),Ta=wc.next();!Ta.done;Ta=wc.next())tb=Ta.value,tb.segmentIndex&&tb.segmentIndex.hb(Za.Hb());else Yb=a.g.defaultPresentationDelay||1.5*fa,Xc=null!=bb?bb:Yb,Za=new Dk(Xa,Xc,a.g.dash.autoCorrectDrift);Za.Tc("static"==db);(Ee=Za.U())&&!isNaN(a.g.availabilityWindowOverride)&&
994
- (Aa=a.g.availabilityWindowOverride);null==Aa&&(Aa=Infinity);Za.Bf(Aa);Fe=b.attributes.profiles||"";a.l.profiles=Fe.split(",");Ge={Vb:"static"!=db,presentationTimeline:Za,Na:null,ya:null,Ba:null,N:null,bandwidth:0,Rg:!1,ab:R,fc:null,profiles:Fe.split(","),roles:null};a.L=0;ae=Yu(a,Ge,U,b);yj=ae.duration;be=ae.periods;"static"!=db&&ae.Sh||Za.vb(yj||Infinity);a.S&&!a.H&&(zj=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.H=a.j.isLowLatencyMode());a.H&&Za.zi(a.P);Za.Xg(mb||1);return G(xc,u,
995
- 2);case 2:a.H&&(fa=0,Aj=null!=bb?bb:a.g.defaultPresentationDelay,Za.nh(Aj));if(!a.i)return G(xc,a.m.mg(be,Ge.Vb),6);a.i.periodCount=be.length;a.i.gapCount=a.L;return G(xc,Zu(a,be,!1),4);case 6:a.i={presentationTimeline:Za,variants:a.m.j,textStreams:a.m.Lg(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:fa||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:$u(b),nextUrl:av(b),periodCount:be.length,gapCount:a.L,isLowLatency:a.S};if(!Za.Ni()){xc.B(7);
996
- break}mh=lh(b,"UTCTiming");return G(xc,bv(a,U,mh),8);case 8:He=xc.h;if(!a.j)return xc.return();Za.Ai(He);case 7:Za.mf();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),I(xc)}})}function Zu(a,b,c){var d;return O(function(e){if(1==e.g)return G(e,a.m.mg(b,!0,c),2);a.i.variants=a.m.j;d=a.m.Lg();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);I(e)})}
997
- function Wu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H;return O(function(E){if(1==E.g){c=b.attributes.mpdId;d=th(b,"originalPublishTime",wh);if(!c||c!==a.l.tf||d!==a.l.pe)throw a.C=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(kh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Hh(l.attributes.sel||""),n=m[m.length-1],p=oh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.pc){r=oh(l)||"";var K=xh(r);if(null!=K){a.l.fc=K;for(var M=t(a.s.values()),N=M.next();!N.done;N=M.next())N.value.fc=
998
- K}}else if("type"===n.pc){a.i.presentationTimeline.Tc("static"==p);a.l.type=p;K=t(a.s.values());for(M=K.next();!M.done;M=K.next())M.value.Vb="dynamic"==p;"static"==p&&(a.J=-1)}else"publishTime"===n.pc?a.l.pe=wh(p)||0:null===n.pc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Ih(a.C,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(K=n.id,a.i.periodCount--,M=t(a.s.keys()),N=M.next();!N.done;N=M.next())if(N=N.value,N.startsWith(K)){var Q=
999
- a.s.get(N);mt(Q,Ot,"SegmentTimeline").children=[];cv(a,N);a.s.delete(N)}}else if("SegmentTemplate"===n.name){M=Hh(l.attributes.sel||"");K=M[M.length-1];if(K.pc){M=dv(a,M);N=oh(l)||"";Q=t(M);for(var U=Q.next();!U.done;U=Q.next())U=a.s.get(U.value),Jh(U.N.xc,l.tagName,K.pc,N);K=M}else K=[];u=K;w=t(u);for(v=w.next();!v.done;v=w.next())A=v.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){K=Hh(l.attributes.sel||"");K=dv(a,K);M=t(K);for(N=M.next();!N.done;N=M.next())N=a.s.get(N.value),N=
1000
- mt(N,Ot,"SegmentTimeline"),Q=lh(N,"S"),Ih(Q,l),N.children=Q;z=K;C=t(z);for(v=C.next();!v.done;v=C.next())y=v.value,g.add(y)}B=t(g);for(v=B.next();!v.done;v=B.next())D=v.value,cv(a,D);F=t(f);for(J=F.next();!J.done;J=F.next())L=J.value,e.push.apply(e,x(Yu(a,{Vb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,Na:null,ya:null,Ba:null,N:null,bandwidth:0,Rg:!1,ab:a.l.ab,profiles:a.l.profiles,fc:a.l.fc,roles:null},a.l.Ya,L).periods));if(!e.length)return E.B(2);a.i.periodCount+=e.length;
1001
- a.i.gapCount=a.L;return G(E,Zu(a,e,!0),2)}"static"==a.l.type&&(H=a.l.fc,a.i.presentationTimeline.vb(H||Infinity));I(E)})}function dv(a,b){var c="",d="",e="";b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,"Period"===f.name?c=f.id:"AdaptationSet"===f.name?d=f.id:"Representation"===f.name&&(e=f.id);b=[];if(e)b.push(c+","+e);else for(a=t(a.s.values()),e=a.next();!e.done;e=a.next())e=e.value,e.Na.id===c&&e.Ba.id===d&&e.N.id&&b.push(c+","+e.N.id);return b}
1002
- function cv(a,b){var c=a.s.get(b),d=a.u[b];d.segmentIndex&&d.segmentIndex.hb(a.i.presentationTimeline.Hb());try{var e=Nt(c,function(f,g,h,k){return ev(a,f,g,h,k)},a.u,!0,a.g.dash.initialSegmentLimit,a.W,c.N.aesKey,null,!0);d.createSegmentIndex=function(){var f;return O(function(g){if(1==g.g){if(d.segmentIndex)return g.B(0);f=d;return G(g,e.Gc(),3)}f.segmentIndex=g.h;I(g)})}}catch(f){if(b=c.N.contentType,b!=Uc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
1003
- function $u(a){var b=qh(a,"ServiceDescription");if(!b)return null;a=qh(b,"Latency");b=qh(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
1004
- return c}function av(a){a=lh(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
1005
- function Yu(a,b,c,d){var e=b.fc;e||(e=th(d,"mediaPresentationDuration",xh),a.l.fc=e);var f=[],g=0;d=lh(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=th(k,"start",xh,g),n=k.attributes.id,p=th(k,"duration",xh),r=null;if(l){var u=th(l,"start",xh);null!=u&&(r=u-m)}else null!=e&&(r=e-m);u=Yc;r&&p&&Math.abs(r-p)>u&&r>p&&a.L++;null==r&&(r=p);if(!(null!==a.M&&null!==n&&null!==m&&m<a.M)||a.ea.includes(n)||h+1==d.length){null!==m&&(null===a.M||m>a.M)&&(a.M=m);g=fv(a,b,c,{start:m,duration:r,
1006
- node:k,ge:null==r||!l});f.push(g);b.Na.id&&r&&(a.W[b.Na.id]=r);if(null==r){g=null;break}g=m+r}}a.ea=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,Sh:!1}:{periods:f,duration:g,Sh:!0}}
1007
- function fv(a,b,c,d){b.Na=gv(a,d.node,null,c);b.ya=d;b.Na.ab=b.ab;b.Na.id||(b.Na.id="__shaka_period_"+d.start);var e=lh(d.node,"EventStream");c=b.presentationTimeline.Hb();e=t(e);for(var f=e.next();!f.done;f=e.next())hv(a,d.start,d.duration,f.value,c);c=lh(d.node,"AdaptationSet").map(function(m){return iv(a,b,m)}).filter(Ye);if(b.Vb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Bk);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);
1008
- }d=c.filter(function(m){return!m.Ah});c=c.filter(function(m){return m.Ah});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ah.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Ie:h.Ie},l=k.next())h.Ie=l.value,h.Ie.trickModeVideo=e.streams.find(function(m){return function(n){return De(m.Ie.codecs)==De(n.codecs)}}(h))}}}c=jv(a.g.disableAudio,d,"audio");e=jv(a.g.disableVideo,d,"video");f=jv(a.g.disableText,
1009
- d,Uc);d=jv(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.Na.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function jv(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
1010
- function iv(a,b,c){function d(E){switch(E){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ba=gv(a,c,b.Na,null);var f=!1,g=lh(c,"Role"),h=g.map(function(E){return E.attributes.value}).filter(Ye),k=void 0,l=b.Ba.contentType==Uc;l&&(k="subtitle");g=t(g);for(var m=g.next();!m.done;m=g.next()){m=m.value;var n=m.attributes.schemeIdUri;if(null==
992
+ H.next())K=E.value,M=K.attributes.serviceLocation,N=oh(K),M&&N&&(bu(a.h,"BaseURL",M,N),L=!0);L&&a.h||(Q=F.map(oh),J=Oc(d,Q));U=function(){return a.h&&L?cu(a.h,"BaseURL"):J?J:[]};a.l.Ya=U;R=0;F&&F.length&&(R=th(F[0],"availabilityTimeOffset",Eh)||0);a.l.ab=R;ca=a.g.dash.ignoreMinBufferTime;fa=0;ca||(fa=th(b,"minBufferTime",xh)||0);a.J=th(b,"minimumUpdatePeriod",xh,-1);Xa=th(b,"availabilityStartTime",wh);Aa=th(b,"timeShiftBufferDepth",xh);Ra=a.g.dash.ignoreSuggestedPresentationDelay;cb=null;Ra||(cb=
993
+ th(b,"suggestedPresentationDelay",xh));Ya=a.g.dash.ignoreMaxSegmentDuration;mb=null;Ya||(mb=th(b,"maxSegmentDuration",xh));$a=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.W=a.i.presentationTimeline.U()&&"static"==$a);a.l.type=$a;if(a.i)for(Za=a.i.presentationTimeline,wc=t(Object.values(a.u)),Ta=wc.next();!Ta.done;Ta=wc.next())tb=Ta.value,tb.segmentIndex&&tb.segmentIndex.hb(Za.Hb());else Yb=a.g.defaultPresentationDelay||1.5*fa,Xc=null!=cb?cb:Yb,Za=new Dk(Xa,Xc,a.g.dash.autoCorrectDrift);
994
+ Za.Uc("static"==$a);(Ee=Za.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Aa=a.g.availabilityWindowOverride);null==Aa&&(Aa=Infinity);Za.Bf(Aa);Fe=b.attributes.profiles||"";a.l.profiles=Fe.split(",");Ge={Vb:"static"!=$a,presentationTimeline:Za,Na:null,ya:null,Ba:null,N:null,bandwidth:0,Rg:!1,ab:R,fc:null,profiles:Fe.split(","),roles:null};a.L=0;ae=Zu(a,Ge,U,b);zj=ae.duration;be=ae.periods;("static"!=$a||a.W)&&ae.Sh||Za.vb(zj||Infinity);a.S&&!a.H&&(Aj=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),
995
+ a.H=a.j.isLowLatencyMode());a.H&&Za.zi(a.P);Za.Xg(mb||1);return G(xc,u,2);case 2:a.H&&(fa=0,Bj=null!=cb?cb:a.g.defaultPresentationDelay,Za.nh(Bj));if(!a.i)return G(xc,a.m.mg(be,Ge.Vb),6);a.i.periodCount=be.length;a.i.gapCount=a.L;return G(xc,$u(a,be,!1),4);case 6:a.i={presentationTimeline:Za,variants:a.m.j,textStreams:a.m.Lg(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:fa||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:av(b),
996
+ nextUrl:bv(b),periodCount:be.length,gapCount:a.L,isLowLatency:a.S};if(!Za.Ni()){xc.B(7);break}mh=lh(b,"UTCTiming");return G(xc,cv(a,U,mh),8);case 8:He=xc.h;if(!a.j)return xc.return();Za.Ai(He);case 7:Za.mf();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),I(xc)}})}function $u(a,b,c){var d;return O(function(e){if(1==e.g)return G(e,a.m.mg(b,!0,c),2);a.i.variants=a.m.j;d=a.m.Lg();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);I(e)})}
997
+ function Xu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H;return O(function(E){if(1==E.g){c=b.attributes.mpdId;d=th(b,"originalPublishTime",wh);if(!c||c!==a.l.tf||d!==a.l.pe)throw a.C=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(kh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Hh(l.attributes.sel||""),n=m[m.length-1],p=oh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.pc){r=oh(l)||"";var K=xh(r);if(null!=K){a.l.fc=K;for(var M=t(a.s.values()),N=M.next();!N.done;N=M.next())N.value.fc=
998
+ K}}else if("type"===n.pc){a.i.presentationTimeline.Uc("static"==p);a.l.type=p;K=t(a.s.values());for(M=K.next();!M.done;M=K.next())M.value.Vb="dynamic"==p;"static"==p&&(a.J=-1)}else"publishTime"===n.pc?a.l.pe=wh(p)||0:null===n.pc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Ih(a.C,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(K=n.id,a.i.periodCount--,M=t(a.s.keys()),N=M.next();!N.done;N=M.next())if(N=N.value,N.startsWith(K)){var Q=
999
+ a.s.get(N);mt(Q,Ot,"SegmentTimeline").children=[];dv(a,N);a.s.delete(N)}}else if("SegmentTemplate"===n.name){M=Hh(l.attributes.sel||"");K=M[M.length-1];if(K.pc){M=ev(a,M);N=oh(l)||"";Q=t(M);for(var U=Q.next();!U.done;U=Q.next())U=a.s.get(U.value),Jh(U.N.zc,l.tagName,K.pc,N);K=M}else K=[];u=K;w=t(u);for(v=w.next();!v.done;v=w.next())A=v.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){K=Hh(l.attributes.sel||"");K=ev(a,K);M=t(K);for(N=M.next();!N.done;N=M.next())N=a.s.get(N.value),N=
1000
+ mt(N,Ot,"SegmentTimeline"),Q=lh(N,"S"),Ih(Q,l),N.children=Q;z=K;C=t(z);for(v=C.next();!v.done;v=C.next())y=v.value,g.add(y)}B=t(g);for(v=B.next();!v.done;v=B.next())D=v.value,dv(a,D);F=t(f);for(J=F.next();!J.done;J=F.next())L=J.value,e.push.apply(e,x(Zu(a,{Vb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,Na:null,ya:null,Ba:null,N:null,bandwidth:0,Rg:!1,ab:a.l.ab,profiles:a.l.profiles,fc:a.l.fc,roles:null},a.l.Ya,L).periods));if(!e.length)return E.B(2);a.i.periodCount+=e.length;
1001
+ a.i.gapCount=a.L;return G(E,$u(a,e,!0),2)}"static"==a.l.type&&(H=a.l.fc,a.i.presentationTimeline.vb(H||Infinity));I(E)})}function ev(a,b){var c="",d="",e="";b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,"Period"===f.name?c=f.id:"AdaptationSet"===f.name?d=f.id:"Representation"===f.name&&(e=f.id);b=[];if(e)b.push(c+","+e);else for(a=t(a.s.values()),e=a.next();!e.done;e=a.next())e=e.value,e.Na.id===c&&e.Ba.id===d&&e.N.id&&b.push(c+","+e.N.id);return b}
1002
+ function dv(a,b){var c=a.s.get(b),d=a.u[b];d.segmentIndex&&d.segmentIndex.hb(a.i.presentationTimeline.Hb());try{var e=Nt(c,function(f,g,h,k){return fv(a,f,g,h,k)},a.u,!0,a.g.dash.initialSegmentLimit,a.Y,c.N.aesKey,null,!0);d.createSegmentIndex=function(){var f;return O(function(g){if(1==g.g){if(d.segmentIndex)return g.B(0);f=d;return G(g,e.Ic(),3)}f.segmentIndex=g.h;I(g)})}}catch(f){if(b=c.N.contentType,b!=Uc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
1003
+ function av(a){var b=qh(a,"ServiceDescription");if(!b)return null;a=qh(b,"Latency");b=qh(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
1004
+ return c}function bv(a){a=lh(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
1005
+ function Zu(a,b,c,d){var e=b.fc;e||(e=th(d,"mediaPresentationDuration",xh),a.l.fc=e);var f=0;a.i&&a.i.presentationTimeline&&a.W&&(f=a.i.presentationTimeline.sc());var g=[],h=f;d=lh(d,"Period");for(var k=0;k<d.length;k++){var l=d[k],m=d[k+1],n=th(l,"start",xh,h),p=l.attributes.id,r=th(l,"duration",xh),u=null;if(m){var w=th(m,"start",xh);null!=w&&(u=w-n)}else null!=e&&(u=e-n+f);w=Yc;u&&r&&Math.abs(u-r)>w&&u>r&&a.L++;null==u&&(u=r);if(!(null!==a.M&&null!==p&&null!==n&&n<a.M)||a.ha.includes(p)||k+1==
1006
+ d.length){null!==n&&(null===a.M||n>a.M)&&(a.M=n);h=gv(a,b,c,{start:n,duration:u,node:l,ge:null==u||!m});g.push(h);b.Na.id&&u&&(a.Y[b.Na.id]=u);if(null==u){h=null;break}h=n+u}}a.ha=g.map(function(v){return v.id});return null!=e?{periods:g,duration:e+f,Sh:!1}:{periods:g,duration:h,Sh:!0}}
1007
+ function gv(a,b,c,d){b.Na=hv(a,d.node,null,c);b.ya=d;b.Na.ab=b.ab;b.Na.id||(b.Na.id="__shaka_period_"+d.start);var e=lh(d.node,"EventStream");c=b.presentationTimeline.Hb();e=t(e);for(var f=e.next();!f.done;f=e.next())iv(a,d.start,d.duration,f.value,c);c=lh(d.node,"AdaptationSet").map(function(m){return jv(a,b,m)}).filter(Ye);if(b.Vb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Bk);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);
1008
+ }d=c.filter(function(m){return!m.Ah});c=c.filter(function(m){return m.Ah});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ah.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Ie:h.Ie},l=k.next())h.Ie=l.value,h.Ie.trickModeVideo=e.streams.find(function(m){return function(n){return De(m.Ie.codecs)==De(n.codecs)}}(h))}}}c=kv(a.g.disableAudio,d,"audio");e=kv(a.g.disableVideo,d,"video");f=kv(a.g.disableText,
1009
+ d,Uc);d=kv(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.Na.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function kv(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
1010
+ function jv(a,b,c){function d(E){switch(E){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ba=hv(a,c,b.Na,null);var f=!1,g=lh(c,"Role"),h=g.map(function(E){return E.attributes.value}).filter(Ye),k=void 0,l=b.Ba.contentType==Uc;l&&(k="subtitle");g=t(g);for(var m=g.next();!m.done;m=g.next()){m=m.value;var n=m.attributes.schemeIdUri;if(null==
1011
1011
  n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":f=!0;break;case "caption":case "subtitle":k=m}}var p,r;n=lh(c,"EssentialProperty");g=null;var u=!1;m=!1;n=t(n);for(var w=n.next();!w.done;w=n.next()){w=w.value;var v=w.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==v?g=w.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?p=e(parseInt(w.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v?r=d(parseInt(w.attributes.value,10)):"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=
1012
1012
  v&&("urn:mpeg:dash:ssr:2023"==v&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=lh(c,"SupplementalProperty");n=t(n);for(w=n.next();!w.done;w=n.next())w=w.value,v=w.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==v?A=parseInt(w.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?p=e(parseInt(w.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v&&(r=d(parseInt(w.attributes.value,10)));n=lh(c,"Accessibility");var z=new Map,C;n=t(n);for(w=
1013
1013
  n.next();!w.done;w=n.next())if(v=w.value,w=v.attributes.schemeIdUri,v=v.attributes.value,"urn:scte:dash:cc:cea-608:2015"==w)if(w=1,null!=v){v=v.split(";");for(var y=t(v),B=y.next();!B.done;B=y.next()){var D=B.value,F=B=void 0;D.includes("=")?(D=D.split("="),B=D[0].startsWith("CC")?D[0]:"CC"+D[0],F=D[1]||"und"):(B="CC"+w,2==v.length?w+=2:w++,F=D);z.set(B,ad(F))}}else z.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==w)if(w=1,null!=v)for(v=t(v.split(";")),B=v.next();!B.done;B=v.next())B=B.value,
1014
1014
  D=y=void 0,B.includes("=")?(B=B.split("="),y="svc"+B[0],D=B[1].split(",")[0].split(":").pop()):(y="svc"+w,w++,D=B),z.set(y,ad(D));else z.set("svc1","und");else"urn:mpeg:dash:role:2011"==w?null!=v&&(h.push(v),"captions"==v&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==w&&("1"==v?C="visually impaired":"2"==v&&(C="hard of hearing"));if(m)return null;m=lh(c,"ContentProtection");var J=Zs(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),L=ad(b.Ba.language||"und"),H=b.Ba.label;m=lh(c,"Representation");
1015
- c=m.map(function(E){if(E=kv(a,b,J,k,L,H,f,h,z,E,C,A))E.hdr=E.hdr||p,E.colorGamut=E.colorGamut||r,E.fastSwitching=u;return E}).filter(function(E){return!!E});if(0==c.length){g="image"==b.Ba.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new T(2,4,4003);}if(!b.Ba.contentType||"application"==b.Ba.contentType)for(b.Ba.contentType=lv(c[0].mimeType,c[0].codecs),l=t(c),w=l.next();!w.done;w=l.next())w.value.type=b.Ba.contentType;l=b.Ba.id||"__fake__"+a.aa++;n=t(c);for(w=n.next();!w.done;w=
1015
+ c=m.map(function(E){if(E=lv(a,b,J,k,L,H,f,h,z,E,C,A))E.hdr=E.hdr||p,E.colorGamut=E.colorGamut||r,E.fastSwitching=u;return E}).filter(function(E){return!!E});if(0==c.length){g="image"==b.Ba.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new T(2,4,4003);}if(!b.Ba.contentType||"application"==b.Ba.contentType)for(b.Ba.contentType=mv(c[0].mimeType,c[0].codecs),l=t(c),w=l.next();!w.done;w=l.next())w.value.type=b.Ba.contentType;l=b.Ba.id||"__fake__"+a.ea++;n=t(c);for(w=n.next();!w.done;w=
1016
1016
  n.next()){w=w.value;v=t(J.drmInfos);for(y=v.next();!y.done;y=v.next())y=y.value,y.keyIds=y.keyIds&&w.keyIds?new Set([].concat(x(y.keyIds),x(w.keyIds))):y.keyIds||w.keyIds;a.g.dash.enableAudioGroups&&(w.groupId=l)}m=m.map(function(E){return E.attributes.id}).filter(Ye);return{id:l,contentType:b.Ba.contentType,language:L,fm:f,streams:c,drmInfos:J.drmInfos,Ah:g,Bk:m}}
1017
- function kv(a,b,c,d,e,f,g,h,k,l,m,n){b.N=gv(a,l,b.Ba,null);var p=b.N.id;a.P=Math.min(a.P,b.N.ab);a.S=0<a.P;if(!mv(b.N))return null;var r=b.ya.start;b.bandwidth=th(l,"bandwidth",Ch)||0;b.roles=h;var u=b.N.contentType,w=u==Uc||"application"==u;u="image"==u;try{var v=void 0;if(c.fg){var A=b.N.Ya,z=Oc(A(),[c.fg.dk]),C=Dg(z,a.g.retryParameters);v={bitsKey:128,blockCipherMode:"CBC",iv:c.fg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,E,K;return O(function(M){if(1==M.g)return G(M,Uu(a,C,6),2);
1018
- if(3!=M.g){H=M.h;if(!H.data||16!=H.data.byteLength)throw new T(2,4,4049);E={name:"AES-CBC"};K=v;return G(M,window.crypto.subtle.importKey("raw",H.data,E,!0,["decrypt"]),3)}K.cryptoKey=M.h;v.fetchKey=void 0;I(M)})}}}b.N.aesKey=v;A=function(H,E,K,M){return ev(a,H,E,K,M)};if(b.N.wd)var y=Ct(b,A,v);else if(b.N.lc)y=It(b,a.u,v);else if(b.N.xc)y=Nt(b,A,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.W,v,n,!1);else{var B=b.ya.duration||0,D=b.N.Ya;y={Gc:function(){var H=al(r,B,D());H.qc(function(E){E.mimeType=b.N.mimeType;
1017
+ function lv(a,b,c,d,e,f,g,h,k,l,m,n){b.N=hv(a,l,b.Ba,null);var p=b.N.id;a.P=Math.min(a.P,b.N.ab);a.S=0<a.P;if(!nv(b.N))return null;var r=b.ya.start;b.bandwidth=th(l,"bandwidth",Ch)||0;b.roles=h;var u=b.N.contentType,w=u==Uc||"application"==u;u="image"==u;try{var v=void 0;if(c.fg){var A=b.N.Ya,z=Oc(A(),[c.fg.dk]),C=Dg(z,a.g.retryParameters);v={bitsKey:128,blockCipherMode:"CBC",iv:c.fg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,E,K;return O(function(M){if(1==M.g)return G(M,Vu(a,C,6),2);
1018
+ if(3!=M.g){H=M.h;if(!H.data||16!=H.data.byteLength)throw new T(2,4,4049);E={name:"AES-CBC"};K=v;return G(M,window.crypto.subtle.importKey("raw",H.data,E,!0,["decrypt"]),3)}K.cryptoKey=M.h;v.fetchKey=void 0;I(M)})}}}b.N.aesKey=v;A=function(H,E,K,M){return fv(a,H,E,K,M)};if(b.N.wd)var y=Ct(b,A,v);else if(b.N.lc)y=It(b,a.u,v);else if(b.N.zc)y=Nt(b,A,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.Y,v,n,!1);else{var B=b.ya.duration||0,D=b.N.Ya;y={Ic:function(){var H=al(r,B,D());H.qc(function(E){E.mimeType=b.N.mimeType;
1019
1019
  E.codecs=b.N.codecs});return Promise.resolve(H)}}}}catch(H){if((w||u)&&4002==H.code)return null;throw H;}n=lh(l,"ContentProtection");n=ct(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;lh(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.attributes.schemeIdUri&&"JOC"==H.attributes.value})&&(A=!0);z=!1;w&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var F;if(u&&((l=lh(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile",
1020
- "http://dashif.org/guidelines/thumbnail_tile"].includes(H.attributes.schemeIdUri)}))&&(F=l.attributes.value),!F))return null;var J;l=b.N.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");w=b.N.id?b.Na.id+","+b.N.id:"";a.C.length&&p&&a.s.set(b.Na.id+","+p,nv(b));var L=w&&a.u[w]?a.u[w]:{id:a.aa++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){L.segmentIndex&&
1020
+ "http://dashif.org/guidelines/thumbnail_tile"].includes(H.attributes.schemeIdUri)}))&&(F=l.attributes.value),!F))return null;var J;l=b.N.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");w=b.N.id?b.Na.id+","+b.N.id:"";a.C.length&&p&&a.s.set(b.Na.id+","+p,ov(b));var L=w&&a.u[w]?a.u[w]:{id:a.ea++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){L.segmentIndex&&
1021
1021
  (L.segmentIndex.release(),L.segmentIndex=null)},segmentIndex:null,mimeType:b.N.mimeType,codecs:l,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.Ba.language,label:f,type:b.Ba.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.N.qd,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:A,
1022
- closedCaptions:k,hdr:J,colorGamut:void 0,videoLayout:void 0,tilesLayout:F,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([we(b.N.mimeType,b.N.codecs)])};L.createSegmentIndex=function(){var H;return O(function(E){if(1==E.g){if(L.segmentIndex)return E.B(0);H=L;return G(E,y.Gc(),3)}H.segmentIndex=E.h;I(E)})};w&&b.Vb&&!a.u[w]&&(a.u[w]=L);return L}
1023
- function nv(a){for(var b={},c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,["period","adaptationSet","representation"].includes(d)){var e=a[d];b[d]={wd:null,lc:null,xc:e.xc,Ya:e.Ya,width:e.width,height:e.height,contentType:e.contentType,mimeType:e.mimeType,language:e.language,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,emsgSchemeIdUris:e.emsgSchemeIdUris,id:e.id,qd:e.qd,audioSamplingRate:e.audioSamplingRate,ab:e.ab,kd:e.kd}}else"periodInfo"==d?(e=a[d],
1024
- b[d]={start:e.start,duration:e.duration,node:null,ge:e.ge}):b[d]=a[d];return b}function Qu(a){var b,c;return O(function(d){switch(d.g){case 1:return b=0,ta(d,2),G(d,Ru(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Su(a,b);I(d)}})}
1025
- function Su(a,b){if(!(0>a.J)){var c=a.J;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.K.X(Math.max(c-b,pd(a.Z)))}}
1026
- function gv(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,qd:null,audioSamplingRate:null,ab:0,ih:0};d=d||c.Ya;var e=b.attributes.id,f=lh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=oh(m);l&&m&&(bu(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(oh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=uh(b,
1027
- "urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=Hl(m).join(",");n=th(b,"frameRate",Gh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=ov(lh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=lh(b,"AudioChannelConfiguration");u=pv(u)||c.qd;var w=th(b,"audioSamplingRate",Dh)||c.audioSamplingRate;k||(k=lv(l,m));var v=qh(b,"SegmentBase"),A=qh(b,"SegmentTemplate"),z=v?th(v,"availabilityTimeOffset",Eh)||0:0,C=A?th(A,"availabilityTimeOffset",Eh)||0:0,y=f&&f.length?th(f[0],"availabilityTimeOffset",
1028
- Eh)||0:0;z=c.ab+y+z+C;C=null;(y=qh(b,"SegmentSequenceProperties"))&&(y=qh(y,"SAP"))&&(C=th(y,"cadence",zh));y=b.attributes.label;var B=lh(b,"Label");B&&B.length&&(B=B[0],nh(B)&&(y=nh(B)));return{Ya:function(){return Oc(d(),f.length?a.h&&h?cu(a.h,e):g?g:[]:[])},wd:v||c.wd,lc:qh(b,"SegmentList")||c.lc,xc:A||c.xc,width:th(b,"width",Dh)||c.width,height:th(b,"height",Dh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,qd:u,audioSamplingRate:w,
1029
- ab:z,kd:null,ih:C||c.ih,label:y||null}}function ov(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
1030
- function pv(a){a=t(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=
1031
- 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 mv(a){var b=a.wd?1:0;b+=a.lc?1:0;b+=a.xc?1:0;if(0==b)return a.contentType==Uc||"application"==a.contentType?!0:!1;1!=b&&(a.wd&&(a.lc=null),a.xc=null);return!0}
1032
- function qv(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Gc(c)],f=Oc(b(),e),g=Dg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),xg(a.O,h),G(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=zc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
1033
- function bv(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;ta(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.B(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.B(8);
1034
- 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":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return G(n,qv(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return G(n,qv(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
1022
+ closedCaptions:k,hdr:J,colorGamut:void 0,videoLayout:void 0,tilesLayout:F,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([we(b.N.mimeType,b.N.codecs)])};L.createSegmentIndex=function(){var H;return O(function(E){if(1==E.g){if(L.segmentIndex)return E.B(0);H=L;return G(E,y.Ic(),3)}H.segmentIndex=E.h;I(E)})};w&&b.Vb&&!a.u[w]&&(a.u[w]=L);return L}
1023
+ function ov(a){for(var b={},c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,["period","adaptationSet","representation"].includes(d)){var e=a[d];b[d]={wd:null,lc:null,zc:e.zc,Ya:e.Ya,width:e.width,height:e.height,contentType:e.contentType,mimeType:e.mimeType,language:e.language,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,emsgSchemeIdUris:e.emsgSchemeIdUris,id:e.id,qd:e.qd,audioSamplingRate:e.audioSamplingRate,ab:e.ab,ld:e.ld}}else"periodInfo"==d?(e=a[d],
1024
+ b[d]={start:e.start,duration:e.duration,node:null,ge:e.ge}):b[d]=a[d];return b}function Ru(a){var b,c;return O(function(d){switch(d.g){case 1:return b=0,ta(d,2),G(d,Su(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Tu(a,b);I(d)}})}
1025
+ function Tu(a,b){if(!(0>a.J)){var c=a.J;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.K.X(Math.max(c-b,pd(a.aa)))}}
1026
+ function hv(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,qd:null,audioSamplingRate:null,ab:0,ih:0};d=d||c.Ya;var e=b.attributes.id,f=lh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=oh(m);l&&m&&(bu(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(oh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=uh(b,
1027
+ "urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=Hl(m).join(",");n=th(b,"frameRate",Gh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=pv(lh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=lh(b,"AudioChannelConfiguration");u=qv(u)||c.qd;var w=th(b,"audioSamplingRate",Dh)||c.audioSamplingRate;k||(k=mv(l,m));var v=qh(b,"SegmentBase"),A=qh(b,"SegmentTemplate"),z=v?th(v,"availabilityTimeOffset",Eh)||0:0,C=A?th(A,"availabilityTimeOffset",Eh)||0:0,y=f&&f.length?th(f[0],"availabilityTimeOffset",
1028
+ Eh)||0:0;z=c.ab+y+z+C;C=null;(y=qh(b,"SegmentSequenceProperties"))&&(y=qh(y,"SAP"))&&(C=th(y,"cadence",zh));y=b.attributes.label;var B=lh(b,"Label");B&&B.length&&(B=B[0],nh(B)&&(y=nh(B)));return{Ya:function(){return Oc(d(),f.length?a.h&&h?cu(a.h,e):g?g:[]:[])},wd:v||c.wd,lc:qh(b,"SegmentList")||c.lc,zc:A||c.zc,width:th(b,"width",Dh)||c.width,height:th(b,"height",Dh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,qd:u,audioSamplingRate:w,
1029
+ ab:z,ld:null,ih:C||c.ih,label:y||null}}function pv(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
1030
+ function qv(a){a=t(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=
1031
+ 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 nv(a){var b=a.wd?1:0;b+=a.lc?1:0;b+=a.zc?1:0;if(0==b)return a.contentType==Uc||"application"==a.contentType?!0:!1;1!=b&&(a.wd&&(a.lc=null),a.zc=null);return!0}
1032
+ function rv(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Gc(c)],f=Oc(b(),e),g=Dg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),xg(a.O,h),G(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=zc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
1033
+ function cv(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;ta(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.B(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.B(8);
1034
+ 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":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return G(n,rv(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return G(n,rv(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
1035
1035
  3);break;case 5:wa(n);case 3:g=f.next();n.B(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
1036
- function hv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=th(d,"timescale",Dh)||1;d=t(lh(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=th(k,"presentationTime",Dh)||0,m=th(k,"duration",Dh)||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:Kh(k),eventNode:k},a.j.onTimelineRegionAdded(k))}}
1037
- function ev(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=Jg,g=e?0:1,h=Ll(b,c,d,a.g.retryParameters),G(l,Uu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function lv(a,b){b=we(a,b);return Pe(b)?Uc:a.split("/")[0]}function Uu(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);xg(a.O,b);return b.promise}
1038
- function Tu(a){var b=a.l.pe;if(!a.l.tf||!b||!a.C.length)return[];var c=Date.now()/1E3,d=a.C.filter(function(e){e=Dh(e.attributes.ttl);return!e||b+e>c}).map(oh).filter(Ye);return d.length?Oc(a.A,d):[]}P("shaka.dash.DashParser",Pu);Di["application/dash+xml"]=function(){return new Pu};Di["video/vnd.mpeg.dash.mpd"]=function(){return new Pu};function rv(){}P("shaka.dependencies",rv);rv.has=function(a){return sv.has(a)};rv.add=function(a,b){if(!tv[a])throw Error(a+" is not supported");a==uv?Ad("mux.js","mux.js is no longer used in Shaka Player."):sv.set(a,function(){return b})};var uv="muxjs",tv={gm:uv,ISOBoxer:"ISOBoxer"};rv.Allowed=tv;var sv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function vv(a,b,c){this.type=a;this.g=b;this.segments=c||null}function wv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}wv.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};
1039
- function xv(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function yv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Y(a,b,c){return(a=yv(a,b))?a.value:c||null}function zv(a,b){a=yv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Av(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Yb=c}function Bv(a,b){this.name=a;this.value=b};function Cv(a,b){return a.filter(function(c){return c.name==b})}function Dv(a,b){return a.filter(function(c){return zv(c,"TYPE")==b})}function Ev(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Fv(a,b,c){c=void 0===c?0:c;return(a=Ev(a,b))?Number(a.value):c}function Gv(a,b,c){return b?Hv(a,[b],c):[]}function Hv(a,b,c){if(!b.length)return[];b=Oc(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(Iv(d.value,c));return a}
1040
- function Iv(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new T(2,4,4039,e);}}return a};function Jv(){this.g=0}
1041
- function Kv(a,b){b=zc(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 T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Lv(a,f),--a.g,Mv.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=Lv(a,g);if(Nv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
1042
- c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Lv(a,k),Mv.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"==Y(k,"TYPE")?f.push(k):"MAP"==Y(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 Av(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Av("",d,f)));return new vv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
1043
- g.name&&(g.attributes.push(new Bv("URI",h)),d=!0)}}return new vv(b,e)}function Lv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new dq(d);var f;(f=fq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=fq(d,g);)c.push(new Bv(f[1],f[2]||f[3])),eq(d)}return new wv(a,b,c,e)}
1044
- var Mv="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 EXT-X-DATERANGE".split(" "),Nv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function Ov(){}function Pv(a){try{var b=Qv(a);return sg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return qg(c)}}
1045
- function Qv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(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=Kc(a):e=Dc(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",Ov);Ov.parse=Pv;zg("data",Pv);function Rv(){var a=this;this.g=this.h=null;this.C=1;this.u=new Map;this.I=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(Uc,new Map);this.O.set("image",new Map);this.ob=new Set;this.i=new Map;this.j=null;this.M="";this.Ia=new Jv;this.J=-1;this.ea=Infinity;this.aa=this.Nb=!1;this.A=new Vb(function(){if(a.W&&!a.g.continueLoadingWhenPaused&&(a.S.Pa(a.W,"timeupdate"),a.W.paused)){a.S.ia(a.W,"timeupdate",function(){return Sv(a)});return}Sv(a)});this.xa=Tv;this.m=
1046
- null;this.Xa=0;this.s=Infinity;this.Fa=this.Aa=this.P=0;this.Z=new wg;this.G=new Map;this.H=new Map;this.sa=new Map;this.qa=new Map;this.L=new Map;this.ra=new Map;this.Ga=new Map;this.Lb=this.K=!1;this.Kb=new od(5);this.l=null;this.ka=!0;this.Ha=new Set;this.S=new rd;this.W=null}q=Rv.prototype;q.configure=function(a){this.g=a;this.l&&this.l.configure(this.g)};
1047
- q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.K=b.isLowLatencyMode(),G(e,Uv(c,[a]),2)):3!=e.g?(d=e.h,c.M=d.uri,G(e,Vv(c,d.data,a),3)):e.return(c.m)})};
1048
- q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.Z&&(a.push(this.Z.destroy()),this.Z=null);this.g=this.h=null;this.ob.clear();this.m=null;this.i.clear();this.I.clear();this.H.clear();this.u.clear();this.sa.clear();this.qa.clear();this.L.clear();this.ra.clear();this.Ga.clear();this.Ha.clear();this.l&&this.l.destroy();this.S&&(this.S.release(),this.S=null);return Promise.all(a)};
1049
- q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){if(!Wv(a))return p.return();b=[];c=Array.from(a.i.values());a.s=Infinity;a.m.gapCount=0;d=c.filter(function(r){return r.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Xv(a,g));return G(p,Promise.all(b),2)}Yv(a,d.map(function(r){return r.stream}));h=d.some(function(r){return 0==r.$d});d.length&&!h&&(k=Zv,$v(a,k.Ui),l=d.map(function(r){return r.ec}),a.j.vb(Math.min.apply(Math,x(l))),
1050
- a.h.updateDuration());h&&aw(a);m=t(d);for(f=m.next();!f.done;f=m.next())n=f.value,n.stream.segmentIndex&&!n.stream.segmentIndex.T[0]&&a.h.disableStream(n.stream);I(p)})};function bw(a,b){return Wv(a)?a.O.get(b.type):b.pf}
1051
- function Xv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R,ca,fa,Xa;return O(function(Aa){switch(Aa.g){case 1:c=[];d=t(b.R());for(e=d.next();!e.done;e=d.next())f=e.value,g=new nb(f),h=g.g,b.Re&&(0<=b.Pb&&h.add("_HLS_msn",String(b.Pb)),0<=b.Qb&&h.add("_HLS_part",String(b.Qb))),b.Se&&h.add("_HLS_skip","YES"),Db(h)&&rb(g,h),c.push(g.toString());ta(Aa,2);return G(Aa,Uv(a,c,!0),4);case 4:k=Aa.h;va(Aa,3);break;case 2:throw l=wa(Aa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Aa.return();
1052
- m=Kv(a.Ia,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.R().includes(n)||b.si.push(n);p=Cv(m.g,"EXT-X-DEFINE");r=cw(a,p,n);u=b.stream;w=bw(a,b);return G(Aa,dw(a,m,u.mimeType,b.R,r),5);case 5:v=Aa.h;A=v.keyIds;z=v.drmInfos;C=function(Ra,bb){return Ra.size===bb.size&&[].concat(x(Ra)).every(function(Ya){return bb.has(Ya)})};C(u.keyIds,A)||(u.keyIds=A,u.drmInfos=z,a.h.newDrmInfo(u));y=ew(a,m,w,r,b.R,b.type);B=y.segments;if(D=y.bandwidth)u.bandwidth=D;F=El(u);J=t(B);for(L=J.next();!L.done;L=
1053
- J.next())H=L.value,H.ma&&(H.ma.nd=F);u.segmentIndex.je(B,a.j.Hb());B.length&&(E=Fv(m.g,"EXT-X-MEDIA-SEQUENCE",0),M=(K=Ev(m.g,"EXT-X-SKIP"))?Number(Y(K,"SKIPPED-SEGMENTS")):0,N=fw(E,B),Q=N.Pb,U=N.Qb,b.Pb=Q+M,b.Qb=U,R=w.get(E),u.segmentIndex.hb(R));if(ca=u.segmentIndex.T[0]||null)b.Oc=ca.startTime,fa=B[B.length-1],b.ec=fa.endTime;if(Xa=Ev(m.g,"EXT-X-ENDLIST"))b.$d=!0;gw(a,m);hw(a,m.g,u.type,r,b.R);I(Aa)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};
1036
+ function iv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=th(d,"timescale",Dh)||1;d=t(lh(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=th(k,"presentationTime",Dh)||0,m=th(k,"duration",Dh)||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:Kh(k),eventNode:k},a.j.onTimelineRegionAdded(k))}}
1037
+ function fv(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=Jg,g=e?0:1,h=Ll(b,c,d,a.g.retryParameters),G(l,Vu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function mv(a,b){b=we(a,b);return Pe(b)?Uc:a.split("/")[0]}function Vu(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);xg(a.O,b);return b.promise}
1038
+ function Uu(a){var b=a.l.pe;if(!a.l.tf||!b||!a.C.length)return[];var c=Date.now()/1E3,d=a.C.filter(function(e){e=Dh(e.attributes.ttl);return!e||b+e>c}).map(oh).filter(Ye);return d.length?Oc(a.A,d):[]}P("shaka.dash.DashParser",Qu);Di["application/dash+xml"]=function(){return new Qu};Di["video/vnd.mpeg.dash.mpd"]=function(){return new Qu};function sv(){}P("shaka.dependencies",sv);sv.has=function(a){return tv.has(a)};sv.add=function(a,b){if(!uv[a])throw Error(a+" is not supported");a==vv?Ad("mux.js","mux.js is no longer used in Shaka Player."):tv.set(a,function(){return b})};var vv="muxjs",uv={gm:vv,ISOBoxer:"ISOBoxer"};sv.Allowed=uv;var tv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function wv(a,b,c){this.type=a;this.g=b;this.segments=c||null}function xv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}xv.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};
1039
+ function yv(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function zv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Y(a,b,c){return(a=zv(a,b))?a.value:c||null}function Av(a,b){a=zv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Bv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Yb=c}function Cv(a,b){this.name=a;this.value=b};function Dv(a,b){return a.filter(function(c){return c.name==b})}function Ev(a,b){return a.filter(function(c){return Av(c,"TYPE")==b})}function Fv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Gv(a,b,c){c=void 0===c?0:c;return(a=Fv(a,b))?Number(a.value):c}function Hv(a,b,c){return b?Iv(a,[b],c):[]}function Iv(a,b,c){if(!b.length)return[];b=Oc(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(Jv(d.value,c));return a}
1040
+ function Jv(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new T(2,4,4039,e);}}return a};function Kv(){this.g=0}
1041
+ function Lv(a,b){b=zc(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 T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Mv(a,f),--a.g,Nv.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=Mv(a,g);if(Ov.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
1042
+ c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Mv(a,k),Nv.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"==Y(k,"TYPE")?f.push(k):"MAP"==Y(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 Bv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Bv("",d,f)));return new wv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
1043
+ g.name&&(g.attributes.push(new Cv("URI",h)),d=!0)}}return new wv(b,e)}function Mv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new dq(d);var f;(f=fq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=fq(d,g);)c.push(new Cv(f[1],f[2]||f[3])),eq(d)}return new xv(a,b,c,e)}
1044
+ var Nv="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 EXT-X-DATERANGE".split(" "),Ov="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function Pv(){}function Qv(a){try{var b=Rv(a);return sg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return qg(c)}}
1045
+ function Rv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(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=Kc(a):e=Dc(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",Pv);Pv.parse=Qv;zg("data",Qv);function Sv(){var a=this;this.g=this.h=null;this.C=1;this.u=new Map;this.I=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(Uc,new Map);this.O.set("image",new Map);this.ob=new Set;this.i=new Map;this.j=null;this.M="";this.Ia=new Kv;this.J=-1;this.ea=Infinity;this.aa=this.Nb=!1;this.A=new Vb(function(){if(a.W&&!a.g.continueLoadingWhenPaused&&(a.S.Pa(a.W,"timeupdate"),a.W.paused)){a.S.ka(a.W,"timeupdate",function(){return Tv(a)});return}Tv(a)});this.xa=Uv;this.m=
1046
+ null;this.Xa=0;this.s=Infinity;this.Fa=this.Aa=this.P=0;this.Y=new wg;this.G=new Map;this.H=new Map;this.sa=new Map;this.qa=new Map;this.L=new Map;this.ra=new Map;this.Ga=new Map;this.Lb=this.K=!1;this.Kb=new od(5);this.l=null;this.ha=!0;this.Ha=new Set;this.S=new rd;this.W=null}q=Sv.prototype;q.configure=function(a){this.g=a;this.l&&this.l.configure(this.g)};
1047
+ q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.K=b.isLowLatencyMode(),G(e,Vv(c,[a]),2)):3!=e.g?(d=e.h,c.M=d.uri,G(e,Wv(c,d.data,a),3)):e.return(c.m)})};
1048
+ q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.Y&&(a.push(this.Y.destroy()),this.Y=null);this.g=this.h=null;this.ob.clear();this.m=null;this.i.clear();this.I.clear();this.H.clear();this.u.clear();this.sa.clear();this.qa.clear();this.L.clear();this.ra.clear();this.Ga.clear();this.Ha.clear();this.l&&this.l.destroy();this.S&&(this.S.release(),this.S=null);return Promise.all(a)};
1049
+ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){if(!Xv(a))return p.return();b=[];c=Array.from(a.i.values());a.s=Infinity;a.m.gapCount=0;d=c.filter(function(r){return r.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Yv(a,g));return G(p,Promise.all(b),2)}Zv(a,d.map(function(r){return r.stream}));h=d.some(function(r){return 0==r.$d});d.length&&!h&&(k=$v,aw(a,k.Ui),l=d.map(function(r){return r.ec}),a.j.vb(Math.min.apply(Math,x(l))),
1050
+ a.h.updateDuration());h&&bw(a);m=t(d);for(f=m.next();!f.done;f=m.next())n=f.value,n.stream.segmentIndex&&!n.stream.segmentIndex.T[0]&&a.h.disableStream(n.stream);I(p)})};function cw(a,b){return Xv(a)?a.O.get(b.type):b.pf}
1051
+ function Yv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R,ca,fa,Xa;return O(function(Aa){switch(Aa.g){case 1:c=[];d=t(b.R());for(e=d.next();!e.done;e=d.next())f=e.value,g=new nb(f),h=g.g,b.Re&&(0<=b.Pb&&h.add("_HLS_msn",String(b.Pb)),0<=b.Qb&&h.add("_HLS_part",String(b.Qb))),b.Se&&h.add("_HLS_skip","YES"),Db(h)&&rb(g,h),c.push(g.toString());ta(Aa,2);return G(Aa,Vv(a,c,!0),4);case 4:k=Aa.h;va(Aa,3);break;case 2:throw l=wa(Aa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Aa.return();
1052
+ m=Lv(a.Ia,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.R().includes(n)||b.si.push(n);p=Dv(m.g,"EXT-X-DEFINE");r=dw(a,p,n);u=b.stream;w=cw(a,b);return G(Aa,ew(a,m,u.mimeType,b.R,r),5);case 5:v=Aa.h;A=v.keyIds;z=v.drmInfos;C=function(Ra,cb){return Ra.size===cb.size&&[].concat(x(Ra)).every(function(Ya){return cb.has(Ya)})};C(u.keyIds,A)||(u.keyIds=A,u.drmInfos=z,a.h.newDrmInfo(u));y=fw(a,m,w,r,b.R,b.type);B=y.segments;if(D=y.bandwidth)u.bandwidth=D;F=El(u);J=t(B);for(L=J.next();!L.done;L=
1053
+ J.next())H=L.value,H.ma&&(H.ma.od=F);u.segmentIndex.je(B,a.j.Hb());B.length&&(E=Gv(m.g,"EXT-X-MEDIA-SEQUENCE",0),M=(K=Fv(m.g,"EXT-X-SKIP"))?Number(Y(K,"SKIPPED-SEGMENTS")):0,N=gw(E,B),Q=N.Pb,U=N.Qb,b.Pb=Q+M,b.Qb=U,R=w.get(E),u.segmentIndex.hb(R));if(ca=u.segmentIndex.T[0]||null)b.Pc=ca.startTime,fa=B[B.length-1],b.ec=fa.endTime;if(Xa=Fv(m.g,"EXT-X-ENDLIST"))b.$d=!0;hw(a,m);iw(a,m.g,u.type,r,b.R);I(Aa)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};
1054
1054
  q.banLocation=function(a){this.l&&this.l.banLocation(a)};q.setMediaElement=function(a){this.W=a};
1055
- function iw(a,b){for(var c=-1==a.J,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=bw(a,e);if(f=f.T[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.J=Math.max(a.J,k));e.rg=k;break}}}}if(!(0>a.J))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,jw(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.J-c.rg,0<e&&(d.T.splice(0,e),d=d.T[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),kw(a,
1055
+ function jw(a,b){for(var c=-1==a.J,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=cw(a,e);if(f=f.T[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.J=Math.max(a.J,k));e.rg=k;break}}}}if(!(0>a.J))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,kw(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.J-c.rg,0<e&&(d.T.splice(0,e),d=d.T[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),lw(a,
1056
1056
  c,d)}
1057
- function lw(a,b){if(Infinity==a.ea){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.T[0]||null;null!=d&&null!=d.h&&(a.ea=Math.min(a.ea,d.h))}}b=a.ea;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!jw(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.T[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.R(),"Expect AV sync issues!");else for(kw(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.wh(b)}}}
1058
- function kw(a,b,c){b.Oc+=c;b.ec+=c;a=bw(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.R()}
1059
- function Vv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R,ca;return O(function(fa){switch(fa.g){case 1:d=Wc;e=Kv(a.Ia,b);f=Cv(e.g,"EXT-X-DEFINE");g=[];h=[];k=[];a.j=new Dk(null,0);a.j.Tc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.ka=!1,C=Cv(e.g,"EXT-X-DEFINE"),n=cw(a,C,a.M),m=d.ua,y="",B=new Map,G(fa,mw(a,a.C++,n,e,l,"",m,y,!0,"Media Playlist",null,B,null,!1,null,!1),7);nw(a,f);p=Cv(e.g,"EXT-X-MEDIA");r=Cv(e.g,"EXT-X-STREAM-INF");u=Cv(e.g,"EXT-X-IMAGE-STREAM-INF");
1060
- w=Cv(e.g,"EXT-X-I-FRAME-STREAM-INF");v=Cv(e.g,"EXT-X-SESSION-KEY");A=Cv(e.g,"EXT-X-SESSION-DATA");z=Cv(e.g,"EXT-X-CONTENT-STEERING");ow(a,A);return G(fa,pw(a,z),4);case 4:return qw(a,r),rw(a,p),G(fa,sw(a,r,v,p,l,a.u),5);case 5:return g=fa.h,h=tw(a,p),G(fa,uw(a,u,w),6);case 6:k=fa.h;fa.B(3);break;case 7:D=fa.h,a.i.set(c,D),D.stream&&(F=El(D.stream),D.stream.segmentIndex.qc(function(Xa){Xa.ma&&(Xa.ma.nd=F)})),m=D.stream.type,g.push({id:0,language:ad(y||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
1061
- m?D.stream:null,video:"video"==m?D.stream:null,bandwidth:D.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==e.type&&(Wv(a)&&(vw(a,e),J=a.s,a.A.X(J)),L=Array.from(a.i.values()),ww(a,L),aw(a),hw(a,e.g,m,n,l));a.m={presentationTimeline:a.j,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
1057
+ function mw(a,b){if(Infinity==a.ea){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.T[0]||null;null!=d&&null!=d.h&&(a.ea=Math.min(a.ea,d.h))}}b=a.ea;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!kw(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.T[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.R(),"Expect AV sync issues!");else for(lw(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.wh(b)}}}
1058
+ function lw(a,b,c){b.Pc+=c;b.ec+=c;a=cw(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.R()}
1059
+ function Wv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R,ca;return O(function(fa){switch(fa.g){case 1:d=Wc;e=Lv(a.Ia,b);f=Dv(e.g,"EXT-X-DEFINE");g=[];h=[];k=[];a.j=new Dk(null,0);a.j.Uc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.ha=!1,C=Dv(e.g,"EXT-X-DEFINE"),n=dw(a,C,a.M),m=d.ua,y="",B=new Map,G(fa,nw(a,a.C++,n,e,l,"",m,y,!0,"Media Playlist",null,B,null,!1,null,!1),7);ow(a,f);p=Dv(e.g,"EXT-X-MEDIA");r=Dv(e.g,"EXT-X-STREAM-INF");u=Dv(e.g,"EXT-X-IMAGE-STREAM-INF");
1060
+ w=Dv(e.g,"EXT-X-I-FRAME-STREAM-INF");v=Dv(e.g,"EXT-X-SESSION-KEY");A=Dv(e.g,"EXT-X-SESSION-DATA");z=Dv(e.g,"EXT-X-CONTENT-STEERING");pw(a,A);return G(fa,qw(a,z),4);case 4:return rw(a,r),sw(a,p),G(fa,tw(a,r,v,p,l,a.u),5);case 5:return g=fa.h,h=uw(a,p),G(fa,vw(a,u,w),6);case 6:k=fa.h;fa.B(3);break;case 7:D=fa.h,a.i.set(c,D),D.stream&&(F=El(D.stream),D.stream.segmentIndex.qc(function(Xa){Xa.ma&&(Xa.ma.od=F)})),m=D.stream.type,g.push({id:0,language:ad(y||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
1061
+ m?D.stream:null,video:"video"==m?D.stream:null,bandwidth:D.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==e.type&&(Xv(a)&&(ww(a,e),J=a.s,a.A.X(J)),L=Array.from(a.i.values()),xw(a,L),bw(a),iw(a,e.g,m,n,l));a.m={presentationTimeline:a.j,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
1062
1062
  type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1};if(a.aa||!a.g.hls.disableCodecGuessing){fa.B(8);break}H=[];E=t(a.m.variants);for(K=E.next();!K.done;K=E.next())M=K.value,M.audio&&""===M.audio.codecs&&H.push(M.audio.createSegmentIndex()),M.video&&""===M.video.codecs&&H.push(M.video.createSegmentIndex());return G(fa,Promise.all(H),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){N=[];Q=g[0];U=t([Q.video,Q.audio]);for(R=U.next();!R.done;R=U.next())(ca=
1063
1063
  R.value)&&!ca.segmentIndex&&N.push(ca.createSegmentIndex());if(0<N.length)return G(fa,Promise.all(N),0)}fa.B(0)}})}
1064
- function xw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J;return O(function(L){switch(L.g){case 1:c=Fl(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return L.return(c);d=yw(a,b);e=d.segment;f=d.segmentIndex;g=e.R();h=g[0];k=new nb(h);l=k.sb.split(".").pop();if(m=zw[l])return L.return(Fl(m));n=Jg;r=p=null;u=e.ma;if(!u){L.B(2);break}w=Ll(u.R(),u.Ib(),u.Fb(),a.g.retryParameters);return G(L,Aw(a,w,n,{type:0}),3);case 3:v=L.h;p=v.data;if(!u.aesKey){L.B(4);break}return G(L,Kl(p,u.aesKey,0),5);
1065
- case 5:p=L.h;case 4:(r=v.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return A=Ll(e.R(),e.Ib(),e.Fb(),a.g.retryParameters),G(L,Aw(a,A,n,{type:1}),6);case 6:z=L.h;C=z.data;if(!e.aesKey){L.B(7);break}return G(L,Kl(C,e.aesKey,f),8);case 8:C=L.h;case 7:(y=z.headers["content-type"])&&(y=y.split(";")[0].toLowerCase());B="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");D=["audio/mp4","video/mp4","video/iso.segment"];if(Ej(Hb(C))){var H=C;var E=Hb(H);E=(new uj).parse(E);
1064
+ function yw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J;return O(function(L){switch(L.g){case 1:c=Fl(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return L.return(c);d=zw(a,b);e=d.segment;f=d.segmentIndex;g=e.R();h=g[0];k=new nb(h);l=k.sb.split(".").pop();if(m=Aw[l])return L.return(Fl(m));n=Jg;r=p=null;u=e.ma;if(!u){L.B(2);break}w=Ll(u.R(),u.Ib(),u.Fb(),a.g.retryParameters);return G(L,Bw(a,w,n,{type:0}),3);case 3:v=L.h;p=v.data;if(!u.aesKey){L.B(4);break}return G(L,Kl(p,u.aesKey,0),5);
1065
+ case 5:p=L.h;case 4:(r=v.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return A=Ll(e.R(),e.Ib(),e.Fb(),a.g.retryParameters),G(L,Bw(a,A,n,{type:1}),6);case 6:z=L.h;C=z.data;if(!e.aesKey){L.B(7);break}return G(L,Kl(C,e.aesKey,f),8);case 8:C=L.h;case 7:(y=z.headers["content-type"])&&(y=y.split(";")[0].toLowerCase());B="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");D=["audio/mp4","video/mp4","video/iso.segment"];if(Ej(Hb(C))){var H=C;var E=Hb(H);E=(new uj).parse(E);
1066
1066
  var K=E.Wd();E=E.Ng();var M=[],N=!1,Q=!1;switch(K.audio){case "aac":case "aac-loas":M.push("mp4a.40.2");N=!0;break;case "mp3":M.push("mp4a.40.34");N=!0;break;case "ac3":M.push("ac-3");N=!0;break;case "ec3":M.push("ec-3");N=!0;break;case "opus":M.push("opus"),N=!0}switch(K.video){case "avc":E.gb?M.push(E.gb):M.push("avc1.42E01E");Q=!0;break;case "hvc":E.gb?M.push(E.gb):M.push("hvc1.1.6.L93.90");Q=!0;break;case "av1":M.push("av01.0.01M.08"),Q=!0}if(M.length){K=N&&!Q;N=new Map;if(Q){Q=new Hd("video/mp2t");
1067
1067
  Q.i(H);H=t(Q.j());for(var U=H.next();!U.done;U=H.next())U=U.value,N.set(U,U);Q.g()}E={type:K?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:E.height,width:E.width,channelCount:null,sampleRate:null,closedCaptions:N,ze:null,colorGamut:null}}else E=null;if(F=E)return L.return(F)}else if(B.includes(l)||D.includes(y)||r&&D.includes(r))if(J=Gl(p,C))return L.return(J);return y?L.return(Fl(y)):r?L.return(Fl(r)):L.return(c)}})}
1068
- function aw(a){if(Wv(a)){if(a.xa==Bw){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.ec),c=Math.min(c,e.Oc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.A);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Bf(b)}}else a.j.vb(Cw(a));if(!a.j.u)for(b=t(a.i.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))&&
1069
- c.h&&a.j.Ci(c.h);a.j.mf()}function nw(a,b){var c=(new nb(a.M)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Y(e,"NAME");var f=Y(e,"VALUE");e=Y(e,"QUERYPARAM");d&&f&&(a.u.has(d)||a.u.set(d,f));e&&(d=c.get(e)[0])&&!a.u.has(d)&&a.u.set(e,d)}}
1070
- function cw(a,b,c){c=(new nb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Y(f,"NAME"),h=Y(f,"VALUE");e=Y(f,"QUERYPARAM");f=Y(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.u.get(f))&&d.set(f,e)}return d}
1071
- function qw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"AUDIO");c=Y(d,"VIDEO");var f=Y(d,"SUBTITLES");d=Dw(a,d);if(f){var g=Sc(Uc,d);a.H.set(f,g);Pd(d,g)}e&&(f=Sc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.H.set(e,f));c&&(e=Sc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.H.set(c,e))}}
1072
- function ow(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"DATA-ID");c=Y(d,"URI");var f=Y(d,"LANGUAGE");d=Y(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Gv([a.M],c,a.u)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new S("sessiondata",e);if(a.h)a.h.onEvent(c)}}
1073
- function pw(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Y(f,"PATHWAY-ID"),h=Y(f,"SERVER-URI"),g&&h){a.l=new Yt(a.h);a.l.configure(a.g);a.l.i=[a.M];a.l.setManifestType("HLS");a.l.h=g;c=Zt(a.l,h);break}return G(k,c,0)})}
1074
- function tw(a,b){var c=Dv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Ew(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=zv(d.value,"GROUP-ID");if(d=a.H.get(e))if(e=a.I.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Fw(Uc,d)||Gw(Uc),Hw(f.stream)}}return b.filter(function(g){return g})}
1075
- function Hw(a){a.fullMimeTypes=new Set([we(a.mimeType,a.codecs)])}
1076
- function uw(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return G(m,Iw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=wa(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=zv(g,"URI"),k=Y(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Y(g,"LANGUAGE"),n=Y(g,"NAME"),
1077
- p=Y(g,"CHARACTERISTICS"),r=Jw(a,a.C++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Y(g,"RESOLUTION"),w=t(u?u.split("x"):[null,null]),v=w.next().value,A=w.next().value;r.stream.width=Number(v)||void 0;r.stream.height=Number(A)||void 0;var z=Y(g,"BANDWIDTH");z&&(r.stream.bandwidth=Number(z));a.i.set(h,r);l=r}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),G(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
1078
- function Kw(a,b,c){b=b.filter(function(h){var k=Y(h,"URI")||"";return"SUBTITLES"!=Y(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=xv(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Ew(a,d[g],c)}
1079
- function sw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R,ca,fa,Xa,Aa,Ra,bb,Ya;return O(function(mb){switch(mb.g){case 1:g=[];h=new Set;if(!(0<c.length)){mb.B(2);break}k=t(c);l=k.next();case 3:if(l.done){mb.B(2);break}m=l.value;n=zv(m,"METHOD");p=Y(m,"KEYFORMAT")||"identity";r=null;if("NONE"==n){mb.B(4);break}if(Lw(n)){u=Gv(e(),zv(m,"URI"),f);w=u.sort().join("");a.L.has(w)||(v=Dg(u,a.g.retryParameters),A=Aw(a,v,6),a.L.set(w,A));mb.B(4);break}if("identity"!=p){r=(z=Mw[p])?
1080
- z(m,""):null;mb.B(6);break}return G(mb,Nw(a,m,"",e,null,f),9);case 9:r=mb.h;case 6:if(r){if(r.keyIds)for(C=t(r.keyIds),y=C.next();!y.done;y=C.next())B=y.value,h.add(B);g.push(r)}case 4:l=k.next();mb.B(3);break;case 2:D={};F=t(b);for(J=F.next();!J.done;J=F.next())L=J.value,H=xv(L),D[H]?D[H].push(L):D[H]=[L];E=[];for(K in D)M=D[K],N=M[0],Q=Y(N,"FRAME-RATE"),U=Number(Y(N,"AVERAGE-BANDWIDTH"))||Number(zv(N,"BANDWIDTH")),R=Y(N,"RESOLUTION"),ca=t(R?R.split("x"):[null,null]),fa=ca.next().value,Xa=ca.next().value,
1081
- Aa=Y(N,"VIDEO-RANGE"),(Ra=Y(N,"REQ-VIDEO-LAYOUT"))&&Ra.includes(",")&&(bb=Ra.split(",").filter(function(db){return"CH-STEREO"==db||"CH-MONO"==db}),Ra=bb[0]),Ra=Ra||"CH-MONO",Ya=Ow(a,M,d),E.push.apply(E,x(Pw(a,Ya.audio,Ya.video,U,fa,Xa,Q,Aa,Ra,g,h)));return mb.return(E.filter(function(db){return null!=db}))}})}
1082
- function Ow(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Y(m,"AUDIO");var n=Y(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Y(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(w){return f.includes(zv(w,"GROUP-ID"))}),Kw(a,k,e));k=(e=f.sort().join(","))&&a.I.has(e)?a.I.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var r=b.map(function(w){return zv(w,
1083
- "URI")});h=d.audio.find(function(w){return w&&w.R().find(function(v){return r.includes(v)})});g=Dw(a,b[0]);n=Sc("video",g);(p=Sc("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(w){var v=Y(w,"URI")||"",A=Y(w,"TYPE");w=zv(w,"GROUP-ID");return"SUBTITLES"!=A&&""==v&&f.includes(w)}))&&(l=Y(c,"LANGUAGE"),
1084
- n=Y(c,"NAME"),p=Qw(c),Rw(c),m=Y(c,"CHARACTERISTICS"),u=Sw(c));a=Tw(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
1085
- function Dw(a,b){var c=Y(b,"CODECS")||"";b=Y(b,"SUPPLEMENTAL-CODECS");a.aa=0<c.length;a.aa||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,x(b)));return Hl(a)}function Qw(a){return(a=Y(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
1086
- function Sw(a){return(a=Y(a,"SAMPLE-RATE"))?parseInt(a,10):null}function Rw(a){return(a=Y(a,"CHANNELS"))?a.includes("/JOC"):!1}
1087
- function Pw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Uw(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=r?r.stream.drmInfos:null;
1068
+ function bw(a){if(Xv(a)){if(a.xa==Cw){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.ec),c=Math.min(c,e.Pc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.A);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Bf(b)}}else a.j.vb(Dw(a));if(!a.j.u)for(b=t(a.i.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))&&
1069
+ c.h&&a.j.Ci(c.h);a.j.mf()}function ow(a,b){var c=(new nb(a.M)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Y(e,"NAME");var f=Y(e,"VALUE");e=Y(e,"QUERYPARAM");d&&f&&(a.u.has(d)||a.u.set(d,f));e&&(d=c.get(e)[0])&&!a.u.has(d)&&a.u.set(e,d)}}
1070
+ function dw(a,b,c){c=(new nb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Y(f,"NAME"),h=Y(f,"VALUE");e=Y(f,"QUERYPARAM");f=Y(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.u.get(f))&&d.set(f,e)}return d}
1071
+ function rw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"AUDIO");c=Y(d,"VIDEO");var f=Y(d,"SUBTITLES");d=Ew(a,d);if(f){var g=Sc(Uc,d);a.H.set(f,g);Pd(d,g)}e&&(f=Sc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.H.set(e,f));c&&(e=Sc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.H.set(c,e))}}
1072
+ function pw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"DATA-ID");c=Y(d,"URI");var f=Y(d,"LANGUAGE");d=Y(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Hv([a.M],c,a.u)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new S("sessiondata",e);if(a.h)a.h.onEvent(c)}}
1073
+ function qw(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Y(f,"PATHWAY-ID"),h=Y(f,"SERVER-URI"),g&&h){a.l=new Yt(a.h);a.l.configure(a.g);a.l.i=[a.M];a.l.setManifestType("HLS");a.l.h=g;c=Zt(a.l,h);break}return G(k,c,0)})}
1074
+ function uw(a,b){var c=Ev(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Fw(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Av(d.value,"GROUP-ID");if(d=a.H.get(e))if(e=a.I.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Gw(Uc,d)||Hw(Uc),Iw(f.stream)}}return b.filter(function(g){return g})}
1075
+ function Iw(a){a.fullMimeTypes=new Set([we(a.mimeType,a.codecs)])}
1076
+ function vw(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return G(m,Jw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=wa(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=Av(g,"URI"),k=Y(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Y(g,"LANGUAGE"),n=Y(g,"NAME"),
1077
+ p=Y(g,"CHARACTERISTICS"),r=Kw(a,a.C++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Y(g,"RESOLUTION"),w=t(u?u.split("x"):[null,null]),v=w.next().value,A=w.next().value;r.stream.width=Number(v)||void 0;r.stream.height=Number(A)||void 0;var z=Y(g,"BANDWIDTH");z&&(r.stream.bandwidth=Number(z));a.i.set(h,r);l=r}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),G(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
1078
+ function Lw(a,b,c){b=b.filter(function(h){var k=Y(h,"URI")||"";return"SUBTITLES"!=Y(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=yv(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Fw(a,d[g],c)}
1079
+ function tw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R,ca,fa,Xa,Aa,Ra,cb,Ya;return O(function(mb){switch(mb.g){case 1:g=[];h=new Set;if(!(0<c.length)){mb.B(2);break}k=t(c);l=k.next();case 3:if(l.done){mb.B(2);break}m=l.value;n=Av(m,"METHOD");p=Y(m,"KEYFORMAT")||"identity";r=null;if("NONE"==n){mb.B(4);break}if(Mw(n)){u=Hv(e(),Av(m,"URI"),f);w=u.sort().join("");a.L.has(w)||(v=Dg(u,a.g.retryParameters),A=Bw(a,v,6),a.L.set(w,A));mb.B(4);break}if("identity"!=p){r=(z=Nw[p])?
1080
+ z(m,""):null;mb.B(6);break}return G(mb,Ow(a,m,"",e,null,f),9);case 9:r=mb.h;case 6:if(r){if(r.keyIds)for(C=t(r.keyIds),y=C.next();!y.done;y=C.next())B=y.value,h.add(B);g.push(r)}case 4:l=k.next();mb.B(3);break;case 2:D={};F=t(b);for(J=F.next();!J.done;J=F.next())L=J.value,H=yv(L),D[H]?D[H].push(L):D[H]=[L];E=[];for(K in D)M=D[K],N=M[0],Q=Y(N,"FRAME-RATE"),U=Number(Y(N,"AVERAGE-BANDWIDTH"))||Number(Av(N,"BANDWIDTH")),R=Y(N,"RESOLUTION"),ca=t(R?R.split("x"):[null,null]),fa=ca.next().value,Xa=ca.next().value,
1081
+ Aa=Y(N,"VIDEO-RANGE"),(Ra=Y(N,"REQ-VIDEO-LAYOUT"))&&Ra.includes(",")&&(cb=Ra.split(",").filter(function($a){return"CH-STEREO"==$a||"CH-MONO"==$a}),Ra=cb[0]),Ra=Ra||"CH-MONO",Ya=Pw(a,M,d),E.push.apply(E,x(Qw(a,Ya.audio,Ya.video,U,fa,Xa,Q,Aa,Ra,g,h)));return mb.return(E.filter(function($a){return null!=$a}))}})}
1082
+ function Pw(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Y(m,"AUDIO");var n=Y(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Y(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(w){return f.includes(Av(w,"GROUP-ID"))}),Lw(a,k,e));k=(e=f.sort().join(","))&&a.I.has(e)?a.I.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var r=b.map(function(w){return Av(w,
1083
+ "URI")});h=d.audio.find(function(w){return w&&w.R().find(function(v){return r.includes(v)})});g=Ew(a,b[0]);n=Sc("video",g);(p=Sc("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(w){var v=Y(w,"URI")||"",A=Y(w,"TYPE");w=Av(w,"GROUP-ID");return"SUBTITLES"!=A&&""==v&&f.includes(w)}))&&(l=Y(c,"LANGUAGE"),
1084
+ n=Y(c,"NAME"),p=Rw(c),Sw(c),m=Y(c,"CHARACTERISTICS"),u=Tw(c));a=Uw(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
1085
+ function Ew(a,b){var c=Y(b,"CODECS")||"";b=Y(b,"SUPPLEMENTAL-CODECS");a.aa=0<c.length;a.aa||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,x(b)));return Hl(a)}function Rw(a){return(a=Y(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
1086
+ function Tw(a){return(a=Y(a,"SAMPLE-RATE"))?parseInt(a,10):null}function Sw(a){return(a=Y(a,"CHANNELS"))?a.includes("/JOC"):!1}
1087
+ function Qw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Vw(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=r?r.stream.drmInfos:null;
1088
1088
  r=r?r.R().sort().join(","):"";var u=f?f.R().sort().join(","):"";r=r+" - "+u;h&&k&&!Pb(n,p)||a.ob.has(r)||(h={id:a.C++,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.ob.add(r))}return e}
1089
- function rw(a,b){b=Dv(b,"CLOSED-CAPTIONS");a.ka=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"LANGUAGE");c=ad(e||"und");e||(e=Y(d,"NAME"))&&(c=e);e=zv(d,"GROUP-ID");d=zv(d,"INSTREAM-ID").replace("SERVICE","svc");a.G.get(e)||a.G.set(e,new Map);a.G.get(e).set(d,c)}}
1090
- function Ew(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=zv(k,"URI");k=zv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=zv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Uc);if(k==Uc)b=Y(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.H.has(l)){b=a.H.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.C++;if(a.l){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
1091
- m=n.next().value;n=n.next().value;(m=c.get(m))&&bu(a.l,l,m,n)}}c=Y(h,"LANGUAGE");f=Y(h,"NAME");m="YES"==Y(h,"DEFAULT");n="audio"==k?Qw(h):null;var p="audio"==k?Rw(h):!1,r=Y(h,"CHARACTERISTICS"),u="YES"==Y(h,"FORCED");h="audio"==k?Sw(h):null;d=Jw(a,l,d,b,k,c,m,f,n,null,r,u,h,p);d.stream&&(d.stream.groupId=g);a.I.has(g)?a.I.get(g).push(d):a.I.set(g,[d]);a.i.set(e,d);return d}
1092
- function Iw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=zv(b,"URI");d=Y(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Y(b,"LANGUAGE");f=Y(b,"NAME");g=Y(b,"CHARACTERISTICS");h=Jw(a,a.C++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Y(b,"RESOLUTION"))?G(p,h.stream.createSegmentIndex(),3):p.B(2)}2!=p.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])*
1089
+ function sw(a,b){b=Ev(b,"CLOSED-CAPTIONS");a.ha=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"LANGUAGE");c=ad(e||"und");e||(e=Y(d,"NAME"))&&(c=e);e=Av(d,"GROUP-ID");d=Av(d,"INSTREAM-ID").replace("SERVICE","svc");a.G.get(e)||a.G.set(e,new Map);a.G.get(e).set(d,c)}}
1090
+ function Fw(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Av(k,"URI");k=Av(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Av(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Uc);if(k==Uc)b=Y(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.H.has(l)){b=a.H.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.C++;if(a.l){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
1091
+ m=n.next().value;n=n.next().value;(m=c.get(m))&&bu(a.l,l,m,n)}}c=Y(h,"LANGUAGE");f=Y(h,"NAME");m="YES"==Y(h,"DEFAULT");n="audio"==k?Rw(h):null;var p="audio"==k?Sw(h):!1,r=Y(h,"CHARACTERISTICS"),u="YES"==Y(h,"FORCED");h="audio"==k?Tw(h):null;d=Kw(a,l,d,b,k,c,m,f,n,null,r,u,h,p);d.stream&&(d.stream.groupId=g);a.I.has(g)?a.I.get(g).push(d):a.I.set(g,[d]);a.i.set(e,d);return d}
1092
+ function Jw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Av(b,"URI");d=Y(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Y(b,"LANGUAGE");f=Y(b,"NAME");g=Y(b,"CHARACTERISTICS");h=Kw(a,a.C++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Y(b,"RESOLUTION"))?G(p,h.stream.createSegmentIndex(),3):p.B(2)}2!=p.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])*
1093
1093
  Number(m.split("x")[1]));if(n=Y(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
1094
- function Tw(a,b,c,d,e,f,g,h,k){for(var l=a.C++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=zv(r,"URI");r=Y(r,"PATHWAY-ID");a.l&&r&&bu(a.l,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Y(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.G.get(b);break a}a.ka=!1}else if(!b&&a.G.size)for(b=t(a.G.keys()).next();!b.done;){b=a.G.get(b.value);break a}b=null}c=Rc(d,c);d=Jw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
1095
- function Jw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var D,F,J,L,H,E,K,M,N,Q,U,R,ca,fa,Xa,Aa,Ra,bb,Ya,mb,db,Za,wc;return O(function(Ta){switch(Ta.g){case 1:return D=Wc,F=z.R(),ta(Ta,2),G(Ta,Uv(a,z.R(),!0),4);case 4:J=Ta.h;va(Ta,3);break;case 2:L=wa(Ta);v.closeSegmentIndex();if(H=a.h.disableStream(v))return Ta.return();throw L;case 3:if(B.aborted)return Ta.return();E=J.uri;E==J.originalUri||F.includes(E)||A.push(E);K=Kv(a.Ia,J.data);if(1!=K.type)throw new T(2,4,4017);M=Cv(K.g,"EXT-X-DEFINE");N=cw(a,
1096
- M,E);Q=!1;(!a.aa&&a.g.hls.disableCodecGuessing||a.ka&&e==D.ua&&!a.g.hls.disableClosedCaptionsDetection)&&0<K.segments.length&&(a.ka=!1,Q=!0);U=!a.aa&&a.g.hls.disableCodecGuessing;R=Wv(a);return G(Ta,mw(a,0,N,K,w,d,e,f,g,h,k,l,m,n,p,r,void 0,Q,U),5);case 5:ca=Ta.h;if(B.aborted)return Ta.return();fa=ca.stream;Wv(a)&&!R&&vw(a,K);z.Oc=ca.Oc;z.ec=ca.ec;z.Se=ca.Se;z.Re=ca.Re;z.$d=ca.$d;z.pf=ca.pf;z.Pb=ca.Pb;z.Qb=ca.Qb;z.Vg=!0;v.segmentIndex=fa.segmentIndex;v.encrypted=fa.encrypted;v.drmInfos=fa.drmInfos;
1097
- v.keyIds=fa.keyIds;v.mimeType=fa.mimeType;v.bandwidth=v.bandwidth||fa.bandwidth;v.codecs=v.codecs||fa.codecs;v.closedCaptions=v.closedCaptions||fa.closedCaptions;v.width=v.width||fa.width;v.height=v.height||fa.height;v.hdr=v.hdr||fa.hdr;v.colorGamut=v.colorGamut||fa.colorGamut;"und"==v.language&&"und"!=fa.language&&(v.language=fa.language);v.language=v.language||fa.language;v.channelsCount=v.channelsCount||fa.channelsCount;v.audioSamplingRate=v.audioSamplingRate||fa.audioSamplingRate;Hw(v);v.drmInfos.length&&
1098
- a.h.newDrmInfo(v);Xa=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)Xa=!0;a.m&&Xa&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==D.ua||e==D.ha)for(Aa=t(a.i.values()),Ra=Aa.next();!Ra.done;Ra=Aa.next())bb=Ra.value,bb.Vg||bb.type!=e||(bb.stream.mimeType=fa.mimeType,Hw(bb.stream));e==D.Ka&&(Ya=fa.segmentIndex.get(0))&&Ya.ma&&(v.mimeType="application/mp4",Hw(v));mb=El(v);v.segmentIndex.qc(function(tb){tb.ma&&(tb.ma.nd=mb)});Vw(a)&&(a.Nb?ww(a,[z]):(a.Nb=!0,db=Array.from(a.i.values()),
1099
- Za=db.filter(function(tb){return tb.stream.segmentIndex}),ww(a,Za),aw(a),wc=a.s,0<wc&&a.A.X(wc)));hw(a,K.g,v.type,N,w);I(Ta)}})}function w(){return a.l&&1<c.length?cu(a.l,b):A.concat(Hv([a.M],c,a.u))}var v=Ww(a,d,e,f,g,h,k,l,m,n,p,r),A=[],z={stream:v,type:e,si:A,R:w,Oc:0,ec:0,pf:new Map,Se:!1,Re:!1,$d:!1,rg:-1,Pb:-1,Qb:-1,Vg:!1},C=null,y=new AbortController;v.createSegmentIndex=function(){if(C)return C;y=new AbortController;return C=new Promise(function(B){B(u(y.signal))})};v.closeSegmentIndex=function(){C&&
1100
- !v.segmentIndex&&y.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);C=null};return z}function Cw(a){var b=Infinity;a=t(a.i.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.ec));return b}function Yv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.qc(function(e){c.push(e)});a.j.le(c)}
1101
- function ww(a,b){if(!Wv(a))for(var c=Cw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.dd(0,c);Yv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?iw(a,b):(lw(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&iw(a,b))}function jw(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
1102
- function Vw(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.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}
1103
- function mw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z){A=void 0===A?!0:A;z=void 0===z?!0:z;var C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R,ca,fa,Xa,Aa,Ra,bb,Ya,mb,db,Za,wc;return O(function(Ta){switch(Ta.g){case 1:var tb=Ev(d.g,"EXT-X-PLAYLIST-TYPE"),Yb=Ev(d.g,"EXT-X-ENDLIST");Yb=tb&&"VOD"==tb.value||Yb;tb=tb&&"EVENT"==tb.value&&!Yb;tb=!Yb&&!tb;Yb?$v(a,Tv):tb?$v(a,Bw):$v(a,Xw);Wv(a)&&gw(a,d);C=Wv(a)?a.O.get(g):new Map;y=ew(a,d,C,c,e,g);B=y.segments;D=y.bandwidth;H=L=J=F=null;if(!(0<B.length&&A)){Ta.B(2);break}return G(Ta,
1104
- xw(a,B),3);case 3:E=Ta.h,g=E.type,h=E.language,m=E.channelCount,u=E.sampleRate,n=E.closedCaptions,J=E.height,F=E.width,L=E.ze,H=E.colorGamut,z&&(v=E.mimeType,f=E.codecs);case 2:if(v){Ta.B(4);break}return G(Ta,Yw(a,g,f,B),5);case 5:v=Ta.h;case 4:return G(Ta,dw(a,d,v,e,c),6);case 6:K=Ta.h;M=K.drmInfos;N=K.keyIds;Q=K.encrypted;U=K.Yi;if(Q&&!M.length&&!U)throw new T(2,4,4026);R=Ww(a,f,g,h,k,l,m,n,p,r,u,w);R.encrypted=Q;R.drmInfos=M;R.keyIds=N;R.mimeType=v;D&&(R.bandwidth=D);Hw(R);"video"==g&&(F||J||L||
1105
- H)&&Uw(R,F,J,null,L,null,H);Wv(a)&&gw(a,d);ca=B[0].startTime;fa=B[B.length-1];Xa=fa.endTime;Aa=new Zk(B);R.segmentIndex=Aa;bb=(Ra=Ev(d.g,"EXT-X-SERVER-CONTROL"))?null!=yv(Ra,"CAN-SKIP-UNTIL"):!1;Ya=Ra?null!=yv(Ra,"CAN-BLOCK-RELOAD"):!1;mb=Fv(d.g,"EXT-X-MEDIA-SEQUENCE",0);db=fw(mb,B);Za=db.Pb;wc=db.Qb;return Ta.return({stream:R,type:g,si:[],R:e,Oc:ca,ec:Xa,Se:bb,Re:Ya,$d:!1,rg:-1,Pb:Za,Qb:wc,pf:C,Vg:!1})}})}
1106
- function fw(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Pb:a,Qb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Pb:a,Qb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{Pb:a,Qb:c}}
1107
- function Ww(a,b,c,d,e,f,g,h,k,l,m,n){var p=Fw(c,b)||Gw(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Uc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1094
+ function Uw(a,b,c,d,e,f,g,h,k){for(var l=a.C++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=Av(r,"URI");r=Y(r,"PATHWAY-ID");a.l&&r&&bu(a.l,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Y(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.G.get(b);break a}a.ha=!1}else if(!b&&a.G.size)for(b=t(a.G.keys()).next();!b.done;){b=a.G.get(b.value);break a}b=null}c=Rc(d,c);d=Kw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
1095
+ function Kw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var D,F,J,L,H,E,K,M,N,Q,U,R,ca,fa,Xa,Aa,Ra,cb,Ya,mb,$a,Za,wc;return O(function(Ta){switch(Ta.g){case 1:return D=Wc,F=z.R(),ta(Ta,2),G(Ta,Vv(a,z.R(),!0),4);case 4:J=Ta.h;va(Ta,3);break;case 2:L=wa(Ta);v.closeSegmentIndex();if(H=a.h.disableStream(v))return Ta.return();throw L;case 3:if(B.aborted)return Ta.return();E=J.uri;E==J.originalUri||F.includes(E)||A.push(E);K=Lv(a.Ia,J.data);if(1!=K.type)throw new T(2,4,4017);M=Dv(K.g,"EXT-X-DEFINE");N=dw(a,
1096
+ M,E);Q=!1;(!a.aa&&a.g.hls.disableCodecGuessing||a.ha&&e==D.ua&&!a.g.hls.disableClosedCaptionsDetection)&&0<K.segments.length&&(a.ha=!1,Q=!0);U=!a.aa&&a.g.hls.disableCodecGuessing;R=Xv(a);return G(Ta,nw(a,0,N,K,w,d,e,f,g,h,k,l,m,n,p,r,void 0,Q,U),5);case 5:ca=Ta.h;if(B.aborted)return Ta.return();fa=ca.stream;Xv(a)&&!R&&ww(a,K);z.Pc=ca.Pc;z.ec=ca.ec;z.Se=ca.Se;z.Re=ca.Re;z.$d=ca.$d;z.pf=ca.pf;z.Pb=ca.Pb;z.Qb=ca.Qb;z.Vg=!0;v.segmentIndex=fa.segmentIndex;v.encrypted=fa.encrypted;v.drmInfos=fa.drmInfos;
1097
+ v.keyIds=fa.keyIds;v.mimeType=fa.mimeType;v.bandwidth=v.bandwidth||fa.bandwidth;v.codecs=v.codecs||fa.codecs;v.closedCaptions=v.closedCaptions||fa.closedCaptions;v.width=v.width||fa.width;v.height=v.height||fa.height;v.hdr=v.hdr||fa.hdr;v.colorGamut=v.colorGamut||fa.colorGamut;"und"==v.language&&"und"!=fa.language&&(v.language=fa.language);v.language=v.language||fa.language;v.channelsCount=v.channelsCount||fa.channelsCount;v.audioSamplingRate=v.audioSamplingRate||fa.audioSamplingRate;Iw(v);v.drmInfos.length&&
1098
+ a.h.newDrmInfo(v);Xa=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)Xa=!0;a.m&&Xa&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==D.ua||e==D.ia)for(Aa=t(a.i.values()),Ra=Aa.next();!Ra.done;Ra=Aa.next())cb=Ra.value,cb.Vg||cb.type!=e||(cb.stream.mimeType=fa.mimeType,Iw(cb.stream));e==D.Ka&&(Ya=fa.segmentIndex.get(0))&&Ya.ma&&(v.mimeType="application/mp4",Iw(v));mb=El(v);v.segmentIndex.qc(function(tb){tb.ma&&(tb.ma.od=mb)});Ww(a)&&(a.Nb?xw(a,[z]):(a.Nb=!0,$a=Array.from(a.i.values()),
1099
+ Za=$a.filter(function(tb){return tb.stream.segmentIndex}),xw(a,Za),bw(a),wc=a.s,0<wc&&a.A.X(wc)));iw(a,K.g,v.type,N,w);I(Ta)}})}function w(){return a.l&&1<c.length?cu(a.l,b):A.concat(Iv([a.M],c,a.u))}var v=Xw(a,d,e,f,g,h,k,l,m,n,p,r),A=[],z={stream:v,type:e,si:A,R:w,Pc:0,ec:0,pf:new Map,Se:!1,Re:!1,$d:!1,rg:-1,Pb:-1,Qb:-1,Vg:!1},C=null,y=new AbortController;v.createSegmentIndex=function(){if(C)return C;y=new AbortController;return C=new Promise(function(B){B(u(y.signal))})};v.closeSegmentIndex=function(){C&&
1100
+ !v.segmentIndex&&y.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);C=null};return z}function Dw(a){var b=Infinity;a=t(a.i.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.ec));return b}function Zv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.qc(function(e){c.push(e)});a.j.le(c)}
1101
+ function xw(a,b){if(!Xv(a))for(var c=Dw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.ed(0,c);Zv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?jw(a,b):(mw(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&jw(a,b))}function kw(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
1102
+ function Ww(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.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}
1103
+ function nw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z){A=void 0===A?!0:A;z=void 0===z?!0:z;var C,y,B,D,F,J,L,H,E,K,M,N,Q,U,R,ca,fa,Xa,Aa,Ra,cb,Ya,mb,$a,Za,wc;return O(function(Ta){switch(Ta.g){case 1:var tb=Fv(d.g,"EXT-X-PLAYLIST-TYPE"),Yb=Fv(d.g,"EXT-X-ENDLIST");Yb=tb&&"VOD"==tb.value||Yb;tb=tb&&"EVENT"==tb.value&&!Yb;tb=!Yb&&!tb;Yb?aw(a,Uv):tb?aw(a,Cw):aw(a,Yw);Xv(a)&&hw(a,d);C=Xv(a)?a.O.get(g):new Map;y=fw(a,d,C,c,e,g);B=y.segments;D=y.bandwidth;H=L=J=F=null;if(!(0<B.length&&A)){Ta.B(2);break}return G(Ta,
1104
+ yw(a,B),3);case 3:E=Ta.h,g=E.type,h=E.language,m=E.channelCount,u=E.sampleRate,n=E.closedCaptions,J=E.height,F=E.width,L=E.ze,H=E.colorGamut,z&&(v=E.mimeType,f=E.codecs);case 2:if(v){Ta.B(4);break}return G(Ta,Zw(a,g,f,B),5);case 5:v=Ta.h;case 4:return G(Ta,ew(a,d,v,e,c),6);case 6:K=Ta.h;M=K.drmInfos;N=K.keyIds;Q=K.encrypted;U=K.Yi;if(Q&&!M.length&&!U)throw new T(2,4,4026);R=Xw(a,f,g,h,k,l,m,n,p,r,u,w);R.encrypted=Q;R.drmInfos=M;R.keyIds=N;R.mimeType=v;D&&(R.bandwidth=D);Iw(R);"video"==g&&(F||J||L||
1105
+ H)&&Vw(R,F,J,null,L,null,H);Xv(a)&&hw(a,d);ca=B[0].startTime;fa=B[B.length-1];Xa=fa.endTime;Aa=new Zk(B);R.segmentIndex=Aa;cb=(Ra=Fv(d.g,"EXT-X-SERVER-CONTROL"))?null!=zv(Ra,"CAN-SKIP-UNTIL"):!1;Ya=Ra?null!=zv(Ra,"CAN-BLOCK-RELOAD"):!1;mb=Gv(d.g,"EXT-X-MEDIA-SEQUENCE",0);$a=gw(mb,B);Za=$a.Pb;wc=$a.Qb;return Ta.return({stream:R,type:g,si:[],R:e,Pc:ca,ec:Xa,Se:cb,Re:Ya,$d:!1,rg:-1,Pb:Za,Qb:wc,pf:C,Vg:!1})}})}
1106
+ function gw(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Pb:a,Qb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Pb:a,Qb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{Pb:a,Qb:c}}
1107
+ function Xw(a,b,c,d,e,f,g,h,k,l,m,n){var p=Gw(c,b)||Hw(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Uc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1108
1108
  segmentIndex:null,mimeType:p,codecs:b,kind:c==Uc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ad(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:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
1109
- fullMimeTypes:new Set};Hw(a);return a}
1110
- function dw(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U;return O(function(R){switch(R.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Cv(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Zw(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())r=p.value,f.set(r,m);w=u=!1;v=[];A=new Set;z=t(f);C=z.next();case 2:if(C.done){R.B(4);break}y=C.value;B=t(y);D=B.next().value;F=B.next().value;J=D;L=F;H=zv(J,"METHOD");if("NONE"==H){R.B(3);break}u=
1111
- !0;E=Y(J,"KEYFORMAT")||"identity";K=null;if(Lw(H)){w=!0;R.B(3);break}if("identity"!=E){K=(M=Mw[E])?M(J,c):null;R.B(6);break}return G(R,Nw(a,J,c,d,L,e),8);case 8:K=R.h;case 6:if(K){if(K.keyIds)for(N=t(K.keyIds),Q=N.next();!Q.done;Q=N.next())U=Q.value,A.add(U);v.push(K)}case 3:C=z.next();R.B(2);break;case 4:return R.return({drmInfos:v,keyIds:A,encrypted:u,Yi:w})}})}
1112
- function $w(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Y(b,"IV","");if(g){var h=Lc(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Fv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.qa.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(zv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
1113
- 256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u,w;return O(function(v){if(1==v.g)return l=Gv(d(),zv(b,"URI"),e),m=l.sort().join(""),a.L.has(m)||(n=Dg(l,a.g.retryParameters),p=Aw(a,n,6),a.L.set(m,p)),G(v,a.L.get(m),2);if(3!=v.g){r=v.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};w=k;return G(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}w.cryptoKey=v.h;k.fetchKey=void 0;
1109
+ fullMimeTypes:new Set};Iw(a);return a}
1110
+ function ew(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N,Q,U;return O(function(R){switch(R.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Dv(k.g,"EXT-X-KEY"),m=null,l.length)for(m=$w(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())r=p.value,f.set(r,m);w=u=!1;v=[];A=new Set;z=t(f);C=z.next();case 2:if(C.done){R.B(4);break}y=C.value;B=t(y);D=B.next().value;F=B.next().value;J=D;L=F;H=Av(J,"METHOD");if("NONE"==H){R.B(3);break}u=
1111
+ !0;E=Y(J,"KEYFORMAT")||"identity";K=null;if(Mw(H)){w=!0;R.B(3);break}if("identity"!=E){K=(M=Nw[E])?M(J,c):null;R.B(6);break}return G(R,Ow(a,J,c,d,L,e),8);case 8:K=R.h;case 6:if(K){if(K.keyIds)for(N=t(K.keyIds),Q=N.next();!Q.done;Q=N.next())U=Q.value,A.add(U);v.push(K)}case 3:C=z.next();R.B(2);break;case 4:return R.return({drmInfos:v,keyIds:A,encrypted:u,Yi:w})}})}
1112
+ function ax(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Y(b,"IV","");if(g){var h=Lc(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Gv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.qa.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Av(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
1113
+ 256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u,w;return O(function(v){if(1==v.g)return l=Hv(d(),Av(b,"URI"),e),m=l.sort().join(""),a.L.has(m)||(n=Dg(l,a.g.retryParameters),p=Bw(a,n,6),a.L.set(m,p)),G(v,a.L.get(m),2);if(3!=v.g){r=v.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};w=k;return G(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}w.cryptoKey=v.h;k.fetchKey=void 0;
1114
1114
  I(v)})};a.qa.set(c,k)}return a.qa.get(c)}
1115
- function gw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Ev(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Ev(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Ev(b.g,"EXT-X-PART-INF"))a.P=Number(zv(e,"PART-TARGET"));b=Ev(b.g,"EXT-X-SERVER-CONTROL");a.K&&a.P?(a.s=a.Lb?5*a.P<=c?Math.min(a.P,a.s):Math.min(c,a.s):Math.min(a.P,a.s),a.Fa=b?Number(zv(b,"PART-HOLD-BACK")):0):(a.s=Math.min(c,a.s),c=b?
1116
- yv(b,"HOLD-BACK"):null,a.Aa=c?Number(c.value):0);a.Xa=Math.max(d,a.Xa)}function vw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Fa)b=a.Fa;else if(a.Aa)b=a.Aa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Xa*c}a.j.Ei(0);a.j.nh(b);a.j.Tc(!1)}
1117
- function Zw(a,b,c,d,e){var f=Ev(c,"EXT-X-MAP");if(!f)return null;var g=zv(f,"URI"),h=Gv(d(),g,e);g=[h.toString(),Y(f,"BYTERANGE","")].join("-");if(!a.sa.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Lw(zv(m,"METHOD"))&&m.id<f.id&&(k=$w(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=ax(h,f,l,k);a.sa.set(g,b)}return a.sa.get(g)}
1118
- function ax(a,b,c,d){var e=0,f=null;b=Y(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 Ii(function(){return a},e,f,null,null,null,d)}
1119
- function bx(a,b,c,d,e,f,g,h,k){var l=d.g,m=Ev(l,"EXTINF"),n=0,p=0,r=null;d.Yb.length&&(a.m.isLowLatency=!0);var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Ev(l,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(u=wh(w.value))}var v=Li;Ev(l,"EXT-X-GAP")&&(a.m.gapCount++,v=2);if(!m){if(0==d.Yb.length)throw new T(2,4,4024,"EXTINF");if(!a.K)return null}var A=[];w=!1;var z=null,C=!1,y=!1;if(a.K&&d.Yb.length){n=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var B=u,D={},F=
1120
- 0;F<d.Yb.length;D={Pd:D.Pd,Ge:D.Ge},F++){var J=d.Yb[F],L=0==F?c:A[A.length-1],H=0==F?e:L.endTime,E=Number(Y(J,"DURATION"))||a.P;if(E){var K=H+E,M=0,N=null;"EXT-X-PRELOAD-HINT"==J.name?(M=(M=Y(J,"BYTERANGE-START"))?Number(M):0,(L=Y(J,"BYTERANGE-LENGTH"))?N=M+Number(L)-1:M&&(N=Number.MAX_SAFE_INTEGER)):(M=Y(J,"BYTERANGE"),N=t(cx(L,M)),M=N.next().value,N=N.next().value);D.Ge=Y(J,"URI");if(D.Ge){L=Li;"YES"==Y(J,"GAP")&&(a.m.gapCount++,L=2,C=!0);D.Pd=null;var Q=function(R){return function(){null==R.Pd&&
1121
- (R.Pd=Gv(h(),R.Ge,f));return R.Pd}}(D);n&&0<=M&&null!=N&&(z=Q,w=!0);H=new Ki(H,K,Q,M,N,b,0,0,Infinity,[],"",null,B,L,k);"EXT-X-PRELOAD-HINT"==J.name&&(H.Wg(),y=!0);"YES"!=Y(J,"INDEPENDENT")&&0<F&&H.nf();A.push(H);B&&(B+=E)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(A.length)n=A[A.length-1].endTime;else return null;w&&(C||0!=A[0].$a?(w=!1,z=null):A=[]);(m=Ev(l,"EXT-X-BYTERANGE"))?(r=t(cx(c,m.value)),p=r.next().value,r=r.next().value):A.length&&(p=A[0].$a,r=A[A.length-
1122
- 1].Ja);c="";m=null;"image"==g&&(c="1x1",g=Ev(l,"EXT-X-TILES"))&&(c=zv(g,"LAYOUT"),(g=Y(g,"DURATION"))&&(m=Number(g)));var U=null;b=new Ki(e,n,function(){if(z)return z();null==U&&(U=Gv(h(),d.h,f));return U||[]},p,r,b,0,0,Infinity,A,c,m,u,v,k,0<A.length&&!!d.h);w&&(a.Lb=!0,b.ji(),y&&b.Wg());return b}function cx(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]}
1123
- function hw(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.j.m;if(f&&!jw(a,c))for(b=Cv(b,"EXT-X-DATERANGE"),b=b.sort(function(w,v){w=zv(w,"START-DATE");v=zv(v,"START-DATE");return w<v?-1:w>v?1:0}),c=0;c<b.length;c++){var g=b[c],h=zv(g,"ID");if(!a.Ha.has(h)){var k=zv(g,"START-DATE"),l=wh(k);if(!isNaN(l)){k=Math.max(0,l-f);var m=null,n=Y(g,"END-DATE");if(n&&(n=wh(n),!isNaN(n)&&(m=n-f,0>m)))continue;if(null==m&&(n=Y(g,"DURATION")||Y(g,"PLANNED-DURATION"))&&(n=parseFloat(n),isNaN(n)||(m=k+n),0>l-f+n))continue;
1124
- n=Y(g,"CLASS")||"com.apple.quicktime.HLS";var p="YES"==Y(g,"END-ON-NEXT");if(null==m&&p){for(p=c+1;p<b.length;p++){var r=Y(b[p],"CLASS")||"com.apple.quicktime.HLS";if(n==r&&(r=zv(b[p],"START-DATE"),r=wh(r),!isNaN(r)&&r&&r>l)){m=Math.max(0,r-f);break}}if(null==m)continue}l="ID CLASS START-DATE END-DATE DURATION END-ON-NEXT".split(" ");p=[];g=t(g.attributes);for(r=g.next();!r.done;r=g.next())if(r=r.value,!l.includes(r.name)){var u=Iv(r.value,d);if("X-ASSET-URI"==r.name||"X-ASSET-LIST"==r.name)u=Gv(e(),
1115
+ function hw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Fv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Fv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Fv(b.g,"EXT-X-PART-INF"))a.P=Number(Av(e,"PART-TARGET"));b=Fv(b.g,"EXT-X-SERVER-CONTROL");a.K&&a.P?(a.s=a.Lb?5*a.P<=c?Math.min(a.P,a.s):Math.min(c,a.s):Math.min(a.P,a.s),a.Fa=b?Number(Av(b,"PART-HOLD-BACK")):0):(a.s=Math.min(c,a.s),c=b?
1116
+ zv(b,"HOLD-BACK"):null,a.Aa=c?Number(c.value):0);a.Xa=Math.max(d,a.Xa)}function ww(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Fa)b=a.Fa;else if(a.Aa)b=a.Aa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Xa*c}a.j.Ei(0);a.j.nh(b);a.j.Uc(!1)}
1117
+ function $w(a,b,c,d,e){var f=Fv(c,"EXT-X-MAP");if(!f)return null;var g=Av(f,"URI"),h=Hv(d(),g,e);g=[h.toString(),Y(f,"BYTERANGE","")].join("-");if(!a.sa.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Mw(Av(m,"METHOD"))&&m.id<f.id&&(k=ax(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=bx(h,f,l,k);a.sa.set(g,b)}return a.sa.get(g)}
1118
+ function bx(a,b,c,d){var e=0,f=null;b=Y(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 Ii(function(){return a},e,f,null,null,null,d)}
1119
+ function cx(a,b,c,d,e,f,g,h,k){var l=d.g,m=Fv(l,"EXTINF"),n=0,p=0,r=null;d.Yb.length&&(a.m.isLowLatency=!0);var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Fv(l,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(u=wh(w.value))}var v=Li;Fv(l,"EXT-X-GAP")&&(a.m.gapCount++,v=2);if(!m){if(0==d.Yb.length)throw new T(2,4,4024,"EXTINF");if(!a.K)return null}var A=[];w=!1;var z=null,C=!1,y=!1;if(a.K&&d.Yb.length){n=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var B=u,D={},F=
1120
+ 0;F<d.Yb.length;D={Pd:D.Pd,Ge:D.Ge},F++){var J=d.Yb[F],L=0==F?c:A[A.length-1],H=0==F?e:L.endTime,E=Number(Y(J,"DURATION"))||a.P;if(E){var K=H+E,M=0,N=null;"EXT-X-PRELOAD-HINT"==J.name?(M=(M=Y(J,"BYTERANGE-START"))?Number(M):0,(L=Y(J,"BYTERANGE-LENGTH"))?N=M+Number(L)-1:M&&(N=Number.MAX_SAFE_INTEGER)):(M=Y(J,"BYTERANGE"),N=t(dx(L,M)),M=N.next().value,N=N.next().value);D.Ge=Y(J,"URI");if(D.Ge){L=Li;"YES"==Y(J,"GAP")&&(a.m.gapCount++,L=2,C=!0);D.Pd=null;var Q=function(R){return function(){null==R.Pd&&
1121
+ (R.Pd=Hv(h(),R.Ge,f));return R.Pd}}(D);n&&0<=M&&null!=N&&(z=Q,w=!0);H=new Ki(H,K,Q,M,N,b,0,0,Infinity,[],"",null,B,L,k);"EXT-X-PRELOAD-HINT"==J.name&&(H.Wg(),y=!0);"YES"!=Y(J,"INDEPENDENT")&&0<F&&H.nf();A.push(H);B&&(B+=E)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(A.length)n=A[A.length-1].endTime;else return null;w&&(C||0!=A[0].$a?(w=!1,z=null):A=[]);(m=Fv(l,"EXT-X-BYTERANGE"))?(r=t(dx(c,m.value)),p=r.next().value,r=r.next().value):A.length&&(p=A[0].$a,r=A[A.length-
1122
+ 1].Ja);c="";m=null;"image"==g&&(c="1x1",g=Fv(l,"EXT-X-TILES"))&&(c=Av(g,"LAYOUT"),(g=Y(g,"DURATION"))&&(m=Number(g)));var U=null;b=new Ki(e,n,function(){if(z)return z();null==U&&(U=Hv(h(),d.h,f));return U||[]},p,r,b,0,0,Infinity,A,c,m,u,v,k,0<A.length&&!!d.h);w&&(a.Lb=!0,b.ji(),y&&b.Wg());return b}function dx(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]}
1123
+ function iw(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.j.m;if(f&&!kw(a,c))for(b=Dv(b,"EXT-X-DATERANGE"),b=b.sort(function(w,v){w=Av(w,"START-DATE");v=Av(v,"START-DATE");return w<v?-1:w>v?1:0}),c=0;c<b.length;c++){var g=b[c],h=Av(g,"ID");if(!a.Ha.has(h)){var k=Av(g,"START-DATE"),l=wh(k);if(!isNaN(l)){k=Math.max(0,l-f);var m=null,n=Y(g,"END-DATE");if(n&&(n=wh(n),!isNaN(n)&&(m=n-f,0>m)))continue;if(null==m&&(n=Y(g,"DURATION")||Y(g,"PLANNED-DURATION"))&&(n=parseFloat(n),isNaN(n)||(m=k+n),0>l-f+n))continue;
1124
+ n=Y(g,"CLASS")||"com.apple.quicktime.HLS";var p="YES"==Y(g,"END-ON-NEXT");if(null==m&&p){for(p=c+1;p<b.length;p++){var r=Y(b[p],"CLASS")||"com.apple.quicktime.HLS";if(n==r&&(r=Av(b[p],"START-DATE"),r=wh(r),!isNaN(r)&&r&&r>l)){m=Math.max(0,r-f);break}}if(null==m)continue}l="ID CLASS START-DATE END-DATE DURATION END-ON-NEXT".split(" ");p=[];g=t(g.attributes);for(r=g.next();!r.done;r=g.next())if(r=r.value,!l.includes(r.name)){var u=Jv(r.value,d);if("X-ASSET-URI"==r.name||"X-ASSET-LIST"==r.name)u=Hv(e(),
1125
1125
  r.value,d)[0];p.push({key:r.name,description:"",data:u,mimeType:null,pictureType:null})}if(p.length)a.h.onMetadata(n,k,m,p);a.Ha.add(h)}}}}}
1126
- function ew(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Fv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Fv(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Ev(b.g,"EXT-X-SKIP"),n=m?Number(Y(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;Wv(a)&&c.has(p)&&(r=c.get(p));0===r&&a.xa==Bw&&0<c.size&&!c.has(p)&&(r=a.j.Hb());var u=[],w=null;m=[];for(var v=0;v<g.length;v++){var A=g[v],z=0==v?r:w.endTime;p=l+n+v;Ev(A.g,"EXT-X-DISCONTINUITY")&&k++;var C=t(A.g);for(var y=C.next();!y.done;y=C.next())y=y.value,"EXT-X-KEY"==y.name&&(Lw(zv(y,"METHOD"))?
1127
- h=$w(a,y,b,e,d):h=void 0);c.set(p,z);C=Zw(a,b,A.g,e,d);!a.K&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.K=a.h.isLowLatencyMode());if(z=bx(a,C,w,A,z,d,f,e,h))(w=Fv(A.g,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:z.endTime-z.startTime}):m.length&&(w=m.pop(),w.duration+=z.endTime-z.startTime,m.push(w)),w=z,z.j=k,jw(a,f)&&null!=a.J&&p<a.J||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(B,D){return B+D.duration},0),b=Math.round(m.reduce(function(B,D){return B+D.bitrate*D.duration},0)/
1126
+ function fw(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Gv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Gv(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Fv(b.g,"EXT-X-SKIP"),n=m?Number(Y(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;Xv(a)&&c.has(p)&&(r=c.get(p));0===r&&a.xa==Cw&&0<c.size&&!c.has(p)&&(r=a.j.Hb());var u=[],w=null;m=[];for(var v=0;v<g.length;v++){var A=g[v],z=0==v?r:w.endTime;p=l+n+v;Fv(A.g,"EXT-X-DISCONTINUITY")&&k++;var C=t(A.g);for(var y=C.next();!y.done;y=C.next())y=y.value,"EXT-X-KEY"==y.name&&(Mw(Av(y,"METHOD"))?
1127
+ h=ax(a,y,b,e,d):h=void 0);c.set(p,z);C=$w(a,b,A.g,e,d);!a.K&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.K=a.h.isLowLatencyMode());if(z=cx(a,C,w,A,z,d,f,e,h))(w=Gv(A.g,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:z.endTime-z.startTime}):m.length&&(w=m.pop(),w.duration+=z.endTime-z.startTime,m.push(w)),w=z,z.j=k,kw(a,f)&&null!=a.J&&p<a.J||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(B,D){return B+D.duration},0),b=Math.round(m.reduce(function(B,D){return B+D.bitrate*D.duration},0)/
1128
1128
  b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={Ed:c.Ed,Dd:c.Dd,Ae:c.Ae,mc:c.mc,zd:c.zd},d++)if(c.mc=u[d],null==c.mc.h)for(c.Dd=0,c.Ed=d,e=function(B){return function(){var D=u[B.Ed];if(D){if(null!=D.h)return D.h+B.Dd;B.Dd-=D.endTime-D.startTime;B.Ed+=1}return null}}(c),c.zd=0,c.Ae=d,g=function(B){return function(){var D=u[B.Ae];if(D){D!=B.mc&&(B.zd+=D.endTime-D.startTime);if(null!=D.h)return D.h+B.zd;--B.Ae}return null}}(c);null==c.mc.h;)c.mc.h=g(),null==c.mc.h&&(c.mc.h=
1129
- e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ea;if(m&&Infinity!=c&&!jw(a,f))for(a=t(u),d=a.next();!d.done;d=a.next())d.value.wh(c);return{segments:u,bandwidth:b}}function Fw(a,b){if(a==Uc){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"}
1130
- function Gw(a){return a==Uc?"text/vtt":dx[a].mp4}function yw(a,b){a=Wv(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.tc()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
1131
- function Yw(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,A;return O(function(z){switch(z.g){case 1:e=Jg;f=yw(a,d);g=f.segment;if(2==g.status)return z.return(Gw(b));h=g.R();k=new nb(h[0]);l=k.sb.split(".").pop();m=dx[b];if((n=m[l])||(n=zw[l])||(n=Fw(b,c)))return z.return(n);r=1;u=Dg(h,a.g.retryParameters);ta(z,2);u.method="HEAD";return G(z,Aw(a,u,e,{type:r}),4);case 4:w=z.h;p=w.headers["content-type"];va(z,3);break;case 2:v=wa(z);if(!v||1002!=v.code&&1001!=v.code){z.B(3);break}u.method="GET";return G(z,
1132
- Aw(a,u,e,{type:r}),6);case 6:A=z.h,p=A.headers["content-type"];case 3:return p?z.return(p.toLowerCase().split(";")[0]):z.return(Gw(b))}})}function Uw(a,b,c,d,e,f,g){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,a.colorGamut=g||void 0)}function Uv(a,b,c){return Aw(a,Dg(b,a.g.retryParameters),0,{type:c?2:3})}
1133
- function Sv(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return G(h,a.update(),4);case 4:c=Date.now();Wv(a)&&(d=(c-b)/1E3,a.Kb.sample(1,d),e=a.s,f=Math.max(0,e-pd(a.Kb)),a.A.X(f));va(h,3);break;case 2:g=wa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.X(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();I(h)}})}
1134
- function Wv(a){return a.xa!=Tv}function $v(a,b){a.xa=b;a.j&&a.j.Tc(!Wv(a));Wv(a)||a.A.stop()}function Aw(a,b,c,d){if(!a.Z)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);xg(a.Z,b);return b.promise}function Lw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1135
- function Nw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(uc())throw new T(2,4,4041);g=zv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=Gv(d(),zv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Mc(Kc(k[0].split("data:text/plain;base64,").pop()));B.B(2);break}m=k.sort().join("");a.ra.has(m)||(n=Dg(k,a.g.retryParameters),p=Aw(a,n,6),a.ra.set(m,p));return G(B,a.ra.get(m),
1136
- 3);case 3:r=B.h,l=Mc(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.B(4);break}if(a.Ga.has(e)){w=a.Ga.get(e);B.B(5);break}v=Ll(e.R(),e.Ib(),e.Fb(),a.g.retryParameters);A=Jg;return G(B,Aw(a,v,A,{type:0}),6);case 6:z=B.h,w=Jl(z.data),a.Ga.set(e,w);case 5:w&&(u=w);case 4:return C=new Map,C.set(u,l),y="cenc","SAMPLE-AES"==g&&(y="cbcs"),B.return(Qc(C,y))}})}P("shaka.hls.HlsParser",Rv);
1137
- var zw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},dx={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",
1138
- 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"}},Mw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(uc())throw new T(2,4,4041);b=zv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");return Pc("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],zv(a,"URI"))},
1139
- "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=zv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=zv(a,"URI");b=Qv(b.split("?")[0]);b=Hb(b.data);c=Pc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Y(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=zv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";
1140
- "SAMPLE-AES"==b&&(c="cbcs");a=zv(a,"URI");a=Qv(a.split("?")[0]);a=Hb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=dh(a,b,new Set,0);return Pc("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},Tv="VOD",Xw="EVENT",Bw="LIVE",Zv={Ui:Tv,ol:Xw,zl:Bw};Di["application/x-mpegurl"]=function(){return new Rv};Di["application/vnd.apple.mpegurl"]=function(){return new Rv};function ex(a){var b=0,c=Mb(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=Hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function fx(a){if(a=gx(a))a:{a=t(ph(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=qh(b.value,"LA_URL")){a=nh(b);break a}a=""}else a="";return a}
1141
- function gx(a){a=Kc(nh(a));a=ex(a).filter(function(b){return b.type===hx})[0];if(!a)return null;a=Ac(a.value,!0);return(a=fh(a,"WRMHEADER"))?a:null}var hx=1,ix=(new Map).set("com.microsoft.playready",fx).set("com.microsoft.playready.recommendation",fx).set("com.microsoft.playready.software",fx).set("com.microsoft.playready.hardware",fx);function jx(a){if(!kx){kx=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);lx=mx("ftyp",b,d,b,c);b=mx("dref",nx);ox=mx("dinf",b)}this.g=a}
1142
- function px(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=mx;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/(qx+1));m=Math.floor(m%(qx+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(x(Dx(h,4)),[0,0,0,0],x(Dx(n,4)),x(Dx(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],x(Dx(k,2)),[0,0],x(Dx(l,
1143
- 2)),[0,0]));h=mx("tkhd",h);k=mx;n=g.duration*g.timescale;l=Math.floor(n/(qx+1));n=Math.floor(n%(qx+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(x(Dx(g.timescale,4)),x(Dx(l,4)),x(Dx(n,4)),x(Dx(m,2)),[0,0]));l=mx("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Ex;break;case "audio":m=Fx}n=mx("hdlr",m);a:{switch(g.type){case "video":g=mx("minf",mx("vmhd",Gx),ox,Hx(g));break a;
1144
- case "audio":g=mx("minf",mx("smhd",Ix),ox,Hx(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Nc.apply(Hc,x(b));f=a.g[0];c=mx;d=f.duration*f.timescale;e=Math.floor(d/(qx+1));d=Math.floor(d%(qx+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(x(Dx(f.timescale,4)),x(Dx(e,4)),x(Dx(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,
1145
- 255]));e=mx("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Dx(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=mx("trex",k),h.call(g,k);a=Nc.apply(Hc,x(d));a=mx("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Nc.apply(Hc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(lx.byteLength+
1146
- a.byteLength);b.set(lx);b.set(a,lx.byteLength);return b}
1147
- function Hx(a){var b=mx,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.Qa.byteLength)var e=mx("avcC",a.Qa);else{e=mx;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.wb.length;n++){var p=Jx(a.wb[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.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=
1148
- 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(x(Dx(c,2)),x(Dx(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=Kx(a);g=new Uint8Array([]);
1149
- a.encrypted&&(g=Lx(a),d="encv");c=mx(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.Qa.byteLength&&(c=mx("hvcC",a.Qa)),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(x(Dx(d,2)),x(Dx(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=Kx(a),g=new Uint8Array([]),a.encrypted&&(g=Lx(a),e="encv"),c=mx(e,d,
1150
- c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=mx(".mp3",Mx(a));else if(a.codecs.includes("ac-3"))c=mx("dac3",a.Ca),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Lx(a),d="enca"),a=mx(d,Mx(a),c,e);else if(a.codecs.includes("ec-3"))c=mx("dec3",a.Ca),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Lx(a),d="enca"),a=mx(d,Mx(a),c,e);else if(a.codecs.includes("opus"))c=mx("dOps",a.Ca),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Lx(a),d="enca"),a=mx(d,Mx(a),c,e);else{if(0<a.Ca.byteLength)c=mx("esds",
1151
- a.Ca);else{c=mx;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Rc("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(x(Dx(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=Lx(a),d="enca");
1152
- a=mx(d,Mx(a),c,e)}c=a}a=mx("stsd",Nx,c);return b("stbl",a,mx("stts",Ox),mx("stsc",Px),mx("stsz",Qx),mx("stco",Rx))}function Kx(a){if(!a.Va&&!a.Wa)return new Uint8Array([]);var b=a.Wa;a=new Uint8Array([].concat(x(Dx(a.Va,4)),x(Dx(b,4))));return mx("pasp",a)}function Mx(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(x(Dx(a.stream.audioSamplingRate||44100,2)),[0,0]))}
1153
- function Lx(a){var b=mx;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(x(Dx(d,4))));c=mx("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=mx("schm",d);e=mx;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Jx(h.value)}a=new Uint8Array([0,
1154
- 0,0,0,0,0,1,8]);f=mx("tenc",a,f);return b("sinf",c,d,e("schi",f))}
1155
- function Sx(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=mx;var g=new Uint8Array([0,0,0,0].concat(x(Dx(c.data?c.data.Sb:0,4))));g=mx("mfhd",g);var h;var k=c.data?c.data.ub:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.mb<<4|m.qb<<2|m.pb}k=mx("sdtp",l);var n=k.length+92;l=mx;h=new Uint8Array([0,0,0,58].concat(x(Dx(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=mx("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
1156
- 0;var p=Math.floor(m%(qx+1));m=new Uint8Array([1,0,0,0].concat(x(Dx(Math.floor(m/(qx+1)),4)),x(Dx(p,4))));m=mx("tfdt",m);var r=n;n=c.data?c.data.ub:[];p=n.length;var u=12+16*p,w=new Uint8Array(u);r+=8+u;w.set(["video"===c.type?1:0,0,15,1].concat(x(Dx(p,4)),x(Dx(r,4))),0);for(r=0;r<p;r++){var v=n[r];u=Dx(v.duration,4);var A=Dx(v.size,4),z=v.flags;v=Dx(v.yb,4);w.set([].concat(x(u),x(A),[z.zb<<2|z.mb,z.qb<<6|z.pb<<4|z.Ab,z.kb&61440,z.kb&15],x(v)),12+16*r)}n=mx("trun",w);k=l("traf",h,m,n,k);f=f("moof",
1157
- g,k);e.call(d,b,[f,Tx(c)])}return Nc.apply(Hc,x(b))}function Tx(a){a=(a.data?a.data.ub:[]).map(function(b){return b.data});a=Nc.apply(Hc,x(a));return mx("mdat",a)}function Dx(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Jx(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}
1158
- function mx(a){var b=Ga.apply(1,arguments),c=Ux[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Ux[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}
1159
- var kx=!1,qx=Math.pow(2,32)-1,Ux={},Ex=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]),Fx=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]),Ox=new Uint8Array([0,0,0,0,0,0,0,0]),Px=new Uint8Array([0,0,0,0,0,0,0,0]),Rx=new Uint8Array([0,0,0,0,0,0,0,0]),Qx=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Gx=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ix=new Uint8Array([0,
1160
- 0,0,0,0,0,0,0]),Nx=new Uint8Array([0,0,0,0,0,0,0,1]),lx=new Uint8Array([]),nx=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),ox=new Uint8Array([]);function Vx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.C=new od(5);this.s=new Vb(function(){Wx(a)});this.A=new wg;this.m=new Map}q=Vx.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,G(d,Xx(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
1161
- function Wx(a){var b;O(function(c){switch(c.g){case 1:return ta(c,2),G(c,Xx(a),4);case 4:va(c,3);break;case 2:b=wa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();I(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.s&&(this.s.stop(),this.s=null);this.m.clear();return this.A.destroy()};
1162
- q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),G(c,Xx(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.h||!b)return c.return();a.h.onError(b);I(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};
1163
- function Xx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=Dg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),xg(a.A,e),G(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!=Gm){Ad("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Ou(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
1164
- l);n(m);m=Dc(m.outerHTML)}var p=eh(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=Hm&&l(p);a.i||(a.i=new Dk(null,0));if(l=th(p,"IsLive",Fh,!1))throw new T(2,4,4047);a.i.Tc(!l);n=th(p,"TimeScale",Dh,1E7);m=th(p,"DVRWindowLength",Dh);l&&(0===m||isNaN(m))&&(m=Infinity);var r=th(p,"CanSeek",Fh,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.Bf(r);m=th(p,
1165
- "Duration",Dh,Infinity);l||a.i.vb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};r=lh(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(lh(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var w=m[u],v=w.attributes.SystemID.toLowerCase(),A=n[v];if(A){var z=gx(w);if(z)a:{z=t(ph(z,"DATA"));for(var C=z.next();!C.done;C=z.next())if(C=qh(C.value,"KID")){z=Kc(nh(C));z=new Uint8Array([z[3],z[2],z[1],z[0],z[5],
1166
- z[4],z[7],z[6]].concat(x(z.slice(8))));z=Mc(z);break a}z=null}else z=null;C=Kc(nh(w));v=Lc(v.replace(/-/g,""));v=[{initData:dh(C,v,new Set,0),initDataType:"cenc",keyId:z}];v=Pc(A,"cenc",v);z&&v.keyIds.add(z);if(A=ix.get(A))v.licenseServerUri=A(w);r.push(v)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=lh(p,"StreamIndex");p=t(p);for(w=p.next();!w.done;w=p.next()){w=w.value;A=lh(w,"QualityLevel");v=l.timescale;z=l.duration;C=lh(w,"c");for(var y=[],B=0,D=0;D<C.length;++D){var F=C[D],J=C[D+1],L=th(F,"t",Dh),H=
1167
- th(F,"d",Dh);F=th(F,"r",zh);if(!H)break;L=null!=L?L:B;F=F||0;if(0>F)if(J){J=th(J,"t",Dh);if(null==J)break;else if(L>=J)break;F=Math.ceil((J-L)/H)-1}else{if(Infinity==z)break;else if(L/v>=z)break;F=Math.ceil((z*v-L)/H)-1}for(J=0;J<=F;++J)B=L+H,y.push({start:L/v,end:B/v,Ch:L}),L=B}v=y;A=t(A);for(z=A.next();!z.done;z=A.next())(z=Yx(a,w,z.value,v,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=Uc||a.g.disableText||m.push(z):n.push(z):r.push(z))}p=[];r=t(0<r.length?
1129
+ e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ea;if(m&&Infinity!=c&&!kw(a,f))for(a=t(u),d=a.next();!d.done;d=a.next())d.value.wh(c);return{segments:u,bandwidth:b}}function Gw(a,b){if(a==Uc){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"}
1130
+ function Hw(a){return a==Uc?"text/vtt":ex[a].mp4}function zw(a,b){a=Xv(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.uc()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
1131
+ function Zw(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,A;return O(function(z){switch(z.g){case 1:e=Jg;f=zw(a,d);g=f.segment;if(2==g.status)return z.return(Hw(b));h=g.R();k=new nb(h[0]);l=k.sb.split(".").pop();m=ex[b];if((n=m[l])||(n=Aw[l])||(n=Gw(b,c)))return z.return(n);r=1;u=Dg(h,a.g.retryParameters);ta(z,2);u.method="HEAD";return G(z,Bw(a,u,e,{type:r}),4);case 4:w=z.h;p=w.headers["content-type"];va(z,3);break;case 2:v=wa(z);if(!v||1002!=v.code&&1001!=v.code){z.B(3);break}u.method="GET";return G(z,
1132
+ Bw(a,u,e,{type:r}),6);case 6:A=z.h,p=A.headers["content-type"];case 3:return p?z.return(p.toLowerCase().split(";")[0]):z.return(Hw(b))}})}function Vw(a,b,c,d,e,f,g){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,a.colorGamut=g||void 0)}function Vv(a,b,c){return Bw(a,Dg(b,a.g.retryParameters),0,{type:c?2:3})}
1133
+ function Tv(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return G(h,a.update(),4);case 4:c=Date.now();Xv(a)&&(d=(c-b)/1E3,a.Kb.sample(1,d),e=a.s,f=Math.max(0,e-pd(a.Kb)),a.A.X(f));va(h,3);break;case 2:g=wa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.X(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();I(h)}})}
1134
+ function Xv(a){return a.xa!=Uv}function aw(a,b){a.xa=b;a.j&&a.j.Uc(!Xv(a));Xv(a)||a.A.stop()}function Bw(a,b,c,d){if(!a.Y)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);xg(a.Y,b);return b.promise}function Mw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1135
+ function Ow(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(uc())throw new T(2,4,4041);g=Av(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=Hv(d(),Av(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Mc(Kc(k[0].split("data:text/plain;base64,").pop()));B.B(2);break}m=k.sort().join("");a.ra.has(m)||(n=Dg(k,a.g.retryParameters),p=Bw(a,n,6),a.ra.set(m,p));return G(B,a.ra.get(m),
1136
+ 3);case 3:r=B.h,l=Mc(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.B(4);break}if(a.Ga.has(e)){w=a.Ga.get(e);B.B(5);break}v=Ll(e.R(),e.Ib(),e.Fb(),a.g.retryParameters);A=Jg;return G(B,Bw(a,v,A,{type:0}),6);case 6:z=B.h,w=Jl(z.data),a.Ga.set(e,w);case 5:w&&(u=w);case 4:return C=new Map,C.set(u,l),y="cenc","SAMPLE-AES"==g&&(y="cbcs"),B.return(Qc(C,y))}})}P("shaka.hls.HlsParser",Sv);
1137
+ var Aw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},ex={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",
1138
+ 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"}},Nw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(uc())throw new T(2,4,4041);b=Av(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");return Pc("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],Av(a,"URI"))},
1139
+ "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Av(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Av(a,"URI");b=Rv(b.split("?")[0]);b=Hb(b.data);c=Pc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Y(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Av(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";
1140
+ "SAMPLE-AES"==b&&(c="cbcs");a=Av(a,"URI");a=Rv(a.split("?")[0]);a=Hb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=dh(a,b,new Set,0);return Pc("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},Uv="VOD",Yw="EVENT",Cw="LIVE",$v={Ui:Uv,ol:Yw,zl:Cw};Di["application/x-mpegurl"]=function(){return new Sv};Di["application/vnd.apple.mpegurl"]=function(){return new Sv};function fx(a){var b=0,c=Mb(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=Hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function gx(a){if(a=hx(a))a:{a=t(ph(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=qh(b.value,"LA_URL")){a=nh(b);break a}a=""}else a="";return a}
1141
+ function hx(a){a=Kc(nh(a));a=fx(a).filter(function(b){return b.type===ix})[0];if(!a)return null;a=Ac(a.value,!0);return(a=fh(a,"WRMHEADER"))?a:null}var ix=1,jx=(new Map).set("com.microsoft.playready",gx).set("com.microsoft.playready.recommendation",gx).set("com.microsoft.playready.software",gx).set("com.microsoft.playready.hardware",gx);function kx(a){if(!lx){lx=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);mx=nx("ftyp",b,d,b,c);b=nx("dref",ox);px=nx("dinf",b)}this.g=a}
1142
+ function qx(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=nx;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/(rx+1));m=Math.floor(m%(rx+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(x(Ex(h,4)),[0,0,0,0],x(Ex(n,4)),x(Ex(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],x(Ex(k,2)),[0,0],x(Ex(l,
1143
+ 2)),[0,0]));h=nx("tkhd",h);k=nx;n=g.duration*g.timescale;l=Math.floor(n/(rx+1));n=Math.floor(n%(rx+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(x(Ex(g.timescale,4)),x(Ex(l,4)),x(Ex(n,4)),x(Ex(m,2)),[0,0]));l=nx("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Fx;break;case "audio":m=Gx}n=nx("hdlr",m);a:{switch(g.type){case "video":g=nx("minf",nx("vmhd",Hx),px,Ix(g));break a;
1144
+ case "audio":g=nx("minf",nx("smhd",Jx),px,Ix(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Nc.apply(Hc,x(b));f=a.g[0];c=nx;d=f.duration*f.timescale;e=Math.floor(d/(rx+1));d=Math.floor(d%(rx+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(x(Ex(f.timescale,4)),x(Ex(e,4)),x(Ex(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,
1145
+ 255]));e=nx("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Ex(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=nx("trex",k),h.call(g,k);a=Nc.apply(Hc,x(d));a=nx("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Nc.apply(Hc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(mx.byteLength+
1146
+ a.byteLength);b.set(mx);b.set(a,mx.byteLength);return b}
1147
+ function Ix(a){var b=nx,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.Qa.byteLength)var e=nx("avcC",a.Qa);else{e=nx;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.wb.length;n++){var p=Kx(a.wb[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.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=
1148
+ 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(x(Ex(c,2)),x(Ex(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=Lx(a);g=new Uint8Array([]);
1149
+ a.encrypted&&(g=Mx(a),d="encv");c=nx(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.Qa.byteLength&&(c=nx("hvcC",a.Qa)),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(x(Ex(d,2)),x(Ex(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=Lx(a),g=new Uint8Array([]),a.encrypted&&(g=Mx(a),e="encv"),c=nx(e,d,
1150
+ c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=nx(".mp3",Nx(a));else if(a.codecs.includes("ac-3"))c=nx("dac3",a.Ca),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Mx(a),d="enca"),a=nx(d,Nx(a),c,e);else if(a.codecs.includes("ec-3"))c=nx("dec3",a.Ca),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Mx(a),d="enca"),a=nx(d,Nx(a),c,e);else if(a.codecs.includes("opus"))c=nx("dOps",a.Ca),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Mx(a),d="enca"),a=nx(d,Nx(a),c,e);else{if(0<a.Ca.byteLength)c=nx("esds",
1151
+ a.Ca);else{c=nx;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Rc("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(x(Ex(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=Mx(a),d="enca");
1152
+ a=nx(d,Nx(a),c,e)}c=a}a=nx("stsd",Ox,c);return b("stbl",a,nx("stts",Px),nx("stsc",Qx),nx("stsz",Rx),nx("stco",Sx))}function Lx(a){if(!a.Va&&!a.Wa)return new Uint8Array([]);var b=a.Wa;a=new Uint8Array([].concat(x(Ex(a.Va,4)),x(Ex(b,4))));return nx("pasp",a)}function Nx(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(x(Ex(a.stream.audioSamplingRate||44100,2)),[0,0]))}
1153
+ function Mx(a){var b=nx;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(x(Ex(d,4))));c=nx("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=nx("schm",d);e=nx;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Kx(h.value)}a=new Uint8Array([0,
1154
+ 0,0,0,0,0,1,8]);f=nx("tenc",a,f);return b("sinf",c,d,e("schi",f))}
1155
+ function Tx(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=nx;var g=new Uint8Array([0,0,0,0].concat(x(Ex(c.data?c.data.Sb:0,4))));g=nx("mfhd",g);var h;var k=c.data?c.data.ub:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.mb<<4|m.qb<<2|m.pb}k=nx("sdtp",l);var n=k.length+92;l=nx;h=new Uint8Array([0,0,0,58].concat(x(Ex(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=nx("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
1156
+ 0;var p=Math.floor(m%(rx+1));m=new Uint8Array([1,0,0,0].concat(x(Ex(Math.floor(m/(rx+1)),4)),x(Ex(p,4))));m=nx("tfdt",m);var r=n;n=c.data?c.data.ub:[];p=n.length;var u=12+16*p,w=new Uint8Array(u);r+=8+u;w.set(["video"===c.type?1:0,0,15,1].concat(x(Ex(p,4)),x(Ex(r,4))),0);for(r=0;r<p;r++){var v=n[r];u=Ex(v.duration,4);var A=Ex(v.size,4),z=v.flags;v=Ex(v.yb,4);w.set([].concat(x(u),x(A),[z.zb<<2|z.mb,z.qb<<6|z.pb<<4|z.Ab,z.kb&61440,z.kb&15],x(v)),12+16*r)}n=nx("trun",w);k=l("traf",h,m,n,k);f=f("moof",
1157
+ g,k);e.call(d,b,[f,Ux(c)])}return Nc.apply(Hc,x(b))}function Ux(a){a=(a.data?a.data.ub:[]).map(function(b){return b.data});a=Nc.apply(Hc,x(a));return nx("mdat",a)}function Ex(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Kx(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}
1158
+ function nx(a){var b=Ga.apply(1,arguments),c=Vx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Vx[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}
1159
+ var lx=!1,rx=Math.pow(2,32)-1,Vx={},Fx=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]),Gx=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]),Px=new Uint8Array([0,0,0,0,0,0,0,0]),Qx=new Uint8Array([0,0,0,0,0,0,0,0]),Sx=new Uint8Array([0,0,0,0,0,0,0,0]),Rx=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Hx=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Jx=new Uint8Array([0,
1160
+ 0,0,0,0,0,0,0]),Ox=new Uint8Array([0,0,0,0,0,0,0,1]),mx=new Uint8Array([]),ox=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),px=new Uint8Array([]);function Wx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.C=new od(5);this.s=new Vb(function(){Xx(a)});this.A=new wg;this.m=new Map}q=Wx.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,G(d,Yx(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
1161
+ function Xx(a){var b;O(function(c){switch(c.g){case 1:return ta(c,2),G(c,Yx(a),4);case 4:va(c,3);break;case 2:b=wa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();I(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.s&&(this.s.stop(),this.s=null);this.m.clear();return this.A.destroy()};
1162
+ q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),G(c,Yx(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.h||!b)return c.return();a.h.onError(b);I(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};
1163
+ function Yx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=Dg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),xg(a.A,e),G(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!=Gm){Ad("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Pu(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
1164
+ l);n(m);m=Dc(m.outerHTML)}var p=eh(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=Hm&&l(p);a.i||(a.i=new Dk(null,0));if(l=th(p,"IsLive",Fh,!1))throw new T(2,4,4047);a.i.Uc(!l);n=th(p,"TimeScale",Dh,1E7);m=th(p,"DVRWindowLength",Dh);l&&(0===m||isNaN(m))&&(m=Infinity);var r=th(p,"CanSeek",Fh,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.Bf(r);m=th(p,
1165
+ "Duration",Dh,Infinity);l||a.i.vb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};r=lh(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(lh(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var w=m[u],v=w.attributes.SystemID.toLowerCase(),A=n[v];if(A){var z=hx(w);if(z)a:{z=t(ph(z,"DATA"));for(var C=z.next();!C.done;C=z.next())if(C=qh(C.value,"KID")){z=Kc(nh(C));z=new Uint8Array([z[3],z[2],z[1],z[0],z[5],
1166
+ z[4],z[7],z[6]].concat(x(z.slice(8))));z=Mc(z);break a}z=null}else z=null;C=Kc(nh(w));v=Lc(v.replace(/-/g,""));v=[{initData:dh(C,v,new Set,0),initDataType:"cenc",keyId:z}];v=Pc(A,"cenc",v);z&&v.keyIds.add(z);if(A=jx.get(A))v.licenseServerUri=A(w);r.push(v)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=lh(p,"StreamIndex");p=t(p);for(w=p.next();!w.done;w=p.next()){w=w.value;A=lh(w,"QualityLevel");v=l.timescale;z=l.duration;C=lh(w,"c");for(var y=[],B=0,D=0;D<C.length;++D){var F=C[D],J=C[D+1],L=th(F,"t",Dh),H=
1167
+ th(F,"d",Dh);F=th(F,"r",zh);if(!H)break;L=null!=L?L:B;F=F||0;if(0>F)if(J){J=th(J,"t",Dh);if(null==J)break;else if(L>=J)break;F=Math.ceil((J-L)/H)-1}else{if(Infinity==z)break;else if(L/v>=z)break;F=Math.ceil((z*v-L)/H)-1}for(J=0;J<=F;++J)B=L+H,y.push({start:L/v,end:B/v,Ch:L}),L=B}v=y;A=t(A);for(z=A.next();!z.done;z=A.next())(z=Zx(a,w,z.value,v,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=Uc||a.g.disableText||m.push(z):n.push(z):r.push(z))}p=[];r=t(0<r.length?
1168
1168
  r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,w=t(0<n.length?n:[null]),z=w.next();!z.done;z=w.next())A=p,v=A.push,z=z.value,C=0,u&&u.bandwidth&&0<u.bandwidth&&(C+=u.bandwidth),z&&z.bandwidth&&0<z.bandwidth&&(C+=z.bandwidth),z={id:a.u++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!z&&z.primary,audio:u,video:z,bandwidth:C,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},v.call(A,z);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
1169
1169
  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,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1},a.i.mf());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.C.sample(1,h);I(k)})}
1170
- function Yx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Va("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=th(c,"Bitrate",Ch),m=th(c,"MaxWidth",Ch),n=th(c,"MaxHeight",Ch),p=th(c,"Channels",Ch),r=th(c,"SamplingRate",Ch),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.vb(Math.min(u,w));var v={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1170
+ function Zx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Va("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=th(c,"Bitrate",Ch),m=th(c,"MaxWidth",Ch),n=th(c,"MaxHeight",Ch),p=th(c,"Channels",Ch),r=th(c,"SamplingRate",Ch),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.vb(Math.min(u,w));var v={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1171
1171
  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:ad(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
1172
- matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=Zx[e])&&v.roles.push(e),"main"===e&&(v.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 Va('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!$x.includes(e.toUpperCase()))return Va("Codec not supported:",
1173
- e),null;c=ay(c,g,e,v);v.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Va("Quality unsupported without CodecPrivateData",g),null;v.type="audio";v.mimeType="mss/audio/mp4";v.codecs=by(e,c);break;case "video":if(!c)return Va("Quality unsupported without CodecPrivateData",g),null;v.type="video";v.mimeType="mss/video/mp4";v.codecs=cy(c);break;case "text":if(v.type=Uc,v.mimeType="application/mp4","TTML"===e||"DFXP"===e)v.codecs="stpp"}v.fullMimeTypes.add(we(v.mimeType,v.codecs));
1174
- v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(a.m.has(v.id))var A=a.m.get(v.id);else A=[],"video"==v.type&&(A=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,wb:A,Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:null,stream:v},A=px(new jx([A])),a.m.set(v.id,A);A=dy(a,new Ii(function(){return[]},0,null,El(v),v.mssPrivateData.timescale,
1172
+ matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=$x[e])&&v.roles.push(e),"main"===e&&(v.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 Va('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!ay.includes(e.toUpperCase()))return Va("Codec not supported:",
1173
+ e),null;c=by(c,g,e,v);v.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Va("Quality unsupported without CodecPrivateData",g),null;v.type="audio";v.mimeType="mss/audio/mp4";v.codecs=cy(e,c);break;case "video":if(!c)return Va("Quality unsupported without CodecPrivateData",g),null;v.type="video";v.mimeType="mss/video/mp4";v.codecs=dy(c);break;case "text":if(v.type=Uc,v.mimeType="application/mp4","TTML"===e||"DFXP"===e)v.codecs="stpp"}v.fullMimeTypes.add(we(v.mimeType,v.codecs));
1174
+ v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(a.m.has(v.id))var A=a.m.get(v.id);else A=[],"video"==v.type&&(A=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,wb:A,Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:null,stream:v},A=qx(new kx([A])),a.m.set(v.id,A);A=ey(a,new Ii(function(){return[]},0,null,El(v),v.mssPrivateData.timescale,
1175
1175
  A),v,b,d);v.segmentIndex=new Zk(A);return Promise.resolve()};v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)};return v}
1176
- function ay(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;
1177
- b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function by(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 cy(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1178
- function dy(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Ld:g.Ld},h=e.next())g.Ld=h.value,d.push(new Ki(g.Ld.start,g.Ld.end,function(k){return function(){return Oc(a.l,[f.replace("{start time}",String(k.Ld.Ch))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",Vx);var $x="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Zx={CAPT:"main",SUBT:"alternate",DESC:"main"};
1179
- Di["application/vnd.ms-sstr+xml"]=function(){return new Vx};function ey(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"]};var g=null;try{g=Cc(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function fy(){}function gy(a,b,c,d,e){var f=new hy;Ng(b.headers).forEach(function(l,m){f.append(m,l)});var g=new iy,h={Kh:!1,Mi:!1};a=jy(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 pg(a,function(){h.Kh=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Vb(function(){h.Mi=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
1180
- function jy(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,v,A,z,C;return O(function(y){switch(y.g){case 1:return h=ky,k=ly,p=n=0,r=Date.now(),ta(y,2),G(y,h(a,c),4);case 4:l=y.h;f(my(l.headers));if("HEAD"==c.method){y.B(5);break}u=l.clone().body.getReader();v=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;A=function(B){function D(){var F,J,L;return O(function(H){switch(H.g){case 1:return ta(H,2),G(H,u.read(),4);case 4:F=H.h;va(H,3);break;case 2:return wa(H),H.return();case 3:if(F.done){H.B(5);break}n+=
1181
- F.value.byteLength;if(!g){H.B(5);break}return G(H,g(F.value),5);case 5:J=Date.now();if(100<J-r||F.done)L=F.done?0:v-n,e(J-r,n-p,L),p=n,r=J;F.done?B.close():(B.enqueue(F.value),D());I(H)}})}D()};new k({start:A});return G(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:va(y,3);break;case 2:z=wa(y);if(d.Kh)throw new T(1,1,7001,a,b);if(d.Mi)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return C=my(l.headers),y.return(ey(C,m,l.status,a,l.url,b))}})}
1182
- function my(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function ny(){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||"polyfill"in window.fetch||!window.AbortController)}P("shaka.net.HttpFetchPlugin",fy);fy.isSupported=ny;fy.parse=gy;var ky=window.fetch,iy=window.AbortController,ly=window.ReadableStream,hy=window.Headers;
1183
- ny()&&(zg("http",gy,2,!0),zg("https",gy,2,!0),zg("blob",gy,2,!0));function oy(){}
1184
- function py(a,b,c,d,e){var f=new qy,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 T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=ry(f);e(r);n=!0}};f.onload=function(r){var u=ry(f),w=f.response;try{d(Date.now()-g,r.loaded-h,0);var v=ey(u,w,f.status,a,f.responseURL,c);l(v)}catch(A){m(A)}};f.onerror=function(r){m(new T(1,
1176
+ function by(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;
1177
+ b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function cy(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 dy(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1178
+ function ey(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Ld:g.Ld},h=e.next())g.Ld=h.value,d.push(new Ki(g.Ld.start,g.Ld.end,function(k){return function(){return Oc(a.l,[f.replace("{start time}",String(k.Ld.Ch))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",Wx);var ay="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),$x={CAPT:"main",SUBT:"alternate",DESC:"main"};
1179
+ Di["application/vnd.ms-sstr+xml"]=function(){return new Wx};function fy(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"]};var g=null;try{g=Cc(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function gy(){}function hy(a,b,c,d,e){var f=new iy;Ng(b.headers).forEach(function(l,m){f.append(m,l)});var g=new jy,h={Kh:!1,Mi:!1};a=ky(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 pg(a,function(){h.Kh=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Vb(function(){h.Mi=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
1180
+ function ky(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,v,A,z,C;return O(function(y){switch(y.g){case 1:return h=ly,k=my,p=n=0,r=Date.now(),ta(y,2),G(y,h(a,c),4);case 4:l=y.h;f(ny(l.headers));if("HEAD"==c.method){y.B(5);break}u=l.clone().body.getReader();v=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;A=function(B){function D(){var F,J,L;return O(function(H){switch(H.g){case 1:return ta(H,2),G(H,u.read(),4);case 4:F=H.h;va(H,3);break;case 2:return wa(H),H.return();case 3:if(F.done){H.B(5);break}n+=
1181
+ F.value.byteLength;if(!g){H.B(5);break}return G(H,g(F.value),5);case 5:J=Date.now();if(100<J-r||F.done)L=F.done?0:v-n,e(J-r,n-p,L),p=n,r=J;F.done?B.close():(B.enqueue(F.value),D());I(H)}})}D()};new k({start:A});return G(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:va(y,3);break;case 2:z=wa(y);if(d.Kh)throw new T(1,1,7001,a,b);if(d.Mi)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return C=ny(l.headers),y.return(fy(C,m,l.status,a,l.url,b))}})}
1182
+ function ny(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function oy(){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||"polyfill"in window.fetch||!window.AbortController)}P("shaka.net.HttpFetchPlugin",gy);gy.isSupported=oy;gy.parse=hy;var ly=window.fetch,jy=window.AbortController,my=window.ReadableStream,iy=window.Headers;
1183
+ oy()&&(zg("http",hy,2,!0),zg("https",hy,2,!0),zg("blob",hy,2,!0));function py(){}
1184
+ function qy(a,b,c,d,e){var f=new ry,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 T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=sy(f);e(r);n=!0}};f.onload=function(r){var u=sy(f),w=f.response;try{d(Date.now()-g,r.loaded-h,0);var v=fy(u,w,f.status,a,f.responseURL,c);l(v)}catch(A){m(A)}};f.onerror=function(r){m(new T(1,
1185
1185
  1,1002,a,r,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(r){var u=Date.now();if(100<u-g||r.lengthComputable&&r.loaded==r.total)d(u-g,r.loaded-h,4==f.readyState?0:r.total-r.loaded),h=r.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new pg(k,function(){f.abort();return Promise.resolve()})}
1186
- function ry(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(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",oy);oy.parse=py;var qy=window.XMLHttpRequest;zg("http",py,1,!0);zg("https",py,1,!0);zg("blob",py,1,!0);function sy(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function ty(a){return a.R().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.$a+":"+a.Ja}function uy(a,b){return Ll(a.g.R(),a.g.$a,a.g.Ja,b.streaming.retryParameters)};function vy(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function wy(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}vy.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 xy(a){var b=this;this.s=a;this.j=new Map;this.i=new Lg(function(){return yy(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new vy}xy.prototype.destroy=function(){return this.i.destroy()};function zy(a,b,c){a.m=b;a.l=c}function yy(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
1187
- function Ay(a,b,c,d,e,f){Mg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return G(u,By(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Hb(h),l=new ch(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function Cy(a){return O(function(b){return 1==b.g?G(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
1188
- function By(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=Jg,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),G(g,d.promise,2);f=g.h;Pd(a.h,e);return g.return(f.data)})};function Dy(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new og;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Dy.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return G(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);I(b)})};
1189
- function Ey(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return G(g,b(f.key,f.value,f),2)}f.continue();I(g)})}})}Dy.prototype.store=function(){return this.h};Dy.prototype.promise=function(){return this.g};function Fy(a){this.h=a;this.g=[]}Fy.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Gy(a,b){return Hy(a,b,"readwrite")}function Hy(a,b,c){c=a.h.transaction([b],c);var d=new Dy(c,b);a.g.push(d);d.promise().then(function(){Pd(a.g,d)},function(){Pd(a.g,d)});return d};function Iy(a,b,c){this.h=new Fy(a);this.i=b;this.g=c}q=Iy.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Jy(this.i)};q.removeSegments=function(a,b){return Ky(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return G(d,Ly(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Ph(e)}))})};q.addManifests=function(){return Jy(this.g)};
1190
- q.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function My(a,b,c){a=Gy(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Gy(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()};q.removeManifests=function(a,b){return Ky(this,this.g,a,b)};
1191
- q.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return G(d,Ly(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Td(e)})))})};q.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Hy(a.h,a.g,"readonly"),c=new Map,G(d,Ey(b,function(e,f){var g;return O(function(h){if(1==h.g)return G(h,a.Td(f),2);g=h.h;c.set(e,g);I(h)})}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};q.Ph=function(a){return a};q.Td=function(a){return Promise.resolve(a)};
1192
- function Jy(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Gy(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={He:g.He},k=h.next())l=k.value,g.He=e.add(l),g.He.onsuccess=function(n){return function(){f.push(n.He.result)}}(g);return G(m,d.promise(),2)}return m.return(f)})};
1193
- function Ky(a,b,c,d){a=Gy(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Fe:e.Fe},f=c.next())e.Fe=f.value,b.delete(e.Fe).onsuccess=function(g){return function(){return d(g.Fe)}}(e);return a.promise()}
1194
- function Ly(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Hy(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Jd:h.Jd,Gd:h.Gd},l=k.next())h.Gd=l.value,h.Jd=e.get(h.Gd),h.Jd.onsuccess=function(n){return function(){void 0==n.Jd.result&&g.push(n.Gd);f[n.Gd]=n.Jd.result}}(h);return G(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Ny(a){this.g=new Fy(a)}Ny.prototype.destroy=function(){return this.g.destroy()};Ny.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Hy(a.g,"session-ids","readonly"),c=[],G(d,Ey(b,function(e,f){c.push(f)}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};Ny.prototype.add=function(a){var b=Gy(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1195
- Ny.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Gy(b.g,"session-ids"),G(d,Ey(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):G(d,c.promise(),0)})};function Oy(){this.g=new Map}Oy.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Oy.prototype.init=function(){var a=this;Py.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
1196
- function Qy(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ob:d,bb:f},bb:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function Ry(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ob:d,bb:f},e)})})}
1197
- function Sy(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function Ty(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Uy(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
1198
- function Vy(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Py,d.forEach(function(f){(f=f())&&b.push(f)})),G(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):G(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Wy(a,b){Py.set(a,b)}P("shaka.offline.StorageMuxer",Oy);Oy.unregister=function(a){Py.delete(a)};Oy.register=Wy;Oy.prototype.destroy=Oy.prototype.destroy;var Py=new Map;function Xy(){Iy.apply(this,arguments)}pa(Xy,Iy);Xy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=Gy(c.h,c.g);e=d.store();f=new og;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return G(g,Promise.all([d.promise(),f]),0)})};
1199
- Xy.prototype.Td=function(a){var b,c,d,e,f,g;return O(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=Yy(a.periods[c],e),b.push(f);return G(h,nu(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})})};
1200
- function Yy(a,b){Zy(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return $y(e,a.startTime,b)})}
1201
- function $y(a,b,c){var d=a.initSegmentUri?az(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,colorGamut: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=
1202
- az(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}}Xy.prototype.Ph=function(a){return{data:a.data}};
1203
- function az(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 T(2,9,9004,"Could not parse uri "+a);}
1204
- function Zy(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=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
1205
- f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function bz(){Iy.apply(this,arguments)}pa(bz,Iy);
1206
- bz.prototype.Td=function(a){var b,c,d,e,f,g;return O(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=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(cz(n,k.startTime,k.startTime+e));f=l;b.push(f)}return G(h,nu(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1186
+ function sy(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(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",py);py.parse=qy;var ry=window.XMLHttpRequest;zg("http",qy,1,!0);zg("https",qy,1,!0);zg("blob",qy,1,!0);function ty(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function uy(a){return a.R().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.$a+":"+a.Ja}function vy(a,b){return Ll(a.g.R(),a.g.$a,a.g.Ja,b.streaming.retryParameters)};function wy(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function xy(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}wy.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 yy(a){var b=this;this.s=a;this.j=new Map;this.i=new Lg(function(){return zy(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new wy}yy.prototype.destroy=function(){return this.i.destroy()};function Ay(a,b,c){a.m=b;a.l=c}function zy(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
1187
+ function By(a,b,c,d,e,f){Mg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return G(u,Cy(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Hb(h),l=new ch(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function Dy(a){return O(function(b){return 1==b.g?G(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
1188
+ function Cy(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=Jg,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),G(g,d.promise,2);f=g.h;Pd(a.h,e);return g.return(f.data)})};function Ey(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new og;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Ey.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return G(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);I(b)})};
1189
+ function Fy(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return G(g,b(f.key,f.value,f),2)}f.continue();I(g)})}})}Ey.prototype.store=function(){return this.h};Ey.prototype.promise=function(){return this.g};function Gy(a){this.h=a;this.g=[]}Gy.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Hy(a,b){return Iy(a,b,"readwrite")}function Iy(a,b,c){c=a.h.transaction([b],c);var d=new Ey(c,b);a.g.push(d);d.promise().then(function(){Pd(a.g,d)},function(){Pd(a.g,d)});return d};function Jy(a,b,c){this.h=new Gy(a);this.i=b;this.g=c}q=Jy.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Ky(this.i)};q.removeSegments=function(a,b){return Ly(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return G(d,My(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Ph(e)}))})};q.addManifests=function(){return Ky(this.g)};
1190
+ q.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function Ny(a,b,c){a=Hy(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Hy(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()};q.removeManifests=function(a,b){return Ly(this,this.g,a,b)};
1191
+ q.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return G(d,My(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Td(e)})))})};q.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Iy(a.h,a.g,"readonly"),c=new Map,G(d,Fy(b,function(e,f){var g;return O(function(h){if(1==h.g)return G(h,a.Td(f),2);g=h.h;c.set(e,g);I(h)})}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};q.Ph=function(a){return a};q.Td=function(a){return Promise.resolve(a)};
1192
+ function Ky(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Hy(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={He:g.He},k=h.next())l=k.value,g.He=e.add(l),g.He.onsuccess=function(n){return function(){f.push(n.He.result)}}(g);return G(m,d.promise(),2)}return m.return(f)})};
1193
+ function Ly(a,b,c,d){a=Hy(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Fe:e.Fe},f=c.next())e.Fe=f.value,b.delete(e.Fe).onsuccess=function(g){return function(){return d(g.Fe)}}(e);return a.promise()}
1194
+ function My(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Iy(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Jd:h.Jd,Gd:h.Gd},l=k.next())h.Gd=l.value,h.Jd=e.get(h.Gd),h.Jd.onsuccess=function(n){return function(){void 0==n.Jd.result&&g.push(n.Gd);f[n.Gd]=n.Jd.result}}(h);return G(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Oy(a){this.g=new Gy(a)}Oy.prototype.destroy=function(){return this.g.destroy()};Oy.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Iy(a.g,"session-ids","readonly"),c=[],G(d,Fy(b,function(e,f){c.push(f)}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};Oy.prototype.add=function(a){var b=Hy(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1195
+ Oy.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Hy(b.g,"session-ids"),G(d,Fy(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):G(d,c.promise(),0)})};function Py(){this.g=new Map}Py.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Py.prototype.init=function(){var a=this;Qy.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
1196
+ function Ry(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ob:d,bb:f},bb:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function Sy(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ob:d,bb:f},e)})})}
1197
+ function Ty(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function Uy(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Vy(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
1198
+ function Wy(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Qy,d.forEach(function(f){(f=f())&&b.push(f)})),G(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):G(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Xy(a,b){Qy.set(a,b)}P("shaka.offline.StorageMuxer",Py);Py.unregister=function(a){Qy.delete(a)};Py.register=Xy;Py.prototype.destroy=Py.prototype.destroy;var Qy=new Map;function Yy(){Jy.apply(this,arguments)}pa(Yy,Jy);Yy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=Hy(c.h,c.g);e=d.store();f=new og;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return G(g,Promise.all([d.promise(),f]),0)})};
1199
+ Yy.prototype.Td=function(a){var b,c,d,e,f,g;return O(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=Zy(a.periods[c],e),b.push(f);return G(h,nu(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})})};
1200
+ function Zy(a,b){$y(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return az(e,a.startTime,b)})}
1201
+ function az(a,b,c){var d=a.initSegmentUri?bz(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,colorGamut: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=
1202
+ bz(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}}Yy.prototype.Ph=function(a){return{data:a.data}};
1203
+ function bz(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 T(2,9,9004,"Could not parse uri "+a);}
1204
+ function $y(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=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
1205
+ f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function cz(){Jy.apply(this,arguments)}pa(cz,Jy);
1206
+ cz.prototype.Td=function(a){var b,c,d,e,f,g;return O(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=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(dz(n,k.startTime,k.startTime+e));f=l;b.push(f)}return G(h,nu(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1207
1207
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
1208
- function cz(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,colorGamut: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,
1209
- 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 dz(){Iy.apply(this,arguments)}pa(dz,Iy);q=dz.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return My(this,a,b)};q.Td=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ez(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=ez.prototype;
1210
- q.init=function(){var a=this,b=new og,c=!1,d=new Vb(function(){c=!0;b.reject(new T(2,9,9017))});d.X(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 Xy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new bz(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1211
- new bz(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new dz(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Ny(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["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 T(2,
1208
+ function dz(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,colorGamut: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,
1209
+ 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 ez(){Jy.apply(this,arguments)}pa(ez,Jy);q=ez.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return Ny(this,a,b)};q.Td=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function fz(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=fz.prototype;
1210
+ q.init=function(){var a=this,b=new og,c=!1,d=new Vb(function(){c=!0;b.reject(new T(2,9,9017))});d.X(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 Yy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new cz(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1211
+ new cz(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new ez(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Oy(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["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 T(2,
1212
1212
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return G(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return G(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return G(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return G(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return G(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),I(b)}})};
1213
1213
  q.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};q.getEmeSessionCell=function(){return this.m};
1214
- q.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return G(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return G(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return G(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return G(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),G(b,fz(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,G(b,a.init(),0)}})};
1215
- function fz(){var a=new og,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}Wy("idb",function(){return ic()||ac()||!window.indexedDB?null:new ez});function gz(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}gz.prototype.Ob=function(){return this.i};gz.prototype.bb=function(){return this.h};gz.prototype.key=function(){return this.l};gz.prototype.toString=function(){return this.j};
1216
- function hz(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 gz(b,c,d,Number(a[4])):null};function iz(a,b){this.h=a;this.g=b}
1217
- function jz(a,b){var c=new Dk(null,0);c.vb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=kz(a,d,e,c);e=b.streams.filter(function(l){return l.type==Uc}).map(function(l){return lz(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return lz(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
1214
+ q.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return G(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return G(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return G(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return G(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),G(b,gz(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,G(b,a.init(),0)}})};
1215
+ function gz(){var a=new og,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}Xy("idb",function(){return ic()||ac()||!window.indexedDB?null:new fz});function hz(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}hz.prototype.Ob=function(){return this.i};hz.prototype.bb=function(){return this.h};hz.prototype.key=function(){return this.l};hz.prototype.toString=function(){return this.j};
1216
+ function iz(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 hz(b,c,d,Number(a[4])):null};function jz(a,b){this.h=a;this.g=b}
1217
+ function kz(a,b){var c=new Dk(null,0);c.vb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=lz(a,d,e,c);e=b.streams.filter(function(l){return l.type==Uc}).map(function(l){return mz(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return mz(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
1218
1218
  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,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1}}
1219
- function kz(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(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=t(b);for(e=b.next();!e.done;e=
1220
- b.next())for(e=e.value,g=lz(a,e,d),h=t(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=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=lz(a,e,d),g=t(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}
1221
- function lz(a,b,c){var d=b.segments.map(function(e){return mz(a,e,b)});c.le(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Zk(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,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1219
+ function lz(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(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=t(b);for(e=b.next();!e.done;e=
1220
+ b.next())for(e=e.value,g=mz(a,e,d),h=t(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=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=mz(a,e,d),g=t(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}
1221
+ function mz(a,b,c){var d=b.segments.map(function(e){return nz(a,e,b)});c.le(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Zk(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,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1222
1222
  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([we(b.mimeType,b.codecs)])}}
1223
- function mz(a,b,c){var d=new gz("segment",a.h,a.g,b.dataKey);a=new Ki(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?nz(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 nz(a,b){var c=new gz("segment",a.h,a.g,b);return new Ii(function(){return[c.toString()]},0,null)};function oz(){this.g=null}q=oz.prototype;q.configure=function(){};
1224
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=hz(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Oy;ua(m,2);return G(m,e.init(),4);case 4:return G(m,Sy(e,d.Ob(),d.bb()),5);case 5:return f=m.h,G(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new iz(d.Ob(),d.bb()),l=jz(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return xa(m),G(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
1223
+ function nz(a,b,c){var d=new hz("segment",a.h,a.g,b.dataKey);a=new Ki(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?oz(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 oz(a,b){var c=new hz("segment",a.h,a.g,b);return new Ii(function(){return[c.toString()]},0,null)};function pz(){this.g=null}q=pz.prototype;q.configure=function(){};
1224
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=iz(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Py;ua(m,2);return G(m,e.init(),4);case 4:return G(m,Ty(e,d.Ob(),d.bb()),5);case 5:return f=m.h,G(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new jz(d.Ob(),d.bb()),l=kz(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return xa(m),G(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
1225
1225
  q.update=function(){};
1226
- q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new Oy,ta(m,2,3),G(m,e.init(),5);case 5:return G(m,Sy(e,d.Ob(),d.bb()),6);case 6:return f=m.h,G(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.B(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),G(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.B(3)}})};
1227
- q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};Di["application/x-offline-manifest"]=function(){return new oz};function pz(){}function qz(a){var b=hz(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=sg(a)):a=b&&"segment"==b.g?rz(b.key(),b):qg(new T(2,1,9004,a));return a}
1228
- function rz(a,b){var c=new Oy;return sg(void 0).Ta(function(){return c.init()}).Ta(function(){return Sy(c,b.Ob(),b.bb())}).Ta(function(d){return d.getSegments([b.key()])}).Ta(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}P("shaka.offline.OfflineScheme",pz);pz.plugin=qz;zg("offline",qz);function sz(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,tz(w.info,p)){w.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=uz(a,b,g);return G(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
1229
- function uz(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Lh({hc:b,onError:function(){},vf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),G(f,Th(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return wa(f),G(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],G(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
1230
- h.g)return ta(h,2),G(h,ei(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);I(h)})})),6);case 6:return G(f,d.destroy(),7);case 7:return f.return(e)}})}function tz(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Qd(a.audioCapabilities,b.audioCapabilities,c)&&Qd(a.videoCapabilities,b.videoCapabilities,c)};function vz(a,b,c){var d=b.presentationTimeline.getDuration();b=wz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function xz(a,b){var c=jz(new iz(a.Ob(),a.bb()),b),d=b.appMetadata||{};c=wz(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}}
1231
- function wz(a){var b=[],c=Hf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(yf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(zf(c.value));return b};function yz(){this.g={}}function zz(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 Az(a,b){a.g[b.id]=b.bandwidth||2048}function Bz(a,b){a=a.g[b];null==a&&(a=0);return a};function Cz(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Gb()):(this.h=Fm(),this.g=new yg);this.i=[];this.j=[];var c=!a;this.l=new Lg(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return G(k,Promise.all(b.j.map(function(l){return yy(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return G(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return G(k,b.g.destroy(),4);
1232
- case 4:b.h=null,b.g=null,I(k)}})})}function Dz(){if(Wb())a:{var a=t(Py.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}q=Cz.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=wm(a,b));return Jm(this.h,a)};q.getConfiguration=function(){var a=Fm();Jm(a,this.h,Fm());return a};q.Gb=function(){return this.g};
1233
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new xy(this.g);this.j.push(f);b=Ez(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.B(2):G(h,dn(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=Ci(a,c||null);return h.return(g())})},e,f);b=new pg(b,function(){return yy(f)});b.finally(function(){Pd(d.j,f)});return Fz(this,b)};
1234
- function Ez(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,v,A,z,C;return O(function(y){switch(y.g){case 1:return Gz(),h=g=null,k=new Oy,n=m=l=null,ta(y,2,3),G(y,d(),5);case 5:return g=y.h,G(y,Hz(a,b,g,e),6);case 6:p=y.h;Iz(a);r=!p.presentationTimeline.U()&&!p.presentationTimeline.Mc();if(!r)throw new T(2,9,9005,b);return G(y,a.cd(p,function(B){n=n||B},e),7);case 7:h=y.h;Iz(a);if(n)throw n;return G(y,Jz(p,h,e),8);case 8:return G(y,k.init(),9);case 9:return Iz(a),G(y,Qy(k),10);case 10:return l=y.h,Iz(a),u=Kz(h,
1235
- p,b,c,e,f),w=u.fk,v=u.yh,G(y,l.bb.addManifests([w]),11);case 11:A=y.h;Iz(a);m=A[0];Iz(a);if(n)throw n;return G(y,Lz(a,v,m,w,f,e,l.bb,p,h),12);case 12:return Iz(a),Mz(p,w,h,e),G(y,l.bb.updateManifest(m,w),13);case 13:return Iz(a),z=new gz("manifest",l.path.Ob,l.path.bb,m),y.return(xz(z,w));case 3:return xa(y),G(y,k.destroy(),14);case 14:if(!g){y.B(15);break}return G(y,g.stop(),15);case 15:if(!h){y.B(17);break}return G(y,h.destroy(),17);case 17:ya(y,0);break;case 2:C=wa(y);if(null==m){y.B(19);break}return G(y,
1236
- Nz(m),19);case 19:throw n||C;}})}
1237
- function Lz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,w,v,A,z;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(y,B){var D,F,J,L,H,E,K;return O(function(M){if(1==M.g){D={};F=t(y);for(J=F.next();!J.done;D={Cc:D.Cc},J=F.next())D.Cc=J.value,L=uy(D.Cc,f),H=D.Cc.i,E=D.Cc.h,K=function(N){return function(Q){var U,R,ca;return O(function(fa){if(1==fa.g)return G(fa,g.addSegments([{data:Q}]),2);U=fa.h;Iz(a);R=N.Cc.g;ca=ty(R);l[ca]=U[0];m+=Q.byteLength;I(fa)})}}(D),Ay(e,D.Cc.groupId,L,H,E,K);return G(M,Cy(e),
1238
- 2)}if(!B)return M.B(0);Iz(a);Mz(h,d,k,f);return G(M,g.updateManifest(c,d),0)})};p=!1;ta(C,2);if(!Oz(h)||!p||Pz(h)){C.B(4);break}return G(C,n(b.filter(function(y){return y.h}),!0),5);case 5:return Iz(a),b=b.filter(function(y){return!y.h}),r=l,u=m,l={},m=0,G(C,Qz(g,c,d,r,u,function(){return Iz(a)}),6);case 6:Iz(a);case 4:if(p){C.B(7);break}return G(C,n(b,!1),8);case 8:return Iz(a),w=l,v=m,l={},m=0,G(C,Qz(g,c,d,w,v,function(){return Iz(a)}),9);case 9:Iz(a);case 7:va(C,0);break;case 2:return A=wa(C),
1239
- z=Object.values(l),G(C,g.removeSegments(z,function(){}),10);case 10:throw A;}})}function Nz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new Oy,G(f,b.init(),2);case 2:return G(f,Qy(b),3);case 3:return c=f.h,d=new gz("manifest",c.path.Ob,c.path.bb,a),G(f,b.destroy(),4);case 4:return e=new Cz,G(f,e.remove(d.toString()),0)}})}
1240
- function Qz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,v;return O(function(A){switch(A.g){case 1:g=!1;ta(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
1241
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return G(A,a.updateManifest(b,c),4);case 4:g=!0;f();va(A,0);break;case 2:return w=wa(A),G(A,Nz(b),5);case 5:if(g){A.B(6);break}v=Object.values(d);return G(A,a.removeSegments(v,function(){}),6);case 6:throw w;}})}
1242
- function Jz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N;return O(function(Q){switch(Q.g){case 1:return d={width:Infinity,height:Infinity},df(a,c.restrictions,d),G(Q,hf(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;bf(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(yf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,e.push(zf(r));
1226
+ q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new Py,ta(m,2,3),G(m,e.init(),5);case 5:return G(m,Ty(e,d.Ob(),d.bb()),6);case 6:return f=m.h,G(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.B(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),G(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.B(3)}})};
1227
+ q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};Di["application/x-offline-manifest"]=function(){return new pz};function qz(){}function rz(a){var b=iz(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=sg(a)):a=b&&"segment"==b.g?sz(b.key(),b):qg(new T(2,1,9004,a));return a}
1228
+ function sz(a,b){var c=new Py;return sg(void 0).Ta(function(){return c.init()}).Ta(function(){return Ty(c,b.Ob(),b.bb())}).Ta(function(d){return d.getSegments([b.key()])}).Ta(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}P("shaka.offline.OfflineScheme",qz);qz.plugin=rz;zg("offline",rz);function tz(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,uz(w.info,p)){w.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=vz(a,b,g);return G(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
1229
+ function vz(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Lh({hc:b,onError:function(){},vf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),G(f,Th(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return wa(f),G(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],G(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
1230
+ h.g)return ta(h,2),G(h,ei(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);I(h)})})),6);case 6:return G(f,d.destroy(),7);case 7:return f.return(e)}})}function uz(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Qd(a.audioCapabilities,b.audioCapabilities,c)&&Qd(a.videoCapabilities,b.videoCapabilities,c)};function wz(a,b,c){var d=b.presentationTimeline.getDuration();b=xz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function yz(a,b){var c=kz(new jz(a.Ob(),a.bb()),b),d=b.appMetadata||{};c=xz(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}}
1231
+ function xz(a){var b=[],c=Hf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(yf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(zf(c.value));return b};function zz(){this.g={}}function Az(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 Bz(a,b){a.g[b.id]=b.bandwidth||2048}function Cz(a,b){a=a.g[b];null==a&&(a=0);return a};function Dz(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Gb()):(this.h=Fm(),this.g=new yg);this.i=[];this.j=[];var c=!a;this.l=new Lg(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return G(k,Promise.all(b.j.map(function(l){return zy(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return G(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return G(k,b.g.destroy(),4);
1232
+ case 4:b.h=null,b.g=null,I(k)}})})}function Ez(){if(Wb())a:{var a=t(Qy.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}q=Dz.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=wm(a,b));return Jm(this.h,a)};q.getConfiguration=function(){var a=Fm();Jm(a,this.h,Fm());return a};q.Gb=function(){return this.g};
1233
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new yy(this.g);this.j.push(f);b=Fz(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.B(2):G(h,dn(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=Ci(a,c||null);return h.return(g())})},e,f);b=new pg(b,function(){return zy(f)});b.finally(function(){Pd(d.j,f)});return Gz(this,b)};
1234
+ function Fz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,v,A,z,C;return O(function(y){switch(y.g){case 1:return Hz(),h=g=null,k=new Py,n=m=l=null,ta(y,2,3),G(y,d(),5);case 5:return g=y.h,G(y,Iz(a,b,g,e),6);case 6:p=y.h;Jz(a);r=!p.presentationTimeline.U()&&!p.presentationTimeline.Nc();if(!r)throw new T(2,9,9005,b);return G(y,a.dd(p,function(B){n=n||B},e),7);case 7:h=y.h;Jz(a);if(n)throw n;return G(y,Kz(p,h,e),8);case 8:return G(y,k.init(),9);case 9:return Jz(a),G(y,Ry(k),10);case 10:return l=y.h,Jz(a),u=Lz(h,
1235
+ p,b,c,e,f),w=u.fk,v=u.yh,G(y,l.bb.addManifests([w]),11);case 11:A=y.h;Jz(a);m=A[0];Jz(a);if(n)throw n;return G(y,Mz(a,v,m,w,f,e,l.bb,p,h),12);case 12:return Jz(a),Nz(p,w,h,e),G(y,l.bb.updateManifest(m,w),13);case 13:return Jz(a),z=new hz("manifest",l.path.Ob,l.path.bb,m),y.return(yz(z,w));case 3:return xa(y),G(y,k.destroy(),14);case 14:if(!g){y.B(15);break}return G(y,g.stop(),15);case 15:if(!h){y.B(17);break}return G(y,h.destroy(),17);case 17:ya(y,0);break;case 2:C=wa(y);if(null==m){y.B(19);break}return G(y,
1236
+ Oz(m),19);case 19:throw n||C;}})}
1237
+ function Mz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,w,v,A,z;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(y,B){var D,F,J,L,H,E,K;return O(function(M){if(1==M.g){D={};F=t(y);for(J=F.next();!J.done;D={Ec:D.Ec},J=F.next())D.Ec=J.value,L=vy(D.Ec,f),H=D.Ec.i,E=D.Ec.h,K=function(N){return function(Q){var U,R,ca;return O(function(fa){if(1==fa.g)return G(fa,g.addSegments([{data:Q}]),2);U=fa.h;Jz(a);R=N.Ec.g;ca=uy(R);l[ca]=U[0];m+=Q.byteLength;I(fa)})}}(D),By(e,D.Ec.groupId,L,H,E,K);return G(M,Dy(e),
1238
+ 2)}if(!B)return M.B(0);Jz(a);Nz(h,d,k,f);return G(M,g.updateManifest(c,d),0)})};p=!1;ta(C,2);if(!Pz(h)||!p||Qz(h)){C.B(4);break}return G(C,n(b.filter(function(y){return y.h}),!0),5);case 5:return Jz(a),b=b.filter(function(y){return!y.h}),r=l,u=m,l={},m=0,G(C,Rz(g,c,d,r,u,function(){return Jz(a)}),6);case 6:Jz(a);case 4:if(p){C.B(7);break}return G(C,n(b,!1),8);case 8:return Jz(a),w=l,v=m,l={},m=0,G(C,Rz(g,c,d,w,v,function(){return Jz(a)}),9);case 9:Jz(a);case 7:va(C,0);break;case 2:return A=wa(C),
1239
+ z=Object.values(l),G(C,g.removeSegments(z,function(){}),10);case 10:throw A;}})}function Oz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new Py,G(f,b.init(),2);case 2:return G(f,Ry(b),3);case 3:return c=f.h,d=new hz("manifest",c.path.Ob,c.path.bb,a),G(f,b.destroy(),4);case 4:return e=new Dz,G(f,e.remove(d.toString()),0)}})}
1240
+ function Rz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,v;return O(function(A){switch(A.g){case 1:g=!1;ta(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
1241
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return G(A,a.updateManifest(b,c),4);case 4:g=!0;f();va(A,0);break;case 2:return w=wa(A),G(A,Oz(b),5);case 5:if(g){A.B(6);break}v=Object.values(d);return G(A,a.removeSegments(v,function(){}),6);case 6:throw w;}})}
1242
+ function Kz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y,B,D,F,J,L,H,E,K,M,N;return O(function(Q){switch(Q.g){case 1:return d={width:Infinity,height:Infinity},df(a,c.restrictions,d),G(Q,hf(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;bf(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(yf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,e.push(zf(r));
1243
1243
  u=t(a.imageStreams);for(w=u.next();!w.done;w=u.next())v=w.value,e.push(Af(v));return G(Q,c.offline.trackSelectionCallback(e),3);case 3:A=Q.h;z=a.presentationTimeline.getDuration();C=0;y=t(A);for(B=y.next();!B.done;B=y.next())D=B.value,F=D.bandwidth*z/8,C+=F;ta(Q,4);return G(Q,c.offline.downloadSizeCallback(C),6);case 6:J=Q.h;if(!J)throw new T(2,9,9014);va(Q,5);break;case 4:L=wa(Q);if(L instanceof T)throw L;throw new T(2,9,9015);case 5:H=new Set;E=new Set;K=new Set;M=t(A);for(B=M.next();!B.done;B=
1244
- M.next())N=B.value,"variant"==N.type&&H.add(N.id),"text"==N.type&&E.add(N.id),"image"==N.type&&K.add(N.id);a.variants=a.variants.filter(function(U){return H.has(U.id)});a.textStreams=a.textStreams.filter(function(U){return E.has(U.id)});a.imageStreams=a.imageStreams.filter(function(U){return K.has(U.id)});Rz(a);I(Q)}})}
1245
- function Kz(a,b,c,d,e,f){var g=vz(c,b,d),h=e.offline.progressCallback;zy(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&ai(a,"cenc",r)});var k=Oz(b)&&!Pz(b),l=null;k&&(l=Sz.get(a.g.keySystem));for(var m=new yz,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Az(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())zz(m,n.value);m=Tz(f,m,b,e);f=m.streams;m=m.yh;p=a.g;n=e.offline.usePersistentLicense;
1246
- p&&n&&(p.initData=[]);return{fk:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Xd(),streams:f,sessionIds:n?ji(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},yh:m}}function Oz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1247
- function Pz(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 Mz(a,b,c,d){b.expiration=c.Xd();c=ji(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Oz(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}q.remove=function(a){return Uz(this,Vz(this,a))};
1248
- function Vz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Gz();c=hz(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new Oy;ua(k,2);return G(k,e.init(),4);case 4:return G(k,Sy(e,d.Ob(),d.bb()),5);case 5:return f=k.h,G(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],G(k,Promise.all([Wz(a,h,e),Xz(f,d,h)]),2);case 2:return xa(k),G(k,e.destroy(),8);case 8:ya(k,0)}})}
1249
- function Yz(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:we(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:we(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Wz(a,b,c){return O(function(d){return G(d,Zz(a.g,a.h.drm,c,b),0)})}
1250
- function Xz(a,b,c){function d(){}var e=$z(c);xz(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ak=function(){return Uz(this,aA(this))};
1251
- function aA(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return Gz(),b=a.g,c=a.h.drm,d=new Oy,e=!1,ua(n,2),G(n,d.init(),4);case 4:f=[],Ty(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return G(n,k.getAll(),8);case 8:return l=n.h,G(n,sz(c,b,l),9);case 9:return m=n.h,G(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return xa(n),G(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
1252
- q.list=function(){return Uz(this,bA())};function bA(){var a,b,c;return O(function(d){switch(d.g){case 1:return Gz(),a=[],b=new Oy,ua(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),Ry(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return G(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=xz(new gz("manifest",e.Ob,e.bb,l),k);a.push(k)});I(h)})})}),G(d,c,2);case 2:return xa(d),G(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
1253
- function Hz(a,b,c,d){var e,f,g,h,k;return O(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},
1254
- onMetadata:function(){},disableStream:function(){}},c.configure(d.manifest),Iz(a),G(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Iz(a),k=cA(h),G(l,Promise.all(hb(k,function(m){return m.createSegmentIndex()})),3);Iz(a);if(e)throw e;return l.return(h)})}
1255
- q.cd=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Lh({hc:d.g,onError:b,vf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),G(f,Qh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?G(f,ci(e),3):f.return(e)})};
1256
- function Tz(a,b,c,d){var e=new Map,f=cA(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=dA(a,b,c,h,d,e);g.set(h.id,k)}a=t(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()),yh:Array.from(e.values())}}
1257
- function dA(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,colorGamut:d.colorGamut,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,
1258
- audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;eA(d,c.presentationTimeline.Hb(),function(l){var m=ty(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Bz(b,d.id)*p;p=wy(a.g,p);f.set(m,new sy(l,p,k,!1))}l.ma&&(n=ty(l.ma),f.has(n)||(p=.5*Bz(b,d.id),p=wy(a.g,p),f.set(n,new sy(l.ma,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
1259
- initSegmentKey:n?0:null,startTime:l.startTime,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 eA(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 Iz(a){if(a.l.g)throw new T(2,9,7001);}function Gz(){if(!Dz())throw new T(2,9,9E3);}
1260
- function Uz(a,b){return O(function(c){if(1==c.g)return a.i.push(b),ua(c,2),G(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);Pd(a.i,b);return ya(c,0)})}function Fz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Pd(a.i,c)})}function $z(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(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)}
1261
- function Zz(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Uy(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Yz(d,!1),videoCapabilities:Yz(d,!0)}});return G(h,sz(b,a,f),2)}return 3!=h.g?(g=h.h,G(h,e.remove(g),3)):G(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1262
- function cA(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(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}
1263
- function Rz(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=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}P("shaka.offline.Storage",Cz);Cz.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new Oy,ua(b,2),G(b,Vy(a),2)):5!=b.g?(xa(b),G(b,a.destroy(),5)):ya(b,0)})};
1264
- Cz.prototype.list=Cz.prototype.list;Cz.prototype.removeEmeSessions=Cz.prototype.Ak;Cz.prototype.remove=Cz.prototype.remove;Cz.prototype.store=Cz.prototype.store;Cz.prototype.getNetworkingEngine=Cz.prototype.Gb;Cz.prototype.getConfiguration=Cz.prototype.getConfiguration;Cz.prototype.configure=Cz.prototype.configure;Cz.prototype.destroy=Cz.prototype.destroy;Cz.support=Dz;
1265
- var Sz=(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");Jp.offline=Dz;function fA(){}function gA(){for(var a=t(hA),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Va("Error installing polyfill!",c)}}}function iA(a,b){a={priority:b||0,callback:a};for(b=0;b<hA.length;b++)if(hA[b].priority<a.priority){hA.splice(b,0,a);return}hA.push(a)}P("shaka.polyfill",fA);fA.register=iA;fA.installAll=gA;var hA=[];function jA(){this.g=new kA}function lA(){window.AbortController||(window.AbortController=jA,window.AbortSignal=kA)}jA.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 S("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};ea.Object.defineProperties(jA.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});fA.AbortController=jA;jA.install=lA;
1266
- function kA(){gb.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(kA,gb);ea.Object.defineProperties(kA.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});iA(lA);function mA(){}function nA(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())oA(b.value)}function oA(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)}})}fA.Aria=mA;mA.install=nA;iA(nA);function pA(){}function qA(){rA()}fA.EncryptionScheme=pA;pA.install=qA;iA(qA,-2);function sA(){}
1267
- function tA(){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}}),
1268
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",uA);document.addEventListener("webkitfullscreenerror",uA);document.addEventListener("mozfullscreenchange",uA);document.addEventListener("mozfullscreenerror",uA);document.addEventListener("MSFullscreenChange",uA);document.addEventListener("MSFullscreenError",uA)}}
1269
- function uA(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)}fA.Fullscreen=sA;sA.install=tA;iA(tA);function vA(){}function wA(){var a=!0;!ic()||ic()&&qc()||ic()&&bc("Fuchsia")||(a=!1);if(jc()||mc()||lc()||fc()||cc()||bc("PC=EOS")||nc())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),xA=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=yA)}
1270
- function yA(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.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=Xb(e),!f)||d&&(g=d.contentType,h=Xb(g),!h))return p.return(b)}else return p.return(b);p.B(2);break}if(!Wb())return p.return(b);if(!c){p.B(3);break}return G(p,zA(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var r=d.contentType;ic()&&d.spatialRendering&&
1271
- (r+="; spatialRendering=true");l=wd(r);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return G(p,AA(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
1272
- function zA(a){var b,c;return O(function(d){return 1==d.g?ic()?G(d,BA(a),3):cc()?(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(wd(b))):d.B(2):2!=d.g?(c=d.h,d.return(c)):d.return(wd(a.contentType))})}
1273
- function AA(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},cc()&&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],
1244
+ M.next())N=B.value,"variant"==N.type&&H.add(N.id),"text"==N.type&&E.add(N.id),"image"==N.type&&K.add(N.id);a.variants=a.variants.filter(function(U){return H.has(U.id)});a.textStreams=a.textStreams.filter(function(U){return E.has(U.id)});a.imageStreams=a.imageStreams.filter(function(U){return K.has(U.id)});Sz(a);I(Q)}})}
1245
+ function Lz(a,b,c,d,e,f){var g=wz(c,b,d),h=e.offline.progressCallback;Ay(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&ai(a,"cenc",r)});var k=Pz(b)&&!Qz(b),l=null;k&&(l=Tz.get(a.g.keySystem));for(var m=new zz,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Bz(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Az(m,n.value);m=Uz(f,m,b,e);f=m.streams;m=m.yh;p=a.g;n=e.offline.usePersistentLicense;
1246
+ p&&n&&(p.initData=[]);return{fk:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Xd(),streams:f,sessionIds:n?ji(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},yh:m}}function Pz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1247
+ function Qz(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 Nz(a,b,c,d){b.expiration=c.Xd();c=ji(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Pz(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}q.remove=function(a){return Vz(this,Wz(this,a))};
1248
+ function Wz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Hz();c=iz(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new Py;ua(k,2);return G(k,e.init(),4);case 4:return G(k,Ty(e,d.Ob(),d.bb()),5);case 5:return f=k.h,G(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],G(k,Promise.all([Xz(a,h,e),Yz(f,d,h)]),2);case 2:return xa(k),G(k,e.destroy(),8);case 8:ya(k,0)}})}
1249
+ function Zz(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:we(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:we(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Xz(a,b,c){return O(function(d){return G(d,$z(a.g,a.h.drm,c,b),0)})}
1250
+ function Yz(a,b,c){function d(){}var e=aA(c);yz(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ak=function(){return Vz(this,bA(this))};
1251
+ function bA(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return Hz(),b=a.g,c=a.h.drm,d=new Py,e=!1,ua(n,2),G(n,d.init(),4);case 4:f=[],Uy(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return G(n,k.getAll(),8);case 8:return l=n.h,G(n,tz(c,b,l),9);case 9:return m=n.h,G(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return xa(n),G(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
1252
+ q.list=function(){return Vz(this,cA())};function cA(){var a,b,c;return O(function(d){switch(d.g){case 1:return Hz(),a=[],b=new Py,ua(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),Sy(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return G(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=yz(new hz("manifest",e.Ob,e.bb,l),k);a.push(k)});I(h)})})}),G(d,c,2);case 2:return xa(d),G(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
1253
+ function Iz(a,b,c,d){var e,f,g,h,k;return O(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},
1254
+ onMetadata:function(){},disableStream:function(){}},c.configure(d.manifest),Jz(a),G(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Jz(a),k=dA(h),G(l,Promise.all(hb(k,function(m){return m.createSegmentIndex()})),3);Jz(a);if(e)throw e;return l.return(h)})}
1255
+ q.dd=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Lh({hc:d.g,onError:b,vf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),G(f,Qh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?G(f,ci(e),3):f.return(e)})};
1256
+ function Uz(a,b,c,d){var e=new Map,f=dA(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=eA(a,b,c,h,d,e);g.set(h.id,k)}a=t(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()),yh:Array.from(e.values())}}
1257
+ function eA(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,colorGamut:d.colorGamut,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,
1258
+ audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;fA(d,c.presentationTimeline.Hb(),function(l){var m=uy(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Cz(b,d.id)*p;p=xy(a.g,p);f.set(m,new ty(l,p,k,!1))}l.ma&&(n=uy(l.ma),f.has(n)||(p=.5*Cz(b,d.id),p=xy(a.g,p),f.set(n,new ty(l.ma,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
1259
+ initSegmentKey:n?0:null,startTime:l.startTime,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 fA(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 Jz(a){if(a.l.g)throw new T(2,9,7001);}function Hz(){if(!Ez())throw new T(2,9,9E3);}
1260
+ function Vz(a,b){return O(function(c){if(1==c.g)return a.i.push(b),ua(c,2),G(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);Pd(a.i,b);return ya(c,0)})}function Gz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Pd(a.i,c)})}function aA(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(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)}
1261
+ function $z(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Vy(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Zz(d,!1),videoCapabilities:Zz(d,!0)}});return G(h,tz(b,a,f),2)}return 3!=h.g?(g=h.h,G(h,e.remove(g),3)):G(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1262
+ function dA(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(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}
1263
+ function Sz(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=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}P("shaka.offline.Storage",Dz);Dz.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new Py,ua(b,2),G(b,Wy(a),2)):5!=b.g?(xa(b),G(b,a.destroy(),5)):ya(b,0)})};
1264
+ Dz.prototype.list=Dz.prototype.list;Dz.prototype.removeEmeSessions=Dz.prototype.Ak;Dz.prototype.remove=Dz.prototype.remove;Dz.prototype.store=Dz.prototype.store;Dz.prototype.getNetworkingEngine=Dz.prototype.Gb;Dz.prototype.getConfiguration=Dz.prototype.getConfiguration;Dz.prototype.configure=Dz.prototype.configure;Dz.prototype.destroy=Dz.prototype.destroy;Dz.support=Ez;
1265
+ var Tz=(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");Jp.offline=Ez;function gA(){}function hA(){for(var a=t(iA),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Va("Error installing polyfill!",c)}}}function jA(a,b){a={priority:b||0,callback:a};for(b=0;b<iA.length;b++)if(iA[b].priority<a.priority){iA.splice(b,0,a);return}iA.push(a)}P("shaka.polyfill",gA);gA.register=jA;gA.installAll=hA;var iA=[];function kA(){this.g=new lA}function mA(){window.AbortController||(window.AbortController=kA,window.AbortSignal=lA)}kA.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 S("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};ea.Object.defineProperties(kA.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});gA.AbortController=kA;kA.install=mA;
1266
+ function lA(){gb.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(lA,gb);ea.Object.defineProperties(lA.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});jA(mA);function nA(){}function oA(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())pA(b.value)}function pA(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)}})}gA.Aria=nA;nA.install=oA;jA(oA);function qA(){}function rA(){sA()}gA.EncryptionScheme=qA;qA.install=rA;jA(rA,-2);function tA(){}
1267
+ function uA(){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}}),
1268
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",vA);document.addEventListener("webkitfullscreenerror",vA);document.addEventListener("mozfullscreenchange",vA);document.addEventListener("mozfullscreenerror",vA);document.addEventListener("MSFullscreenChange",vA);document.addEventListener("MSFullscreenError",vA)}}
1269
+ function vA(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)}gA.Fullscreen=tA;tA.install=uA;jA(uA);function wA(){}function xA(){var a=!0;!ic()||ic()&&qc()||ic()&&bc("Fuchsia")||(a=!1);if(jc()||mc()||lc()||fc()||cc()||bc("PC=EOS")||nc())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),yA=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=zA)}
1270
+ function zA(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.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=Xb(e),!f)||d&&(g=d.contentType,h=Xb(g),!h))return p.return(b)}else return p.return(b);p.B(2);break}if(!Wb())return p.return(b);if(!c){p.B(3);break}return G(p,AA(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var r=d.contentType;ic()&&d.spatialRendering&&
1271
+ (r+="; spatialRendering=true");l=wd(r);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return G(p,BA(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
1272
+ function AA(a){var b,c;return O(function(d){return 1==d.g?ic()?G(d,CA(a),3):cc()?(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(wd(b))):d.B(2):2!=d.g?(c=d.h,d.return(c)):d.return(wd(a.contentType))})}
1273
+ function BA(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},cc()&&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],
1274
1274
  distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=c.keySystem;n=null;ta(p,2);if(Tb.has(k+"#"+l+"#"+m)){n=Tb.get(k+"#"+l+"#"+m)||null;p.B(4);break}return G(p,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:n=p.h,Tb.set(k+"#"+l+"#"+m,n);case 4:va(p,3);break;case 2:wa(p);case 3:return p.return(n)}})}
1275
- function BA(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(wd(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 CA?(c=CA[b],d.B(2)):G(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,CA[b]=c);return d.return(c)})}fA.MediaCapabilities=vA;vA.install=wA;
1276
- var xA=null;vA.originalMcap=xA;var CA={};vA.memoizedCanDisplayTypeRequests_=CA;iA(wA,-1);function DA(){}function EA(){var a=oc();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(FA(),GA()):15>=a&&FA():bc("DT_STB_BCM")?(FA(),GA()):(ec()||dc()||bc("Tizen 4"))&&HA();(window.MediaSource||window.ManagedMediaSource)&&IA();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&JA()}
1277
- function FA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function GA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
1278
- function IA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Ce(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Ce(c)&&b(c)}}}
1279
- function HA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Je(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Je(c)&&b(c)}}}
1280
- function JA(){var a=MediaSource.isTypeSupported;fc()||(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)})}fA.MediaSource=DA;DA.install=EA;iA(EA);function KA(){}function LA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?MA():void 0!=window.orientation&&NA())}function MA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1281
- function NA(){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 OA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}fA.Orientation=KA;KA.install=LA;function OA(){gb.call(this);this.type="";this.angle=0}pa(OA,gb);
1282
- OA.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)};
1283
- OA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};iA(LA);function PA(){}var QA,RA,SA,TA,UA,VA;function WA(a,b){try{var c=new XA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function YA(a){var b=this.mediaKeys;b&&b!=a&&ZA(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?ZA(a,this):Promise.resolve()}
1284
- function $A(a){a=Hb(a.initData);if(Mb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Ac(a.subarray(4),!0);a=Dc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ib(a);this.dispatchEvent(b)}fA.PatchedMediaKeysApple=PA;
1285
- PA.uninstall=function(){QA&&(QA=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",RA),HTMLMediaElement.prototype.setMediaKeys=SA,window.MediaKeys=TA,window.MediaKeySystemAccess=UA,navigator.requestMediaKeySystemAccess=VA,RA=VA=SA=UA=TA=null,window.shakaMediaKeysPolyfill="")};
1286
- PA.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)QA=!0,RA=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),SA=HTMLMediaElement.prototype.setMediaKeys,TA=window.MediaKeys,UA=window.MediaKeySystemAccess,VA=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=YA;window.MediaKeys=aB;window.MediaKeySystemAccess=XA;navigator.requestMediaKeySystemAccess=
1287
- WA;window.shakaMediaKeysPolyfill=bB}};
1288
- function XA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(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=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1275
+ function CA(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(wd(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 DA?(c=DA[b],d.B(2)):G(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,DA[b]=c);return d.return(c)})}gA.MediaCapabilities=wA;wA.install=xA;
1276
+ var yA=null;wA.originalMcap=yA;var DA={};wA.memoizedCanDisplayTypeRequests_=DA;jA(xA,-1);function EA(){}function FA(){var a=oc();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(GA(),HA()):15>=a&&GA():bc("DT_STB_BCM")?(GA(),HA()):(ec()||dc()||bc("Tizen 4"))&&IA();(window.MediaSource||window.ManagedMediaSource)&&JA();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&KA()}
1277
+ function GA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function HA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
1278
+ function JA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Ce(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Ce(c)&&b(c)}}}
1279
+ function IA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Je(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Je(c)&&b(c)}}}
1280
+ function KA(){var a=MediaSource.isTypeSupported;fc()||(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)})}gA.MediaSource=EA;EA.install=FA;jA(FA);function LA(){}function MA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?NA():void 0!=window.orientation&&OA())}function NA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1281
+ function OA(){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 PA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}gA.Orientation=LA;LA.install=MA;function PA(){gb.call(this);this.type="";this.angle=0}pa(PA,gb);
1282
+ PA.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)};
1283
+ PA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};jA(MA);function QA(){}var RA,SA,TA,UA,VA,WA;function XA(a,b){try{var c=new YA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ZA(a){var b=this.mediaKeys;b&&b!=a&&$A(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?$A(a,this):Promise.resolve()}
1284
+ function aB(a){a=Hb(a.initData);if(Mb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Ac(a.subarray(4),!0);a=Dc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ib(a);this.dispatchEvent(b)}gA.PatchedMediaKeysApple=QA;
1285
+ QA.uninstall=function(){RA&&(RA=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",SA),HTMLMediaElement.prototype.setMediaKeys=TA,window.MediaKeys=UA,window.MediaKeySystemAccess=VA,navigator.requestMediaKeySystemAccess=WA,SA=WA=TA=VA=UA=null,window.shakaMediaKeysPolyfill="")};
1286
+ QA.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)RA=!0,SA=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),TA=HTMLMediaElement.prototype.setMediaKeys,UA=window.MediaKeys,VA=window.MediaKeySystemAccess,WA=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ZA;window.MediaKeys=bB;window.MediaKeySystemAccess=YA;navigator.requestMediaKeySystemAccess=
1287
+ XA;window.shakaMediaKeysPolyfill=cB}};
1288
+ function YA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(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=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1289
1289
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(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;}
1290
- XA.prototype.createMediaKeys=function(){var a=new aB(this.keySystem);return Promise.resolve(a)};XA.prototype.getConfiguration=function(){return this.g};function aB(a){this.h=new WebKitMediaKeys(a);this.g=new rd}aB.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new cB(this.h,a)};aB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1291
- function ZA(a,b){a.g.Za();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",$A);try{return Kk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}aB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function cB(a){gb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new rd;this.sessionId="";this.expiration=NaN;this.closed=new og;this.keyStatuses=new dB}pa(cB,gb);q=cB.prototype;
1292
- q.generateRequest=function(a,b){var c=this;this.h=new og;try{var d=this.l.createSession("video/mp4",Hb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.tc()?"license-request":"license-renewal").set("message",Ib(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(eB(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
1293
- 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:eB(c,"output-not-allowed");break;default:eB(c,"internal-error")}});eB(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1294
- q.update=function(a){this.g=new og;try{this.i.update(Hb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Za()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function eB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}
1295
- function dB(){this.size=0;this.g=void 0}q=dB.prototype;q.tc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Sb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Sb.value();return this.g&&Fb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var bB="apple";function fB(){}function gB(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||dc()||bc("Tizen 4")||bc("Tizen 5.0")||gc())&&(MediaKeys.prototype.setServerCertificate=hB)}function hB(){return Promise.resolve(!1)}fA.PatchedMediaKeysCert=fB;fB.install=gB;iA(gB);function iB(){}function jB(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=kB,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=lB,window.MediaKeys=mB,window.MediaKeySystemAccess=nB,window.shakaMediaKeysPolyfill=oB)}function kB(){return Promise.reject(Error("The key system specified is not supported."))}
1296
- function lB(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}fA.PatchedMediaKeysNop=iB;iB.install=jB;function mB(){throw new TypeError("Illegal constructor.");}mB.prototype.createSession=function(){};mB.prototype.setServerCertificate=function(){};mB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function nB(){this.keySystem="";throw new TypeError("Illegal constructor.");}nB.prototype.getConfiguration=function(){};
1297
- nB.prototype.createMediaKeys=function(){};var oB="nop";iA(jB,-10);function pB(){}
1298
- function qB(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)rB="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=sB;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=tB;window.MediaKeys=uB;window.MediaKeySystemAccess=vB;window.shakaMediaKeysPolyfill=wB}}
1299
- function xB(a){var b=rB;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function sB(a,b){try{var c=new vB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function tB(a){var b=this.mediaKeys;b&&b!=a&&yB(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&yB(a,this);return Promise.resolve()}fA.PatchedMediaKeysWebkit=pB;pB.install=qB;
1300
- function vB(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=t(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=t(f.audioCapabilities),
1290
+ YA.prototype.createMediaKeys=function(){var a=new bB(this.keySystem);return Promise.resolve(a)};YA.prototype.getConfiguration=function(){return this.g};function bB(a){this.h=new WebKitMediaKeys(a);this.g=new rd}bB.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new dB(this.h,a)};bB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1291
+ function $A(a,b){a.g.Za();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",aB);try{return Kk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}bB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function dB(a){gb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new rd;this.sessionId="";this.expiration=NaN;this.closed=new og;this.keyStatuses=new eB}pa(dB,gb);q=dB.prototype;
1292
+ q.generateRequest=function(a,b){var c=this;this.h=new og;try{var d=this.l.createSession("video/mp4",Hb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.uc()?"license-request":"license-renewal").set("message",Ib(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(fB(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
1293
+ 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:fB(c,"output-not-allowed");break;default:fB(c,"internal-error")}});fB(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1294
+ q.update=function(a){this.g=new og;try{this.i.update(Hb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Za()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function fB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}
1295
+ function eB(){this.size=0;this.g=void 0}q=eB.prototype;q.uc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Sb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Sb.value();return this.g&&Fb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var cB="apple";function gB(){}function hB(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||dc()||bc("Tizen 4")||bc("Tizen 5.0")||gc())&&(MediaKeys.prototype.setServerCertificate=iB)}function iB(){return Promise.resolve(!1)}gA.PatchedMediaKeysCert=gB;gB.install=hB;jA(hB);function jB(){}function kB(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=lB,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=mB,window.MediaKeys=nB,window.MediaKeySystemAccess=oB,window.shakaMediaKeysPolyfill=pB)}function lB(){return Promise.reject(Error("The key system specified is not supported."))}
1296
+ function mB(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}gA.PatchedMediaKeysNop=jB;jB.install=kB;function nB(){throw new TypeError("Illegal constructor.");}nB.prototype.createSession=function(){};nB.prototype.setServerCertificate=function(){};nB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function oB(){this.keySystem="";throw new TypeError("Illegal constructor.");}oB.prototype.getConfiguration=function(){};
1297
+ oB.prototype.createMediaKeys=function(){};var pB="nop";jA(kB,-10);function qB(){}
1298
+ function rB(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)sB="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=tB;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=uB;window.MediaKeys=vB;window.MediaKeySystemAccess=wB;window.shakaMediaKeysPolyfill=xB}}
1299
+ function yB(a){var b=sB;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function tB(a,b){try{var c=new wB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function uB(a){var b=this.mediaKeys;b&&b!=a&&zB(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&zB(a,this);return Promise.resolve()}gA.PatchedMediaKeysWebkit=qB;qB.install=rB;
1300
+ function wB(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=t(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=t(f.audioCapabilities),
1301
1301
  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=t(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"]):
1302
- 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;}vB.prototype.createMediaKeys=function(){var a=new uB(this.g);return Promise.resolve(a)};vB.prototype.getConfiguration=function(){return this.h};function uB(a){this.l=a;this.h=null;this.g=new rd;this.i=[];this.j=new Map}
1303
- function yB(a,b){a.h=b;a.g.Za();var c=rB;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ib(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=zB(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.tc()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=zB(a,d.sessionId))AB(d,"usable"),
1304
- d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=zB(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?AB(e,"output-restricted"):1==f?AB(e,"expired"):AB(e,"internal-error"))}}))}
1305
- uB.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 BB(b,this.l,a);this.i.push(a);return a};uB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};uB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1306
- function zB(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 BB(a,b,c){gb.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 og;this.keyStatuses=new CB}pa(BB,gb);
1307
- function DB(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=Hb(Dc("LOAD_SESSION|"+c));else{var e=Dc("PERSISTENT|");d=Nc(e,b)}else d=Hb(b)}catch(g){return Promise.reject(g)}a.h=new og;var f=xB("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Vb(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
1308
- function EB(a,b,c){if(a.g)a.g.then(function(){return EB(a,b,c)}).catch(function(){return EB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=zc(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=Kc(e.keys[0].k);e=Kc(e.keys[0].kid)}else d=Hb(c),e=null;var f=xB("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1309
- function AB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}q=BB.prototype;q.generateRequest=function(a,b){return DB(this,b,null)};q.load=function(a){return"persistent-license"==this.l?DB(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new og;EB(this,b,a);return b};
1310
- q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=xB("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function CB(){this.size=0;this.g=void 0}q=CB.prototype;q.tc=function(){return this.g};
1311
- q.forEach=function(a){this.g&&a(this.g,Sb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Sb.value();return this.g&&Fb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var rB="",wB="webkit";iA(qB);function FB(){}function GB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=HB,Object.defineProperty(a,"disablePictureInPicture",{get:IB,set:JB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=KB,document.addEventListener("webkitpresentationmodechanged",LB,!0))}}
1312
- function LB(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)}
1313
- function HB(){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 KB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1314
- function IB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function JB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}fA.PiPWebkit=FB;FB.install=GB;iA(GB);function MB(){}function NB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=OB))}function OB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}fA.RandomUUID=MB;MB.install=NB;iA(NB);function PB(){}function QB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:RB})}function RB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}fA.Symbol=PB;PB.install=QB;iA(QB);function SB(){}function TB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}fA.VideoPlayPromise=SB;SB.install=TB;iA(TB);function UB(){}function VB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||gc())&&(a.getVideoPlaybackQuality=WB)}}function WB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}fA.VideoPlaybackQuality=UB;UB.install=VB;iA(VB);function XB(){}function YB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=ZB;else if(6==b)a=$B;else{try{var c=!!ZB(1,2,"")}catch(d){c=!1}c&&(a=ZB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function ZB(a,b,c){return new window.TextTrackCue(a,b,c)}function $B(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}fA.VTTCue=XB;XB.install=YB;iA(YB);function aC(){}aC.prototype.parseInit=function(){};aC.prototype.setSequenceMode=function(){};aC.prototype.setManifestType=function(){};aC.prototype.parseMedia=function(a,b){var c=null,d=[];a=zc(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=bC.exec(e))){var f=cC.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Sd(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1315
- P("shaka.text.LrcTextParser",aC);aC.prototype.parseMedia=aC.prototype.parseMedia;aC.prototype.setManifestType=aC.prototype.setManifestType;aC.prototype.setSequenceMode=aC.prototype.setSequenceMode;aC.prototype.parseInit=aC.prototype.parseInit;var bC=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,cC=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Qe["application/x-subtitle-lrc"]=function(){return new aC};function dC(){}dC.prototype.parseInit=function(){};dC.prototype.setSequenceMode=function(){};dC.prototype.setManifestType=function(){};
1316
- dC.prototype.parseMedia=function(a,b,c){var d=zc(a);a=[];if(""==d)return a;var e=fh(d,"tt");if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=ph(e,"body")[0];if(!d)return[];var f=vh(e,eC,"frameRate"),g=vh(e,eC,"subFrameRate"),h=vh(e,eC,"frameRateMultiplier"),k=vh(e,eC,"tickRate"),l=vh(e,eC,"cellResolution"),m=e.attributes["xml:space"]||"default",n=vh(e,fC,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new gC(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
1317
- {Ec:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=ph(e,"metadata")[0])?g.children:[];h=ph(e,"style");e=ph(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next()){var u=r.value;r=new Kd;var w=u.attributes["xml:id"];if(w){r.id=w;var v=null;n&&(v=hC.exec(n)||iC.exec(n));w=v?Number(v[1]):null;v=v?Number(v[2]):null;var A,z=jC(u,h,"extent");if(z){var C=(A=hC.exec(z))||iC.exec(z);null!=C&&(r.width=Number(C[1]),r.height=Number(C[2]),A||(null!=w&&(r.width=100*r.width/w),null!=v&&(r.height=
1318
- 100*r.height/v)),r.widthUnits=A||null!=w?Ld:0,r.heightUnits=A||null!=v?Ld:0)}if(u=jC(u,h,"origin"))if(C=(A=hC.exec(u))||iC.exec(u),null!=C)r.viewportAnchorX=Number(C[1]),r.viewportAnchorY=Number(C[2]),A?z||(r.width=100-r.viewportAnchorX,r.widthUnits=Ld,r.height=100-r.viewportAnchorY,r.heightUnits=Ld):(null!=v&&(r.viewportAnchorY=100*r.viewportAnchorY/v),null!=w&&(r.viewportAnchorX=100*r.viewportAnchorX/w)),r.viewportAnchorUnits=A||null!=w?Ld:0}else r=null;r&&k.push(r)}if(lh(d,"p").length)throw new T(2,
1319
- 2,2001,"<p> can only be inside <div> in TTML");n=t(lh(d,"div"));for(p=n.next();!p.done;p=n.next())if(lh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=kC(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1320
- function kC(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(jh(a)){if(!m)return null;var r={tagName:"span",children:[nh(a)],attributes:{},parent:null}}else r=a;for(var u=null,w=t(lC),v=w.next();!v.done&&!(u=mC(r,"backgroundImage",d,"#",v.value)[0]);v=w.next());w=null;var A=vh(r,lC,"backgroundImage");n&&A&&!A.startsWith("#")&&(v=new nb(n),A=new nb(A),(v=v.resolve(A).toString())&&(w=v));if("p"==a.tagName||u||w)m=!0;a=m;v="default"==(r.attributes["xml:space"]||(h?"default":"preserve"));A=r.children.every(jh);h=
1321
- [];if(!A)for(var z=t(r.children),C=z.next();!C.done;C=z.next())(C=kC(C.value,b,c,d,e,f,g,v,k,r,m,n))&&h.push(C);d=null!=l;n=nh(r);n=r.children.length&&n&&/\S/.test(n);C=r.attributes.begin||r.attributes.end||r.attributes.dur;if(!(C||n||"br"==r.tagName||0!=h.length||d&&!v))return null;z=nC(r,c);n=z.start;for(z=z.end;p&&p.tagName&&"tt"!=p.tagName;)z=oC(p,c,n,z),n=z.start,z=z.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;z=null==z?Infinity:z+b.periodStart;n=Math.max(n,b.segmentStart);z=Math.min(z,b.segmentEnd);
1322
- if(!C&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),z=Math.max(z,c.endTime);if("br"==r.tagName)return e=new Sd(n,z,""),e.lineBreak=!0,e;b="";A&&(b=Gc(nh(r)||""),v&&(b=b.replace(/\s+/g," ")));b=new Sd(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=mC(r,"region",f,"")[0];if(r.attributes.region&&k&&k.attributes["xml:id"]){var y=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==y})[0]}g=k;l&&d&&!r.attributes.region&&
1323
- !r.attributes.style&&(g=mC(l,"region",f,"")[0]);pC(b,r,g,u,w,e,a,0==h.length);return b}
1324
- function pC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==qC(b,c,f,"direction",g)&&(a.direction="rtl");h=qC(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=Vd);(h=qC(b,c,f,"textAlign",!0))?(a.positionAlign=rC[h],a.lineAlign=sC[h],a.textAlign=he[h.toUpperCase()]):a.textAlign=Ud;if(h=qC(b,c,f,"displayAlign",!0))a.displayAlign=ie[h.toUpperCase()];if(h=qC(b,c,f,"color",g))a.color=h;if(h=qC(b,c,f,"backgroundColor",
1325
- g))a.backgroundColor=h;if(h=qC(b,c,f,"border",g))a.border=h;if(h=qC(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.split(",").filter(function(k){return"default"!=
1326
- k}).join(",")}(h=qC(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=qC(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=qC(b,c,f,"lineHeight",g))&&h.match(tC)&&(a.lineHeight=h);(h=qC(b,c,f,"fontSize",g))&&(h.match(tC)||h.match(uC))&&(a.fontSize=h);if(h=qC(b,c,f,"fontStyle",g))a.fontStyle=me[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=nh(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
1327
- e);if(d=qC(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(tC)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(tC)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=qC(b,c,f,"letterSpacing",g))&&d.match(tC)&&(a.letterSpacing=d);(d=qC(b,c,f,"linePadding",g))&&d.match(tC)&&(a.linePadding=d);if(d=qC(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=jC(c,f,"textDecoration"))&&vC(a,d);(d=wC(b,f,"textDecoration"))&&vC(a,d);if(d=qC(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(qC(b,
1302
+ 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;}wB.prototype.createMediaKeys=function(){var a=new vB(this.g);return Promise.resolve(a)};wB.prototype.getConfiguration=function(){return this.h};function vB(a){this.l=a;this.h=null;this.g=new rd;this.i=[];this.j=new Map}
1303
+ function zB(a,b){a.h=b;a.g.Za();var c=sB;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ib(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=AB(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.uc()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=AB(a,d.sessionId))BB(d,"usable"),
1304
+ d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=AB(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?BB(e,"output-restricted"):1==f?BB(e,"expired"):BB(e,"internal-error"))}}))}
1305
+ vB.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 CB(b,this.l,a);this.i.push(a);return a};vB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};vB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1306
+ function AB(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 CB(a,b,c){gb.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 og;this.keyStatuses=new DB}pa(CB,gb);
1307
+ function EB(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=Hb(Dc("LOAD_SESSION|"+c));else{var e=Dc("PERSISTENT|");d=Nc(e,b)}else d=Hb(b)}catch(g){return Promise.reject(g)}a.h=new og;var f=yB("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Vb(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
1308
+ function FB(a,b,c){if(a.g)a.g.then(function(){return FB(a,b,c)}).catch(function(){return FB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=zc(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=Kc(e.keys[0].k);e=Kc(e.keys[0].kid)}else d=Hb(c),e=null;var f=yB("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1309
+ function BB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}q=CB.prototype;q.generateRequest=function(a,b){return EB(this,b,null)};q.load=function(a){return"persistent-license"==this.l?EB(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new og;FB(this,b,a);return b};
1310
+ q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=yB("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function DB(){this.size=0;this.g=void 0}q=DB.prototype;q.uc=function(){return this.g};
1311
+ q.forEach=function(a){this.g&&a(this.g,Sb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Sb.value();return this.g&&Fb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var sB="",xB="webkit";jA(rB);function GB(){}function HB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=IB,Object.defineProperty(a,"disablePictureInPicture",{get:JB,set:KB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=LB,document.addEventListener("webkitpresentationmodechanged",MB,!0))}}
1312
+ function MB(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)}
1313
+ function IB(){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 LB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1314
+ function JB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function KB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}gA.PiPWebkit=GB;GB.install=HB;jA(HB);function NB(){}function OB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=PB))}function PB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}gA.RandomUUID=NB;NB.install=OB;jA(OB);function QB(){}function RB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:SB})}function SB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}gA.Symbol=QB;QB.install=RB;jA(RB);function TB(){}function UB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}gA.VideoPlayPromise=TB;TB.install=UB;jA(UB);function VB(){}function WB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||gc())&&(a.getVideoPlaybackQuality=XB)}}function XB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}gA.VideoPlaybackQuality=VB;VB.install=WB;jA(WB);function YB(){}function ZB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=$B;else if(6==b)a=aC;else{try{var c=!!$B(1,2,"")}catch(d){c=!1}c&&(a=$B)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function $B(a,b,c){return new window.TextTrackCue(a,b,c)}function aC(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}gA.VTTCue=YB;YB.install=ZB;jA(ZB);function bC(){}bC.prototype.parseInit=function(){};bC.prototype.setSequenceMode=function(){};bC.prototype.setManifestType=function(){};bC.prototype.parseMedia=function(a,b){var c=null,d=[];a=zc(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=cC.exec(e))){var f=dC.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Sd(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1315
+ P("shaka.text.LrcTextParser",bC);bC.prototype.parseMedia=bC.prototype.parseMedia;bC.prototype.setManifestType=bC.prototype.setManifestType;bC.prototype.setSequenceMode=bC.prototype.setSequenceMode;bC.prototype.parseInit=bC.prototype.parseInit;var cC=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,dC=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Qe["application/x-subtitle-lrc"]=function(){return new bC};function eC(){}eC.prototype.parseInit=function(){};eC.prototype.setSequenceMode=function(){};eC.prototype.setManifestType=function(){};
1316
+ eC.prototype.parseMedia=function(a,b,c){var d=zc(a);a=[];if(""==d)return a;var e=fh(d,"tt");if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=ph(e,"body")[0];if(!d)return[];var f=vh(e,fC,"frameRate"),g=vh(e,fC,"subFrameRate"),h=vh(e,fC,"frameRateMultiplier"),k=vh(e,fC,"tickRate"),l=vh(e,fC,"cellResolution"),m=e.attributes["xml:space"]||"default",n=vh(e,gC,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new hC(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
1317
+ {Gc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=ph(e,"metadata")[0])?g.children:[];h=ph(e,"style");e=ph(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next()){var u=r.value;r=new Kd;var w=u.attributes["xml:id"];if(w){r.id=w;var v=null;n&&(v=iC.exec(n)||jC.exec(n));w=v?Number(v[1]):null;v=v?Number(v[2]):null;var A,z=kC(u,h,"extent");if(z){var C=(A=iC.exec(z))||jC.exec(z);null!=C&&(r.width=Number(C[1]),r.height=Number(C[2]),A||(null!=w&&(r.width=100*r.width/w),null!=v&&(r.height=
1318
+ 100*r.height/v)),r.widthUnits=A||null!=w?Ld:0,r.heightUnits=A||null!=v?Ld:0)}if(u=kC(u,h,"origin"))if(C=(A=iC.exec(u))||jC.exec(u),null!=C)r.viewportAnchorX=Number(C[1]),r.viewportAnchorY=Number(C[2]),A?z||(r.width=100-r.viewportAnchorX,r.widthUnits=Ld,r.height=100-r.viewportAnchorY,r.heightUnits=Ld):(null!=v&&(r.viewportAnchorY=100*r.viewportAnchorY/v),null!=w&&(r.viewportAnchorX=100*r.viewportAnchorX/w)),r.viewportAnchorUnits=A||null!=w?Ld:0}else r=null;r&&k.push(r)}if(lh(d,"p").length)throw new T(2,
1319
+ 2,2001,"<p> can only be inside <div> in TTML");n=t(lh(d,"div"));for(p=n.next();!p.done;p=n.next())if(lh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=lC(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1320
+ function lC(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(jh(a)){if(!m)return null;var r={tagName:"span",children:[nh(a)],attributes:{},parent:null}}else r=a;for(var u=null,w=t(mC),v=w.next();!v.done&&!(u=nC(r,"backgroundImage",d,"#",v.value)[0]);v=w.next());w=null;var A=vh(r,mC,"backgroundImage");n&&A&&!A.startsWith("#")&&(v=new nb(n),A=new nb(A),(v=v.resolve(A).toString())&&(w=v));if("p"==a.tagName||u||w)m=!0;a=m;v="default"==(r.attributes["xml:space"]||(h?"default":"preserve"));A=r.children.every(jh);h=
1321
+ [];if(!A)for(var z=t(r.children),C=z.next();!C.done;C=z.next())(C=lC(C.value,b,c,d,e,f,g,v,k,r,m,n))&&h.push(C);d=null!=l;n=nh(r);n=r.children.length&&n&&/\S/.test(n);C=r.attributes.begin||r.attributes.end||r.attributes.dur;if(!(C||n||"br"==r.tagName||0!=h.length||d&&!v))return null;z=oC(r,c);n=z.start;for(z=z.end;p&&p.tagName&&"tt"!=p.tagName;)z=pC(p,c,n,z),n=z.start,z=z.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;z=null==z?Infinity:z+b.periodStart;n=Math.max(n,b.segmentStart);z=Math.min(z,b.segmentEnd);
1322
+ if(!C&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),z=Math.max(z,c.endTime);if("br"==r.tagName)return e=new Sd(n,z,""),e.lineBreak=!0,e;b="";A&&(b=Gc(nh(r)||""),v&&(b=b.replace(/\s+/g," ")));b=new Sd(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=nC(r,"region",f,"")[0];if(r.attributes.region&&k&&k.attributes["xml:id"]){var y=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==y})[0]}g=k;l&&d&&!r.attributes.region&&
1323
+ !r.attributes.style&&(g=nC(l,"region",f,"")[0]);qC(b,r,g,u,w,e,a,0==h.length);return b}
1324
+ function qC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==rC(b,c,f,"direction",g)&&(a.direction="rtl");h=rC(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=Vd);(h=rC(b,c,f,"textAlign",!0))?(a.positionAlign=sC[h],a.lineAlign=tC[h],a.textAlign=he[h.toUpperCase()]):a.textAlign=Ud;if(h=rC(b,c,f,"displayAlign",!0))a.displayAlign=ie[h.toUpperCase()];if(h=rC(b,c,f,"color",g))a.color=h;if(h=rC(b,c,f,"backgroundColor",
1325
+ g))a.backgroundColor=h;if(h=rC(b,c,f,"border",g))a.border=h;if(h=rC(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.split(",").filter(function(k){return"default"!=
1326
+ k}).join(",")}(h=rC(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=rC(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=rC(b,c,f,"lineHeight",g))&&h.match(uC)&&(a.lineHeight=h);(h=rC(b,c,f,"fontSize",g))&&(h.match(uC)||h.match(vC))&&(a.fontSize=h);if(h=rC(b,c,f,"fontStyle",g))a.fontStyle=me[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=nh(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
1327
+ e);if(d=rC(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(uC)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(uC)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=rC(b,c,f,"letterSpacing",g))&&d.match(uC)&&(a.letterSpacing=d);(d=rC(b,c,f,"linePadding",g))&&d.match(uC)&&(a.linePadding=d);if(d=rC(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=kC(c,f,"textDecoration"))&&wC(a,d);(d=xC(b,f,"textDecoration"))&&wC(a,d);if(d=rC(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(rC(b,
1328
1328
  c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
1329
- function vC(a,b){b=t(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")&&Pd(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Pd(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1330
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Pd(a.textDecoration,"overline")}}function qC(a,b,c,d,e){e=void 0===e?!0:e;return(a=wC(a,c,d))?a:e?jC(b,c,d):null}function jC(a,b,c){if(!a)return null;var d=vh(a,fC,c);return d?d:xC(a,b,c)}function wC(a,b,c){var d=vh(a,fC,c);return d?d:xC(a,b,c)}
1331
- function xC(a,b,c){a=mC(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=uh(a[e],"urn:ebu:tt:style",c);f||(f=vh(a[e],fC,c));f||(f=wC(a[e],b,c));f&&(d=f)}return d}function mC(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?uh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(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}
1332
- function oC(a,b,c,d){a=nC(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 nC(a,b){var c=yC(a.attributes.begin,b),d=yC(a.attributes.end,b);a=yC(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1333
- function yC(a,b){var c=null;if(zC.test(a)){a=zC.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(AC.test(a))c=BC(AC,a);else if(CC.test(a))c=BC(CC,a);else if(DC.test(a))a=DC.exec(a),c=Number(a[1])/b.frameRate;else if(EC.test(a))a=EC.exec(a),c=Number(a[1])/b.g;else if(FC.test(a))c=BC(FC,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
1334
- function BC(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",dC);dC.prototype.parseMedia=dC.prototype.parseMedia;dC.prototype.setManifestType=dC.prototype.setManifestType;dC.prototype.setSequenceMode=dC.prototype.setSequenceMode;dC.prototype.parseInit=dC.prototype.parseInit;
1335
- function gC(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]))}
1336
- var hC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,uC=/^(\d{1,4}(?:\.\d+)?|100)%$/,tC=/^(\d+px|\d+em|\d*\.?\d+c)$/,iC=/^(\d+)px (\d+)px$/,zC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,AC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,CC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,DC=/^(\d*(?:\.\d*)?)f$/,EC=/^(\d*(?:\.\d*)?)t$/,FC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),sC={left:Yd,center:"center",right:"end",start:Yd,
1337
- end:"end"},rC={left:"line-left",center:"center",right:"line-right"},eC=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],fC=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],lC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Qe["application/ttml+xml"]=function(){return new dC};function GC(){this.g=new dC}GC.prototype.parseInit=function(a){var b=!1;(new Sg).box("moov",Xg).box("trak",Xg).box("mdia",Xg).box("minf",Xg).box("stbl",Xg).Y("stsd",Zg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};GC.prototype.setSequenceMode=function(){};GC.prototype.setManifestType=function(){};
1338
- GC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Sg).box("mdat",bh(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};P("shaka.text.Mp4TtmlParser",GC);GC.prototype.parseMedia=GC.prototype.parseMedia;GC.prototype.setManifestType=GC.prototype.setManifestType;GC.prototype.setSequenceMode=GC.prototype.setSequenceMode;GC.prototype.parseInit=GC.prototype.parseInit;Qe['application/mp4; codecs="stpp"']=function(){return new GC};
1339
- Qe['application/mp4; codecs="stpp.ttml"']=function(){return new GC};Qe['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new GC};Qe['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new GC};Qe['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new GC};Qe['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new GC};Qe['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new GC};Qe['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new GC};function HC(){this.h=!1;this.g="UNKNOWN"}HC.prototype.parseInit=function(){};HC.prototype.setSequenceMode=function(a){this.h=a};HC.prototype.setManifestType=function(a){this.g=a};
1340
- HC.prototype.parseMedia=function(a,b){a=zc(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 T(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 T(2,2,2E3);a=IC(new dq(a[1]));if(null==a)throw new T(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
1329
+ function wC(a,b){b=t(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")&&Pd(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Pd(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1330
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Pd(a.textDecoration,"overline")}}function rC(a,b,c,d,e){e=void 0===e?!0:e;return(a=xC(a,c,d))?a:e?kC(b,c,d):null}function kC(a,b,c){if(!a)return null;var d=vh(a,gC,c);return d?d:yC(a,b,c)}function xC(a,b,c){var d=vh(a,gC,c);return d?d:yC(a,b,c)}
1331
+ function yC(a,b,c){a=nC(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=uh(a[e],"urn:ebu:tt:style",c);f||(f=vh(a[e],gC,c));f||(f=xC(a[e],b,c));f&&(d=f)}return d}function nC(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?uh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(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}
1332
+ function pC(a,b,c,d){a=oC(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 oC(a,b){var c=zC(a.attributes.begin,b),d=zC(a.attributes.end,b);a=zC(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1333
+ function zC(a,b){var c=null;if(AC.test(a)){a=AC.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(BC.test(a))c=CC(BC,a);else if(DC.test(a))c=CC(DC,a);else if(EC.test(a))a=EC.exec(a),c=Number(a[1])/b.frameRate;else if(FC.test(a))a=FC.exec(a),c=Number(a[1])/b.g;else if(GC.test(a))c=CC(GC,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
1334
+ function CC(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",eC);eC.prototype.parseMedia=eC.prototype.parseMedia;eC.prototype.setManifestType=eC.prototype.setManifestType;eC.prototype.setSequenceMode=eC.prototype.setSequenceMode;eC.prototype.parseInit=eC.prototype.parseInit;
1335
+ function hC(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]))}
1336
+ var iC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,vC=/^(\d{1,4}(?:\.\d+)?|100)%$/,uC=/^(\d+px|\d+em|\d*\.?\d+c)$/,jC=/^(\d+)px (\d+)px$/,AC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,BC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,DC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,EC=/^(\d*(?:\.\d*)?)f$/,FC=/^(\d*(?:\.\d*)?)t$/,GC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),tC={left:Yd,center:"center",right:"end",start:Yd,
1337
+ end:"end"},sC={left:"line-left",center:"center",right:"line-right"},fC=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],gC=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],mC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Qe["application/ttml+xml"]=function(){return new eC};function HC(){this.g=new eC}HC.prototype.parseInit=function(a){var b=!1;(new Sg).box("moov",Xg).box("trak",Xg).box("mdia",Xg).box("minf",Xg).box("stbl",Xg).Z("stsd",Zg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};HC.prototype.setSequenceMode=function(){};HC.prototype.setManifestType=function(){};
1338
+ HC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Sg).box("mdat",bh(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};P("shaka.text.Mp4TtmlParser",HC);HC.prototype.parseMedia=HC.prototype.parseMedia;HC.prototype.setManifestType=HC.prototype.setManifestType;HC.prototype.setSequenceMode=HC.prototype.setSequenceMode;HC.prototype.parseInit=HC.prototype.parseInit;Qe['application/mp4; codecs="stpp"']=function(){return new HC};
1339
+ Qe['application/mp4; codecs="stpp.ttml"']=function(){return new HC};Qe['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new HC};Qe['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new HC};Qe['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new HC};Qe['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new HC};Qe['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new HC};Qe['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new HC};function IC(){this.h=!1;this.g="UNKNOWN"}IC.prototype.parseInit=function(){};IC.prototype.setSequenceMode=function(a){this.h=a};IC.prototype.setManifestType=function(a){this.g=a};
1340
+ IC.prototype.parseMedia=function(a,b){a=zc(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 T(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 T(2,2,2E3);a=JC(new dq(a[1]));if(null==a)throw new T(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
1341
1341
  for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new dq(e);var f=new Kd;gq(e);eq(e);for(var g=gq(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]),
1342
- h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");eq(e);g=gq(e)}b.push(f)}d=new Map;JC(d);e=[];c=t(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=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=
1342
+ h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");eq(e);g=gq(e)}b.push(f)}d=new Map;KC(d);e=[];c=t(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=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=
1343
1343
  l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Sd(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=
1344
1344
  700;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=ce;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}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,
1345
- f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new dq(f[0]),k=IC(g),n=fq(g,/[ \t]+--\x3e[ \t]+/g),l=IC(g),null==k||null==n||null==l)Va("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 Sd(k,l,"");eq(g);for(k=gq(g);k;)KC(m,k,b),eq(g),k=gq(g);LC(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
1346
- function JC(a){for(var b=t(Object.entries(ke)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Sd(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(le));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Sd(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1347
- function LC(a,b,c){if(a.includes("<")){0===c.size&&JC(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(MC)&&a.push(e),e=-1);a=t(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===
1348
- 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=t(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=NC(a);try{var m=fh("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
1349
- m.next())OC(a.value,b,c);else b.payload=Gc(a);else b.payload=Gc(a)}else b.payload=Gc(a)}function NC(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 PC(a,b){return a&&0<a.length?a:b}
1350
- function OC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Kd;d.position=null;d.size=0;if(a.tagName)for(var e=t(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=PC(g.backgroundColor,d.backgroundColor),d.color=PC(g.color,d.color),d.fontFamily=PC(g.fontFamily,d.fontFamily),d.fontSize=
1351
- PC(g.fontSize,d.fontSize),d.textShadow=PC(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=de(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;
1352
- if(!f)break;if(f=IC(new dq(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(jh(a)||1==e.length&&jh(e[0]))for(c=nh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=de(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Gc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())OC(a.value,d,c)}
1353
- function KC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Ud:a.textAlign=he[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"==
1354
- b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Td);else if(d=/^region:(.*)$/.exec(b)){if(b=QC(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=je[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Xd,a.line=Number(c[1]),c[2]&&(a.lineAlign=je[c[2].toUpperCase()])}
1355
- function QC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function IC(a){a=fq(a,MC);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",HC);HC.prototype.parseMedia=HC.prototype.parseMedia;HC.prototype.setManifestType=HC.prototype.setManifestType;HC.prototype.setSequenceMode=HC.prototype.setSequenceMode;HC.prototype.parseInit=HC.prototype.parseInit;var MC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
1356
- Qe["text/vtt"]=function(){return new HC};Qe['text/vtt; codecs="vtt"']=function(){return new HC};Qe['text/vtt; codecs="wvtt"']=function(){return new HC};function RC(){this.g=null}RC.prototype.parseInit=function(a){var b=this,c=!1;(new Sg).box("moov",Xg).box("trak",Xg).box("mdia",Xg).Y("mdhd",function(d){d=cj(d.reader,d.version);b.g=d.timescale}).box("minf",Xg).box("stbl",Xg).Y("stsd",Zg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};RC.prototype.setSequenceMode=function(){};RC.prototype.setManifestType=function(){};
1357
- RC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Sg).box("moof",Xg).box("traf",Xg).Y("tfdt",function(C){g=!0;c=bj(C.reader,C.version).baseMediaDecodeTime}).Y("tfhd",function(C){l=aj(C.reader,C.flags).Vd}).Y("trun",function(C){h=!0;d=dj(C.reader,C.version,C.flags).wi}).box("mdat",bh(function(C){k=!0;e=C})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Pg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
1358
- p.value;var r=p.hh||l,u=p.zf?c+p.zf:a;a=u+(r||0);var w=0;do{var v=m.V();w+=v;var A=m.V(),z=null;"vttc"==Wg(A)?8<v&&(z=m.Rb(v-8)):m.skip(v-8);r&&z&&(v=SC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(v))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(Ye)};function SC(a,b,c){var d,e,f;(new Sg).box("payl",bh(function(g){d=zc(g)})).box("iden",bh(function(g){e=zc(g)})).box("sttg",bh(function(g){f=zc(g)})).parse(a);return d?TC(d,e,f,b,c):null}
1359
- function TC(a,b,c,d,e){d=new Sd(d,e,"");LC(a,d,new Map);b&&(d.id=b);if(c)for(a=new dq(c),b=gq(a);b;)KC(d,b,[]),eq(a),b=gq(a);return d}P("shaka.text.Mp4VttParser",RC);RC.prototype.parseMedia=RC.prototype.parseMedia;RC.prototype.setManifestType=RC.prototype.setManifestType;RC.prototype.setSequenceMode=RC.prototype.setSequenceMode;RC.prototype.parseInit=RC.prototype.parseInit;Qe['application/mp4; codecs="wvtt"']=function(){return new RC};function UC(){}UC.prototype.parseInit=function(){};UC.prototype.setSequenceMode=function(){};UC.prototype.setManifestType=function(){};UC.prototype.parseMedia=function(a){var b=zc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new dq(c[0]),e=VC(d),f=fq(d,/,/g);d=VC(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Sd(e,d,c.slice(1).join("\n").trim()))}return a};
1360
- function VC(a){a=fq(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",UC);UC.prototype.parseMedia=UC.prototype.parseMedia;UC.prototype.setManifestType=UC.prototype.setManifestType;UC.prototype.setSequenceMode=UC.prototype.setSequenceMode;UC.prototype.parseInit=UC.prototype.parseInit;Qe["text/x-subviewer"]=function(){return new UC};function WC(){this.g=new HC}WC.prototype.parseInit=function(){};WC.prototype.setSequenceMode=function(){};WC.prototype.setManifestType=function(){};WC.prototype.parseMedia=function(a,b,c){a=zc(a);a=XC(a);a=Hb(Dc(a));return this.g.parseMedia(a,b,c)};
1361
- function XC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(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",WC);WC.srt2webvtt=XC;WC.prototype.parseMedia=WC.prototype.parseMedia;
1362
- WC.prototype.setManifestType=WC.prototype.setManifestType;WC.prototype.setSequenceMode=WC.prototype.setSequenceMode;WC.prototype.parseInit=WC.prototype.parseInit;Qe["text/srt"]=function(){return new WC};function YC(){}YC.prototype.parseInit=function(){};YC.prototype.setSequenceMode=function(){};YC.prototype.setManifestType=function(){};
1363
- YC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=zc(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=ZC.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(f=b.next();!f.done;f=b.next())if(a=f.value,!/^\s*;/.test(a)&&(f=$C.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(aD);else if("Style"==a){a=f.split(aD);f={};for(var g=0;g<e.length&&
1364
- g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;a={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;a={Uf:a.Uf},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=$C.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(aD);else if("Dialogue"==f){g=g.split(aD);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=bD(f.Start);var k=bD(f.End);g=new Sd(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Uf=f.Style;(f=d.find(function(l){return function(m){return m.Name==
1365
- l.Uf}}(a)))&&cD(g,f);e.push(g)}return e};
1366
- function cD(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=dD(c))a.color=c;if(c=b.BackColour)if(c=dD(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=Zd;a.textAlign="start";break;case 2:a.displayAlign=Zd;a.textAlign=Ud;break;case 3:a.displayAlign=Zd;a.textAlign="end";
1345
+ f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new dq(f[0]),k=JC(g),n=fq(g,/[ \t]+--\x3e[ \t]+/g),l=JC(g),null==k||null==n||null==l)Va("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 Sd(k,l,"");eq(g);for(k=gq(g);k;)LC(m,k,b),eq(g),k=gq(g);MC(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
1346
+ function KC(a){for(var b=t(Object.entries(ke)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Sd(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(le));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Sd(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1347
+ function MC(a,b,c){if(a.includes("<")){0===c.size&&KC(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(NC)&&a.push(e),e=-1);a=t(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===
1348
+ 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=t(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=OC(a);try{var m=fh("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
1349
+ m.next())PC(a.value,b,c);else b.payload=Gc(a);else b.payload=Gc(a)}else b.payload=Gc(a)}function OC(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 QC(a,b){return a&&0<a.length?a:b}
1350
+ function PC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Kd;d.position=null;d.size=0;if(a.tagName)for(var e=t(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=QC(g.backgroundColor,d.backgroundColor),d.color=QC(g.color,d.color),d.fontFamily=QC(g.fontFamily,d.fontFamily),d.fontSize=
1351
+ QC(g.fontSize,d.fontSize),d.textShadow=QC(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=de(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;
1352
+ if(!f)break;if(f=JC(new dq(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(jh(a)||1==e.length&&jh(e[0]))for(c=nh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=de(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Gc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())PC(a.value,d,c)}
1353
+ function LC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Ud:a.textAlign=he[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"==
1354
+ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Td);else if(d=/^region:(.*)$/.exec(b)){if(b=RC(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=je[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Xd,a.line=Number(c[1]),c[2]&&(a.lineAlign=je[c[2].toUpperCase()])}
1355
+ function RC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function JC(a){a=fq(a,NC);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",IC);IC.prototype.parseMedia=IC.prototype.parseMedia;IC.prototype.setManifestType=IC.prototype.setManifestType;IC.prototype.setSequenceMode=IC.prototype.setSequenceMode;IC.prototype.parseInit=IC.prototype.parseInit;var NC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
1356
+ Qe["text/vtt"]=function(){return new IC};Qe['text/vtt; codecs="vtt"']=function(){return new IC};Qe['text/vtt; codecs="wvtt"']=function(){return new IC};function SC(){this.g=null}SC.prototype.parseInit=function(a){var b=this,c=!1;(new Sg).box("moov",Xg).box("trak",Xg).box("mdia",Xg).Z("mdhd",function(d){d=cj(d.reader,d.version);b.g=d.timescale}).box("minf",Xg).box("stbl",Xg).Z("stsd",Zg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};SC.prototype.setSequenceMode=function(){};SC.prototype.setManifestType=function(){};
1357
+ SC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Sg).box("moof",Xg).box("traf",Xg).Z("tfdt",function(C){g=!0;c=bj(C.reader,C.version).baseMediaDecodeTime}).Z("tfhd",function(C){l=aj(C.reader,C.flags).Vd}).Z("trun",function(C){h=!0;d=dj(C.reader,C.version,C.flags).wi}).box("mdat",bh(function(C){k=!0;e=C})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Pg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
1358
+ p.value;var r=p.hh||l,u=p.zf?c+p.zf:a;a=u+(r||0);var w=0;do{var v=m.V();w+=v;var A=m.V(),z=null;"vttc"==Wg(A)?8<v&&(z=m.Rb(v-8)):m.skip(v-8);r&&z&&(v=TC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(v))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(Ye)};function TC(a,b,c){var d,e,f;(new Sg).box("payl",bh(function(g){d=zc(g)})).box("iden",bh(function(g){e=zc(g)})).box("sttg",bh(function(g){f=zc(g)})).parse(a);return d?UC(d,e,f,b,c):null}
1359
+ function UC(a,b,c,d,e){d=new Sd(d,e,"");MC(a,d,new Map);b&&(d.id=b);if(c)for(a=new dq(c),b=gq(a);b;)LC(d,b,[]),eq(a),b=gq(a);return d}P("shaka.text.Mp4VttParser",SC);SC.prototype.parseMedia=SC.prototype.parseMedia;SC.prototype.setManifestType=SC.prototype.setManifestType;SC.prototype.setSequenceMode=SC.prototype.setSequenceMode;SC.prototype.parseInit=SC.prototype.parseInit;Qe['application/mp4; codecs="wvtt"']=function(){return new SC};function VC(){}VC.prototype.parseInit=function(){};VC.prototype.setSequenceMode=function(){};VC.prototype.setManifestType=function(){};VC.prototype.parseMedia=function(a){var b=zc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new dq(c[0]),e=WC(d),f=fq(d,/,/g);d=WC(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Sd(e,d,c.slice(1).join("\n").trim()))}return a};
1360
+ function WC(a){a=fq(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",VC);VC.prototype.parseMedia=VC.prototype.parseMedia;VC.prototype.setManifestType=VC.prototype.setManifestType;VC.prototype.setSequenceMode=VC.prototype.setSequenceMode;VC.prototype.parseInit=VC.prototype.parseInit;Qe["text/x-subviewer"]=function(){return new VC};function XC(){this.g=new IC}XC.prototype.parseInit=function(){};XC.prototype.setSequenceMode=function(){};XC.prototype.setManifestType=function(){};XC.prototype.parseMedia=function(a,b,c){a=zc(a);a=YC(a);a=Hb(Dc(a));return this.g.parseMedia(a,b,c)};
1361
+ function YC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(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",XC);XC.srt2webvtt=YC;XC.prototype.parseMedia=XC.prototype.parseMedia;
1362
+ XC.prototype.setManifestType=XC.prototype.setManifestType;XC.prototype.setSequenceMode=XC.prototype.setSequenceMode;XC.prototype.parseInit=XC.prototype.parseInit;Qe["text/srt"]=function(){return new XC};function ZC(){}ZC.prototype.parseInit=function(){};ZC.prototype.setSequenceMode=function(){};ZC.prototype.setManifestType=function(){};
1363
+ ZC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=zc(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=$C.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(f=b.next();!f.done;f=b.next())if(a=f.value,!/^\s*;/.test(a)&&(f=aD.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(bD);else if("Style"==a){a=f.split(bD);f={};for(var g=0;g<e.length&&
1364
+ g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;a={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;a={Uf:a.Uf},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=aD.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(bD);else if("Dialogue"==f){g=g.split(bD);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=cD(f.Start);var k=cD(f.End);g=new Sd(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Uf=f.Style;(f=d.find(function(l){return function(m){return m.Name==
1365
+ l.Uf}}(a)))&&dD(g,f);e.push(g)}return e};
1366
+ function dD(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=eD(c))a.color=c;if(c=b.BackColour)if(c=eD(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=Zd;a.textAlign="start";break;case 2:a.displayAlign=Zd;a.textAlign=Ud;break;case 3:a.displayAlign=Zd;a.textAlign="end";
1367
1367
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Ud;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=Ud;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
1368
- function dD(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 bD(a){a=eD.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",YC);YC.prototype.parseMedia=YC.prototype.parseMedia;YC.prototype.setManifestType=YC.prototype.setManifestType;YC.prototype.setSequenceMode=YC.prototype.setSequenceMode;YC.prototype.parseInit=YC.prototype.parseInit;
1369
- var ZC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,$C=/^\s*([^:]+):\s*(.*)/,aD=/\s*,\s*/,eD=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Qe["text/x-ssa"]=function(){return new YC};function fD(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)?{cf:c,na:a}:null}function gD(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,gb:"mp4a.40."+e}}
1370
- function hD(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}
1371
- function iD(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,
1372
- 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 jD(a){this.i=a;this.h=0;this.g=new Map}q=jD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?wd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Me(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
1373
- q.transmux=function(a,b,c,d){for(var e=Hb(a),f=$i(e),g=f.length;g<e.length&&!hD(e,g);g++);a=1E3*c.endTime;f=Zi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=gD(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=fD(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));var l=k.cf+k.na;g+l<=e.length&&h.push({data:e.subarray(g+
1374
- k.cf,g+l),size:k.na,duration:1024,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.gb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:a,ub:h},stream:b};c=new jx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=px(c),this.g.set(b.id,d));b=Sx(c);this.h++;b=Nc(d,b);return Promise.resolve(b)};
1375
- P("shaka.transmuxer.AacTransmuxer",jD);jD.prototype.transmux=jD.prototype.transmux;jD.prototype.getOriginalMimeType=jD.prototype.getOriginalMimeType;jD.prototype.convertCodecs=jD.prototype.convertCodecs;jD.prototype.isSupported=jD.prototype.isSupported;jD.prototype.destroy=jD.prototype.destroy;oe("audio/aac",function(){return new jD("audio/aac")},ue);function kD(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,
1368
+ function eD(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 cD(a){a=fD.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",ZC);ZC.prototype.parseMedia=ZC.prototype.parseMedia;ZC.prototype.setManifestType=ZC.prototype.setManifestType;ZC.prototype.setSequenceMode=ZC.prototype.setSequenceMode;ZC.prototype.parseInit=ZC.prototype.parseInit;
1369
+ var $C=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,aD=/^\s*([^:]+):\s*(.*)/,bD=/\s*,\s*/,fD=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Qe["text/x-ssa"]=function(){return new ZC};function gD(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)?{cf:c,na:a}:null}function hD(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,gb:"mp4a.40."+e}}
1370
+ function iD(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}
1371
+ function jD(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,
1372
+ 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 kD(a){this.i=a;this.h=0;this.g=new Map}q=kD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?wd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Me(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
1373
+ q.transmux=function(a,b,c,d){for(var e=Hb(a),f=$i(e),g=f.length;g<e.length&&!iD(e,g);g++);a=1E3*c.endTime;f=Zi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=hD(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=gD(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));var l=k.cf+k.na;g+l<=e.length&&h.push({data:e.subarray(g+
1374
+ k.cf,g+l),size:k.na,duration:1024,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.gb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:a,ub:h},stream:b};c=new kx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=qx(c),this.g.set(b.id,d));b=Tx(c);this.h++;b=Nc(d,b);return Promise.resolve(b)};
1375
+ P("shaka.transmuxer.AacTransmuxer",kD);kD.prototype.transmux=kD.prototype.transmux;kD.prototype.getOriginalMimeType=kD.prototype.getOriginalMimeType;kD.prototype.convertCodecs=kD.prototype.convertCodecs;kD.prototype.isSupported=kD.prototype.isSupported;kD.prototype.destroy=kD.prototype.destroy;oe("audio/aac",function(){return new kD("audio/aac")},ue);function lD(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,
1376
1376
  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,Ca:a,na:e}}
1377
- function lD(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 mD(a){this.i=a;this.h=0;this.g=new Map}q=mD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?wd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
1378
- q.transmux=function(a,b,c,d){a=Hb(a);for(var e=$i(a),f=e.length;f<a.length&&!lD(a,f);f++);var g=1E3*c.endTime;e=Zi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=kD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ca;k.push({data:a.subarray(f,f+l.na),size:l.na,duration:1536,
1379
- yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}});f+=l.na}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,wb:[],Ca:h,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:c,ub:k},stream:b};c=new jx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=px(c),this.g.set(b.id,d));b=Sx(c);this.h++;b=Nc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",mD);mD.prototype.transmux=mD.prototype.transmux;
1380
- mD.prototype.getOriginalMimeType=mD.prototype.getOriginalMimeType;mD.prototype.convertCodecs=mD.prototype.convertCodecs;mD.prototype.isSupported=mD.prototype.isSupported;mD.prototype.destroy=mD.prototype.destroy;oe("audio/ac3",function(){return new mD("audio/ac3")},ue);function nD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new jj(a.subarray(b+2));lj(c,2);lj(c,3);var d=mj(c,11)+1<<1,e=mj(c,2);if(3==e){e=mj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=mj(c,2);var g=mj(c,3),h=mj(c,1);c=mj(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,Ca:a,na:d}};function oD(a){this.i=a;this.h=0;this.g=new Map}q=oD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?wd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
1381
- q.transmux=function(a,b,c,d){a=Hb(a);for(var e=$i(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Zi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=nD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ca;k.push({data:a.subarray(f,f+l.na),
1382
- size:l.na,duration:1536,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}});f+=l.na}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,wb:[],Ca:h,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:c,ub:k},stream:b};c=new jx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=px(c),this.g.set(b.id,d));b=Sx(c);this.h++;b=Nc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",oD);oD.prototype.transmux=oD.prototype.transmux;
1383
- oD.prototype.getOriginalMimeType=oD.prototype.getOriginalMimeType;oD.prototype.convertCodecs=oD.prototype.convertCodecs;oD.prototype.isSupported=oD.prototype.isSupported;oD.prototype.destroy=oD.prototype.destroy;oe("audio/ec3",function(){return new oD("audio/ec3")},ue);function pD(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 jj(b.data),d=rj(c);rj(c);rj(c);oj(c);if(qD.includes(d)&&(d=V(c),3===d&&lj(c,1),oj(c),oj(c),lj(c,1),qj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)qj(c)&&(6>e?sj(c,16):sj(c,64))}oj(c);d=V(c);if(0===d)V(c);else if(1===d)for(lj(c,1),oj(c),oj(c),d=V(c),e=0;e<d;e++)oj(c);oj(c);lj(c,1);var f=V(c),g=V(c),h=mj(c,1);0===h&&lj(c,1);lj(c,1);var k=0,l=0,m=0,n=0;
1377
+ function mD(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 nD(a){this.i=a;this.h=0;this.g=new Map}q=nD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?wd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
1378
+ q.transmux=function(a,b,c,d){a=Hb(a);for(var e=$i(a),f=e.length;f<a.length&&!mD(a,f);f++);var g=1E3*c.endTime;e=Zi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=lD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ca;k.push({data:a.subarray(f,f+l.na),size:l.na,duration:1536,
1379
+ yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}});f+=l.na}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,wb:[],Ca:h,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:c,ub:k},stream:b};c=new kx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=qx(c),this.g.set(b.id,d));b=Tx(c);this.h++;b=Nc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",nD);nD.prototype.transmux=nD.prototype.transmux;
1380
+ nD.prototype.getOriginalMimeType=nD.prototype.getOriginalMimeType;nD.prototype.convertCodecs=nD.prototype.convertCodecs;nD.prototype.isSupported=nD.prototype.isSupported;nD.prototype.destroy=nD.prototype.destroy;oe("audio/ac3",function(){return new nD("audio/ac3")},ue);function oD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new jj(a.subarray(b+2));lj(c,2);lj(c,3);var d=mj(c,11)+1<<1,e=mj(c,2);if(3==e){e=mj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=mj(c,2);var g=mj(c,3),h=mj(c,1);c=mj(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,Ca:a,na:d}};function pD(a){this.i=a;this.h=0;this.g=new Map}q=pD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?wd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
1381
+ q.transmux=function(a,b,c,d){a=Hb(a);for(var e=$i(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Zi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=oD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ca;k.push({data:a.subarray(f,f+l.na),
1382
+ size:l.na,duration:1536,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}});f+=l.na}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,wb:[],Ca:h,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:c,ub:k},stream:b};c=new kx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=qx(c),this.g.set(b.id,d));b=Tx(c);this.h++;b=Nc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",pD);pD.prototype.transmux=pD.prototype.transmux;
1383
+ pD.prototype.getOriginalMimeType=pD.prototype.getOriginalMimeType;pD.prototype.convertCodecs=pD.prototype.convertCodecs;pD.prototype.isSupported=pD.prototype.isSupported;pD.prototype.destroy=pD.prototype.destroy;oe("audio/ec3",function(){return new pD("audio/ec3")},ue);function qD(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 jj(b.data),d=rj(c);rj(c);rj(c);oj(c);if(rD.includes(d)&&(d=V(c),3===d&&lj(c,1),oj(c),oj(c),lj(c,1),qj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)qj(c)&&(6>e?sj(c,16):sj(c,64))}oj(c);d=V(c);if(0===d)V(c);else if(1===d)for(lj(c,1),oj(c),oj(c),d=V(c),e=0;e<d;e++)oj(c);oj(c);lj(c,1);var f=V(c),g=V(c),h=mj(c,1);0===h&&lj(c,1);lj(c,1);var k=0,l=0,m=0,n=0;
1384
1384
  qj(c)&&(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(qj(c)&&qj(c)){var p=rj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=mj(c,16),e=mj(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,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],
1385
1385
  k[5],255,225].concat(k,[1],b));return{height:c,width:f,Qa:a,Va:d,Wa:e}}
1386
- function rD(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(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=tj(new jj(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?
1387
- {data:Nc.apply(Hc,x(c)),fe:b}:null}var qD=[100,110,122,244,44,83,86,118,128,138,139,134];function sD(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=tD(b.fullData);a=uD(c.fullData);var f=vD(d.fullData);b=wD(b.fullData,c.fullData,d.fullData,{Yg:e.Yg,xh:e.xh,Fg:a.Fg,Gg:a.Gg,zg:a.zg,Eg:a.Eg,Ag:a.Ag,Bg:a.Bg,Cg:a.Cg,Dg:a.Dg,sg:a.sg,ug:a.ug,vg:a.vg,wg:a.wg,xg:a.xg,yg:a.yg,ng:a.ng,rf:a.rf,lg:a.lg,hg:a.hg,gg:a.gg,ah:f.ah});return{height:a.height,width:a.width,
1388
- Qa:b,Va:a.Hk,Wa:a.Gk}}function tD(a){var b=new jj(a,!0);rj(b);rj(b);mj(b,4);mj(b,2);mj(b,6);a=mj(b,3);b=qj(b);return{Yg:a+1,xh:b}}
1389
- function uD(a){a=new jj(a,!0);rj(a);rj(a);var b=0,c=0,d=0,e=0;mj(a,4);var f=mj(a,3);qj(a);for(var g=mj(a,2),h=mj(a,1),k=mj(a,5),l=rj(a),m=rj(a),n=rj(a),p=rj(a),r=rj(a),u=rj(a),w=rj(a),v=rj(a),A=rj(a),z=rj(a),C=rj(a),y=[],B=[],D=0;D<f;D++)y.push(qj(a)),B.push(qj(a));if(0<f)for(D=f;8>D;D++)mj(a,2);for(D=0;D<f;D++)y[D]&&mj(a,88),B[D]&&rj(a);V(a);y=V(a);3==y&&mj(a,1);B=V(a);D=V(a);qj(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var F=V(a),J=V(a),L=V(a);if(qj(a))for(var H=0;H<=f;H++)V(a),V(a),V(a);else V(a),
1386
+ function sD(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(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=tj(new jj(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?
1387
+ {data:Nc.apply(Hc,x(c)),fe:b}:null}var rD=[100,110,122,244,44,83,86,118,128,138,139,134];function tD(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=uD(b.fullData);a=vD(c.fullData);var f=wD(d.fullData);b=xD(b.fullData,c.fullData,d.fullData,{Yg:e.Yg,xh:e.xh,Fg:a.Fg,Gg:a.Gg,zg:a.zg,Eg:a.Eg,Ag:a.Ag,Bg:a.Bg,Cg:a.Cg,Dg:a.Dg,sg:a.sg,ug:a.ug,vg:a.vg,wg:a.wg,xg:a.xg,yg:a.yg,ng:a.ng,rf:a.rf,lg:a.lg,hg:a.hg,gg:a.gg,ah:f.ah});return{height:a.height,width:a.width,
1388
+ Qa:b,Va:a.Hk,Wa:a.Gk}}function uD(a){var b=new jj(a,!0);rj(b);rj(b);mj(b,4);mj(b,2);mj(b,6);a=mj(b,3);b=qj(b);return{Yg:a+1,xh:b}}
1389
+ function vD(a){a=new jj(a,!0);rj(a);rj(a);var b=0,c=0,d=0,e=0;mj(a,4);var f=mj(a,3);qj(a);for(var g=mj(a,2),h=mj(a,1),k=mj(a,5),l=rj(a),m=rj(a),n=rj(a),p=rj(a),r=rj(a),u=rj(a),w=rj(a),v=rj(a),A=rj(a),z=rj(a),C=rj(a),y=[],B=[],D=0;D<f;D++)y.push(qj(a)),B.push(qj(a));if(0<f)for(D=f;8>D;D++)mj(a,2);for(D=0;D<f;D++)y[D]&&mj(a,88),B[D]&&rj(a);V(a);y=V(a);3==y&&mj(a,1);B=V(a);D=V(a);qj(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var F=V(a),J=V(a),L=V(a);if(qj(a))for(var H=0;H<=f;H++)V(a),V(a),V(a);else V(a),
1390
1390
  V(a),V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(qj(a)&&qj(a))for(H=0;4>H;H++)for(var E=0;E<(3===H?2:6);E++)if(qj(a)){var K=Math.min(64,1<<4+(H<<1));1<H&&pj(a);for(var M=0;M<K;M++)pj(a)}else V(a);qj(a);qj(a);qj(a)&&(rj(a),V(a),V(a),qj(a));H=V(a);for(K=E=0;K<H;K++)if(M=!1,0!==K&&(M=qj(a)),M){K===H&&V(a);qj(a);V(a);for(var N=M=0;N<=E;N++){var Q=qj(a),U=!1;Q||(U=qj(a));(Q||U)&&M++}E=M}else{N=V(a);M=V(a);E=N+M;for(Q=0;Q<N;Q++)V(a),qj(a);for(N=0;N<M;N++)V(a),qj(a)}if(qj(a))for(H=V(a),E=0;E<H;E++){for(K=0;K<
1391
1391
  L+4;K++)mj(a,1);mj(a,1)}H=L=1;E=0;qj(a);qj(a);if(qj(a)){qj(a)&&(K=rj(a),M=[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<K&&16>=K?(L=M[K-1],H=N[K-1]):255===K&&(L=mj(a,16),H=mj(a,16)));qj(a)&&qj(a);qj(a)&&(mj(a,3),qj(a),qj(a)&&(rj(a),rj(a),rj(a)));qj(a)&&(V(a),V(a));qj(a);qj(a);qj(a);if(K=qj(a))V(a),V(a),V(a),V(a);if(qj(a)&&(mj(a,32),mj(a,32),qj(a)&&V(a),qj(a))){N=!1;K=qj(a);M=qj(a);if(K||M){if(N=qj(a))rj(a),mj(a,5),qj(a),mj(a,5);mj(a,4);mj(a,4);N&&
1392
1392
  mj(a,4);mj(a,5);mj(a,5);mj(a,5)}for(Q=0;Q<=f;Q++){var R=!0;U=1;qj(a)||(R=qj(a));var ca=!1;R?V(a):ca=qj(a);ca||(U=V(a)+1);if(K){for(R=0;R<U;R++)V(a),V(a),N&&(V(a),V(a));qj(a)}if(M){for(R=0;R<U;R++)V(a),V(a),N&&(V(a),V(a));qj(a)}}}qj(a)&&(qj(a),qj(a),qj(a),E=V(a),V(a),V(a),V(a),V(a))}return{zg:C,Fg:g,Gg:h,Eg:k,Ag:l,Bg:m,Cg:n,Dg:p,sg:r,ug:u,vg:w,wg:v,xg:A,yg:z,rf:E,ng:0,lg:y,hg:F,gg:J,width:B-(b+c)*(1===y||2===y?2:1),height:D-(d+e)*(1===y?2:1),Hk:L,Gk:H}}
1393
- function vD(a){var b=new jj(a,!0);rj(b);rj(b);V(b);V(b);qj(b);qj(b);mj(b,3);qj(b);qj(b);V(b);V(b);pj(b);qj(b);qj(b);qj(b)&&V(b);pj(b);pj(b);qj(b);qj(b);qj(b);qj(b);a=qj(b);b=qj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{ah:c}}
1394
- function wD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Fg&3)<<6|(d.Gg?1:0)<<5|d.Eg&31;e[2]=d.Ag;e[3]=d.Bg;e[4]=d.Cg;e[5]=d.Dg;e[6]=d.sg;e[7]=d.ug;e[8]=d.vg;e[9]=d.wg;e[10]=d.xg;e[11]=d.yg;e[12]=d.zg;e[13]=240|(d.rf&3840)>>8;e[14]=d.rf&255;e[15]=252|d.ah&3;e[16]=252|d.lg&3;e[17]=248|d.hg&7;e[18]=248|d.gg&7;e[19]=0;e[20]=0;e[21]=(d.ng&3)<<6|(d.Yg&7)<<3|(d.xh?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&
1395
- 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 xD(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*yD[14*(3===c?3-d:3===d?3:4)+e-1];f=zD[3*(3===c?0:2===c?1:2)+f];c=AD[c][d];var h=BD[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,na:k,Fk:8*c*h}}return null}
1396
- function CD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function DD(a,b){if(b+1<a.length&&CD(a,b)){var c=xD(a,b),d=4;c&&c.na&&(d=c.na);b+=d;return b===a.length||b+1<a.length&&CD(a,b)}return!1}
1397
- var yD=[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],zD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],AD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BD=[0,1,1,4];function ED(a){this.i=a;this.h=0;this.g=new Map}q=ED.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?wd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
1398
- q.transmux=function(a,b,c,d){for(var e=Hb(a),f=$i(e).length;f<e.length&&!DD(e,f);f++);var g;for(a=[];f<e.length;){var h=xD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));g||(g=h);f+h.na<=e.length&&a.push({data:e.subarray(f,f+h.na),size:h.na,duration:1152,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}});f+=h.na}if(!g)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));c=9E4*g.Fk/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1399
- duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:c,ub:a},stream:b};g=new jx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=px(g),this.g.set(b.id,d));b=Sx(g);this.h++;b=Nc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",ED);ED.prototype.transmux=ED.prototype.transmux;ED.prototype.getOriginalMimeType=ED.prototype.getOriginalMimeType;ED.prototype.convertCodecs=ED.prototype.convertCodecs;ED.prototype.isSupported=ED.prototype.isSupported;
1400
- ED.prototype.destroy=ED.prototype.destroy;oe("audio/mpeg",function(){return new ED("audio/mpeg")},ue);function FD(a){this.h=a;this.g=null}q=FD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Me(a).split(","),c=Sc("audio",b);b=Sc("video",b);return!c||b||"mp3"!=De(c)?!1:wd(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
1401
- q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new uj;a=Hb(a);a=this.g.parse(a);if("mp3"!=a.Wd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));c=new Uint8Array([]);e=t(a.rc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=xD(a,b))?(b+d.na<=a.length&&(c=Nc(c,a.subarray(b,b+d.na))),b+=d.na):b++;return Promise.resolve(c)};P("shaka.transmuxer.MpegTsTransmuxer",FD);FD.prototype.transmux=FD.prototype.transmux;
1402
- FD.prototype.getOriginalMimeType=FD.prototype.getOriginalMimeType;FD.prototype.convertCodecs=FD.prototype.convertCodecs;FD.prototype.isSupported=FD.prototype.isSupported;FD.prototype.destroy=FD.prototype.destroy;oe("video/mp2t",function(){return new FD("video/mp2t")},te);/*
1393
+ function wD(a){var b=new jj(a,!0);rj(b);rj(b);V(b);V(b);qj(b);qj(b);mj(b,3);qj(b);qj(b);V(b);V(b);pj(b);qj(b);qj(b);qj(b)&&V(b);pj(b);pj(b);qj(b);qj(b);qj(b);qj(b);a=qj(b);b=qj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{ah:c}}
1394
+ function xD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Fg&3)<<6|(d.Gg?1:0)<<5|d.Eg&31;e[2]=d.Ag;e[3]=d.Bg;e[4]=d.Cg;e[5]=d.Dg;e[6]=d.sg;e[7]=d.ug;e[8]=d.vg;e[9]=d.wg;e[10]=d.xg;e[11]=d.yg;e[12]=d.zg;e[13]=240|(d.rf&3840)>>8;e[14]=d.rf&255;e[15]=252|d.ah&3;e[16]=252|d.lg&3;e[17]=248|d.hg&7;e[18]=248|d.gg&7;e[19]=0;e[20]=0;e[21]=(d.ng&3)<<6|(d.Yg&7)<<3|(d.xh?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&
1395
+ 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 yD(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*zD[14*(3===c?3-d:3===d?3:4)+e-1];f=AD[3*(3===c?0:2===c?1:2)+f];c=BD[c][d];var h=CD[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,na:k,Fk:8*c*h}}return null}
1396
+ function DD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function ED(a,b){if(b+1<a.length&&DD(a,b)){var c=yD(a,b),d=4;c&&c.na&&(d=c.na);b+=d;return b===a.length||b+1<a.length&&DD(a,b)}return!1}
1397
+ var zD=[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],AD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],BD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],CD=[0,1,1,4];function FD(a){this.i=a;this.h=0;this.g=new Map}q=FD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?wd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
1398
+ q.transmux=function(a,b,c,d){for(var e=Hb(a),f=$i(e).length;f<e.length&&!ED(e,f);f++);var g;for(a=[];f<e.length;){var h=yD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));g||(g=h);f+h.na<=e.length&&a.push({data:e.subarray(f,f+h.na),size:h.na,duration:1152,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}});f+=h.na}if(!g)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));c=9E4*g.Fk/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1399
+ duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:c,ub:a},stream:b};g=new kx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=qx(g),this.g.set(b.id,d));b=Tx(g);this.h++;b=Nc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",FD);FD.prototype.transmux=FD.prototype.transmux;FD.prototype.getOriginalMimeType=FD.prototype.getOriginalMimeType;FD.prototype.convertCodecs=FD.prototype.convertCodecs;FD.prototype.isSupported=FD.prototype.isSupported;
1400
+ FD.prototype.destroy=FD.prototype.destroy;oe("audio/mpeg",function(){return new FD("audio/mpeg")},ue);function GD(a){this.h=a;this.g=null}q=GD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Me(a).split(","),c=Sc("audio",b);b=Sc("video",b);return!c||b||"mp3"!=De(c)?!1:wd(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
1401
+ q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new uj;a=Hb(a);a=this.g.parse(a);if("mp3"!=a.Wd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));c=new Uint8Array([]);e=t(a.rc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=yD(a,b))?(b+d.na<=a.length&&(c=Nc(c,a.subarray(b,b+d.na))),b+=d.na):b++;return Promise.resolve(c)};P("shaka.transmuxer.MpegTsTransmuxer",GD);GD.prototype.transmux=GD.prototype.transmux;
1402
+ GD.prototype.getOriginalMimeType=GD.prototype.getOriginalMimeType;GD.prototype.convertCodecs=GD.prototype.convertCodecs;GD.prototype.isSupported=GD.prototype.isSupported;GD.prototype.destroy=GD.prototype.destroy;oe("video/mp2t",function(){return new GD("video/mp2t")},te);/*
1403
1403
  @license
1404
1404
  MSS Transmuxer
1405
1405
  Copyright 2015 Dash Industry Forum
1406
1406
  SPDX-License-Identifier: BSD-3-Clause
1407
1407
  */
1408
- function GD(a){this.h=a;(this.g=sv.get("ISOBoxer")())&&HD(this)}
1409
- function HD(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",
1408
+ function HD(a){this.h=a;(this.g=tv.get("ISOBoxer")())&&ID(this)}
1409
+ function ID(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",
1410
1410
  "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",
1411
- "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]!==ID[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=GD.prototype;q.destroy=function(){};
1411
+ "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]!==JD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=HD.prototype;q.destroy=function(){};
1412
1412
  q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return wd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return wd(b)||wd(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
1413
1413
  q.transmux=function(a,b,c){if(!c)return Promise.resolve(Hb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.R()[0]:null));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");
1414
1414
  m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
1415
- 8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=JD(u,"traf")+JD(h,"senc")+16);var v=Hb(e.write());return Promise.resolve(v)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.R()[0]:null))}};function JD(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",GD);GD.prototype.transmux=GD.prototype.transmux;
1416
- GD.prototype.getOriginalMimeType=GD.prototype.getOriginalMimeType;GD.prototype.convertCodecs=GD.prototype.convertCodecs;GD.prototype.isSupported=GD.prototype.isSupported;GD.prototype.destroy=GD.prototype.destroy;var ID=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);oe("mss/audio/mp4",function(){return new GD("mss/audio/mp4")},ue);oe("mss/video/mp4",function(){return new GD("mss/video/mp4")},ue);function KD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=KD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1417
- q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Me(c).split(",");c=Sc("audio",d);d=Sc("video",d);if(c&&(c=De(c),!LD.includes(c))||d&&(c=De(d),!MD.includes(c)))return!1;if(b)return wd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return wd(b)||wd(a)};
1415
+ 8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=KD(u,"traf")+KD(h,"senc")+16);var v=Hb(e.write());return Promise.resolve(v)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.R()[0]:null))}};function KD(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",HD);HD.prototype.transmux=HD.prototype.transmux;
1416
+ HD.prototype.getOriginalMimeType=HD.prototype.getOriginalMimeType;HD.prototype.convertCodecs=HD.prototype.convertCodecs;HD.prototype.isSupported=HD.prototype.isSupported;HD.prototype.destroy=HD.prototype.destroy;var JD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);oe("mss/audio/mp4",function(){return new HD("mss/audio/mp4")},ue);oe("mss/video/mp4",function(){return new HD("mss/video/mp4")},ue);function LD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=LD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1417
+ q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Me(c).split(",");c=Sc("audio",d);d=Sc("video",d);if(c&&(c=De(c),!MD.includes(c))||d&&(c=De(d),!ND.includes(c)))return!1;if(b)return wd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return wd(b)||wd(a)};
1418
1418
  q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Me(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return pf(c,"audio/mp4")}).map(of).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
1419
- q.transmux=function(a,b,c,d,e){var f=Hb(a);if("audio"==e&&!Ej(f)){for(var g=$i(f),h=g.length;h<f.length;h++)if(DD(f,h))return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));for(h=g.length;h<f.length;h++)if(hD(f,h))return this.h||(this.h=new jD("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.R()[0]:null))}this.j?this.j.clearData():this.j=new uj;var k=this.j.parse(f),l=[],m=k.Wd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],w=k.jd();
1420
- if(!w.length)throw new T(2,3,3023,c?c.R()[0]:null);for(var v=0;v<w.length;v++){var A=w[v],z=A.nalus;u.push.apply(u,x(z));var C=rD(z);if(C){null==r&&(r=A.dts);var y=void 0;y=v+1<w.length?(w[v+1].dts||0)-(A.dts||0):1<w.length?(A.dts||0)-(w[v-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:C.data,size:C.data.byteLength,duration:y,yb:Math.round((A.pts||0)-(A.dts||0)),flags:{zb:0,qb:0,pb:0,kb:0,mb:C.fe?2:1,Ab:C.fe?0:1}})}}var B=pD(u);if(!B||null==r)throw new T(2,3,3018,c?c.R()[0]:null);b.height=B.height;
1421
- b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,wb:[],Ca:new Uint8Array([]),Qa:B.Qa,Va:B.Va,Wa:B.Wa,data:{Sb:this.g,baseMediaDecodeTime:r,ub:p},stream:b};break;case "hvc":var D=[],F=null,J=[],L=k.jd();if(!L.length)throw new T(2,3,3023,c?c.R()[0]:null);for(var H=0;H<L.length;H++){var E=L[H],K=E.nalus;J.push.apply(J,x(K));for(var M=!1,N=[],Q=!1,U=t(K),R=U.next();!R.done;R=U.next()){var ca=R.value;switch(ca.type){case 1:case 0:var fa=
1422
- Q=!0;break;case 19:case 20:case 21:M=fa=Q=!0;break;case 32:fa=!0;break;case 33:fa=!0;break;case 34:fa=!0;break;case 35:Q=fa=!0;break;case 39:case 40:fa=!0;break;default:fa=!1}if(Q&&fa){var Xa=ca.fullData.byteLength,Aa=new Uint8Array(4);Aa[0]=Xa>>24&255;Aa[1]=Xa>>16&255;Aa[2]=Xa>>8&255;Aa[3]=Xa&255;N.push(Aa);N.push(ca.fullData)}}var Ra=N.length?{data:Nc.apply(Hc,x(N)),fe:M}:null;if(Ra){null==F&&null!=E.dts&&(F=E.dts);var bb=void 0;bb=H+1<L.length?(L[H+1].dts||0)-(E.dts||0):1<L.length?(E.dts||0)-(L[H-
1423
- 1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ra.data,size:Ra.data.byteLength,duration:bb,yb:Math.round((E.pts||0)-(E.dts||0)),flags:{zb:0,qb:0,pb:0,kb:0,mb:Ra.fe?2:1,Ab:Ra.fe?0:1}})}}var Ya=sD(J);if(!Ya||null==F)throw new T(2,3,3018,c?c.R()[0]:null);b.height=Ya.height;b.width=Ya.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,wb:[],Ca:new Uint8Array([]),Qa:Ya.Qa,Va:Ya.Va,Wa:Ya.Wa,data:{Sb:this.g,baseMediaDecodeTime:F,ub:D},stream:b}}n&&
1424
- (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var mb=[],db,Za=null,wc=t(k.rc()),Ta=wc.next();!Ta.done;Ta=wc.next()){var tb=Ta.value,Yb=tb.data;if(Yb){var Xc=0;db=gD(Yb,Xc);if(!db)throw new T(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=db.sampleRate;b.channelsCount=db.channelCount;null==Za&&null!==tb.pts&&(Za=tb.pts);for(;Xc<Yb.length;){var Ee=fD(Yb,Xc);if(Ee){var Fe=Ee.cf+Ee.na;Xc+Fe<=Yb.length&&mb.push({data:Yb.subarray(Xc+Ee.cf,Xc+Fe),size:Ee.na,duration:1024,yb:0,flags:{zb:0,
1425
- qb:0,pb:0,kb:0,mb:2,Ab:0}});Xc+=Fe}else Xc++}}}if(!db||null==Za){if(!k.jd().length)throw new T(2,3,3018,c?c.R()[0]:null);Za=9E4*c.startTime;var Ge=Sc("audio",b.codecs.split(","));if(!Ge||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.R()[0]:null);db={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,gb:Ge};var ae=iD(Ge,b.channelsCount);if(!ae)throw new T(2,3,3018,c?c.R()[0]:null);for(var yj=Za+9E4*(c.endTime-c.startTime),be=Za;be<yj;)mb.push({data:ae,size:ae.byteLength,
1426
- duration:1024,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}}),be+=1024/db.sampleRate*9E4}var zj=db.sampleRate,Aj=Za/9E4*zj;n={id:b.id,type:"audio",codecs:db.gb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:zj,duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:Aj,ub:mb},stream:b};break;case "ac3":for(var mh=[],He=0,xc=new Uint8Array([]),jk=null,rx=t(k.rc()),co=rx.next();!co.done;co=rx.next()){var eo=co.value,fo=eo.data;null==jk&&null!==eo.pts&&
1427
- (jk=eo.pts);for(var Rf=0;Rf<fo.length;){var ee=kD(fo,Rf);ee?(b.audioSamplingRate=ee.sampleRate,b.channelsCount=ee.channelCount,He=ee.sampleRate,xc=ee.Ca,mh.push({data:fo.subarray(Rf,Rf+ee.na),size:ee.na,duration:1536,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}}),Rf+=ee.na):Rf++}}if(0==He||0==xc.byteLength||null==jk)throw new T(2,3,3018,c?c.R()[0]:null);var mH=jk/9E4*He;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:He,duration:d,wb:[],Ca:xc,Qa:new Uint8Array([]),
1428
- Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:mH,ub:mh},stream:b};break;case "ec3":for(var sx=[],kk=0,go=new Uint8Array([]),lk=null,tx=t(k.rc()),ho=tx.next();!ho.done;ho=tx.next()){var io=ho.value,jo=io.data;null==lk&&null!==io.pts&&(lk=io.pts);for(var Sf=0;Sf<jo.length;){var fe=nD(jo,Sf);fe?(b.audioSamplingRate=fe.sampleRate,b.channelsCount=fe.channelCount,kk=fe.sampleRate,go=fe.Ca,sx.push({data:jo.subarray(Sf,Sf+fe.na),size:fe.na,duration:1536,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}}),Sf+=fe.na):
1429
- Sf++}}if(0==kk||0==go.byteLength||null==lk)throw new T(2,3,3018,c?c.R()[0]:null);var nH=lk/9E4*kk;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:kk,duration:d,wb:[],Ca:go,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:nH,ub:sx},stream:b};break;case "mp3":for(var ux=[],mk,nk=null,vx=t(k.rc()),ko=vx.next();!ko.done;ko=vx.next()){var lo=ko.value,Ah=lo.data;if(Ah){null==nk&&null!==lo.pts&&(nk=lo.pts);for(var Ke=0;Ke<Ah.length;){var Tf=xD(Ah,
1430
- Ke);Tf?(mk||(mk=Tf),Ke+Tf.na<=Ah.length&&ux.push({data:Ah.subarray(Ke,Ke+Tf.na),size:Tf.na,duration:1152,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}}),Ke+=Tf.na):Ke++}}}if(!mk||null==nk)throw new T(2,3,3018,c?c.R()[0]:null);var wx=mk.sampleRate,oH=nk/9E4*wx;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:wx,duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:oH,ub:ux},stream:b};break;case "opus":var xx=
1431
- [],ok=null,id=k.H;if(!id)throw new T(2,3,3018,c?c.R()[0]:null);var Kb=[];switch(id.bj){case 1:case 2:Kb=[0];break;case 0:Kb=[255,1,1,0,1];break;case 128:Kb=[255,2,0,0,1];break;case 3:Kb=[1,2,1,0,2,1];break;case 4:Kb=[1,2,2,0,1,2,3];break;case 5:Kb=[1,3,2,0,4,1,2,3];break;case 6:Kb=[1,4,2,0,4,1,2,3,5];break;case 7:Kb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Kb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Kb=[1,1,2,0,1];break;case 131:Kb=[1,1,3,0,1,2];break;case 132:Kb=[1,1,4,0,1,2,3];break;case 133:Kb=[1,1,5,
1432
- 0,1,2,3,4];break;case 134:Kb=[1,1,6,0,1,2,3,4,5];break;case 135:Kb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Kb=[1,1,8,0,1,2,3,4,5,6,7]}var yx=new Uint8Array([0,id.channelCount,0,0,id.sampleRate>>>24&255,id.sampleRate>>>17&255,id.sampleRate>>>8&255,id.sampleRate>>>0&255,0,0].concat(x(Kb)));for(var zx=id.sampleRate,Ax=t(k.rc()),mo=Ax.next();!mo.done;mo=Ax.next()){var no=mo.value,Uf=no.data;null==ok&&null!==no.pts&&(ok=no.pts);for(var Bh=0;Bh<Uf.length;){for(var pH=0!==(Uf[Bh+1]&16),qH=0!==(Uf[Bh+1]&8),
1433
- Md=Bh+2,pk=0;255===Uf[Md];)pk+=255,Md+=1;pk+=Uf[Md];Md+=1;Md+=pH?2:0;Md+=qH?2:0;var Bx=Uf.slice(Md,Md+pk);xx.push({data:Bx,size:Bx.byteLength,duration:960,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}});Bh=Md+pk}}if(0==yx.byteLength||null==ok)throw new T(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=id.sampleRate;b.channelsCount=id.channelCount;var rH=ok/9E4*zx;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:zx,duration:d,wb:[],Ca:yx,Qa:new Uint8Array([]),Va:0,
1434
- Wa:0,data:{Sb:this.g,baseMediaDecodeTime:rH,ub:xx},stream:b}}n&&(l.push(n),n=null)}}catch(oo){return oo&&3023==oo.code?Promise.resolve(new Uint8Array([])):Promise.reject(oo)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));var Cx=new jx(l);if(this.i.has(b.id))var po=this.i.get(b.id);else po=px(Cx),this.i.set(b.id,po);var sH=Sx(Cx);this.g++;var tH=Nc(po,sH);return Promise.resolve(tH)};P("shaka.transmuxer.TsTransmuxer",KD);KD.prototype.transmux=KD.prototype.transmux;
1435
- KD.prototype.getOriginalMimeType=KD.prototype.getOriginalMimeType;KD.prototype.convertCodecs=KD.prototype.convertCodecs;KD.prototype.isSupported=KD.prototype.isSupported;KD.prototype.destroy=KD.prototype.destroy;var LD=["aac","ac-3","ec-3","mp3","opus"],MD=["avc","hevc"];oe("video/mp2t",function(){return new KD("video/mp2t")},se);/*
1419
+ q.transmux=function(a,b,c,d,e){var f=Hb(a);if("audio"==e&&!Ej(f)){for(var g=$i(f),h=g.length;h<f.length;h++)if(ED(f,h))return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));for(h=g.length;h<f.length;h++)if(iD(f,h))return this.h||(this.h=new kD("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.R()[0]:null))}this.j?this.j.clearData():this.j=new uj;var k=this.j.parse(f),l=[],m=k.Wd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],w=k.kd();
1420
+ if(!w.length)throw new T(2,3,3023,c?c.R()[0]:null);for(var v=0;v<w.length;v++){var A=w[v],z=A.nalus;u.push.apply(u,x(z));var C=sD(z);if(C){null==r&&(r=A.dts);var y=void 0;y=v+1<w.length?(w[v+1].dts||0)-(A.dts||0):1<w.length?(A.dts||0)-(w[v-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:C.data,size:C.data.byteLength,duration:y,yb:Math.round((A.pts||0)-(A.dts||0)),flags:{zb:0,qb:0,pb:0,kb:0,mb:C.fe?2:1,Ab:C.fe?0:1}})}}var B=qD(u);if(!B||null==r)throw new T(2,3,3018,c?c.R()[0]:null);b.height=B.height;
1421
+ b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,wb:[],Ca:new Uint8Array([]),Qa:B.Qa,Va:B.Va,Wa:B.Wa,data:{Sb:this.g,baseMediaDecodeTime:r,ub:p},stream:b};break;case "hvc":var D=[],F=null,J=[],L=k.kd();if(!L.length)throw new T(2,3,3023,c?c.R()[0]:null);for(var H=0;H<L.length;H++){var E=L[H],K=E.nalus;J.push.apply(J,x(K));for(var M=!1,N=[],Q=!1,U=t(K),R=U.next();!R.done;R=U.next()){var ca=R.value;switch(ca.type){case 1:case 0:var fa=
1422
+ Q=!0;break;case 19:case 20:case 21:M=fa=Q=!0;break;case 32:fa=!0;break;case 33:fa=!0;break;case 34:fa=!0;break;case 35:Q=fa=!0;break;case 39:case 40:fa=!0;break;default:fa=!1}if(Q&&fa){var Xa=ca.fullData.byteLength,Aa=new Uint8Array(4);Aa[0]=Xa>>24&255;Aa[1]=Xa>>16&255;Aa[2]=Xa>>8&255;Aa[3]=Xa&255;N.push(Aa);N.push(ca.fullData)}}var Ra=N.length?{data:Nc.apply(Hc,x(N)),fe:M}:null;if(Ra){null==F&&null!=E.dts&&(F=E.dts);var cb=void 0;cb=H+1<L.length?(L[H+1].dts||0)-(E.dts||0):1<L.length?(E.dts||0)-(L[H-
1423
+ 1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ra.data,size:Ra.data.byteLength,duration:cb,yb:Math.round((E.pts||0)-(E.dts||0)),flags:{zb:0,qb:0,pb:0,kb:0,mb:Ra.fe?2:1,Ab:Ra.fe?0:1}})}}var Ya=tD(J);if(!Ya||null==F)throw new T(2,3,3018,c?c.R()[0]:null);b.height=Ya.height;b.width=Ya.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,wb:[],Ca:new Uint8Array([]),Qa:Ya.Qa,Va:Ya.Va,Wa:Ya.Wa,data:{Sb:this.g,baseMediaDecodeTime:F,ub:D},stream:b}}n&&
1424
+ (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var mb=[],$a,Za=null,wc=t(k.rc()),Ta=wc.next();!Ta.done;Ta=wc.next()){var tb=Ta.value,Yb=tb.data;if(Yb){var Xc=0;$a=hD(Yb,Xc);if(!$a)throw new T(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=$a.sampleRate;b.channelsCount=$a.channelCount;null==Za&&null!==tb.pts&&(Za=tb.pts);for(;Xc<Yb.length;){var Ee=gD(Yb,Xc);if(Ee){var Fe=Ee.cf+Ee.na;Xc+Fe<=Yb.length&&mb.push({data:Yb.subarray(Xc+Ee.cf,Xc+Fe),size:Ee.na,duration:1024,yb:0,flags:{zb:0,
1425
+ qb:0,pb:0,kb:0,mb:2,Ab:0}});Xc+=Fe}else Xc++}}}if(!$a||null==Za){if(!k.kd().length)throw new T(2,3,3018,c?c.R()[0]:null);Za=9E4*c.startTime;var Ge=Sc("audio",b.codecs.split(","));if(!Ge||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.R()[0]:null);$a={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,gb:Ge};var ae=jD(Ge,b.channelsCount);if(!ae)throw new T(2,3,3018,c?c.R()[0]:null);for(var zj=Za+9E4*(c.endTime-c.startTime),be=Za;be<zj;)mb.push({data:ae,size:ae.byteLength,
1426
+ duration:1024,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}}),be+=1024/$a.sampleRate*9E4}var Aj=$a.sampleRate,Bj=Za/9E4*Aj;n={id:b.id,type:"audio",codecs:$a.gb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aj,duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:Bj,ub:mb},stream:b};break;case "ac3":for(var mh=[],He=0,xc=new Uint8Array([]),kk=null,sx=t(k.rc()),eo=sx.next();!eo.done;eo=sx.next()){var fo=eo.value,go=fo.data;null==kk&&null!==fo.pts&&
1427
+ (kk=fo.pts);for(var Rf=0;Rf<go.length;){var ee=lD(go,Rf);ee?(b.audioSamplingRate=ee.sampleRate,b.channelsCount=ee.channelCount,He=ee.sampleRate,xc=ee.Ca,mh.push({data:go.subarray(Rf,Rf+ee.na),size:ee.na,duration:1536,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}}),Rf+=ee.na):Rf++}}if(0==He||0==xc.byteLength||null==kk)throw new T(2,3,3018,c?c.R()[0]:null);var nH=kk/9E4*He;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:He,duration:d,wb:[],Ca:xc,Qa:new Uint8Array([]),
1428
+ Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:nH,ub:mh},stream:b};break;case "ec3":for(var tx=[],lk=0,ho=new Uint8Array([]),mk=null,ux=t(k.rc()),io=ux.next();!io.done;io=ux.next()){var jo=io.value,ko=jo.data;null==mk&&null!==jo.pts&&(mk=jo.pts);for(var Sf=0;Sf<ko.length;){var fe=oD(ko,Sf);fe?(b.audioSamplingRate=fe.sampleRate,b.channelsCount=fe.channelCount,lk=fe.sampleRate,ho=fe.Ca,tx.push({data:ko.subarray(Sf,Sf+fe.na),size:fe.na,duration:1536,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}}),Sf+=fe.na):
1429
+ Sf++}}if(0==lk||0==ho.byteLength||null==mk)throw new T(2,3,3018,c?c.R()[0]:null);var oH=mk/9E4*lk;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:lk,duration:d,wb:[],Ca:ho,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:oH,ub:tx},stream:b};break;case "mp3":for(var vx=[],nk,ok=null,wx=t(k.rc()),lo=wx.next();!lo.done;lo=wx.next()){var mo=lo.value,Ah=mo.data;if(Ah){null==ok&&null!==mo.pts&&(ok=mo.pts);for(var Ke=0;Ke<Ah.length;){var Tf=yD(Ah,
1430
+ Ke);Tf?(nk||(nk=Tf),Ke+Tf.na<=Ah.length&&vx.push({data:Ah.subarray(Ke,Ke+Tf.na),size:Tf.na,duration:1152,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}}),Ke+=Tf.na):Ke++}}}if(!nk||null==ok)throw new T(2,3,3018,c?c.R()[0]:null);var xx=nk.sampleRate,pH=ok/9E4*xx;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xx,duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:pH,ub:vx},stream:b};break;case "opus":var yx=
1431
+ [],pk=null,id=k.H;if(!id)throw new T(2,3,3018,c?c.R()[0]:null);var Kb=[];switch(id.bj){case 1:case 2:Kb=[0];break;case 0:Kb=[255,1,1,0,1];break;case 128:Kb=[255,2,0,0,1];break;case 3:Kb=[1,2,1,0,2,1];break;case 4:Kb=[1,2,2,0,1,2,3];break;case 5:Kb=[1,3,2,0,4,1,2,3];break;case 6:Kb=[1,4,2,0,4,1,2,3,5];break;case 7:Kb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Kb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Kb=[1,1,2,0,1];break;case 131:Kb=[1,1,3,0,1,2];break;case 132:Kb=[1,1,4,0,1,2,3];break;case 133:Kb=[1,1,5,
1432
+ 0,1,2,3,4];break;case 134:Kb=[1,1,6,0,1,2,3,4,5];break;case 135:Kb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Kb=[1,1,8,0,1,2,3,4,5,6,7]}var zx=new Uint8Array([0,id.channelCount,0,0,id.sampleRate>>>24&255,id.sampleRate>>>17&255,id.sampleRate>>>8&255,id.sampleRate>>>0&255,0,0].concat(x(Kb)));for(var Ax=id.sampleRate,Bx=t(k.rc()),no=Bx.next();!no.done;no=Bx.next()){var oo=no.value,Uf=oo.data;null==pk&&null!==oo.pts&&(pk=oo.pts);for(var Bh=0;Bh<Uf.length;){for(var qH=0!==(Uf[Bh+1]&16),rH=0!==(Uf[Bh+1]&8),
1433
+ Md=Bh+2,qk=0;255===Uf[Md];)qk+=255,Md+=1;qk+=Uf[Md];Md+=1;Md+=qH?2:0;Md+=rH?2:0;var Cx=Uf.slice(Md,Md+qk);yx.push({data:Cx,size:Cx.byteLength,duration:960,yb:0,flags:{zb:0,qb:0,pb:0,kb:0,mb:2,Ab:0}});Bh=Md+qk}}if(0==zx.byteLength||null==pk)throw new T(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=id.sampleRate;b.channelsCount=id.channelCount;var sH=pk/9E4*Ax;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ax,duration:d,wb:[],Ca:zx,Qa:new Uint8Array([]),Va:0,
1434
+ Wa:0,data:{Sb:this.g,baseMediaDecodeTime:sH,ub:yx},stream:b}}n&&(l.push(n),n=null)}}catch(po){return po&&3023==po.code?Promise.resolve(new Uint8Array([])):Promise.reject(po)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));var Dx=new kx(l);if(this.i.has(b.id))var qo=this.i.get(b.id);else qo=qx(Dx),this.i.set(b.id,qo);var tH=Tx(Dx);this.g++;var uH=Nc(qo,tH);return Promise.resolve(uH)};P("shaka.transmuxer.TsTransmuxer",LD);LD.prototype.transmux=LD.prototype.transmux;
1435
+ LD.prototype.getOriginalMimeType=LD.prototype.getOriginalMimeType;LD.prototype.convertCodecs=LD.prototype.convertCodecs;LD.prototype.isSupported=LD.prototype.isSupported;LD.prototype.destroy=LD.prototype.destroy;var MD=["aac","ac-3","ec-3","mp3","opus"],ND=["avc","hevc"];oe("video/mp2t",function(){return new LD("video/mp2t")},se);/*
1436
1436
  @license
1437
1437
  EME Encryption Scheme Polyfill
1438
1438
  Copyright 2019 Google LLC
1439
1439
  SPDX-License-Identifier: Apache-2.0
1440
1440
  */
1441
- function ND(){}var OD;
1442
- function PD(){OD||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(OD=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=QD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1443
- function QD(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),G(e,OD.call(c,a,b),2);d=e.h;if(RD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=OD,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=SD;return e.return(SD.call(c,
1441
+ function OD(){}var PD;
1442
+ function QD(){PD||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(PD=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=RD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1443
+ function RD(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),G(e,PD.call(c,a,b),2);d=e.h;if(SD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=PD,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=TD;return e.return(TD.call(c,
1444
1444
  a,b))})}
1445
- function SD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return O(function(w){if(1==w.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=TD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=UD(h.videoCapabilities,d),l=UD(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."),
1446
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return G(w,OD.call(c,a,e),2)}p=w.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return w.return(new VD(p,r,u))})}function UD(a,b){return a?a.filter(function(c){return WD(c.encryptionScheme,b)}):a}P("EmeEncryptionSchemePolyfill",ND);ND.install=PD;function XD(){}var YD;
1447
- function ZD(){YD||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(YD=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=$D,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1448
- function $D(a){var b=this,c,d,e;return O(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),G(f,YD.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&RD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=YD,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1449
- navigator.mediaCapabilities.decodingInfo=aE;if(d){f.B(3);break}e=c;return G(f,bE(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(aE.call(b,a))}})}
1450
- function aE(a){var b=this,c,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=TD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},WD(d,g)&&WD(c,g))?G(m,YD.call(b,a),2):m.return(h);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1451
- new VD(k.keySystemAccess,c,d);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return G(m,bE(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1452
- function bE(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
1453
- f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return G(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",XD);XD.install=ZD;function VD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
1454
- VD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};VD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
1455
- function TD(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";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function RD(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}
1456
- function WD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(cE||dE)return!0;return!1}function eE(){}function rA(){PD();ZD()}P("EncryptionSchemePolyfills",eE);eE.install=rA;var dE=navigator.userAgent.includes("CrKey"),cE=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=eE);/*
1445
+ function TD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return O(function(w){if(1==w.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=UD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=VD(h.videoCapabilities,d),l=VD(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."),
1446
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return G(w,PD.call(c,a,e),2)}p=w.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return w.return(new WD(p,r,u))})}function VD(a,b){return a?a.filter(function(c){return XD(c.encryptionScheme,b)}):a}P("EmeEncryptionSchemePolyfill",OD);OD.install=QD;function YD(){}var ZD;
1447
+ function $D(){ZD||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ZD=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=aE,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1448
+ function aE(a){var b=this,c,d,e;return O(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),G(f,ZD.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&SD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ZD,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1449
+ navigator.mediaCapabilities.decodingInfo=bE;if(d){f.B(3);break}e=c;return G(f,cE(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(bE.call(b,a))}})}
1450
+ function bE(a){var b=this,c,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=UD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},XD(d,g)&&XD(c,g))?G(m,ZD.call(b,a),2):m.return(h);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1451
+ new WD(k.keySystemAccess,c,d);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return G(m,cE(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1452
+ function cE(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
1453
+ f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return G(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",YD);YD.install=$D;function WD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
1454
+ WD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};WD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
1455
+ function UD(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";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function SD(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}
1456
+ function XD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(dE||eE)return!0;return!1}function fE(){}function sA(){QD();$D()}P("EncryptionSchemePolyfills",fE);fE.install=sA;var eE=navigator.userAgent.includes("CrKey"),dE=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=fE);/*
1457
1457
  @license
1458
1458
  Copyright 2013 Ali Al Dallal
1459
1459
 
@@ -1477,7 +1477,7 @@ function WD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(cE||dE)retu
1477
1477
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1478
1478
  SOFTWARE.
1479
1479
  */
1480
- for(var fE={ach:{D:"Lwo",F:"Acholi"},ady:{D:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",F:"Adyghe"},af:{D:"Afrikaans",F:"Afrikaans"},"af-NA":{D:"Afrikaans (Namibia)",F:"Afrikaans (Namibia)"},"af-ZA":{D:"Afrikaans (South Africa)",F:"Afrikaans (South Africa)"},ak:{D:"T\u0255\u0265i",F:"Akan"},ar:{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic"},"ar-AR":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic"},"ar-MA":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic (Morocco)"},
1480
+ for(var gE={ach:{D:"Lwo",F:"Acholi"},ady:{D:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",F:"Adyghe"},af:{D:"Afrikaans",F:"Afrikaans"},"af-NA":{D:"Afrikaans (Namibia)",F:"Afrikaans (Namibia)"},"af-ZA":{D:"Afrikaans (South Africa)",F:"Afrikaans (South Africa)"},ak:{D:"T\u0255\u0265i",F:"Akan"},ar:{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic"},"ar-AR":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic"},"ar-MA":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic (Morocco)"},
1481
1481
  "ar-SA":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",F:"Arabic (Saudi Arabia)"},"ay-BO":{D:"Aymar aru",F:"Aymara"},az:{D:"Az\u0259rbaycan dili",F:"Azerbaijani"},"az-AZ":{D:"Az\u0259rbaycan dili",F:"Azerbaijani"},"be-BY":{D:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",F:"Belarusian"},bg:{D:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",F:"Bulgarian"},"bg-BG":{D:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
1482
1482
  F:"Bulgarian"},bn:{D:"\u09ac\u09be\u0982\u09b2\u09be",F:"Bengali"},"bn-IN":{D:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",F:"Bengali (India)"},"bn-BD":{D:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",F:"Bengali (Bangladesh)"},"bs-BA":{D:"Bosanski",F:"Bosnian"},ca:{D:"Catal\u00e0",F:"Catalan"},"ca-ES":{D:"Catal\u00e0",F:"Catalan"},cak:{D:"Maya Kaqchikel",F:"Kaqchikel"},"ck-US":{D:"\u13e3\u13b3\u13a9 (tsalagi)",F:"Cherokee"},cs:{D:"\u010ce\u0161tina",
1483
1483
  F:"Czech"},"cs-CZ":{D:"\u010ce\u0161tina",F:"Czech"},cy:{D:"Cymraeg",F:"Welsh"},"cy-GB":{D:"Cymraeg",F:"Welsh"},da:{D:"Dansk",F:"Danish"},"da-DK":{D:"Dansk",F:"Danish"},de:{D:"Deutsch",F:"German"},"de-AT":{D:"Deutsch (\u00d6sterreich)",F:"German (Austria)"},"de-DE":{D:"Deutsch (Deutschland)",F:"German (Germany)"},"de-CH":{D:"Deutsch (Schweiz)",F:"German (Switzerland)"},dsb:{D:"Dolnoserb\u0161\u0107ina",F:"Lower Sorbian"},el:{D:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",F:"Greek"},"el-GR":{D:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -1498,116 +1498,116 @@ F:"Slovak"},"sk-SK":{D:"Sloven\u010dina (Slovakia)",F:"Slovak (Slovakia)"},sl:{D
1498
1498
  sw:{D:"Kiswahili",F:"Swahili"},"sw-KE":{D:"Kiswahili",F:"Swahili (Kenya)"},ta:{D:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",F:"Tamil"},"ta-IN":{D:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",F:"Tamil"},te:{D:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",F:"Telugu"},"te-IN":{D:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",F:"Telugu"},tg:{D:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",F:"Tajik"},"tg-TJ":{D:"\u0442\u043e\u04b7\u0438\u043a\u04e3",F:"Tajik"},th:{D:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
1499
1499
  F:"Thai"},"th-TH":{D:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",F:"Thai (Thailand)"},tl:{D:"Filipino",F:"Filipino"},"tl-PH":{D:"Filipino",F:"Filipino"},tlh:{D:"tlhIngan-Hol",F:"Klingon"},tr:{D:"T\u00fcrk\u00e7e",F:"Turkish"},"tr-TR":{D:"T\u00fcrk\u00e7e",F:"Turkish"},"tt-RU":{D:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",F:"Tatar"},uk:{D:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",F:"Ukrainian"},"uk-UA":{D:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
1500
1500
  F:"Ukrainian"},ur:{D:"\u0627\u0631\u062f\u0648",F:"Urdu"},"ur-PK":{D:"\u0627\u0631\u062f\u0648",F:"Urdu"},uz:{D:"O'zbek",F:"Uzbek"},"uz-UZ":{D:"O'zbek",F:"Uzbek"},vi:{D:"Ti\u1ebfng Vi\u1ec7t",F:"Vietnamese"},"vi-VN":{D:"Ti\u1ebfng Vi\u1ec7t",F:"Vietnamese"},"xh-ZA":{D:"isiXhosa",F:"Xhosa"},yi:{D:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",F:"Yiddish"},"yi-DE":{D:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",F:"Yiddish (German)"},zh:{D:"\u4e2d\u6587",F:"Chinese"},"zh-HANS":{D:"\u4e2d\u6587\u7b80\u4f53",
1501
- F:"Chinese Simplified"},"zh-HANT":{D:"\u4e2d\u6587\u7e41\u9ad4",F:"Chinese Traditional"},"zh-CN":{D:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",F:"Chinese Simplified (China)"},"zh-HK":{D:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",F:"Chinese Traditional (Hong Kong)"},"zh-SG":{D:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",F:"Chinese Simplified (Singapore)"},"zh-TW":{D:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",F:"Chinese Traditional (Taiwan)"},"zu-ZA":{D:"isiZulu",F:"Zulu"}},gE=t(Object.keys(fE)),hE=gE.next();!hE.done;hE=
1502
- gE.next()){var iE=hE.value;fE[iE.toLowerCase()]=fE[iE]};function jE(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new rd;this.localization=this.controls.xa;this.player=this.controls.hd();this.video=this.controls.vc();this.adManager=this.player.Ve();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
1503
- jE.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};P("shaka.ui.Element",jE);jE.prototype.release=jE.prototype.release;function kE(a){return lE(a,"shaka-back-to-overflow-button")}function lE(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function mE(a){a&&(a=lE(a,"shaka-chosen-item"))&&a.parentElement.focus()}function nE(){var a=W("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function oE(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
1504
- function pE(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function qE(a,b){jE.call(this,a,b);var c=this;this.i=W("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Vb(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=pE(e-d,!1)+" / "+pE(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
1505
- ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.Sa();c.g.wa(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Sa(),this.g.wa(.5))}pa(qE,jE);qE.prototype.release=function(){this.g.stop();this.g=null;jE.prototype.release.call(this)};P("shaka.ui.AdCounter",qE);function rE(a,b){jE.call(this,a,b);var c=this;this.g=W("div");this.g.classList.add("shaka-ad-position");oE(this.g,!1);this.parent.appendChild(this.g);this.h=W("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&sE(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&sE(c)});this.eventManager.o(this.adManager,"ad-started",function(){sE(c)});this.eventManager.o(this.adManager,
1506
- "ad-stopped",function(){c.h.textContent="";oE(c.g,!1)});this.ad&&sE(this)}pa(rE,jE);function sE(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));oE(a.g,!0)}}P("shaka.ui.AdPosition",rE);function tE(a,b){jE.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";oE(c.g,!0)}else oE(c.g,
1507
- !1)});this.eventManager.o(window,"click",function(){oE(c.g,!1)});uE(this)}pa(tE,jE);tE.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];jE.prototype.release.call(this)};function vE(a,b){wE.set(a,b)}function uE(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=wE.get(c);d?a.i.push(d.create(a.g,a.controls)):Va("Unrecognized context menu element:",c)}}P("shaka.ui.ContextMenu",tE);
1508
- tE.registerElement=vE;var wE=new Map;function xE(a,b){jE.call(this,a,b);var c=this;this.button=pn();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
1509
- c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?yE(c.controls):zE(c.controls)});this.ad&&(this.g(),this.h())}pa(xE,jE);xE.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.Z;return a};
1510
- xE.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};xE.prototype.g=function(){};xE.prototype.h=function(){};P("shaka.ui.PlayButton",xE);function AE(a,b){xE.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(AE,xE);AE.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};AE.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};P("shaka.ui.BigPlayButton",AE);function BE(a,b){jE.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Vb(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.Ig()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=W("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.wc()&&(c.controls.Rd()?(d.preventDefault(),c.controls.Jc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.s)?
1511
- c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.X(1)):(c.s=!0,c.m=Date.now(),c.j.X(1))))});this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}pa(BE,jE);P("shaka.ui.HiddenSeekButton",BE);function CE(a,b){BE.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}pa(CE,BE);P("shaka.ui.HiddenFastForwardButton",CE);function DE(a,b){BE.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}pa(DE,BE);P("shaka.ui.HiddenRewindButton",DE);function EE(a,b,c,d){jE.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.h=!1;this.bar=document.createElement("input");this.I=new Vb(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
1512
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(f){e.controls.wc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.wc()&&(e.h=!0,FE(e,f),e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.h&&(FE(e,f),e.onChange());f.stopPropagation()});this.eventManager.o(this.bar,"touchend",function(f){e.h&&
1513
- (e.h=!1,FE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"touchcancel",function(f){e.h&&(e.h=!1,FE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"mouseup",function(f){e.h&&(e.h=!1,e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}pa(EE,jE);q=EE.prototype;
1514
- q.release=function(){this.I&&(this.I.stop(),this.I=null);jE.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.h||(this.h=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.I.X(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
1515
- q.setValue=function(a){this.h||(this.bar.value=a)};function FE(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}P("shaka.ui.RangeElement",EE);EE.prototype.setValue=EE.prototype.setValue;EE.prototype.getValue=EE.prototype.getValue;EE.prototype.changeTo=EE.prototype.changeTo;EE.prototype.onChangeEnd=EE.prototype.onChangeEnd;
1516
- EE.prototype.onChange=EE.prototype.onChange;EE.prototype.onChangeStart=EE.prototype.onChangeStart;EE.prototype.setRange=EE.prototype.setRange;function GE(a,b){EE.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.H=W("div");this.H.classList.add("shaka-ad-markers");this.container.insertBefore(this.H,this.container.childNodes[0]);this.J=this.controls.g;this.u=new Vb(function(){var d=c.getValue();c.player.U()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.C=new Vb(function(){HE(c)});this.L=!1;this.i=W("div");this.i.id="shaka-player-ui-thumbnail-container";
1517
- this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.A=W("div");this.A.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.A);this.container.appendChild(this.i);this.j=W("div");this.j.id="shaka-player-ui-time-container";this.container.appendChild(this.j);this.l=this.m=null;this.K=!1;this.s=new Vb(function(){IE(c)});this.G=[];this.eventManager.o(this.localization,"locale-updated",function(){return JE(c)});this.eventManager.o(this.localization,
1518
- "locale-changed",function(){return JE(c)});this.eventManager.o(this.adManager,"ad-started",function(){KE(c)||oE(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){KE(c)&&oE(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.G=d.cuepoints;LE(c)});this.eventManager.o(this.player,"unloading",function(){c.G=[];LE(c);c.l&&(c.l.abort(),c.l=null);c.m=null;IE(c);ME(c)});this.eventManager.o(this.bar,"mousemove",function(d){var e=c.bar.getBoundingClientRect(),
1519
- f=parseFloat(c.bar.min);d=d.clientX-e.left;e=Math.round(f+(parseFloat(c.bar.max)-f)/e.width*d);c.player.We().length?(ME(c),NE(c,d,e)):(IE(c),f=c.j.clientWidth,c.j.style.width="auto",c.j.style.height="20px",c.j.style.top="-30px",c.j.style.left=Math.min(c.bar.offsetWidth-f,Math.max(0,d-f/2))+"px",c.j.style.visibility="visible",c.player.U()?(d=c.player.Oa().end-e,c.j.textContent=1>d?c.localization.resolve("LIVE"):"-"+OE(d)):c.j.textContent=OE(e))});this.eventManager.o(this.container,"mouseleave",function(){ME(c);
1520
- c.s.stop();c.s.X(.25)});this.setValue(this.video.currentTime);this.update();JE(this);this.ad&&oE(this.container,!1)}pa(GE,EE);q=GE.prototype;q.release=function(){this.u&&(this.u.stop(),this.u=null,this.C.stop(),this.C=null);EE.prototype.release.call(this)};q.onChangeStart=function(){this.L=!this.video.paused;this.controls.sh(!0);this.video.pause();this.s.stop();this.K=!0};
1521
- q.onChange=function(){if(this.video.duration)if(this.update(),this.u.X(.125),this.player.We().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());NE(this,(d-a)/((b-a)/c.width),d)}else IE(this)};q.onChangeEnd=function(){this.u.Sa();this.controls.sh(!1);this.L&&this.video.play();this.K&&(this.K=!1,this.s.stop(),this.s.X(.25))};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
1522
- q.update=function(){var a=this.J.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Oa(),g=f.end-f.start;this.setRange(f.start,f.end);KE(this)?(oE(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.J.showUnbufferedStart?
1523
- a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):oE(this.container,!1)};
1524
- function HE(a){if(a.G.length){for(var b=a.player.Oa(),c=b.end-b.start,d=["to right"],e=[],f=a.J.seekBarColors.adBreaks,g=!1,h=t(a.G),k=h.next();!k.done;k=h.next())if(k=k.value,-1==k.start&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||"number"==typeof k.end&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,p){return n.start-p.start});b=t(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+
1525
- 100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.H.style.background="linear-gradient("+d.join(",")+")"}else a.H.style.background="transparent",a.C.stop()}function LE(a){function b(){var c=a.player.Oa();c=c.end-c.start;a.player.U()&&5<c&&a.C.wa(.25)}HE(a);a.player.ei()?b():a.eventManager.ia(a.player,"loaded",b)}
1526
- function KE(a){var b=a.player.Oa();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function JE(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
1527
- function NE(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;O(function(B){switch(B.g){case 1:d=PE(a);if(!d)return IE(a),B.return();0>c&&(c=0);e=a.player.Oa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return G(B,a.player.Mg(d.id,f),2);case 2:g=B.h;if(!g||!g.uris.length)return IE(a),B.return();a.player.U()?(h=e.end-c,a.A.textContent=1>h?a.localization.resolve("LIVE"):"-"+OE(h)):a.A.textContent=OE(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
1501
+ F:"Chinese Simplified"},"zh-HANT":{D:"\u4e2d\u6587\u7e41\u9ad4",F:"Chinese Traditional"},"zh-CN":{D:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",F:"Chinese Simplified (China)"},"zh-HK":{D:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",F:"Chinese Traditional (Hong Kong)"},"zh-SG":{D:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",F:"Chinese Simplified (Singapore)"},"zh-TW":{D:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",F:"Chinese Traditional (Taiwan)"},"zu-ZA":{D:"isiZulu",F:"Zulu"}},hE=t(Object.keys(gE)),iE=hE.next();!iE.done;iE=
1502
+ hE.next()){var jE=iE.value;gE[jE.toLowerCase()]=gE[jE]};function kE(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new rd;this.localization=this.controls.xa;this.player=this.controls.jd();this.video=this.controls.wc();this.adManager=this.player.Ve();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
1503
+ kE.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};P("shaka.ui.Element",kE);kE.prototype.release=kE.prototype.release;function lE(a){return mE(a,"shaka-back-to-overflow-button")}function mE(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function nE(a){a&&(a=mE(a,"shaka-chosen-item"))&&a.parentElement.focus()}function oE(){var a=W("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function pE(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
1504
+ function qE(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function rE(a,b){kE.call(this,a,b);var c=this;this.i=W("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Vb(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=qE(e-d,!1)+" / "+qE(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
1505
+ ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.Sa();c.g.wa(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Sa(),this.g.wa(.5))}pa(rE,kE);rE.prototype.release=function(){this.g.stop();this.g=null;kE.prototype.release.call(this)};P("shaka.ui.AdCounter",rE);function sE(a,b){kE.call(this,a,b);var c=this;this.g=W("div");this.g.classList.add("shaka-ad-position");pE(this.g,!1);this.parent.appendChild(this.g);this.h=W("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&tE(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&tE(c)});this.eventManager.o(this.adManager,"ad-started",function(){tE(c)});this.eventManager.o(this.adManager,
1506
+ "ad-stopped",function(){c.h.textContent="";pE(c.g,!1)});this.ad&&tE(this)}pa(sE,kE);function tE(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));pE(a.g,!0)}}P("shaka.ui.AdPosition",sE);function uE(a,b){kE.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";pE(c.g,!0)}else pE(c.g,
1507
+ !1)});this.eventManager.o(window,"click",function(){pE(c.g,!1)});vE(this)}pa(uE,kE);uE.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];kE.prototype.release.call(this)};function wE(a,b){xE.set(a,b)}function vE(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=xE.get(c);d?a.i.push(d.create(a.g,a.controls)):Va("Unrecognized context menu element:",c)}}P("shaka.ui.ContextMenu",uE);
1508
+ uE.registerElement=wE;var xE=new Map;function yE(a,b){kE.call(this,a,b);var c=this;this.button=pn();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
1509
+ c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?zE(c.controls):AE(c.controls)});this.ad&&(this.g(),this.h())}pa(yE,kE);yE.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.Y;return a};
1510
+ yE.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};yE.prototype.g=function(){};yE.prototype.h=function(){};P("shaka.ui.PlayButton",yE);function BE(a,b){yE.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(BE,yE);BE.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};BE.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};P("shaka.ui.BigPlayButton",BE);function CE(a,b){kE.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Vb(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.Ig()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=W("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.xc()&&(c.controls.Rd()?(d.preventDefault(),c.controls.Kc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.s)?
1511
+ c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.X(1)):(c.s=!0,c.m=Date.now(),c.j.X(1))))});this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}pa(CE,kE);P("shaka.ui.HiddenSeekButton",CE);function DE(a,b){CE.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}pa(DE,CE);P("shaka.ui.HiddenFastForwardButton",DE);function EE(a,b){CE.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}pa(EE,CE);P("shaka.ui.HiddenRewindButton",EE);function FE(a,b,c,d){kE.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.h=!1;this.bar=document.createElement("input");this.I=new Vb(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
1512
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(f){e.controls.xc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.xc()&&(e.h=!0,GE(e,f),e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.h&&(GE(e,f),e.onChange());f.stopPropagation()});this.eventManager.o(this.bar,"touchend",function(f){e.h&&
1513
+ (e.h=!1,GE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"touchcancel",function(f){e.h&&(e.h=!1,GE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"mouseup",function(f){e.h&&(e.h=!1,e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}pa(FE,kE);q=FE.prototype;
1514
+ q.release=function(){this.I&&(this.I.stop(),this.I=null);kE.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.h||(this.h=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.I.X(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
1515
+ q.setValue=function(a){this.h||(this.bar.value=a)};function GE(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}P("shaka.ui.RangeElement",FE);FE.prototype.setValue=FE.prototype.setValue;FE.prototype.getValue=FE.prototype.getValue;FE.prototype.changeTo=FE.prototype.changeTo;FE.prototype.onChangeEnd=FE.prototype.onChangeEnd;
1516
+ FE.prototype.onChange=FE.prototype.onChange;FE.prototype.onChangeStart=FE.prototype.onChangeStart;FE.prototype.setRange=FE.prototype.setRange;function HE(a,b){FE.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.H=W("div");this.H.classList.add("shaka-ad-markers");this.container.insertBefore(this.H,this.container.childNodes[0]);this.J=this.controls.g;this.u=new Vb(function(){var d=c.getValue();c.player.U()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.C=new Vb(function(){IE(c)});this.L=!1;this.i=W("div");this.i.id="shaka-player-ui-thumbnail-container";
1517
+ this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.A=W("div");this.A.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.A);this.container.appendChild(this.i);this.j=W("div");this.j.id="shaka-player-ui-time-container";this.container.appendChild(this.j);this.l=this.m=null;this.K=!1;this.s=new Vb(function(){JE(c)});this.G=[];this.eventManager.o(this.localization,"locale-updated",function(){return KE(c)});this.eventManager.o(this.localization,
1518
+ "locale-changed",function(){return KE(c)});this.eventManager.o(this.adManager,"ad-started",function(){LE(c)||pE(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){LE(c)&&pE(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.G=d.cuepoints;ME(c)});this.eventManager.o(this.player,"unloading",function(){c.G=[];ME(c);c.l&&(c.l.abort(),c.l=null);c.m=null;JE(c);NE(c)});this.eventManager.o(this.bar,"mousemove",function(d){var e=c.bar.getBoundingClientRect(),
1519
+ f=parseFloat(c.bar.min);d=d.clientX-e.left;e=Math.round(f+(parseFloat(c.bar.max)-f)/e.width*d);c.player.We().length?(NE(c),OE(c,d,e)):(JE(c),f=c.j.clientWidth,c.j.style.width="auto",c.j.style.height="20px",c.j.style.top="-30px",c.j.style.left=Math.min(c.bar.offsetWidth-f,Math.max(0,d-f/2))+"px",c.j.style.visibility="visible",c.player.U()?(d=c.player.Oa().end-e,c.j.textContent=1>d?c.localization.resolve("LIVE"):"-"+PE(d)):c.j.textContent=PE(e))});this.eventManager.o(this.container,"mouseleave",function(){NE(c);
1520
+ c.s.stop();c.s.X(.25)});this.setValue(this.video.currentTime);this.update();KE(this);this.ad&&pE(this.container,!1)}pa(HE,FE);q=HE.prototype;q.release=function(){this.u&&(this.u.stop(),this.u=null,this.C.stop(),this.C=null);FE.prototype.release.call(this)};q.onChangeStart=function(){this.L=!this.video.paused;this.controls.sh(!0);this.video.pause();this.s.stop();this.K=!0};
1521
+ q.onChange=function(){if(this.video.duration)if(this.update(),this.u.X(.125),this.player.We().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());OE(this,(d-a)/((b-a)/c.width),d)}else JE(this)};q.onChangeEnd=function(){this.u.Sa();this.controls.sh(!1);this.L&&this.video.play();this.K&&(this.K=!1,this.s.stop(),this.s.X(.25))};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
1522
+ q.update=function(){var a=this.J.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Oa(),g=f.end-f.start;this.setRange(f.start,f.end);LE(this)?(pE(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.J.showUnbufferedStart?
1523
+ a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):pE(this.container,!1)};
1524
+ function IE(a){if(a.G.length){for(var b=a.player.Oa(),c=b.end-b.start,d=["to right"],e=[],f=a.J.seekBarColors.adBreaks,g=!1,h=t(a.G),k=h.next();!k.done;k=h.next())if(k=k.value,-1==k.start&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||"number"==typeof k.end&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,p){return n.start-p.start});b=t(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+
1525
+ 100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.H.style.background="linear-gradient("+d.join(",")+")"}else a.H.style.background="transparent",a.C.stop()}function ME(a){function b(){var c=a.player.Oa();c=c.end-c.start;a.player.U()&&5<c&&a.C.wa(.25)}IE(a);a.player.ei()?b():a.eventManager.ka(a.player,"loaded",b)}
1526
+ function LE(a){var b=a.player.Oa();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function KE(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
1527
+ function OE(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;O(function(B){switch(B.g){case 1:d=QE(a);if(!d)return JE(a),B.return();0>c&&(c=0);e=a.player.Oa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return G(B,a.player.Mg(d.id,f),2);case 2:g=B.h;if(!g||!g.uris.length)return JE(a),B.return();a.player.U()?(h=e.end-c,a.A.textContent=1>h?a.localization.resolve("LIVE"):"-"+PE(h)):a.A.textContent=PE(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
1528
1528
  -(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";p=g.uris[0].split("#xywh=")[0];if(a.m&&p===a.m.uris[0].split("#xywh=")[0]&&g.segment.Ib()==a.m.segment.Ib()&&g.segment.Fb()==a.m.segment.Fb()){B.B(3);break}a.m=g;a.l&&(a.l.abort(),a.l=null);if("mjpg"!=d.codecs&&!p.startsWith("offline:")){B.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ta(B,5);r=Jg;u=Ll(g.segment.R(),g.segment.Ib(),g.segment.Fb(),a.player.getConfiguration().streaming.retryParameters);
1529
1529
  a.l=a.player.Gb().request(r,u,{type:1});return G(B,a.l.promise,7);case 7:w=B.h;a.l=null;"mjpg"==d.codecs?(v=(new Sg).box("mdat",bh(function(D){p=URL.createObjectURL(new Blob([D],{type:"image/jpeg"}))})),v.parse(w.data,!1)):(A=d.mimeType||"image/jpeg",z=new Blob([w.data],{type:A}),p=URL.createObjectURL(z));va(B,4);break;case 5:C=wa(B);if(7001==C.code)return B.return();throw C;case 4:try{a.i.removeChild(a.g)}catch(D){}a.g=W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=p;
1530
1530
  a.g.onload=function(){p.startsWith("blob:")&&URL.revokeObjectURL(p)};a.i.insertBefore(a.g,a.i.firstChild);case 3:y=l/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+y*g.positionX+"px",a.g.style.top="-"+y*g.positionY+"px",a.g.style.transform="scale("+y+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
1531
1531
  g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",I(B)}})}
1532
- function PE(a){var b=a.player.We();if(!b.length)return null;for(var c={},d=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={Pf:c.Pf,Nf:c.Nf},e=d.next())if(c.Pf=e.value,c.Nf=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Pf&&g.bandwidth<.01*f.Nf}}(c)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&e.length)return e[0];return b.find(function(f){return"application/mp4"==f.mimeType&&
1533
- "mjpg"==f.codecs})||b[0]}function IE(a){a.i.style.visibility="hidden";a.A.textContent=""}function ME(a){a.j.style.visibility="hidden"}function OE(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}P("shaka.ui.SeekBar",GE);function QE(){}QE.prototype.create=function(a,b){return new GE(a,b)};GE.Factory=QE;function RE(a,b){jE.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");oE(this.h,!1);this.j.appendChild(this.h);this.g=pn();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;oE(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);SE(this);this.i=new Vb(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1534
- d:(c.i.stop(),oE(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){SE(c)});this.eventManager.o(this.localization,"locale-changed",function(){SE(c)});this.eventManager.o(this.adManager,"ad-started",function(){TE(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),oE(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;oE(c.g,!1);oE(c.h,!1)});this.eventManager.o(this.g,
1535
- "click",function(){c.ad.skip()});this.ad&&TE(this)}pa(RE,jE);RE.prototype.release=function(){this.i.stop();this.i=null;jE.prototype.release.call(this)};function SE(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function TE(a){a.ad.isSkippable()&&(oE(a.g,!0),oE(a.h,!0),a.h.textContent="",a.i.Sa(),a.i.wa(.5))}P("shaka.ui.SkipAdButton",RE);/*
1532
+ function QE(a){var b=a.player.We();if(!b.length)return null;for(var c={},d=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={Pf:c.Pf,Nf:c.Nf},e=d.next())if(c.Pf=e.value,c.Nf=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Pf&&g.bandwidth<.01*f.Nf}}(c)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&e.length)return e[0];return b.find(function(f){return"application/mp4"==f.mimeType&&
1533
+ "mjpg"==f.codecs})||b[0]}function JE(a){a.i.style.visibility="hidden";a.A.textContent=""}function NE(a){a.j.style.visibility="hidden"}function PE(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}P("shaka.ui.SeekBar",HE);function RE(){}RE.prototype.create=function(a,b){return new HE(a,b)};HE.Factory=RE;function SE(a,b){kE.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");pE(this.h,!1);this.j.appendChild(this.h);this.g=pn();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;pE(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);TE(this);this.i=new Vb(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1534
+ d:(c.i.stop(),pE(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){TE(c)});this.eventManager.o(this.localization,"locale-changed",function(){TE(c)});this.eventManager.o(this.adManager,"ad-started",function(){UE(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),pE(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;pE(c.g,!1);pE(c.h,!1)});this.eventManager.o(this.g,
1535
+ "click",function(){c.ad.skip()});this.ad&&UE(this)}pa(SE,kE);SE.prototype.release=function(){this.i.stop();this.i=null;kE.prototype.release.call(this)};function TE(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function UE(a){a.ad.isSkippable()&&(pE(a.g,!0),pE(a.h,!0),a.h.textContent="",a.i.Sa(),a.i.wa(.5))}P("shaka.ui.SkipAdButton",SE);/*
1536
1536
  @license
1537
1537
  glMatrix: https://github.com/toji/gl-matrix/
1538
1538
  Copyright 2015-2021, Brandon Jones, Colin MacKenzie IV
1539
1539
  SPDX-License-Identifier: MIT
1540
1540
  */
1541
- function UE(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}function VE(a,b,c){b=1/Math.tan(b/2);a[0]=b/c;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[11]=-1;a[12]=0;a[13]=0;a[15]=0;c=1/-99.9;a[10]=100.1*c;a[14]=20*c}
1542
- function WE(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],p=b[9],r=b[10],u=b[11],w=b[12],v=b[13],A=b[14];b=b[15];var z=c[0],C=c[1],y=c[2],B=c[3];a[0]=z*d+C*h+y*n+B*w;a[1]=z*e+C*k+y*p+B*v;a[2]=z*f+C*l+y*r+B*A;a[3]=z*g+C*m+y*u+B*b;z=c[4];C=c[5];y=c[6];B=c[7];a[4]=z*d+C*h+y*n+B*w;a[5]=z*e+C*k+y*p+B*v;a[6]=z*f+C*l+y*r+B*A;a[7]=z*g+C*m+y*u+B*b;z=c[8];C=c[9];y=c[10];B=c[11];a[8]=z*d+C*h+y*n+B*w;a[9]=z*e+C*k+y*p+B*v;a[10]=z*f+C*l+y*r+B*A;a[11]=z*g+C*m+y*u+B*b;z=c[12];C=c[13];
1541
+ function VE(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}function WE(a,b,c){b=1/Math.tan(b/2);a[0]=b/c;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[11]=-1;a[12]=0;a[13]=0;a[15]=0;c=1/-99.9;a[10]=100.1*c;a[14]=20*c}
1542
+ function XE(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],p=b[9],r=b[10],u=b[11],w=b[12],v=b[13],A=b[14];b=b[15];var z=c[0],C=c[1],y=c[2],B=c[3];a[0]=z*d+C*h+y*n+B*w;a[1]=z*e+C*k+y*p+B*v;a[2]=z*f+C*l+y*r+B*A;a[3]=z*g+C*m+y*u+B*b;z=c[4];C=c[5];y=c[6];B=c[7];a[4]=z*d+C*h+y*n+B*w;a[5]=z*e+C*k+y*p+B*v;a[6]=z*f+C*l+y*r+B*A;a[7]=z*g+C*m+y*u+B*b;z=c[8];C=c[9];y=c[10];B=c[11];a[8]=z*d+C*h+y*n+B*w;a[9]=z*e+C*k+y*p+B*v;a[10]=z*f+C*l+y*r+B*A;a[11]=z*g+C*m+y*u+B*b;z=c[12];C=c[13];
1543
1543
  y=c[14];B=c[15];a[12]=z*d+C*h+y*n+B*w;a[13]=z*e+C*k+y*p+B*v;a[14]=z*f+C*l+y*r+B*A;a[15]=z*g+C*m+y*u+B*b}
1544
- function XE(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;0<m?(b=2*Math.sqrt(m+1),a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k-
1545
- d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function YE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function ZE(){var a=new Float32Array(4);a[3]=1;return a}function $E(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function aF(a,b,c,d,e){this.m=a;this.ra=b;this.l=c;this.g=d;this.s=new rd;this.L=ZE();this.h=ZE();this.ka=this.qa=this.ea=this.j=null;this.G=UE();this.I=UE();this.M=UE();this.Z=UE();this.A=null;this.O=!1;this.J=this.u=null;this.Ga=this.sa=0;this.aa=this.P=this.S=this.K=null;this.H=0;this.i=75;this.W=0;this.C=e;bF(this)}aF.prototype.release=function(){this.s&&(this.s.release(),this.s=null);this.u&&(this.u.stop(),this.u=null);this.J&&(this.J.stop(),this.J=null)};
1546
- aF.prototype.yd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.l.width,this.l.height);cF(this,!1)};
1547
- function bF(a){dF(a);eF(a);fF(a);gF(a);hF(a);a.s.ia(a.m,"loadeddata",function(){var b;a.s.o(a.m,"canplaythrough",function(){cF(a)});a.s.o(a.m,"playing",function(){a.u&&a.u.stop();if(!b){var c=a.ra.Jb();c=t(c);for(var d=c.next();!d.done;d=c.next())(d=d.value.frameRate)&&(!b||b<d)&&(b=d)}b||(b=60);cF(a);a.u=(new Vb(function(){cF(a)})).Sa().wa(1/b)});a.s.o(a.m,"pause",function(){a.u&&a.u.stop();a.u=null;cF(a)});a.s.o(a.m,"seeked",function(){cF(a)});a.s.o(document,"visibilitychange",function(){cF(a)})})}
1548
- function dF(a){var b=a.G,c=[0,0,0],d=[1,0,0],e=[0,1,0],f=c[0],g=c[1];c=c[2];var h=e[0];var k=e[1];var l=e[2];var m=d[0];e=d[1];var n=d[2];if(1E-6>Math.abs(f-m)&&1E-6>Math.abs(g-e)&&1E-6>Math.abs(c-n))for(f=0;16>f;f++)b[f]=0==f%5?1:0;else{d=f-m;e=g-e;m=c-n;var p=1/Math.sqrt(d*d+e*e+m*m);d*=p;e*=p;m*=p;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(p=Math.sqrt(n*n+l*l+h*h))?(p=1/p,n*=p,l*=p,h*=p):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var u=d*l-e*n;(p=Math.sqrt(k*k+r*r+u*u))?(p=1/p,k*=p,r*=p,u*=p):u=r=k=0;b[0]=n;b[1]=k;b[2]=
1549
- d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=u;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+u*c);b[14]=-(d*f+e*g+m*c);b[15]=1}XE(a.L,a.G);a=b=a.Z;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
1550
- function eF(a){iF(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)}
1551
- function fF(a){var b=jF(a,a.g.VERTEX_SHADER),c=jF(a,a.g.FRAGMENT_SHADER);a.j=a.g.createProgram();a.g.attachShader(a.j,b);a.g.attachShader(a.j,c);a.g.linkProgram(a.j);"cubemap"==a.C?(a.S=a.g.getAttribLocation(a.j,"aVertexPosition"),a.P=a.g.getAttribLocation(a.j,"aTextureCoord")):(a.S=a.g.getAttribLocation(a.j,"a_vPosition"),a.g.enableVertexAttribArray(a.S),a.P=a.g.getAttribLocation(a.j,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.P))}
1552
- function jF(a,b){switch(b){case a.g.VERTEX_SHADER:var c="cubemap"==a.C?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}";
1544
+ function YE(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;0<m?(b=2*Math.sqrt(m+1),a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k-
1545
+ d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function ZE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function $E(){var a=new Float32Array(4);a[3]=1;return a}function aF(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function bF(a,b,c,d,e){this.m=a;this.ra=b;this.l=c;this.g=d;this.s=new rd;this.L=$E();this.h=$E();this.ha=this.qa=this.ea=this.j=null;this.G=VE();this.I=VE();this.M=VE();this.Y=VE();this.A=null;this.O=!1;this.J=this.u=null;this.Ga=this.sa=0;this.aa=this.P=this.S=this.K=null;this.H=0;this.i=75;this.W=0;this.C=e;cF(this)}bF.prototype.release=function(){this.s&&(this.s.release(),this.s=null);this.u&&(this.u.stop(),this.u=null);this.J&&(this.J.stop(),this.J=null)};
1546
+ bF.prototype.yd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.l.width,this.l.height);dF(this,!1)};
1547
+ function cF(a){eF(a);fF(a);gF(a);hF(a);iF(a);a.s.ka(a.m,"loadeddata",function(){var b;a.s.o(a.m,"canplaythrough",function(){dF(a)});a.s.o(a.m,"playing",function(){a.u&&a.u.stop();if(!b){var c=a.ra.Jb();c=t(c);for(var d=c.next();!d.done;d=c.next())(d=d.value.frameRate)&&(!b||b<d)&&(b=d)}b||(b=60);dF(a);a.u=(new Vb(function(){dF(a)})).Sa().wa(1/b)});a.s.o(a.m,"pause",function(){a.u&&a.u.stop();a.u=null;dF(a)});a.s.o(a.m,"seeked",function(){dF(a)});a.s.o(document,"visibilitychange",function(){dF(a)})})}
1548
+ function eF(a){var b=a.G,c=[0,0,0],d=[1,0,0],e=[0,1,0],f=c[0],g=c[1];c=c[2];var h=e[0];var k=e[1];var l=e[2];var m=d[0];e=d[1];var n=d[2];if(1E-6>Math.abs(f-m)&&1E-6>Math.abs(g-e)&&1E-6>Math.abs(c-n))for(f=0;16>f;f++)b[f]=0==f%5?1:0;else{d=f-m;e=g-e;m=c-n;var p=1/Math.sqrt(d*d+e*e+m*m);d*=p;e*=p;m*=p;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(p=Math.sqrt(n*n+l*l+h*h))?(p=1/p,n*=p,l*=p,h*=p):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var u=d*l-e*n;(p=Math.sqrt(k*k+r*r+u*u))?(p=1/p,k*=p,r*=p,u*=p):u=r=k=0;b[0]=n;b[1]=k;b[2]=
1549
+ d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=u;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+u*c);b[14]=-(d*f+e*g+m*c);b[15]=1}YE(a.L,a.G);a=b=a.Y;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
1550
+ function fF(a){jF(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)}
1551
+ function gF(a){var b=kF(a,a.g.VERTEX_SHADER),c=kF(a,a.g.FRAGMENT_SHADER);a.j=a.g.createProgram();a.g.attachShader(a.j,b);a.g.attachShader(a.j,c);a.g.linkProgram(a.j);"cubemap"==a.C?(a.S=a.g.getAttribLocation(a.j,"aVertexPosition"),a.P=a.g.getAttribLocation(a.j,"aTextureCoord")):(a.S=a.g.getAttribLocation(a.j,"a_vPosition"),a.g.enableVertexAttribArray(a.S),a.P=a.g.getAttribLocation(a.j,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.P))}
1552
+ function kF(a,b){switch(b){case a.g.VERTEX_SHADER:var c="cubemap"==a.C?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}";
1553
1553
  break;case a.g.FRAGMENT_SHADER:c="cubemap"==a.C?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\nvoid main(void) {\n highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n texture2D(uSampler, tc);\n gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}";
1554
1554
  break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b}
1555
- function gF(a){if("cubemap"==a.C)var b={Oi:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],Li:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]};else{b=[];for(var c=[],d=[],
1555
+ function hF(a){if("cubemap"==a.C)var b={Oi:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],Li:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]};else{b=[];for(var c=[],d=[],
1556
1556
  e=0;100>=e;e++){var f=e/100,g=f*Math.PI,h=Math.sin(g);g=Math.cos(g);for(var k=0;100>=k;k++){var l=k/100,m=l*Math.PI*2;b.push(-1*Math.cos(m)*h,g,Math.sin(m)*h);c.push(l);c.push(f)}}for(e=0;100>e;e++)for(f=0;100>f;f++)h=101*e+f,g=h+1,k=101*(e+1)+f,l=k+1,d.push(h,k,g),d.push(g,k,l);b={Oi:b,Li:c,indices:d}}a.K=b;a.ea=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ea);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Oi),a.g.STATIC_DRAW);a.qa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,
1557
- a.qa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Li),a.g.STATIC_DRAW);a.ka=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ka);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.K.indices),a.g.STATIC_DRAW)}
1558
- function hF(a){a.aa=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.aa);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_S,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_T,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MIN_FILTER,a.g.NEAREST);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MAG_FILTER,a.g.NEAREST)}
1559
- function cF(a,b){b=void 0===b?!0:b;var c=a.ra.gd()==dp;!a.m||2>a.m.readyState||!c&&0==a.m.playbackRate||(VE(a.I,a.i*Math.PI/180,1.5625),"cubemap"==a.C?VE(a.I,a.i*Math.PI/180,2.5):VE(a.I,a.i*Math.PI/180,1.5625),a.g.useProgram(a.j),a.g.clear(a.g.COLOR_BUFFER_BIT),iF(a),b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.aa),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.m)),"equirectangular"==a.C&&(WE(a.M,
1560
- a.G,a.Z),WE(a.M,a.I,a.M)),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ea),a.g.vertexAttribPointer(a.S,3,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.S),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.qa),a.g.vertexAttribPointer(a.P,2,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.P),a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ka),"cubemap"==a.C?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uProjectionMatrix"),!1,a.I),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uModelViewMatrix"),!1,a.M)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,
1557
+ a.qa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Li),a.g.STATIC_DRAW);a.ha=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ha);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.K.indices),a.g.STATIC_DRAW)}
1558
+ function iF(a){a.aa=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.aa);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_S,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_T,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MIN_FILTER,a.g.NEAREST);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MAG_FILTER,a.g.NEAREST)}
1559
+ function dF(a,b){b=void 0===b?!0:b;var c=a.ra.hd()==dp;!a.m||2>a.m.readyState||!c&&0==a.m.playbackRate||(WE(a.I,a.i*Math.PI/180,1.5625),"cubemap"==a.C?WE(a.I,a.i*Math.PI/180,2.5):WE(a.I,a.i*Math.PI/180,1.5625),a.g.useProgram(a.j),a.g.clear(a.g.COLOR_BUFFER_BIT),jF(a),b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.aa),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.m)),"equirectangular"==a.C&&(XE(a.M,
1560
+ a.G,a.Y),XE(a.M,a.I,a.M)),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ea),a.g.vertexAttribPointer(a.S,3,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.S),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.qa),a.g.vertexAttribPointer(a.P,2,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.P),a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ha),"cubemap"==a.C?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uProjectionMatrix"),!1,a.I),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uModelViewMatrix"),!1,a.M)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,
1561
1561
  "u_VPMatrix"),!1,a.M),a.g.uniform1i(a.g.getUniformLocation(a.j,"uSampler"),0),a.O&&a.g.viewport(0,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0),a.O&&(a.g.viewport(a.l.width/2,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0)))}
1562
- function iF(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight;c||(c=a.l.scrollHeight);if(a.sa!==b||a.Ga!==c){a.l.width=b;a.l.height=c;a.sa=b;a.Ga=c;var d=b/c,e=a.I,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.I=e;a.g.viewport(0,0,b,c)}}
1563
- function kF(a,b,c,d){var e=90*Math.PI/180;var f="cubemap"==a.C?a.M:a.G;var g=Math.sin(b);b=Math.cos(b);var h=f[0],k=f[1],l=f[2],m=f[3],n=f[8],p=f[9],r=f[10],u=f[11];f!==f&&(f[4]=f[4],f[5]=f[5],f[6]=f[6],f[7]=f[7],f[12]=f[12],f[13]=f[13],f[14]=f[14],f[15]=f[15]);f[0]=h*b-n*g;f[1]=k*b-p*g;f[2]=l*b-r*g;f[3]=m*b-u*g;f[8]=h*g+n*b;f[9]=k*g+p*b;f[10]=l*g+r*b;f[11]=m*g+u*b;a.H+=c;a.H<e&&a.H>-e?(e=UE(),g=UE(),b=-1*c,c=Math.sin(b),b=Math.cos(b),h=g[4],k=g[5],l=g[6],m=g[7],n=g[8],p=g[9],r=g[10],u=g[11],g!==
1564
- e&&(e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[4]=h*b+n*c,e[5]=k*b+p*c,e[6]=l*b+r*c,e[7]=m*b+u*c,e[8]=n*b-h*c,e[9]=p*b-k*c,e[10]=r*b-l*c,e[11]=u*b-m*c,WE(f,e,f)):a.H-=c;c=UE();e=UE();g=Math.sin(d);d=Math.cos(d);b=e[0];h=e[1];k=e[2];l=e[3];m=e[4];n=e[5];p=e[6];r=e[7];e!==c&&(c[8]=e[8],c[9]=e[9],c[10]=e[10],c[11]=e[11],c[12]=e[12],c[13]=e[13],c[14]=e[14],c[15]=e[15]);c[0]=b*d+m*g;c[1]=h*d+n*g;c[2]=k*d+p*g;c[3]=l*d+r*g;c[4]=m*d-b*g;c[5]=n*d-h*g;c[6]=p*
1565
- d-k*g;c[7]=r*d-l*g;WE(f,c,f);cF(a,!1)}function lF(a,b){if(void 0===b||b)XE(a.h,a.G),a.W=0,a.A=ZE(),a.A[0]=(a.h[0]-a.L[0])/20,a.A[1]=(a.h[1]-a.L[1])/20,a.A[2]=(a.h[2]-a.L[2])/20,a.A[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.A[0];a.h[1]-=a.A[1];a.h[2]-=a.A[2];a.h[3]-=a.A[3];b=UE();$E(a.h,a.h);YE(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.W?a.J=(new Vb(function(){lF(a,!1);a.H=0;a.W++;cF(a,!1)})).X(.025):(YE(b,a.L),a.G=b)};function mF(a,b,c,d,e){gb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.s=new rd;this.h=new rd;this.G=nF(this);this.g=null;this.j=!1;this.J=this.I=this.H=this.C=this.A=0;this.l=null;this.s.o(d,"loading",function(){f.g&&lF(f.g);oF(f)});this.s.o(d,"spatialvideoinfo",function(g){switch(g.detail.projection){case "hequ":f.l="equirectangular";break;case "fish":f.l="equirectangular";break;default:f.l=null}oF(f)});this.s.o(d,"nospatialvideoinfo",function(){f.l=null;oF(f)});this.s.o(d,
1566
- "unloading",function(){f.l=null;oF(f)});oF(this)}pa(mF,gb);q=mF.prototype;q.release=function(){this.s&&(this.s.release(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);gb.prototype.release.call(this)};q.configure=function(a){this.u=a;oF(this)};q.kg=function(){return!!this.G};q.Mb=function(){return!!this.g};q.yd=function(){this.g?this.g.yd():Va("Not playing VR content")};q.Qg=function(a){this.g?kF(this.g,a*pF,0,0):Va("Not playing VR content")};
1567
- q.Og=function(a){this.g?kF(this.g,0,a*pF,0):Va("Not playing VR content")};q.Pg=function(a){this.g?kF(this.g,0,0,a*pF):Va("Not playing VR content")};
1568
- function oF(a){if(a.m)if(a.u.displayInVrMode||a.l){var b=a.l||a.u.defaultVrProjectionMode;a.g?a.g.C!=b&&(a.h.Za(),a.g.release(),qF(a,b)):(a.m.style.display="",qF(a,b),a.dispatchEvent(new S("vrstatuschanged",(new Map).set("newStatus",a.Mb()))))}else a.u.displayInVrMode||a.l||!a.g||(a.m.style.display="none",a.h.Za(),a.g.release(),a.g=null,a.dispatchEvent(new S("vrstatuschanged",(new Map).set("newStatus",a.Mb()))))}function qF(a,b){a.G&&a.m&&(a.g=new aF(a.L,a.K,a.m,a.G,b),rF(a))}
1569
- function nF(a){if(!a.m||rc())return null;for(var b=t(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.m.getContext(c.value))return c;return null}
1570
- function rF(a){a.h.o(a.i,"mousedown",function(d){if(!a.j){var e=d.clientX;d=d.clientY;a.j=!0;a.A=e;a.C=d}});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchstart",function(d){if(!a.j){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.j=!0;a.A=e;a.C=d}});a.h.o(a.i,"wheel",function(d){if(!a.j){var e=a.g,f=d.deltaY;f/=50;20<=e.i&&100>=e.i&&(e.i+=f);20>e.i?e.i=20:100<e.i&&(e.i=100);cF(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.j&&sF(a,d.clientX,d.clientY)});0<navigator.maxTouchPoints&&
1571
- a.h.o(a.i,"touchmove",function(d){a.j&&sF(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.o(a.i,"mouseleave",function(){a.j=!1});a.h.o(a.i,"mouseup",function(){a.j=!1});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchend",function(){a.j=!1});var b=!1;if(window.DeviceOrientationEvent)if("function"==typeof DeviceMotionEvent.requestPermission){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){"granted"!==d||b||(b=!0,tF(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Pa(a.i,
1572
- "click",c);a.h.Pa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Pa(a.i,"touchend",c);"granted"!==d?(a.h.ia(a.i,"click",c),a.h.ia(a.i,"mouseup",c),0<navigator.maxTouchPoints&&a.h.ia(a.i,"touchend",c)):(b=!0,tF(a))}).catch(function(){a.h.Pa(a.i,"click",c);a.h.Pa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Pa(a.i,"touchend",c);a.h.ia(a.i,"click",c);a.h.ia(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.ia(a.i,"touchend",c)})}else b=!0,tF(a)}
1573
- function tF(a){a.h.o(window,"deviceorientation",function(b){var c=(b.alpha||0)-a.H,d=(b.beta||0)-a.I,e=(b.gamma||0)-a.J;if(10<Math.abs(c)||10<Math.abs(d)||5<Math.abs(e))d=e=c=0;a.H=b.alpha||0;a.I=b.beta||0;a.J=b.gamma||0;b=screen.orientation.angle;90==b||-90==b?kF(a.g,c*pF*-1,e*pF*-1,0):kF(a.g,c*pF*-1,d*pF,0)})}function sF(a,b,c){var d=-.6*Math.PI/180;kF(a.g,(b-a.A)*d,-1*(c-a.C)*d,0);a.A=b;a.C=c}var pF=Math.PI/180;function Z(a,b,c,d,e){gb.call(this);var f=this;this.S=!0;this.g=e;this.C=new ar(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.sa=!0;this.A=this.C.vc();this.l=c;this.H=this.C.hd();this.ea=a;this.j=b;this.Nb=d;this.ra=this.H.Ve();this.m=this.s=null;this.Z=!1;this.J=[];this.ob=[];this.Xa=!1;this.P=new Vb(function(){f.j.style.cursor="none";f.Xa=!1;uF(f)});this.ka=new Vb(function(){f.h.removeAttribute("shown");f.M.X(2)});this.M=new Vb(function(){for(var g=t(f.J),h=g.next();!h.done;h=
1574
- g.next())oE(h.value,!1)});this.Aa=new Vb(function(){f.wc()&&vF(f)});this.I=null;this.G=[];this.xa=wF();this.i=new rd;this.u=null;this.configure(this.g);xF(this);this.qa=new Set;yF(this);this.Aa.wa(this.g.refreshTickInSeconds);this.i.o(this.xa,"locale-changed",function(g){f.ra.setLocale(g.locales[0])});this.ra.initInterstitial(this.L,this.ea,this.l)}pa(Z,gb);q=Z.prototype;
1575
- q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.l){b.B(2);break}return G(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.P&&(a.P.stop(),a.P=null);a.ka&&(a.ka.stop(),a.ka=null);a.M&&(a.M.stop(),a.M=null);a.Aa&&(a.Aa.stop(),a.Aa=null);a.u&&(a.u.release(),a.u=null);zF(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.C){b.B(4);break}return G(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ea){b.B(6);break}return G(b,
1576
- a.ea.destroy(),7);case 7:a.ea=null;case 6:a.H=null,a.l=null,a.A=null,a.xa=null,a.qa.clear(),gb.prototype.release.call(a),I(b)}})};function zF(a){for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.release();a.G=[]}function AF(a,b){BF.set(a,b)}q.Zi=function(a){this.sa=a;yF(this)};q.ek=function(){uF(this)};
1577
- q.configure=function(a){this.g=a;this.C.Mh(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.m&&(this.m=null);this.Ia&&(this.Ia=null);this.Ha&&(this.Ha=null);this.u&&this.u.configure(a);this.h?(qn(this.h),zF(this)):(CF(this),DF(this),this.u=new mF(this.h,this.Nb,this.l,this.H,this.g));this.j.classList.add("shaka-video-container");this.l.classList.add("shaka-video");EF(this);this.g.addBigPlayButton&&FF(this);this.g.customContextMenu&&(this.Ha=new tE(this.W,this),this.G.push(this.Ha));this.aa||
1578
- GF(this);this.g.seekOnTaps&&(HF(this),IF(this));this.Fa=W("div");this.Fa.classList.add("shaka-server-side-ad-container");this.h.appendChild(this.Fa);JF(this);this.J=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.J.push.apply(this.J,x(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));KF(this);this.ob=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));uF(this);a=t(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=
1579
- a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.o(b,"click",c);this.i.o(b,"dblclick",c)}};q.oh=function(a){(this.S=a)?(this.j.setAttribute("shaka-controls","true"),this.l.tabIndex=-1,this.l.controls=!1):this.j.removeAttribute("shaka-controls");uF(this)};q.Bi=function(a){this.l.controls=a;this.l.tabIndex=a?0:-1;a&&this.oh(!1)};q.getAd=function(){return this.s};q.jj=function(){return this.C};q.xj=function(){return this.xa};q.Pj=function(){return this.j};q.vc=function(){return this.A};
1580
- q.wj=function(){return this.l};q.hd=function(){return this.H};q.vj=function(){return this.ea};q.oj=function(){return this.h};q.Gj=function(){return this.Fa};q.lj=function(){return this.L};q.mj=function(){return this.g};q.bk=function(){return this.Z};q.sh=function(a){this.Z=a};q.Vj=function(){return this.sa};q.Ig=function(){return this.m?this.m.getValue():this.A.currentTime};q.Di=function(a){this.I=a};q.Rd=function(){return this.J.some(function(a){return!a.classList.contains("shaka-hidden")})};
1581
- q.Jc=function(){this.M.Sa()};q.ee=function(){return document.fullscreenEnabled||this.l.webkitSupportsFullscreen?!0:!1};q.ld=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.l;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
1582
- function LF(a){var b,c,d;return O(function(e){switch(e.g){case 1:ta(e,2);if(!document.fullscreenEnabled){b=a.l;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.B(4);break}if(!document.pictureInPictureElement){e.B(5);break}return G(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,G(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.B(4);break}ta(e,9);return G(e,screen.orientation.lock("landscape"),11);case 11:va(e,
1583
- 4,2);break;case 9:wa(e,2);case 4:va(e,0);break;case 2:d=wa(e),a.dispatchEvent(new S("error",(new Map).set("detail",d))),I(e)}})}function MF(a){var b;return O(function(c){if(!document.fullscreenEnabled)return b=a.l,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.B(0);screen.orientation&&screen.orientation.unlock();return G(c,document.exitFullscreen(),0)})}q.Ef=function(){var a=this;return O(function(b){return a.ld()?G(b,MF(a),0):G(b,LF(a),0)})};
1562
+ function jF(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight;c||(c=a.l.scrollHeight);if(a.sa!==b||a.Ga!==c){a.l.width=b;a.l.height=c;a.sa=b;a.Ga=c;var d=b/c,e=a.I,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.I=e;a.g.viewport(0,0,b,c)}}
1563
+ function lF(a,b,c,d){var e=90*Math.PI/180;var f="cubemap"==a.C?a.M:a.G;var g=Math.sin(b);b=Math.cos(b);var h=f[0],k=f[1],l=f[2],m=f[3],n=f[8],p=f[9],r=f[10],u=f[11];f!==f&&(f[4]=f[4],f[5]=f[5],f[6]=f[6],f[7]=f[7],f[12]=f[12],f[13]=f[13],f[14]=f[14],f[15]=f[15]);f[0]=h*b-n*g;f[1]=k*b-p*g;f[2]=l*b-r*g;f[3]=m*b-u*g;f[8]=h*g+n*b;f[9]=k*g+p*b;f[10]=l*g+r*b;f[11]=m*g+u*b;a.H+=c;a.H<e&&a.H>-e?(e=VE(),g=VE(),b=-1*c,c=Math.sin(b),b=Math.cos(b),h=g[4],k=g[5],l=g[6],m=g[7],n=g[8],p=g[9],r=g[10],u=g[11],g!==
1564
+ e&&(e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[4]=h*b+n*c,e[5]=k*b+p*c,e[6]=l*b+r*c,e[7]=m*b+u*c,e[8]=n*b-h*c,e[9]=p*b-k*c,e[10]=r*b-l*c,e[11]=u*b-m*c,XE(f,e,f)):a.H-=c;c=VE();e=VE();g=Math.sin(d);d=Math.cos(d);b=e[0];h=e[1];k=e[2];l=e[3];m=e[4];n=e[5];p=e[6];r=e[7];e!==c&&(c[8]=e[8],c[9]=e[9],c[10]=e[10],c[11]=e[11],c[12]=e[12],c[13]=e[13],c[14]=e[14],c[15]=e[15]);c[0]=b*d+m*g;c[1]=h*d+n*g;c[2]=k*d+p*g;c[3]=l*d+r*g;c[4]=m*d-b*g;c[5]=n*d-h*g;c[6]=p*
1565
+ d-k*g;c[7]=r*d-l*g;XE(f,c,f);dF(a,!1)}function mF(a,b){if(void 0===b||b)YE(a.h,a.G),a.W=0,a.A=$E(),a.A[0]=(a.h[0]-a.L[0])/20,a.A[1]=(a.h[1]-a.L[1])/20,a.A[2]=(a.h[2]-a.L[2])/20,a.A[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.A[0];a.h[1]-=a.A[1];a.h[2]-=a.A[2];a.h[3]-=a.A[3];b=VE();aF(a.h,a.h);ZE(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.W?a.J=(new Vb(function(){mF(a,!1);a.H=0;a.W++;dF(a,!1)})).X(.025):(ZE(b,a.L),a.G=b)};function nF(a,b,c,d,e){gb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.s=new rd;this.h=new rd;this.G=oF(this);this.g=null;this.j=!1;this.J=this.I=this.H=this.C=this.A=0;this.l=null;this.s.o(d,"loading",function(){f.g&&mF(f.g);pF(f)});this.s.o(d,"spatialvideoinfo",function(g){switch(g.detail.projection){case "hequ":f.l="equirectangular";break;case "fish":f.l="equirectangular";break;default:f.l=null}pF(f)});this.s.o(d,"nospatialvideoinfo",function(){f.l=null;pF(f)});this.s.o(d,
1566
+ "unloading",function(){f.l=null;pF(f)});pF(this)}pa(nF,gb);q=nF.prototype;q.release=function(){this.s&&(this.s.release(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);gb.prototype.release.call(this)};q.configure=function(a){this.u=a;pF(this)};q.kg=function(){return!!this.G};q.Mb=function(){return!!this.g};q.yd=function(){this.g?this.g.yd():Va("Not playing VR content")};q.Qg=function(a){this.g?lF(this.g,a*qF,0,0):Va("Not playing VR content")};
1567
+ q.Og=function(a){this.g?lF(this.g,0,a*qF,0):Va("Not playing VR content")};q.Pg=function(a){this.g?lF(this.g,0,0,a*qF):Va("Not playing VR content")};
1568
+ function pF(a){if(a.m)if(a.u.displayInVrMode||a.l){var b=a.l||a.u.defaultVrProjectionMode;a.g?a.g.C!=b&&(a.h.Za(),a.g.release(),rF(a,b)):(a.m.style.display="",rF(a,b),a.dispatchEvent(new S("vrstatuschanged",(new Map).set("newStatus",a.Mb()))))}else a.u.displayInVrMode||a.l||!a.g||(a.m.style.display="none",a.h.Za(),a.g.release(),a.g=null,a.dispatchEvent(new S("vrstatuschanged",(new Map).set("newStatus",a.Mb()))))}function rF(a,b){a.G&&a.m&&(a.g=new bF(a.L,a.K,a.m,a.G,b),sF(a))}
1569
+ function oF(a){if(!a.m||rc())return null;for(var b=t(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.m.getContext(c.value))return c;return null}
1570
+ function sF(a){a.h.o(a.i,"mousedown",function(d){if(!a.j){var e=d.clientX;d=d.clientY;a.j=!0;a.A=e;a.C=d}});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchstart",function(d){if(!a.j){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.j=!0;a.A=e;a.C=d}});a.h.o(a.i,"wheel",function(d){if(!a.j){var e=a.g,f=d.deltaY;f/=50;20<=e.i&&100>=e.i&&(e.i+=f);20>e.i?e.i=20:100<e.i&&(e.i=100);dF(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.j&&tF(a,d.clientX,d.clientY)});0<navigator.maxTouchPoints&&
1571
+ a.h.o(a.i,"touchmove",function(d){a.j&&tF(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.o(a.i,"mouseleave",function(){a.j=!1});a.h.o(a.i,"mouseup",function(){a.j=!1});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchend",function(){a.j=!1});var b=!1;if(window.DeviceOrientationEvent)if("function"==typeof DeviceMotionEvent.requestPermission){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){"granted"!==d||b||(b=!0,uF(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Pa(a.i,
1572
+ "click",c);a.h.Pa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Pa(a.i,"touchend",c);"granted"!==d?(a.h.ka(a.i,"click",c),a.h.ka(a.i,"mouseup",c),0<navigator.maxTouchPoints&&a.h.ka(a.i,"touchend",c)):(b=!0,uF(a))}).catch(function(){a.h.Pa(a.i,"click",c);a.h.Pa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Pa(a.i,"touchend",c);a.h.ka(a.i,"click",c);a.h.ka(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.ka(a.i,"touchend",c)})}else b=!0,uF(a)}
1573
+ function uF(a){a.h.o(window,"deviceorientation",function(b){var c=(b.alpha||0)-a.H,d=(b.beta||0)-a.I,e=(b.gamma||0)-a.J;if(10<Math.abs(c)||10<Math.abs(d)||5<Math.abs(e))d=e=c=0;a.H=b.alpha||0;a.I=b.beta||0;a.J=b.gamma||0;b=screen.orientation.angle;90==b||-90==b?lF(a.g,c*qF*-1,e*qF*-1,0):lF(a.g,c*qF*-1,d*qF,0)})}function tF(a,b,c){var d=-.6*Math.PI/180;lF(a.g,(b-a.A)*d,-1*(c-a.C)*d,0);a.A=b;a.C=c}var qF=Math.PI/180;function Z(a,b,c,d,e){gb.call(this);var f=this;this.S=!0;this.g=e;this.C=new ar(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.sa=!0;this.A=this.C.wc();this.l=c;this.H=this.C.jd();this.ea=a;this.j=b;this.Nb=d;this.ra=this.H.Ve();this.m=this.s=null;this.Y=!1;this.J=[];this.ob=[];this.Xa=!1;this.P=new Vb(function(){f.j.style.cursor="none";f.Xa=!1;vF(f)});this.ha=new Vb(function(){f.h.removeAttribute("shown");f.M.X(2)});this.M=new Vb(function(){for(var g=t(f.J),h=g.next();!h.done;h=
1574
+ g.next())pE(h.value,!1)});this.Aa=new Vb(function(){f.xc()&&wF(f)});this.I=null;this.G=[];this.xa=xF();this.i=new rd;this.u=null;this.configure(this.g);yF(this);this.qa=new Set;zF(this);this.Aa.wa(this.g.refreshTickInSeconds);this.i.o(this.xa,"locale-changed",function(g){f.ra.setLocale(g.locales[0])});this.ra.initInterstitial(this.L,this.ea,this.l)}pa(Z,gb);q=Z.prototype;
1575
+ q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.l){b.B(2);break}return G(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.P&&(a.P.stop(),a.P=null);a.ha&&(a.ha.stop(),a.ha=null);a.M&&(a.M.stop(),a.M=null);a.Aa&&(a.Aa.stop(),a.Aa=null);a.u&&(a.u.release(),a.u=null);AF(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.C){b.B(4);break}return G(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ea){b.B(6);break}return G(b,
1576
+ a.ea.destroy(),7);case 7:a.ea=null;case 6:a.H=null,a.l=null,a.A=null,a.xa=null,a.qa.clear(),gb.prototype.release.call(a),I(b)}})};function AF(a){for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.release();a.G=[]}function BF(a,b){CF.set(a,b)}q.Zi=function(a){this.sa=a;zF(this)};q.ek=function(){vF(this)};
1577
+ q.configure=function(a){this.g=a;this.C.Mh(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.m&&(this.m=null);this.Ia&&(this.Ia=null);this.Ha&&(this.Ha=null);this.u&&this.u.configure(a);this.h?(qn(this.h),AF(this)):(DF(this),EF(this),this.u=new nF(this.h,this.Nb,this.l,this.H,this.g));this.j.classList.add("shaka-video-container");this.l.classList.add("shaka-video");FF(this);this.g.addBigPlayButton&&GF(this);this.g.customContextMenu&&(this.Ha=new uE(this.W,this),this.G.push(this.Ha));this.aa||
1578
+ HF(this);this.g.seekOnTaps&&(IF(this),JF(this));this.Fa=W("div");this.Fa.classList.add("shaka-server-side-ad-container");this.h.appendChild(this.Fa);KF(this);this.J=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.J.push.apply(this.J,x(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));LF(this);this.ob=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));vF(this);a=t(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=
1579
+ a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.o(b,"click",c);this.i.o(b,"dblclick",c)}};q.oh=function(a){(this.S=a)?(this.j.setAttribute("shaka-controls","true"),this.l.tabIndex=-1,this.l.controls=!1):this.j.removeAttribute("shaka-controls");vF(this)};q.Bi=function(a){this.l.controls=a;this.l.tabIndex=a?0:-1;a&&this.oh(!1)};q.getAd=function(){return this.s};q.jj=function(){return this.C};q.xj=function(){return this.xa};q.Pj=function(){return this.j};q.wc=function(){return this.A};
1580
+ q.wj=function(){return this.l};q.jd=function(){return this.H};q.vj=function(){return this.ea};q.oj=function(){return this.h};q.Gj=function(){return this.Fa};q.lj=function(){return this.L};q.mj=function(){return this.g};q.bk=function(){return this.Y};q.sh=function(a){this.Y=a};q.Vj=function(){return this.sa};q.Ig=function(){return this.m?this.m.getValue():this.A.currentTime};q.Di=function(a){this.I=a};q.Rd=function(){return this.J.some(function(a){return!a.classList.contains("shaka-hidden")})};
1581
+ q.Kc=function(){this.M.Sa()};q.ee=function(){return document.fullscreenEnabled||this.l.webkitSupportsFullscreen?!0:!1};q.md=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.l;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
1582
+ function MF(a){var b,c,d;return O(function(e){switch(e.g){case 1:ta(e,2);if(!document.fullscreenEnabled){b=a.l;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.B(4);break}if(!document.pictureInPictureElement){e.B(5);break}return G(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,G(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.B(4);break}ta(e,9);return G(e,screen.orientation.lock("landscape"),11);case 11:va(e,
1583
+ 4,2);break;case 9:wa(e,2);case 4:va(e,0);break;case 2:d=wa(e),a.dispatchEvent(new S("error",(new Map).set("detail",d))),I(e)}})}function NF(a){var b;return O(function(c){if(!document.fullscreenEnabled)return b=a.l,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.B(0);screen.orientation&&screen.orientation.unlock();return G(c,document.exitFullscreen(),0)})}q.Ef=function(){var a=this;return O(function(b){return a.md()?G(b,NF(a),0):G(b,MF(a),0)})};
1584
1584
  q.ef=function(){return this.C.Ra()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.l.disablePictureInPicture:!1};q.gf=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
1585
- q.xe=function(){var a=this,b,c;return O(function(d){if(1==d.g)return ta(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?G(d,NF(a),5):document.pictureInPictureElement?G(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.l,G(d,b.requestPictureInPicture(),5));if(2!=d.g)return va(d,0);c=wa(d);a.dispatchEvent(new S("error",(new Map).set("detail",c)));I(d)})};
1586
- function NF(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.j;c=b.getBoundingClientRect();return G(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;OF(d);e=b.parentNode||document.body;f=a.j.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
1587
- d.document.head.append(g);d.document.body.append(b);a.i.ia(d,"pagehide",function(){f.replaceWith(b)});I(h)})}
1588
- function OF(a){var b=[].concat(x(document.styleSheets)).map(function(d){try{return[].concat(x(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}q.Ii=function(){oE(this.K,!0);oE(this.L,!0);this.h.setAttribute("ad-active","true")};
1589
- q.ai=function(){oE(this.K,!1);oE(this.L,!1);this.h.removeAttribute("ad-active")};function zE(a){a.S&&a.A.duration&&(a.H.bd(),a.A.paused&&!a.Z?a.A.play():a.A.pause())}function yE(a){a.s&&a.s.isPaused()?a.s.play():a.s&&a.s.pause()}
1590
- function CF(a){a.h=W("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.o(a.h,"touchstart",function(b){a.A.duration&&(a.wc()?a.I=Date.now():(PF(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.o(a.h,"click",function(){QF(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.ee()&&a.Ef()})}
1591
- function FF(a){var b=W("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Ia=new AE(b,a);a.G.push(a.Ia)}function EF(a){var b=W("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function RF(a){a.K=W("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.s&&a.s.isLinear();oE(a.K,b);a.O.appendChild(a.K);b=new rE(a.K,a);a.G.push(b);b=new qE(a.K,a);a.G.push(b);b=new RE(a.K,a);a.G.push(b)}
1592
- function GF(a){a.aa=W("div");a.aa.classList.add("shaka-spinner-container");a.j.appendChild(a.aa);var b=W("div");b.classList.add("shaka-spinner");a.aa.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
1593
- b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function HF(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.Kb=new CE(b,a);a.G.push(a.Kb)}function IF(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.Lb=new DE(b,a);a.G.push(a.Lb)}
1594
- function JF(a){a.O=W("div");a.O.classList.add("shaka-bottom-controls");a.O.classList.add("shaka-no-propagation");a.h.appendChild(a.O);a.i.o(a.O,"click",function(d){d.target.closest(".shaka-overflow-button")||a.Jc()});RF(a);a.W=W("div");a.W.classList.add("shaka-controls-button-panel");a.W.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.W.classList.add("shaka-tooltips-on");a.O.appendChild(a.W);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,BF.get(c)?
1595
- (c=BF.get(c).create(a.W,a),a.G.push(c)):Va("Unrecognized control panel element requested:",c)}function KF(a){if(a.g.addSeekBar)a.m=SF.create(a.O,a),a.G.push(a.m);else{a=t(a.J);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function DF(a){a.L=W("div");a.L.classList.add("shaka-client-side-ad-container");oE(a.L,!1);a.i.o(a.L,"click",function(){QF(a)});a.j.appendChild(a.L)}
1596
- function xF(a){a.i.o(a.H,"buffering",function(){a.S&&oE(a.aa,a.H.ce())});a.S&&oE(a.aa,a.H.ce());a.i.o(window,"keydown",function(b){TF(a,b)});a.i.o(window,"click",function(){return a.Jc()});a.i.o(a,"submenuopen",function(){a.Jc()});a.i.o(a.A,"play",function(){uF(a)});a.i.o(a.A,"pause",function(){uF(a)});a.i.o(a.j,"mousemove",function(b){PF(a,b)});a.i.o(a.j,"touchmove",function(b){PF(a,b)},{passive:!0});a.i.o(a.j,"touchend",function(b){PF(a,b)},{passive:!0});a.i.o(a.j,"mouseleave",function(){a.I||a.P.Sa()});
1597
- a.i.o(a.C,"caststatuschanged",function(){yF(a)});a.i.o(a.u,"vrstatuschanged",function(){a.dispatchEvent(new S("vrstatuschanged"))});a.i.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&PF(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.m&&e&&!d&&0<c&&(b.preventDefault(),
1598
- UF(a,a.m.getValue()-c));break;case "ArrowRight":a.m&&e&&!d&&0<c&&(b.preventDefault(),UF(a,a.m.getValue()+c));break;case "PageDown":a.m&&e&&0<c&&(b.preventDefault(),UF(a,a.m.getValue()-f));break;case "PageUp":a.m&&e&&0<c&&(b.preventDefault(),UF(a,a.m.getValue()+f));break;case "Home":a.m&&UF(a,a.H.Oa().start);break;case "End":a.m&&UF(a,a.H.Oa().end);break;case "f":a.ee()&&a.Ef();break;case "m":a.s&&a.s.isLinear()?a.s.setMuted(!a.s.isMuted()):a.l.muted=!a.l.muted;break;case "p":a.ef()&&a.xe();break;
1599
- case " ":e&&VF(a)}}});a.i.o(a.j,"keyup",function(b){a.qa.delete(b.key)});a.i.o(a.ra,"ad-started",function(b){a.s=b.ad;a.Ii()});a.i.o(a.ra,"ad-stopped",function(){a.s=null;a.ai()});screen.orientation&&a.i.o(screen.orientation,"change",function(){return O(function(b){return G(b,WF(a),0)})})}
1600
- function WF(a){return O(function(b){return a.A&&0!=a.A.readyState&&!a.C.Ra()&&a.g.enableFullscreenOnRotation&&a.ee()?screen.orientation.type.includes("landscape")&&!a.ld()?G(b,LF(a),0):screen.orientation.type.includes("portrait")&&a.ld()?G(b,MF(a),0):b.B(0):b.return()})}
1601
- function PF(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),uF(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.I=Date.now():a.I+1E3<Date.now()&&(a.I=null);a.I&&"mousemove"==b.type||(a.j.style.cursor="",a.Xa=!0,a.M.stop(),a.wc()||(vF(a),uF(a)),a.P.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.I||a.P.X(3))}function XF(a){return window.matchMedia("hover: hover").matches?a.ob.some(function(b){return b.matches(":hover")}):!1}
1602
- function uF(a){var b=a.s?a.s.isPaused():!1,c=a.A.paused&&!a.Z,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.s||!a.s.isLinear())&&c||a.Xa||d||XF(a)?(vF(a),a.h.setAttribute("shown","true"),a.ka.stop()):a.ka.X(a.g.fadeDelay)}function QF(a){a.S&&!a.Mb()&&(a.Rd()?a.M.Sa():a.g.singleClickForPlayAndPause&&VF(a))}function VF(a){a.s&&a.s.isLinear()?yE(a):zE(a)}
1603
- function yF(a){var b=a.C.Ra();a.dispatchEvent(new S("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}q.wc=function(){return this.S?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function UF(a,b){a.m.changeTo(b);a.wc()&&vF(a)}
1604
- function vF(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.isShowing())for(var b=t(a.J),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.J),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new S("timeandseekrangeupdated"))}
1605
- function TF(a,b){a.qa.add(b.key);var c=a.Rd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),uF(a),a.i.o(window,"mousedown",function(){a.i.Pa(window,"mousedown")}));"Escape"==b.key&&a.M.Sa();c&&a.qa.has("Tab")&&YF(a,b)}
1606
- function YF(a,b){var c=a.J.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.qa.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1607
- q.Sk=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});PF(this,a)};q.Uj=function(){this.I||this.P.Sa()};q.kg=function(){return this.u.kg()};q.Mb=function(){return this.u.Mb()};
1608
- q.Nj=function(){var a=this.u;if(a.g){a=a.g;XE(a.h,a.G);var b=a.h;a=b[0];var c=b[1],d=b[2];b=b[3];var e=d*d,f=b*b;var g=a*a+c*c+e+f;var h=a*b-c*d;h>.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=180*Math.acos(Math.cos(a)*Math.cos(g))/Math.PI}else Va("Not playing VR content"),a=null;return a};q.Mj=function(){var a=this.u;a.g?a=a.g.i:(Va("Not playing VR content"),a=null);return a};
1609
- q.Rk=function(a){var b=this.u;b.g?(0>a?(Va("Field of view should be greater than 0"),a=0):100<a&&(Va("Field of view should be less than 100"),a=100),b=b.g,b.i=a,cF(b,!1)):Va("Not playing VR content")};q.yd=function(){this.u.yd()};q.Qg=function(a){this.u.Qg(a)};q.Og=function(a){this.u.Og(a)};q.Pg=function(a){this.u.Pg(a)};
1610
- function wF(){var a=new kd("en");a.Ma("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
1585
+ q.xe=function(){var a=this,b,c;return O(function(d){if(1==d.g)return ta(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?G(d,OF(a),5):document.pictureInPictureElement?G(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.l,G(d,b.requestPictureInPicture(),5));if(2!=d.g)return va(d,0);c=wa(d);a.dispatchEvent(new S("error",(new Map).set("detail",c)));I(d)})};
1586
+ function OF(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.j;c=b.getBoundingClientRect();return G(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;PF(d);e=b.parentNode||document.body;f=a.j.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
1587
+ d.document.head.append(g);d.document.body.append(b);a.i.ka(d,"pagehide",function(){f.replaceWith(b)});I(h)})}
1588
+ function PF(a){var b=[].concat(x(document.styleSheets)).map(function(d){try{return[].concat(x(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}q.Ii=function(){pE(this.K,!0);pE(this.L,!0);this.h.setAttribute("ad-active","true")};
1589
+ q.ai=function(){pE(this.K,!1);pE(this.L,!1);this.h.removeAttribute("ad-active")};function AE(a){a.S&&a.A.duration&&(a.H.cd(),a.A.paused&&!a.Y?a.A.play():a.A.pause())}function zE(a){a.s&&a.s.isPaused()?a.s.play():a.s&&a.s.pause()}
1590
+ function DF(a){a.h=W("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.o(a.h,"touchstart",function(b){a.A.duration&&(a.xc()?a.I=Date.now():(QF(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.o(a.h,"click",function(){RF(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.ee()&&a.Ef()})}
1591
+ function GF(a){var b=W("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Ia=new BE(b,a);a.G.push(a.Ia)}function FF(a){var b=W("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function SF(a){a.K=W("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.s&&a.s.isLinear();pE(a.K,b);a.O.appendChild(a.K);b=new sE(a.K,a);a.G.push(b);b=new rE(a.K,a);a.G.push(b);b=new SE(a.K,a);a.G.push(b)}
1592
+ function HF(a){a.aa=W("div");a.aa.classList.add("shaka-spinner-container");a.j.appendChild(a.aa);var b=W("div");b.classList.add("shaka-spinner");a.aa.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
1593
+ b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function IF(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.Kb=new DE(b,a);a.G.push(a.Kb)}function JF(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.Lb=new EE(b,a);a.G.push(a.Lb)}
1594
+ function KF(a){a.O=W("div");a.O.classList.add("shaka-bottom-controls");a.O.classList.add("shaka-no-propagation");a.h.appendChild(a.O);a.i.o(a.O,"click",function(d){d.target.closest(".shaka-overflow-button")||a.Kc()});SF(a);a.W=W("div");a.W.classList.add("shaka-controls-button-panel");a.W.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.W.classList.add("shaka-tooltips-on");a.O.appendChild(a.W);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,CF.get(c)?
1595
+ (c=CF.get(c).create(a.W,a),a.G.push(c)):Va("Unrecognized control panel element requested:",c)}function LF(a){if(a.g.addSeekBar)a.m=TF.create(a.O,a),a.G.push(a.m);else{a=t(a.J);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function EF(a){a.L=W("div");a.L.classList.add("shaka-client-side-ad-container");pE(a.L,!1);a.i.o(a.L,"click",function(){RF(a)});a.j.appendChild(a.L)}
1596
+ function yF(a){a.i.o(a.H,"buffering",function(){a.S&&pE(a.aa,a.H.ce())});a.S&&pE(a.aa,a.H.ce());a.i.o(window,"keydown",function(b){UF(a,b)});a.i.o(window,"click",function(){return a.Kc()});a.i.o(a,"submenuopen",function(){a.Kc()});a.i.o(a.A,"play",function(){vF(a)});a.i.o(a.A,"pause",function(){vF(a)});a.i.o(a.j,"mousemove",function(b){QF(a,b)});a.i.o(a.j,"touchmove",function(b){QF(a,b)},{passive:!0});a.i.o(a.j,"touchend",function(b){QF(a,b)},{passive:!0});a.i.o(a.j,"mouseleave",function(){a.I||a.P.Sa()});
1597
+ a.i.o(a.C,"caststatuschanged",function(){zF(a)});a.i.o(a.u,"vrstatuschanged",function(){a.dispatchEvent(new S("vrstatuschanged"))});a.i.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&QF(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.m&&e&&!d&&0<c&&(b.preventDefault(),
1598
+ VF(a,a.m.getValue()-c));break;case "ArrowRight":a.m&&e&&!d&&0<c&&(b.preventDefault(),VF(a,a.m.getValue()+c));break;case "PageDown":a.m&&e&&0<c&&(b.preventDefault(),VF(a,a.m.getValue()-f));break;case "PageUp":a.m&&e&&0<c&&(b.preventDefault(),VF(a,a.m.getValue()+f));break;case "Home":a.m&&VF(a,a.H.Oa().start);break;case "End":a.m&&VF(a,a.H.Oa().end);break;case "f":a.ee()&&a.Ef();break;case "m":a.s&&a.s.isLinear()?a.s.setMuted(!a.s.isMuted()):a.l.muted=!a.l.muted;break;case "p":a.ef()&&a.xe();break;
1599
+ case " ":e&&WF(a)}}});a.i.o(a.j,"keyup",function(b){a.qa.delete(b.key)});a.i.o(a.ra,"ad-started",function(b){a.s=b.ad;a.Ii()});a.i.o(a.ra,"ad-stopped",function(){a.s=null;a.ai()});screen.orientation&&a.i.o(screen.orientation,"change",function(){return O(function(b){return G(b,XF(a),0)})})}
1600
+ function XF(a){return O(function(b){return a.A&&0!=a.A.readyState&&!a.C.Ra()&&a.g.enableFullscreenOnRotation&&a.ee()?screen.orientation.type.includes("landscape")&&!a.md()?G(b,MF(a),0):screen.orientation.type.includes("portrait")&&a.md()?G(b,NF(a),0):b.B(0):b.return()})}
1601
+ function QF(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),vF(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.I=Date.now():a.I+1E3<Date.now()&&(a.I=null);a.I&&"mousemove"==b.type||(a.j.style.cursor="",a.Xa=!0,a.M.stop(),a.xc()||(wF(a),vF(a)),a.P.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.I||a.P.X(3))}function YF(a){return window.matchMedia("hover: hover").matches?a.ob.some(function(b){return b.matches(":hover")}):!1}
1602
+ function vF(a){var b=a.s?a.s.isPaused():!1,c=a.A.paused&&!a.Y,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.s||!a.s.isLinear())&&c||a.Xa||d||YF(a)?(wF(a),a.h.setAttribute("shown","true"),a.ha.stop()):a.ha.X(a.g.fadeDelay)}function RF(a){a.S&&!a.Mb()&&(a.Rd()?a.M.Sa():a.g.singleClickForPlayAndPause&&WF(a))}function WF(a){a.s&&a.s.isLinear()?zE(a):AE(a)}
1603
+ function zF(a){var b=a.C.Ra();a.dispatchEvent(new S("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}q.xc=function(){return this.S?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function VF(a,b){a.m.changeTo(b);a.xc()&&wF(a)}
1604
+ function wF(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.isShowing())for(var b=t(a.J),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.J),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new S("timeandseekrangeupdated"))}
1605
+ function UF(a,b){a.qa.add(b.key);var c=a.Rd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),vF(a),a.i.o(window,"mousedown",function(){a.i.Pa(window,"mousedown")}));"Escape"==b.key&&a.M.Sa();c&&a.qa.has("Tab")&&ZF(a,b)}
1606
+ function ZF(a,b){var c=a.J.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.qa.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1607
+ q.Sk=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});QF(this,a)};q.Uj=function(){this.I||this.P.Sa()};q.kg=function(){return this.u.kg()};q.Mb=function(){return this.u.Mb()};
1608
+ q.Nj=function(){var a=this.u;if(a.g){a=a.g;YE(a.h,a.G);var b=a.h;a=b[0];var c=b[1],d=b[2];b=b[3];var e=d*d,f=b*b;var g=a*a+c*c+e+f;var h=a*b-c*d;h>.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=180*Math.acos(Math.cos(a)*Math.cos(g))/Math.PI}else Va("Not playing VR content"),a=null;return a};q.Mj=function(){var a=this.u;a.g?a=a.g.i:(Va("Not playing VR content"),a=null);return a};
1609
+ q.Rk=function(a){var b=this.u;b.g?(0>a?(Va("Field of view should be greater than 0"),a=0):100<a&&(Va("Field of view should be less than 100"),a=100),b=b.g,b.i=a,dF(b,!1)):Va("Not playing VR content")};q.yd=function(){this.u.yd()};q.Qg=function(a){this.u.Qg(a)};q.Og=function(a){this.u.Og(a)};q.Pg=function(a){this.u.Pg(a)};
1610
+ function xF(){var a=new kd("en");a.Ma("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
1611
1611
  ["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
1612
1612
  ["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
1613
1613
  ["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
@@ -1669,101 +1669,101 @@ a.Ma("ru",new Map([["AD_DURATION","\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0
1669
1669
  ["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
1670
1670
  ["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
1671
1671
  ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Lh(navigator.languages||[]);return a}P("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.Pg;Z.prototype.incrementPitch=Z.prototype.Og;
1672
- Z.prototype.incrementYaw=Z.prototype.Qg;Z.prototype.toggleStereoscopicMode=Z.prototype.yd;Z.prototype.setVRFieldOfView=Z.prototype.Rk;Z.prototype.getVRFieldOfView=Z.prototype.Mj;Z.prototype.getVRNorth=Z.prototype.Nj;Z.prototype.isPlayingVR=Z.prototype.Mb;Z.prototype.canPlayVR=Z.prototype.kg;Z.prototype.hideUI=Z.prototype.Uj;Z.prototype.showUI=Z.prototype.Sk;Z.prototype.isOpaque=Z.prototype.wc;Z.prototype.hideAdUI=Z.prototype.ai;Z.prototype.showAdUI=Z.prototype.Ii;Z.prototype.togglePiP=Z.prototype.xe;
1673
- Z.prototype.isPiPEnabled=Z.prototype.gf;Z.prototype.isPiPAllowed=Z.prototype.ef;Z.prototype.toggleFullScreen=Z.prototype.Ef;Z.prototype.isFullScreenEnabled=Z.prototype.ld;Z.prototype.isFullScreenSupported=Z.prototype.ee;Z.prototype.hideSettingsMenus=Z.prototype.Jc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Rd;Z.prototype.setLastTouchEventTime=Z.prototype.Di;Z.prototype.getDisplayTime=Z.prototype.Ig;Z.prototype.isCastAllowed=Z.prototype.Vj;Z.prototype.setSeeking=Z.prototype.sh;
1674
- Z.prototype.isSeeking=Z.prototype.bk;Z.prototype.getConfig=Z.prototype.mj;Z.prototype.getClientSideAdContainer=Z.prototype.lj;Z.prototype.getServerSideAdContainer=Z.prototype.Gj;Z.prototype.getControlsContainer=Z.prototype.oj;Z.prototype.getLocalPlayer=Z.prototype.vj;Z.prototype.getPlayer=Z.prototype.hd;Z.prototype.getLocalVideo=Z.prototype.wj;Z.prototype.getVideo=Z.prototype.vc;Z.prototype.getVideoContainer=Z.prototype.Pj;Z.prototype.getLocalization=Z.prototype.xj;Z.prototype.getCastProxy=Z.prototype.jj;
1675
- Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.Bi;Z.prototype.setEnabledShakaControls=Z.prototype.oh;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.ek;Z.prototype.allowCast=Z.prototype.Zi;Z.registerSeekBar=function(a){SF=a};Z.registerElement=AF;Z.prototype.destroy=Z.prototype.destroy;var BF=new Map,SF=new QE;function ZF(a,b){jE.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=pn();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=W("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1676
- this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);$F(this);this.eventManager.o(this.localization,"locale-updated",function(){aG(c)});this.eventManager.o(this.localization,"locale-changed",function(){aG(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&oE(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){oE(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){oE(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Di(Date.now());
1677
- d.stopPropagation()});this.eventManager.o(this.g,"click",function(){bG(c)});aG(this);this.ad&&this.ad.isLinear()&&oE(this.g,!1)}pa(ZF,jE);ZF.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];jE.prototype.release.call(this)};function cG(a,b){dG.set(a,b)}
1678
- function $F(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,dG.get(c)?(c=dG.get(c),a.i.push(c.create(a.h,a.controls))):Va("Unrecognized overflow menu element requested:",c)}function bG(a){if(a.controls.Rd())a.controls.Jc();else{oE(a.h,!0);uF(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};jb(a.h.childNodes,b)&&kb(a.h.childNodes,b)[0].focus()}}function aG(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1679
- P("shaka.ui.OverflowMenu",ZF);ZF.registerElement=cG;function eG(){}eG.prototype.create=function(a,b){return new ZF(a,b)};AF("overflow_menu",new eG);var dG=new Map;function fG(a,b){function c(e){return d.j[e]}jE.call(this,a,b);var d=this;this.h=pn();this.h.classList.add("shaka-ad-statistics-button");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="insert_chart_outlined";this.h.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");this.u=W("span");a.appendChild(this.u);this.m=W("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.h.appendChild(a);this.parent.appendChild(this.h);
1672
+ Z.prototype.incrementYaw=Z.prototype.Qg;Z.prototype.toggleStereoscopicMode=Z.prototype.yd;Z.prototype.setVRFieldOfView=Z.prototype.Rk;Z.prototype.getVRFieldOfView=Z.prototype.Mj;Z.prototype.getVRNorth=Z.prototype.Nj;Z.prototype.isPlayingVR=Z.prototype.Mb;Z.prototype.canPlayVR=Z.prototype.kg;Z.prototype.hideUI=Z.prototype.Uj;Z.prototype.showUI=Z.prototype.Sk;Z.prototype.isOpaque=Z.prototype.xc;Z.prototype.hideAdUI=Z.prototype.ai;Z.prototype.showAdUI=Z.prototype.Ii;Z.prototype.togglePiP=Z.prototype.xe;
1673
+ Z.prototype.isPiPEnabled=Z.prototype.gf;Z.prototype.isPiPAllowed=Z.prototype.ef;Z.prototype.toggleFullScreen=Z.prototype.Ef;Z.prototype.isFullScreenEnabled=Z.prototype.md;Z.prototype.isFullScreenSupported=Z.prototype.ee;Z.prototype.hideSettingsMenus=Z.prototype.Kc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Rd;Z.prototype.setLastTouchEventTime=Z.prototype.Di;Z.prototype.getDisplayTime=Z.prototype.Ig;Z.prototype.isCastAllowed=Z.prototype.Vj;Z.prototype.setSeeking=Z.prototype.sh;
1674
+ Z.prototype.isSeeking=Z.prototype.bk;Z.prototype.getConfig=Z.prototype.mj;Z.prototype.getClientSideAdContainer=Z.prototype.lj;Z.prototype.getServerSideAdContainer=Z.prototype.Gj;Z.prototype.getControlsContainer=Z.prototype.oj;Z.prototype.getLocalPlayer=Z.prototype.vj;Z.prototype.getPlayer=Z.prototype.jd;Z.prototype.getLocalVideo=Z.prototype.wj;Z.prototype.getVideo=Z.prototype.wc;Z.prototype.getVideoContainer=Z.prototype.Pj;Z.prototype.getLocalization=Z.prototype.xj;Z.prototype.getCastProxy=Z.prototype.jj;
1675
+ Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.Bi;Z.prototype.setEnabledShakaControls=Z.prototype.oh;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.ek;Z.prototype.allowCast=Z.prototype.Zi;Z.registerSeekBar=function(a){TF=a};Z.registerElement=BF;Z.prototype.destroy=Z.prototype.destroy;var CF=new Map,TF=new RE;function $F(a,b){kE.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=pn();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=W("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1676
+ this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);aG(this);this.eventManager.o(this.localization,"locale-updated",function(){bG(c)});this.eventManager.o(this.localization,"locale-changed",function(){bG(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&pE(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){pE(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){pE(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Di(Date.now());
1677
+ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){cG(c)});bG(this);this.ad&&this.ad.isLinear()&&pE(this.g,!1)}pa($F,kE);$F.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];kE.prototype.release.call(this)};function dG(a,b){eG.set(a,b)}
1678
+ function aG(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,eG.get(c)?(c=eG.get(c),a.i.push(c.create(a.h,a.controls))):Va("Unrecognized overflow menu element requested:",c)}function cG(a){if(a.controls.Rd())a.controls.Kc();else{pE(a.h,!0);vF(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};jb(a.h.childNodes,b)&&kb(a.h.childNodes,b)[0].focus()}}function bG(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1679
+ P("shaka.ui.OverflowMenu",$F);$F.registerElement=dG;function fG(){}fG.prototype.create=function(a,b){return new $F(a,b)};BF("overflow_menu",new fG);var eG=new Map;function gG(a,b){function c(e){return d.j[e]}kE.call(this,a,b);var d=this;this.h=pn();this.h.classList.add("shaka-ad-statistics-button");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="insert_chart_outlined";this.h.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");this.u=W("span");a.appendChild(this.u);this.m=W("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.h.appendChild(a);this.parent.appendChild(this.h);
1680
1680
  this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-ad-statistics-container");this.g.classList.add("shaka-hidden");this.controls.h.appendChild(this.g);this.C=[];this.j=this.adManager.getStats();this.s={};this.A={loadTimes:function(e){var f=0;e=t(d.j[e]);for(var g=e.next();!g.done;g=e.next())f+=parseFloat(g.value);return f},averageLoadTime:c,started:c,playedCompletely:c,skipped:c,errors:c};this.l=new Vb(function(){d.j=
1681
- d.adManager.getStats();for(var e=t(d.C),f=e.next();!f.done;f=e.next())f=f.value,d.s[f].textContent=d.A[f](f)});gG(this);hG(this);this.eventManager.o(this.localization,"locale-updated",function(){gG(d)});this.eventManager.o(this.localization,"locale-changed",function(){gG(d)});this.eventManager.o(this.h,"click",function(){oE(d.parent,!1);d.g.classList.contains("shaka-hidden")?(d.i.textContent="insert_chart",d.l.wa(.1),oE(d.g,!0)):(d.i.textContent="insert_chart_outlined",d.l.stop(),oE(d.g,!1));gG(d)});
1682
- this.eventManager.o(this.player,"loading",function(){oE(d.h,!1)});this.eventManager.o(this.adManager,"ad-started",function(){oE(d.h,!0)})}pa(fG,jE);function gG(a){a.u.textContent=a.localization.resolve("AD_STATISTICS");a.h.ariaLabel=a.localization.resolve("AD_STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1683
- function hG(a){for(var b=t(a.controls.g.adStatisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.j){var d=a.g,e=d.appendChild,f=a,g=W("div"),h=W("label");h.textContent=c+":";g.appendChild(h);h=W("span");h.textContent=f.A[c](c);g.appendChild(h);f.s[c]=h;e.call(d,g);a.C.push(c)}else Va("Unrecognized ad statistic element:",c)}fG.prototype.release=function(){this.l.stop();this.l=null;jE.prototype.release.call(this)};P("shaka.ui.AdStatisticsButton",fG);function iG(){}
1684
- iG.prototype.create=function(a,b){return new fG(a,b)};cG("ad_statistics",new iG);vE("ad_statistics",new iG);function jG(a,b){jE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);
1685
- this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);kG(this);lG(this);this.eventManager.o(this.localization,"locale-updated",function(){kG(c)});this.eventManager.o(this.localization,"locale-changed",function(){kG(c)});this.eventManager.o(this.g,"click",function(){c.controls.vc().webkitShowPlaybackTargetPicker()});a=this.controls.vc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1686
- c.player.gd()==qp;oE(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){lG(c)})}pa(jG,jE);function lG(a){var b=a.controls.vc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function kG(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}P("shaka.ui.AirPlayButton",jG);function mG(){}mG.prototype.create=function(a,b){return new jG(a,b)};cG("airplay",new mG);
1687
- AF("airplay",new mG);function nG(a,b,c,d){d=void 0===d?null:d;this.i=a;this.j=b;this.h=oG(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Sg()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);this.configure({});c.controls||a.uh(b);b.ui=this;c.ui=this}q=nG.prototype;q.destroy=function(){var a=this;return O(function(b){if(1==b.g)return a.g?G(b,a.g.destroy(),2):b.B(2);if(4!=b.g)return a.g=null,a.i?G(b,a.i.destroy(),4):b.B(4);a.i=null;I(b)})};
1688
- q.Sg=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:jc()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=oG(this);vm(a,this.h,oG(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=wm(a,b));vm(this.h,a,oG(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new S("uiupdated"))};q.nj=function(){return this.g};
1681
+ d.adManager.getStats();for(var e=t(d.C),f=e.next();!f.done;f=e.next())f=f.value,d.s[f].textContent=d.A[f](f)});hG(this);iG(this);this.eventManager.o(this.localization,"locale-updated",function(){hG(d)});this.eventManager.o(this.localization,"locale-changed",function(){hG(d)});this.eventManager.o(this.h,"click",function(){pE(d.parent,!1);d.g.classList.contains("shaka-hidden")?(d.i.textContent="insert_chart",d.l.wa(.1),pE(d.g,!0)):(d.i.textContent="insert_chart_outlined",d.l.stop(),pE(d.g,!1));hG(d)});
1682
+ this.eventManager.o(this.player,"loading",function(){pE(d.h,!1)});this.eventManager.o(this.adManager,"ad-started",function(){pE(d.h,!0)})}pa(gG,kE);function hG(a){a.u.textContent=a.localization.resolve("AD_STATISTICS");a.h.ariaLabel=a.localization.resolve("AD_STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1683
+ function iG(a){for(var b=t(a.controls.g.adStatisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.j){var d=a.g,e=d.appendChild,f=a,g=W("div"),h=W("label");h.textContent=c+":";g.appendChild(h);h=W("span");h.textContent=f.A[c](c);g.appendChild(h);f.s[c]=h;e.call(d,g);a.C.push(c)}else Va("Unrecognized ad statistic element:",c)}gG.prototype.release=function(){this.l.stop();this.l=null;kE.prototype.release.call(this)};P("shaka.ui.AdStatisticsButton",gG);function jG(){}
1684
+ jG.prototype.create=function(a,b){return new gG(a,b)};dG("ad_statistics",new jG);wE("ad_statistics",new jG);function kG(a,b){kE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);
1685
+ this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);lG(this);mG(this);this.eventManager.o(this.localization,"locale-updated",function(){lG(c)});this.eventManager.o(this.localization,"locale-changed",function(){lG(c)});this.eventManager.o(this.g,"click",function(){c.controls.wc().webkitShowPlaybackTargetPicker()});a=this.controls.wc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1686
+ c.player.hd()==qp;pE(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){mG(c)})}pa(kG,kE);function mG(a){var b=a.controls.wc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function lG(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}P("shaka.ui.AirPlayButton",kG);function nG(){}nG.prototype.create=function(a,b){return new kG(a,b)};dG("airplay",new nG);
1687
+ BF("airplay",new nG);function oG(a,b,c,d){d=void 0===d?null:d;this.i=a;this.j=b;this.h=pG(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Sg()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);this.configure({});c.controls||a.uh(b);b.ui=this;c.ui=this}q=oG.prototype;q.destroy=function(){var a=this;return O(function(b){if(1==b.g)return a.g?G(b,a.g.destroy(),2):b.B(2);if(4!=b.g)return a.g=null,a.i?G(b,a.i.destroy(),4):b.B(4);a.i=null;I(b)})};
1688
+ q.Sg=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:jc()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=pG(this);vm(a,this.h,pG(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=wm(a,b));vm(this.h,a,pG(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new S("uiupdated"))};q.nj=function(){return this.g};
1689
1689
  q.Ok=function(a){this.g.oh(a)};
1690
- function oG(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate recenter_vr toggle_stereoscopic save_video_frame".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent manifestSizeBytes bytesDownloaded nonFatalErrorCount manifestPeriodCount manifestGapCount".split(" "),adStatisticsList:"loadTimes averageLoadTime started playedCompletely skipped errors".split(" "),
1690
+ function pG(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate recenter_vr toggle_stereoscopic save_video_frame".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent manifestSizeBytes bytesDownloaded nonFatalErrorCount manifestPeriodCount manifestGapCount".split(" "),adStatisticsList:"loadTimes averageLoadTime started playedCompletely skipped errors".split(" "),
1691
1691
  contextMenuElements:["loop","picture_in_picture","save_video_frame","statistics","ad_statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
1692
- level:"rgb(255, 255, 255)"},trackLabelFormat:pG,textTrackLabelFormat:pG,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:!0,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular"};
1692
+ level:"rgb(255, 255, 255)"},trackLabelFormat:qG,textTrackLabelFormat:qG,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:!0,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular"};
1693
1693
  "remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Sg()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1694
- function qG(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;return O(function(B){switch(B.g){case 1:gA();if(!Bo())return rG("shaka-ui-load-failed",sG),B.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");d=document.querySelectorAll("[data-shaka-player-vr-canvas]");if(!b.length&&!a.length){B.B(2);break}if(b.length&&!a.length){e=t(b);for(f=e.next();!f.done;f=e.next())g=f.value,
1695
- g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=tG(h,c,d),m=l.gi,n=l.Qi,uG(h,g,m,n));B.B(2);break}p=t(a);r=p.next();case 4:if(r.done){B.B(2);break}u=r.value;if(u.ui){B.B(5);break}w=null;v=t(b);for(f=v.next();!f.done;f=v.next())if(A=f.value,A.parentElement==u){w=A;break}w||(w=document.createElement("video"),w.setAttribute("playsinline",""),u.appendChild(w));z=tG(u,c,d);C=z.gi;y=z.Qi;ta(B,7);return G(B,uG(u,w,C,y),9);case 9:va(B,5);break;case 7:return wa(B),
1696
- rG("shaka-ui-load-failed",vG),B.return();case 5:r=p.next();B.B(4);break;case 2:rG("shaka-ui-loaded"),I(B)}})}function rG(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1697
- function uG(a,b,c,d){var e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:e=new X;f=new nG(e,a,b,d);e.Hh(c);g="";h=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(g=a.dataset.shakaPlayerCastReceiverId,h="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(g=b.dataset.shakaPlayerCastReceiverId,h="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);g.length&&f.configure({castReceiverAppId:g,castAndroidReceiverCompatible:h});
1698
- b.controls&&f.g.Bi(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");m=t(b.querySelectorAll("source"));n=m.next();case 2:if(n.done){r.B(4);break}p=n.value;ta(r,5);return G(r,f.g.hd().load(p.getAttribute("src")),7);case 7:r.B(4);break;case 5:wa(r);case 3:n=m.next();r.B(2);break;case 4:return G(r,e.ac(b),0)}})}
1699
- function tG(a,b,c){var d=null,e=t(b);for(b=e.next();!b.done;b=e.next())if(b=b.value,b.parentElement==a){d=b;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));e=null;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,b.parentElement==a){e=b;break}e||(e=document.createElement("canvas"),e.classList.add("shaka-vr-canvas-container"),a.appendChild(e));return{gi:d,Qi:e}}P("shaka.ui.Overlay",nG);nG.prototype.setEnabled=nG.prototype.Ok;
1700
- nG.prototype.getControls=nG.prototype.nj;nG.prototype.configure=nG.prototype.configure;nG.prototype.getConfiguration=nG.prototype.getConfiguration;nG.prototype.isMobile=nG.prototype.Sg;nG.prototype.destroy=nG.prototype.destroy;var pG=0;nG.TrackLabelFormat={LANGUAGE:pG,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var sG=0,vG=1;nG.FailReasonCode={NO_BROWSER_SUPPORT:sG,PLAYER_FAILED_TO_LOAD:vG};
1701
- "complete"==document.readyState?O(function(a){if(1==a.g)return G(a,Promise.resolve(),2);qG();I(a)}):window.addEventListener("load",qG);function wG(a,b,c,d,e,f,g,h){function k(E){var K="";E=E.toLowerCase();E.startsWith("mp4a")?K="AAC":"ec-3"===E||"ac-3"===E?K="Dolby":"opus"===E?K="Opus":"flac"===E&&(K="fLaC");return K?" "+K:K}function l(E){var K="";5<=E&&(K=" "+f.resolve("SURROUND"));return K}function m(E,K,M,N,Q){K=[E,K];h&&null!=N&&K.push(N);p(E)&&Q&&K.push(Q);M&&3==g&&K.push(M);return K.join(": ")}function n(E){return"variant"==E.type?E.audioRoles?E.audioRoles.join(", "):void 0:E.roles.join(", ")}function p(E){return u.has(E)&&
1702
- 1<u.get(E).size}for(var r=a.find(function(E){return 1==E.active}),u=new Map,w=t(a),v=w.next();!v.done;v=w.next()){var A=v.value;A.audioCodec&&(u.has(A.language)||u.set(A.language,new Set),u.get(A.language).add(A.audioCodec))}w=kE(b);qn(b);b.appendChild(w);w=new Map;A=t(a);for(v=A.next();!v.done;v=A.next())v=v.value,w.has(v.language)||w.set(v.language,new Set),w.get(v.language).add(n(v));w=new Set;r=r?m(r.language,n(r),r.label,r.channelsCount,r.audioCodec):"";A={};a=t(a);for(v=a.next();!v.done;A={Eb:A.Eb},
1703
- v=a.next()){A.Eb=v.value;v=A.Eb.language;var z=A.Eb.forced,C=f.resolve("SUBTITLE_FORCED"),y=n(A.Eb),B=A.Eb.label,D=A.Eb.channelsCount,F=A.Eb.audioCodec,J=m(v,y,B,D,F);if(!w.has(J)){w.add(J);var L=pn();L.addEventListener("click",function(E){return function(){c(E.Eb)}}(A));var H=W("span");L.appendChild(H);H.textContent=xG(v,f);switch(g){case pG:p(v)&&(H.textContent+=k(F));h&&(H.textContent+=l(D));z&&(H.textContent+=" ("+C+")");break;case 1:p(v)&&(H.textContent+=k(F));h&&(H.textContent+=l(D));y?H.textContent=
1704
- y:(Va("Track #"+A.Eb.id+" does not have a role, but the UI is configured to only show role."),H.textContent="?");z&&(H.textContent+=" ("+C+")");break;case 2:p(v)&&(H.textContent+=k(F));h&&(H.textContent+=l(D));y&&(H.textContent+=": "+y);z&&(H.textContent+=" ("+C+")");break;case 3:B?H.textContent=B:(Va("Track #"+A.Eb.id+" does not have a label, but the UI is configured to only show labels."),H.textContent="?")}d&&J==r&&(L.appendChild(nE()),H.classList.add("shaka-chosen-item"),L.ariaSelected="true",
1705
- e.textContent=H.textContent);b.appendChild(L)}}}function xG(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=fd(a);return a in fE?fE[a].D:c in fE?fE[c].D+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function yG(a,b,c){jE.call(this,a,b);var d=this;zG(this,c);AG(this);BG(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new S("submenuopen")),oE(d.menu,!0),mE(d.menu)):oE(d.menu,!1)})}pa(yG,jE);
1706
- function zG(a,b){a.button=pn();a.button.classList.add("shaka-overflow-button");a.icon=W("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=W("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=W("span");b.appendChild(a.nameSpan);a.currentSelection=W("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1707
- function AG(a){a.menu=W("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=pn();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Jc()});var b=W("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1708
- W("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function BG(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}oE(a.parent,!0);jb(a.parent.childNodes,b)&&kb(a.parent.childNodes,b)[0].focus();uF(a.controls)}))}P("shaka.ui.SettingsMenu",yG);function CG(a,b){yG.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){DG(c)});this.eventManager.o(this.localization,"locale-changed",function(){DG(c)});this.eventManager.o(this.player,"loading",function(){EG(c)});this.eventManager.o(this.player,"trackschanged",function(){EG(c)});this.eventManager.o(this.player,
1709
- "variantchanged",function(){FG(c)});DG(this);FG(this)}pa(CG,yG);
1710
- function FG(a){var b=a.player.Jb();wG(b,a.menu,function(c){var d=void 0;c.channelsCount&&a.controls.g.showAudioChannelCountVariants&&(d=c.channelsCount);var e=void 0;c.audioCodec&&(e=c.audioCodec);a.player.jh(c.language,c.roles[0],d,0,e)},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);mE(a.menu);a.controls.dispatchEvent(new S("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);oE(a.button,2<
1711
- a.menu.getElementsByTagName("button").length)}function EG(a){var b=0<a.player.Jb().length;oE(a.button,b);FG(a)}function DG(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}P("shaka.ui.AudioLanguageSelection",CG);function GG(){}GG.prototype.create=function(a,b){return new CG(a,b)};cG("language",new GG);AF("language",new GG);function HG(a,b){jE.call(this,a,b);var c=this;this.h=this.controls.C;this.g=pn();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
1712
- a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);IG(this);JG(this);this.eventManager.o(this.localization,"locale-updated",function(){IG(c)});this.eventManager.o(this.localization,"locale-changed",function(){IG(c)});this.eventManager.o(this.g,"click",function(){KG(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){JG(c)})}pa(HG,jE);
1713
- function KG(a){var b;O(function(c){if(1==c.g){if(a.h.Ra())return a.h.Ji(),c.B(0);ta(c,3);a.g.disabled=!0;return G(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new S("error",(new Map).set("detail",b)));I(c)})}function JG(a){var b=a.h.ig()&&a.controls.sa,c=a.h.Ra();oE(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");LG(a)}
1714
- function LG(a){a.j.textContent=a.h.Ra()?a.h.yf():a.localization.resolve("OFF")}function IG(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");LG(a)}P("shaka.ui.CastButton",HG);function MG(){}MG.prototype.create=function(a,b){return new HG(a,b)};cG("cast",new MG);AF("cast",new MG);function NG(a,b){jE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);OG(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){OG(c)});this.eventManager.o(this.localization,"locale-changed",function(){OG(c)});
1715
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ua())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Uc(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(NG,jE);function OG(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}P("shaka.ui.FastForwardButton",NG);function PG(){}PG.prototype.create=function(a,b){return new NG(a,b)};AF("fast_forward",new PG);function QG(a,b){jE.call(this,a,b);var c=this;this.h=this.controls.l;this.g=pn();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");RG(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);SG(this);this.eventManager.o(this.localization,"locale-updated",function(){SG(c)});this.eventManager.o(this.localization,"locale-changed",function(){SG(c)});this.eventManager.o(this.g,"click",function(){return O(function(d){return G(d,
1716
- c.controls.Ef(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.ld()?"fullscreen_exit":"fullscreen";SG(c)});this.eventManager.o(this.h,"loadedmetadata",function(){RG(c)});this.eventManager.o(this.h,"loadeddata",function(){RG(c)})}pa(QG,jE);function RG(a){a.controls.ee()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function SG(a){a.g.ariaLabel=a.localization.resolve(a.controls.ld()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1717
- P("shaka.ui.FullscreenButton",QG);function TG(){}TG.prototype.create=function(a,b){return new QG(a,b)};AF("fullscreen",new TG);function UG(a,b){jE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");this.l.textContent=this.localization.resolve("LOOP");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
1718
- a.appendChild(this.j);this.g.appendChild(a);VG(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){VG(c)});this.eventManager.o(this.localization,"locale-changed",function(){VG(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Sa();c.h.wa(1)});this.m=this.video.loop;this.h=new Vb(function(){c.m!=c.video.loop&&(VG(c),c.m=c.video.loop)});this.h.wa(1)}pa(UG,jE);
1719
- UG.prototype.release=function(){this.h.stop();this.h=null;jE.prototype.release.call(this)};function VG(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}P("shaka.ui.LoopButton",UG);function WG(){}WG.prototype.create=function(a,b){return new UG(a,b)};cG("loop",new WG);AF("loop",new WG);vE("loop",new WG);function XG(a,b){jE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);YG(this);ZG(this);this.eventManager.o(this.localization,"locale-updated",function(){YG(c)});this.eventManager.o(this.localization,"locale-changed",function(){YG(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1720
- this.eventManager.o(this.video,"volumechange",function(){YG(c);ZG(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){YG(c);ZG(c)});this.eventManager.o(this.adManager,"ad-muted",function(){YG(c);ZG(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;YG(c);ZG(c)})}pa(XG,jE);function YG(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1721
- function ZG(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}P("shaka.ui.MuteButton",XG);function $G(){}$G.prototype.create=function(a,b){return new XG(a,b)};AF("mute",new $G);function aH(a,b){jE.call(this,a,b);var c=this;this.l=this.controls.l;this.g=pn();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
1722
- W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);bH(this);this.parent.appendChild(this.g);this.controls.ef()||oE(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){bH(c)});this.eventManager.o(this.localization,"locale-changed",function(){bH(c)});this.eventManager.o(this.g,"click",function(){c.controls.xe()});this.eventManager.o(this.l,"enterpictureinpicture",function(){cH(c)});this.eventManager.o(this.l,"leavepictureinpicture",
1723
- function(){dH(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){eH(c)});this.eventManager.o(this.player,"trackschanged",function(){eH(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){cH(c);c.eventManager.ia(d.window,"pagehide",function(){dH(c)})})}pa(aH,jE);
1724
- function cH(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function dH(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
1725
- function bH(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.gf();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function eH(a){O(function(b){if(!a.controls.ef())return oE(a.g,!1),a.controls.gf()?G(b,a.controls.xe(),0):b.B(0);if(!a.player||!a.player.Lc())return oE(a.g,!0),b.B(0);oE(a.g,!1);return a.controls.gf()?G(b,a.controls.xe(),0):b.B(0)})}P("shaka.ui.PipButton",aH);
1726
- function fH(){}fH.prototype.create=function(a,b){return new aH(a,b)};cG("picture_in_picture",new fH);AF("picture_in_picture",new fH);vE("picture_in_picture",new fH);function gH(a,b){yG.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){hH(c)});this.eventManager.o(this.localization,"locale-changed",function(){hH(c)});this.eventManager.o(this.player,"loaded",function(){iH(c,c.player.Ua())});this.eventManager.o(this.player,"ratechange",function(){iH(c,
1727
- c.player.Ua())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));hH(this);jH(this);iH(this,this.player.Ua())}pa(gH,yG);function hH(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1728
- function iH(a,b){var c=lE(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(nE()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1729
- "x")}function jH(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={Hd:b.Hd},d=c.next()){b.Hd=d.value;d=pn();var e=W("span");e.textContent=b.Hd;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.Hd);a.video.defaultPlaybackRate=a.g.get(f.Hd)}}(b));a.menu.appendChild(d)}mE(a.menu)}P("shaka.ui.PlaybackRateSelection",gH);function kH(){}kH.prototype.create=function(a,b){return new gH(a,b)};cG("playback_rate",new kH);AF("playback_rate",new kH);function lH(a,b){jE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-current-time");uH(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Oa().end)});this.eventManager.o(this.player,"loading",function(){oE(c.g,!0)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Z,e=c.controls.Ig(),f=c.player.Oa(),g=f.end-f.start;c.player.U()?(e=Math.max(0,Math.floor(f.end-
1730
- e)),g=3600<=g,1<=e||d?(uH(c,"- "+pE(e,g)),c.g.disabled=!1):(uH(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=g,e=pE(Math.max(0,e-f.start),d),g&&(e+=" / "+pE(g,d)),uH(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.o(this.adManager,"ad-started",function(){oE(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){oE(c.g,!0)})}pa(lH,jE);
1731
- function uH(a,b){b!=a.g.textContent&&(a.g.textContent=b)}P("shaka.ui.PresentationTimeTracker",lH);function vH(){}vH.prototype.create=function(a,b){return new lH(a,b)};AF("time_and_duration",new vH);function wH(a,b){jE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="control_camera";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
1732
- a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);xH(this);this.eventManager.o(this.localization,"locale-updated",function(){xH(c)});this.eventManager.o(this.localization,"locale-changed",function(){xH(c)});var d=this.controls.u;this.eventManager.o(this.g,"click",function(){d.g?lF(d.g):Va("Not playing VR content")});this.eventManager.o(d,"vrstatuschanged",function(){oE(c.g,c.controls.Mb())});oE(this.g,this.controls.Mb())}pa(wH,jE);
1733
- function xH(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}P("shaka.ui.RecenterVRButton",wH);function yH(){}yH.prototype.create=function(a,b){return new wH(a,b)};cG("recenter_vr",new yH);AF("recenter_vr",new yH);function zH(a,b){jE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");a="cast";(b=oc())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
1734
- a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;AH(this);oE(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.o(this.localization,"locale-updated",function(){AH(c)}),this.eventManager.o(this.localization,"locale-changed",function(){AH(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){BH(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,
1735
- "connect",function(){BH(c)}),this.eventManager.o(this.video.remote,"connecting",function(){BH(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){BH(c)}),this.eventManager.o(this.player,"loaded",function(){BH(c)}),BH(this))}pa(zH,jE);zH.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});jE.prototype.release.call(this)};
1736
- function BH(a){var b,c;O(function(d){switch(d.g){case 1:if(a.controls.C.ig()&&a.controls.sa){oE(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);d.B(0);break}if("disconnected"==a.video.remote.state){b=function(e){a.player?oE(a.g,a.player.gd()==qp&&e):oE(a.g,!1)};ta(d,7);if(-1==a.h){d.B(9);break}return G(d,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){d.B(0);break}return G(d,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;d.B(0);break;case 10:a.h=-1;
1737
- case 9:va(d,8);break;case 7:wa(d);case 8:return ta(d,11),G(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;va(d,0);break;case 11:wa(d),b(!0),I(d)}})}function AH(a){var b=a.localization.resolve("CAST"),c=oc();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}P("shaka.ui.RemoteButton",zH);function CH(){}CH.prototype.create=function(a,b){return new zH(a,b)};cG("remote",new CH);AF("remote",new CH);function DH(a,b){yG.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){EH(c)});this.eventManager.o(this.localization,"locale-changed",function(){EH(c)});this.eventManager.o(this.player,"loading",function(){FH(c)});this.eventManager.o(this.player,"variantchanged",function(){FH(c)});this.eventManager.o(this.player,
1738
- "trackschanged",function(){FH(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){FH(c)});FH(this)}pa(DH,yG);
1739
- function FH(a){var b=[];a.player.gd()!=qp&&(b=a.player.Jb());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=a.player.Lc()?b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==k.bandwidth})==l}):
1740
- 1<[].concat(x(new Set(b.map(function(k){return k.audioId})))).length?b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.videoBandwidth==k.videoBandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l}):b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.bandwidth==k.bandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l});a.player.Lc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):
1741
- b.sort(function(k,l){return l.height==k.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=kE(a.menu);qn(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={$b:e.$b},g=f.next()){e.$b=g.value;g=pn();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.$b;a.player.configure({abr:{enabled:!1}});a.player.Af(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=W("span");h.textContent=
1742
- a.player.Lc()&&e.$b.bandwidth?Math.round(e.$b.bandwidth/1E3)+" kbits/s":e.$b.height&&e.$b.width?GH(e.$b,b):"Unknown";g.appendChild(h);d||e.$b!=c||(g.ariaSelected="true",g.appendChild(nE()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=pn();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});FH(a)});a.g=W("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");
1743
- e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(nE()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);mE(a.menu);a.controls.dispatchEvent(new S("resolutionselectionupdated"));EH(a);oE(a.button,1<b.length)}
1744
- function GH(a,b){var c=a.height||0,d=a.width||0,e=c;d/c>16/9&&(e=Math.round(9*d/16));c=e+"p";2160==e&&(c="4K");(e=a.frameRate)&&(50<=e||20>=e)&&(c+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)c+=" (HDR)";"CH-STEREO"==a.videoLayout&&(c+=" (3D)");b.some(function(f){return f!=a&&f.height==a.height})&&(c+=" ("+Math.round((a.videoBandwidth||a.bandwidth)/1E3)+" kbits/s)");return c}
1745
- function EH(a){var b=a.player.Lc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}P("shaka.ui.ResolutionSelection",DH);function HH(){}
1746
- HH.prototype.create=function(a,b){return new DH(a,b)};cG("quality",new HH);AF("quality",new HH);function IH(a,b){jE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);JH(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){JH(c)});this.eventManager.o(this.localization,"locale-changed",function(){JH(c)});
1747
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ua())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Uc(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(IH,jE);function JH(a){a.g.ariaLabel=a.localization.resolve("REWIND")}P("shaka.ui.RewindButton",IH);function KH(){}KH.prototype.create=function(a,b){return new IH(a,b)};AF("rewind",new KH);function LH(a,b){jE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
1748
- a.appendChild(this.j);this.g.appendChild(a);MH(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){MH(c)});this.eventManager.o(this.localization,"locale-changed",function(){MH(c)});this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.l;d.width=f.videoWidth;d.height=f.videoHeight;e.drawImage(f,0,0,d.width,d.height);d=d.toDataURL("image/png");e=document.createElement("a");e.href=d;e.download=
1749
- "videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.u,"vrstatuschanged",function(){NH(c)});this.eventManager.o(this.adManager,"ad-started",function(){NH(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){NH(c)});this.eventManager.o(this.player,"unloading",function(){NH(c)});this.eventManager.o(this.player,"loaded",function(){NH(c)});this.eventManager.o(this.player,"loaded",function(){NH(c)});this.eventManager.o(this.video,"play",function(){NH(c)});
1750
- this.eventManager.o(this.video,"pause",function(){NH(c)});this.eventManager.o(this.video,"seeking",function(){NH(c)});NH(this)}pa(LH,jE);function NH(a){var b=!0;a.controls.Mb()&&(b=!1);if(a.player.drmInfo()||a.player.Lc())b=!1;a.ad&&(b=!1);oE(a.g,b)}function MH(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}P("shaka.ui.SaveVideoFrameButton",LH);function OH(){}OH.prototype.create=function(a,b){return new LH(a,b)};
1751
- cG("save_video_frame",new OH);vE("save_video_frame",new OH);function PH(a,b){xE.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}pa(PH,xE);PH.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
1752
- PH.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};P("shaka.ui.SmallPlayButton",PH);function QH(){}QH.prototype.create=function(a,b){return new PH(a,b)};AF("play_pause",new QH);function RH(a,b){jE.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(RH,jE);P("shaka.ui.Spacer",RH);function SH(){}SH.prototype.create=function(a,b){return new RH(a,b)};AF("spacer",new SH);function TH(a,b){function c(m){m=parseInt(l.g[m],10);return 1E6<m?(m/1E6).toFixed(2)+"MB":1E3<m?(m/1E3).toFixed(2)+"KB":m+"B"}function d(m){return l.g[m]+" (gaps)"}function e(m){return pE(l.g[m],!1)+" (m)"}function f(m){return Math.round(l.g[m]/1E3)+" (kbits/s)"}function g(m){return l.g[m].toFixed(2)+" (s)"}function h(m){return l.g[m]+" (frames)"}function k(m){return l.g[m]+" (px)"}jE.call(this,a,b);var l=this;this.i=pn();this.i.classList.add("shaka-statistics-button");this.j=W("i");this.j.classList.add("material-icons-round");
1694
+ function rG(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,z,C,y;return O(function(B){switch(B.g){case 1:hA();if(!Bo())return sG("shaka-ui-load-failed",tG),B.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");d=document.querySelectorAll("[data-shaka-player-vr-canvas]");if(!b.length&&!a.length){B.B(2);break}if(b.length&&!a.length){e=t(b);for(f=e.next();!f.done;f=e.next())g=f.value,
1695
+ g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=uG(h,c,d),m=l.gi,n=l.Qi,vG(h,g,m,n));B.B(2);break}p=t(a);r=p.next();case 4:if(r.done){B.B(2);break}u=r.value;if(u.ui){B.B(5);break}w=null;v=t(b);for(f=v.next();!f.done;f=v.next())if(A=f.value,A.parentElement==u){w=A;break}w||(w=document.createElement("video"),w.setAttribute("playsinline",""),u.appendChild(w));z=uG(u,c,d);C=z.gi;y=z.Qi;ta(B,7);return G(B,vG(u,w,C,y),9);case 9:va(B,5);break;case 7:return wa(B),
1696
+ sG("shaka-ui-load-failed",wG),B.return();case 5:r=p.next();B.B(4);break;case 2:sG("shaka-ui-loaded"),I(B)}})}function sG(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1697
+ function vG(a,b,c,d){var e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:e=new X;f=new oG(e,a,b,d);e.Hh(c);g="";h=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(g=a.dataset.shakaPlayerCastReceiverId,h="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(g=b.dataset.shakaPlayerCastReceiverId,h="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);g.length&&f.configure({castReceiverAppId:g,castAndroidReceiverCompatible:h});
1698
+ b.controls&&f.g.Bi(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");m=t(b.querySelectorAll("source"));n=m.next();case 2:if(n.done){r.B(4);break}p=n.value;ta(r,5);return G(r,f.g.jd().load(p.getAttribute("src")),7);case 7:r.B(4);break;case 5:wa(r);case 3:n=m.next();r.B(2);break;case 4:return G(r,e.ac(b),0)}})}
1699
+ function uG(a,b,c){var d=null,e=t(b);for(b=e.next();!b.done;b=e.next())if(b=b.value,b.parentElement==a){d=b;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));e=null;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,b.parentElement==a){e=b;break}e||(e=document.createElement("canvas"),e.classList.add("shaka-vr-canvas-container"),a.appendChild(e));return{gi:d,Qi:e}}P("shaka.ui.Overlay",oG);oG.prototype.setEnabled=oG.prototype.Ok;
1700
+ oG.prototype.getControls=oG.prototype.nj;oG.prototype.configure=oG.prototype.configure;oG.prototype.getConfiguration=oG.prototype.getConfiguration;oG.prototype.isMobile=oG.prototype.Sg;oG.prototype.destroy=oG.prototype.destroy;var qG=0;oG.TrackLabelFormat={LANGUAGE:qG,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var tG=0,wG=1;oG.FailReasonCode={NO_BROWSER_SUPPORT:tG,PLAYER_FAILED_TO_LOAD:wG};
1701
+ "complete"==document.readyState?O(function(a){if(1==a.g)return G(a,Promise.resolve(),2);rG();I(a)}):window.addEventListener("load",rG);function xG(a,b,c,d,e,f,g,h){function k(E){var K="";E=E.toLowerCase();E.startsWith("mp4a")?K="AAC":"ec-3"===E||"ac-3"===E?K="Dolby":"opus"===E?K="Opus":"flac"===E&&(K="fLaC");return K?" "+K:K}function l(E){var K="";5<=E&&(K=" "+f.resolve("SURROUND"));return K}function m(E,K,M,N,Q){K=[E,K];h&&null!=N&&K.push(N);p(E)&&Q&&K.push(Q);M&&3==g&&K.push(M);return K.join(": ")}function n(E){return"variant"==E.type?E.audioRoles?E.audioRoles.join(", "):void 0:E.roles.join(", ")}function p(E){return u.has(E)&&
1702
+ 1<u.get(E).size}for(var r=a.find(function(E){return 1==E.active}),u=new Map,w=t(a),v=w.next();!v.done;v=w.next()){var A=v.value;A.audioCodec&&(u.has(A.language)||u.set(A.language,new Set),u.get(A.language).add(A.audioCodec))}w=lE(b);qn(b);b.appendChild(w);w=new Map;A=t(a);for(v=A.next();!v.done;v=A.next())v=v.value,w.has(v.language)||w.set(v.language,new Set),w.get(v.language).add(n(v));w=new Set;r=r?m(r.language,n(r),r.label,r.channelsCount,r.audioCodec):"";A={};a=t(a);for(v=a.next();!v.done;A={Eb:A.Eb},
1703
+ v=a.next()){A.Eb=v.value;v=A.Eb.language;var z=A.Eb.forced,C=f.resolve("SUBTITLE_FORCED"),y=n(A.Eb),B=A.Eb.label,D=A.Eb.channelsCount,F=A.Eb.audioCodec,J=m(v,y,B,D,F);if(!w.has(J)){w.add(J);var L=pn();L.addEventListener("click",function(E){return function(){c(E.Eb)}}(A));var H=W("span");L.appendChild(H);H.textContent=yG(v,f);switch(g){case qG:p(v)&&(H.textContent+=k(F));h&&(H.textContent+=l(D));z&&(H.textContent+=" ("+C+")");break;case 1:p(v)&&(H.textContent+=k(F));h&&(H.textContent+=l(D));y?H.textContent=
1704
+ y:(Va("Track #"+A.Eb.id+" does not have a role, but the UI is configured to only show role."),H.textContent="?");z&&(H.textContent+=" ("+C+")");break;case 2:p(v)&&(H.textContent+=k(F));h&&(H.textContent+=l(D));y&&(H.textContent+=": "+y);z&&(H.textContent+=" ("+C+")");break;case 3:B?H.textContent=B:(Va("Track #"+A.Eb.id+" does not have a label, but the UI is configured to only show labels."),H.textContent="?")}d&&J==r&&(L.appendChild(oE()),H.classList.add("shaka-chosen-item"),L.ariaSelected="true",
1705
+ e.textContent=H.textContent);b.appendChild(L)}}}function yG(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=fd(a);return a in gE?gE[a].D:c in gE?gE[c].D+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function zG(a,b,c){kE.call(this,a,b);var d=this;AG(this,c);BG(this);CG(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new S("submenuopen")),pE(d.menu,!0),nE(d.menu)):pE(d.menu,!1)})}pa(zG,kE);
1706
+ function AG(a,b){a.button=pn();a.button.classList.add("shaka-overflow-button");a.icon=W("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=W("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=W("span");b.appendChild(a.nameSpan);a.currentSelection=W("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1707
+ function BG(a){a.menu=W("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=pn();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Kc()});var b=W("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1708
+ W("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function CG(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}pE(a.parent,!0);jb(a.parent.childNodes,b)&&kb(a.parent.childNodes,b)[0].focus();vF(a.controls)}))}P("shaka.ui.SettingsMenu",zG);function DG(a,b){zG.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){EG(c)});this.eventManager.o(this.localization,"locale-changed",function(){EG(c)});this.eventManager.o(this.player,"loading",function(){FG(c)});this.eventManager.o(this.player,"trackschanged",function(){FG(c)});this.eventManager.o(this.player,
1709
+ "variantchanged",function(){GG(c)});EG(this);GG(this)}pa(DG,zG);
1710
+ function GG(a){var b=a.player.Jb();xG(b,a.menu,function(c){var d=void 0;c.channelsCount&&a.controls.g.showAudioChannelCountVariants&&(d=c.channelsCount);var e=void 0;c.audioCodec&&(e=c.audioCodec);a.player.jh(c.language,c.roles[0],d,0,e)},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);nE(a.menu);a.controls.dispatchEvent(new S("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);pE(a.button,2<
1711
+ a.menu.getElementsByTagName("button").length)}function FG(a){var b=0<a.player.Jb().length;pE(a.button,b);GG(a)}function EG(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}P("shaka.ui.AudioLanguageSelection",DG);function HG(){}HG.prototype.create=function(a,b){return new DG(a,b)};dG("language",new HG);BF("language",new HG);function IG(a,b){kE.call(this,a,b);var c=this;this.h=this.controls.C;this.g=pn();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
1712
+ a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);JG(this);KG(this);this.eventManager.o(this.localization,"locale-updated",function(){JG(c)});this.eventManager.o(this.localization,"locale-changed",function(){JG(c)});this.eventManager.o(this.g,"click",function(){LG(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){KG(c)})}pa(IG,kE);
1713
+ function LG(a){var b;O(function(c){if(1==c.g){if(a.h.Ra())return a.h.Ji(),c.B(0);ta(c,3);a.g.disabled=!0;return G(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new S("error",(new Map).set("detail",b)));I(c)})}function KG(a){var b=a.h.ig()&&a.controls.sa,c=a.h.Ra();pE(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");MG(a)}
1714
+ function MG(a){a.j.textContent=a.h.Ra()?a.h.yf():a.localization.resolve("OFF")}function JG(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");MG(a)}P("shaka.ui.CastButton",IG);function NG(){}NG.prototype.create=function(a,b){return new IG(a,b)};dG("cast",new NG);BF("cast",new NG);function OG(a,b){kE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);PG(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){PG(c)});this.eventManager.o(this.localization,"locale-changed",function(){PG(c)});
1715
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ua())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Vc(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(OG,kE);function PG(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}P("shaka.ui.FastForwardButton",OG);function QG(){}QG.prototype.create=function(a,b){return new OG(a,b)};BF("fast_forward",new QG);function RG(a,b){kE.call(this,a,b);var c=this;this.h=this.controls.l;this.g=pn();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");SG(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);TG(this);this.eventManager.o(this.localization,"locale-updated",function(){TG(c)});this.eventManager.o(this.localization,"locale-changed",function(){TG(c)});this.eventManager.o(this.g,"click",function(){return O(function(d){return G(d,
1716
+ c.controls.Ef(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.md()?"fullscreen_exit":"fullscreen";TG(c)});this.eventManager.o(this.h,"loadedmetadata",function(){SG(c)});this.eventManager.o(this.h,"loadeddata",function(){SG(c)})}pa(RG,kE);function SG(a){a.controls.ee()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function TG(a){a.g.ariaLabel=a.localization.resolve(a.controls.md()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1717
+ P("shaka.ui.FullscreenButton",RG);function UG(){}UG.prototype.create=function(a,b){return new RG(a,b)};BF("fullscreen",new UG);function VG(a,b){kE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");this.l.textContent=this.localization.resolve("LOOP");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
1718
+ a.appendChild(this.j);this.g.appendChild(a);WG(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){WG(c)});this.eventManager.o(this.localization,"locale-changed",function(){WG(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Sa();c.h.wa(1)});this.m=this.video.loop;this.h=new Vb(function(){c.m!=c.video.loop&&(WG(c),c.m=c.video.loop)});this.h.wa(1)}pa(VG,kE);
1719
+ VG.prototype.release=function(){this.h.stop();this.h=null;kE.prototype.release.call(this)};function WG(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}P("shaka.ui.LoopButton",VG);function XG(){}XG.prototype.create=function(a,b){return new VG(a,b)};dG("loop",new XG);BF("loop",new XG);wE("loop",new XG);function YG(a,b){kE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);ZG(this);$G(this);this.eventManager.o(this.localization,"locale-updated",function(){ZG(c)});this.eventManager.o(this.localization,"locale-changed",function(){ZG(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1720
+ this.eventManager.o(this.video,"volumechange",function(){ZG(c);$G(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){ZG(c);$G(c)});this.eventManager.o(this.adManager,"ad-muted",function(){ZG(c);$G(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;ZG(c);$G(c)})}pa(YG,kE);function ZG(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1721
+ function $G(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}P("shaka.ui.MuteButton",YG);function aH(){}aH.prototype.create=function(a,b){return new YG(a,b)};BF("mute",new aH);function bH(a,b){kE.call(this,a,b);var c=this;this.l=this.controls.l;this.g=pn();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
1722
+ W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);cH(this);this.parent.appendChild(this.g);this.controls.ef()||pE(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){cH(c)});this.eventManager.o(this.localization,"locale-changed",function(){cH(c)});this.eventManager.o(this.g,"click",function(){c.controls.xe()});this.eventManager.o(this.l,"enterpictureinpicture",function(){dH(c)});this.eventManager.o(this.l,"leavepictureinpicture",
1723
+ function(){eH(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){fH(c)});this.eventManager.o(this.player,"trackschanged",function(){fH(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){dH(c);c.eventManager.ka(d.window,"pagehide",function(){eH(c)})})}pa(bH,kE);
1724
+ function dH(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function eH(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
1725
+ function cH(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.gf();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function fH(a){O(function(b){if(!a.controls.ef())return pE(a.g,!1),a.controls.gf()?G(b,a.controls.xe(),0):b.B(0);if(!a.player||!a.player.Mc())return pE(a.g,!0),b.B(0);pE(a.g,!1);return a.controls.gf()?G(b,a.controls.xe(),0):b.B(0)})}P("shaka.ui.PipButton",bH);
1726
+ function gH(){}gH.prototype.create=function(a,b){return new bH(a,b)};dG("picture_in_picture",new gH);BF("picture_in_picture",new gH);wE("picture_in_picture",new gH);function hH(a,b){zG.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){iH(c)});this.eventManager.o(this.localization,"locale-changed",function(){iH(c)});this.eventManager.o(this.player,"loaded",function(){jH(c,c.player.Ua())});this.eventManager.o(this.player,"ratechange",function(){jH(c,
1727
+ c.player.Ua())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));iH(this);kH(this);jH(this,this.player.Ua())}pa(hH,zG);function iH(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1728
+ function jH(a,b){var c=mE(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(oE()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1729
+ "x")}function kH(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={Hd:b.Hd},d=c.next()){b.Hd=d.value;d=pn();var e=W("span");e.textContent=b.Hd;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.Hd);a.video.defaultPlaybackRate=a.g.get(f.Hd)}}(b));a.menu.appendChild(d)}nE(a.menu)}P("shaka.ui.PlaybackRateSelection",hH);function lH(){}lH.prototype.create=function(a,b){return new hH(a,b)};dG("playback_rate",new lH);BF("playback_rate",new lH);function mH(a,b){kE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-current-time");vH(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Oa().end)});this.eventManager.o(this.player,"loading",function(){pE(c.g,!0)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Y,e=c.controls.Ig(),f=c.player.Oa(),g=f.end-f.start;c.player.U()?(e=Math.max(0,Math.floor(f.end-
1730
+ e)),g=3600<=g,1<=e||d?(vH(c,"- "+qE(e,g)),c.g.disabled=!1):(vH(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=g,e=qE(Math.max(0,e-f.start),d),g&&(e+=" / "+qE(g,d)),vH(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.o(this.adManager,"ad-started",function(){pE(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){pE(c.g,!0)})}pa(mH,kE);
1731
+ function vH(a,b){b!=a.g.textContent&&(a.g.textContent=b)}P("shaka.ui.PresentationTimeTracker",mH);function wH(){}wH.prototype.create=function(a,b){return new mH(a,b)};BF("time_and_duration",new wH);function xH(a,b){kE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="control_camera";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
1732
+ a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);yH(this);this.eventManager.o(this.localization,"locale-updated",function(){yH(c)});this.eventManager.o(this.localization,"locale-changed",function(){yH(c)});var d=this.controls.u;this.eventManager.o(this.g,"click",function(){d.g?mF(d.g):Va("Not playing VR content")});this.eventManager.o(d,"vrstatuschanged",function(){pE(c.g,c.controls.Mb())});pE(this.g,this.controls.Mb())}pa(xH,kE);
1733
+ function yH(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}P("shaka.ui.RecenterVRButton",xH);function zH(){}zH.prototype.create=function(a,b){return new xH(a,b)};dG("recenter_vr",new zH);BF("recenter_vr",new zH);function AH(a,b){kE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");a="cast";(b=oc())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
1734
+ a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;BH(this);pE(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.o(this.localization,"locale-updated",function(){BH(c)}),this.eventManager.o(this.localization,"locale-changed",function(){BH(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){CH(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,
1735
+ "connect",function(){CH(c)}),this.eventManager.o(this.video.remote,"connecting",function(){CH(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){CH(c)}),this.eventManager.o(this.player,"loaded",function(){CH(c)}),CH(this))}pa(AH,kE);AH.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});kE.prototype.release.call(this)};
1736
+ function CH(a){var b,c;O(function(d){switch(d.g){case 1:if(a.controls.C.ig()&&a.controls.sa){pE(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);d.B(0);break}if("disconnected"==a.video.remote.state){b=function(e){a.player?pE(a.g,a.player.hd()==qp&&e):pE(a.g,!1)};ta(d,7);if(-1==a.h){d.B(9);break}return G(d,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){d.B(0);break}return G(d,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;d.B(0);break;case 10:a.h=-1;
1737
+ case 9:va(d,8);break;case 7:wa(d);case 8:return ta(d,11),G(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;va(d,0);break;case 11:wa(d),b(!0),I(d)}})}function BH(a){var b=a.localization.resolve("CAST"),c=oc();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}P("shaka.ui.RemoteButton",AH);function DH(){}DH.prototype.create=function(a,b){return new AH(a,b)};dG("remote",new DH);BF("remote",new DH);function EH(a,b){zG.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){FH(c)});this.eventManager.o(this.localization,"locale-changed",function(){FH(c)});this.eventManager.o(this.player,"loading",function(){GH(c)});this.eventManager.o(this.player,"variantchanged",function(){GH(c)});this.eventManager.o(this.player,
1738
+ "trackschanged",function(){GH(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){GH(c)});GH(this)}pa(EH,zG);
1739
+ function GH(a){var b=[];a.player.hd()!=qp&&(b=a.player.Jb());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=a.player.Mc()?b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==k.bandwidth})==l}):
1740
+ 1<[].concat(x(new Set(b.map(function(k){return k.audioId})))).length?b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.videoBandwidth==k.videoBandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l}):b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.bandwidth==k.bandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l});a.player.Mc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):
1741
+ b.sort(function(k,l){return l.height==k.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=lE(a.menu);qn(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={$b:e.$b},g=f.next()){e.$b=g.value;g=pn();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.$b;a.player.configure({abr:{enabled:!1}});a.player.Af(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=W("span");h.textContent=
1742
+ a.player.Mc()&&e.$b.bandwidth?Math.round(e.$b.bandwidth/1E3)+" kbits/s":e.$b.height&&e.$b.width?HH(e.$b,b):"Unknown";g.appendChild(h);d||e.$b!=c||(g.ariaSelected="true",g.appendChild(oE()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=pn();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});GH(a)});a.g=W("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");
1743
+ e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(oE()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);nE(a.menu);a.controls.dispatchEvent(new S("resolutionselectionupdated"));FH(a);pE(a.button,1<b.length)}
1744
+ function HH(a,b){var c=a.height||0,d=a.width||0,e=c;d/c>16/9&&(e=Math.round(9*d/16));c=e+"p";2160==e&&(c="4K");(e=a.frameRate)&&(50<=e||20>=e)&&(c+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)c+=" (HDR)";"CH-STEREO"==a.videoLayout&&(c+=" (3D)");b.some(function(f){return f!=a&&f.height==a.height})&&(c+=" ("+Math.round((a.videoBandwidth||a.bandwidth)/1E3)+" kbits/s)");return c}
1745
+ function FH(a){var b=a.player.Mc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}P("shaka.ui.ResolutionSelection",EH);function IH(){}
1746
+ IH.prototype.create=function(a,b){return new EH(a,b)};dG("quality",new IH);BF("quality",new IH);function JH(a,b){kE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);KH(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){KH(c)});this.eventManager.o(this.localization,"locale-changed",function(){KH(c)});
1747
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ua())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Vc(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(JH,kE);function KH(a){a.g.ariaLabel=a.localization.resolve("REWIND")}P("shaka.ui.RewindButton",JH);function LH(){}LH.prototype.create=function(a,b){return new JH(a,b)};BF("rewind",new LH);function MH(a,b){kE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
1748
+ a.appendChild(this.j);this.g.appendChild(a);NH(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){NH(c)});this.eventManager.o(this.localization,"locale-changed",function(){NH(c)});this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.l;d.width=f.videoWidth;d.height=f.videoHeight;e.drawImage(f,0,0,d.width,d.height);d=d.toDataURL("image/png");e=document.createElement("a");e.href=d;e.download=
1749
+ "videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.u,"vrstatuschanged",function(){OH(c)});this.eventManager.o(this.adManager,"ad-started",function(){OH(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){OH(c)});this.eventManager.o(this.player,"unloading",function(){OH(c)});this.eventManager.o(this.player,"loaded",function(){OH(c)});this.eventManager.o(this.player,"loaded",function(){OH(c)});this.eventManager.o(this.video,"play",function(){OH(c)});
1750
+ this.eventManager.o(this.video,"pause",function(){OH(c)});this.eventManager.o(this.video,"seeking",function(){OH(c)});OH(this)}pa(MH,kE);function OH(a){var b=!0;a.controls.Mb()&&(b=!1);if(a.player.drmInfo()||a.player.Mc())b=!1;a.ad&&(b=!1);pE(a.g,b)}function NH(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}P("shaka.ui.SaveVideoFrameButton",MH);function PH(){}PH.prototype.create=function(a,b){return new MH(a,b)};
1751
+ dG("save_video_frame",new PH);wE("save_video_frame",new PH);function QH(a,b){yE.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}pa(QH,yE);QH.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
1752
+ QH.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};P("shaka.ui.SmallPlayButton",QH);function RH(){}RH.prototype.create=function(a,b){return new QH(a,b)};BF("play_pause",new RH);function SH(a,b){kE.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(SH,kE);P("shaka.ui.Spacer",SH);function TH(){}TH.prototype.create=function(a,b){return new SH(a,b)};BF("spacer",new TH);function UH(a,b){function c(m){m=parseInt(l.g[m],10);return 1E6<m?(m/1E6).toFixed(2)+"MB":1E3<m?(m/1E3).toFixed(2)+"KB":m+"B"}function d(m){return l.g[m]+" (gaps)"}function e(m){return qE(l.g[m],!1)+" (m)"}function f(m){return Math.round(l.g[m]/1E3)+" (kbits/s)"}function g(m){return l.g[m].toFixed(2)+" (s)"}function h(m){return l.g[m]+" (frames)"}function k(m){return l.g[m]+" (px)"}kE.call(this,a,b);var l=this;this.i=pn();this.i.classList.add("shaka-statistics-button");this.j=W("i");this.j.classList.add("material-icons-round");
1753
1753
  this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=W("label");a.classList.add("shaka-overflow-button-label");this.u=W("span");a.appendChild(this.u);this.m=W("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.h=W("div");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");this.h.classList.add("shaka-statistics-container");this.h.classList.add("shaka-hidden");
1754
1754
  this.controls.h.appendChild(this.h);this.C=[];this.G=["stateHistory","switchHistory"];this.g=this.player.getStats();this.s={};this.A={width:k,height:k,completionPercent:function(m){return l.g[m]+" (%)"},bufferingTime:g,drmTimeSeconds:g,licenseTime:g,liveLatency:g,loadLatency:g,manifestTimeSeconds:g,estimatedBandwidth:f,streamBandwidth:f,maxSegmentDuration:e,pauseTime:e,playTime:e,corruptedFrames:h,decodedFrames:h,droppedFrames:h,stallsDetected:function(m){return l.g[m]+" (stalls)"},gapsJumped:d,manifestSizeBytes:c,
1755
- bytesDownloaded:c,nonFatalErrorCount:function(m){return l.g[m]+" (errors)"},manifestPeriodCount:function(m){return l.g[m]+" (periods)"},manifestGapCount:d};this.l=new Vb(function(){l.g=l.player.getStats();for(var m=t(l.C),n=m.next();!n.done;n=m.next()){n=n.value;var p=l.s[n];p.textContent=l.A[n](n);p&&p.parentElement&&oE(p.parentElement,!isNaN(l.g[n]))}});UH(this);VH(this);this.eventManager.o(this.localization,"locale-updated",function(){UH(l)});this.eventManager.o(this.localization,"locale-changed",
1756
- function(){UH(l)});this.eventManager.o(this.i,"click",function(){oE(l.parent,!1);l.h.classList.contains("shaka-hidden")?(l.j.textContent="insert_chart",l.l.wa(.1),oE(l.h,!0)):(l.j.textContent="insert_chart_outlined",l.l.stop(),oE(l.h,!1));UH(l)})}pa(TH,jE);function UH(a){a.u.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}
1757
- function VH(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.G.includes(c)){var d=a,e=W("div"),f=W("label");f.textContent=c+":";e.appendChild(f);f=W("span");f.textContent=d.A[c](c);e.appendChild(f);d.s[c]=f;d=e;a.h.appendChild(d);a.C.push(c);oE(d.parentElement,!isNaN(a.g[c]))}else Va("Unrecognized statistic element:",c)}TH.prototype.release=function(){this.l.stop();this.l=null;jE.prototype.release.call(this)};P("shaka.ui.StatisticsButton",TH);
1758
- function WH(){}WH.prototype.create=function(a,b){return new TH(a,b)};cG("statistics",new WH);vE("statistics",new WH);function XH(a,b){yG.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Nc()?this.button.ariaPressed="true":this.button.ariaPressed="false";YH(this);this.eventManager.o(this.localization,"locale-updated",function(){ZH(c);$H(c)});this.eventManager.o(this.localization,"locale-changed",function(){ZH(c);$H(c)});this.eventManager.o(this.player,
1759
- "loading",function(){aI(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){bI(c);$H(c)});this.eventManager.o(this.player,"textchanged",function(){$H(c)});this.eventManager.o(this.player,"trackschanged",function(){aI(c)});bI(this);ZH(this);$H(this);aI(this)}pa(XH,yG);function YH(a){var b=pn();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(nE());a.g=W("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1760
- function bI(a){a.player.Nc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new S("captionselectionupdated"))}
1761
- function $H(a){var b=a.player.uc();wG(b,a.menu,function(c){return cI(a,c)},a.player.Nc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=pn();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Cf(!1);$H(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nc()||(b.ariaSelected="true",b.appendChild(nE()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
1762
- a.button.setAttribute("shaka-status",a.currentSelection.textContent);mE(a.menu);a.controls.dispatchEvent(new S("captionselectionupdated"))}function cI(a,b){return O(function(c){a.player.lh(b);return G(c,a.player.Cf(!0),0)})}
1763
- function ZH(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function aI(a){var b=0<a.player.uc().length;oE(a.button,b);$H(a)}P("shaka.ui.TextSelection",XH);function dI(){}dI.prototype.create=function(a,b){return new XH(a,b)};cG("captions",new dI);AF("captions",new dI);function eI(a,b){jE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="3d_rotation";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
1764
- a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);fI(this);this.eventManager.o(this.localization,"locale-updated",function(){fI(c)});this.eventManager.o(this.localization,"locale-changed",function(){fI(c)});var d=this.controls.u;this.eventManager.o(this.g,"click",function(){d.yd()});this.eventManager.o(d,"vrstatuschanged",function(){oE(c.g,c.controls.Mb())});oE(this.g,this.controls.Mb())}pa(eI,jE);
1765
- function fI(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}P("shaka.ui.ToggleStereoscopicButton",eI);function gI(){}gI.prototype.create=function(a,b){return new eI(a,b)};cG("toggle_stereoscopic",new gI);AF("toggle_stereoscopic",new gI);function hI(a,b){EE.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return iI(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return jI(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return jI(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return iI(c)});this.eventManager.o(this.localization,"locale-updated",function(){return kI(c)});
1766
- this.eventManager.o(this.localization,"locale-changed",function(){return kI(c)});iI(this);kI(this);if(this.ad)this.onChange()}pa(hI,EE);hI.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.muted=0==this.video.volume?!0:!1)};function iI(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);lI(a)}function jI(a){var b=a.ad.getVolume();a.setValue(100*b);lI(a)}
1767
- function lI(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function kI(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}P("shaka.ui.VolumeBar",hI);function mI(){}mI.prototype.create=function(a,b){return new hI(a,b)};AF("volume",new mI);}).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})();
1755
+ bytesDownloaded:c,nonFatalErrorCount:function(m){return l.g[m]+" (errors)"},manifestPeriodCount:function(m){return l.g[m]+" (periods)"},manifestGapCount:d};this.l=new Vb(function(){l.g=l.player.getStats();for(var m=t(l.C),n=m.next();!n.done;n=m.next()){n=n.value;var p=l.s[n];p.textContent=l.A[n](n);p&&p.parentElement&&pE(p.parentElement,!isNaN(l.g[n]))}});VH(this);WH(this);this.eventManager.o(this.localization,"locale-updated",function(){VH(l)});this.eventManager.o(this.localization,"locale-changed",
1756
+ function(){VH(l)});this.eventManager.o(this.i,"click",function(){pE(l.parent,!1);l.h.classList.contains("shaka-hidden")?(l.j.textContent="insert_chart",l.l.wa(.1),pE(l.h,!0)):(l.j.textContent="insert_chart_outlined",l.l.stop(),pE(l.h,!1));VH(l)})}pa(UH,kE);function VH(a){a.u.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}
1757
+ function WH(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.G.includes(c)){var d=a,e=W("div"),f=W("label");f.textContent=c+":";e.appendChild(f);f=W("span");f.textContent=d.A[c](c);e.appendChild(f);d.s[c]=f;d=e;a.h.appendChild(d);a.C.push(c);pE(d.parentElement,!isNaN(a.g[c]))}else Va("Unrecognized statistic element:",c)}UH.prototype.release=function(){this.l.stop();this.l=null;kE.prototype.release.call(this)};P("shaka.ui.StatisticsButton",UH);
1758
+ function XH(){}XH.prototype.create=function(a,b){return new UH(a,b)};dG("statistics",new XH);wE("statistics",new XH);function YH(a,b){zG.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Oc()?this.button.ariaPressed="true":this.button.ariaPressed="false";ZH(this);this.eventManager.o(this.localization,"locale-updated",function(){$H(c);aI(c)});this.eventManager.o(this.localization,"locale-changed",function(){$H(c);aI(c)});this.eventManager.o(this.player,
1759
+ "loading",function(){bI(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){cI(c);aI(c)});this.eventManager.o(this.player,"textchanged",function(){aI(c)});this.eventManager.o(this.player,"trackschanged",function(){bI(c)});cI(this);$H(this);aI(this);bI(this)}pa(YH,zG);function ZH(a){var b=pn();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(oE());a.g=W("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1760
+ function cI(a){a.player.Oc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new S("captionselectionupdated"))}
1761
+ function aI(a){var b=a.player.vc();xG(b,a.menu,function(c){return dI(a,c)},a.player.Oc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=pn();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Cf(!1);aI(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Oc()||(b.ariaSelected="true",b.appendChild(oE()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
1762
+ a.button.setAttribute("shaka-status",a.currentSelection.textContent);nE(a.menu);a.controls.dispatchEvent(new S("captionselectionupdated"))}function dI(a,b){return O(function(c){a.player.lh(b);return G(c,a.player.Cf(!0),0)})}
1763
+ function $H(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function bI(a){var b=0<a.player.vc().length;pE(a.button,b);aI(a)}P("shaka.ui.TextSelection",YH);function eI(){}eI.prototype.create=function(a,b){return new YH(a,b)};dG("captions",new eI);BF("captions",new eI);function fI(a,b){kE.call(this,a,b);var c=this;this.g=pn();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="3d_rotation";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
1764
+ a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);gI(this);this.eventManager.o(this.localization,"locale-updated",function(){gI(c)});this.eventManager.o(this.localization,"locale-changed",function(){gI(c)});var d=this.controls.u;this.eventManager.o(this.g,"click",function(){d.yd()});this.eventManager.o(d,"vrstatuschanged",function(){pE(c.g,c.controls.Mb())});pE(this.g,this.controls.Mb())}pa(fI,kE);
1765
+ function gI(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}P("shaka.ui.ToggleStereoscopicButton",fI);function hI(){}hI.prototype.create=function(a,b){return new fI(a,b)};dG("toggle_stereoscopic",new hI);BF("toggle_stereoscopic",new hI);function iI(a,b){FE.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return jI(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return kI(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return kI(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return jI(c)});this.eventManager.o(this.localization,"locale-updated",function(){return lI(c)});
1766
+ this.eventManager.o(this.localization,"locale-changed",function(){return lI(c)});jI(this);lI(this);if(this.ad)this.onChange()}pa(iI,FE);iI.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.muted=0==this.video.volume?!0:!1)};function jI(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);mI(a)}function kI(a){var b=a.ad.getVolume();a.setValue(100*b);mI(a)}
1767
+ function mI(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function lI(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}P("shaka.ui.VolumeBar",iI);function nI(){}nI.prototype.create=function(a,b){return new iI(a,b)};BF("volume",new nI);}).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})();
1768
1768
 
1769
1769
  //# sourceMappingURL=shaka-player.ui.map