From 1625a5f8897b9c3df7cc3a5e463ccfd51ac488f5 Mon Sep 17 00:00:00 2001 From: Xinrea Date: Tue, 29 Apr 2025 22:42:24 +0800 Subject: [PATCH] fix: using static shaka-player lib --- index.html | 21 +- live_index.html | 2 +- package.json | 4 +- public/shaka-player/shaka-player.ui.js | 1865 +++++++++++++++++++++++ public/shaka-player/shaka-player.ui.map | 8 + yarn.lock | 250 ++- 6 files changed, 2062 insertions(+), 88 deletions(-) create mode 100644 public/shaka-player/shaka-player.ui.js create mode 100644 public/shaka-player/shaka-player.ui.map diff --git a/index.html b/index.html index 0d082be..e5852dd 100644 --- a/index.html +++ b/index.html @@ -1,14 +1,13 @@ - - - - - - - -
- - - + + + + + BiliBili ShadowReplay + + +
+ + diff --git a/live_index.html b/live_index.html index 3209cf5..fab42d9 100644 --- a/live_index.html +++ b/live_index.html @@ -6,7 +6,7 @@ - +
diff --git a/package.json b/package.json index 4ee544e..55393a3 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,8 @@ "@tauri-apps/plugin-os": "~2", "@tauri-apps/plugin-shell": "~2", "@tauri-apps/plugin-sql": "~2", - "html2canvas": "^1.4.1", "lucide-svelte": "^0.479.0", - "qrcode": "^1.5.4", - "shaka-player": "^4.14.9" + "qrcode": "^1.5.4" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^2.0.0", diff --git a/public/shaka-player/shaka-player.ui.js b/public/shaka-player/shaka-player.ui.js new file mode 100644 index 0000000..0d088bf --- /dev/null +++ b/public/shaka-player/shaka-player.ui.js @@ -0,0 +1,1865 @@ +/* + @license + Shaka Player + Copyright 2016 Google LLC + SPDX-License-Identifier: Apache-2.0 +*/ +(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/* + + Copyright The Closure Library Authors. + SPDX-License-Identifier: Apache-2.0 +*/ +var q;function aa(a){var b=0;return function(){return b>>0)+"_",e=0;return b}); +ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;cc&&(c=Math.max(c+e,0));ce||1114111=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}}); +function Ma(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e=f}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}}); +var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;cb||1342177279>>=1)c+=c;return d}});ea("Number.EPSILON",function(){return Math.pow(2,-52)}); +ea("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});ea("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}}); +ea("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=La(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0=e}});ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});function Oa(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]} +ea("Array.prototype.at",function(a){return a?a:Oa});function Qa(a){return a?a:Oa}ea("Int8Array.prototype.at",Qa);ea("Uint8Array.prototype.at",Qa);ea("Uint8ClampedArray.prototype.at",Qa);ea("Int16Array.prototype.at",Qa);ea("Uint16Array.prototype.at",Qa);ea("Int32Array.prototype.at",Qa);ea("Uint32Array.prototype.at",Qa);ea("Float32Array.prototype.at",Qa);ea("Float64Array.prototype.at",Qa);ea("String.prototype.at",function(a){return a?a:Oa});var Ra=this||self; +function P(a,b){a=a.split(".");var c=Ra;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/* + @license + Shaka Player + Copyright 2016 Google LLC + SPDX-License-Identifier: Apache-2.0 +*/ +function Sa(){}function Ta(){};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} +function Ua(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); +var Wa={Zk:"abrstatuschanged",$k:"adaptation",al:"audiotrackchanged",cl:"buffering",fl:"complete",hl:"downloadfailed",il:"downloadheadersreceived",jl:"drmsessionupdate",ll:"emsg",Kl:"prft",Error:"error",ol:"expirationupdated",ql:"firstquartile",rl:"gapjumped",wl:"keystatuschanged",Al:"loaded",Bl:"loading",Dl:"manifestparsed",El:"manifestupdated",Fl:"mediaqualitychanged",Gl:"mediasourcerecovered",Metadata:"metadata",Hl:"midpoint",Il:"nospatialvideoinfo",Jl:"onstatechange",Ll:"ratechange",Nl:"segmentappended", +Ol:"sessiondata",Pl:"spatialvideoinfo",Ql:"stalldetected",Rl:"started",Sl:"statechanged",Tl:"streaming",Ul:"textchanged",Vl:"texttrackvisibility",Wl:"thirdquartile",Xl:"timelineregionadded",Yl:"timelineregionenter",Zl:"timelineregionexit",$l:"trackschanged",bm:"unloading",dm:"variantchanged"};function Xa(){}function Ya(){}function Za(){}function $a(a){var b=Ga.apply(1,arguments);cb.has(a)||(cb.add(a),Za.apply(Xa,ha(b)))}function db(){}function eb(){}function fb(){}var cb=new Set;window.console&&(Za=function(){return console.warn.apply(console,ha(Ga.apply(0,arguments)))},Ya=function(){console.error.apply(console,ha(Ga.apply(0,arguments)))});function gb(){this.g={}}q=gb.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 hb(){this.Da=new gb;this.ee=this}hb.prototype.addEventListener=function(a,b){this.Da&&this.Da.push(a,b)};hb.prototype.removeEventListener=function(a,b){this.Da&&this.Da.remove(a,b)};hb.prototype.dispatchEvent=function(a){if(!this.Da)return!0;var b=this.Da.get(a.type)||[],c=this.Da.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.ee;a.currentTarget=this.ee;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented}; +hb.prototype.release=function(){this.Da=null};function ib(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 kb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function lb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function mb(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};/* + @license + Copyright 2008 The Closure Library Authors + SPDX-License-Identifier: Apache-2.0 +*/ +var nb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/* + @license + Copyright 2006 The Closure Library Authors + SPDX-License-Identifier: Apache-2.0 +*/ +function ob(a){var b;a instanceof ob?(pb(this,a.Yb),this.Yc=a.Yc,qb(this,a.bc),rb(this,a.td),this.rb=a.rb,sb(this,a.g.clone()),this.Jc=a.Jc):a&&(b=String(a).match(nb))?(pb(this,b[1]||"",!0),this.Yc=tb(b[2]||""),qb(this,b[3]||"",!0),rb(this,b[4]),this.rb=tb(b[5]||"",!0),sb(this,b[6]||"",!0),this.Jc=tb(b[7]||"")):this.g=new ub(null)}q=ob.prototype;q.Yb="";q.Yc="";q.bc="";q.td=null;q.rb="";q.Jc=""; +q.toString=function(){var a=[],b=this.Yb;b&&a.push(vb(b,wb,!0),":");if(b=this.bc){a.push("//");var c=this.Yc;c&&a.push(vb(c,wb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.td;null!=b&&a.push(":",String(b))}if(b=this.rb)this.bc&&"/"!=b.charAt(0)&&a.push("/"),a.push(vb(b,"/"==b.charAt(0)?xb:yb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Jc)&&a.push("#",vb(b,zb));return a.join("")}; +q.resolve=function(a){var b=this.clone();"data"===b.Yb&&(b=new ob);var c=!!a.Yb;c?pb(b,a.Yb):c=!!a.Yc;c?b.Yc=a.Yc:c=!!a.bc;c?qb(b,a.bc):c=null!=a.td;var d=a.rb;if(c)rb(b,a.td);else if(c=!!a.rb){if("/"!=d.charAt(0))if(this.bc&&!this.rb)d="/"+d;else{var e=b.rb.lastIndexOf("/");-1!=e&&(d=b.rb.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;gb)throw Error("Bad port number "+b);a.td=b}else a.td=null} +function sb(a,b,c){b instanceof ub?a.g=b:(c||(b=vb(b,Ab)),a.g=new ub(b))}function tb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function vb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Cb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Cb(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} +function Db(a){if(!a.fb&&(a.fb={},a.Gd=0,a.g))for(var b=a.g.split("&"),c=0;c=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128== +(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b} +function zc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Nb(a);for(var e=0;e=c[d]}if(!a)return"";var c=Hb(a);if(239==c[0]&&187==c[1]&&191==c[2])return yc(c);if(254==c[0]&&255==c[1])return zc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return zc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return zc(a,!1);if(0==c[1]&&0==c[3])return zc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return yc(a);throw new T(2,2,2003);} +function Cc(a){if(window.TextEncoder&&!mc()){var b=new TextEncoder;return Jb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}P("shaka.util.StringUtils",xc);xc.resetFromCharCode=function(){Ec.g=void 0}; +xc.toUTF16=Dc;xc.toUTF8=Cc;xc.fromBytesAutoDetect=Bc;xc.fromUTF16=zc;xc.fromUTF8=yc;var Ec=new Qb(function(){function a(c){try{var d=new Uint8Array(c);return 0",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var p=a.charCodeAt(e);if(64p||96p){p=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64r||96 +r)&&62!==r;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")} +function je(a){return"string"===typeof a}function ke(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function le(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function me(a){if("string"===typeof a)return Fc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Fc(a)} +function pe(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=me(a))&&(a=a.trim());return a}function qe(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())qe(d.value,b,c)}return c}function re(a,b){a=le(a,b);return 1!=a.length?null:a[0]}function se(a,b,c){a=te(a,b,c);return 1!=a.length?null:a[0]} +function ue(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function ve(a,b,c){b=ge(b);return a.attributes[b+":"+c]||null}function te(a,b,c){var d=ge(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=t(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function we(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=ve(a,d.value,c))return d;return null} +function xe(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function ye(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null} +function ze(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Ae(a){a=Number(a);return 0===a%1?a:null}function Be(a){a=Number(a);return 0===a%1&&0"===d[f]&&0",'
'),d+="
";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h",h);if(-1===k){c=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===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0","<"+g+">"),c=c.replace("",""),d||(c+="")}c=cf(c);a.payload="";try{var m=ee(""+c+"","span")}catch(n){}if(m)if(m=m.children,1!= +m.length||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())df(c.value,a,b);else a.payload=Fc(c);else a.payload=Fc(c)}else a.payload=Fc(c)}function af(a){for(var b=t(Object.entries(ef)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Me(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(ff));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Me(0,0,""),e.backgroundColor=d,a.set("."+c,e)} +function cf(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""} +function df(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Ld;d.position=null;d.size=0;d.textAlign=Pe;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)&&(h=d,g=c.get(g))&&(h.backgroundColor=gf(g.backgroundColor,h.backgroundColor),h.color=gf(g.color,h.color),h.fontFamily=gf(g.fontFamily,h.fontFamily), +h.fontSize=gf(g.fontSize,h.fontSize),h.textShadow=gf(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=Ye(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=hf;break;case "i":d.fontStyle=jf;break;case "u":d.textDecoration.push(kf);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break; +if(f=$d(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(je(a)||1==e.length&&je(e[0]))for(c=me(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Ye(d.startTime,d.endTime),b.nestedCues.push(a)),0=a.l&&r.startTime=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&bc.g&&b>=c.h&&(c.h=a));H(d)})};function Pf(a,b,c){a.l=b;a.m=c}function Qf(a,b,c){a.G=b;if(b=a.s.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)} +function Tf(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Tf(a,d.value,c)} +function Uf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Tf(a,k,e);k.startTime>=a.l&&k.startTimev?(v=y,z=[B.tf]):y==v&&z.push(B.tf);f.push.apply(f,ha(z))});e=f}c=new Set;b=new Set;e=t(e);for(var g=e.next();!g.done;g= +e.next())g=g.value,g.audio&&c.add(g.audio),g.video&&b.add(g.video);c=Array.from(c).sort(function(v,w){return v.bandwidth-w.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Ff(m.codecs),p=Ff(g.codecs);n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id); +e.set(k,l)}var r={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};c=Array.from(b).sort(function(v,w){if(!v.bandwidth||!w.bandwidth||v.bandwidth==w.bandwidth){if(v.codecs&&w.codecs&&v.codecs!=w.codecs&&v.width==w.width){var z=Ff(v.codecs),y=Ff(w.codecs);if(z!=y)return(r[z]||1)-(r[y]||1)}return v.width-w.width}return v.bandwidth-w.bandwidth});b=zd();var u=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate|| +0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Ff(m.codecs),p=Ff(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),u.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Ff(m.codecs),p=Ff(g.codecs),n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),u.push(g.id)))}else l.push(g),u.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(v){var w=v.audio;v=v.video;return w&&!h.includes(w.id)||v&&!u.includes(v.id)?!1: +!0})}function eg(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={Ni:void 0},d=b.next())if(e.Ni=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Ni)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={qh:void 0},b=c.next())if(d.qh=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.qh)}}(d)),b.length){a=b;break}return a}function fg(a,b,c){a.variants=a.variants.filter(function(d){return gg(d,b,c)})} +function gg(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)|| +!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function hg(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return I(function(e){if(1==e.g)return x(e,ig(a,b,0=a&&e.width>=b){a=e.height;b=e.width;break}c=Ng(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&&!c.length&&(c=Ng(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width=b.i))return;a.I=!0;a.l-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.l<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Ng(a,b,c,d,e){if(a.m){var f=a.m.Lh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return gg(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})} +function Og(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}P("shaka.abr.SimpleAbrManager",Mg);Mg.prototype.configure=Mg.prototype.configure;Mg.prototype.setCmsdManager=Mg.prototype.setCmsdManager;Mg.prototype.setMediaElement=Mg.prototype.setMediaElement;Mg.prototype.playbackRateChanged=Mg.prototype.playbackRateChanged;Mg.prototype.setVariants=Mg.prototype.setVariants; +Mg.prototype.getBandwidthEstimate=Mg.prototype.getBandwidthEstimate;Mg.prototype.trySuggestStreams=Mg.prototype.trySuggestStreams;Mg.prototype.segmentDownloaded=Mg.prototype.segmentDownloaded;Mg.prototype.disable=Mg.prototype.disable;Mg.prototype.enable=Mg.prototype.enable;Mg.prototype.chooseVariant=Mg.prototype.chooseVariant;Mg.prototype.init=Mg.prototype.init;Mg.prototype.release=Mg.prototype.release;Mg.prototype.stop=Mg.prototype.stop;var Qg=1;P("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});P("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Rg(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)} +Rg.prototype.add=function(a,b,c){var d=this.h;b=void 0===b?!0:b;c=void 0===c?!1:c;var e;if(!(e=!!d.audio!=!!a.audio||!!d.video!=!!a.video||d.language!=a.language)&&(e=d.audio&&a.audio)){e=d.audio;var f=a.audio;e=!!((!e.channelsCount||!f.channelsCount||2=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return x(d,new Promise(function(e){(new Zb(e)).X(c/1E3)}),2)}a.h*=a.m;H(d)})}function jh(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function lh(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}lh.prototype.resolve=function(){};lh.prototype.reject=function(){};function mh(a,b){this.promise=a;this.i=b;this.g=null}function nh(a){return new mh(Promise.reject(a),function(){return Promise.resolve()})}function oh(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new mh(a,function(){return Promise.resolve()})}function ph(a){return new mh(Promise.resolve(a),function(){return Promise.resolve()})}function qh(a){return new mh(a,function(){return a.catch(function(){})})}mh.prototype.abort=function(){this.g||(this.g=this.i());return this.g}; +function rh(a){return new mh(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}mh.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this}; +mh.prototype.Ta=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=sh(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new lh;f.catch(function(){});var g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new mh(f,function(){return d()})}; +function sh(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}da.Object.defineProperties(mh.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});P("shaka.util.AbortableOperation",mh);mh.prototype.chain=mh.prototype.Ta;mh.prototype["finally"]=mh.prototype.finally; +mh.all=rh;mh.prototype.abort=mh.prototype.abort;mh.notAbortable=qh;mh.completed=ph;mh.aborted=oh;mh.failed=nh;function th(){this.g=[]}function uh(a,b){a.g.push(b.finally(function(){Pd(a.g,b)}))}th.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function vh(a,b,c,d,e,f){hb.call(this);this.i=!1;this.s=new th;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.C=c||null;this.G=d||null;this.I=e||null;this.H=f||null;this.u=this.A=!1;this.m=16E3}qa(vh,hb);q=vh.prototype;q.Xg=function(a){this.A=a};q.Yg=function(a){this.u=a};function wh(a,b,c,d){c=c||xh;var e=yh[a];if(!e||c>=e.priority)yh[a]={priority:c,Xe:b,nk:void 0===d?!1:d}} +function zh(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.rk=function(a){this.g.add(a)};q.Sk=function(a){this.g.delete(a)};q.yh=function(){this.g.clear()};q.tk=function(a){this.h.add(a)};q.Tk=function(a){this.h.delete(a)};q.Ah=function(){this.h.clear()}; +function Ah(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();hb.prototype.release.call(this);return this.s.destroy()}; +q.request=function(a,b,c){var d=this,e=new Bh;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new Dh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?ae(b.retryParameters):jh();b.uris=ae(b.uris);f=Eh(this,a,b,c);var g=f.Ta(function(){return Fh(d,a,b,c,new ih(b.retryParameters,!1),0,null,e)}),h=g.Ta(function(p){return Gh(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){}); +var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Ta(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.Qj||!d.l||u.fromCache||"HEAD"==b.method||a!=Hh||d.l(u.timeMs,u.data.byteLength,Ih(c));d.H&&d.H(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new Dh(n.promise,function(){return n.abort()},e);uh(this.s,f);return f}; +function Eh(a,b,c,d){function e(h){f=f.Ta(function(){c.body&&(c.body=Jb(c.body));return h(b,c,d)})}var f=ph(void 0);a.G&&e(a.G);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Ta(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})} +function Fh(a,b,c,d,e,f,g,h){a.A&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.u&&(c.uris[f]=c.uris[f].replace("http://","https://"));0this.h.byteLength)throw Sh();var b=Hb(this.h,this.g,a);this.g+=a;return b}; +q.skip=function(a){if(this.g+a>this.h.byteLength)throw Sh();this.g+=a};q.ni=function(a){if(this.ga||a>this.h.byteLength)throw Sh();this.g=a};q.Uc=function(){for(var a=this.g;this.Ga()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Hb(this.h,a,this.g-a);this.g+=1;return yc(a)};function Sh(){return new T(2,3,3E3)}P("shaka.util.DataViewReader",Nh);Nh.prototype.readTerminatedString=Nh.prototype.Uc;Nh.prototype.seek=Nh.prototype.seek;Nh.prototype.rewind=Nh.prototype.ni; +Nh.prototype.skip=Nh.prototype.skip;Nh.prototype.readBytes=Nh.prototype.Rb;Nh.prototype.readUint64=Nh.prototype.ud;Nh.prototype.readInt32=Nh.prototype.ji;Nh.prototype.readUint32=Nh.prototype.U;Nh.prototype.readUint16=Nh.prototype.Aa;Nh.prototype.readUint8=Nh.prototype.Z;Nh.prototype.getLength=Nh.prototype.getLength;Nh.prototype.getPosition=Nh.prototype.Oa;Nh.prototype.hasMoreData=Nh.prototype.Ga;var Rh=1;Nh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Rh};function Th(){this.i=[];this.h=[];this.g=!1}q=Th.prototype;q.box=function(a,b){a=Uh(a);this.i[a]=Vh;this.h[a]=b;return this};q.W=function(a,b){a=Uh(a);this.i[a]=Wh;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Nh(a,0);for(this.g=!1;a.Ga()&&!this.g;)this.rd(0,a,b,c)}; +q.rd=function(a,b,c,d){var e=b.Oa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.U(),g=b.U(),h=Xh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Oa()+8>b.getLength()){this.g=!0;return}f=b.ud();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Wh){if(d&&b.Oa()+4>b.getLength()){this.g=!0;return}n=b.U();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.Oa(),b=0>24&255,a>>16&255,a>>8&255,a&255)} +function Zh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",Th);Th.headerSize=Zh;Th.typeToString=Xh;Th.allData=ci;Th.audioSampleEntry=bi;Th.visualSampleEntry=ai;Th.sampleDescription=$h;Th.children=Yh;Th.prototype.parseNext=Th.prototype.rd;Th.prototype.parse=Th.prototype.parse;Th.prototype.stop=Th.prototype.stop;Th.prototype.fullBox=Th.prototype.W;Th.prototype.box=Th.prototype.box;var Vh=0,Wh=1;function di(a){var b=this;this.g=[];this.h=[];this.data=[];(new Th).box("moov",Yh).box("moof",Yh).W("pssh",function(c){if(!(1d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.u(new T(2,6,6006,f.message,f,h))}})} +function wi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v;I(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Ic(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=Ah([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]= +f.headers[h];if("org.w3.clearkey"===a.g.keySystem){var z=g,y=a.g;try{var B=Bc(z.body);if(B){var C=JSON.parse(B);C.type||(C.type=y.sessionType,z.body=Cc(JSON.stringify(C)))}}catch(D){}}if(Tb(a.g.keySystem))if(z=zc(g.body,!0,!0),z.includes("PlayReadyKeyMessage")){z=ee(z,"PlayReadyKeyMessage");y=qe(z,"HttpHeader");y=t(y);for(B=y.next();!B.done;B=y.next())C=B.value,B=qe(C,"name")[0],C=qe(C,"value")[0],g.headers[me(B)]=me(C);z=qe(z,"Challenge")[0];g.body=Jc(me(z))}else g.headers["Content-Type"]="text/xml; charset=utf-8"; +k=Date.now();ua(w,2);m=a.G.ic.request(2,g,{isPreload:a.P()});return x(w,m.promise,4);case 4:l=w.h;wa(w,3);break;case 2:n=xa(w);if(a.j.g)return w.return();p=new T(2,6,6007,n);1==a.i.size?(a.u(p),d&&d.Fb&&d.Fb.reject(p)):(d&&d.Fb&&d.Fb.reject(p),a.i.delete(c),Ci(a)&&(a.m.resolve(),a.L.X(.1)));return w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Ic(l.data);ua(w,5);return x(w,c.update(l.data),7);case 7:wa(w,6);break;case 5:return r=xa(w),u=new T(2,6,6008, +r.message),a.u(u),d&&d.Fb&&d.Fb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new S("drmsessionupdate");a.G.onEvent(v);d&&(d.Fb&&d.Fb.resolve(),Ji(a,d));H(w)}})} +function Li(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Tb(a.g.keySystem)&&16==g.byteLength&&(cc()||mc())){h=Nb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Lc(g).slice(0,32);a.V.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Fb&&(a.i.delete(b),b.close().catch(function(){})); +Ci(a)&&(a.m.resolve(),a.L.X(Mi))}function gi(a){var b=a.V,c=a.aa;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.u(new T(2,6,6014));a.G.Ue(Mh(c))} +function Ni(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L;return I(function(K){if(1==K.g){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment 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.widevine.alpha.experiment":b, +"com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{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(O,M){var N,R,Q,Y,ia,X,ja,Pa;return I(function(Ka){switch(Ka.g){case 1:return ua(Ka,2),x(Ka,M.createMediaKeys(),4);case 4:wa(Ka,3); +break;case 2:return xa(Ka),Ka.return();case 3:R=(N=M.getConfiguration().sessionTypes)?N.includes("persistent-license"):!1,gc()&&(R=!1),Q=M.getConfiguration().videoCapabilities,Y=M.getConfiguration().audioCapabilities,ia={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(O)&&k.get(O)?ia=k.get(O):k.set(O,ia),(X=Q[0].encryptionScheme)&&!ia.encryptionSchemes.includes(X)&&ia.encryptionSchemes.push(X),(ja=Q[0].robustness)&&!ia.videoRobustnessLevels.includes(ja)&& +ia.videoRobustnessLevels.push(ja),(Pa=Y[0].robustness)&&!ia.audioRobustnessLevels.includes(Pa)&&ia.audioRobustnessLevels.push(Pa),H(Ka)}})};m=function(O,M,N,R){var Q,Y,ia,X,ja,Pa,Ka,jb,ab,Ia;return I(function(Va){switch(Va.g){case 1:ua(Va,2);Q=ae(g);Y=t(Q.videoCapabilities);for(ia=Y.next();!ia.done;ia=Y.next())X=ia.value,X.encryptionScheme=M,X.robustness=N;ja=t(Q.audioCapabilities);for(Pa=ja.next();!Pa.done;Pa=ja.next())Ka=Pa.value,Ka.encryptionScheme=M,Ka.robustness=R;jb=ae(Q);jb.persistentState= +"required";jb.sessionTypes=["persistent-license"];ab=[jb,Q];return x(Va,Yf(1,navigator.requestMediaKeySystemAccess(O,ab)),4);case 4:return Ia=Va.h,x(Va,l(O,Ia),5);case 5:wa(Va,0);break;case 2:xa(Va),H(Va)}})};n=function(O,M,N,R){var Q,Y,ia;return I(function(X){switch(X.g){case 1:return ua(X,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:O, +video:{encryptionScheme:M,robustness:N},audio:{encryptionScheme:M,robustness:R}}},x(X,Yf(1,navigator.mediaCapabilities.decodingInfo(Q)),4);case 4:return Y=X.h,ia=Y.keySystemAccess,x(X,l(O,ia),5);case 5:wa(X,0);break;case 2:xa(X),H(X)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);v=[];w=t(h);for(z=w.next();!z.done;z=w.next())for(y=z.value,B=t(a),C=B.next();!C.done;C=B.next())D=C.value,"org.w3.clearkey"===D&&pc()||(v.push(m(D,y,"","")),v.push(n(D,y,"","")));G=t(a);for(A=G.next();!A.done;A= +G.next())for(E=A.value,F=t(d[E]||[]),J=F.next();!J.done;J=F.next())L=J.value,v.push(m(E,null,L,"")),v.push(m(E,null,"",L)),v.push(n(E,null,L,"")),v.push(n(E,null,"",L));return x(K,Promise.all(v),2)}return K.return(Mh(k))})}function Oi(a){return I(function(b){if(1==b.g)return ua(b,2),x(b,Yf(Pi,Promise.all([a.close(),a.closed])),4);if(2!=b.g)return wa(b,0);xa(b);H(b)})} +function ji(a){var b;return I(function(c){b=Array.from(a.i.entries());a.i.clear();return x(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return I(function(g){if(1==g.g)return ua(g,2),a.ha||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?x(g,Oi(e),5):x(g,e.remove(),5);if(2!=g.g)return wa(g,0);xa(g);H(g)})})),0)})}function ri(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])} +function hi(a){a.i.forEach(function(b,c){var d=b.Fg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Fg=e)})}function Ci(a){a=a.i.values();return kb(a,function(b){return b.loaded})}function Bi(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.V.get(c.value))return!1;return!0} +function qi(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)} +function Hi(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Ka:void 0},l=a.next()){m.Ka=l.value;b.includes(m.Ka.encryptionScheme)||b.push(m.Ka.encryptionScheme);"org.w3.clearkey"==m.Ka.keySystem&&m.Ka.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ka.licenseServerUri)||k.push(m.Ka.licenseServerUri):c.includes(m.Ka.licenseServerUri)||c.push(m.Ka.licenseServerUri);e.includes(m.Ka.serverCertificateUri)||e.push(m.Ka.serverCertificateUri);m.Ka.serverCertificate&& +(d.some(function(r){return function(u){return Gb(u,r.Ka.serverCertificate)}}(m))||d.push(m.Ka.serverCertificate));if(m.Ka.initData){l=t(m.Ka.initData);for(var n=l.next(),p={};!n.done;p={vg:void 0},n=l.next())p.vg=n.value,f.some(function(r){return function(u){var v=r.vg;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&Gb(u.initData,v.initData)}}(p))||f.push(p.vg)}if(m.Ka.keyIds)for(l=t(m.Ka.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ka.keySystemUris&&h)for(m=t(m.Ka.keySystemUris), +l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var bj=new Qb(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 dj(a,b,c,d,e,f,g){this.R=a;this.$a=b;this.La=c;this.pd=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}dj.prototype.Kb=function(){return this.$a};dj.prototype.Ib=function(){return this.La};dj.prototype.ec=function(){return this.g};function ej(a,b){return a===b?!0:a&&b?a.Kb()==b.Kb()&&a.Ib()==b.Ib()&&Rd(a.R().sort(),b.R().sort())&&Gb(a.ec(),b.ec()):a==b}P("shaka.media.InitSegmentReference",dj); +dj.prototype.getEndByte=dj.prototype.Ib;dj.prototype.getStartByte=dj.prototype.Kb; +function fj(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?gj:r;this.startTime=a;this.j=this.endTime=b;this.H=c;this.$a=d;this.La=e;this.ma=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.C=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.A=null;this.i=-1;this.u=void 0===v?!1:v;this.I=this.s=!1;a=t(this.g);for(b=a.next();!b.done;b= +a.next())b.value.Zh();this.u&&this.g.length&&this.g[this.g.length-1].Yh();this.G=this.bandwidth=this.mimeType=this.codecs=null}q=fj.prototype;q.R=function(){return this.H()};q.getStartTime=function(){return this.startTime};q.oj=function(){return this.endTime};q.Kb=function(){return this.$a};q.Ib=function(){return this.La};q.Jj=function(){return this.tilesLayout};q.Ij=function(){return this.C};q.tc=function(){return this.status};q.fk=function(){this.status=hj};q.Cg=function(){this.preload=!0}; +q.isPreload=function(){return this.preload};q.od=function(){this.l=!1};q.Vj=function(){return this.l};q.Zh=function(){this.s=!0};q.Xj=function(){return this.s};q.Yh=function(){this.I=!0};q.Wj=function(){return this.I};q.Xh=function(){this.m=!0};q.Rj=function(){return this.m};q.Ai=function(a){this.A=a};q.Hj=function(){return this.A};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=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.j+=a}; +q.eh=function(a){null==this.h?Ya("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.Nk=function(a){this.G=a};q.ec=function(){return this.G};function ij(a,b){a.ma=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())ij(c.value,b)}P("shaka.media.SegmentReference",fj);fj.prototype.getSegmentData=fj.prototype.ec;fj.prototype.setSegmentData=fj.prototype.Nk;fj.prototype.syncAgainst=fj.prototype.eh;fj.prototype.offset=fj.prototype.offset; +fj.prototype.getThumbnailSprite=fj.prototype.Hj;fj.prototype.setThumbnailSprite=fj.prototype.Ai;fj.prototype.hasByterangeOptimization=fj.prototype.Rj;fj.prototype.markAsByterangeOptimization=fj.prototype.Xh;fj.prototype.isLastPartial=fj.prototype.Wj;fj.prototype.markAsLastPartial=fj.prototype.Yh;fj.prototype.isPartial=fj.prototype.Xj;fj.prototype.markAsPartial=fj.prototype.Zh;fj.prototype.isIndependent=fj.prototype.Vj;fj.prototype.markAsNonIndependent=fj.prototype.od;fj.prototype.isPreload=fj.prototype.isPreload; +fj.prototype.markAsPreload=fj.prototype.Cg;fj.prototype.markAsUnavailable=fj.prototype.fk;fj.prototype.getStatus=fj.prototype.tc;fj.prototype.getTileDuration=fj.prototype.Ij;fj.prototype.getTilesLayout=fj.prototype.Jj;fj.prototype.getEndByte=fj.prototype.Ib;fj.prototype.getStartByte=fj.prototype.Kb;fj.prototype.getEndTime=fj.prototype.oj;fj.prototype.getStartTime=fj.prototype.getStartTime;fj.prototype.getUris=fj.prototype.R;var gj=0,hj=1;fj.Status={Yk:gj,am:hj,Cl:2};function jj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function kj(a){return!a||jj(a)?null:a.length?a.end(a.length-1):null}function lj(a,b){return!a||!a.length||jj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function mj(a,b){if(!a||!a.length||jj(a))return 0;var c=0;a=t(nj(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} +function oj(a,b,c){if(!a||!a.length||jj(a))return null;a=nj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function nj(a){if(!a)return[];for(var b=[],c=0;ca[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function rj(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function sj(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127} +function tj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=yc(Hb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=yc(Hb(a.data,3+c,f)),h;"--\x3e"===d?h=yc(Hb(a.data,4+c+f)):h=Jb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null; +d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=yc(Hb(a.data,1,d));a=yc(Hb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=yc(Hb(a.data,1,d));a=yc(Hb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=yc(Hb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"== +c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Jb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=yc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=yc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Jb(a.data),b):null} +function uj(a){for(var b=0,c=[];qj(a,b);){var d=sj(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10>6&1&&(d+=10),d+=10,d+=sj(a,b+6),rj(a,b+10)&&(d+=10),b+=d;return 0>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}} +function zj(a,b,c){var d=a.U(),e=[],f=null;c&1&&(f=a.U());c&4&&a.skip(4);for(var g=0;ga?"0":"")+a};/* + + Copyright Brightcove, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +function Fj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d>>32-c;a.g-=c;0>>b))return a.h<<=b,a.g-=b,b;Gj(a);return b+Jj(a)}function Kj(a){Hj(a,1+Jj(a))}function U(a){var b=Jj(a);return Ij(a,b+1)-1}function Lj(a){a=U(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Mj(a){return 1===Ij(a,1)}function Nj(a){return Ij(a,8)} +function Oj(a,b){for(var c=8,d=8,e=0;ea.length)return this;for(var b=Math.max(0,Sj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Ee:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h< +k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=Uj(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.s&&(a.s=d),c.dts=Uj(d, +a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.lk=function(a){Bd("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Ig(a,{Ud:null,state:null})}; +q.Ig=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}0<=l&&0<=f&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.Ud&&(c=k.length?k[k.length-1]:b.Ud)&&(c.data=Mc(c.data,a),c.fullData=Mc(c.fullData,a));b.state=f;return k}; +q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Mc.apply(Gc,ha(c.value)),(c=Tj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:uj(c.data),dts:c.dts,pts:c.pts});return a}; +q.vb=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=Mc.apply(Gc,ha(c.value)),e=Tj(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=Mc(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}; +q.Mc=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=Mc.apply(Gc,ha(d.value)),f=Tj(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=Mc(d.data,e),this.g.push(d))}if(a){c={Ud:null,state:null};d=[];e=t(this.g);for(f=e.next();!f.done;f=e.next())f=f.value, +f.nalus=this.Ig(f,c),f.nalus.length&&(d.push(f),c.Ud=f.nalus[f.nalus.length-1]);this.g=d}b&&(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.vb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Mc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.Id=function(){return{audio:this.A,video:this.m}}; +q.De=function(){for(var a=[],b=t(this.Mc()),c=b.next();!c.done;c=b.next())a.push.apply(a,ha(c.value.nalus));return a};q.Oj=function(){Bd("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.pg();return{height:a.height,width:a.width}};q.pg=function(){return"hvc"==this.m?Vj(this):Wj(this)};function Xj(a){var b=a.Mc();return 1h?Oj(c,16):Oj(c,64))}}Kj(c);g=U(c);if(0===g)U(c);else if(1===g)for(Hj(c,1),Kj(c),Kj(c),g=U(c),h=0;hz;z++)Ij(d,2);for(z=0;zA;A++)G|=(D>>A&1)<<31-A;return G>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());p&&(f+="."+p.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase()); +c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Xj(a);return b}function Uj(a,b){var c=1;for(a>b&&(c=-1);4294967296Sj(a)?!1:!0}function Sj(a){for(var b=Math.min(1E3,a.length-564),c=0;ca.start(0)?0:a.length?a.start(0):null):a=null;return a}function pk(a,b){return Object.keys(a.g).length?b==Tc?a.h.h:kj(ok(a,b)):null}function qk(a,b,c){if(b==Tc)return a=a.h,null==a.h||a.hMath.abs(e-c))return f.return();tk(a,b,function(){return uk(a,b)},null);a.s&&tk(a,d.ia,function(){return uk(a,d.ia)},null);return x(f,tk(a,b,function(){return vk(a,b,c)},null),2)}return a.s?x(f,tk(a,d.ia,function(){return vk(a,d.ia,c)},null),0):f.B(0)})} +q.endOfStream=function(a){var b=this;return I(function(c){return x(c,Mk(b,function(){ik(b)||(b.I?0:b.l?"closed"==b.l.readyState:1)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.zb=function(a){var b=this;return I(function(c){return x(c,Mk(b,function(){if(ac&&(c+=.001);a.g[b].timestampOffset=c;mk(a,b)}function mk(a,b){if(!a.I){var c=a.m[b][0];c&&(c.p.resolve(),Nk(a,b))}}function tk(a,b,c,d){Kh(a.K);c={start:c,p:new lh,uri:d};a.m[b].push(c);1==a.m[b].length&&Ok(a,b);return c.p} +function Mk(a,b){var c,d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:Kh(a.K);c=[];d={};for(e in a.g)d={ready:void 0},d.ready=new lh,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.m[e].push(f),c.push(d.ready),1==a.m[e].length&&f.start();ua(l,2);return x(l,Promise.all(c),4);case 4:wa(l,3);break;case 2:throw g=xa(l),g;case 3:return ua(l,5,6),x(l,b(),6);case 6:ya(l);for(h in a.g)Nk(a,h);za(l,0);break;case 5:throw k=xa(l),new T(2,3,3015,k,a.j.error||"No error in the media element", +null);}})}function Nk(a,b){a.m[b].shift();Ok(a,b)}function Ok(a,b){var c=a.m[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.j.error||"No error in the media element",c.uri)),Nk(a,b)}}function wk(a,b,c,d,e){var f=null==c,g=a.Ia[d];c=a.V.sj();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Tb(c),f=fc()||dc()||lc()||cc()&&qc()&&c;f&&"mp4"==Ef(a.G[d])&&(b=$i(b,e));return b} +function Pk(a,b,c,d){return tk(a,b,function(){b!==Tc&&(zd()&&(a.i[b]&&(a.i[b].destroy(),delete a.i[b]),d&&(a.i[b]=d),a.g[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),mk(a,b))},null)} +function Qk(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J;return I(function(L){switch(L.g){case 1:c=Xc;a.I=!0;a.s=!1;d=a.j.currentTime;e=a.j.autoplay;f=a.j.paused;a.Ja&&(a.j.autoplay=!1);va(L,2);a.u.Za();g=[];for(h in a.i)g.push(a.i[h].destroy());for(k in a.m)for(l=a.m[k],m=l[0],a.m[k]=l.slice(0,1),m&&g.push(m.p.catch(Wf)),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.g){v=a.g[u];try{a.l.removeSourceBuffer(v)}catch(K){}}return x(L, +Promise.all(g),4);case 4:return a.i={},w=a.l.duration,a.H=new lh,a.l=ek(a,a.H),x(L,a.H,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.$)&&a.$&&(a.l.duration=a.$),z=new lh,y=a.l.sourceBuffers,B=b.size,C=0,D=function(){C++;C===B&&(z.resolve(),a.u.Ma(y,"addsourcebuffer",D))},a.u.o(y,"addsourcebuffer",D),G=t(b.keys()),A=G.next();case 6:if(A.done)return a.j.currentTime=d,x(L,z,2);E=A.value;F=a.g[E]?{timestampOffset:a.g[E].timestampOffset,appendWindowStart:a.g[E].appendWindowStart,appendWindowEnd:a.g[E].appendWindowEnd}: +null;J=b.get(E);return x(L,jk(a,E,J,J.codecs),9);case 9:a.s?(a.m[c.ia]=[],a.m[c.ya]=[]):a.m[E]=[];F&&a.g[E]&&(a.g[E].timestampOffset=F.timestampOffset,a.g[E].appendWindowEnd=F.appendWindowEnd,a.g[E].appendWindowStart=F.appendWindowStart);A=G.next();L.B(6);break;case 2:ya(L),a.I=!1,Kh(a.K),a.u.sa(a.j,"canplaythrough",function(){a.K.g||(a.j.autoplay=e,f||a.j.play())}),za(L,0)}})}function Rk(a,b){return Mk(a,function(){return Qk(a,b)})} +function Sk(a,b,c,d){var e=!1,f=Rc("audio",(d||"").split(",")),g=Rc("video",(d||"").split(",")),h=g;"audio"==b&&(h=f);h||(h=d);d=yf(c,h);var k=a.A.forceTransmux;if(!xd(d)||!a.C&&zf.includes(d))k=!0;if(k&&(a=Af(c,h),c=sf(a))){var l=c();f&&g&&(e=!0);d=l.convertCodecs(b,a)}b=Ff(Jf(d));return{hh:l,Qk:e,sh:If(d),codec:b,mimeType:d}} +function Kk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,z,y;return I(function(B){if(1==B.g){f=Xc;if(b==f.Na)return B.return(!1);g=Ff(Jf(a.G[b]));h=If(a.G[b]);k=Sk(a,b,c,d);l=k.hh;m=k.Qk;n=k.sh;p=k.codec;r=k.mimeType;u=!0;m&&(v=Sk(a,f.ia,c,d),w=Ff(Jf(a.G[f.ia])),z=If(a.G[f.ia]),u=w==v.codec&&z==v.sh,v.hh&&v.hh.destroy());if(g===p&&h===n&&u)return a.i[b]&&!l?(a.i[b].destroy(),delete a.i[b]):!a.i[b]&&l?a.i[b]=l:l&&(a.i[b]&&a.i[b].transmux!=l.transmux?(a.i[b].destroy(),delete a.i[b],a.i[b]=l):l.destroy()), +B.return(!1);y=!0;if(a.s||m&&l&&!a.i[b])y=!1;if(y&&"smooth"===a.A.codecSwitchingStrategy&&zd())return x(B,Pk(a,b,r,l),3);l&&l.destroy();return x(B,Rk(a,e),3)}return B.return(!0)})}function Tk(a,b,c,d){if(b==Tc)var e=!1;else{e=Ff(Jf(a.G[b]));var f=If(a.G[b]),g=yf(c,d),h=a.A.forceTransmux;if(!xd(g)||!a.C&&zf.includes(g))h=!0;c=Af(c,d);h&&(h=sf(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Ff(Jf(g));g=If(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!zd()||a.s:!1} +var gk=window.URL.createObjectURL,lk="sequence";function Uk(a,b,c){this.i=a;this.G=b;this.s=this.l=Infinity;this.h=1;this.g=this.j=null;this.A=0;this.C=!0;this.K=!1;this.J=0;this.H=void 0===c?!0:c;this.I=0;this.u=!1;this.m=a}q=Uk.prototype;q.getDuration=function(){return this.l};q.xj=function(){return this.h};q.zi=function(a){this.i=a};q.zb=function(a){this.l=a};q.Bj=function(){return this.i};q.si=function(a){this.A=a};q.Xc=function(a){a&&!this.C&&(this.K=!0);this.C=a};q.ef=function(a){this.s=a};q.Ce=function(){return this.s}; +q.Vg=function(a){this.G=a};q.nj=function(){return this.G};q.di=function(a,b){if(0!=a.length){var c=(Date.now()+this.A)/1E3;a=a.filter(function(e){return e.start+bc.end-.5)){b=!0;break a}b=!1}return b};function Zk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.G=b;this.s=c;this.m=new rd;this.l=this.C=!1;this.I=a.readyState;this.H=this.i=0;this.h=d;this.u=!1;this.m.o(a,"waiting",function(){return $k(f)});this.j=new Zb(function(){$k(f)})}Zk.prototype.release=function(){this.m&&(this.m.release(),this.m=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.G=this.A=null};Zk.prototype.Gg=function(){this.u=!0;$k(this)}; +function $k(a){if(0!=a.g.readyState&&a.C){if(a.g.seeking){if(!a.l)return}else a.l=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.I&&(a.I=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=Wk(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=oj(c,b,a.s.gapDetectionThreshold), +null!=d&&(0!=d||a.u))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||dc()||fc())e=Math.ceil(100*(e+a.s.gapPadding))/100;e>=a.G.Wb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.H++,a.A(new S("gapjumped")))}}}};function al(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=bl.value().get(b),c.sa(a,b,d))}var bl=new Qb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function cl(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 dl(a);al(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){el(e,e.j())})}cl.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 fl(a){return a.s?a.g.currentTime:a.j()} +function gl(a,b){0Math.abs(a.g.currentTime-b)?il(a):(a.h.sa(a.g,"seeking",function(){il(a)}),hl(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function il(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)} +function dl(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Zb(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}dl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function hl(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ba(.1)};function jl(a){this.h=a;this.j=!1;this.g=null;this.i=new rd}q=jl.prototype;q.ready=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.sa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;al(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.Ef=function(a){this.g=this.j?this.g:a}; +q.ke=function(){return(this.j?this.h.currentTime:this.g)||0};q.mh=function(){return 0};q.lh=function(){return 0};q.bi=function(){}; +function kl(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=ll(a,c,f);this.j=new Zk(a,b.presentationTimeline,c,this.s,f);this.h=new cl(a,function(){a:{var h=g.j;h.l=!0;h.u=!1;$k(h);var k=fl(g.h);h=ml(g,k);if(.001g.g.getDuration()?g.g.rc():g.g.Wb():0>h&&(h=g.g.Wb()+h);return nl(g,ol(g,h))});this.m=new Zb(function(){if(0!=g.i.readyState&&!g.i.paused){var h=fl(g.h),k=g.g.rc(),l=g.g.Wb();3>l-k&&(k=l-3);h=c?c-a.l.durationBackoff:b} +function ml(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.rc(),f=a.g.Wb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ld(c),k=a.g.Ld(d);c=a.g.Ld(c+d);return b>=g?nl(a,b):b>f?f:b=h||lj(a.i.buffered,b)?b:c}function ol(a,b){var c=a.g.rc();if(ba?a:b} +function ll(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Vk(new Yk(a),b.stallThreshold,c);Xk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function pl(a){this.g=a;this.m=null;this.i=0;this.s=!1}q=pl.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.gk=function(){this.s=!0};q.Ub=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Bg(a){return a.g[0]||null} +q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c=d.startTime&&aa||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.s)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)}; +q.Pe=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Pe(a);this.Ya(b)};q.Ya=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}}; +q.fd=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new fj(a.startTime,b,a.H,a.$a,a.La,a.ma,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.C,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}}; +q.lf=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new Zb(function(){var d=b();d?c.g.push.apply(c.g,ha(d)):(c.m.stop(),c.m=null)}),this.m.Ba(a))};pl.prototype[Symbol.iterator]=function(){return this.dc(0)}; +pl.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=h.startTime&&a=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0=this.g);)this.g--,b=a.g[this.g]}; +P("shaka.media.SegmentIterator",ql);ql.prototype.resetToLastIndependent=ql.prototype.Og;ql.prototype.next=ql.prototype.next;ql.prototype.current=ql.prototype.current;ql.prototype.currentPosition=ql.prototype.bj;ql.prototype.setReverse=ql.prototype.yd;function sl(){pl.call(this,[]);this.h=[]}qa(sl,pl);q=sl.prototype;q.clone=function(){var a=new sl;a.h=this.h.slice();a.i=this.i;return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]}; +q.Ub=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ub(a)};q.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};q.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Pe=function(){}; +q.Ya=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ya(a);for(;1d.endTime&&Ll(this,d);b&&Jl(this)};Dl.prototype.yd=function(a){this.s=a;this.g&&this.g.yd(a)}; +function Jl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={wg:void 0},d=c.next())e.wg=d.value,b.some(function(f){return function(g){return ej(g.ma,f.wg)}}(e))||Ll(a,e.wg)}function Nl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Ll(a,d)}Jl(a)}function Ol(a,b){b&&b!==a.i&&(Ml(a),a.i=b)}function Ll(a,b){var c=a.h;b instanceof dj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function Hl(a){this.g=a;this.Ve=this.dh=null} +function Il(a,b,c){var d=new Uint8Array(0);a.Ve=a.g(b,c,function(e){return I(function(f){if(1==f.g)return 0=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)} +Ql.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.Sf;a:{var e=c.Yd;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.pd;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); +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)&&Ul(this,a,e.contentType)&&(c.Sf=e,d=new S("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Ul(this,a,e.contentType)&&(c.Sf=e,JSON.stringify(e),c=new S("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}}; +function Ul(a,b,c){return(a=a.h()[c])&&0=a[0].start&&b=d?!1:!0})}else b.Yd=[]} +function Vl(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= +a.language);return b};function Wl(a){var b=If(a),c=b.split("/")[0];a=Jf(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,ce:null,colorGamut:null,frameRate:null}} +function Xl(a,b,c){function d(A){z=A.name;var E=A.reader;E.skip(24);var F=E.Aa(),J=E.Aa();E.skip(50);p=String(F);n=String(J);A.reader.Ga()&&Yh(A)}function e(A){var E=Aj(A.reader);r=E.channelCount;u=E.sampleRate;f(A.name)}function f(A){A=A.toLowerCase();switch(A){case "avc1":case "avc3":h.push(A+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(A+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(A+".05.04");l=!0;break;case "vp09":h.push(A+".00.10.08");l=!0;break;case "av01":h.push(A+".0.01M.08"); +l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(A),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,p=null,r=null,u=null,v=null,w=null,z;(new Th).box("moov",Yh).box("trak",Yh).box("mdia",Yh).W("mdhd",function(A){m=yj(A.reader,A.version).language}).box("minf",Yh).box("stbl",Yh).W("stsd",$h).box("mp4a",function(A){var E=Aj(A.reader);r=E.channelCount;u=E.sampleRate;A.reader.Ga()?Yh(A):f(A.name)}).box("esds",function(A){A=A.reader;for(var E= +"mp4a",F,J;A.Ga();){F=A.Z();for(var L=A.Z();L&128;)L=A.Z();if(3==F)A.Aa(),L=A.Z(),L&128&&A.Aa(),L&64&&A.skip(A.Z()),L&32&&A.Aa();else if(4==F)J=A.Z(),A.skip(12);else if(5==F)break}J&&(E+="."+Dj(J),5==F&&A.Ga()&&(F=A.Z(),J=(F&248)>>3,31===J&&A.Ga()&&(J=32+((F&7)<<3)+((A.Z()&224)>>5)),E+="."+J));g.push(E);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09", +d).box("av01",d).box("avcC",function(A){var E=z||"";switch(z){case "dvav":E="avc3";break;case "dva1":E="avc1"}A=A.reader;A.skip(1);A=E+"."+Dj(A.Z())+Dj(A.Z())+Dj(A.Z());h.push(A);l=!0}).box("hvcC",function(A){var E=z||"";switch(z){case "dvh1":E="hvc1";break;case "dvhe":E="hev1"}var F=A.reader;F.skip(1);A=F.Z();var J=["","A","B","C"][A>>6],L=A&31,K=F.U(),O=(A&32)>>5?"H":"L";A=[F.Z(),F.Z(),F.Z(),F.Z(),F.Z(),F.Z()];F=F.Z();for(var M=0,N=0;32>N;N++){M|=K&1;if(31==N)break;M<<=1;K>>=1}E=E+("."+J+L)+("."+ +Dj(M,!0));E+="."+O+F;J="";for(L=A.length;L--;)if((O=A[L])||J)J="."+O.toString(16).toUpperCase()+J;E+=J;h.push(E);l=!0}).box("dvcC",function(A){var E=z||"";switch(z){case "hvc1":E="dvh1";break;case "hev1":E="dvhe";break;case "avc1":E="dva1";break;case "avc3":E="dvav";break;case "av01":E="dav1"}var F=A.reader;F.skip(2);A=F.Z();F=F.Z();h.push(E+"."+Ej(A>>1&127)+"."+Ej(A<<5&32|F>>3&31));l=!0}).box("dvvC",function(A){var E=z||"";switch(z){case "hvc1":E="dvh1";break;case "hev1":E="dvhe";break;case "avc1":E= +"dva1";break;case "avc3":E="dvav";break;case "av01":E="dav1"}var F=A.reader;F.skip(2);A=F.Z();F=F.Z();h.push(E+"."+Ej(A>>1&127)+"."+Ej(A<<5&32|F>>3&31));l=!0}).W("vpcC",function(A){var E=z||"",F=A.reader;A=F.Z();var J=F.Z();F=F.Z()>>4&15;h.push(E+"."+Ej(A)+"."+Ej(J)+"."+Ej(F));l=!0}).box("av1C",function(A){var E=z||"";switch(z){case "dav1":E="av01"}var F=A.reader;F.skip(1);A=F.Z();F=F.Z();var J=A>>>5,L=(F&64)>>6;h.push(E+"."+J+"."+Ej(A&31)+(F>>>7?"H":"M")+"."+Ej(2===J&&L?(F&32)>>5?12:10:L?10:8)+"."+ +((F&16)>>4)+"."+((F&8)>>3)+((F&4)>>2)+(F&3)+"."+Ej(1)+"."+Ej(1)+"."+Ej(1)+".0");l=!0}).box("enca",bi).box("encv",ai).box("sinf",Yh).box("frma",function(A){A=Bj(A.reader).codec;f(A)}).box("colr",function(A){h=h.map(function(J){if(J.startsWith("av01.")){var L=A.reader,K=L.Oa(),O=L.Rb(4);var M=String.fromCharCode(O[0]);M+=String.fromCharCode(O[1]);M+=String.fromCharCode(O[2]);M+=String.fromCharCode(O[3]);if("nclx"===M){O=L.Aa();M=L.Aa();var N=L.Aa(),R=L.Z()>>7,Q=J.split(".");10==Q.length&&(Q[6]=Ej(O), +Q[7]=Ej(M),Q[8]=Ej(N),Q[9]=String(R),J=Q.join("."))}L.seek(K)}return J});var E=Cj(A.reader),F=E.colorGamut;v=E.ce;w=F}).parse(a||b,!0);if(!g.length&&!h.length)return null;var y=k&&!l,B=new Map;if(l&&!c){c=new Id("video/mp4");a&&c.init(a);try{c.i(b);for(var C=t(c.j()),D=C.next();!D.done;D=C.next()){var G=D.value;B.set(G,G)}}catch(A){}c.g()}return{type:y?"audio":"video",mimeType:y?"audio/mp4":"video/mp4",codecs:Yl(g.concat(h)).join(", "),language:m,height:n,width:p,channelCount:r,sampleRate:u,closedCaptions:B, +ce:v,colorGamut:w,frameRate:null}}function Yl(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Hf(d);b.has(e)||(c.push(d),b.add(e))}b=Wc("audio",c);d=Wc("video",c);a=Wc(Tc,c);d=Zl(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b} +function Zl(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?xd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a} +function $l(a){var b=null;(new Th).box("moov",Yh).box("trak",Yh).box("mdia",Yh).box("minf",Yh).box("stbl",Yh).W("stsd",$h).box("encv",ai).box("enca",bi).box("sinf",Yh).box("schi",Yh).W("tenc",function(c){c=c.reader;c.Z();c.Z();c.Z();c.Z();b=Lc(c.Rb(16))}).parse(a,!0);return b} +function am(a,b,c){var d,e,f,g,h;return I(function(k){if(1==k.g)return d=b,d.cryptoKey?k.B(2):x(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 bm(a,b,c,d,e){a=Ah(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function cm(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.I=new Map;this.C=1;this.u=this.j=null;this.L=0;this.J=!1;this.i=new Map;this.H=!1;this.M=null;this.A=!1;this.m=new Jh(function(){return dm(c)});this.O=Date.now()/1E3;this.s=new Map;this.K={projection:null,hfov:null};this.S=0;this.P=Infinity;this.G=null}q=cm.prototype;q.destroy=function(){return this.m.destroy()}; +function dm(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,em(e),b.push(fm(e)),e.ba&&(Ml(e.ba),e.ba=null);f=t(a.s.values());for(g=f.next();!g.done;g=f.next())h=g.value,Ml(h);return x(k,Promise.all(b),2)}a.i.clear();a.s.clear();a.g=null;a.l=null;a.h=null;H(k)})} +q.configure=function(a){this.h=a;this.M=new ih({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&&(Ml(b.ba),b.ba=null);b=t(this.s.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Ml(this.s.get(c)),this.s.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Tc))&& +b.ba&&(Ml(b.ba),b.ba=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ba&&(Ml(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?(Nl(c.ba,a.segmentPrefetchLimit),0a.g.Ua(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.va&&e.va.yd(c),e.ba&&e.ba.yd(c);d=t(a.s.values());for(e=d.next();!e.done;e=d.next())e.value.yd(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Ac&&(pm(a,b,!1,0,!1),c.Ac=d);else if(b=c.Ac)c.Ac=null,pm(a,b,!0,0,!1)} +function qm(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.H&&(b.video&&pm(a,b.video,c,d,e,f),b.audio&&pm(a,b.audio,c,d,e,f))}function rm(a,b){I(function(c){if(1==c.g)return a.G=null,a.u=b,a.H?b.segmentIndex?c.B(2):x(c,b.createSegmentIndex(),2):c.return();pm(a,b,!0,0,!1);H(c)})}function sm(a,b){for(var c=t(a.I.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.I.delete(d))}} +function pm(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Tc?g&&(g.Ac&&(b.trickModeVideo?(g.Ac=b,b=b.trickModeVideo):g.Ac=null),g.stream!=b||e)&&(a.s.has(b)?g.ba=a.s.get(b):g.ba&&Ol(g.ba,b),b.type==Tc&&(e=yf(b.mimeType,b.codecs),kk(a.g.na,e,a.l.sequenceMode,b.external)),!a.s.has(g.stream)&&g.stream.closeSegmentIndex&&(g.gb?(e="("+g.type+":"+g.stream.id+")",a.I.has(e)||a.I.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.va=null,g.oh=!!f,c?g.Ed?g.vf=!0:g.gb?(g.Gc=!0,g.se= +d,g.vf=!0):(em(g),tm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.gb||g.Tb||mm(a,g,0),um(a,g).catch(function(h){if(a.g)a.g.onError(h)})):km(a,b)} +function um(a,b){var c,d;return I(function(e){if(1==e.g){if(!b.Eb)return e.return();c=b.stream;d=b.Eb;return c.segmentIndex?e.B(2):x(e,c.createSegmentIndex(),2)}if(b.Eb!=d||b.stream!=c)return e.return();var f=a.g.Kd();var g=pk(a.g.na,b.type),h=b.stream.segmentIndex.find(b.pb?b.pb.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.La?k.La-k.$a:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ma)&&(h+=(k.La?k.La-k.$a:null)||0),k=a.g.getBandwidthEstimate(), +f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.Eb.h.g>h?!0:!1):f=!1;f&&b.Eb.abort();H(e)})} +q.wd=function(){if(this.g)for(var a=this.g.Kd(),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.na;d==Tc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&aa.g.Ua()):null} +function hm(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={Hb:void 0},e=d.next())if(f.Hb=e.value,f.Hb.audio)if(a.s.has(f.Hb.audio)){if(e=a.s.get(f.Hb.audio),Nl(e,b),!(0=b||!c.some(function(h){return function(k){return $c(h.Hb.audio.language,k)}}(f))||!(e=gm(a,f.Hb.audio))|| +(f.Hb.audio.segmentIndex||f.Hb.audio.createSegmentIndex(),a.s.set(f.Hb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.na.zb(a):this.g.na.zb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))}; +function xm(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:Kh(a.m);if(b.gb||null==b.Tb||b.Ed)return k.return();b.Tb=null;if(!b.Gc){k.B(2);break}return x(k,tm(a,b,b.vf,b.se),3);case 3:return k.return();case 2:sm(a,b);if(b.stream.segmentIndex){k.B(4);break}c=b.stream;ua(k,5);return x(k,b.stream.createSegmentIndex(),7);case 7:wa(k,6);break;case 5:return d=xa(k),x(k,ym(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.gb||b.Tb|| +mm(a,b,0),k.return();case 4:ua(k,9);e=zm(a,b);null!=e&&(mm(a,b,e),b.Nd=!1);wa(k,10);break;case 9:return f=xa(k),x(k,ym(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.H||!g.every(function(l){return l.endOfStream})){k.B(0);break}return x(k,a.g.na.endOfStream(),13);case 13:Kh(a.m),h=a.g.na.getDuration(),0!=h&&hh&&e)return b.endOfStream= +!0,"video"==b.type&&(a=a.i.get(Tc))&&Am(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.va;e=Bm(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.oh&&(f=!0,b.oh=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,Am(k)||k.va&&!k.va.current()||(g=Math.min(g,k.pb?k.pb.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;b.ba&&b.va&&!a.s.has(b.stream)&&(b.ba.Ya(e.startTime),Fl(b.ba, +e.startTime));Cm(a,b,c,e,f).catch(function(){});return null} +function Bm(a,b,c,d){if(b.va)return b.va.current();if(b.pb||d)return c=b.pb?b.pb.endTime:d,a=0>a.g.Ua(),b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.dc(c,!1,a)),b.va&&b.va.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ua();var f=null;d&&(b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.dc(e,!1,a)),f=b.va&&b.va.next().value);f||(b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.dc(c,!1,a)),f=b.va&&b.va.next().value);return f} +function Cm(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D;return I(function(G){switch(G.g){case 1:f=Xc;g=b.stream;h=b.va;b.gb=!0;ua(G,2);if(2==d.tc())throw new T(1,1,1011);return x(G,Dm(a,b,d,e),4);case 4:Kh(a.m);if(a.A)return G.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.l.isLowLatency)&&l&&k&&("HLS"!=a.l.type||d.m))return r=new Uint8Array(0),v=u=!1,z=function(A){var E,F,J,L;return I(function(K){switch(K.g){case 1:if(u)return K.return(); +v=!0;Kh(a.m);if(a.A)return K.return();ua(K,2);r=Em(r,A);E=!1;F=0;(new Th).box("mdat",function(O){F=O.size+O.start;E=!0}).parse(r,!1,!0);if(!E){K.B(4);break}J=r.subarray(0,F);r=r.subarray(F);return x(K,Fm(a,b,c,g,d,J,!0,e),5);case 5:b.ba&&b.va&&Fl(b.ba,d.startTime,!0);case 4:wa(K,0);break;case 2:w=L=xa(K),H(K)}})},x(G,Gm(a,b,d,z),9);n=Gm(a,b,d);return x(G,n,7);case 7:p=G.h;Kh(a.m);if(a.A)return G.return();Kh(a.m);return b.Gc?(b.gb=!1,mm(a,b,0),G.return()):x(G,Fm(a,b,c,g,d,p,!1,e),6);case 9:y=G.h;if(w)throw w; +if(v){G.B(10);break}u=!0;Kh(a.m);return a.A?G.return():b.Gc?(b.gb=!1,mm(a,b,0),G.return()):x(G,Fm(a,b,c,g,d,y,!1,e),10);case 10:b.ba&&b.va&&Fl(b.ba,d.startTime,!0);case 6:Kh(a.m);if(a.A)return G.return();b.pb=d;h.next();b.gb=!1;b.Mg=!1;B=a.g.na.Vb();C=B[b.type];eb(JSON.stringify(C));b.Gc||a.g.Gg(d,b.stream);mm(a,b,0);wa(G,0);break;case 2:D=xa(G);Kh(a.m,D);if(a.A)return G.return();b.gb=!1;if(7001==D.code)b.gb=!1,em(b),mm(a,b,0),G.B(0);else if(b.type==f.Na&&a.h.ignoreTextStreamFailures)a.i.delete(f.Na), +G.B(0);else{if(3017==D.code)return x(G,Hm(a,b,D),0);b.Nd=!0;1==D.category&&b.ba&&Ll(b.ba,d);D.severity=2;return x(G,ym(a,b,D),0)}}})}function Em(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c} +function Hm(a,b,c){var d,e,f,g,h,k;return I(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.Mg}))return l.B(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();h=Math.round(100*a.C);if(20e)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 Pm(a,b){return a&&b} +function Qm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0"===c.substr(0,5)&&""===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Jb(Jc(c)))}};Rm.expressplayFairPlayRequest=function(a,b){Vm(a,b)}; +Rm.conaxFairPlayRequest=function(a,b){Vm(a,b)};Rm.ezdrmFairPlayRequest=function(a,b){Vm(a,b)};Rm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Hb(b.body),a=Ic(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Cc("spc="+a))};Rm.expressplayInitDataTransform=function(a,b,c){return Um(a,b,c)}; +Rm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Bc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Lb(d);for(var e=0,f=c.length;e=h.height});g.length&&(g.sort(function(h,k){return k.height-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!=Tc&&"image"!=c.type||b.push(c);return b}function Ym(a){return Pm([a],a)}function Zm(a){return Pm([a],a)}P("shaka.util.PlayerConfiguration",Wm);Wm.mergeConfigObjects=an;Wm.createDefault=Xm;function bn(a,b,c,d){hb.call(this);this.O=a;this.V=b;this.Ia=d.networkingEngine;this.C=c;this.s=null;this.Ea=0;this.bb=d.dd;this.H=d.dk;this.kb=d.ek;this.g=d.config;this.j=this.I=this.h=null;this.ka=!1;this.J=d.qk;this.ra=!1;this.l=null;this.aa=!1;this.i=this.G=null;this.$=!1;this.M=new Map;this.za=!1;this.Ha=d.pk;this.Y=new Cl;this.ha=new lh;this.m=new lh;this.P=null;this.u=!1;this.Xa=d.Zi;this.oa=null;this.Ja=d.Yi;this.S=!1;this.L=[];this.K=[];this.A=!0}qa(bn,hb); +function cn(a,b,c){(a=b?a.K:a.L)?a.push(c):c()}function dn(a){if(a.K)for(var b=t(a.K),c=b.next();!c.done;c=b.next())c=c.value,c();a.K=null}function en(a,b){a.P=b;a.S=!0;if(a.L){b=t(a.L);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.L=null}q=bn.prototype;q.getStartTime=function(){return this.C};q.hd=function(){return this.O};q.mg=function(){return this.h};function fn(a){a.$=!0;return a.i}function gn(a){a.ra=!0;return a.J}q.getStats=function(){return this.Y}; +function hn(a){a.aa=!0;return a.l}function jn(a){a.za=!0;return a.M} +q.start=function(){var a=this;(function(){var b;return I(function(c){switch(c.g){case 1:return x(c,Promise.resolve(),2);case 2:return ua(c,3),x(c,kn(a),5);case 5:return ln(a),x(c,mn(a),6);case 6:ln(a);a.s||(a.s=new Vg(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.Ja){var d=a.g.abrFactory;a.G=d;a.i=d();a.i.configure(a.g.abr)}if(a.Xa){d=a.h.presentationTimeline.T();var e=Ig(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())a.oa=e,e.video&&nn(a,e.video,d),e.audio&&nn(a,e.audio,d)}return x(c,void 0,7);case 7:ln(a);a.m.resolve();wa(c,0);break;case 3:b=xa(c),b instanceof T&&(7001==b.code||7003==b.code)||a.m.reject(b),H(c)}})})()}; +q.dispatchEvent=function(a){return this.P?this.P.dispatchEvent(a):hb.prototype.dispatchEvent.call(this,a)};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 ln(a){if(a.u)throw new T(2,7,7003);}function on(a,b){a.dispatchEvent(new S("onstatechange",(new Map).set("state",b)))} +function kn(a){var b,c,d,e;return I(function(f){switch(f.g){case 1:on(a,"manifest-parser");a.j||(a.I=Yi(a.O,a.V),a.j=a.I(),a.j.configure(a.g.manifest,function(){return a.A}));b=Date.now()/1E3;on(a,"manifest");if(a.h){f.B(2);break}return x(f,a.j.start(a.O,a.kb),3);case 3:a.h=f.h;case 2:return a.ha.resolve(),c=new S("manifestparsed",void 0),x(f,Promise.resolve(),4);case 4:a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);pn(a.h);d=Date.now()/1E3;e=d-b;a.Y.J=e;H(f)}})} +function mn(a){var b,c,d,e,f;return I(function(g){switch(g.g){case 1:on(a,"drm-engine");a.Ea=Date.now()/1E3;a.l=a.bb();a.H.g=a.l;a.l.configure(a.g.drm,function(){return a.A});b=Ti(a.H,a.h);if(!b){g.B(2);break}c=new S("trackschanged",void 0);return x(g,Promise.resolve(),3);case 3:ln(a),a.dispatchEvent(c);case 2:return d=Ig(a.h.variants),x(g,mi(a.l,d,a.h.offlineSessionIds),4);case 4:return ln(a),x(g,Ri(a.H,a.h),5);case 5:e=g.h;if(!e){g.B(0);break}f=new S("trackschanged",void 0);return x(g,Promise.resolve(), +7);case 7:a.dispatchEvent(f),H(g)}})}q.configure=function(a,b){a=Om(a,b);an(this.g,a)};q.getConfiguration=function(){return ae(this.g)}; +function nn(a,b,c){var d,e,f,g,h;I(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Dl(d,b,function(l,m,n){return wm(l,m,n||null,a.g.streaming.retryParameters,a.Ia,a.A)},!1),a.M.set(b.id,e),x(k,b.createSegmentIndex(),2);f=a.C||0;(h=(g=b.segmentIndex.dc(f))?g.current():null)||(h=Bg(b.segmentIndex));h&&(c?h.ma&&Gl(e,h.ma):Fl(e,h.startTime));H(k)})}q.Wk=function(){return this.m}; +q.destroy=function(){var a=this,b,c,d;return I(function(e){switch(e.g){case 1:a.u=!0;if(!a.j||a.ka){e.B(2);break}return x(e,a.j.stop(),2);case 2:if(!a.i||a.$){e.B(4);break}return x(e,a.i.stop(),4);case 4:a.J&&!a.ra&&a.J.release();if(!a.l||a.aa){e.B(6);break}return x(e,a.l.destroy(),6);case 6:if(0d.endTime?un:rn;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.$c==e&&h.Zc==f&&h.Oc(d,b)}}}; +function sn(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var tn=1,rn=2,un=3;function vn(a,b,c){var d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:var n=(new ob(a)).rb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=wn[d])return m.return(e);f=0;g=Ah([a],c);ua(m,2);g.method="HEAD";return x(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];wa(m,3);break;case 2:k=xa(m);if(!k||1002!=k.code&&1001!=k.code){m.B(3);break}g.method="GET";return x(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e? +e.toLowerCase().split(";").shift():"")}})} +var wn={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",mov:"video/quicktime",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",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function xn(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return xn(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=hf,e=a.fontStyle==jf,f=a.textDecoration.includes(kf);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=yn(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=yn(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;return"<"+h+(void 0===k?"":k)+">"+g+""},a.payload)} +function yn(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7>>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&& +(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 Cn(a){if(Infinity===a.endTime||a.endTimea});return!0}; +q.append=function(a){if(this.g){var b=zn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={ld:void 0},d=b.next())e.ld=d.value,!a.some(function(f){return function(g){return g.startTime==f.ld.startTime&&g.endTime==f.ld.endTime&&g.text==f.ld.payload?!0:!1}}(e))&&e.ld.payload&&(d=Bn(e.ld))&&c.push(d);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)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)}};q.destroy=function(){this.g&&(En(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};q.setTextVisibility=function(a){this.g&&(this.g.mode=a?"showing":"hidden")}; +function En(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",Dn);Dn.prototype.setTextVisibility=Dn.prototype.setTextVisibility;Dn.prototype.isTextVisible=Dn.prototype.isTextVisible;Dn.prototype.destroy=Dn.prototype.destroy;Dn.prototype.append=Dn.prototype.append;Dn.prototype.remove=Dn.prototype.remove;Dn.prototype.configure=Dn.prototype.configure;function Fn(){}q=Fn.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",Fn);Fn.prototype.setTextVisibility=Fn.prototype.setTextVisibility;Fn.prototype.isTextVisible=Fn.prototype.isTextVisible;Fn.prototype.destroy=Fn.prototype.destroy;Fn.prototype.append=Fn.prototype.append;Fn.prototype.remove=Fn.prototype.remove;Fn.prototype.configure=Fn.prototype.configure;function Gn(){}function V(a){return document.createElement(a)}function Hn(){var a=document.createElement("button");a.setAttribute("type","button");return a}function In(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",Gn);Gn.removeAllChildren=In;function Jn(a,b){var c=this;document.fullscreenEnabled||Za("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen");this.m=!1;this.h=[];this.A=a;this.u=b;this.l=null;this.g=V("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);this.G=(new Zb(function(){c.A.paused|| +Kn(c)})).Ba(.25);this.i=new Map;this.j=new rd;this.j.o(document,"fullscreenchange",function(){Kn(c,!0)});this.j.o(this.A,"seeking",function(){Kn(c,!0)});this.j.o(this.A,"resize",function(){var d=c.A,e=d.videoWidth;d=d.videoHeight;e&&d?c.l=e/d:c.l=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){Kn(c,!0)}),this.s.observe(this.g));this.C=new Map}q=Jn.prototype;q.configure=function(a){this.G&&this.G.Ba(a.captionsUpdatePeriod)}; +q.append=function(a){var b=[].concat(ha(this.h));a=t(An(a));for(var c=a.next(),d={};!c.done;d={Qf:void 0},c=a.next())d.Qf=c.value,b.some(function(e){return function(f){return Ze(f,e.Qf)}}(d))||this.h.push(d.Qf);Kn(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()}; +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=b});Kn(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a;Kn(this,!0)};function Ln(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1} +function Mn(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.Qi:null;l&&(g.push(l.Rf),l.Wc&&g.push(l.Wc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Ln(a,n)||(f=!0):(Nn(a,k,e),l=a.i.get(k),n=l.Qi,f=!0));0a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Se?(f.width="100%",c.lineAlign==Ue?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Ue?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Ue?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=Pn(c);"line-left"==a?(f.cssFloat= +"left",null!==c.position&&(f.position="absolute",c.writingMode==Se?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Se?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Se?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode= +c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Se?f.width=c.size+"%":f.height=c.size+"%")}function Qn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}} +function Rn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}P("shaka.text.UITextDisplayer",Jn);Jn.prototype.setTextVisibility=Jn.prototype.setTextVisibility;Jn.prototype.isTextVisible=Jn.prototype.isTextVisible;Jn.prototype.remove=Jn.prototype.remove;Jn.prototype.destroy=Jn.prototype.destroy;Jn.prototype.append=Jn.prototype.append;Jn.prototype.configure=Jn.prototype.configure;function Sn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.startf?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=zn(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left"); +break;case "right":g.push("align:right");break;case Pe:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}P("shaka.text.WebVttGenerator",function(){});function Tn(a,b){this.h=a;this.g=b;this.i=void 0;this.l=!1;this.s=!0;this.j=this.m=!1}Tn.prototype.configure=function(a){this.g=a};function Un(a){a.l=!1;a.s=!0;a.m=!1;a.j=!1}function Vn(a,b){a.j=b;a.j?a.i==Wn?a.i=Xn:a.i==Yn&&(a.i=Zn):a.i==Xn?a.i=Wn:a.i==Zn&&(a.i=Yn)} +function $n(a,b,c){try{if(!a.g.enabled)return b;var d=ao(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=bo;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=co;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=eo;break a}e=void 0}d.ot=e;d.su= +!0;var f=fo(d);return go(b,f)}catch(g){return $a("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function ao(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}} +function ho(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,ao(a));c.pr=a.h.Ua();var e=c.ot===io||c.ot===co;a.m&&e&&(c.bs=!0,c.su=!0,a.m=!1);null==c.su&&(c.su=a.s);a=jo(a,c);if(d)d=ko(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=fo(a);f&&(b.uris=b.uris.map(function(g){return go(g,f)}))}}}function jo(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b} +function lo(a){if(0===a.type)return mo;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?co:io;if("audio"==b)return bo;if("text"==b)return"application/mp4"===a.mimeType?no:oo}}function po(a,b){b=a.h.Vb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN} +function qo(a,b){b=a.h.Vb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function ro(a,b){var c=a.h.Lb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case io:return a.videoBandwidth||NaN;case bo:return a.audioBandwidth||NaN;default:return a.bandwidth}} +function fo(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"=== +l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function ko(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=c?a*(1-c)+b*c:a};function xo(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",so);so.prototype.getBandwidthEstimate=so.prototype.getBandwidthEstimate;so.prototype.getRoundTripTime=so.prototype.Dj;so.prototype.getResponseDelay=so.prototype.Cj;so.prototype.getEstimatedThroughput=so.prototype.Kh; +so.prototype.getMaxBitrate=so.prototype.Lh;var uo="etp",to="mb",vo="rd",wo="rtt";function yo(){this.g=null;this.h=[]}function zo(a,b){return I(function(c){if(1==c.g)return a.g?x(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;H(c)})}yo.prototype.release=function(){0a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:$b()?!0:ac("application/x-mpegurl")} +function $o(a,b){a.dispatchEvent(Xo("onstatechange",(new Map).set("state",b)))} +q.$b=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return I(function(g){switch(g.g){case 1:if(c.m==Yo)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return x(g,c.detach(),2);case 2:return x(g,ap(c,"attach"),4);case 4:if(g.h)return g.return();ua(g,5,6);d||($o(c,"attach"),e=function(){var h=bp(c,!1);h&&cp(c,h)},c.zc.o(a,"error",e),c.h=a);if(!b||!$b()||c.K){g.B(6);break}return x(g,dp(c),6);case 6:ya(g);c.V.release();za(g,0);break;case 5:return f=xa(g),x(g,c.detach(),10);case 10:throw f; +}})};q.ph=function(a){this.nh=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return I(function(c){if(1==c.g){if(b.m==Yo)throw new T(2,7,7E3);return x(c,b.mc(!1,a),2)}if(3!=c.g)return x(c,ap(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.zc.Za(),b.h=null),$o(b,"detach"),b.u&&!a&&b.u.release()}finally{b.V.release()}H(c)})};function ap(a,b){var c;return I(function(d){return 1==d.g?(c=++a.ie,x(d,zo(a.V,b),2)):c!=a.ie?(a.V.release(),d.return(!0)):d.return(!1)})} +q.mc=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,p;return I(function(r){switch(r.g){case 1:return c.m!=Yo&&(c.m=Ao),x(r,ap(c,"unload"),2);case 2:if(r.h)return r.return();va(r,3);c.ra=!1;$o(c,"unload");a&&!$b()&&(a=!1);Ho(c);d=c.Xd.map(function(u){return u()});c.Xd=[];return x(r,Promise.all(d),5);case 5:c.dispatchEvent(Xo("unloading"));c.yc&&(c.yc.release(),c.yc=null);c.h&&(c.l.Za(),c.Ja.Za());c.xf.stop();c.Db&&(c.Db.release(),c.Db=null);c.wf&&(c.wf.stop(),c.wf=null); +if(!c.J){r.B(6);break}return x(r,c.J.stop(),7);case 7:c.J=null,c.Xa=null;case 6:if(!c.s){r.B(8);break}return x(r,c.s.stop(),8);case 8:if(!c.j){r.B(10);break}return x(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.L&&(c.L.release(),c.L=null);c.I&&(c.I.release(),c.I=null);if(!vc("webkit")||!c.C){r.B(12);break}return x(r,c.C.destroy(),13);case 13:c.C=null;case 12:if(!c.K){r.B(14);break}return x(r,c.K.destroy(),15);case 15:c.K=null;case 14:if(c.u&&!b)c.u.onAssetUnload();c.Y&&!b&&(c.Y.destroy(),c.Y=null); +b||c.Df.stop();c.P&&Un(c.P);c.aa&&(c.aa.g=null);if(!c.G){r.B(16);break}return x(r,c.G.destroy(),17);case 17:c.G=null;case 16:c.h&&In(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.C){r.B(18);break}return x(r,c.C.destroy(),19);case 19:c.C=null;case 18:c.za&&c.$!=c.za.hd()&&(c.za.u||c.za.destroy(),c.za=null);c.$=null;c.Af=null;c.O=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=k.value)&&l.segmentIndex&& +l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(qg={},Xb.clear());c.i=null;c.A=new Cl;c.ge=null;c.Ha=null;c.S=null;c.je=-1;c.be=[];c.zf=-1;ep(c);case 3:ya(r);c.V.release();za(r,4);break;case 4:if(a&&$b()&&!c.K&&c.h)return x(r,dp(c),0);r.B(0)}})};q.Vk=function(a){this.ka=a}; +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,v,w;return I(function(z){switch(z.g){case 1:if(d.m==Yo)throw new T(2,7,7E3);e=null;f="";a instanceof bn?(e=a,f=e.hd()||""):f=a||"";return x(z,zo(d.V,"load"),2);case 2:d.V.release();if(!d.h)throw new T(2,7,7002);if(!d.$){z.B(3);break}d.$=f;return x(z,d.mc(!1),3);case 3:g=++d.ie;h=function(){return I(function(y){if(1==y.g)return d.ie==g?y.B(0):e?x(y,e.destroy(),3):y.B(3);throw new T(2,7,7E3);})};k=function(y,B){return I(function(C){switch(C.g){case 1:return va(C, +2),x(C,zo(d.V,B),4);case 4:return x(C,h(),5);case 5:return x(C,y(),6);case 6:return x(C,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:ya(C),d.V.release(),za(C,0)}})};ua(z,5,6);null==b&&e&&(b=e.getStartTime());d.ka=b;d.ra=!1;d.dispatchEvent(Xo("loading"));if(e){c=e.V;z.B(8);break}if(c){z.B(8);break}return x(z,k(function(){return I(function(y){if(1==y.g)return x(y,fp(d,f),2);c=y.h;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){en(e,d);d.A=e.getStats();z.B(11);break}return x(z,gp(d,f,b,c,!0),12);case 12:(e= +z.h)?(e.A=!1,en(e,d),d.A=e.getStats(),e.start(),e.m.catch(function(){})):d.A=new Cl;case 11:return m=!e,n=Date.now()/1E3,d.A=e?e.getStats():new Cl,d.$=f,d.Af=c||null,m?x(z,k(function(){return I(function(y){return x(y,hp(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):x(z,k(function(){return I(function(y){if(1==y.g)return x(y,Promise.race([e.ha,e.m]),2);d.Xa=e.I;var B=e;B.ka=!0;d.J=B.j;d.i=e.mg();H(y)})},"waitForFinish"),15);case 15:if(d.K){z.B(16);break}return x(z,k(function(){return I(function(y){return x(y, +dp(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return x(z,k(function(){return I(function(y){return x(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.rf=e.H;d.J&&d.J.setMediaElement&&d.h&&d.J.setMediaElement(d.h);d.yc=gn(e);d.wc=e.Ha;if(p=e.s)d.Ia=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(ip(d),d.configure("manifest.disableVideo",!0));d.C=hn(e);return x(z,k(function(){return I(function(y){return x(y,d.C.$b(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.G)||d.Ea&& +d.Ea==r||(d.s=fn(e),d.Ea=e.G,"function"!=typeof d.s.setMediaElement&&(Bd("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(Bd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(Bd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."), +d.s.trySuggestStreams=function(){})),u=jn(e),v=e.oa,x(z,k(function(){return I(function(y){return x(y,jp(d,n,v,u),0)})},"loadInner_"),20);case 20:dn(e);z.B(14);break;case 21:return x(z,k(function(){return I(function(y){return x(y,kp(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Xo("loaded"));case 6:ya(z);if(!e){z.B(23);break}return x(z,e.destroy(),23);case 23:d.za=null;za(z,0);break;case 5:w=xa(z);if(!w||7E3==w.code){z.B(25);break}return x(z,d.mc(!1),25);case 25:throw w;}})}; +function ip(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.Rk=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return I(function(e){return 1==e.g?x(e,lp(c),2):3!=e.g?(d=e.h,x(e,c.mc(a,b),3)):e.return(d)})}; +q.Eh=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return I(function(e){return 1==e.g?x(e,lp(c,b),2):3!=e.g?(d=e.h,x(e,c.detach(a),3)):e.return(d)})}; +function lp(a,b){b=void 0===b?!1:b;var c,d;return I(function(e){if(1==e.g){c=null;if(!(a.i&&a.J&&a.Xa&&a.$))return e.B(2);d=a.h.currentTime;a.T()&&!b&&(d=null);return x(e,mp(a,a.$,d,a.Af,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.yf.push(c);a.J&&a.J.setMediaElement&&a.J.setMediaElement(null);var f=c,g=a.J,h=a.Xa;f.h=a.i;f.j=g;f.I=h;f=c;g=a.Ea;f.i=a.s;f.G=g;c.s=a.Ia;c.start();a.i=null;a.J=null;a.Xa=null;a.s=null;a.Ea=null}return e.return(c)})} +q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return I(function(f){if(1==f.g)return x(f,gp(d,a,b,c),2);(e=f.h)?e.start():cp(d,new T(2,7,7005));return f.return(e)})};q.Tf=function(){var a=this,b,c,d,e;return I(function(f){b=[];c=t(a.yf);for(d=c.next();!d.done;d=c.next())e=d.value,e.u||b.push(e.destroy());a.yf=[];return x(f,Promise.all(b),0)})}; +function gp(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return I(function(l){if(1==l.g)return d?l.B(2):x(l,fp(a,b),3);2!=l.g&&(d=l.h);if(f=np(a,d))return l.return(null);g=!1;h=!0;e&&(a.s&&a.Ea==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=mp(a,b,c,d||null,!e,g,h);k=e?k.then(function(m){m.A=!1;return m}):k.then(function(m){a.yf.push(m);return m});return l.return(k)})} +function mp(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,v,w,z,y,B,C,D;return I(function(G){if(1==G.g)return h=null,k=ae(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.S&&h.u?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(A,E){l()?h.configure(A,E):a.configure(A,E)},Infinity!=a.ha.width||Infinity!=a.ha.height?G.B(2):x(G,wc(),3);2!=G.g&&(p=G.h,a.ha.width=p.width,a.ha.height=p.height);r=new Qi(k,a.ha,null);u={networkingEngine:a.H, +filter:function(A){var E,F;return I(function(J){if(1==J.g)return x(J,Ri(r,A),2);if(4!=J.g){E=J.h;if(!E)return J.B(0);F=Xo("trackschanged");return x(J,Promise.resolve(),4)}h.dispatchEvent(F);H(J)})},makeTextStreamsForClosedCaptions:function(A){return op(a,A)},onTimelineRegionAdded:function(A){var E=h.J;a:{var F=t(E.g);for(var J=F.next();!J.done;J=F.next())if(J=J.value,J.schemeIdUri==A.schemeIdUri&&J.id==A.id&&J.startTime==A.startTime&&J.endTime==A.endTime){F=J;break a}F=null}null==F&&(E.g.add(A),A= +new S("regionadd",new Map([["region",A]])),E.dispatchEvent(A))},onEvent:function(A){return h.dispatchEvent(A)},onError:function(A){return h.onError(A)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.S&&a.j.updateDuration()},newDrmInfo:function(A){var E=h.l,F=E?E.g:null;F&&E.A&&Ui(r,F.keySystem,A)},onManifestUpdated:function(){var A= +(new Map).set("isLive",a.T());h.dispatchEvent(Xo("manifestupdated",A));cn(h,!1,function(){if(a.u)a.u.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},onMetadata:function(A,E,F,J){var L=A;if("com.apple.hls.interstitial"==A&&(L="com.apple.quicktime.HLS",A={startTime:E,endTime:F,values:J},a.u))a.u.onHLSInterstitialMetadata(a,a.h,A);J=t(J);A=J.next();for(var K={};!A.done;K={Kg:void 0},A=J.next())K.Kg=A.value,"ID"!=K.Kg.name&&cn(h,!1,function(O){return function(){pp(a, +E,F,L,O.Kg)}}(K))},disableStream:function(A){return a.disableStream(A,a.g.streaming.maxDisabledTime)},addFont:function(A,E){return a.addFont(A,E)}};v=new Pl(function(){return a.xa()});v.addEventListener("regionadd",function(A){var E=A.region;qp(a,"timelineregionadded",E,h);cn(h,!1,function(){a.u&&(a.u.onDashTimedMetadata(E),a.u.onDASHInterstitialMetadata(a,a.h,E))})});w=null;k.streaming.observeQualityChanges&&(w=new Ql(function(){return a.Vb()}),w.addEventListener("qualitychange",function(A){rp(a, +A.quality,A.position)}),w.addEventListener("audiotrackchange",function(A){rp(a,A.quality,A.position,!0)}));z=!0;y={ic:a.H,onError:function(A){return h.onError(A)},Ue:function(A){cn(h,!0,function(){a:{var E=A,F=Xo("keystatuschanged");a.dispatchEvent(F);var J=Object.keys(E);1==J.length&&""==J[0]&&(J=["00"],E={"00":E[""]});F=1==J.length&&"00"==J[0];var L=!1;if(J.length){J=t(a.i.variants);for(var K=J.next();!K.done;K=J.next()){K=K.value;var O=[];K.audio&&O.push(K.audio);K.video&&O.push(K.video);O=t(O); +for(var M=O.next();!M.done;M=O.next()){var N=M.value;M=K.allowedByKeySystem;if(N.keyIds.size){K.allowedByKeySystem=!0;N=t(N.keyIds);for(var R=N.next();!R.done;R=N.next())if(R=R.value,(R=E[F?"00":R])||a.C.H)K.allowedByKeySystem=K.allowedByKeySystem&&!!R&&!Wi.includes(R)}M!=K.allowedByKeySystem&&(L=!0)}}}if(L&&(sp(a),!tp(a)))break a;(E=a.j.j)&&!E.allowedByKeySystem&&Go(a)}})},onExpirationUpdated:function(A,E){var F=Xo("expirationupdated");h.dispatchEvent(F);if((F=h.j)&&F.onExpirationUpdated)F.onExpirationUpdated(A, +E)},onEvent:function(A){h.dispatchEvent(A);"drmsessionupdate"==A.type&&z&&(z=!1,A=Date.now()/1E3-h.Ea,(a.A||h.getStats()).j=A,a.M&&bk(a.M))}};B=Do(a,l);zh(a.H,B);C=function(){return a.dd(y)};D={config:k,ek:u,qk:v,pk:w,dd:C,dk:r,networkingEngine:B,Zi:e,Yi:g};h=new bn(b,d,c,D);return G.return(h)})} +function fp(a,b){var c,d;return I(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,x(e,vn(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&kc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}function np(a,b){if(!$b())return!0;if(b){if(""==(a.h||bc()).canPlayType(b))return!1;if(!($b()&&b in Zi))return!0;if(Kf(b))return kc()&&(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} +function up(a){var b=a.g.textDisplayFactory;b!==a.ge&&(a.G=b(),a.G.configure?a.G.configure(a.g.textDisplayer):Bd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.ge=b,a.G.setTextVisibility(a.oa))} +function dp(a){var b,c,d;return I(function(e){if(1==e.g)return $o(a,"media-source"),up(a),b=vp(a.h,a.G,{sj:function(){return a.keySystem()},onMetadata:function(f,g,h){wp(a,f,g,h)}},a.M),b.configure(a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.ha=d,x(e,b.H,2);a.K=b;H(e)})} +function xp(a,b,c){function d(){return yp(a)}a.l.o(b,"playing",d);a.l.o(b,"pause",d);a.l.o(b,"ended",d);a.l.o(b,"ratechange",function(){var e=a.h.playbackRate;0!=e&&(a.L&&a.L.set(e),e=Xo("ratechange"),a.dispatchEvent(e))});b.remote&&(a.l.o(b.remote,"connect",function(){return sp(a)}),a.l.o(b.remote,"connecting",function(){return sp(a)}),a.l.o(b.remote,"disconnect",function(){return I(function(e){if(1==e.g)return a.j&&"disconnected"==b.remote.state?x(e,Lm(a.j),2):e.B(2);sp(a);H(e)})}));b.audioTracks&& +(a.l.o(b.audioTracks,"addtrack",function(){return sp(a)}),a.l.o(b.audioTracks,"removetrack",function(){return sp(a)}),a.l.o(b.audioTracks,"change",function(){return sp(a)}));b.textTracks&&(a.l.o(b.textTracks,"addtrack",function(e){if(e.track)switch(e=e.track,e.kind){case "metadata":zp(a,e);break;case "chapters":Ap(a,e);break;default:sp(a)}}),a.l.o(b.textTracks,"removetrack",function(){return sp(a)}),a.l.o(b.textTracks,"change",function(){return sp(a)}));"none"!=b.preload&&a.l.sa(b,"loadedmetadata", +function(){a.A.G=Date.now()/1E3-c})} +function jp(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E;return I(function(F){switch(F.g){case 1:$o(a,"load"),e=a.h,a.L=new tl({Be:function(){return e.playbackRate},Lc:function(){return e.defaultPlaybackRate},Zg:function(J){e.playbackRate=J},ai:function(J){e.currentTime+=J}}),xp(a,e,b),Io(a,a.g),a.kb=a.g.preferredTextLanguage,a.$d=a.g.preferredTextRole,a.Zd=a.g.preferForcedSubs,Bp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.s.init(function(J,L,K){a.i&&a.j&&J!=a.j.j&& +Cp(a,J,!0,void 0===L?!1:L,void 0===K?0:K)}),a.s.setMediaElement(e),a.s.setCmsdManager(a.aa),a.j=Dp(a),a.j.configure(a.g.streaming),a.m=Ep,a.dispatchEvent(Xo("streaming")),f=c;case 2:(h=a.j.j)||f||(f=tp(a)?a.s.chooseVariant():null);k=[];g=h||f;l=t([g.video,g.audio]);for(m=l.next();!m.done;m=l.next())(n=m.value)&&!n.segmentIndex&&k.push(n.createSegmentIndex());if(!(0z&&(v=z);return x(F,Ip(f,v),9);case 9:y=F.h,p(y);case 8:Cp(a,f,!0,!1,0);case 7:return a.I.ready(),B=a.uc().find(function(J){return J.active}),B||((C=Jg(a.i.textStreams,a.kb,a.$d,a.Zd)[0]||null)&&Bl(a.A.h,C,!0), +f&&(C?(Jp(a,f.audio,C)&&(a.oa=!0),a.oa&&a.G.setTextVisibility(!0),Kp(a)):a.oa=!1),C&&(a.g.streaming.alwaysStreamText||a.Sc())&&rm(a.j,C)),x(F,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),Lp(a));sp(a);tp(a);a.i.variants.some(function(J){return J.primary});if((D=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)G=function(){return Mp(a)},a.l.o(e,"timeupdate",G);D||(A=function(){return Np(a)}, +a.l.o(e,"timeupdate",A),Np(a),a.i.nextUrl&&(0, 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.'),m.resolve()),a.l.sa(d,"error",function(){m.reject(bp(a))}),x(v,Yf(a.g.streaming.loadTimeout,m),2);if((n=a.T())&&(a.g.streaming.liveSync&& +a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return Mp(a)},a.l.o(d,"timeupdate",p);n||(r=function(){return Np(a)},a.l.o(d,"timeupdate",r),Np(a));a.u&&(a.u.onManifestUpdated(n),n&&(u=a.xa().end,a.l.o(d,"progress",function(){var w=a.xa().end;u!=w&&(a.u.onManifestUpdated(a.T()),u=w)})));a.ra=!0;H(v)})}function Qp(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Rg(b,a.g.preferredVariantRole)} +function Sp(a){var b=a.g.preferredTextLanguage;""!=b&&a.Sg(b,a.g.preferredTextRole,a.g.preferForcedSubs)} +function zp(a,b){if("metadata"==b.kind){b.mode="hidden";a.l.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,pp(a,e.startTime,e.endTime,e.type,e.value),a.u)a.u.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={pc:void 0},f=e.next())g.pc=f.value,"com.apple.quicktime.HLS"==g.pc.type&&null!=g.pc.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.pc.startTime&&k.endTime==h.pc.endTime}}(g)), +f||(f={startTime:g.pc.startTime,endTime:g.pc.endTime,values:[]},d.push(f)),f.values.push(g.pc.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:0!=e.startTime||a.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.u.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new Zb(function(){var d=Tp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Sa().X(.5); +a.Xd.push(function(){c.stop()})}}function wp(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof 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())pp(a,f,g,"org.id3",k.value);if(a.u)a.u.onHlsTimedMetadata(e,f)}}function pp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Xo("metadata",b))} +function Ap(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Zb(function(){b.mode="hidden"})).Sa().X(.5);a.Xd.push(function(){c.stop()})}}q.wk=function(){for(var a=this.V;a.g;)a.release()};q.dd=function(a){return new fi(a)}; +function Do(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?cn(b(),!0,e):e()}b||(b=function(){return null});return new vh(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(Xo("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;ku);if(w){var z=w.next().value;if(z&&z!=m){if(!Rd(m.R(),z.R())){var y=z.R()[0],B=f.uris[0],C=new URL(y),D=new URL(B);if(C.origin!==D.origin)var G=y;else{for(var A=C.pathname.split("/").slice(1),E=D.pathname.split("/").slice(1,-1);A[0]===E[0];)A.shift(),E.shift();for(;E.length;)E.shift(),A.unshift("..");G=A.join("/")}n.nor=G}if((z.$a||z.La)&&(m.$a!=z.$a||m.La!=z.La)){var F=z.$a+"-";z.La&&(F+=z.La);n.nrr=F}}}var J=h.h.Ua()||1,L=qo(h,r.type)|| +500,K=r.bandwidth;var O=K?K*(m.endTime-m.startTime)/1E3/(L/J/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}p&&n.ot!==no&&(n.tb=ro(h,n.ot)/1E3);ho(h,f,n)}}catch(M){$a("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:ho(h,f,{ot:"k"});break;case 4:ho(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.A;g&&(g.Hc=isNaN(g.Hc)?f:g.Hc+f,0===e&&(g.Wh=f))}})} +function Fp(a,b){return new kl(a.h,a.i,a.g.streaming,b,function(){a.Db&&wl(a.Db,!0);a.j&&a.j.wd();a.O&&Up(a)},function(c){return a.dispatchEvent(c)})} +function Gp(a,b){b=new qn(a.yc,a.T()||0=a.h.duration-1}break;case Ep:a:if(a.isEnded()||ik(a.K))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.sc();var d=kj(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=mj(a.h.buffered,a.h.currentTime);c=a.O;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?fh:gh;c.g=d;(b=b!=d)&&d===fh&&(c.h=Date.now());b&&ep(a)}function vp(a,b,c,d){return new dk(a,b,c,d)} +function Co(a){return new Tn({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Vb:function(){return a.Vb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Ua:function(){return a.Ua()},Jb:function(){return a.Jb()},Lb:function(){return a.Lb()},T:function(){return a.T()}},a.g.cmcd)} +function Dp(a){return new cm(a.i,{Kd:function(){return a.I?a.I.ke():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Ua:function(){return a.Ua()},na:a.K,ic:a.H,onError:function(b){return cp(a,b)},onEvent:function(b){return a.dispatchEvent(b)},kk:function(){a.J&&a.J.update&&a.J.update()},Gg:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=Tc){if(a.I){a.I.bi();var f=nk(a.K,e);!a.T()&&a.h.paused&&null!=f&&0=b)return 1;if(!(a<=this.h.currentTime)&&a=Math.floor(e.end)&&c.bd():Math.floor(d)<=Math.floor(e.start+f)&&c.bd()}))}; +q.bd=function(){var a=this.L.Lc();this.m==Pp&&this.L.set(a);this.m==Ep&&(this.L.set(a),this.s.playbackRateChanged(a),om(this.j,!1));this.Ja.Za()}; +q.Lb=function(){if(this.i&&!this.eb()){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,Hg(e)){var f=yg(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 Gg(g)}):[]}; +q.uc=function(){if(this.i&&!this.eb()){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=zg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Op(this).map(function(f){return Eg(f)}):[]};q.ye=function(){var a=this.be;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Ag(b)})}; +q.dj=function(a){var b=this,c,d,e,f;return I(function(g){if(1==g.g){if(b.m!=Ep&&b.m!=Pp)return g.return(null);c=b.be;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):x(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Ub(function(h){var k=Wp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Ic;for(var l=h.j-h.startTime,m=0;ma(f,b))&&(c=f);c!=b&&(c?(a=yg(c),this.df(a,!0,d)):Go(this))}else this.h&&this.h.audioTracks&&(d=Jg(this.Lb(),a,b||"",!1)[0])&&this.df(d)};q.Sg=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.I&&!this.eb()){if(this.kb=a,this.$d=b||"",this.Zd=c,(a=Jg(this.i.textStreams,this.kb,this.$d,this.Zd)[0]||null)&&a!=this.j.u&&(Bl(this.A.h,a,!1),this.g.streaming.alwaysStreamText||this.Sc()))rm(this.j,a),Xp(this)}else(a=Jg(this.uc(),a,b||"",c)[0])&&this.Tg(a)}; +q.Gk=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.I&&!this.eb()){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.Ia=new Vg(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,""),Go(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&&Yp(this, +b)}};q.Sc=function(){var a=this.oa;return this.G?this.G.isTextVisible():a};q.Jh=function(){return this.h&&this.h.src&&this.h.textTracks?aq(this).map(function(a){return Eg(a)}):[]}; +q.kg=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=ad(a),c=aq(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}; +function Op(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Tp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function aq(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})} +q.gf=function(a){a=!!a;this.oa!=a&&(this.oa=a,this.m==Ep?(this.G.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=Jg(this.i.textStreams,this.kb,this.$d,this.Zd),01E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency, +a.S=Math.max(a.S-(g-f)/2,f+d),a.Ha=Date.now());e&&null!==a.S&&(h=a.S+d,k=a.S-d);g=c.end-a.h.currentTime;d=0;a.m==Pp&&(e=a.h.buffered,0h?(b!=l&&a.Fc(l,!1),a.Ha=null):void 0!=k&&m&&g-de)&&a.zfb&&(b+=Math.pow(2,32)),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}function Bp(a,b,c){0=this.xa().end};P("shaka.Player",W);W.prototype.isEnded=W.prototype.isEnded;W.prototype.isRemotePlayback=W.prototype.eb;W.prototype.addFont=W.prototype.addFont;W.prototype.setVideoContainer=W.prototype.ah;W.prototype.getFetchedPlaybackInfo=W.prototype.pj; +W.prototype.getManifestParserFactory=W.prototype.wj;W.prototype.getManifest=W.prototype.mg;W.prototype.retryStreaming=W.prototype.Pg;W.prototype.setMaxHardwareResolution=W.prototype.Mk;W.prototype.addChaptersTrack=W.prototype.Ti;W.prototype.addThumbnailsTrack=W.prototype.Vi;W.prototype.addTextTrackAsync=W.prototype.Ui;W.prototype.getStats=W.prototype.getStats;W.prototype.getBufferedInfo=W.prototype.Vb;W.prototype.getSegmentAvailabilityDuration=W.prototype.Ce; +W.prototype.getPresentationStartTimeAsDate=W.prototype.Nh;W.prototype.getPlayheadTimeAsDate=W.prototype.Aj;W.prototype.setTextTrackVisibility=W.prototype.gf;W.prototype.getChapters=W.prototype.kg;W.prototype.getChaptersTracks=W.prototype.Jh;W.prototype.isTextTrackVisible=W.prototype.Sc;W.prototype.selectVariantsByLabel=W.prototype.Gk;W.prototype.selectTextLanguage=W.prototype.Sg;W.prototype.selectAudioLanguage=W.prototype.Rg;W.prototype.getTextLanguages=W.prototype.Fj; +W.prototype.getAudioLanguages=W.prototype.ej;W.prototype.getTextLanguagesAndRoles=W.prototype.Gj;W.prototype.getAudioLanguagesAndRoles=W.prototype.fj;W.prototype.selectVariantTrack=W.prototype.df;W.prototype.selectTextTrack=W.prototype.Tg;W.prototype.getThumbnails=W.prototype.og;W.prototype.getAllThumbnails=W.prototype.dj;W.prototype.getImageTracks=W.prototype.ye;W.prototype.getTextTracks=W.prototype.uc;W.prototype.getVariantTracks=W.prototype.Lb;W.prototype.cancelTrickPlay=W.prototype.bd; +W.prototype.trickPlay=W.prototype.Fc;W.prototype.getPlaybackRate=W.prototype.Ua;W.prototype.isBuffering=W.prototype.Ge;W.prototype.getKeyStatuses=W.prototype.ze;W.prototype.getActiveSessionsMetadata=W.prototype.jg;W.prototype.getExpiration=W.prototype.Jd;W.prototype.drmInfo=W.prototype.drmInfo;W.prototype.keySystem=W.prototype.keySystem;W.prototype.isFullyLoaded=W.prototype.Sh;W.prototype.goToLive=W.prototype.Pj;W.prototype.seekRange=W.prototype.xa;W.prototype.isAudioOnly=W.prototype.Pc; +W.prototype.isInProgress=W.prototype.Qc;W.prototype.isLive=W.prototype.T;W.prototype.getAdManager=W.prototype.xe;W.prototype.getAssetUri=W.prototype.hd;W.prototype.getNetworkingEngine=W.prototype.Jb;W.prototype.getMediaElement=W.prototype.zj;W.prototype.getManifestType=W.prototype.Ae;W.prototype.getLoadMode=W.prototype.jd;W.prototype.resetConfiguration=W.prototype.Ak;W.prototype.getBufferFullness=W.prototype.Ih;W.prototype.getNonDefaultConfiguration=W.prototype.Mh;W.prototype.getConfiguration=W.prototype.getConfiguration; +W.prototype.configure=W.prototype.configure;W.prototype.releaseAllMutexes=W.prototype.wk;W.prototype.destroyAllPreloads=W.prototype.Tf;W.prototype.preload=W.prototype.preload;W.prototype.detachAndSavePreload=W.prototype.Eh;W.prototype.unloadAndSavePreload=W.prototype.Rk;W.prototype.load=W.prototype.load;W.prototype.updateStartTime=W.prototype.Vk;W.prototype.unload=W.prototype.mc;W.prototype.detach=W.prototype.detach;W.prototype.attachCanvas=W.prototype.ph;W.prototype.attach=W.prototype.$b; +W.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:b={};if(!a){k.B(2);break}return x(k,Ni(),3);case 3:b=k.h;case 2:var l={};if($b())for(var m in Zi)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]=$b()?!!Zi[n]:ac(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(ha(zf)); +l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Mf(n)?!0:$b()?xd(n)||(sf(n)?!0:!1):ac(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return x(k,wc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=hq;for(h in g)f[h]=g[h]();return k.return(f)}})};W.isBrowserSupported=Zo;W.setAdManagerFactory=function(a){Eo=a};W.registerSupportPlugin=function(a,b){hq[a]=b};W.prototype.destroy=W.prototype.destroy;var Yo=0,Ao=1,Ep=2,Pp=3; +W.LoadMode={DESTROYED:Yo,NOT_LOADED:Ao,MEDIA_SOURCE:Ep,SRC_EQUALS:Pp};W.version="v4.11.21";var iq=["4","11"];Cd=new function(a){this.g=a;this.i=Dd;this.h=Ed}(new Ad(Number(iq[0]),Number(iq[1])));var hq={},Eo=null;function jq(){this.g=[];this.i=this.l=this.j=this.h=0}function kq(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function lq(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=lq.prototype;q.needsSkipUI=function(){return!1};q.isClientRendering=function(){return!0};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};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)}; +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)}; +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()}; +q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",lq);lq.prototype.release=lq.prototype.release; +lq.prototype.getPodIndex=lq.prototype.getPodIndex;lq.prototype.getTimeOffset=lq.prototype.getTimeOffset;lq.prototype.getMediaUrl=lq.prototype.getMediaUrl;lq.prototype.getAdvertiserName=lq.prototype.getAdvertiserName;lq.prototype.getCreativeAdId=lq.prototype.getCreativeAdId;lq.prototype.getAdId=lq.prototype.getAdId;lq.prototype.getVastMediaWidth=lq.prototype.getVastMediaWidth;lq.prototype.getVastMediaHeight=lq.prototype.getVastMediaHeight;lq.prototype.getVastMediaBitrate=lq.prototype.getVastMediaBitrate; +lq.prototype.getDescription=lq.prototype.getDescription;lq.prototype.getTitle=lq.prototype.getTitle;lq.prototype.getPositionInSequence=lq.prototype.getPositionInSequence;lq.prototype.getSequenceLength=lq.prototype.getSequenceLength;lq.prototype.setMuted=lq.prototype.setMuted;lq.prototype.resize=lq.prototype.resize;lq.prototype.isLinear=lq.prototype.isLinear;lq.prototype.isMuted=lq.prototype.isMuted;lq.prototype.setVolume=lq.prototype.setVolume;lq.prototype.getVolume=lq.prototype.getVolume; +lq.prototype.play=lq.prototype.play;lq.prototype.pause=lq.prototype.pause;lq.prototype.skip=lq.prototype.skip;lq.prototype.canSkipNow=lq.prototype.canSkipNow;lq.prototype.getTimeUntilSkippable=lq.prototype.getTimeUntilSkippable;lq.prototype.isSkippable=lq.prototype.isSkippable;lq.prototype.isPaused=lq.prototype.isPaused;lq.prototype.getRemainingTime=lq.prototype.getRemainingTime;lq.prototype.getMinSuggestedDuration=lq.prototype.getMinSuggestedDuration;lq.prototype.getDuration=lq.prototype.getDuration; +lq.prototype.isClientRendering=lq.prototype.isClientRendering;lq.prototype.needsSkipUI=lq.prototype.needsSkipUI;function mq(){} +function nq(a,b){var c=[],d=0;null!=b&&(d=b);a=t(le(a,"Ad"));for(var e=a.next();!e.done;e=a.next())if(e=re(e.value,"InLine"))if(e=re(e,"Creatives")){e=t(le(e,"Creative"));for(var f=e.next();!f.done;f=e.next()){var g=re(f.value,"Linear");if(g&&(f=null,g.attributes.skipoffset&&(f=$d(g.attributes.skipoffset),isNaN(f)&&(f=null)),g=re(g,"MediaFiles"))){var h=le(g,"MediaFile");g=h;h=h.filter(function(k){return"streaming"==k.attributes.delivery});h.length&&(g=h);g=g.sort(function(k,l){return(parseInt(l.attributes.height,10)|| +0)-(parseInt(k.attributes.height,10)||0)});g=t(g);for(h=g.next();!h.done;h=g.next())if(h=me(h.value)){c.push({id:null,startTime:d,endTime:null,uri:h,isSkippable:null!=f,skipOffset:f,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1});break}}}}return c}P("shaka.ads.Utils",mq);mq.ADS_LOADED="ads-loaded";mq.AD_STARTED="ad-started";mq.AD_FIRST_QUARTILE="ad-first-quartile";mq.AD_MIDPOINT="ad-midpoint";mq.AD_THIRD_QUARTILE="ad-third-quartile"; +mq.AD_COMPLETE="ad-complete";mq.AD_STOPPED="ad-stopped";mq.AD_SKIPPED="ad-skipped";mq.AD_VOLUME_CHANGED="ad-volume-changed";mq.AD_MUTED="ad-muted";mq.AD_PAUSED="ad-paused";mq.AD_RESUMED="ad-resumed";mq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";mq.CUEPOINTS_CHANGED="ad-cue-points-changed";mq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";mq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";mq.AD_CLICKED="ad-clicked";mq.AD_PROGRESS="ad-progress";mq.AD_BUFFERING="ad-buffering"; +mq.AD_IMPRESSION="ad-impression";mq.AD_DURATION_CHANGED="ad-duration-changed";mq.AD_CLOSED="ad-closed";mq.AD_LOADED="ad-loaded";mq.ALL_ADS_COMPLETED="all-ads-completed";mq.AD_LINEAR_CHANGED="ad-linear-changed";mq.AD_METADATA="ad-metadata";mq.AD_RECOVERABLE_ERROR="ad-recoverable-error";mq.AD_ERROR="ad-error";mq.AD_BREAK_READY="ad-break-ready";mq.AD_INTERACTION="ad-interaction";mq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";mq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested"; +mq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function oq(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.11.21");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m, +google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){pq(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){qq(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.sa(this.i,"play",function(){f.H=!0})}oq.prototype.configure=function(a){this.s=a};oq.prototype.stop=function(){this.g&&this.g.stop();this.u&&In(this.u)}; +oq.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 qq(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new S("ad-error",b));rq(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))} +function pq(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", +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)))}sq(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,tq(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,tq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth, +a.i.offsetHeight,tq(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,tq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.s.skipPlayDetection?a.g.start():a.h.sa(a.i,"play",function(){a.H=!0;a.g.start()})}catch(f){rq(a,null)}} +function tq(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1} +function sq(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){qq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){uq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){uq(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, +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){rq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){rq(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")}); +a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")}); +a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g, +google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})} +function uq(a,b){var c=b.getAd();c?(a.j=new lq(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.s.supportsMultipleMediaElements||a.l(new S("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new S("ad-started",b)),a.j.isLinear()&&(a.u.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Za("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")} +function rq(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.s.supportsMultipleMediaElements&&a.l(new S("ad-content-resume-requested"));a.l(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function vq(a,b,c,d,e,f){this.g=a;this.h=b;this.j=c;this.l=d;this.m=e;this.i=f}q=vq.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!0};q.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.h}; +q.getTimeUntilSkippable=function(){if(this.h){var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)}return Math.max(this.getRemainingTime(),0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.l()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};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!0}; +q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.m};q.getPositionInSequence=function(){return this.i};q.getTitle=function(){return""};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return""};q.getCreativeAdId=function(){return""};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null}; +q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.g=null};P("shaka.ads.InterstitialAd",vq);vq.prototype.release=vq.prototype.release;vq.prototype.getPodIndex=vq.prototype.getPodIndex;vq.prototype.getTimeOffset=vq.prototype.getTimeOffset;vq.prototype.getMediaUrl=vq.prototype.getMediaUrl;vq.prototype.getAdvertiserName=vq.prototype.getAdvertiserName;vq.prototype.getCreativeAdId=vq.prototype.getCreativeAdId;vq.prototype.getAdId=vq.prototype.getAdId; +vq.prototype.getVastMediaWidth=vq.prototype.getVastMediaWidth;vq.prototype.getVastMediaHeight=vq.prototype.getVastMediaHeight;vq.prototype.getVastMediaBitrate=vq.prototype.getVastMediaBitrate;vq.prototype.getDescription=vq.prototype.getDescription;vq.prototype.getTitle=vq.prototype.getTitle;vq.prototype.getPositionInSequence=vq.prototype.getPositionInSequence;vq.prototype.getSequenceLength=vq.prototype.getSequenceLength;vq.prototype.setMuted=vq.prototype.setMuted;vq.prototype.resize=vq.prototype.resize; +vq.prototype.isLinear=vq.prototype.isLinear;vq.prototype.isMuted=vq.prototype.isMuted;vq.prototype.setVolume=vq.prototype.setVolume;vq.prototype.getVolume=vq.prototype.getVolume;vq.prototype.play=vq.prototype.play;vq.prototype.pause=vq.prototype.pause;vq.prototype.skip=vq.prototype.skip;vq.prototype.canSkipNow=vq.prototype.canSkipNow;vq.prototype.getTimeUntilSkippable=vq.prototype.getTimeUntilSkippable;vq.prototype.isSkippable=vq.prototype.isSkippable;vq.prototype.isPaused=vq.prototype.isPaused; +vq.prototype.getRemainingTime=vq.prototype.getRemainingTime;vq.prototype.getMinSuggestedDuration=vq.prototype.getMinSuggestedDuration;vq.prototype.getDuration=vq.prototype.getDuration;vq.prototype.isClientRendering=vq.prototype.isClientRendering;vq.prototype.needsSkipUI=vq.prototype.needsSkipUI;function wq(a,b,c,d){function e(){if(!f.J&&f.j&&!f.C.eb()){f.j=f.g.currentTime;f.l&&!f.l.pre&&!f.l.post&&f.j=w&&(f.u.has(u)||f.u.set(u,f.h.preload(u.uri)));B.B(4);break}if(!f.u.has(u)){B.B(7);break}return x(B,f.u.get(u),8);case 8:(z=B.h)&&z.destroy(),f.u.delete(u);case 7:y=JSON.stringify(u),f.K.has(y)&&f.K.delete(y),f.G.delete(u),l=!0;case 4:r=p.next();B.B(3);break;case 5:l&&Aq(f),H(B)}})})).Ba(1)}wq.prototype.configure=function(a){this.O=a;Bq(this)}; +function Bq(a){if(a.I&&a.O&&!a.J){var b=a.O.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.A==b&&(a.A=!b,a.A?(a.m=a.g,a.H&&(a.H.parentElement&&a.I.removeChild(a.H),a.H=null)):(a.H||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.backgroundColor="rgb(0, 0, 0)",b.setAttribute("playsinline",""),a.H=b),a.m=a.H))}} +wq.prototype.stop=function(){this.s&&this.s.Za();this.K.clear();this.G.clear();this.h.Tf();this.u.clear();this.h.detach();this.J=!1;this.l=this.j=null};wq.prototype.release=function(){this.stop();this.L&&this.L.release();this.s&&this.s.release();this.I&&In(this.I);this.M&&(this.M.stop(),this.M=null);this.P&&(this.P.stop(),this.P=null);this.h.destroy()};function Cq(a,b){var c;I(function(d){if(1==d.g)return zq(a),x(d,Dq(a,b),2);c=d.h;c.length?Eq(a,c):Za("Unsupported HLS interstitial",b);H(d)})} +wq.prototype.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return c={type:12},x(n,Fq(b,a,c),2);case 2:d=n.h;e=de(d,"VAST,vmap:VMAP");if(!e)throw new T(2,10,10007);f=[];if("VAST"==e.tagName){f=nq(e,b.j);n.B(3);break}if("vmap:VMAP"!=e.tagName){n.B(3);break}for(var p=[],r=t(le(e,"vmap:AdBreak")),u=r.next();!u.done;u=r.next()){var v=u.value,w=v.attributes.timeOffset;w&&(u=null,"start"==w?u=0:"end"==w?u=Infinity:u=$d(w),(v=re(v,"vmap:AdSource"))&& +(v=re(v,"vmap:AdTagURI"))&&(v=me(v))&&p.push({time:u,uri:v}))}g=t(p);h=g.next();case 5:if(h.done){n.B(3);break}k=h.value;return x(n,Fq(b,k.uri,c),8);case 8:l=n.h;m=de(l,"VAST");if(!m)throw new T(2,10,10007);f.push.apply(f,ha(nq(m,k.time)));h=g.next();n.B(5);break;case 3:Eq(b,f),H(n)}})}; +function Eq(a,b){var c=!1;b=t(b);for(var d=b.next();!d.done;d=b.next()){d=d.value;var e=d.id||JSON.stringify(d);if(!a.K.has(e)){c=!0;a.K.add(e);a.G.add(d);e=!1;if(d.pre&&null==a.j)e=!0;else if(0==d.startTime&&!d.canJump)e=!0;else if(null!=a.j){var f=d.startTime-a.j;0=f&&(e=!0)}e&&(a.u.has(d)||a.u.set(d,a.h.preload(d.uri)))}}c&&Aq(a)} +function xq(a,b,c){b=void 0===b?!1:b;c=void 0===c?null:c;var d=0,e=null;if(a.G.size&&null!=a.j){var f=a.g.ended,g=Array.from(a.G).sort(function(m,n){return n.startTime-m.startTime}),h=g;h=b?g.filter(function(m){return m.pre}):f?g.filter(function(m){return m.post}):g.filter(function(m){return!m.pre&&!m.post});g=t(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.j-Math.round(1E3*h.startTime)/1E3;0=l||!h.canJump)&&(k=null== +c&&a.l&&!a.l.pre&&!a.l.post&&a.l.startTime>=h.startTime?!1:!0)}k&&(!a.l||h.startTime>=a.l.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001Math.abs(A.startTime-b.startTime)}).length);b.once&&(f++,a.G.delete(b),Aq(a));a.J=!0;if(!a.A||1!=d){G.B(2);break}a.i(new S("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new lh;k=function(A){return I(function(E){if(1== +E.g)return"detach"!=A.state?E.B(0):sc()?x(E,new Promise(function(F){return(new Zb(F)).X(.1)}),3):E.B(3);h.resolve();a.s.Ma(a.C,"onstatechange",k);H(E)})};a.s.o(a.C,"onstatechange",k);return x(G,h,2);case 2:return a.A||(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.g.currentTime+=b.resumeOffset)),l=!1,m=null,n=function(){if(!a.A&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&Infinity!=b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var A=Date.now();a.g.currentTime+= +(A-e)/1E3;e=A}},p=function(){var A,E;return I(function(F){if(1==F.g){n();m&&m.stop();if(A=xq(a,b.pre,d-f))return a.i(new S("ad-stopped")),a.s.Za(),yq(a,A,c,++d,e,f),F.B(0);b.post&&(a.j=null,a.l=null);return a.A?x(F,a.h.detach(),4):x(F,a.h.mc(),4)}a.A&&(E=b.resumeOffset,null==E&&(E=b.timelineRange&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.j||0):(Date.now()-e)/1E3),a.i(new S("ad-content-resume-requested",(new Map).set("offset",E))));a.i(new S("ad-stopped"));a.s.Za();a.J=!1;a.A?Aq(a):(n(),a.g.ended|| +a.g.play());Bq(a);H(F)})},r=function(A){return I(function(E){if(l)return E.return();l=!0;a.i(new S("ad-error",(new Map).set("originalEvent",A)));return x(E,p(),0)})},u=function(){return I(function(A){if(1==A.g){if(l)return A.return();l=!0;return x(A,p(),2)}a.i(new S("ad-complete"));H(A)})},v=function(){return I(function(A){if(l)return A.return();l=!0;a.i(new S("ad-skipped"));return x(A,p(),0)})},w=new vq(a.m,b.isSkippable,b.skipOffset,v,c,d),a.A||(w.setMuted(a.g.muted),w.setVolume(a.g.volume)),a.i(new S("ad-started", +(new Map).set("ad",w))),w.canSkipNow()&&a.i(new S("ad-skip-state-changed")),z=new Set,a.s.sa(a.h,"error",r),a.s.o(a.m,"timeupdate",function(){var A=a.m.duration;A&&(b.isSkippable&&b.skipOffset&&w.canSkipNow()&&0=A.playRangeEnd?u():a.i(new S("ad-paused"))}),a.s.o(a.m,"volumechange",function(){a.m.muted?a.i(new S("ad-muted")):a.i(new S("ad-volume-changed"))}),ua(G,4),zq(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(y=b.endTime-b.startTime,0d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.O.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}} +function Oq(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.G,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),Qq(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),Qq(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),Qq(a,"thirdQuartile"));d=a.g.getRemainingTime(); +e=a.g.getDuration();a.g.canSkipNow()&&0=d||d>e)&&Iq(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;fb){if(a.O.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Iq(a);a.M=e;a.g=new Gq(g,f+1,e.ads.length,!0,a.h);a.G=g;0===f&&Qq(a,"breakStart");Rq(a);break}}}if(!a.g)for(d= +t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;fb&&(a.h.currentTime=a.A),a.A=null)}}} +function Iq(a){if(a.g){for(;a.C.lastChild;)a.C.removeChild(a.C.firstChild);a.K||a.O.push(a.G.adId);var b=a.g.m;(void 0===b?0:b)?Qq(a,"skip"):Qq(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.s.Ma(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Qq(a,"breakEnd");a.g=null;a.G=null;a.M=null}} +function Rq(a){var b=!1;a.h.paused?b=!0:(Qq(a,"impression"),Qq(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Qq(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Qq(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Qq(a,"impression"),Qq(a,"start"),b=!1):Qq(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Qq(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target, +d.type,d.listener)} +function Qq(a,b){var c=a.G.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.M.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=t(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&""!=e&&(e=Ah([e],jh()),e.method="POST",a.L.request(7,e,d))}switch(b){case "impression":a.i(new S("ad-impression"));break;case "start":a.i(new S("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new S("ad-muted"));break;case "unmute":a.i(new S("ad-volume-changed"));break; +case "resume":a.i(new S("ad-resumed"));break;case "pause":a.i(new S("ad-paused"));break;case "firstQuartile":a.i(new S("ad-first-quartile"));break;case "midpoint":a.i(new S("ad-midpoint"));break;case "thirdQuartile":a.i(new S("ad-third-quartile"));break;case "complete":a.i(new S("ad-complete"));a.i(new S("ad-stopped"));break;case "skip":a.i(new S("ad-skipped"));a.i(new S("ad-stopped"));break;case "breakStart":a.C.setAttribute("ad-active","true");break;case "breakEnd":a.C.removeAttribute("ad-active"); +break;case "skipStateChanged":a.i(new S("ad-skip-state-changed"))}};function Sq(a,b){this.g=a;this.i=null;this.h=b}q=Sq.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!1};q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()}; +q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){}; +q.setMuted=function(a){this.h.muted=a};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 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()}; +q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};P("shaka.ads.ServerSideAd",Sq);Sq.prototype.release=Sq.prototype.release; +Sq.prototype.getPodIndex=Sq.prototype.getPodIndex;Sq.prototype.getTimeOffset=Sq.prototype.getTimeOffset;Sq.prototype.getMediaUrl=Sq.prototype.getMediaUrl;Sq.prototype.getAdvertiserName=Sq.prototype.getAdvertiserName;Sq.prototype.getCreativeAdId=Sq.prototype.getCreativeAdId;Sq.prototype.getAdId=Sq.prototype.getAdId;Sq.prototype.getVastMediaWidth=Sq.prototype.getVastMediaWidth;Sq.prototype.getVastMediaHeight=Sq.prototype.getVastMediaHeight;Sq.prototype.getVastMediaBitrate=Sq.prototype.getVastMediaBitrate; +Sq.prototype.getDescription=Sq.prototype.getDescription;Sq.prototype.getTitle=Sq.prototype.getTitle;Sq.prototype.getPositionInSequence=Sq.prototype.getPositionInSequence;Sq.prototype.getSequenceLength=Sq.prototype.getSequenceLength;Sq.prototype.setMuted=Sq.prototype.setMuted;Sq.prototype.resize=Sq.prototype.resize;Sq.prototype.isLinear=Sq.prototype.isLinear;Sq.prototype.isMuted=Sq.prototype.isMuted;Sq.prototype.setVolume=Sq.prototype.setVolume;Sq.prototype.getVolume=Sq.prototype.getVolume; +Sq.prototype.play=Sq.prototype.play;Sq.prototype.pause=Sq.prototype.pause;Sq.prototype.skip=Sq.prototype.skip;Sq.prototype.canSkipNow=Sq.prototype.canSkipNow;Sq.prototype.getTimeUntilSkippable=Sq.prototype.getTimeUntilSkippable;Sq.prototype.isSkippable=Sq.prototype.isSkippable;Sq.prototype.isPaused=Sq.prototype.isPaused;Sq.prototype.getRemainingTime=Sq.prototype.getRemainingTime;Sq.prototype.getMinSuggestedDuration=Sq.prototype.getMinSuggestedDuration;Sq.prototype.getDuration=Sq.prototype.getDuration; +Sq.prototype.isClientRendering=Sq.prototype.isClientRendering;Sq.prototype.needsSkipUI=Sq.prototype.needsSkipUI;function Tq(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.I=!1;this.A=this.m=this.s=null;this.C="";this.G=[];this.h=new rd;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Uq(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length? +e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Sq(f,e.l);e.A&&(e.m.i=e.A);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active"); +var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new S("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new S("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new S("ad-third-quartile"))}); +this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new S("ad-complete"));e.i(new S("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G= +f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=Tq.prototype;q.configure=function(){};q.stop=function(){this.C="";this.s=null;this.G=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.G}; +function Uq(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.I||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function Vq(){hb.call(this);this.g=this.i=this.j=this.h=null;this.m=new jq;this.s=navigator.language;this.l=null}qa(Vq,hb);q=Vq.prototype;q.setLocale=function(a){this.s=a};q.configure=function(a){this.l=a;this.h&&this.h.configure(this.l);this.j&&this.j.configure(this.l);this.g&&this.g.configure(this.l)};q.initInterstitial=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new wq(a,b,c,function(e){return Wq(d,e)});this.h.configure(this.l)}; +q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.j&&this.j.release();this.j=new oq(a,b,this.s,c,function(e){return Wq(d,e)});this.j.configure(this.l)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);hb.prototype.release.call(this)}; +q.onAssetUnload=function(){this.h&&this.h.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.dispatchEvent(new S("ad-content-attach-requested"));this.m=new jq};q.requestClientSideAds=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.I=Date.now()/1E3;b.m.requestAds(a)}; +q.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};q.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Hq(a,b,c,function(e){return Wq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new T(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new lh,Kq(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a}; +q.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new T(1,10,10005);var b=this.i;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 Tq(a,b,this.s,function(d){return Wq(c,d)});this.g.configure(this.l)}; +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)&&Za('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.11.21";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&& +(c.I=!0),c.j=new lh,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)&&Za('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.11.21";this.g.g.replaceAdTagParameters(a)}; +q.getServerSideCuePoints=function(){Bd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:kq(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)}; +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.onHLSInterstitialMetadata=function(a,b,c){this.h||this.initInterstitial(null,a,b);this.h&&Cq(this.h,c)}; +q.onDASHInterstitialMetadata=function(a,b,c){if("urn:mpeg:dash:event:alternativeMPD:2022"==c.schemeIdUri&&(this.h||this.initInterstitial(null,a,b),this.h)){a=this.h;b=t(c.eventNode.children);for(var d=b.next();!d.done;d=b.next()){var e=d.value;if("AlternativeMPD"==e.tagName&&(d=e.attributes.uri,e=e.attributes.mode,d)){var f=d;var g=e;break}}f?(b="replace"==g,g="insert"==g,(b||g)&&Eq(a,[{id:c.id,startTime:c.startTime,endTime:c.endTime,uri:f,isSkippable:!1,skipOffset:null,canJump:!0,resumeOffset:g? +0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:b&&!g}])):Za("Unsupported MPD alternate",c)}};q.addCustomInterstitial=function(a){if(!this.h)throw new T(1,10,10006);Eq(this.h,[a])};q.addAdUrlInterstitial=function(a){if(!this.h)throw new T(1,10,10006);return this.h.addAdUrlInterstitial(a)}; +function Wq(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",Vq);Vq.prototype.addAdUrlInterstitial=Vq.prototype.addAdUrlInterstitial;Vq.prototype.addCustomInterstitial=Vq.prototype.addCustomInterstitial;Vq.prototype.onDASHInterstitialMetadata=Vq.prototype.onDASHInterstitialMetadata; +Vq.prototype.onHLSInterstitialMetadata=Vq.prototype.onHLSInterstitialMetadata;Vq.prototype.onCueMetadataChange=Vq.prototype.onCueMetadataChange;Vq.prototype.onHlsTimedMetadata=Vq.prototype.onHlsTimedMetadata;Vq.prototype.onDashTimedMetadata=Vq.prototype.onDashTimedMetadata;Vq.prototype.onManifestUpdated=Vq.prototype.onManifestUpdated;Vq.prototype.getStats=Vq.prototype.getStats;Vq.prototype.getCuePoints=Vq.prototype.getCuePoints;Vq.prototype.getServerSideCuePoints=Vq.prototype.getServerSideCuePoints; +Vq.prototype.replaceServerSideAdTagParameters=Vq.prototype.replaceServerSideAdTagParameters;Vq.prototype.requestServerSideStream=Vq.prototype.requestServerSideStream;Vq.prototype.initServerSide=Vq.prototype.initServerSide;Vq.prototype.addMediaTailorTrackingUrl=Vq.prototype.addMediaTailorTrackingUrl;Vq.prototype.requestMediaTailorStream=Vq.prototype.requestMediaTailorStream;Vq.prototype.initMediaTailor=Vq.prototype.initMediaTailor;Vq.prototype.updateClientSideAdsRenderingSettings=Vq.prototype.updateClientSideAdsRenderingSettings; +Vq.prototype.requestClientSideAds=Vq.prototype.requestClientSideAds;Vq.prototype.onAssetUnload=Vq.prototype.onAssetUnload;Vq.prototype.release=Vq.prototype.release;Vq.prototype.initClientSide=Vq.prototype.initClientSide;Vq.prototype.initInterstitial=Vq.prototype.initInterstitial;Vq.prototype.configure=Vq.prototype.configure;Vq.prototype.setLocale=Vq.prototype.setLocale;Vq.ADS_LOADED="ads-loaded";Vq.AD_STARTED="ad-started";Vq.AD_FIRST_QUARTILE="ad-first-quartile";Vq.AD_MIDPOINT="ad-midpoint"; +Vq.AD_THIRD_QUARTILE="ad-third-quartile";Vq.AD_COMPLETE="ad-complete";Vq.AD_STOPPED="ad-stopped";Vq.AD_SKIPPED="ad-skipped";Vq.AD_VOLUME_CHANGED="ad-volume-changed";Vq.AD_MUTED="ad-muted";Vq.AD_PAUSED="ad-paused";Vq.AD_RESUMED="ad-resumed";Vq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Vq.CUEPOINTS_CHANGED="ad-cue-points-changed";Vq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Vq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Vq.AD_CLICKED="ad-clicked";Vq.AD_PROGRESS="ad-progress"; +Vq.AD_BUFFERING="ad-buffering";Vq.AD_IMPRESSION="ad-impression";Vq.AD_DURATION_CHANGED="ad-duration-changed";Vq.AD_CLOSED="ad-closed";Vq.AD_LOADED="ad-loaded";Vq.ALL_ADS_COMPLETED="all-ads-completed";Vq.AD_LINEAR_CHANGED="ad-linear-changed";Vq.AD_METADATA="ad-metadata";Vq.AD_RECOVERABLE_ERROR="ad-recoverable-error";Vq.AD_ERROR="ad-error";Vq.AD_BREAK_READY="ad-break-ready";Vq.AD_INTERACTION="ad-interaction";Vq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Vq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested"; +Vq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Eo=function(){return new Vq};function Xq(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof +TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(nj(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=ArrayBuffer.isView(c)&&1===c.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})} +function Yq(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Zq(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})} +function Zq(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}} +var $q="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ar="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),br=["loop","playbackRate"],cr=["pause","play"],dr={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2, +isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1,isEnded:1},er={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},fr={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},gr=[["getConfiguration","configure"]],hr=[["isTextTrackVisible","setTextTrackVisibility"]],ir="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "), +jr=["attach","attachCanvas","detach","load","unload"];function kr(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new Zb(b);this.M=c;this.u=!1;this.A=d;this.H=e;this.O=f;this.h=this.m=!1;this.K="";this.s=null;this.C=function(){return lr(h)};this.G=function(k,l){k=Yq(l);switch(k.type){case "event":var m=k.targetName,n=Ua(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.M(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category, +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;mr.add(this)}q=kr.prototype;q.destroy=function(){mr.delete(this);nr(this);or&&pr(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.Ye=function(){return this.K}; +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(mr),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new lh;d.u=!0;qr(d,e)}},function(b){for(var c=t(mr),d=c.next();!d.done;d=c.next())d=d.value,rr="available"==b,d.l.Sa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});rr&&this.l.X(sr);(a=or)&& +a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new lh,this.u=!0,qr(this,a)):or=null}else window.__onGCastApiAvailable!==tr&&(ur=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=tr)};q.Ug=function(a){this.s=a;this.h&&vr(this,{type:"appData",appData:this.s})}; +q.cast=function(){var a=this;return I(function(b){if(!a.m)throw new T(1,8,8E3);if(!rr)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new lh;chrome.cast.requestSession(function(c){return qr(a,c)},function(c){return wr(a,c)});return x(b,a.j,0)})};function xr(a){a.h&&chrome.cast.requestSession(function(b){return qr(a,b)},function(b){return wr(a,b)})}q.gd=function(){if(this.h){nr(this);if(or){pr(this);try{or.stop(function(){},function(){})}catch(a){}or=null}lr(this)}}; +q.get=function(a,b){var c=this;if("video"==a){if(cr.includes(b))return function(){return c.li.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))}}else if("player"==a){if(fr[b]&&!this.get("player","isLive")())return function(){};if(ir.includes(b))return function(){return c.li.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(jr.includes(b))return function(){return c.xk.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(dr[b]||er[b])return function(){return c.g[a][b]}}return this.g[a][b]}; +q.set=function(a,b,c){this.g[a][b]=c;vr(this,{type:"set",targetName:a,property:b,value:c})};function qr(a,b){var c=a.O();or=b;b.addUpdateListener(a.C);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);lr(a);vr(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function wr(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))} +q.li=function(a,b){vr(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};q.xk=function(a,b){var c=Ga.apply(2,arguments),d=new lh,e=this.J.toString();this.J++;this.i[e]=d;try{vr(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function pr(a){var b=or;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)} +function lr(a){var b=or?"connected"==or.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};nr(a)}a.h=b;a.K=b?or.receiver.friendlyName:"";a.l.Sa()}function nr(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function vr(a,b){b=Xq(b);var c=or;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new T(2,8,8005,d),c=new S("error",(new Map).set("detail",b)),a.A("player",c),a.gd(),b;}}var sr=.02,rr=!1,or=null,ur=null,mr=new Set; +function tr(a){ur?window.__onGCastApiAvailable=ur:delete window.__onGCastApiAvailable;ur=null;if(a)for(var b=t(mr),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function yr(a,b,c,d){d=void 0===d?!1:d;hb.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 kr(c,function(){return zr(e)},function(){return Ar(e)},function(f,g){return Br(e,f,g)},function(){return Cr(e)},function(){return Dr(e)},d);Er(this)}qa(yr,hb);q=yr.prototype; +q.destroy=function(a){a&&this.g.gd();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;hb.prototype.release.call(this);return Promise.all(a)};q.vc=function(){return this.l};q.kd=function(){return this.u};q.Jf=function(){return this.g.m&&rr};q.Ra=function(){return this.g.Ra()};q.Ye=function(){return this.g.Ye()}; +q.cast=function(){var a=this;return I(function(b){return 1==b.g?x(b,a.g.cast(),2):a.h?x(b,a.h.mc(),0):b.return()})};q.Ug=function(a){this.g.Ug(a)};q.Hi=function(){xr(this.g)};q.gd=function(){this.g.gd()}; +q.xh=function(a,b){b=void 0===b?!1:b;var c=this;return I(function(d){if(1==d.g){if(a==c.G&&b==c.C)return d.return();c.G=a;c.C=b;c.g.gd();return x(d,c.g.destroy(),2)}c.g=null;c.g=new kr(a,function(){return zr(c)},function(){return Ar(c)},function(e,f){return Br(c,e,f)},function(){return Cr(c)},function(){return Dr(c)},b);c.g.init();H(d)})}; +function Er(a){a.g.init();a.m=new rd;for(var b=t($q),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ra()||(f=Ua(f),a.j.dispatchEvent(f))});for(var d in Wa)a.m.o(a.h,Wa[d],function(f){a.g.Ra()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={Rd:b.Rd},b.Rd=e,Object.defineProperty(a.l,b.Rd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Fr(a,f.Rd)}}(b),set:function(f){return function(g){var h=f.Rd;a.g.Ra()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};Gr(a, +function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Hr(a,f)}})});Ir(a);a.j=new hb;a.j.ee=a.l;a.s=new hb;a.s.ee=a.u}function Ir(a){var b=new Map;Gr(a,function(c,d){b.has(d)?(d=b.get(d),c.length=e)return null;for(var f=-1,g=-1,h=0;hc||127c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;eb;b++)a.i.push(zs())}function zs(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function As(a,b){Bs(a)&&(a.i[a.h][a.g]=new fs(b,a.G,a.A,a.u,a.C),a.g++)}function Bs(a){var b=a.gc;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=zs()} +function Ds(a,b,c){var d=new Me(a.j,b,"");d.textAlign=0===a.H?"left":1===a.H?"right":Pe;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?Md:2;switch(a.I){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX= +50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=cs(d,"svc"+c,a.i,a.j,b))a.j=b;return c}xs.prototype.display=function(){this.l=!0};function Es(){this.i=[];this.h=null;this.g=0}function Fs(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0this.h.length)throw new T(2,2,3E3);this.g+=a}; +Gs.prototype.ni=function(a){if(0>this.g-a)throw new T(2,2,3E3);this.g-=a};function Is(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null} +function Js(a,b,c,d){if(!a.g)return null;if(24==c)return c=Hs(b).value,d=Hs(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),As(a.g,String.fromCharCode(parseInt(c,16))),null;b=a.g;var e=null;switch(c){case 8:!Bs(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=Ds(b,d,a.i));b.h+1>=b.s?Cs(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=Ds(b,d,a.i));b.i[b.h]=zs();b.g=0;break;case 12:b.isVisible()&& +(e=Ds(b,d,a.i)),ys(b),b.h=0,b.g=0}return e} +function Ks(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Hs(b).value;b=null;c=t(Ls(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ds(e,d,a.i)),ys(e);return b}if(137===c)for(b=Hs(b).value,b=t(Ls(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=Hs(b).value;b=null;c=t(Ls(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ds(e,d,a.i)),e.l=!1;return b}if(139===c){c=Hs(b).value; +b=null;c=t(Ls(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Ds(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Hs(b).value,Ms(a,b,d);if(143===c)return d=Ms(a,255,d),Ns(a),d;if(144===c)b.skip(1),d=Hs(b).value,a.g&&(a.g.A=0<(d&128),a.g.G=0<(d&64));else if(145===c)d=Hs(b).value,c=Hs(b).value,b.skip(1),a.g&&(b=Os((c&48)>>4,(c&12)>>2,c&3),a.g.C=Os((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=Hs(b).value,b=Hs(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1), +b.skip(1),d=Hs(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new xs(c,a.i);f.j=d;a.h[c]=f}d=Hs(b).value;f=Hs(b).value;var g=Hs(b).value,h=Hs(b).value,k=Hs(b).value;b=Hs(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.A=!1,b.C="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.M=f&127;b.J=g;b.I=(h&240)>>4;b.L=0<(f&128);b.s=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null} +function Ls(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Ms(a,b,c){var d=null;b=t(Ls(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Ds(f,c,a.i));a.h[e]=null}return d}function Ns(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Os(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Ps[a<<2|b<<1|c]} +var Qs=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Ps="black blue green cyan red magenta yellow white".split(" ");function Rs(){this.h=[];this.g=[];this.i=new Es;this.l=0;this.m=new Map([["CC1",new rs(0,0)],["CC2",new rs(0,1)],["CC3",new rs(1,0)],["CC4",new rs(1,1)]]);this.u=this.s=0;this.j=new Map;this.C=!0;this.A=new Set;Ss(this)}Rs.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Ss(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Ns(b.value)}; +function Ss(a){a.s=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,hs(c.i),hs(c.j),hs(c.s);a.C=!0} +Rs.prototype.extract=function(a,b){if(this.C){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new Nh(a,0);if(!(8>a.getLength())&&181===a.Z()&&49===a.Aa()&&1195456820===a.U()&&3===a.Z()&&(c=a.Z(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d>2,g=a.Z(),h=a.Z();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Bb:g,ac:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}}; +Rs.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Ts(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Fs(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Us(this,d.value),b.push.apply(b,ha(d));this.i.i=[];this.h=[];this.g=[];return b}; +function Ts(a,b){var c=b.type;if(16===(b.Bb&112)){var d=b.Bb>>3&1;0===c?a.s=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.s))+1);c=a.m.get(d);if(255===b.Bb&&255===b.ac||!b.Bb&&!b.ac||!Vs(b.Bb)||!Vs(b.ac))return 45<=++a.l&&Ss(a),null;a.l=0;b.Bb&=127;b.ac&=127;var e=b.Bb;if(1<=e&&15>=e||!b.Bb&&!b.ac)return null;e=null;if(16===(b.Bb&112))a:{a.A.add(d),d=b.Bb;a=b.ac;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f= +null;var g=95=g?d=ws[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,qs(g,c,1+g.g-g.h,g.h),ks(g,0,c-1),ks(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.u=f,g.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ls(c.g,0,32),d=!1,b=ws[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=vs[(a& +14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))ls(c.g,1,a);else if(18===(d&246)&&32===(a&224))ls(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.ac){case 32:ts(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=ss(c,2,a);break;case 38:d=ss(c,3,a);break;case 39:d=ss(c,4,a);break;case 40:ls(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:hs(c.s);us(c);break;case 43:us(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=is(b,c.l,a));ks(b,0,15);break;case 45:b= +c.g;3!==c.h?d=null:(d=is(b,c.l,a),e=b.g-b.h+1,qs(b,e-1,e,b.h),ks(b,0,e-1),ks(b,b.g,15-b.g),c.l=a);break;case 46:ks(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=is(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,ts(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.A=a-32)}e=null}else a=b.ac,ls(c.g,0,b.Bb),ls(c.g,0,a);return e} +function Us(a,b){var c=[];try{for(;b.Ga();){var d=Hs(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Hs(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Is(e));for(var g=a.j.get(e),h=b.Oa();b.Oa()-h=m)var r=Js(e,k,m,n);else if(128<=m&&159>=m)r=Ks(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m& +255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&(127===k?As(e.g,"\u266a"):As(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&As(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(Qs.has(k)){var u=Qs.get(k);As(e.g,u)}else As(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?As(e.g,"_"):As(e.g,"[CC]"));r=null}(e=r)&&c.push(e)}}}}catch(v){if(v instanceof T&&3E3===v.code)$a("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data."); +else throw v;}return c}function Vs(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}Rs.prototype.getStreams=function(){return Array.from(this.A)};P("shaka.cea.CeaDecoder",Rs);Kd=function(){return new Rs};function Ws(a){for(var b=[],c=a,d=a=0;d>1&63;r=39==r||40==r;break;case ct:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,lc.byteLength){c=[];break a}var f=Hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function kt(a){a=t(qe(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return me(c)}return""} +function lt(a){var b=se(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=me(b)))return b;a=se(a.node,"urn:microsoft:playready","pro");if(!a||!me(a))return"";a=me(a);a=Jc(a);a=jt(a).filter(function(c){return c.type===mt})[0];if(!a)return"";a=zc(a.value,!0);return(a=ee(a,"WRMHEADER"))?kt(a):""} +function ht(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.vd];if(h){var k;if((k=se(g.node,"urn:microsoft:playready","pro"))&&me(k)){k=me(k);k=Jc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:ei(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.vd){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2, +172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:ei(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Oc(h,b,g.init||a||k||l);if(h=nt.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function ft(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=ot(c.value))&&b.push(c);return b} +function ot(a){var b=a.attributes.schemeIdUri,c=ve(a,"urn:mpeg:cenc:2013","default_KID"),d=te(a,"urn:mpeg:cenc:2013","pssh").map(pe),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Jc(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,vd:b,keyId:c,init:0w)if(r){r=ue(r,"t",Ce);if(null== +r)break;else if(u>=r)break;w=Math.ceil((r-u)/v)-1}else{if(Infinity==a)break;else if(u/f>=a)break;w=Math.ceil((a*f-u)/v)-1}0>>31;p&=2147483647;var u=g.reader.U();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new fj(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 yt(a){this.h=Nb(a);this.g=new Nh(this.h,0)}yt.prototype.Ga=function(){return this.g.Ga()}; +function zt(a){var b=At(a);if(7Number.MAX_SAFE_INTEGER&&(R=BigInt(O)*BigInt(N));M+=p;O=M+v;N=Math.min(O,m());var Q=[],Y=b.ik;if(Y)for(var ia=(N-M)/Y,X={},ja=0;jam()&&!M.length?null:M})}return Promise.resolve(J)} +function Vt(a,b){var c=a.N.Fe;c||(c=rt(a,Ut,"initialization"));if(!c)return null;c=Fc(c);var d=a.N.id,e=a.bandwidth||null,f=a.N.cb,g=a.Gb;b=new dj(function(){var h=pt(c,d,null,null,e,null);return Nc(f(),[h],g())},0,null,Ht(a),null,null,b);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;return b}function $t(a,b,c,d,e,f,g,h,k,l){pl.call(this,[]);this.h=a;this.H=b;this.C=c;this.G=d;this.J=e;this.j=f;this.l=g;this.u=h;this.A=k;this.I=l;au(this)}qa($t,pl);q=$t.prototype; +q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){pl.prototype.release.call(this);this.h=null};q.Ya=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}}; +function Zt(a,b,c,d,e){bu(a,e);if(a.h){c=a.h.timeline;a.h.xc!==b.xc&&(a.h.xc=b.xc);if(c.length){var f=c[c.length-1];b=b.timeline.filter(function(g){return g.end>f.end})}else b=b.timeline.slice();0=a.l||0>=d.end||b.push(d);a.h.timeline=b;a.Ya(a.j)}} +q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a=this.l)return null;for(var c=b.length-1,d=0;d=f&&aa||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Fk,f=d.kh+this.h.jh;c=this.j-this.h.Bc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],p=(d.end-d.start)/d.Xb,r={},u=0;uh&&a.j.delete(f);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 ob(k.location)).bc))return!1;return!0});d.length&&(a.C=d[0].Jg);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(g=b.get(g.value))a.C=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Nc(a.i,d)};function ju(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.s=!1;this.m=new Set}q=ju.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=this.s=!1;this.m.clear()};q.Mj=function(){return this.l};q.ng=function(){return this.j.slice()};q.qj=function(){return this.i}; +q.Dh=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Tc)for(c=t(this.j),d=c.next();!d.done;d=c.next())d= +d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}}; +function ku(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[lu(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[mu(n),n]})),l=new Map(h.textStreams.map(function(n){return[nu(n),n]}));h=new Map(h.imageStreams.map(function(n){return[ou(n),n]}));if(b){var m=pu(Tc);l.set(nu(m),m);m=pu("image");h.set(ou(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{rh:c,Oi:d,Ii:e,Qh:f}} +q.Nf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M,N,R,Q;return I(function(Y){if(1==Y.g){e=Xc;if(!b&&1==a.length)return f=ku(a,!1),g=f.rh,h=f.Oi,k=f.Ii,l=f.Qh,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),Y.B(2);m=c?d.m.size:0;n=-1;for(p=0;p=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 x(L,xu(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(v=u.value,w=t(v),z=w.next();!z.done;z=w.next())y=z.value,(B=yu(a,y,c,e,f,h))&&b.push(B);C=t(h);for(D=C.next();!D.done;D= +C.next())for(G=D.value,A=t(G),E=A.next(),F={};!E.done;F={bh:void 0},E=A.next())if(F.bh=E.value,!zu(F.bh)&&(J=b.some(function(K){return function(O){return Au(a,K.bh,O)}}(F))))throw new T(2,4,4037);return L.return(b)}})}function xu(a,b,c,d,e,f,g){return I(function(h){if(1==h.g)return Bu(a,c,b,0d)return!0;if(ed.length)return!0;if(e.lengthd)return!0;if(ed.length)return!0;if(e.lengtha){if(c<=a||c-ab-a)return Pu}else{if(c>a)return Pu;if(a-ca-b)return Pu}return Ru}function Qu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return aw&&v>u&&a.O++;null==v&&(v=u);if(!(null!==a.P&&null!==r&&null!==p&&p< +a.P)||a.G.includes(r)||l+1==d.length){null!==p&&(null===a.P||p>a.P)&&(a.P=p);k=pv(a,b,c,{start:p,duration:v,node:m,Th:null==v||!n});h.push(k);b.Ca.id&&v&&(a.oa[b.Ca.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(z){return z.id});return null!=f?{periods:h,duration:f+g,Fh:!1}:{periods:h,duration:k,Fh:!0}} +function ev(a){var b=Object.keys(a.C).filter(function(f){return!a.G.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.C[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.Dh(a.s[e],c),delete a.s[e];delete a.C[c]}} +function pv(a,b,c,d){b.Ca=qv(a,d.node,null,c);b.wa=d;b.Ca.sb=b.sb;b.Ca.id||(b.Ca.id="__shaka_period_"+d.start);var e=le(d.node,"EventStream");c=b.presentationTimeline.Cb();e=t(e);for(var f=e.next();!f.done;f=e.next())rv(a,d.start,d.duration,f.value,c);c=le(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=sv(a,e)))b.Gb=e;c=le(d.node,"AdaptationSet").map(function(l,m){return tv(a,b,m,l)}).filter(Xf);if(b.cc){d= +[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.zk);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);}d=c.filter(function(l){return!l.ih});c=c.filter(function(l){return l.ih});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ih.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next();!k.done;k=h.next())Lg(k.value,e.streams)}}c=uv(a.g.disableAudio,d,"audio");e=uv(a.g.disableVideo, +d,"video");f=uv(a.g.disableText,d,Tc);d=uv(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.Ca.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function uv(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,ha(e.streams));return d},[])} +function tv(a,b,c,d){function e(L){var K=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];K&&L&&(L=Nc(b.ua.cb(),[L],b.Gb()),a.j.addFont(K,L[0]))}function f(L){switch(L){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(L){switch(L){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=qv(a,d,b.Ca,null);b.ua.position=c;var h=!1;c=le(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(Xf), +l=void 0,m=b.ua.contentType==Tc;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var p=n.attributes.schemeIdUri;if(null==p||"urn:mpeg:dash:role:2011"==p)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=le(d,"EssentialProperty");c=null;var u=!1;n=null;p=!1;r=t(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==w)c=v.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"== +w)var z=g(parseInt(v.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==w)var y=f(parseInt(v.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:"urn:dvb:dash:fontdownload:2014"==w?e(v):"urn:mpeg:dash:urlparam:2014"==w?(n=sv(a,v))||(p=!0):p=!0)}if(p)return null;var B=null;p=le(d,"SupplementalProperty");p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,v=r.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"== +v?B=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?z=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v?y=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==v?e(r):"urn:mpeg:dash:urlparam:2014"==v&&(n=sv(a,r));n&&(b.Gb=n);n=le(d,"Accessibility");var C=new Map,D;n=t(n);for(p=n.next();!p.done;p=n.next())if(r=p.value,p=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=p||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!= +p||a.g.disableText)"urn:mpeg:dash:role:2011"==p?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==r?D="visually impaired":"2"==r&&(D="hard of hearing"));else if(p=1,null!=r)for(r=t(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var G=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],G=w[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,G=w);C.set(v,ad(G))}else C.set("svc1","und");else if(p=1,null!=r)for(r=r.split(";"),v=t(r),w=v.next();!w.done;w= +v.next()){G=w.value;var A=w=void 0;G.includes("=")?(G=G.split("="),w=G[0].startsWith("CC")?G[0]:"CC"+G[0],A=G[1]||"und"):(w="CC"+p,2==r.length?p+=2:p++,A=G);C.set(w,ad(A))}else C.set("CC1","und");n=le(d,"ContentProtection");var E=et(n,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),F=ad(b.ua.language||"und"),J=b.ua.label;n=le(d,"Representation");d=n.map(function(L){if(L=vv(a,b,E,l,F,J,h,k,C,L,D,B))L.hdr=L.hdr||z,L.colorGamut=L.colorGamut||y,L.fastSwitching=u;return L}).filter(function(L){return!!L}); +if(0==d.length){c="image"==b.ua.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new T(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=wv(d[0].mimeType,d[0].codecs),m=t(d),p=m.next();!p.done;p=m.next())p.value.type=b.ua.contentType;m=b.ua.id||"__fake__"+a.Da++;p=t(d);for(r=p.next();!r.done;r=p.next()){r=r.value;v=t(E.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(ha(w.keyIds),ha(r.keyIds))): +w.keyIds||r.keyIds;a.g.dash.enableAudioGroups&&(r.groupId=m)}n=n.map(function(L){return L.attributes.id}).filter(Xf);return{id:m,contentType:b.ua.contentType,language:F,gm:h,streams:d,drmInfos:E.drmInfos,ih:c,zk:n}} +function sv(a,b){if((b=se(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&ue(b,"useMPDUrlQuery",Ee,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.$:c.split("&").map(function(d){if("$querypart$"==d)return a.$;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new ub(a.$)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null} +function vv(a,b,c,d,e,f,g,h,k,l,m,n){b.N=qv(a,l,b.ua,null);var p=b.N.id;a.aa=Math.min(a.aa,b.N.sb);a.ka=0a.L)){var c=a.L;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.M.X(Math.max(c-b,od(a.ra)))}} +function qv(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Te:null,audioSamplingRate:null,sb:0,cf:0};d=d||c.cb;var e=b.attributes.id,f=le(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=pe(m);l&&m&&(hu(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(pe));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=ve(b, +"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=Yl(m).join(",");n=ue(b,"frameRate",Fe)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=zv(le(b,"InbandEventStream"),c.emsgSchemeIdUris),u=le(b,"AudioChannelConfiguration");u=Av(u)||c.Te;var v=ue(b,"audioSamplingRate",Ce)||c.audioSamplingRate;k||(k=wv(l,m));var w=re(b,"SegmentBase"),z=re(b,"SegmentTemplate"),y=w?ue(w,"availabilityTimeOffset",De)||0:0,B=z?ue(z,"availabilityTimeOffset",De)||0:0,C=f&&f.length?ue(f[0],"availabilityTimeOffset", +De)||0:0;y=c.sb+C+y+B;B=null;(C=re(b,"SegmentSequenceProperties"))&&(C=re(C,"SAP"))&&(B=ue(C,"cadence",Ae));C=b.attributes.label;var D=le(b,"Label");D&&D.length&&(D=D[0],me(D)&&(C=me(D)));return{cb:function(){return Nc(d(),f.length?a.h&&h?iu(a.h,e):g?g:[]:[])},xd:w||c.xd,kc:re(b,"SegmentList")||c.kc,Cc:z||c.Cc,width:ue(b,"width",Ce)||c.width,height:ue(b,"height",Ce)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,Te:u,audioSamplingRate:v, +sb:y,Fe:null,cf:B||c.cf,label:C||null}}function zv(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} +function Av(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b, +16);if(!b)continue;for(var d=0,e=0;ec}).map(pe).filter(Xf);return d.length?Nc(a.A,d):[]}P("shaka.dash.DashParser",Wu);Zi["application/dash+xml"]=function(){return new Wu};Zi["video/vnd.mpeg.dash.mpd"]=function(){return new Wu};function Cv(){}P("shaka.dependencies",Cv);Cv.has=function(a){return Dv.has(a)};Cv.add=function(a,b){if(!Ev[a])throw Error(a+" is not supported");a==Fv?Bd("mux.js","mux.js is no longer used in Shaka Player."):Dv.set(a,function(){return b})};var Fv="muxjs",Ev={hm:Fv,ISOBoxer:"ISOBoxer"};Cv.Allowed=Ev;var Dv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Gv(a,b,c){this.type=a;this.ea=b;this.segments=c||null}function Hv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Hv.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);0b.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;1a.K))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,vw(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.K-d.Uf,0d-2&&(e=Math.max(1,d-2));for(e=d-e;ea.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.zi(0);a.l.Vg(c);a.l.Xc(!1)} +function nx(a,b,c,d,e){var f=Qv(c,"EXT-X-MAP");if(!f)return null;var g=Lv(f,"URI"),h=Sv(d(),g,e);g=[h.toString(),Kv(f,"BYTERANGE","")].join("-");if(!a.za.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?Zw(Lv(m,"METHOD"))&&m.idK?1:0}),c=0;cn))continue}if(null==n){var u=Kv(g,"DURATION")|| +Kv(g,"PLANNED-DURATION");if(u){var v=parseFloat(u);isNaN(v)||(n=m+v);if(0>l-f+v)continue}}var w=Kv(g,"CLASS")||"com.apple.quicktime.HLS",z="YES"==Kv(g,"END-ON-NEXT");if(null==n&&z){for(var y=c+1;yl){n=Math.max(0,D-f);break}}}if(null==n)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var G=[],A=t(g.attributes),E=A.next();!E.done;E=A.next()){var F= +E.value;if(!y.includes(F.name)){var J=Uv(F.value,d);if("X-ASSET-URI"==F.name||"X-ASSET-LIST"==F.name)J=Sv(e(),F.value,d)[0];G.push({key:F.name,description:"",data:J,mimeType:null,pictureType:null})}}if(1c.byteLength){c=[];break a}var f=Hb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function wx(a){if(a=xx(a))a:{a=t(qe(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=re(b.value,"LA_URL")){a=me(b);break a}a=""}else a="";return a} +function xx(a){a=Jc(me(a));a=vx(a).filter(function(b){return b.type===yx})[0];if(!a)return null;a=zc(a.value,!0);return(a=ee(a,"WRMHEADER"))?a:null}var yx=1,zx=(new Map).set("com.microsoft.playready",wx).set("com.microsoft.playready.recommendation",wx).set("com.microsoft.playready.software",wx).set("com.microsoft.playready.hardware",wx);function Ax(a){if(!Bx){Bx=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Cx=Dx("ftyp",b,d,b,c);b=Dx("dref",Ex);Fx=Dx("dinf",b)}this.g=a} +function Gx(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=Dx;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/(Hx+1));m=Math.floor(m%(Hx+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(ha(Ix(h,4)),[0,0,0,0],ha(Ix(n,4)),ha(Ix(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],ha(Ix(k,2)),[0,0],ha(Ix(l, +2)),[0,0]));h=Dx("tkhd",h);k=Dx;n=g.duration*g.timescale;l=Math.floor(n/(Hx+1));n=Math.floor(n%(Hx+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(ha(Ix(g.timescale,4)),ha(Ix(l,4)),ha(Ix(n,4)),ha(Ix(m,2)),[0,0]));l=Dx("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Jx;break;case "audio":m=Kx}n=Dx("hdlr",m);a:{switch(g.type){case "video":g=Dx("minf",Dx("vmhd",Lx),Fx,Mx(g));break a; +case "audio":g=Dx("minf",Dx("smhd",Nx),Fx,Mx(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Mc.apply(Gc,ha(b));f=a.g[0];c=Dx;d=f.duration*f.timescale;e=Math.floor(d/(Hx+1));d=Math.floor(d%(Hx+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(ha(Ix(f.timescale,4)),ha(Ix(e,4)),ha(Ix(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,255]));e=Dx("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(ha(Ix(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Dx("trex",k),h.call(g,k);a=Mc.apply(Gc,ha(d));a=Dx("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=Mc.apply(Gc,ha(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Cx.byteLength+ +a.byteLength);b.set(Cx);b.set(a,Cx.byteLength);return b} +function Mx(a){var b=Dx,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>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g>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(ha(Ix(c,2)),ha(Ix(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=Px(a);g=new Uint8Array([]); +a.encrypted&&(g=ey(a),d="encv");c=Dx(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=ey(a),d="enca"); +a=Dx(d,fy(a),c,e)}c=a}a=Dx("stsd",gy,c);return b("stbl",a,Dx("stts",hy),Dx("stsc",iy),Dx("stsz",jy),Dx("stco",ky))}function Px(a){if(!a.Va&&!a.Wa)return new Uint8Array([]);var b=a.Wa;a=new Uint8Array([].concat(ha(Ix(a.Va,4)),ha(Ix(b,4))));return Dx("pasp",a)}function fy(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(ha(Ix(a.stream.audioSamplingRate||44100,2)),[0,0]))} +function ey(a){var b=Dx;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e>8*b&255);return c}function Ox(a){for(var b=new Uint8Array(a.length/2),c=0;c>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;cA)if(E){E=ue(E,"t",Ce);if(null==E)break;else if(F>=E)break;A=Math.ceil((E-F)/J)-1}else{if(Infinity==y)break;else if(F/w>=y)break;A=Math.ceil((y*w-F)/J)-1}for(E=0;E<=A;++E)D=F+J,C.push({start:F/w,end:D/w,kh:F}),F=D}w=C;z=t(z);for(y=z.next();!y.done;y=z.next())(y=ry(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Tc||a.g.disableText||m.push(y):n.push(y):r.push(y))}p=[];r= +t(0>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; +b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function vy(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 wy(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""} +function xy(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={hf:void 0},g=e.next())h.hf=g.value,d.push(new fj(h.hf.start,h.hf.end,function(k){return function(){return Nc(a.l,[f.replace("{start time}",String(k.hf.kh))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",oy);var ty="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),sy={CAPT:"main",SUBT:"alternate",DESC:"main"}; +Zi["application/vnd.ms-sstr+xml"]=function(){return new oy};function yy(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=Bc(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function zy(){} +function Ay(a,b,c,d,e,f){var g=new By;Lh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new Cy,k={vh:!1,Ki:!1};a=Dy(a,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new mh(a,function(){k.vh=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new Zb(function(){k.Ki=!0;h.abort()});l.X(b/1E3);a.finally(function(){l.stop()})}return a} +function Dy(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,v,w,z,y,B,C;return I(function(D){switch(D.g){case 1:return k=Ey,l=Fy,n=new ArrayBuffer(0),r=p=0,u=Date.now(),ua(D,2),x(D,k(a,c),4);case 4:m=D.h;f(Gy(m.headers));if("HEAD"==c.method){D.B(5);break}v=m.clone().body.getReader();z=(w=m.headers.get("Content-Length"))?parseInt(w,10):0;y=function(G){function A(){var E,F,J,L;return I(function(K){switch(K.g){case 1:return ua(K,2),x(K,v.read(),4);case 4:E=K.h;wa(K,3);break;case 2:return xa(K),K.return();case 3:if(E.done){K.B(5); +break}p+=E.value.byteLength;if(!g){K.B(5);break}return x(K,g(E.value),5);case 5:F=Date.now();J=p-r;if(100=h||E.done)L=E.done?0:z-p,e(F-u,J,L),r=p,u=F;E.done?G.close():(G.enqueue(E.value),A());H(K)}})}A()};new l({start:y});return x(D,m.arrayBuffer(),6);case 6:n=D.h;case 5:wa(D,3);break;case 2:B=xa(D);if(d.vh)throw new T(1,1,7001,a,b);if(d.Ki)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,B,b);case 3:return C=Gy(m.headers),D.return(yy(C,n,m.status,a,m.url,b))}})} +function Gy(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Hy(){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",zy);zy.isSupported=Hy;zy.parse=Ay;var Ey=window.fetch,Cy=window.AbortController,Fy=window.ReadableStream,By=window.Headers; +Hy()&&(wh("http",Ay,2,!0),wh("https",Ay,2,!0),wh("blob",Ay,2,!0));function Iy(){} +function Jy(a,b,c,d,e,f){var g=new Ky,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;g.onabort=function(){n(new T(1,1,7001,a,c))};var p=!1;g.onreadystatechange=function(){if(2==g.readyState&&!p){var u=Ly(g);e(u);p=!0}};g.onload=function(u){var v=Ly(g),w=g.response;try{d(Date.now()-h,u.loaded-k,0);var z=yy(v,w,g.status,a,g.responseURL,c);m(z)}catch(y){n(y)}};g.onerror= +function(u){n(new T(1,1,1002,a,u,c))};g.ontimeout=function(){n(new T(1,1,1003,a,c))};g.onprogress=function(u){var v=Date.now(),w=f.minBytesForProgressEvents||0,z=u.loaded-k;if(100=w||u.lengthComputable&&u.loaded==u.total)d(v-h,z,4==g.readyState?0:u.total-u.loaded),k=u.loaded,h=v};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(),b.headers[r]);g.send(b.body)});return new mh(l,function(){g.abort();return Promise.resolve()})} +function Ly(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",Iy);Iy.parse=Jy;var Ky=window.XMLHttpRequest;wh("http",Jy,1,!0);wh("https",Jy,1,!0);wh("blob",Jy,1,!0);function My(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ny(a){var b=a.ec();return b?Ic(b):a.R().map(function(c){return"{"+encodeURI(c)+"}"}).join("")+":"+a.$a+":"+a.La}function Oy(a,b){return bm(a.g.R(),a.g.$a,a.g.La,b.streaming.retryParameters)};function Py(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function Qy(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}Py.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function Ry(a){return 0==a.i?0:a.j/a.i};function Sy(a){var b=this;this.s=a;this.i=new Map;this.h=new Jh(function(){return Ty(b).catch(function(){})});this.j=[];this.m=function(){};this.l=function(){};this.g=new Py}Sy.prototype.destroy=function(){return this.h.destroy()};function Uy(a,b,c){a.m=b;a.l=c}function Ty(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)} +function Vy(a,b,c,d,e,f){Kh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return I(function(u){if(1==u.g)return x(u,Wy(a,c),2);h=u.h;if(a.h.g)throw new T(2,9,7001);if(e)for(m in k=Hb(h),l=new di(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);a.m(Ry(a.g),a.g.g);return u.return(f(h))})});a.i.set(b,g)} +function Xy(a,b,c,d,e,f){Kh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new T(2,9,7001);if(e){var h=Hb(c);h=new di(h);for(var k in h.data){var l=Number(k);a.l(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.m(Ry(a.g),a.g.g);return f(c)});a.i.set(b,g)}function Yy(a){return I(function(b){return 1==b.g?x(b,Promise.all(a.i.values()),2):b.return(a.g.g)})} +function Wy(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=Hh,d=a.s.request(c,b),e=function(){return d.abort()},a.j.push(e),x(g,d.promise,2);f=g.h;Pd(a.j,e);return g.return(f.data)})};function Zy(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new lh;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Zy.prototype.abort=function(){var a=this;return I(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ua(b,2);return x(b,a.g,4)}if(2!=b.g)return wa(b,0);xa(b);H(b)})}; +function $y(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return I(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return x(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}Zy.prototype.store=function(){return this.h};Zy.prototype.promise=function(){return this.g};function az(a){this.h=a;this.g=[]}az.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function bz(a,b){return cz(a,b,"readwrite")}function cz(a,b,c){c=a.h.transaction([b],c);var d=new Zy(c,b);a.g.push(d);d.promise().then(function(){Pd(a.g,d)},function(){Pd(a.g,d)});return d};function dz(a,b,c){this.h=new az(a);this.i=b;this.g=c}q=dz.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ez(this.i)};q.removeSegments=function(a,b){return fz(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return I(function(d){if(1==d.g)return x(d,gz(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Bh(e)}))})};q.addManifests=function(){return ez(this.g)}; +q.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function hz(a,b,c){a=bz(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=bz(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 fz(this,this.g,a,b)}; +q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return x(d,gz(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Fd(e)})))})};q.getAllManifests=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=cz(a.h,a.g,"readonly"),c=new Map,x(d,$y(b,function(e,f){var g;return I(function(h){if(1==h.g)return x(h,a.Fd(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?x(d,b.promise(),3):d.return(c)})};q.Bh=function(a){return a};q.Fd=function(a){return Promise.resolve(a)}; +function ez(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 I(function(m){if(1==m.g){d=bz(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={Ng:void 0},h=g.next())l=h.value,k.Ng=e.add(l),k.Ng.onsuccess=function(n){return function(){f.push(n.Ng.result)}}(k);return x(m,d.promise(),2)}return m.return(f)})}; +function fz(a,b,c,d){a=bz(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={yg:void 0},e=c.next())f.yg=e.value,b.delete(f.yg).onsuccess=function(g){return function(){return d(g.yg)}}(f);return a.promise()} +function gz(a,b,c){var d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=cz(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={Ze:void 0,Je:void 0},k=h.next())l.Je=k.value,l.Ze=e.get(l.Je),l.Ze.onsuccess=function(n){return function(){void 0==n.Ze.result&&g.push(n.Je);f[n.Je]=n.Ze.result}}(l);return x(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 iz(a){this.g=new az(a)}iz.prototype.destroy=function(){return this.g.destroy()};iz.prototype.getAll=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=cz(a.g,"session-ids","readonly"),c=[],x(d,$y(b,function(e,f){c.push(f)}),2)):3!=d.g?x(d,b.promise(),3):d.return(c)})};iz.prototype.add=function(a){var b=bz(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()}; +iz.prototype.remove=function(a){var b=this,c;return I(function(d){return 1==d.g?(c=bz(b.g,"session-ids"),x(d,$y(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):x(d,c.promise(),0)})};function jz(){this.g=new Map}jz.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)};jz.prototype.init=function(){var a=this;kz.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)}; +function lz(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ob:d,ab:f},ab:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function mz(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ob:d,ab:f},e)})})} +function nz(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 oz(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function pz(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()} +function qz(a){var b,c,d;return I(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0b;if(!k||!l){m.B(3);break}return x(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ya(m),x(m,e.destroy(),10);case 10:za(m,0);break;case 2:xa(m),m.B(3)}})}; +q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};Zi["application/x-offline-manifest"]=function(){return new Kz};function Lz(){}function Mz(a){var b=Dz(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=ph(a)):a=b&&"segment"==b.g?Nz(b.key(),b):nh(new T(2,1,9004,a));return a} +function Nz(a,b){var c=new jz;return ph(void 0).Ta(function(){return c.init()}).Ta(function(){return nz(c,b.Ob(),b.ab())}).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",Lz);Lz.plugin=Mz;wh("offline",Mz);function Oz(a,b,c){var d,e,f,g,h,k;return I(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),v=u.next();!v.done;v=u.next())if(v=v.value,Pz(v.info,p)){v.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=Qz(a,b,g);return x(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)}})} +function Qz(a,b,c){var d,e;return I(function(f){switch(f.g){case 1:return d=new fi({ic:b,onError:function(){},Ue:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ua(f,2),d.configure(a),x(f,ni(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return xa(f),x(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],x(f,Promise.all(c.sessionIds.map(function(g){return I(function(h){if(1== +h.g)return ua(h,2),x(h,zi(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);xa(h);H(h)})})),6);case 6:return x(f,d.destroy(),7);case 7:return f.return(e)}})}function Pz(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 Rz(a,b,c){var d=b.presentationTimeline.getDuration();b=Sz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Tz(a,b){var c=Fz(new Ez(a.Ob(),a.ab()),b),d=b.appMetadata||{};c=Sz(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}} +function Sz(a){var b=[],c=Ig(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(yg(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(zg(c.value));return b};function Uz(){this.g={}}function Vz(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 Wz(a,b){a.g[b.id]=b.bandwidth||2048}function Xz(a,b){a=a.g[b];null==a&&(a=0);return a};function Yz(a){var b=this;if(a&&a.constructor!=W)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Jb()):(this.h=Xm(),this.g=new vh);this.i=[];this.j=[];var c=!a;this.l=new Jh(function(){var d,e,f,g,h;return I(function(k){switch(k.g){case 1:return x(k,Promise.all(b.j.map(function(l){return Ty(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 x(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return x(k,b.g.destroy(),4); +case 4:b.h=null,b.g=null,H(k)}})})}function Zz(){if($b())a:{var a=t(kz.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=Yz.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Om(a,b));return an(this.h,a)};q.getConfiguration=function(){var a=Xm();an(a,this.h,Xm());return a};q.Jb=function(){return this.g}; +q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Sy(this.g);this.j.push(f);b=$z(this,a,b||{},function(){var g;return I(function(h){if(1==h.g)return c?h.B(2):x(h,vn(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=Yi(a,c||null);return h.return(g())})},e,f);b=new mh(b,function(){return Ty(f)});b.finally(function(){Pd(d.j,f)});return aA(this,b)}; +function $z(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,z,y,B;return I(function(C){switch(C.g){case 1:return bA(),h=g=null,k=new jz,n=m=l=null,ua(C,2,3),x(C,d(),5);case 5:return g=C.h,x(C,cA(a,b,g,e),6);case 6:p=C.h;dA(a);r=!p.presentationTimeline.T()&&!p.presentationTimeline.Qc();if(!r)throw new T(2,9,9005,b);return x(C,a.dd(p,function(D){n=n||D},e),7);case 7:h=C.h;dA(a);if(n)throw n;return x(C,eA(p,h,e),8);case 8:return x(C,k.init(),9);case 9:return dA(a),x(C,lz(k),10);case 10:return l=C.h,dA(a),u=fA(h, +p,b,c,e,f),v=u.ck,w=u.gh,x(C,l.ab.addManifests([v]),11);case 11:z=C.h;dA(a);m=z[0];dA(a);if(n)throw n;return x(C,gA(a,w,m,v,f,e,l.ab,p,h),12);case 12:return dA(a),hA(p,v,h,e),x(C,l.ab.updateManifest(m,v),13);case 13:return dA(a),y=new Cz("manifest",l.path.Ob,l.path.ab,m),C.return(Tz(y,v));case 3:return ya(C),x(C,k.destroy(),14);case 14:if(!g){C.B(15);break}return x(C,g.stop(),15);case 15:if(!h){C.B(17);break}return x(C,h.destroy(),17);case 17:za(C,0);break;case 2:B=xa(C);if(null==m){C.B(19);break}return x(C, +iA(m),19);case 19:throw n||B;}})} +function gA(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,z,y;return I(function(B){switch(B.g){case 1:l={};m=0;n=function(C,D){var G,A,E,F,J,L,K,O,M;return I(function(N){if(1==N.g){G=t(C);A=G.next();for(E={};!A.done;E={qc:void 0},A=G.next())E.qc=A.value,F=Oy(E.qc,f),J=E.qc.i,L=E.qc.h,K=function(R){return function(Q){var Y,ia,X;return I(function(ja){if(1==ja.g)return x(ja,g.addSegments([{data:Q}]),2);Y=ja.h;dA(a);ia=R.qc.g;X=Ny(ia);l[X]=Y[0];m+=Q.byteLength;H(ja)})}}(E),O=E.qc.g,(M=O.ec())?Xy(e,E.qc.groupId, +M,J,L,K):Vy(e,E.qc.groupId,F,J,L,K);return x(N,Yy(e),2)}if(!D)return N.B(0);dA(a);hA(h,d,k,f);return x(N,g.updateManifest(c,d),0)})};p=!1;ua(B,2);if(!jA(h)||!p||kA(h)){B.B(4);break}return x(B,n(b.filter(function(C){return C.h}),!0),5);case 5:return dA(a),b=b.filter(function(C){return!C.h}),r=l,u=m,l={},m=0,x(B,lA(g,c,d,r,u,function(){return dA(a)}),6);case 6:dA(a);case 4:if(p){B.B(7);break}return x(B,n(b,!1),8);case 8:return dA(a),v=l,w=m,l={},m=0,x(B,lA(g,c,d,v,w,function(){return dA(a)}),9);case 9:dA(a); +case 7:wa(B,0);break;case 2:return z=xa(B),y=Object.values(l),x(B,g.removeSegments(y,function(){}),10);case 10:throw z;}})}function iA(a){var b,c,d,e;return I(function(f){switch(f.g){case 1:return b=new jz,x(f,b.init(),2);case 2:return x(f,lz(b),3);case 3:return c=f.h,d=new Cz("manifest",c.path.Ob,c.path.ab,a),x(f,b.destroy(),4);case 4:return e=new Yz,x(f,e.remove(d.toString()),0)}})} +function lA(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w;return I(function(z){switch(z.g){case 1:g=!1;ua(z,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&& +(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return x(z,a.updateManifest(b,c),4);case 4:g=!0;f();wa(z,0);break;case 2:return v=xa(z),x(z,iA(b),5);case 5:if(g){z.B(6);break}w=Object.values(d);return x(z,a.removeSegments(w,function(){}),6);case 6:throw v;}})} +function eA(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,D,G,A,E,F,J,L,K,O,M,N;return I(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},fg(a,c.restrictions,d),x(R,ig(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;$f(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(yg(m));n=t(a.textStreams);for(p=n.next();!p.done;p= +n.next())r=p.value,e.push(zg(r));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(Ag(w));return x(R,c.offline.trackSelectionCallback(e),3);case 3:z=R.h;y=a.presentationTimeline.getDuration();B=0;C=t(z);for(D=C.next();!D.done;D=C.next())G=D.value,A=G.bandwidth*y/8,B+=A;ua(R,4);return x(R,c.offline.downloadSizeCallback(B),6);case 6:E=R.h;if(!E)throw new T(2,9,9014);wa(R,5);break;case 4:F=xa(R);if(F instanceof T)throw F;throw new T(2,9,9015);case 5:J=new Set;L=new Set;K=new Set; +O=t(z);for(M=O.next();!M.done;M=O.next())N=M.value,"variant"==N.type&&J.add(N.id),"text"==N.type&&L.add(N.id),"image"==N.type&&K.add(N.id);a.variants=a.variants.filter(function(Q){return J.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return L.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return K.has(Q.id)});mA(a);H(R)}})} +function fA(a,b,c,d,e,f){var g=Rz(c,b,d),h=e.offline.progressCallback;Uy(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&vi(a,"cenc",r)});var k=jA(b)&&!kA(b),l=null;k&&(l=nA.get(a.g.keySystem));for(var m=new Uz,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())Wz(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Vz(m,p.value);m=oA(f,m,b,e);f=m.streams;m=m.gh;n=a.g;p=e.offline.usePersistentLicense; +n&&p&&(n.initData=[]);return{ck:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Jd(),streams:f,sessionIds:p?Ei(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},gh:m}}function jA(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})} +function kA(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 hA(a,b,c,d){b.expiration=c.Jd();c=Ei(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(jA(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}q.remove=function(a){return pA(this,qA(this,a))}; +function qA(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:bA();c=Dz(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new jz;va(k,2);return x(k,e.init(),4);case 4:return x(k,nz(e,d.Ob(),d.ab()),5);case 5:return f=k.h,x(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],x(k,Promise.all([rA(a,h,e),sA(f,d,h)]),2);case 2:return ya(k),x(k,e.destroy(),8);case 8:za(k,0)}})} +function tA(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:yf(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:yf(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function rA(a,b,c){return I(function(d){return x(d,uA(a.g,a.h.drm,c,b),0)})} +function sA(a,b,c){function d(){}var e=vA(c);Tz(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.yk=function(){return pA(this,wA(this))}; +function wA(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return bA(),b=a.g,c=a.h.drm,d=new jz,e=!1,va(n,2),x(n,d.init(),4);case 4:f=[],oz(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 x(n,k.getAll(),8);case 8:return l=n.h,x(n,Oz(c,b,l),9);case 9:return m=n.h,x(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return ya(n),x(n,d.destroy(),11);case 11:za(n,3);break;case 3:return n.return(!e)}})} +q.list=function(){return pA(this,xA())};function xA(){var a,b,c;return I(function(d){switch(d.g){case 1:return bA(),a=[],b=new jz,va(d,2),x(d,b.init(),4);case 4:return c=Promise.resolve(),mz(b,function(e,f){c=c.then(function(){var g;return I(function(h){if(1==h.g)return x(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Tz(new Cz("manifest",e.Ob,e.ab,l),k);a.push(k)});H(h)})})}),x(d,c,2);case 2:return ya(d),x(d,b.destroy(),6);case 6:za(d,3);break;case 3:return d.return(a)}})} +function cA(a,b,c,d){var e,f,g,h,k;return I(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}, +onMetadata:function(){},disableStream:function(){},addFont:function(){}},c.configure(d.manifest),dA(a),x(l,c.start(b,g),2);if(3!=l.g)return h=l.h,dA(a),k=yA(h),x(l,Promise.all(ib(k,function(m){return m.createSegmentIndex()})),3);dA(a);if(e)throw e;return l.return(h)})} +q.dd=function(a,b,c){var d=this,e;return I(function(f){return 1==f.g?(e=new fi({ic:d.g,onError:b,Ue:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),x(f,ki(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?x(f,xi(e),3):f.return(e)})}; +function oA(a,b,c,d){var e=new Map,f=yA(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=zA(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()),gh:Array.from(e.values())}} +function zA(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, +audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;AA(d,c.presentationTimeline.Cb(),function(l){var m=Ny(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Xz(b,d.id)*p;p=Qy(a.g,p);f.set(m,new My(l,p,k,!1))}l.ma&&(n=Ny(l.ma),f.has(n)||(p=.5*Xz(b,d.id),p=Qy(a.g,p),f.set(n,new My(l.ma,p,k, +!0))));g.segments.push({pendingInitSegmentRefId:n,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});0!==h&&(k=(k+1)%h)});return g}function AA(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 dA(a){if(a.l.g)throw new T(2,9,7001);}function bA(){if(!Zz())throw new T(2,9,9E3);}function pA(a,b){return I(function(c){if(1==c.g)return a.i.push(b),va(c,2),x(c,b,4);if(2!=c.g)return c.return(c.h);ya(c);Pd(a.i,b);return za(c,0)})}function aA(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Pd(a.i,c)})} +function vA(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)} +function uA(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=pz(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:tA(d,!1),videoCapabilities:tA(d,!0)}});return x(h,Oz(b,a,f),2)}return 3!=h.g?(g=h.h,x(h,e.remove(g),3)):x(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})} +function yA(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b} +function mA(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",Yz);Yz.deleteAll=function(){var a;return I(function(b){return 1==b.g?(a=new jz,va(b,2),x(b,qz(a),2)):5!=b.g?(ya(b),x(b,a.destroy(),5)):za(b,0)})}; +Yz.prototype.list=Yz.prototype.list;Yz.prototype.removeEmeSessions=Yz.prototype.yk;Yz.prototype.remove=Yz.prototype.remove;Yz.prototype.store=Yz.prototype.store;Yz.prototype.getNetworkingEngine=Yz.prototype.Jb;Yz.prototype.getConfiguration=Yz.prototype.getConfiguration;Yz.prototype.configure=Yz.prototype.configure;Yz.prototype.destroy=Yz.prototype.destroy;Yz.support=Zz; +var nA=(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");hq.offline=Zz;function BA(){}function CA(){for(var a=t(DA),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Za("Error installing polyfill!",c)}}}function EA(a,b){a={priority:b||0,callback:a};for(b=0;b=a?window.MediaSource=null:12>=a?(YA(),ZA()):15>=a&&YA():ec("DT_STB_BCM")?(YA(),ZA()):ec("Tizen 2")||gc()||ec("Tizen 4")?$A():ec("WPE")&&(YA(),ZA());(window.MediaSource||window.ManagedMediaSource)&&aB();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&bB()} +function YA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function ZA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}} +function aB(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Ef(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Ef(c)&&b(c)}}} +function $A(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Hf(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Hf(c)&&b(c)}}} +function bB(){var a=MediaSource.isTypeSupported;hc()||(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)})}BA.MediaSource=WA;WA.install=XA;EA(XA);function cB(){}function dB(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?eB():void 0!=window.orientation&&fB())}function eB(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})} +function fB(){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 gB;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}BA.Orientation=cB;cB.install=dB;function gB(){hb.call(this);this.type="";this.angle=0}qa(gB,hb); +gB.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)}; +gB.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};EA(dB);function hB(){}var iB,jB,kB,lB,mB,nB;function oB(a,b){try{var c=new pB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function qB(a){var b=this.mediaKeys;b&&b!=a&&rB(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?rB(a,this):Promise.resolve()} +function sB(a){a=Hb(a.initData);if(Nb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=zc(a.subarray(4),!0);a=Cc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Jb(a);this.dispatchEvent(b)}BA.PatchedMediaKeysApple=hB; +hB.uninstall=function(){iB&&(iB=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",jB),HTMLMediaElement.prototype.setMediaKeys=kB,window.MediaKeys=lB,window.MediaKeySystemAccess=mB,navigator.requestMediaKeySystemAccess=nB,jB=nB=kB=mB=lB=null,window.shakaMediaKeysPolyfill="")}; +hB.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)iB=!0,jB=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),kB=HTMLMediaElement.prototype.setMediaKeys,lB=window.MediaKeys,mB=window.MediaKeySystemAccess,nB=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=qB;window.MediaKeys=tB;window.MediaKeySystemAccess=pB;navigator.requestMediaKeySystemAccess= +oB;window.shakaMediaKeysPolyfill=uB}}; +function pB(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, +g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.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;} +pB.prototype.createMediaKeys=function(){var a=new tB(this.keySystem);return Promise.resolve(a)};pB.prototype.getConfiguration=function(){return this.g};function tB(a){this.h=new WebKitMediaKeys(a);this.g=new rd}tB.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new vB(this.h,a)};tB.prototype.setServerCertificate=function(){return Promise.resolve(!1)}; +function rB(a,b){a.g.Za();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",sB);try{return al(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}tB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function vB(a){hb.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 lh;this.keyStatuses=new wB}qa(vB,hb);q=vB.prototype; +q.generateRequest=function(a,b){var c=this;this.h=new lh;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",Jb(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(xB(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror", +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:xB(c,"output-not-allowed");break;default:xB(c,"internal-error")}});xB(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))}; +q.update=function(a){this.g=new lh;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 xB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)} +function wB(){this.size=0;this.g=void 0}q=wB.prototype;q.tc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Wb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Wb.value();return this.g&&Gb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var uB="apple";function yB(){}function zB(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||gc()||ec("Tizen 4")||ec("Tizen 5.0")||hc()&&38===jc())&&(MediaKeys.prototype.setServerCertificate=AB)}function AB(){return Promise.resolve(!1)}BA.PatchedMediaKeysCert=yB;yB.install=zB;EA(zB);function BB(){}function CB(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=DB,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=EB,window.MediaKeys=FB,window.MediaKeySystemAccess=GB,window.shakaMediaKeysPolyfill=HB)}function DB(){return Promise.reject(Error("The key system specified is not supported."))} +function EB(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}BA.PatchedMediaKeysNop=BB;BB.install=CB;function FB(){throw new TypeError("Illegal constructor.");}FB.prototype.createSession=function(){};FB.prototype.setServerCertificate=function(){};FB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function GB(){this.keySystem="";throw new TypeError("Illegal constructor.");}GB.prototype.getConfiguration=function(){}; +GB.prototype.createMediaKeys=function(){};var HB="nop";EA(CB,-10);function IB(){} +function JB(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)KB="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;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 QB(a){var b=KB;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function LB(a,b){try{var c=new OB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function MB(a){var b=this.mediaKeys;b&&b!=a&&RB(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&RB(a,this);return Promise.resolve()}BA.PatchedMediaKeysWebkit=IB;IB.install=JB; +function OB(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), +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"]): +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;}OB.prototype.createMediaKeys=function(){var a=new NB(this.g);return Promise.resolve(a)};OB.prototype.getConfiguration=function(){return this.h};function NB(a){this.l=a;this.h=null;this.g=new rd;this.i=[];this.j=new Map} +function RB(a,b){a.h=b;a.g.Za();var c=KB;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Jb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=SB(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){(d=SB(a,d.sessionId))&&d.ready()}), +a.g.o(b,c+"keyerror",function(d){var e=SB(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?TB(e,"output-restricted"):1==f?TB(e,"expired"):TB(e,"internal-error"))}}))} +NB.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 UB(b,this.l,a);this.i.push(a);return a};NB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};NB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")}; +function SB(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 UB(a,b,c){hb.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 lh;this.keyStatuses=new VB}qa(UB,hb);q=UB.prototype;q.ready=function(){TB(this,"usable");this.g&&this.g.resolve();this.g=null}; +function WB(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(Cc("LOAD_SESSION|"+c));else{var e=Cc("PERSISTENT|");d=Mc(e,b)}else d=Hb(b)}catch(g){return Promise.reject(g)}a.h=new lh;var f=QB("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Zb(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h} +function XB(a,b,c){if(a.g)a.g.then(function(){return XB(a,b,c)}).catch(function(){return XB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=yc(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=Jc(e.keys[0].k);e=Jc(e.keys[0].kid)}else d=Hb(c),e=null;var f=QB("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}} +function TB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return WB(this,b,null)};q.load=function(a){return"persistent-license"==this.l?WB(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new lh;XB(this,b,a);return b}; +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=QB("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 VB(){this.size=0;this.g=void 0}q=VB.prototype;q.tc=function(){return this.g}; +q.forEach=function(a){this.g&&a(this.g,Wb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Wb.value();return this.g&&Gb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var KB="",PB="webkit";EA(JB);function YB(){}function ZB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=$B,Object.defineProperty(a,"disablePictureInPicture",{get:aC,set:bC,enumerable:!0,configurable:!0}),document.exitPictureInPicture=cC,document.addEventListener("webkitpresentationmodechanged",dC,!0))}} +function dC(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)} +function $B(){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 cC(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))} +function aC(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function bC(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}BA.PiPWebkit=YB;YB.install=ZB;EA(ZB);function eC(){}function fC(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=gC))}function gC(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}BA.RandomUUID=eC;eC.install=fC;EA(fC);function hC(){}function iC(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:jC})}function jC(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}BA.Symbol=hC;hC.install=iC;EA(iC);function kC(){}function lC(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}BA.VideoPlayPromise=kC;kC.install=lC;EA(lC);function mC(){}function nC(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||hc()&&38===jc())&&(a.getVideoPlaybackQuality=oC)}}function oC(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}BA.VideoPlaybackQuality=mC;mC.install=nC;EA(nC);function pC(){}function qC(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=rC;else if(6==b)a=sC;else{try{var c=!!rC(1,2,"")}catch(d){c=!1}c&&(a=rC)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function rC(a,b,c){return new window.TextTrackCue(a,b,c)}function sC(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}BA.VTTCue=pC;pC.install=qC;EA(qC);function tC(){}tC.prototype.parseInit=function(){};tC.prototype.setSequenceMode=function(){};tC.prototype.setManifestType=function(){};tC.prototype.parseMedia=function(a,b){var c=null,d=[];a=yc(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=uC.exec(e))){var f=vC.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Me(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d}; +P("shaka.text.LrcTextParser",tC);tC.prototype.parseMedia=tC.prototype.parseMedia;tC.prototype.setManifestType=tC.prototype.setManifestType;tC.prototype.setSequenceMode=tC.prototype.setSequenceMode;tC.prototype.parseInit=tC.prototype.parseInit;var uC=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,vC=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Nf["application/x-subtitle-lrc"]=function(){return new tC};function wC(){}wC.prototype.parseInit=function(){};wC.prototype.setSequenceMode=function(){};wC.prototype.setManifestType=function(){}; +wC.prototype.parseMedia=function(a,b,c,d){var e=yc(a);a=[];if(""==e)return a;var f=ee(e,"tt",!0);if(!f)throw new T(2,2,2005,"Failed to parse TTML.");e=qe(f,"body")[0];if(!e)return[];var g=we(f,xC,"frameRate"),h=we(f,xC,"subFrameRate"),k=we(f,xC,"frameRateMultiplier"),l=we(f,xC,"tickRate"),m=we(f,xC,"cellResolution"),n=f.attributes["xml:space"]||"default",p=we(f,yC,"extent");if("default"!=n&&"preserve"!=n)throw new T(2,2,2005,"Invalid xml:space value: "+n);n="default"==n;g=new zC(g,h,k,l);m=AC(m); +h=qe(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return"\n"!=v});k=qe(f,"style");f=qe(f,"region");l=[];for(var r=t(f),u=r.next();!u.done;u=r.next())(u=BC(u.value,k,p))&&l.push(u);if(le(e,"p").length)throw new T(2,2,2001,"

can only be inside

in TTML");p=t(le(e,"div"));for(r=p.next();!r.done;r=p.next())if(le(r.value,"span").length)throw new T(2,2,2001," can only be inside

in TTML");if(b=CC(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"), +a.push(b);return a}; +function CC(a,b,c,d,e,f,g,h,k,l,m,n,p){var r=l;if(je(a)){if(!m)return null;var u={tagName:"span",children:[me(a)],attributes:{},parent:null}}else u=a;for(var v=null,w=t(DC),z=w.next();!z.done&&!(v=EC(u,"backgroundImage",d,"#",z.value)[0]);z=w.next());w=null;z=we(u,DC,"backgroundImage");var y=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(z&&y.test(z)){w=parseInt(z.split(":").pop(),10)-1;if(w>=p.length)return null;w=p[w]}else n&&z&&!z.startsWith("#")&&(y=new ob(n),z=new ob(z),(z=y.resolve(z).toString())&& +(w=z));if("p"==a.tagName||v||w)m=!0;a=m;z="default"==(u.attributes["xml:space"]||(h?"default":"preserve"));y=u.children.every(je);h=[];if(!y)for(var B=t(u.children),C=B.next();!C.done;C=B.next())(C=CC(C.value,b,c,d,e,f,g,z,k,u,m,n,p))&&h.push(C);d=null!=l;n=me(u);n=u.children.length&&n&&/\S/.test(n);B=u.attributes.begin||u.attributes.end||u.attributes.dur;if(!(B||n||"br"==u.tagName||0!=h.length||d&&!z))return null;p=FC(u,c);n=p.start;for(p=p.end;r&&r.tagName&&"tt"!=r.tagName;)p=GC(r,c,n,p),n=p.start, +p=p.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;p=null==p?Infinity:p+b.periodStart;n=Math.max(n,b.segmentStart);p=Math.min(p,b.segmentEnd);if(!B&&0c.length)return f;var g=a;for(a=null;!a&&!(a=e?ve(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} +function GC(a,b,c,d){a=FC(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 FC(a,b){var c=UC(a.attributes.begin,b),d=UC(a.attributes.end,b);a=UC(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}} +function UC(a,b){var c=null;if(VC.test(a)){a=VC.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(WC.test(a))c=XC(WC,a);else if(YC.test(a))c=XC(YC,a);else if(ZC.test(a))a=ZC.exec(a),c=Number(a[1])/b.frameRate;else if($C.test(a))a=$C.exec(a),c=Number(a[1])/b.g;else if(aD.test(a))c=XC(aD,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c} +function XC(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)}function AC(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Ic:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}P("shaka.text.TtmlTextParser",wC);wC.prototype.parseMedia=wC.prototype.parseMedia;wC.prototype.setManifestType=wC.prototype.setManifestType;wC.prototype.setSequenceMode=wC.prototype.setSequenceMode;wC.prototype.parseInit=wC.prototype.parseInit; +function zC(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]))} +var IC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,QC=/^(\d{1,4}(?:\.\d+)?|100)%$/,PC=/^(\d+px|\d+em|\d*\.?\d+c)$/,JC=/^(\d+)px (\d+)px$/,VC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,WC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,YC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,ZC=/^(\d*(?:\.\d*)?)f$/,$C=/^(\d*(?:\.\d*)?)t$/,aD=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),OC={left:Ue,center:"center",right:"end",start:Ue, +end:"end"},NC={left:"line-left",center:"center",right:"line-right"},xC=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],yC=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],DC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Nf["application/ttml+xml"]=function(){return new wC};function bD(){this.g=new wC}bD.prototype.parseInit=function(a){var b=!1;(new Th).box("moov",Yh).box("trak",Yh).box("mdia",Yh).box("minf",Yh).box("stbl",Yh).W("stsd",$h).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};bD.prototype.setSequenceMode=function(){};bD.prototype.setManifestType=function(){}; +bD.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[],g=[];(new Th).box("moof",Yh).box("traf",Yh).W("subs",function(h){g=[];for(var k=h.reader,l=k.U(),m=0;m").replace(/{\/b}/g,"").replace(/{i}/g,"").replace(/{\/i}/g,"").replace(/{u}/g,"").replace(/{\/u}/g,"")+"\n\n";return b}P("shaka.text.SrtTextParser",jD);jD.srt2webvtt=kD;jD.prototype.parseMedia=jD.prototype.parseMedia; +jD.prototype.setManifestType=jD.prototype.setManifestType;jD.prototype.setSequenceMode=jD.prototype.setSequenceMode;jD.prototype.parseInit=jD.prototype.parseInit;Nf["text/srt"]=function(){return new jD};function lD(){}lD.prototype.parseInit=function(){};lD.prototype.setSequenceMode=function(){};lD.prototype.setManifestType=function(){}; +lD.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=yc(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=mD.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(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=nD.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(oD);else if("Style"==a){a=f.split(oD);f={};for(var g=0;g>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null} +function pD(a){a=sD.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",lD);lD.prototype.parseMedia=lD.prototype.parseMedia;lD.prototype.setManifestType=lD.prototype.setManifestType;lD.prototype.setSequenceMode=lD.prototype.setSequenceMode;lD.prototype.parseInit=lD.prototype.parseInit;var mD=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,nD=/^\s*([^:]+):\s*(.*)/,oD=/\s*,\s*/,sD=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/; +Nf["text/x-ssa"]=function(){return new lD};function tD(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>>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,codec:"mp4a.40."+e}} +function vD(a,b){if(b+1=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+1a.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, +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,Fa:a,qa:e}} +function zD(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0>>24+h<>h;c=c?c<c)return!0}return!1};function AD(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=AD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?xd(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.j}; +q.transmux=function(a,b,c,d){a=Hb(a);for(var e=vj(a),f=e.length;fa.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Fj(a.subarray(b+2));Hj(c,2);Hj(c,3);var d=Ij(c,11)+1<<1,e=Ij(c,2);if(3==e){e=Ij(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Ij(c,2);var g=Ij(c,3),h=Ij(c,1);c=Ij(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,Fa:a,qa:d}};function CD(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=CD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?xd(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.j}; +q.transmux=function(a,b,c,d){a=Hb(a);for(var e=vj(a),f=e.length;fe?Oj(c,16):Oj(c,64))}Kj(c);d=U(c);if(0===d)U(c);else if(1===d)for(Hj(c,1),Kj(c),Kj(c),d=U(c),e=0;e=p?(d=r[p-1],e=u[p-1]):255===p&&(d=Ij(c,16),e=Ij(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,ha(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,ha(a));a=new Uint8Array([1,k[3],k[4], +k[5],255,225].concat(k,[1],b));return{height:c,width:f,Qa:a,Va:d,Wa:e}} +function FD(a){function b(u){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:u.pts,dts:u.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var u=[],v=t(e.nalus),w=v.next();!w.done;w=v.next()){w=w.value;var z=w.fullData.byteLength,y=new Uint8Array(4);y[0]=z>>24&255;y[1]=z>>16&255;y[2]=z>>8&255;y[3]=z&255;u.push(y);u.push(w.fullData)}e.data=Mc.apply(Gc,ha(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;gG;G++)Ij(a,2);for(G=0;GJ;J++)for(var L=0;L<(3===J?2:6);L++)if(Mj(a)){var K=Math.min(64,1<<4+(J<<1));1=K?(F=O[K-1],J=M[K-1]):255===K&&(F=Ij(a,16),J=Ij(a,16)));Mj(a)&&Mj(a);Mj(a)&&(Ij(a,3),Mj(a),Mj(a)&&(Nj(a),Nj(a),Nj(a)));Mj(a)&&(U(a),U(a));Mj(a);Mj(a);Mj(a);if(K=Mj(a))U(a),U(a),U(a),U(a);if(Mj(a)&&(Ij(a,32),Ij(a,32),Mj(a)&&U(a),Mj(a))){M=!1;K=Mj(a);O=Mj(a);if(K||O){if(M=Mj(a))Nj(a),Ij(a,5),Mj(a),Ij(a,5);Ij(a,4);Ij(a,4);M&& +Ij(a,4);Ij(a,5);Ij(a,5);Ij(a,5)}for(N=0;N<=f;N++){var Q=!0;R=1;Mj(a)||(Q=Mj(a));var Y=!1;Q?U(a):Y=Mj(a);Y||(R=U(a)+1);if(K){for(Q=0;Q>8;e[14]=d.Qe&255;e[15]=252|d.Hg&3;e[16]=252|d.Mf&3;e[17]=248|d.If&7;e[18]=248|d.Hf&7;e[19]=0;e[20]=0;e[21]=(d.Of&3)<<6|(d.Eg&7)<<3|(d.fh?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& +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 LD(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*MD[14*(3===c?3-d:3===d?3:4)+e-1];f=ND[3*(3===c?0:2===c?1:2)+f];c=OD[c][d];var h=PD[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,qa:k,Ck:8*c*h}}return null} +function QD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function RD(a,b){if(b+1d;d++)this.usertype[d]!==WD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=UD.prototype;q.destroy=function(){}; +q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return xd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return xd(b)||xd(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h}; +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"); +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>24&255;Pa[1]=ja>>16&255;Pa[2]=ja>>8&255;Pa[3]=ja&255;N.push(Pa);N.push(ia.fullData)}}var Ka=N.length?{data:Mc.apply(Gc,ha(N)),isKeyframe:M}:null;if(Ka){null==E&&null!=K.dts&&(E=K.dts);var jb=void 0;jb=L+ +1>>24&255,sd.sampleRate>>>17&255,sd.sampleRate>>>8&255,sd.sampleRate>>>0&255,0,0].concat(ha(Pb)));for(var $x=sd.sampleRate,ay=t(k.vb()),To=ay.next();!To.done;To=ay.next()){var Uo=To.value,dg=Uo.data;null==Fk&&null!==Uo.pts&&(Fk=Uo.pts);for(var Ph=0;Pha&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function IE(a,b){BE.call(this,a,b);var c=this;this.i=V("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=V("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Zb(function(){if(c.ad.isLinear()){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0Date.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=V("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=V("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}qa(TE,BE);P("shaka.ui.HiddenSeekButton",TE);function UE(a,b){TE.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}qa(UE,TE);P("shaka.ui.HiddenFastForwardButton",UE);function VE(a,b){TE.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}qa(VE,TE);P("shaka.ui.HiddenRewindButton",VE);function WE(a,b,c,d){BE.call(this,a,b);var e=this;this.container=V("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.h=!1;this.bar=document.createElement("input");this.I=new Zb(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(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); +this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(f){e.controls.Rc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Rc()&&(e.h=!0,XE(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&&(XE(e,f),e.onChange());f.stopPropagation()});this.eventManager.o(this.bar,"touchend",function(f){e.h&& +(e.h=!1,XE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"touchcancel",function(f){e.h&&(e.h=!1,XE(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()})}qa(WE,BE);q=WE.prototype; +q.release=function(){this.I&&(this.I.stop(),this.I=null);BE.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:ae&&(c=e);a.bar.value=c}P("shaka.ui.RangeElement",WE);WE.prototype.setValue=WE.prototype.setValue;WE.prototype.getValue=WE.prototype.getValue;WE.prototype.changeTo=WE.prototype.changeTo;WE.prototype.onChangeEnd=WE.prototype.onChangeEnd; +WE.prototype.onChange=WE.prototype.onChange;WE.prototype.onChangeStart=WE.prototype.onChangeStart;WE.prototype.setRange=WE.prototype.setRange;function YE(a,b){WE.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=V("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 Zb(function(){var d=c.getValue();c.player.T()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.C=new Zb(function(){ZE(c)});this.L=!1;this.i=V("div");this.i.id="shaka-player-ui-thumbnail-container"; +this.g=V("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.A=V("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=V("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 Zb(function(){$E(c)});this.G=[];this.eventManager.o(this.localization,"locale-updated",function(){return aF(c)});this.eventManager.o(this.localization, +"locale-changed",function(){return aF(c)});this.eventManager.o(this.adManager,"ad-started",function(){bF(c)||GE(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){bF(c)&&GE(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.G=d.cuepoints;cF(c)});this.eventManager.o(this.player,"unloading",function(){c.G=[];cF(c);c.l&&(c.l.abort(),c.l=null);c.m=null;$E(c);dF(c)});this.eventManager.o(this.bar,"mousemove",function(d){var e=c.bar.getBoundingClientRect(), +f=parseFloat(c.bar.min);d=d.clientX-e.left;e=Math.round(f+(parseFloat(c.bar.max)-f)/e.width*d);c.player.ye().length?(dF(c),eF(c,d,e)):($E(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.right="",c.j.style.visibility="visible",d=c.player.xa(),c.player.T()?(d=d.end-e,1>d?(c.j.textContent=c.localization.resolve("LIVE"),c.j.style.left="",c.j.style.right="0px"):c.j.textContent="-"+fF(d)): +c.j.textContent=fF(e-d.start))});this.eventManager.o(this.container,"mouseleave",function(){dF(c);c.s.stop();c.s.X(.25)});this.setValue(this.video.currentTime);this.update();aF(this);this.ad&&GE(this.container,!1)}qa(YE,WE);q=YE.prototype;q.release=function(){this.u&&(this.u.stop(),this.u=null,this.C.stop(),this.C=null);WE.prototype.release.call(this)};q.onChangeStart=function(){this.L=!this.video.paused;this.controls.$g(!0);this.video.pause();this.s.stop();this.K=!0}; +q.onChange=function(){if(this.video.duration)if(this.update(),this.u.X(.125),this.player.ye().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());eF(this,(d-a)/((b-a)/c.width),d)}else $E(this)};q.onChangeEnd=function(){this.u.Sa();this.controls.$g(!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")}; +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.xa(),g=f.end-f.start;this.setRange(f.start,f.end);bF(this)?(GE(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? +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()+")")):GE(this.container,!1)}; +function ZE(a){if(a.G.length){for(var b=a.player.xa(),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(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+ +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 cF(a){function b(){ZE(a);var c=a.player.xa();c=c.end-c.start;a.player.T()&&5b||!isFinite(b))?!1:null==a.ad||!a.ad.isLinear()}function aF(a){a.bar.ariaLabel=a.localization.resolve("SEEK")} +function eF(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;I(function(D){switch(D.g){case 1:d=gF(a);if(!d)return $E(a),D.return();0>c&&(c=0);e=a.player.xa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return x(D,a.player.og(d.id,f),2);case 2:g=D.h;if(!g||!g.uris.length)return $E(a),D.return();a.player.T()?(h=e.end-c,a.A.textContent=1>h?a.localization.resolve("LIVE"):"-"+fF(h)):a.A.textContent=fF(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top= +-(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.Kb()==a.m.segment.Kb()&&g.segment.Ib()==a.m.segment.Ib()){D.B(3);break}a.m=g;a.l&&(a.l.abort(),a.l=null);if("mjpg"!=d.codecs&&!p.startsWith("offline:")){D.B(4);break}a.g.src='data:image/svg+xml,';ua(D,5);r=Hh;u=bm(g.segment.R(),g.segment.Kb(),g.segment.Ib(),a.player.getConfiguration().streaming.retryParameters); +a.l=a.player.Jb().request(r,u,{type:1});return x(D,a.l.promise,7);case 7:v=D.h;a.l=null;"mjpg"==d.codecs?(w=(new Th).box("mdat",ci(function(G){p=URL.createObjectURL(new Blob([G],{type:"image/jpeg"}))})),w.parse(v.data,!1)):(z=d.mimeType||"image/jpeg",y=new Blob([v.data],{type:z}),p=URL.createObjectURL(y));wa(D,4);break;case 5:B=xa(D);if(7001==B.code)return D.return();throw B;case 4:try{a.i.removeChild(a.g)}catch(G){}a.g=V("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=p; +a.g.onload=function(){p.startsWith("blob:")&&URL.revokeObjectURL(p)};a.i.insertBefore(a.g,a.i.firstChild);case 3:C=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="-"+C*g.positionX+"px",a.g.style.top="-"+C*g.positionY+"px",a.g.style.transform="scale("+C+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/ +g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",H(D)}})} +function gF(a){var b=a.player.ye();if(!b.length)return null;for(var c=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),d=c.next(),e={};!d.done;e={$h:void 0,estimatedBandwidth:void 0},d=c.next())if(e.$h=d.value,e.estimatedBandwidth=a.player.getStats().estimatedBandwidth,(d=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.$h&&g.bandwidth<.01*f.estimatedBandwidth}}(e)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&d.length)return d[0];return b.find(function(f){return"application/mp4"== +f.mimeType&&"mjpg"==f.codecs})||b[0]}function $E(a){a.i.style.visibility="hidden";a.A.textContent=""}function dF(a){a.j.style.visibility="hidden"}function fF(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 0c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}P("shaka.ui.SeekBar",YE);function hF(){}hF.prototype.create=function(a,b){return new YE(a,b)};YE.Factory=hF;function iF(a,b){BE.call(this,a,b);var c=this;this.j=V("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=V("div");this.h.classList.add("shaka-skip-ad-counter");GE(this.h,!1);this.j.appendChild(this.h);this.g=Hn();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;GE(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);jF(this);this.i=new Zb(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0h&&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- +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 pF(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 qF(){var a=new Float32Array(4);a[3]=1;return a}function rF(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;0Math.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]= +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}oF(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]} +function wF(a){AF(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)} +function xF(a){var b=BF(a,a.g.VERTEX_SHADER),c=BF(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))} +function BF(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}"; +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}"; +break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b} +function yF(a){if("cubemap"==a.C)var b={Mi:[-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],Ji:[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=[], +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={Mi:b,Ji:c,indices:d}}a.K=b;a.aa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Mi),a.g.STATIC_DRAW);a.ka=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER, +a.ka);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Ji),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)} +function zF(a){a.$=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.$);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)} +function uF(a,b){b=void 0===b?!0:b;var c=a.oa.jd()==Ep;!a.m||2>a.m.readyState||!c&&0==a.m.playbackRate||(mF(a.I,a.i*Math.PI/180,1.5625),"cubemap"==a.C?mF(a.I,a.i*Math.PI/180,2.5):mF(a.I,a.i*Math.PI/180,1.5625),a.g.useProgram(a.j),a.g.clear(a.g.COLOR_BUFFER_BIT),AF(a),b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.$),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&&(nF(a.M,a.G, +a.Y),nF(a.M,a.I,a.M)),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa),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.ka),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, +"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)))} +function AF(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight;c||(c=a.l.scrollHeight);if(a.Da!==b||a.ra!==c){a.l.width=b;a.l.height=c;a.Da=b;a.ra=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)}} +function CF(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?(e=lF(),g=lF(),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!== +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,nF(f,e,f)):a.H-=c;c=lF();e=lF();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* +d-k*g;c[7]=r*d-l*g;nF(f,c,f);uF(a,!1)}function DF(a,b){if(void 0===b||b)oF(a.h,a.G),a.V=0,a.A=qF(),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=lF();rF(a.h,a.h);pF(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.V?a.J=(new Zb(function(){DF(a,!1);a.H=0;a.V++;uF(a,!1)})).X(.025):(pF(b,a.L),a.G=b)};function EF(a,b,c,d,e){hb.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=FF(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&&DF(f.g);GF(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}GF(f)});this.s.o(d,"nospatialvideoinfo",function(){f.l=null;GF(f)});this.s.o(d, +"unloading",function(){f.l=null;GF(f)});GF(this)}qa(EF,hb);q=EF.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);hb.prototype.release.call(this)};q.configure=function(a){this.u=a;GF(this)};q.Kf=function(){return!!this.G};q.Mb=function(){return!!this.g};q.Bd=function(){this.g?this.g.Bd():Za("Not playing VR content")};q.sg=function(a){this.g?CF(this.g,a*HF,0,0):Za("Not playing VR content")}; +q.qg=function(a){this.g?CF(this.g,0,a*HF,0):Za("Not playing VR content")};q.rg=function(a){this.g?CF(this.g,0,0,a*HF):Za("Not playing VR content")}; +function GF(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(),IF(a,b)):(a.m.style.display="",IF(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 IF(a,b){a.G&&a.m&&(a.g=new sF(a.L,a.K,a.m,a.G,b),JF(a))} +function FF(a){if(!a.m||sc())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} +function JF(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=e.i&&(e.i+=f);20>e.i?e.i=20:100Math.abs(e-d)&&(e=Infinity);try{a.i&&a.i.isLinear()?navigator.mediaSession.setPositionState(): +navigator.mediaSession.setPositionState({duration:Math.max(0,e),playbackRate:a.u.playbackRate,position:Math.max(0,d)})}catch(f){}});a.j.o(a.C,"metadata",function(d){if(d=d.payload){var e;"TIT2"==d.key&&d.data&&(e=d.data);var f;"APIC"==d.key&&"--\x3e"==d.mimeType&&(f=d.data);e&&(d={title:e,artwork:[]},navigator.mediaSession.metadata&&(d=navigator.mediaSession.metadata,d.title=e),navigator.mediaSession.metadata=new MediaMetadata(d));f&&(e=a.m,f!=e.poster&&(e.poster=f),e={title:"",artwork:[{src:f}]}, +navigator.mediaSession.metadata&&(e=navigator.mediaSession.metadata,e.artwork=[{src:f}]),navigator.mediaSession.metadata=new MediaMetadata(e))}})}}function TF(a){if(a.g.setupMediaSession&&navigator.mediaSession){try{navigator.mediaSession.setPositionState()}catch(b){}a=function(b){try{navigator.mediaSession.setActionHandler(b,null)}catch(c){}};a("pause");a("play");a("seekbackward");a("seekforward");a("seekto");a("stop");a("enterpictureinpicture")}} +function qG(a){return I(function(b){return a.u&&0!=a.u.readyState&&!a.G.Ra()&&a.g.enableFullscreenOnRotation&&a.Qd()?screen.orientation.type.includes("landscape")&&!a.md()?x(b,eG(a),0):screen.orientation.type.includes("portrait")&&a.md()?x(b,fG(a),0):b.B(0):b.return()})} +function iG(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),MF(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3.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 Za("Not playing VR content"),a=null;return a};q.Kj=function(){var a=this.A;a.g?a=a.g.i:(Za("Not playing VR content"),a=null);return a}; +q.Ok=function(a){var b=this.A;b.g?(0>a?(Za("Field of view should be greater than 0"),a=0):10016/9&&(e=Math.round(9*d/16));c=e+"p";2160==e&&(c="4K");e=new Set;d=t(b);for(var f=d.next();!f.done;f=d.next())f=f.value,f.frameRate&&e.add(Math.round(f.frameRate));1=e)&&(c+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)c+=" (HDR)";"CH-STEREO"==a.videoLayout&&(c+=" (3D)");b.some(function(g){return g!=a&&g.height==a.height})&&(c+=" ("+Math.round((a.videoBandwidth||a.bandwidth)/1E3)+" kbits/s)");return c} +function fI(a){var b=a.player.Pc()?"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",eI);function iI(){} +iI.prototype.create=function(a,b){return new eI(a,b)};xG("quality",new iI);UF("quality",new iI);function jI(a,b){BE.call(this,a,b);var c=this;this.g=Hn();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);kI(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){kI(c)});this.eventManager.o(this.localization,"locale-changed",function(){kI(c)}); +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.video.paused&&c.video.play();c.player.Fc(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(jI,BE);function kI(a){a.g.ariaLabel=a.localization.resolve("REWIND")}P("shaka.ui.RewindButton",jI);function lI(){}lI.prototype.create=function(a,b){return new jI(a,b)};UF("rewind",new lI);function mI(a,b){BE.call(this,a,b);var c=this;this.g=Hn();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=V("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=V("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=V("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i);this.j=V("span");this.j.classList.add("shaka-current-selection-span"); +a.appendChild(this.j);this.g.appendChild(a);nI(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){nI(c)});this.eventManager.o(this.localization,"locale-changed",function(){nI(c)});this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.m;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= +"videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.A,"vrstatuschanged",function(){oI(c)});this.eventManager.o(this.adManager,"ad-started",function(){oI(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){oI(c)});this.eventManager.o(this.player,"unloading",function(){oI(c)});this.eventManager.o(this.player,"loaded",function(){oI(c)});this.eventManager.o(this.player,"loaded",function(){oI(c)});this.eventManager.o(this.video,"play",function(){oI(c)}); +this.eventManager.o(this.video,"pause",function(){oI(c)});this.eventManager.o(this.video,"seeking",function(){oI(c)});oI(this)}qa(mI,BE);function oI(a){var b=!0;a.controls.Mb()&&(b=!1);if(a.player.drmInfo()||a.player.Pc())b=!1;a.ad&&(b=!1);a.video.remote&&"disconnected"!=a.video.remote.state&&(b=!1);GE(a.g,b)}function nI(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}P("shaka.ui.SaveVideoFrameButton",mI); +function pI(){}pI.prototype.create=function(a,b){return new mI(a,b)};xG("save_video_frame",new pI);NE("save_video_frame",new pI);function qI(a,b){PE.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()}qa(qI,PE);qI.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"}; +qI.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",qI);function rI(){}rI.prototype.create=function(a,b){return new qI(a,b)};UF("play_pause",new rI);function sI(a,b){BE.call(this,a,b);a=V("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}qa(sI,BE);P("shaka.ui.Spacer",sI);function tI(){}tI.prototype.create=function(a,b){return new sI(a,b)};UF("spacer",new tI);function uI(a,b){function c(m){m=parseInt(l.g[m],10);return 1E6= 14": +"@types/node@*", "@types/node@^18.7.10": version "18.19.86" resolved "https://registry.npmjs.org/@types/node/-/node-18.19.86.tgz" integrity sha512-fifKayi175wLyKyc5qUfyENhQ1dCNI1UNjp653d8kuYcPQN5JhX3dGuP/XmvPTg/xRBn1VTLpbmi+H/Mr7tLfQ== @@ -384,11 +539,6 @@ balanced-match@^1.0.0: resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-arraybuffer@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz" - integrity sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ== - binary-extensions@^2.0.0: version "2.3.0" resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" @@ -416,7 +566,7 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" -browserslist@^4.24.4, "browserslist@>= 4.21.0": +browserslist@^4.24.4: version "4.24.4" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz" integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== @@ -506,13 +656,6 @@ cross-spawn@^7.0.6: shebang-command "^2.0.0" which "^2.0.1" -css-line-break@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz" - integrity sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w== - dependencies: - utrie "^1.0.2" - cssesc@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz" @@ -570,11 +713,6 @@ electron-to-chromium@^1.5.73: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.132.tgz" integrity sha512-QgX9EBvWGmvSRa74zqfnG7+Eno0Ak0vftBll0Pt2/z5b3bEGYL6OUXLgKPtvx73dn3dvwrlyVkjPKRRlhLYTEg== -eme-encryption-scheme-polyfill@^2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/eme-encryption-scheme-polyfill/-/eme-encryption-scheme-polyfill-2.2.1.tgz" - integrity sha512-GzgrLuZPYGijd8oaKuBqYv3Tc2oruDZM3V2982KOuy/PA1N3zwMe+/oIXJYfZ3BH3PwW5nONdBBE+VY6jlwbrw== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" @@ -776,14 +914,6 @@ hasown@^2.0.2: dependencies: function-bind "^1.1.2" -html2canvas@^1.4.1: - version "1.4.1" - resolved "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz" - integrity sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA== - dependencies: - css-line-break "^2.1.0" - text-segmentation "^1.0.3" - inflight@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" @@ -1109,7 +1239,7 @@ postcss-js@^4.0.1: dependencies: camelcase-css "^2.0.1" -"postcss-load-config@^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", postcss-load-config@^4.0.2: +postcss-load-config@^4.0.2: version "4.0.2" resolved "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz" integrity sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ== @@ -1137,7 +1267,7 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -"postcss@^7 || ^8", postcss@^8.0.0, postcss@^8.1.0, postcss@^8.2.14, postcss@^8.4.21, postcss@^8.4.27, postcss@^8.4.47, postcss@>=8.0.9: +postcss@^8.4.21, postcss@^8.4.27, postcss@^8.4.47: version "8.5.3" resolved "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz" integrity sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A== @@ -1205,7 +1335,7 @@ rimraf@^2.5.2: dependencies: glob "^7.1.3" -rollup@^1.20.0||^2.0.0||^3.0.0||^4.0.0, rollup@^2.78.0||^3.0.0||^4.0.0, rollup@^3.27.1: +rollup@^3.27.1: version "3.29.5" resolved "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz" integrity sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w== @@ -1241,13 +1371,6 @@ set-blocking@^2.0.0: resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== -shaka-player@^4.14.9: - version "4.14.9" - resolved "https://registry.npmjs.org/shaka-player/-/shaka-player-4.14.9.tgz" - integrity sha512-0YZJ+UUHBz3meAzN/eOvjNoLH7eCG1yHP3BFH8ZnFbGf3K50DgLWNMoV6bm6pH4cndvXem+SdcQRXabItD4RBA== - dependencies: - eme-encryption-scheme-polyfill "^2.2.1" - shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" @@ -1381,7 +1504,7 @@ svelte-preprocess@^5.0.0, svelte-preprocess@^5.1.3: sorcery "^0.11.0" strip-indent "^3.0.0" -"svelte@^3 || ^4 || ^5.0.0-next.42", "svelte@^3.19.0 || ^4.0.0", "svelte@^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0", svelte@^3.54.0, "svelte@^3.54.0 || ^4.0.0", "svelte@^3.54.0 || ^4.0.0 || ^5.0.0", "svelte@^3.54.0 || ^4.0.0 || ^5.0.0-next.0", "svelte@^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0", "svelte@^3.55.1 || ^4.0.0 || ^5.0.0": +svelte@^3.54.0: version "3.59.2" resolved "https://registry.npmjs.org/svelte/-/svelte-3.59.2.tgz" integrity sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA== @@ -1407,7 +1530,7 @@ svg.filter.js@^2.0.2: dependencies: svg.js "^2.2.5" -svg.js@^2.0.1, svg.js@^2.2.5, svg.js@^2.4.0, svg.js@^2.6.5, svg.js@>=2.3.x: +svg.js@>=2.3.x, svg.js@^2.0.1, svg.js@^2.2.5, svg.js@^2.4.0, svg.js@^2.6.5: version "2.7.1" resolved "https://registry.npmjs.org/svg.js/-/svg.js-2.7.1.tgz" integrity sha512-ycbxpizEQktk3FYvn/8BH+6/EuWXg7ZpQREJvgacqn46gIddG24tNNe4Son6omdXCnSOaApnpZw6MPCBA1dODA== @@ -1441,12 +1564,12 @@ svg.select.js@^3.0.1: dependencies: svg.js "^2.6.5" -tailwind-merge@^2.0.0, tailwind-merge@^2.5.3: +tailwind-merge@^2.5.3: version "2.6.0" resolved "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.6.0.tgz" integrity sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA== -tailwindcss@^3.3.0, tailwindcss@^3.3.2: +tailwindcss@^3.3.0: version "3.4.17" resolved "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz" integrity sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og== @@ -1474,13 +1597,6 @@ tailwindcss@^3.3.0, tailwindcss@^3.3.2: resolve "^1.22.8" sucrase "^3.35.0" -text-segmentation@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz" - integrity sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw== - dependencies: - utrie "^1.0.2" - thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz" @@ -1507,7 +1623,7 @@ ts-interface-checker@^0.1.9: resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== -ts-node@^10.9.1, ts-node@>=9.0.0: +ts-node@^10.9.1: version "10.9.2" resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== @@ -1531,7 +1647,7 @@ tslib@^2.4.1: resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== -typescript@^4.6.4, typescript@>=2.7, "typescript@>=3.9.5 || ^4.0.0 || ^5.0.0": +typescript@^4.6.4: version "4.9.5" resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== @@ -1546,11 +1662,6 @@ undici-types@~5.26.4: resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~6.21.0: - version "6.21.0" - resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz" - integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== - update-browserslist-db@^1.1.1: version "1.1.3" resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz" @@ -1564,19 +1675,12 @@ util-deprecate@^1.0.2: resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -utrie@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz" - integrity sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw== - dependencies: - base64-arraybuffer "^1.0.2" - v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -"vite@^3.0.0 || ^4.0.0 || ^5.0.0", vite@^4.0.0: +vite@^4.0.0: version "4.5.12" resolved "https://registry.npmjs.org/vite/-/vite-4.5.12.tgz" integrity sha512-qrMwavANtSz91nDy3zEiUHMtL09x0mniQsSMvDkNxuCBM1W5vriJ22hEmwTth6DhLSWsZnHBT0yHFAQXt6efGA==