/* @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 p;function aa(a){var b=0;return function(){return b>>0)+"_",e=0;return b}); fa("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 Ra(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e=f}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push([d,b[d]]);return c}}); var Sa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;cb||1342177279>>=1)c+=c;return d}});fa("Number.EPSILON",function(){return Math.pow(2,-52)}); fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}}); fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Qa(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}});fa("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 Ta(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]} fa("Array.prototype.at",function(a){return a?a:Ta});function Va(a){return a?a:Ta}fa("Int8Array.prototype.at",Va);fa("Uint8Array.prototype.at",Va);fa("Uint8ClampedArray.prototype.at",Va);fa("Int16Array.prototype.at",Va);fa("Uint16Array.prototype.at",Va);fa("Int32Array.prototype.at",Va);fa("Uint32Array.prototype.at",Va);fa("Float32Array.prototype.at",Va);fa("Float64Array.prototype.at",Va);fa("String.prototype.at",function(a){return a?a:Ta});var Wa=this||self; function S(a,b){a=a.split(".");var c=Wa;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 U(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 Xa(a){var b=new U(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}U.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};U.prototype.stopImmediatePropagation=function(){this.g=!0};U.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",U); var Ya={wm:"abrstatuschanged",xm:"adaptation",ym:"audiotrackchanged",zm:"audiotrackschanged",Am:"boundarycrossed",Bm:"buffering",Cm:"canupdatestarttime",Dm:"complete",Em:"currentitemchanged",Fm:"downloadcompleted",Gm:"downloadfailed",Hm:"downloadheadersreceived",Im:"drmsessionupdate",Km:"emsg",Qm:"itemsinserted",Rm:"itemsremoved",jn:"prft",Error:"error",Lm:"expirationupdated",Mm:"firstquartile",Nm:"gapjumped",Sm:"keystatuschanged",Wm:"loaded",Xm:"loading",Zm:"manifestparsed",$m:"manifestupdated", an:"mediaqualitychanged",cn:"mediasourcerecovered",dn:"metadataadded",Metadata:"metadata",fn:"midpoint",gn:"nospatialvideoinfo",hn:"onstatechange",ln:"ratechange",on:"segmentappended",pn:"sessiondata",qn:"spatialvideoinfo",rn:"stalldetected",sn:"started",tn:"statechanged",un:"streaming",vn:"textchanged",wn:"texttrackvisibility",xn:"thirdquartile",yn:"timelineregionadded",zn:"timelineregionenter",An:"timelineregionexit",Bn:"trackschanged",Dn:"unloading",Fn:"variantchanged"};function Za(){}function $a(){}function ab(){}function bb(a){var b=Ka.apply(1,arguments);cb.has(a)||(cb.add(a),ab.apply(Za,x(b)))}function db(){}function gb(){}function hb(){}var cb=new Set; window.console&&((new Map).set(1,function(){return console.error.apply(console,x(Ka.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,x(Ka.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,x(Ka.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,x(Ka.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,x(Ka.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,x(Ka.apply(0,arguments)))}), ab=function(){return console.warn.apply(console,x(Ka.apply(0,arguments)))},$a=function(){console.error.apply(console,x(Ka.apply(0,arguments)))});function ib(){this.g=new Map}p=ib.prototype;p.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};p.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};p.remove=function(a,b){if(this.g.has(a)){var c=this.g.get(a).filter(function(d){return d!=b});this.g.set(a,c);c.length||this.g.delete(a)}};p.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};p.size=function(){return this.g.size};p.keys=function(){return Array.from(this.g.keys())};function jb(){this.fb=new ib;this.Qe=this}jb.prototype.addEventListener=function(a,b){this.fb&&this.fb.push(a,b)};jb.prototype.removeEventListener=function(a,b){this.fb&&this.fb.remove(a,b)};jb.prototype.dispatchEvent=function(a){if(!this.fb)return!0;var b=this.fb.get(a.type)||[],c=this.fb.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.Qe;a.currentTarget=this.Qe;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented}; jb.prototype.release=function(){this.fb=null};function kb(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 lb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function mb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function ob(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 pb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/* @license Copyright 2006 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ function qb(a){var b;a instanceof qb?(sb(this,a.hc),this.rd=a.rd,tb(this,a.Gb),ub(this,a.Id),this.ub=a.ub,vb(this,a.g.clone()),this.Yc=a.Yc):a&&(b=String(a).match(pb))?(sb(this,b[1]||"",!0),this.rd=xb(b[2]||""),tb(this,b[3]||"",!0),ub(this,b[4]),this.ub=xb(b[5]||"",!0),vb(this,b[6]||"",!0),this.Yc=xb(b[7]||"")):this.g=new yb(null)}p=qb.prototype;p.hc="";p.rd="";p.Gb="";p.Id=null;p.ub="";p.Yc=""; p.toString=function(){var a=[],b=this.hc;b&&a.push(zb(b,Ab,!0),":");if(b=this.Gb){a.push("//");var c=this.rd;c&&a.push(zb(c,Ab,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Id;null!=b&&a.push(":",String(b))}if(b=this.ub)this.Gb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zb(b,"/"==b.charAt(0)?Bb:Cb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Yc)&&a.push("#",zb(b,Db));return a.join("")}; p.resolve=function(a){var b=this.clone();"data"===b.hc&&(b=new qb);var c=!!a.hc;c?sb(b,a.hc):c=!!a.rd;c?b.rd=a.rd:c=!!a.Gb;c?tb(b,a.Gb):c=null!=a.Id;var d=a.ub;if(c)ub(b,a.Id);else if(c=!!a.ub){if("/"!=d.charAt(0))if(this.Gb&&!this.ub)d="/"+d;else{var e=b.ub.lastIndexOf("/");-1!=e&&(d=b.ub.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.Id=b}else a.Id=null} function vb(a,b,c){b instanceof yb?a.g=b:(c||(b=zb(b,Eb)),a.g=new yb(b))}function xb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function zb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ab=/[#\/\?@]/g,Cb=/[#\?:]/g,Bb=/[#\?]/g,Eb=/[#\?@]/g,Db=/#/g;function yb(a){this.g=a||null} function Gb(a){if(!a.kb&&(a.kb=new Map,a.Xd=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 Xb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new V(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ob(a);for(var e=0;e=c[d]}if(!a)return"";var c=Kb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Wb(c);if(254==c[0]&&255==c[1])return Xb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Xb(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Xb(a,!1);if(0==c[1]&&0==c[3])return Xb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Wb(a);throw new V(2,2,2003);} function $b(a){if(window.TextEncoder&&!Rb().$h()){var b=new TextEncoder;return Lb(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||""}S("shaka.util.StringUtils",Vb);Vb.resetFromCharCode=function(){bc.g=void 0}; Vb.toUTF16=ac;Vb.toUTF8=$b;Vb.fromBytesAutoDetect=Zb;Vb.fromUTF16=Xb;Vb.fromUTF8=Wb;var bc=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 q=a.charCodeAt(e);if(64q||96q){q=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 Nd(a){return"string"===typeof a}function Od(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 Pd(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 Qd(a){if("string"===typeof a)return cc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:cc(a)} function Rd(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=Qd(a))&&(a=a.trim());return a}function Sd(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())Sd(d.value,b,c)}return c}function Td(a,b){a=Pd(a,b);return 1!=a.length?null:a[0]}function Ud(a,b,c){a=Vd(a,b,c);return 1!=a.length?null:a[0]} function Wd(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 Xd(a,b,c){b=Kd(b);return a.attributes[b+":"+c]||null}function Vd(a,b,c){var d=Kd(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 Yd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=Xd(a,d.value,c))return d;return null} function Zd(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 $d(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)?)?$","i").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 ae(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 be(a){a=Number(a);return 0===a%1?a:null}function ce(a){a=Number(a);return 0===a%1&&0Math.abs(a.startTime-b.startTime)&&.001>Math.abs(a.endTime-b.endTime)))return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!ud(a.nestedCues,b.nestedCues,Ae))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!ud(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0} function Be(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&De(b);var d=c;c=[];for(var e=-1,f=0;f"===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=He(c);a.payload="";try{var m=Id(""+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())Ie(c.value,a,b);else a.payload=cc(c);else a.payload=cc(c)}else a.payload=cc(c)}function De(a){for(var b=t(Object.entries(Je)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new oe(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Ke));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new oe(0,0,""),e.backgroundColor=d,a.set("."+c,e)} function He(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 Ie(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new od;d.position=null;d.size=0;d.textAlign=qe;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=Le(g.backgroundColor,h.backgroundColor),h.color=Le(g.color,h.color),h.fontFamily=Le(g.fontFamily,h.fontFamily), h.fontSize=Le(g.fontSize,h.fontSize),h.textShadow=Le(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=ze(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=Me;break;case "i":d.fontStyle=Ne;break;case "u":d.textDecoration.push(Oe);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break; if(f=Cd(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Nd(a)||1==e.length&&Nd(e[0]))for(c=Qd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ze(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));I(d)})};function uf(a,b,c){a.l=b;a.m=c}function vf(a,b,c){a.D=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 wf(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())wf(a,d.value,c)} function xf(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,[]);wf(a,k,e);k.startTime>=a.l&&k.startTimey?(y=B,A=[D.og]):B==y&&A.push(D.og);m.push.apply(m,x(A))});h=m}c=new Set;b=new Set;h=t(h);for(e=h.next();!e.done;e=h.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);h=Array.from(c).sort(function(y,z){return y.bandwidth-z.bandwidth});var n=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=g(e);l=c.get(k)||[];if(l.length){var q=l[l.length-1],r=gf(q.codecs),u=gf(e.codecs);r!=u||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),n.push(e.id))}else l.push(e), n.push(e.id);c.set(k,l)}var w={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};h=Array.from(b).sort(function(y,z){if(!y.bandwidth||!z.bandwidth||y.bandwidth==z.bandwidth){if(y.codecs&&z.codecs&&y.codecs!=z.codecs&&y.width==z.width){var A=gf(y.codecs),B=gf(z.codecs);if(A!=B)return(w[A]||1)-(w[B]||1)}return y.width-z.width}return y.bandwidth-z.bandwidth});b=dd();var v=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=f(e); l=c.get(k)||[];if(l.length){q=l[l.length-1];if(!b&&(r=gf(q.codecs),u=gf(e.codecs),r!==u))continue;r=gf(q.codecs);u=gf(e.codecs);r!=u||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),v.push(e.id))}else l.push(e),v.push(e.id);c.set(k,l)}a.variants=a.variants.filter(function(y){var z=y.audio;y=y.video;return z&&!n.includes(z.id)||y&&!v.includes(y.id)?!1:!0})} function Gf(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={videoCodec:void 0},d=b.next())if(e.videoCodec=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.videoCodec)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={audioCodec:void 0},b=c.next())if(d.audioCodec=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.audioCodec)}}(d)),b.length){a=b;break}return a} function Hf(a,b,c){a.variants=a.variants.filter(function(d){return If(d,b,c)})} function If(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 Jf(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return Q(function(e){if(1==e.g)return F(e,Kf(a,b,0=a&&e.width>=b){a=e.height;b=e.width;break}c=og(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&& !c.length&&(c=og(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.u-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.u<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))} function og(a,b,c,d,e){if(a.D){var f=a.D.Qi();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return If(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function pg(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})}S("shaka.abr.SimpleAbrManager",ng);ng.prototype.configure=ng.prototype.configure; ng.prototype.setCmsdManager=ng.prototype.setCmsdManager;ng.prototype.setMediaElement=ng.prototype.setMediaElement;ng.prototype.playbackRateChanged=ng.prototype.playbackRateChanged;ng.prototype.setVariants=ng.prototype.setVariants;ng.prototype.getBandwidthEstimate=ng.prototype.getBandwidthEstimate;ng.prototype.trySuggestStreams=ng.prototype.trySuggestStreams;ng.prototype.segmentDownloaded=ng.prototype.segmentDownloaded;ng.prototype.disable=ng.prototype.disable;ng.prototype.enable=ng.prototype.enable; ng.prototype.chooseVariant=ng.prototype.chooseVariant;ng.prototype.init=ng.prototype.init;ng.prototype.release=ng.prototype.release;ng.prototype.stop=ng.prototype.stop;var rg=1;S("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function sg(a,b){if(a===b||!a.length||!b.length)return!0;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(tg(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||tg(e))return!0}return!1} function wg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri|| f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}else tg(d)?c.push(d):tg(f)&&c.push(f)}return c} function xg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function yg(a){return a?!!a.match(/^com\.apple\.fps/):!1}function tg(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}var zg=new Qb(function(){return Lb(new Uint8Array([0]))}),Ag=new Map;function Fg(a,b){var c=Gg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1} function Hg(a){var b,c;return Q(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new V(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 F(d,new Promise(function(e){(new zf(e)).X(c/1E3)}),2)}a.h*=a.m;I(d)})}function Gg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ig(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ig.prototype.resolve=function(){};Ig.prototype.reject=function(){};function Jg(a,b){this.promise=a;this.i=b;this.g=null}function Kg(a){return new Jg(Promise.reject(a),function(){return Promise.resolve()})}function Lg(){var a=Promise.reject(new V(2,7,7001));a.catch(function(){});return new Jg(a,function(){return Promise.resolve()})}function Mg(a){return new Jg(Promise.resolve(a),function(){return Promise.resolve()})}function Ng(a){return new Jg(a,function(){return a.catch(function(){})})}Jg.prototype.abort=function(){this.g||(this.g=this.i());return this.g}; function Og(a){return new Jg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Jg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this}; Jg.prototype.ab=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Pg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ig;f.catch(function(){});var g=new V(2,7,7001);this.promise.then(c(!0),c(!1));return new Jg(f,function(){return d()})}; function Pg(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()}}}ea.Object.defineProperties(Jg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});S("shaka.util.AbortableOperation",Jg);Jg.prototype.chain=Jg.prototype.ab;Jg.prototype["finally"]=Jg.prototype.finally; Jg.all=Og;Jg.prototype.abort=Jg.prototype.abort;Jg.notAbortable=Ng;Jg.completed=Mg;Jg.aborted=Lg;Jg.failed=Kg;function Qg(){this.g=[]}function Rg(a,b){a.g.push(b.finally(function(){sd(a.g,b)}))}Qg.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 Sg(a,b,c,d,e,f,g){jb.call(this);this.i=null;this.j=!1;this.u=new Qg;this.g=new Set;this.h=new Set;this.s=a||null;this.m=b||null;this.B=c||null;this.C=d||null;this.D=e||null;this.G=f||null;this.F=g||null;this.l=new Map}pa(Sg,jb);p=Sg.prototype;p.configure=function(a){this.i=a};function Tg(a,b,c,d){d=void 0===d?!1:d;c=c||Ug;var e=Vg.get(a);(!e||c>=e.priority)&&Vg.set(a,{priority:c,Pf:b,Pl:d})} function Wg(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)}p.Sl=function(a){this.g.add(a)};p.pm=function(a){this.g.delete(a)};p.hk=function(){this.g.clear()};p.Tl=function(a){this.h.add(a)};p.qm=function(a){this.h.delete(a)};p.ik=function(){this.h.clear()};p.Fi=function(){this.l.clear()}; function Xg(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}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();jb.prototype.release.call(this);return this.u.destroy()}; p.request=function(a,b,c){var d=this,e=new Yg;if(this.j){var f=Promise.reject(new V(2,7,7001));f.catch(function(){});return new Zg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ed(b.retryParameters):Gg();b.uris=Ed(b.uris);f=$g(this,a,b,c);var g=f.ab(function(){return ah(d,a,b,c,new Fg(b.retryParameters,!1),0,null,e)}),h=g.ab(function(q){return bh(d,a,q,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.ab(function(q){var r=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=r;q.ql||!d.s||u.fromCache||"HEAD"==b.method||a!=ch||d.s(u.timeMs,u.data.byteLength,dh(c),b,c);d.F&&d.F(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new Zg(n.promise,function(){return n.abort()},e);Rg(this.u,f);return f}; function $g(a,b,c,d){function e(h){f=f.ab(function(){c.body&&(c.body=Lb(c.body));return h(b,c,d)})}var f=Mg(void 0);a.D&&e(a.D);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.ab(void 0,function(h){if(h instanceof V&&7001==h.code)throw h;throw new V(2,1,1006,h);})} function ah(a,b,c,d,e,f,g,h){a.i.forceHTTP&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.i.forceHTTPS&&(c.uris[f]=c.uris[f].replace("http://","https://"));0this.h.byteLength)throw kh();var b=Kb(this.h,this.g,a);this.g+=a;return b}; p.skip=function(a){if(this.g+a>this.h.byteLength)throw kh();this.g+=a};p.vj=function(a){if(this.ga||a>this.h.byteLength)throw kh();this.g=a};p.jd=function(){for(var a=this.g;this.Oa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Kb(this.h,a,this.g-a);this.g+=1;return Wb(a)};function kh(){return new V(2,3,3E3)}S("shaka.util.DataViewReader",ih);ih.prototype.readTerminatedString=ih.prototype.jd;ih.prototype.seek=ih.prototype.seek;ih.prototype.rewind=ih.prototype.vj; ih.prototype.skip=ih.prototype.skip;ih.prototype.readBytes=ih.prototype.Xb;ih.prototype.readUint64=ih.prototype.Ld;ih.prototype.readInt32=ih.prototype.Jh;ih.prototype.readUint32=ih.prototype.W;ih.prototype.readUint16=ih.prototype.Fa;ih.prototype.readUint8=ih.prototype.aa;ih.prototype.getLength=ih.prototype.getLength;ih.prototype.getPosition=ih.prototype.Ua;ih.prototype.hasMoreData=ih.prototype.Oa;var jh=1;ih.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:jh};function lh(){this.i=new Map;this.h=new Map;this.g=!1}p=lh.prototype;p.box=function(a,b){a=mh(a);this.i.set(a,nh);this.h.set(a,b);return this};p.V=function(a,b){a=mh(a);this.i.set(a,oh);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new ih(a,0);for(this.g=!1;a.Oa()&&!this.g;)this.Gd(0,a,b,c)}; p.Gd=function(a,b,c,d){var e=b.Ua();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.W(),g=b.W(),h=ph(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ua()+8>b.getLength()){this.g=!0;return}f=b.Ld();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==oh){if(d&&b.Ua()+4>b.getLength()){this.g=!0;return}n=b.W();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(g-=b.Ua(),b=0>24&255,a>>16&255,a>>8&255,a&255)}function rh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",lh);lh.headerSize=rh;lh.typeToString=ph;lh.allData=vh;lh.audioSampleEntry=uh;lh.visualSampleEntry=th;lh.sampleDescription=sh;lh.children=qh;lh.prototype.parseNext=lh.prototype.Gd;lh.prototype.parse=lh.prototype.parse; lh.prototype.stop=lh.prototype.stop;lh.prototype.fullBox=lh.prototype.V;lh.prototype.box=lh.prototype.box;var nh=0,oh=1;function wh(a){var b=this;this.g=[];this.h=[];this.data=[];(new lh).box("moov",qh).box("moof",qh).V("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 V(2,6,6006,f.message,f,h))}})}function fi(a){return Q(function(b){return 1==b.g?a.J?F(b,a.m,3):b.A(0):F(b,Promise.all(a.P.map(function(c){return c.promise})),0)})} function Ph(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w;Q(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&gc(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=Xg([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 y=g,z=a.g;try{var A=Zb(y.body);if(A){var B=JSON.parse(A);B.type||(B.type=z.sessionType,y.body=$b(JSON.stringify(B)))}}catch(D){}}if(xg(a.g.keySystem))if(y=Xb(g.body,!0,!0),y.includes("PlayReadyKeyMessage")){y=Id(y,"PlayReadyKeyMessage");z=Sd(y,"HttpHeader");z=t(z);for(A=z.next();!A.done;A=z.next())B=A.value,A=Sd(B,"name")[0],B=Sd(B,"value")[0],g.headers[Qd(A)]=Qd(B);y=Sd(y,"Challenge")[0];g.body=hc(Qd(y))}else g.headers["Content-Type"]="text/xml; charset=utf-8"; k=Date.now();ta(v,2);m=a.D.xc.request(2,g,{isPreload:a.O()});a.P.push(m);return F(v,m.promise,4);case 4:l=v.h;sd(a.P,m);wa(v,3);break;case 2:n=xa(v);if(a.l.g)return v.return();q=new V(2,6,6007,n);1==a.i.size?(a.u(q),d&&d.Nb&&d.Nb.reject(q)):(d&&d.Nb&&d.Nb.reject(q),a.i.delete(c),Vh(a)&&(a.m.resolve(),a.K.X(.1)));return v.return();case 3:if(a.l.g)return v.return();a.H+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&gc(l.data);ta(v,5);return F(v,c.update(l.data),7);case 7:wa(v,6);break;case 5:return r= xa(v),u=new V(2,6,6008,r.message),a.u(u),d&&d.Nb&&d.Nb.reject(u),v.return();case 6:if(a.l.g)return v.return();w=new U("drmsessionupdate");a.D.onEvent(w);d&&(d.Nb&&d.Nb.resolve(),ci(a,d));I(v)}})} function ei(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}h=Rb();if(xg(a.g.keySystem)&&16==g.byteLength&&h.Ph()){h=Ob(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=jc(g).slice(0,32);a.U.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Nb&&(a.i.delete(b),gi(b));Vh(a)&&(a.m.resolve(), a.K.X(ki))}function zh(a){var b=a.U,c=a.$;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 V(2,6,6014));a.D.Lf(hh(c))} function li(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,D,G,C,E,H,K,J,L,N,O,M,P,R,T;return Q(function(ca){if(1==ca.g){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&& window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b={};c=t(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return ca.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'}, {contentType:'video/webm; codecs="vp8"'}];m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};q=[null,"cenc","cbcs","cbcs-1-9"];r=new Map;u=Rb();w=function(Y,Ma){var Na,Ea,va,Ja,Pa,za,ja,Aa,eb,fb,nb,wb,rb;return Q(function(Ua){switch(Ua.g){case 1:return ta(Ua,2),F(Ua,Ma.createMediaKeys(),5);case 5:Na=Ua.h;case 4:wa(Ua,3);break;case 2:return xa(Ua),Ua.return();case 3:va= (Ea=Ma.getConfiguration().sessionTypes)?Ea.includes("persistent-license"):!1;u.gj()&&(va=!1);Ja=Ma.getConfiguration().videoCapabilities;Pa=Ma.getConfiguration().audioCapabilities;za={persistentState:va,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.has(Y)&&r.get(Y)?za=r.get(Y):r.set(Y,za);(ja=Ja[0].encryptionScheme)&&!za.encryptionSchemes.includes(ja)&&za.encryptionSchemes.push(ja);(Aa=Ja[0].robustness)&&!za.videoRobustnessLevels.includes(Aa)&&za.videoRobustnessLevels.push(Aa); (eb=Pa[0].robustness)&&!za.audioRobustnessLevels.includes(eb)&&za.audioRobustnessLevels.push(eb);if("getStatusForPolicy"in Na){fb=[];nb=t(f);wb=nb.next();for(rb={};!wb.done;rb={ge:void 0},wb=nb.next())rb.ge=wb.value,za.minHdcpVersions.includes(rb.ge)||fb.push(Na.getStatusForPolicy({minHdcpVersion:rb.ge}).then(function(se){return function(rc){"usable"!=rc||za.minHdcpVersions.includes(se.ge)||za.minHdcpVersions.push(se.ge)}}(rb)));return F(Ua,Promise.all(fb),0)}Ua.A(0)}})};v=function(Y,Ma,Na,Ea){var va, Ja,Pa,za,ja,Aa,eb,fb,nb,wb,rb;return Q(function(Ua){switch(Ua.g){case 1:ta(Ua,2);va=Ed(n);Ja=t(va.videoCapabilities);for(Pa=Ja.next();!Pa.done;Pa=Ja.next())za=Pa.value,za.encryptionScheme=Ma,za.robustness=Na;ja=t(va.audioCapabilities);for(Aa=ja.next();!Aa.done;Aa=ja.next())eb=Aa.value,eb.encryptionScheme=Ma,eb.robustness=Ea;fb=Ed(va);fb.persistentState="required";fb.sessionTypes=["persistent-license"];nb=[fb,va];rb=Rb();return"MOBILE"==rb.Ja()?F(Ua,Df(5,navigator.requestMediaKeySystemAccess(Y,nb)), 7):F(Ua,navigator.requestMediaKeySystemAccess(Y,nb),6);case 6:wb=Ua.h;Ua.A(5);break;case 7:wb=Ua.h;case 5:return F(Ua,w(Y,wb),8);case 8:wa(Ua,0);break;case 2:xa(Ua),I(Ua)}})};y=function(Y,Ma,Na,Ea){var va,Ja,Pa,za;return Q(function(ja){switch(ja.g){case 1:return ta(ja,2),va={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:m[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:Y,video:{encryptionScheme:Ma, robustness:Na},audio:{encryptionScheme:Ma,robustness:Ea}}},Pa=Rb(),"MOBILE"==Pa.Ja()?F(ja,Df(5,navigator.mediaCapabilities.decodingInfo(va)),7):F(ja,navigator.mediaCapabilities.decodingInfo(va),6);case 6:Ja=ja.h;ja.A(5);break;case 7:Ja=ja.h;case 5:return za=Ja.keySystemAccess,F(ja,w(Y,za),8);case 8:wa(ja,0);break;case 2:xa(ja),I(ja)}})};z=t(a);for(A=z.next();!A.done;A=z.next())B=A.value,r.set(B,null);D=function(Y){return"WEBKIT"===Rb().Ga()&&"org.w3.clearkey"===Y?!1:!0};G=[];C=t(q);for(E=C.next();!E.done;E= C.next())for(H=E.value,K=t(a),J=K.next();!J.done;J=K.next())L=J.value,D(L)&&(G.push(v(L,H,"","")),G.push(y(L,H,"","")));N=t(a);for(O=N.next();!O.done;O=N.next())for(M=O.value,P=t(k[M]||[]),R=P.next();!R.done;R=P.next())T=R.value,D(M)&&(G.push(v(M,null,T,"")),G.push(v(M,null,"",T)),G.push(y(M,null,T,"")),G.push(y(M,null,"",T)));return F(ca,Promise.all(G),2)}return ca.return(hh(r))})} function gi(a){return Q(function(b){if(1==b.g)return ta(b,2),F(b,Df(mi,Promise.all([a.close().catch(function(){}),a.closed])),4);if(2!=b.g)return wa(b,0);xa(b);I(b)})} function Ch(a){var b;return Q(function(c){b=Array.from(a.i.entries());a.i.clear();return F(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return Q(function(g){if(1==g.g)return ta(g,2),a.ba||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?F(g,gi(e),5):F(g,e.remove(),5);if(2!=g.g)return wa(g,0);xa(g);I(g)})})),0)})}function Kh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])} function Ah(a){a.i.forEach(function(b,c){var d=b.Eh,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Eh=e)})}function Vh(a){a=a.i.values();return lb(a,function(b){return b.loaded})}function Uh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.U.get(c.value))return!1;return!0} function Jh(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 ai(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Qa:void 0},l=a.next()){m.Qa=l.value;b.includes(m.Qa.encryptionScheme)||b.push(m.Qa.encryptionScheme);"org.w3.clearkey"==m.Qa.keySystem&&m.Qa.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Qa.licenseServerUri)||k.push(m.Qa.licenseServerUri):c.includes(m.Qa.licenseServerUri)||c.push(m.Qa.licenseServerUri);e.includes(m.Qa.serverCertificateUri)||e.push(m.Qa.serverCertificateUri);m.Qa.serverCertificate&& (d.some(function(r){return function(u){return Jb(u,r.Qa.serverCertificate)}}(m))||d.push(m.Qa.serverCertificate));if(m.Qa.initData){l=t(m.Qa.initData);for(var n=l.next(),q={};!n.done;q={sh:void 0},n=l.next())q.sh=n.value,f.some(function(r){return function(u){var w=r.sh;return u.keyId&&u.keyId==w.keyId?!0:u.initDataType==w.initDataType&&Jb(u.initData,w.initData)}}(q))||f.push(q.sh)}if(m.Qa.keyIds)for(l=t(m.Qa.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Qa.keySystemUris&&h)for(m=t(m.Qa.keySystemUris), l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}} function Li(a,b,c){var d=a.W(),e=[],f=null;c&1&&(f=a.Jh());c&4&&a.skip(4);for(var g=0;ga?"0":"")+a};function Ri(a){if(!Si){Si=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Ti=Ui("ftyp",b,d,b,c);b=Ui("dref",Vi);Wi=Ui("dinf",b)}this.g=a} function Xi(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=Ui;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/(Yi+1));m=Math.floor(m%(Yi+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Zi(h,4)),[0,0,0,0],x(Zi(n,4)),x(Zi(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(Zi(k,2)),[0,0],x(Zi(l, 2)),[0,0]));h=Ui("tkhd",h);k=Ui;n=g.duration*g.timescale;l=Math.floor(n/(Yi+1));n=Math.floor(n%(Yi+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Zi(g.timescale,4)),x(Zi(l,4)),x(Zi(n,4)),x(Zi(m,2)),[0,0]));l=Ui("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=$i;break;case "audio":m=aj}n=Ui("hdlr",m);a:{switch(g.type){case "video":g=Ui("minf",Ui("vmhd",bj),Wi,cj(g));break a; case "audio":g=Ui("minf",Ui("smhd",dj),Wi,cj(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=kc.apply(dc,x(b));f=a.g[0];c=Ui;d=f.duration*f.timescale;e=Math.floor(d/(Yi+1));d=Math.floor(d%(Yi+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Zi(f.timescale,4)),x(Zi(e,4)),x(Zi(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=Ui("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Zi(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Ui("trex",k),h.call(g,k);a=kc.apply(dc,x(d));a=Ui("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=kc.apply(dc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Ti.byteLength+ a.byteLength);b.set(Ti);b.set(a,Ti.byteLength);return b} function cj(a){var b=Ui,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=Rb().we()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;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(x(Zi(c,2)),x(Zi(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=fj(a);g=new Uint8Array([]);a.encrypted&&(g=gj(0,a.stream,a.codecs),d="encv");d=Ui(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=gj(0,a.stream,a.codecs),d="enca");a=Ui(d,hj(a),c,e)}d=a}a=Ui("stsd",ij,d);return b("stbl",a,Ui("stts",jj),Ui("stsc",kj),Ui("stsz",lj),Ui("stco",mj))}function fj(a){if(!a.bb&&!a.eb)return new Uint8Array([]);var b=a.eb;a=new Uint8Array([].concat(x(Zi(a.bb,4)),x(Zi(b,4))));return Ui("pasp",a)} function hj(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Zi(a.stream.audioSamplingRate||44100,2)),[0,0]))} function gj(a,b,c){a=Ui;c=new Uint8Array([].concat(x(Zi(nj(c.split(".")[0]),4))));c=Ui("frma",c);var d="cenc";var e=b.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(x(Zi(nj(d),4)),[0,1,0,0]));d=Ui("schm",d);e=Ui;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);b=t(b.drmInfos);for(var g=b.next();!g.done;g=b.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=ej(h.value)}b=new Uint8Array([0,0,0,0,0, 0,1,8]);b=Ui("tenc",b,f);return a("sinf",c,d,e("schi",b))} function oj(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Ui;var g=new Uint8Array([0,0,0,0].concat(x(Zi(c.data?c.data.Yb:0,4))));g=Ui("mfhd",g);var h;var k=c.data?c.data.Cb:[];var l=new Uint8Array(4+k.length);for(h=0;h>8*b&255);return c}function ej(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;c>8*m&255);a.set(new Uint8Array(l),h);a.set(k,h+4);h=t(g);for(k=h.next();!k.done;k=h.next())k=k.value,wj(a,k.start,k.size+4)}}return a} function tj(a,b,c,d,e,f){var g=gj(new Ri([]),a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Ob(a).setUint32(4,f);a.set(g,d.size);wj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=Rb().wf()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,wj(f,e.start,e.size+a.byteLength);a=Ob(f,c.start);c=rh(c);b=a.getUint32(c);a.setUint32(c,b+1);return f} function wj(a,b,c){a=Ob(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))} function xj(a){function b(e){d.push({start:e.start,size:e.size});qh(e)}var c=Kb(a),d=[];(new lh).box("moov",b).box("trak",b).box("mdia",b).box("minf",b).box("stbl",b).box("stsd",function(e){d.push({start:e.start,size:e.size});for(var f=Ob(c,e.start),g=0;ga.end(0)-a.start(0)}function Fj(a){return!a||Ej(a)?null:a.length?a.end(a.length-1):null}function Gj(a,b){return!a||!a.length||Ej(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Hj(a,b){if(!a||!a.length||Ej(a))return 0;var c=0;a=t(Ij(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 Jj(a,b,c){if(!a||!a.length||Ej(a))return null;a=Ij(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ij(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 Vj(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 Wj(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 Xj(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=Wb(Kb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Wb(Kb(a.data,3+c,f)),h;"--\x3e"===d?h=Wb(Kb(a.data,4+c+f)):h=Lb(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=Wb(Kb(a.data,1,d));a=Wb(Kb(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=Wb(Kb(a.data,1,d));a=Wb(Kb(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=Wb(Kb(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=Lb(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=Wb(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Wb(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Lb(a.data),b):null} function Yj(a){for(var b=0,c=[];Uj(a,b);){var d=Wj(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+=Wj(a,b+6),Vj(a,b+10)&&(d+=10),b+=d;return 0>>32-c;a.g-=c;0>>b))return a.h<<=b,a.g-=b,b;ck(a);return b+fk(a)}function gk(a){dk(a,1+fk(a))}function hk(a){var b=fk(a);return ek(a,b+1)-1}function ik(a){a=hk(a);return 1&a?1+a>>>1:-1*(a>>>1)}function jk(a){return 1===ek(a,1)}function kk(a){return ek(a,8)} function lk(a,b){for(var c=8,d=8,e=0;ea.length)return this;for(var b=Math.max(0,ok(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.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,uf:-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=qk(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=c.pts!= e?qk(d,a.s):d);a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.Ol=function(a){Uc("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Gh(a,{qe:null,state:null})}; p.Gh=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.qe&&(c=k.length?k[k.length-1]:b.qe)&&(c.data=kc(c.data,a),c.fullData=kc(c.fullData,a));b.state=f;return k}; p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=kc.apply(dc,x(c.value)),(c=pk(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Yj(c.data),dts:c.dts,pts:c.pts});return a}; p.yb=function(){if(this.i.length&&!this.h.length)for(var a=t(this.i),b=a.next();!b.done;b=a.next()){var c=kc.apply(dc,x(b.value)),d=pk(this,c);b=this.h.length?this.h[this.h.length-1]:null;d&&null!=d.pts&&null!=d.dts&&(!b||b.pts!=d.pts&&b.dts!=d.dts)?this.h.push(d):this.h.length&&(c=d?d.data:c)&&(b=this.h.pop(),b.data=kc(b.data,c),this.h.push(b))}return this.h}; p.dd=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=t(this.j),c=b.next();!c.done;c=b.next()){var d=kc.apply(dc,x(c.value)),e=pk(this,d);c=this.g.length?this.g[this.g.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?this.g.push(e):this.g.length&&(d=e?e.data:d)&&(c=this.g.pop(),c.data=kc(c.data,d),this.g.push(c))}if(a){b={qe:null,state:null};c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())e=e.value,e.nalus=this.Gh(e,b),e.nalus.length&&(c.push(e), b.qe=e.nalus[e.nalus.length-1]);this.g=c}}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.yb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.dd(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.ae=function(){return{audio:this.B,video:this.m}};p.tf=function(){for(var a=[],b=t(this.dd()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a}; p.ll=function(){Uc("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.nh();return{height:a.height,width:a.width}};p.nh=function(){return"hvc"==this.m?rk(this):sk(this)};function tk(a){var b=a.dd();return 1h?lk(c,16):lk(c,64))}}gk(c);g=hk(c);if(0===g)hk(c);else if(1===g)for(dk(c,1),gk(c),gk(c),g=hk(c),h=0;hy;y++)ek(d,2);for(y=0;yC;C++)G|=(D>>C&1)<<31-C;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());q&&(f+="."+q.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=tk(a);return b}function qk(a,b){var c=1;for(a>b&&(c=-1);4294967296ok(a)?!1:!0}function ok(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 Lk(a,b){return a.l.size?b==sc?a.h.h:Fj(Kk(a,b)):null}function Mk(a,b,c){if(b==sc)return a=a.h,null==a.h||a.hb?F(g,Pk(e,a,function(){return Vk(e,a,b,c)},null),5):g.A(0)):e.m?F(g,Pk(e,f.ma,function(){return Vk(e,f.ma,b,c)},null),0):g.A(0)})}; function Wk(a,b){var c;return Q(function(d){return 1==d.g?(c=uc,b==c.gb?a.h?F(d,a.h.remove(0,Infinity),0):d.return():F(d,Pk(a,b,function(){return Vk(a,b,0,a.i.duration)},null),4)):a.m?F(d,Pk(a,c.ma,function(){return Vk(a,c.ma,0,a.i.duration)},null),0):d.A(0)})}p.flush=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=uc,a==c.gb?d.return():F(d,Pk(b,a,function(){b.g.currentTime-=.001;Hk(b,a)},null),2)):b.m?F(d,Pk(b,c.ma,function(){var e=c.ma;b.g.currentTime-=.001;Hk(b,e)},null),0):d.A(0)})}; function Xk(a,b,c,d,e,f,g,h,k){var l,m,n;return Q(function(q){if(1==q.g){l=uc;if(b==l.gb)return f||(a.h.u=c),uf(a.h,d,e),q.return();m=[];return F(q,Yk(a,b,g,h,k),2)}n=q.h;n||(m.push(Pk(a,b,function(){return Qk(a,b)},null)),a.m&&m.push(Pk(a,l.ma,function(){return Qk(a,l.ma)},null)));f||(m.push(Pk(a,b,function(){return Rk(a,b,c)},null)),a.m&&m.push(Pk(a,l.ma,function(){return Rk(a,l.ma,c)},null)));if(0!=d||Infinity!=e)m.push(Pk(a,b,function(){return Zk(a,b,d,e)},null)),a.m&&m.push(Pk(a,l.ma,function(){return Zk(a, l.ma,d,e)},null));return m.length?F(q,Promise.all(m),0):q.A(0)})}function $k(a,b,c){var d,e;return Q(function(f){if(1==f.g){d=uc;if(b==d.gb)return f.return();b==d.Ea&&(a.Na=new Ig);if(!a.G||(e=Lk(a,b))&&.1>Math.abs(e-c))return f.return();Pk(a,b,function(){return Qk(a,b)},null);a.m&&Pk(a,d.ma,function(){return Qk(a,d.ma)},null);return F(f,Pk(a,b,function(){return Rk(a,b,c)},null),2)}return a.m?F(f,Pk(a,d.ma,function(){return Rk(a,d.ma,c)},null),0):f.A(0)})} p.endOfStream=function(a){var b=this;return Q(function(c){return F(c,al(b,function(){Ck(b)||Dk(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.vb=function(a){var b=this;return Q(function(c){return F(c,al(b,function(){if(b.B.durationReductionEmitsUpdateEnd&&ac&&(c+=.001);var d=!0;"HLS"==a.P&&(d=Lk(a,b),d=!d||.15=b.s&&d&&!b.i)b.j&&b.j(b.g,e),b.i=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Jj(c,b,a.h.gapDetectionThreshold),null==d||0==d&&!a.B||(e=c.start(d), (f=a.h.gapPadding)&&(e=Math.ceil(100*(e+f))/100),e>=a.C.Jb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.j&&(a.j=e),a.D++,a.u(new U("gapjumped")))))}}} function zl(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new Cl(new Dl(a.g),b,function(){var d;return Q(function(e){if(1==e.g)return d=Ij(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.A(2)):F(e,a.g.play(),3):e.return();if(2!=e.g){if(!a.g)return e.return();a.g.pause();a.g.play()}a.G++;a.u(new U("stalldetected"));I(e)})})}function Cl(a,b,c){this.h=a;this.m=Bl(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.s=b;this.j=c} Cl.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function Dl(a){var b=this;this.g=a;this.h=new Oc;this.i=!1;this.h.o(this.g,"audiofocuspaused",function(){b.i=!0});this.h.o(this.g,"audiofocusgranted",function(){b.i=!1});this.h.o(this.g,"audiofocuslost",function(){b.i=!0})} function Bl(a){if(a.g.paused||0==a.g.playbackRate||a.i||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Ij(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(bc.end-.5)){b=!0;break a}b=!1}return b}Dl.prototype.release=function(){this.h&&this.h.release();this.h=null};function El(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Fl.value().get(b),c.qa(a,b,d))}var Fl=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 Gl(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 Oc;this.i=new Hl(a);El(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Il(e,e.j())})}Gl.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 Jl(a){return a.s?a.g.currentTime:a.j()} function Kl(a,b){0Math.abs(a.g.currentTime-b)?Ml(a):(a.h.qa(a.g,"seeking",function(){Ml(a)}),Ll(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Ml(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)} function Hl(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new zf(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--)})}Hl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Ll(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.ya(.1)};function Nl(a){this.g=a;this.i=!1;this.h=null;this.j=new Oc}p=Nl.prototype;p.ready=function(){function a(){if(null==b.h||0==b.h&&Infinity!=b.g.duration)b.i=!0;else{var c=b.g.currentTime,d=null;if("number"===typeof b.h)d=b.h;else if(b.h instanceof Date){var e=Ol(b);null!==e&&(d=b.h.getTime()/1E3-e,d=Pl(b,d))}null==d?b.i=!0:(0>d&&(d=Math.max(0,c+d)),c!=d?(b.j.qa(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;El(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){a()})}; p.release=function(){this.j&&(this.j.release(),this.j=null);this.g=null};p.sg=function(a){this.h=this.i?this.h:a};p.Ue=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(Ol(this)||0),a=Pl(this,a));return a||0};p.ri=function(){return 0};p.pi=function(){return 0};p.jj=function(){};p.Xi=function(){var a=Fj(this.g.buffered);return null!=a&&a>=this.g.duration-1};function Ol(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null} function Pl(a,b){a=a.g.seekable;0l-k&&(k=l-3);ha.g.getDuration()?a.g.bc():a.g.Jb():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):0>b&&(b=a.g.Jb()+b);return Ul(a,Tl(a,b))}p.jj=function(){this.j.Mf()};p.Xi=function(){if(this.g.T()){var a=this.g.Hc(),b=Fj(this.h.buffered);if(null!=b&&b>=a)return!0}return!1}; function Ul(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Rl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.bc(),f=a.g.Jb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ce(c),k=a.g.ce(d);c=a.g.ce(c+d);return b>=g?Ul(a,b):b>f?f-a.l.safeSeekEndOffset:b=h||Gj(a.h.buffered,b)?b:c}function Tl(a,b){var c=a.g.bc();if(ba?a:b};function Vl(a){this.g=a;this.m=null;this.i=0;this.s=!1}p=Vl.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Il=function(){this.s=!0};p.Hb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function cg(a){return a.g[0]||null} p.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]};p.offset=function(a){if(!this.s)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)}; p.Ff=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.Ff(a);this.hb(b)};p.hb=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}}; p.yd=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 Aj(a.startTime,b,a.D,a.startByte,a.endByte,a.ea,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)}}; p.ig=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new zf(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.ya(a))};Vl.prototype[Symbol.iterator]=function(){return this.ac(0)}; Vl.prototype.ac=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]}; S("shaka.media.SegmentIterator",Wl);Wl.prototype.resetToLastIndependent=Wl.prototype.Nh;Wl.prototype.next=Wl.prototype.next;Wl.prototype.current=Wl.prototype.current;Wl.prototype.currentPosition=Wl.prototype.lk;Wl.prototype.setReverse=Wl.prototype.Pd;function Yl(){Vl.call(this,[]);this.h=[]}pa(Yl,Vl);p=Yl.prototype;p.clone=function(){var a=new Yl;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]}; p.Hb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Hb(a)};function Zl(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.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};function $l(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,null!=c.find(b))return c.hf();return-1} p.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};p.offset=function(){};p.Ff=function(){};p.hb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.hb(a);for(;1=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)} em.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.Mg;a:{var e=c.ve;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.Ed;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&&!ud(d.roles,e.roles);(g||h||d)&&im(this,a,e.contentType)&&(c.Mg=e,d=new U("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&im(this,a,e.contentType)&&(c.Mg=e,JSON.stringify(e),c=new U("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}}; function im(a,b,c){return(a=a.h()[c])&&0=a[0].start&&b=d?!1:!0})}else b.ve=[]} function jm(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 km(a){jb.call(this);this.h=new Map;this.i=a;this.g=null}pa(km,jb);km.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);jb.prototype.release.call(this)};function lm(a,b){var c=b.schemeIdUri+"_"+b.id+"_"+(b.startTime.toFixed(1)+"_"+b.endTime.toFixed(1));a.h.has(c)||(a.h.set(c,b),b=new U("regionadd",new Map([["region",b]])),a.dispatchEvent(b),mm(a))} function mm(a){a.g||(a.g=(new zf(function(){for(var b=a.i(),c=t(a.h),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;e.endTimed.endTime&&vm(this,d);b&&tm(this)}; nm.prototype.Pd=function(a){this.s=a;this.g&&this.g.Pd(a)};function tm(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={uh:void 0},d=c.next())e.uh=d.value,b.some(function(f){return function(g){return zj(g.ea,f.uh)}}(e))||vm(a,e.uh)}function xm(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&vm(a,d)}tm(a)}function ym(a,b){b&&b!==a.i&&(wm(a),a.i=b)}function vm(a,b){var c=a.h;b instanceof yj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()} function rm(a){this.g=a;this.se=this.ci=null}function sm(a,b,c){var d=new Uint8Array(0);a.se=a.g(b,c,function(e){return Q(function(f){if(1==f.g)return 0>3,31===K&&C.Oa()&&(K=32+((H&7)<<3)+((C.aa()&224)>>5)),E+="."+K));g.push(E);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("apac",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(C){var E=y||"";switch(y){case "dvav":E="avc3";break;case "dva1":E="avc1"}C=C.reader;C.skip(1);C=E+"."+Pi(C.aa())+Pi(C.aa())+Pi(C.aa());h.push(C);l=!0}).box("hvcC",function(C){var E=y||"";switch(y){case "dvh1":E="hvc1";break;case "dvhe":E="hev1"}var H=C.reader;H.skip(1);C=H.aa();var K=["","A","B","C"][C>>6],J=C&31,L=H.W(),N=(C&32)>>5?"H":"L";C=[H.aa(),H.aa(),H.aa(),H.aa(),H.aa(),H.aa()];H=H.aa();for(var O= 0,M=0;32>M;M++){O|=L&1;if(31==M)break;O<<=1;L>>=1}E=E+("."+K+J)+("."+Pi(O,!0));E+="."+N+H;K="";for(J=C.length;J--;)if((N=C[J])||K)K="."+N.toString(16).toUpperCase()+K;E+=K;h.push(E);l=!0}).box("dvcC",function(C){var E=y||"";switch(y){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 H=C.reader;H.skip(2);C=H.aa();H=H.aa();h.push(E+"."+Qi(C>>1&127)+"."+Qi(C<<5&32|H>>3&31));l=!0}).box("dvvC",function(C){var E=y||"";switch(y){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 H=C.reader;H.skip(2);C=H.aa();H=H.aa();h.push(E+"."+Qi(C>>1&127)+"."+Qi(C<<5&32|H>>3&31));l=!0}).V("vpcC",function(C){var E=y||"",H=C.reader;C=H.aa();var K=H.aa();H=H.aa()>>4&15;h.push(E+"."+Qi(C)+"."+Qi(K)+"."+Qi(H));l=!0}).box("av1C",function(C){var E=y||"";switch(y){case "dav1":E="av01"}var H=C.reader;H.skip(1);C=H.aa();H=H.aa();var K=C>>>5,J=(H&64)>>6;h.push(E+"."+K+"."+Qi(C& 31)+(H>>>7?"H":"M")+"."+Qi(2===K&&J?(H&32)>>5?12:10:J?10:8)+"."+((H&16)>>4)+"."+((H&8)>>3)+((H&4)>>2)+(H&3)+"."+Qi(1)+"."+Qi(1)+"."+Qi(1)+".0");l=!0}).box("enca",uh).box("encv",th).box("sinf",qh).box("frma",function(C){C=Ni(C.reader).codec;f(C)}).box("colr",function(C){h=h.map(function(K){if(K.startsWith("av01.")){var J=C.reader,L=J.Ua(),N=J.Xb(4);var O=String.fromCharCode(N[0]);O+=String.fromCharCode(N[1]);O+=String.fromCharCode(N[2]);O+=String.fromCharCode(N[3]);if("nclx"===O){N=J.Fa();O=J.Fa(); var M=J.Fa(),P=J.aa()>>7,R=K.split(".");10==R.length&&(R[6]=Qi(N),R[7]=Qi(O),R[8]=Qi(M),R[9]=String(P),K=R.join("."))}J.seek(L)}return K});var E=Oi(C.reader),H=E.colorGamut;w=E.Ge;v=H}).parse(a||b,!0,!0);if(!g.length&&!h.length)return null;var z=k&&!l,A=new Map;if(l&&!c){c=new id("video/mp4");a&&c.init(a);try{c.Of(b);for(var B=t(c.rg()),D=B.next();!D.done;D=B.next()){var G=D.value;A.set(G,G)}}catch(C){}c.Sd()}return{type:z?"audio":"video",mimeType:z?"audio/mp4":"video/mp4",codecs:Bm(g.concat(h)).join(", "), language:m,height:n,width:q,channelCount:r,sampleRate:u,closedCaptions:A,Ge:w,colorGamut:v,frameRate:null}}function Bm(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=jf(d);b.has(e)||(c.push(d),b.add(e))}b=tc("audio",c);d=tc("video",c);a=tc(sc,c);d=Cm(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b} function Cm(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?bd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a} function Dm(a){var b=null;(new lh).box("moov",qh).box("trak",qh).box("mdia",qh).box("minf",qh).box("stbl",qh).V("stsd",sh).box("encv",th).box("enca",uh).box("sinf",qh).box("schi",qh).V("tenc",function(c){c=c.reader;c.aa();c.aa();c.aa();c.aa();b=jc(c.Xb(16))}).parse(a,!0);return b} function Em(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=b,d.cryptoKey?k.A(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Kb(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 Fm(a,b,c,d,e){a=Xg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Gm(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.J=new Map;this.D=1;this.B=this.s=null;this.O=0;this.h=new Map;this.I=!1;this.P=null;this.C=!1;this.l=new eh(function(){return Hm(c)});this.L=Date.now()/1E3;this.m=new Map;this.N={projection:null,hfov:null};this.U=0;this.R=Infinity;this.F=null;this.K=[];this.u=new zf(function(){if(c.j&&c.g)if(c.j.presentationTimeline.T()){var d=c.j.presentationTimeline.bc(),e=c.j.presentationTimeline.Jb();1a.g.Xa(),d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.Aa&&e.Aa.Pd(c),e.ia&&e.ia.Pd(c);d=t(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.Pd(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Oc&&(Tm(a,b,!1,0,!1),c.Oc=d);else if(b=c.Oc)c.Oc=null,Tm(a,b,!0,0,!1)} function Um(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.s=b;a.I&&(b.video&&Tm(a,b.video,c,d,e,f),b.audio&&Tm(a,b.audio,c,d,e,f))}function Vm(a,b){Q(function(c){if(1==c.g)return a.F=null,a.B=b,a.I?b.segmentIndex?c.A(2):F(c,b.createSegmentIndex(),2):c.return();Tm(a,b,!0,0,!1);I(c)})}function Wm(a){var b=a.h.get(sc);b&&Tm(a,b.stream,!0,0,!0)} function Xm(a,b){for(var c=t(a.J.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.J.delete(d))}} function Tm(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=sc?g&&(g.Oc&&(b.trickModeVideo?(g.Oc=b,b=b.trickModeVideo):g.Oc=null),g.stream!=b||e)&&(a.m.has(b)?g.ia=a.m.get(b):g.ia&&ym(g.ia,b),b.type==sc&&(e=bf(b.mimeType,b.codecs),Fk(a.g.ha,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Za?(e="("+g.type+":"+g.stream.id+")",a.J.has(e)||a.J.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream= b,g.Aa=null,g.zg=!!f,b.dependencyStream?g.$d=Pm(a,b.dependencyStream):g.$d=null,e&&(g.Bb=null,g.tc=null,g.sc=null,b.isAudioMuxedInVideo&&(b=null,"video"===g.type?b=a.h.get("audio"):"audio"===g.type&&(b=a.h.get("video")),b&&(Jm(b).catch(function(){}),b.Bb=null,b.tc=null,b.sc=null,Ym(a,b),Zm(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.Vc?g.pg=!0:g.Za?(g.Tc=!0,g.gf=d,g.pg=!0):(Im(g),$m(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Za||g.Db||Qm(a,g,0),Zm(a,g).catch(function(h){if(a.g)a.g.onError(h)})): Om(a,b)} function Zm(a,b){var c,d;return Q(function(e){if(1==e.g){if(!b.Mb)return e.return();c=b.stream;d=b.Mb;return c.segmentIndex?e.A(2):F(e,c.createSegmentIndex(),2)}if(b.Mb!=d||b.stream!=c)return e.return();var f=a.g.cd();var g=Lk(a.g.ha,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.endByte?k.endByte-k.startByte:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ea)&&(h+=(k.endByte?k.endByte-k.startByte:null)|| 0),k=a.g.getBandwidthEstimate(),f=8*h/k<(g||0)-f-a.i.rebufferingGoal||b.Mb.h.g>h?!0:!1):f=!1;f&&b.Mb.abort();I(e)})} p.md=function(){if(this.g){for(var a=this.g.cd(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e=this.g.ha;d==sc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&aa.g.Xa()):null} function Lm(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={Pb:void 0},e=d.next())if(f.Pb=e.value,f.Pb.audio)if(a.m.has(f.Pb.audio)){if(e=a.m.get(f.Pb.audio),xm(e,b),!(0=b||!c.some(function(h){return function(k){return xc(h.Pb.audio.language,k)}}(f))||!(e=Km(a,f.Pb.audio))|| (f.Pb.audio.segmentIndex||f.Pb.audio.createSegmentIndex(),a.m.set(f.Pb.audio,e))}p.updateDuration=function(){var a=ed(),b=this.j.presentationTimeline.getDuration();Infinity>b?(a&&(this.u&&this.u.stop(),cl(this.g.ha)),this.g.ha.vb(b)):a?(this.u&&this.u.ya(.5),this.g.ha.vb(Infinity)):this.g.ha.vb(Math.pow(2,32))}; function dn(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:fh(a.l);if(b.Za||null==b.Db||b.Vc)return k.return();b.Db=null;if(!b.Tc){k.A(2);break}return F(k,$m(a,b,b.pg,b.gf),3);case 3:return k.return();case 2:Xm(a,b);if(b.stream.segmentIndex){k.A(4);break}c=b.stream;ta(k,5);return F(k,b.stream.createSegmentIndex(),7);case 7:wa(k,6);break;case 5:return d=xa(k),F(k,en(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Za||b.Db|| Qm(a,b,0),k.return();case 4:ta(k,9);e=fn(a,b);null!=e&&(Qm(a,b,e),b.fe=!1);wa(k,10);break;case 9:return f=xa(k),F(k,en(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.h.values());if(!a.I||!g.every(function(l){return l.endOfStream})){k.A(0);break}return F(k,a.g.ha.endOfStream(),13);case 13:fh(a.l),h=a.g.ha.getDuration(),0!=h&&hh&&k)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(sc))&&gn(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.Aa;k=hn(a,b,d,k);if(!k)return c;g=!1;h&&b.zg&&(g=!0,b.zg=!1);h=Infinity;var l=Array.from(a.h.values());l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,gn(m)||m.Aa&&!m.Aa.current()||(h=Math.min(h,m.Ra?m.Ra.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;if("keep"!==a.i.crossBoundaryStrategy&&jn(a,b,k))return null;b.ia&&b.Aa&& !a.m.has(b.stream)&&(b.ia.hb(k.startTime+.001),pm(b.ia,k.startTime).catch(function(){}));kn(a,b,d,k,g).catch(function(){});b.$d&&ln(a,b.$d,d,f);return null} function hn(a,b,c,d){if(b.Aa)return(c=b.Aa.current())&&b.Ra&&.001>Math.abs(b.Ra.startTime-c.startTime)&&(c=b.Aa.next().value),c;if(b.Ra||d)return c=b.Ra?b.Ra.endTime:d,a=0>a.g.Xa(),b.stream.segmentIndex&&(b.Aa=b.stream.segmentIndex.ac(c,!1,a)),b.Aa&&b.Aa.next().value;d=a.j.sequenceMode?0:a.i.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Xa();var f=null;d&&(b.stream.segmentIndex&&(b.Aa=b.stream.segmentIndex.ac(e,!1,a)),f=b.Aa&&b.Aa.next().value);f||(b.stream.segmentIndex&&(b.Aa=b.stream.segmentIndex.ac(c, !1,a)),f=b.Aa&&b.Aa.next().value);return f} function kn(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,D,G;return Q(function(C){switch(C.g){case 1:f=uc;g=b.stream;h=b.Aa;b.Za=!0;ta(C,2);if(2==d.Jc())throw new V(1,1,1011);return F(C,mn(a,b,d,e),4);case 4:fh(a.l);if(a.C)return C.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.i.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&("HLS"!=a.j.type||d.m))return r=new Uint8Array(0),w=u=!1,y=function(E){var H,K,J,L;return Q(function(N){switch(N.g){case 1:if(u)return N.return();w= !0;fh(a.l);if(a.C)return N.return();ta(N,2);r=kc(r,E);H=!1;K=0;(new lh).box("mdat",function(O){K=O.size+O.start;H=!0}).parse(r,!1,!0);if(!H){N.A(4);break}J=r.subarray(0,K);r=r.subarray(K);return F(N,nn(a,b,c,g,d,J,!0,e),5);case 5:b.ia&&b.Aa&&pm(b.ia,d.startTime,!0);case 4:wa(N,0);break;case 2:v=L=xa(N),I(N)}})},F(C,on(a,b,d,y),9);n=on(a,b,d);return F(C,n,7);case 7:q=C.h;fh(a.l);if(a.C)return C.return();fh(a.l);return b.Tc?(b.Za=!1,Qm(a,b,0),C.return()):F(C,nn(a,b,c,g,d,q,!1,e),6);case 9:z=C.h;if(v)throw v; if(w){C.A(10);break}u=!0;fh(a.l);return a.C?C.return():b.Tc?(b.Za=!1,Qm(a,b,0),C.return()):F(C,nn(a,b,c,g,d,z,!1,e),10);case 10:b.ia&&b.Aa&&pm(b.ia,d.startTime,!0);case 6:fh(a.l);if(a.C)return C.return();b.Ra=d;h.next();b.Za=!1;b.Kh=!1;A=a.g.ha.Qb();B=A[b.type];gb(JSON.stringify(B));b.Tc||(D=null,b.type===f.Ea?D=a.h.get(f.ma):b.type===f.ma&&(D=a.h.get(f.Ea)),D&&D.type==f.ma?a.g.Mf(d,b.stream,D.stream.isAudioMuxedInVideo):a.g.Mf(d,b.stream,b.stream.codecs.includes(",")));Qm(a,b,0);wa(C,0);break;case 2:G= xa(C);fh(a.l,G);if(a.C)return C.return();b.Za=!1;if(7001==G.code)b.Za=!1,Im(b),Qm(a,b,0),C.A(0);else if(b.type==f.gb&&a.i.ignoreTextStreamFailures)a.h.delete(f.gb),C.A(0);else{if(3017==G.code)return F(C,pn(a,b,G),0);b.fe=!0;1==G.category&&b.ia&&vm(b.ia,d);G.severity=2;return F(C,en(a,b,G),0)}}})} function ln(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return Q(function(w){switch(w.g){case 1:e=b.stream;for(h=(g=(f=e.segmentIndex)&&f.ac(c))&&g.next().value;h&&a.K.includes(h.startTime);)h=g&&g.next().value;if(!h){w.A(0);break}k=h.ea;if(!k||zj(k,b.Bb)){w.A(3);break}b.Bb=k;ta(w,4);return F(w,on(a,b,k),6);case 6:l=w.h;var v=a.g.ha;v.L&&Zc(v.L,l,0,e);a.K=[];wa(w,3);break;case 4:throw m=xa(w),b.Bb=null,m;case 3:if(b.Ra&&b.Ra==h){w.A(0);break}b.Ra=h;ta(w,8);return F(w,on(a,b,h),10);case 10:n=w.h;v=a.g.ha;v.L&& Zc(v.L,n,0,e);a.K.push(h.startTime);wa(w,9);break;case 8:throw q=xa(w),b.Ra=null,q;case 9:r=Math.max.apply(Math,[0].concat(x(a.K)));u=a.g.cd();if(u+d>r)return F(w,ln(a,b,h.startTime,d),0);w.A(0)}})} function pn(a,b,c){var d,e,f,g,h,k;return Q(function(l){if(1==l.g){d=Array.from(a.h.values());if(e=d.some(function(m){return m!=b&&m.Kh}))return l.A(2);f=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();if(a.i.avoidEvictionOnQuotaExceededError)return Qm(a,b,4),l.return();h=Math.round(100*a.D);if(20k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():F(q,a.g.ha.remove(b.type,g,g+n,e), 2)}if(4!=q.g)return fh(a.l),a.F?F(q,qn(a,a.F,c),4):q.A(0);fh(a.l);I(q)})}function gn(a){return a&&a.type==sc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)} function on(a,b,c,d){var e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(e=c.cc())return l.return(e);f=null;if(b.ia){var m=b.ia,n=m.h;c instanceof yj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.ci=d),f=m.se):f=null}f||(f=cn(c,b.stream,d||null,a.i.retryParameters,a.g.xc));g=0;b.Aa&&(g=b.Aa.h);b.Mb=f;return F(l,f.promise,2);case 2:h=l.h;b.Mb=null;k=h.data;if(!c.aesKey){l.A(3);break}return F(l,Em(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})} function cn(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof Aj?a:void 0,h=g?1:0;a=Fm(a.S(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(ch,a,{type:h,stream:b,segment:g,isPreload:f})} function $m(a,b,c,d){var e,f;return Q(function(g){if(1==g.g)return b.Tc=!1,b.pg=!1,b.gf=0,b.Vc=!0,b.Ra=null,b.Aa=null,b.ia&&!a.m.has(b.stream)&&wm(b.ia),d?(e=a.g.cd(),f=a.g.ha.getDuration(),F(g,a.g.ha.remove(b.type,e+d,f),3)):F(g,Wk(a.g.ha,b.type),4);if(3!=g.g)return fh(a.l),c?F(g,a.g.ha.flush(b.type),3):g.A(3);fh(a.l);b.Vc=!1;b.endOfStream=!1;b.Za||b.Db||Qm(a,b,0);I(g)})} function Qm(a,b,c){var d=b.type;if(d!=sc||a.h.has(d))b.Db=(new yf(function(){var e;return Q(function(f){if(1==f.g)return ta(f,2),F(f,dn(a,b),4);if(2!=f.g)return wa(f,0);e=xa(f);if(a.g)a.g.onError(e);I(f)})})).X(c)}function Im(a){null!=a.Db&&(a.Db.stop(),a.Db=null)}function Jm(a){return Q(function(b){return a.Mb?F(b,a.Mb.abort(),0):b.A(0)})} function en(a,b,c){var d;return Q(function(e){if(1==e.g)return 3024==c.code?(b.Za=!1,Im(b),Qm(a,b,0),e.return()):F(e,Hg(a.P),2);fh(a.l);if(1===c.category&&1003!=c.code){if(b.Oc)return Sm(a,!1),e.return();d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.i.failureCallback(c);I(e)})} function tn(a,b){b=void 0===b?!1:b;var c=void 0===c?!0:c;var d,e,f,g,h;return Q(function(k){if(1==k.g){d=Date.now()/1E3;e=a.i.minTimeBetweenRecoveries;if(!b){if(!a.i.allowMediaSourceRecoveries||d-a.Lb||1e)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 xn(a,b){return a&&b} function yn(a,b){function c(f){for(var g=t(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&0===Object.keys(f[h]).length)delete f[h];else{var k=f[h];Array.isArray(k)&&0===k.length?delete f[h]:"function"==typeof f[h]?delete f[h]:e(f[h])&&(c(f[h]),0===Object.keys(f[h]).length&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])|| (h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),0"===c.substr(0,5)&&""===c.substr(-6)&&(c=c.slice(5,-6),a=!0);if(!a)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=Lb(hc(c)))}};zn.muxFairPlayRequest=function(a,b){Dn(a,b)}; zn.expressplayFairPlayRequest=function(a,b){if(2===a){var c=b.drmInfo;c&&yg(c.keySystem)&&Dn(a,b)}};zn.conaxFairPlayRequest=function(a,b){Dn(a,b)};zn.ezdrmFairPlayRequest=function(a,b){Dn(a,b)};zn.verimatrixFairPlayRequest=function(a,b){2===a&&(a=b.drmInfo)&&yg(a.keySystem)&&(a=Kb(b.body),a=gc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=$b("spc="+a))};zn.muxInitDataTransform=function(a,b,c){return Cn(a,b,c)}; zn.expressplayInitDataTransform=function(a,b,c){return Cn(a,b,c)};zn.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Zb(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Nb(d);for(var e=0,f=c.length;eb?!1:!0}).sort(function(c,d){return c.audio||d.audio?c.audio?d.audio?(d.audio.channelsCount||0)-(c.audio.channelsCount||0):1:-1:0})}function In(a,b){if("AUTO"==b){var c=a.some(function(d){return d.video&&d.video.hdr&&"HLG"==d.video.hdr?!0:!1});b=On(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})} function Hn(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Mn(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Nn(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Pn(){} function Qn(){var a=Infinity,b=Rb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:Gg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&"skd"==k&&(k=l.serverCertificate,l=An(h),h=Bn(h,l,k));return h},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1, minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},d="reload",e=!1;dd()&&b.pd()&&(d="smooth",e=!0);e={retryParameters:Gg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1, updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready", "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Rn,manifestPreprocessorTXml:Sn,sequenceMode:!1,multiTypeVariantsAllowed:e,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1, ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:b.od(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Rn,manifestPreprocessorTXml:Sn,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}}; var f={trackSelectionCallback:function(h){return Q(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return Q(function(l){if(1==l.g)return navigator.storage&&navigator.storage.estimate?F(l,navigator.storage.estimate(),3):l.return(!0);k=l.h;return l.return(k.usage+h<.95*k.quota)})},progressCallback:function(h,k){return xn([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:Gg(),failureCallback:function(h){return xn([h])}, rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1, prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5, preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(h){return xn([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k){return xn([h,k])},dispatchAllEmsgBoxes:!1, useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new ng},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(En,[null].concat(x(Ka.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity, minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"", preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity, textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1, allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:30,repeatMode:0}};f.trackSelectionCallback=function(h){return Q(function(k){return k.return(Tn(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.$a(g)} function Un(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}} function Vn(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return vn(a,b,c||Qn(),d,"")} function Tn(a,b,c){var d=c;"AUTO"==d&&(c=a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1}),d=On(c));var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Gc(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return yc(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height- 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!=sc&&"image"!=c.type||b.push(c);return b}function Rn(a){return xn([a],a)}function Sn(a){return xn([a],a)}S("shaka.util.PlayerConfiguration",Pn);Pn.mergeConfigObjects=Vn;Pn.createDefaultForLL=Un;Pn.createDefault=Qn;function Wn(){this.g=null;this.h=[]}function Xn(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Yn(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Zn(){this.i=this.h=null;this.g=[]}function $n(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function ao(){this.C=this.U=NaN;this.l="";this.j=this.bj=this.u=this.B=this.J=this.D=this.s=this.m=this.I=this.F=this.i=this.P=this.R=this.L=this.N=this.O=NaN;this.K=0;this.G=this.H=NaN;this.g=new Wn;this.h=new Zn}function bo(a,b,c){a.O=b;a.N=c}function co(a,b,c){a.U=b;a.C=c}function eo(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function fo(a,b){a.j=isNaN(a.j)?b:a.j+b} function go(a){var b=a.U,c=a.C,d=a.l,e=a.B,f=a.N,g=a.O,h=a.L,k=a.R,l=a.P,m=a.u,n=a.i,q=a.F,r=a.I,u=a.m,w=Xn(a.g,"playing"),v=Xn(a.g,"paused"),y=Xn(a.g,"buffering"),z=a.s,A=a.D,B=a.J,D=a.bj,G=a.j,C=a.K,E=a.H,H=a.G,K=Yn(a.g),J=[];a=t(a.h.g);for(var L=a.next();!L.done;L=a.next())L=L.value,J.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:b,height:c,currentCodecs:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,corruptedFrames:h, stallsDetected:k,gapsJumped:l,estimatedBandwidth:m,completionPercent:n,loadLatency:q,manifestTimeSeconds:r,drmTimeSeconds:u,playTime:w,pauseTime:v,bufferingTime:y,licenseTime:z,liveLatency:A,maxSegmentDuration:B,manifestSizeBytes:D,bytesDownloaded:G,nonFatalErrorCount:C,manifestPeriodCount:E,manifestGapCount:H,stateHistory:K,switchHistory:J}};function ho(a,b,c,d){jb.call(this);this.N=a;this.U=b;this.La=d.networkingEngine;this.m=c;this.B=null;this.Ia=0;this.Ya=d.vd;this.F=d.Fl;this.cb=d.Gl;this.g=d.config;this.l=this.G=this.h=null;this.oa=!1;this.H=d.Rl;this.ra=!1;this.i=null;this.ba=!1;this.j=this.D=null;this.Z=!1;this.L=new Map;this.sa=!1;this.Na=d.Ql;this.Y=new ao;this.na=new Ig;this.u=new Ig;this.O=null;this.s=!1;this.$=d.ek;this.R=this.J=null;this.Ta=d.dk;this.P=!1;this.K=[];this.I=[];this.C=!0}pa(ho,jb); function io(a,b,c){(a=b?a.I:a.K)?a.push(c):c()}function jo(a){if(a.I)for(var b=t(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function ko(a,b){a.O=b;a.P=!0;if(a.K){b=t(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}p=ho.prototype;p.getStartTime=function(){return this.m};p.$c=function(){return this.N};p.ih=function(){return this.h};function lo(a){a.Z=!0;return a.j}function mo(a){a.ra=!0;return a.H}p.getStats=function(){return this.Y}; function no(a){a.ba=!0;return a.i}p.Uk=function(){return this.J?$f(this.J):null};p.Tk=function(){return this.R?ag(this.R):null};function oo(a){a.sa=!0;return a.L} p.start=function(){var a=this;(function(){var b;return Q(function(c){switch(c.g){case 1:return F(c,Promise.resolve(),2);case 2:return ta(c,3),F(c,po(a),5);case 5:qo(a);if("webkit"===window.shakaMediaKeysPolyfill){c.A(6);break}return F(c,ro(a),7);case 7:qo(a);case 6:return F(c,so(a),8);case 8:qo(a);if(!a.$||!a.i){c.A(9);break}return F(c,fi(a.i),10);case 10:qo(a);case 9:a.u.resolve();wa(c,0);break;case 3:b=xa(c),b instanceof V&&(7001==b.code||7003==b.code)||a.u.reject(b),I(c)}})})()}; p.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):jb.prototype.dispatchEvent.call(this,a)};p.onError=function(a){2===a.severity&&(this.u.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function qo(a){if(a.s)throw new V(2,7,7003);}function to(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))} function po(a){var b,c,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:to(a,"manifest-parser");a.l||(a.G=Hi(a.N,a.U),a.l=a.G(),a.l.configure(a.g.manifest,function(){return a.C}));b=Date.now()/1E3;to(a,"manifest");if(a.h){m.A(2);break}return F(m,a.l.start(a.N,a.cb),3);case 3:a.h=m.h;if(1!=a.h.variants.length){m.A(2);break}c=[];d=a.h.variants[0];e=t([d.video,d.audio]);for(f=e.next();!f.done;f=e.next())(g=f.value)&&!g.segmentIndex&&c.push(g.createSegmentIndex());if(!(0d.endTime?Ao:xo;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.td==e&&h.sd==f&&h.ed(d,b)}}};function yo(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var zo=1,xo=2,Ao=3;function Bo(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:var n=(new qb(a)).ub.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Co.get(d))return m.return(e);f=0;g=Xg([a],c);ta(m,2);g.method="HEAD";return F(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.A(3);break}g.method="GET";return F(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 Co=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv", "text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");/* @license Copyright 2013 Ali Al Dallal Licensed under the MIT license. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ for(var Do={ach:"Lwo",ady:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"T\u0255\u0265i",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-AR":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-MA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-SA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)","ay-BO":"Aymar aru",az:"Az\u0259rbaycan dili","az-AZ":"Az\u0259rbaycan dili", "be-BY":"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bg:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438","bg-BG":"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bn:"\u09ac\u09be\u0982\u09b2\u09be","bn-IN":"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)","bn-BD":"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)","bs-BA":"Bosanski",ca:"Catal\u00e0","ca-ES":"Catal\u00e0",cak:"Maya Kaqchikel","ck-US":"\u13e3\u13b3\u13a9 (tsalagi)", cs:"\u010ce\u0161tina","cs-CZ":"\u010ce\u0161tina",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (\u00d6sterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserb\u0161\u0107ina",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac","el-GR":"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)", "en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Espa\u00f1ol","es-AR":"Espa\u00f1ol (Argentine)","es-419":"Espa\u00f1ol (Latinoam\u00e9rica)","es-CL":"Espa\u00f1ol (Chile)","es-CO":"Espa\u00f1ol (Colombia)","es-EC":"Espa\u00f1ol (Ecuador)","es-ES":"Espa\u00f1ol (Espa\u00f1a)","es-LA":"Espa\u00f1ol (Latinoam\u00e9rica)","es-NI":"Espa\u00f1ol (Nicaragua)","es-MX":"Espa\u00f1ol (M\u00e9xico)", "es-US":"Espa\u00f1ol (Estados Unidos)","es-VE":"Espa\u00f1ol (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"\u0641\u0627\u0631\u0633\u06cc","fa-IR":"\u0641\u0627\u0631\u0633\u06cc","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"F\u00f8royskt",fr:"Fran\u00e7ais","fr-CA":"Fran\u00e7ais (Canada)","fr-FR":"Fran\u00e7ais (France)","fr-BE":"Fran\u00e7ais (Belgique)","fr-CH":"Fran\u00e7ais (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)", gl:"Galego","gl-ES":"Galego","gn-PY":"Ava\u00f1e'\u1ebd","gu-IN":"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0","gx-GR":"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",he:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f","he-IL":"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",hi:"\u0939\u093f\u0928\u094d\u0926\u0940","hi-IN":"\u0939\u093f\u0928\u094d\u0926\u0940",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserb\u0161\u0107ina",ht:"Krey\u00f2l",hu:"Magyar","hu-HU":"Magyar","hy-AM":"\u0540\u0561\u0575\u0565\u0580\u0565\u0576", id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"\u00cdslenska","is-IS":"\u00cdslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"\u65e5\u672c\u8a9e","ja-JP":"\u65e5\u672c\u8a9e","jv-ID":"Basa Jawa","ka-GE":"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8","kk-KZ":"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a","km-KH":"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kab:"Taqbaylit",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1","kn-IN":"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)", ko:"\ud55c\uad6d\uc5b4","ko-KR":"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",ku:"Kurd\u00ee","ku-TR":"Kurd\u00ee",la:"Latin","la-VA":"Latin",lb:"L\u00ebtzebuergesch","li-NL":"L\u00e8mb\u00f6rgs",lt:"Lietuvi\u0173","lt-LT":"Lietuvi\u0173",lv:"Latvie\u0161u","lv-LV":"Latvie\u0161u",mai:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0","mg-MG":"Malagasy",mk:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438","mk-MK":"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)", ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","ml-IN":"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","mn-MN":"\u041c\u043e\u043d\u0433\u043e\u043b",mr:"\u092e\u0930\u093e\u0920\u0940","mr-IN":"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"\u1017\u1019\u102c\u1005\u1000\u102c",nb:"Norsk (bokm\u00e5l)","nb-NO":"Norsk (bokm\u00e5l)",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","ne-NP":"\u0928\u0947\u092a\u093e\u0932\u0940",nl:"Nederlands","nl-BE":"Nederlands (Belgi\u00eb)", "nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"\u0b13\u0b21\u0b3c\u0b3f\u0b06",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40","pa-IN":"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",pl:"Polski","pl-PL":"Polski","ps-AF":"\u067e\u069a\u062a\u0648",pt:"Portugu\u00eas","pt-BR":"Portugu\u00eas (Brasil)","pt-PT":"Portugu\u00eas (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Rom\u00e2n\u0103","ro-RO":"Rom\u00e2n\u0103",ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439", "ru-RU":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","sa-IN":"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d","se-NO":"Davvis\u00e1megiella","si-LK":"\u0db4\u0dc5\u0dcf\u0dad",sk:"Sloven\u010dina","sk-SK":"Sloven\u010dina (Slovakia)",sl:"Sloven\u0161\u010dina","sl-SI":"Sloven\u0161\u010dina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"\u0421\u0440\u043f\u0441\u043a\u0438","sr-RS":"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili", "sw-KE":"Kiswahili",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd","ta-IN":"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41","te-IN":"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tg:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301","tg-TJ":"\u0442\u043e\u04b7\u0438\u043a\u04e3",th:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22","th-TH":"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",tl:"Filipino","tl-PH":"Filipino", tlh:"tlhIngan-Hol",tr:"T\u00fcrk\u00e7e","tr-TR":"T\u00fcrk\u00e7e","tt-RU":"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",uk:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430","uk-UA":"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648","ur-PK":"\u0627\u0631\u062f\u0648",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Ti\u1ebfng Vi\u1ec7t","vi-VN":"Ti\u1ebfng Vi\u1ec7t","xh-ZA":"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9","yi-DE":"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)", zh:"\u4e2d\u6587","zh-HANS":"\u4e2d\u6587\u7b80\u4f53","zh-HANT":"\u4e2d\u6587\u7e41\u9ad4","zh-CN":"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09","zh-HK":"\u4e2d\u6587\uff08\u9999\u6e2f\uff09","zh-SG":"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09","zh-TW":"\u4e2d\u6587\uff08\u53f0\u7063\uff09","zu-ZA":"isiZulu"},Eo=t(Object.keys(Do)),Fo=Eo.next();!Fo.done;Fo=Eo.next()){var Go=Fo.value;Do[Go.toLowerCase()]=Do[Go]};function Ho(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Ho(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=Me,e=a.fontStyle==Ne,f=a.textDecoration.includes(Oe);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Io(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Io(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 Io(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 Mo(a,b){var c=Jo(b),d=[];b=a.cues?Array.from(a.cues):[];c=t(c);for(var e=c.next(),f={};!e.done;f={Bd:void 0},e=c.next())f.Bd=e.value,!b.some(function(g){return function(h){return h.startTime==g.Bd.startTime&&h.endTime==g.Bd.endTime&&h.text==g.Bd.payload?!0:!1}}(f))&&f.Bd.payload&&(e=Lo(f.Bd))&&d.push(e);b=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)- d.indexOf(h)});b=t(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function No(a,b){var c=!1;"disabled"===a.mode&&(c=!0,a.mode="hidden");for(var d=0;d d&&"hidden"===g.track.mode&&(d=f)}e=t(b.h);for(f=e.next();!f.done;f=e.next())g=t(f.value),f=g.next().value,g=g.next().value,f!==d&&"disabled"!==g.track.mode&&(g.track.mode="disabled");b.g!==d&&(b.g=d,-1a});else return!1;return!0};p.append=function(a){this.h.has(this.g)&&Mo(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.C(),this.i=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.u}; p.setTextVisibility=function(a){this.u=a;if(this.h.has(this.g)){var b=this.h.get(this.g).track;"disabled"!==b.mode&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.i&&3===this.i.m)if(b=Array.from(this.i.h.textTracks).filter(function(d){return["captions","subtitles","forced"].includes(d.kind)}),a){a=null;b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"showing"===c.mode){a=null;break}else a||"hidden"!==c.mode||(a=c);a&&(a.mode="showing")}else for(a=t(b),b=a.next();!b.done;b= a.next())b=b.value,"showing"===b.mode&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.i&&2===this.i.m&&(this.j=this.i.h,this.l.qa(this.i,"unloading",this.C),this.l.o(this.i,"textchanged",this.m),this.l.o(this.j.textTracks,"change",this.B),this.m())}; function Po(a){var b=Rb();return a.forced&&"WEBKIT"===b.Ga()?"forced":"caption"===a.kind||a.roles&&a.roles.some(function(c){return c.includes("transcribes-spoken-dialog")})&&a.roles.some(function(c){return c.includes("describes-music-and-sound")})?"captions":"subtitles"}S("shaka.text.NativeTextDisplayer",Oo);Oo.prototype.enableTextDisplayer=Oo.prototype.enableTextDisplayer;Oo.prototype.setTextLanguage=Oo.prototype.setTextLanguage;Oo.prototype.setTextVisibility=Oo.prototype.setTextVisibility; Oo.prototype.isTextVisible=Oo.prototype.isTextVisible;Oo.prototype.destroy=Oo.prototype.destroy;Oo.prototype.append=Oo.prototype.append;Oo.prototype.remove=Oo.prototype.remove;Oo.prototype.configure=Oo.prototype.configure;function Qo(a,b){Uc("SimpleTextDisplayer","Please migrate to NativeTextDisplayer");this.h=a;this.i=b;this.g=null;a=t(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,"metadata"!==b.kind&&"chapters"!==b.kind&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=Qo.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;No(this.g,function(c){return c.startTimea});return!0}; p.append=function(a){this.g&&Mo(this.g,a)};p.destroy=function(){this.g&&(No(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};p.setTextVisibility=function(a){a&&!this.g&&Ro(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){Ro(this)};function Ro(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")} S("shaka.text.SimpleTextDisplayer",Qo);Qo.prototype.enableTextDisplayer=Qo.prototype.enableTextDisplayer;Qo.prototype.setTextLanguage=Qo.prototype.setTextLanguage;Qo.prototype.setTextVisibility=Qo.prototype.setTextVisibility;Qo.prototype.isTextVisible=Qo.prototype.isTextVisible;Qo.prototype.destroy=Qo.prototype.destroy;Qo.prototype.append=Qo.prototype.append;Qo.prototype.remove=Qo.prototype.remove;Qo.prototype.configure=Qo.prototype.configure;function So(){}p=So.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};S("shaka.text.StubTextDisplayer",So);So.prototype.enableTextDisplayer=So.prototype.enableTextDisplayer;So.prototype.setTextLanguage=So.prototype.setTextLanguage;So.prototype.setTextVisibility=So.prototype.setTextVisibility; So.prototype.isTextVisible=So.prototype.isTextVisible;So.prototype.destroy=So.prototype.destroy;So.prototype.append=So.prototype.append;So.prototype.remove=So.prototype.remove;So.prototype.configure=So.prototype.configure;function To(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.s=b;this.C=this.u=null;this.g=W("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.B=new zf(function(){c.j.paused||Uo(c)});Vo(this);this.l=new Map;this.i=new Oc;this.i.o(document,"fullscreenchange",function(){Uo(c,!0)});this.i.o(this.j,"seeking",function(){Uo(c,!0)}); this.i.o(this.j,"ratechange",function(){Vo(c)});this.i.o(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.u=e/d:c.u=null});this.D=null;"ResizeObserver"in window&&(this.D=new ResizeObserver(function(){Uo(c,!0)}),this.D.observe(this.g));this.F=new Map}p=To.prototype;p.configure=function(a){this.C=a;Vo(this);Uo(this,!0)}; p.append=function(a){var b=[].concat(x(this.h));a=t(Ko(a));for(var c=a.next(),d={};!c.done;d={Kg:void 0},c=a.next())d.Kg=c.value,b.some(function(e){return function(f){return Ae(f,e.Kg)}}(d))||this.h.push(d.Kg);this.h.length&&Vo(this);Uo(this)}; p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.B&&(this.B.stop(),this.B=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.D&&(this.D.disconnect(),this.D=null);return Promise.resolve()};p.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});Uo(this,c>this.h.length);this.h.length||Vo(this);return!0}; p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.s.appendChild(this.g),Uo(this,!0)):this.g.parentElement&&this.s.removeChild(this.g)};p.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function Vo(a){a.B&&(a.h.length?a.B.ya((a.C?a.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.B.stop())} function Wo(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1} function Xo(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.l.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Zj:null;l&&(g.push(l.Lg),l.ld&&g.push(l.ld),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?Wo(a,n)||(f=!0):(Yo(a,k,e),l=a.l.get(k),n=l.Zj,f=!0));0a.u&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==te?(f.width="100%",c.lineAlign==ve?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==ve?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==ve?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%")))); f.lineHeight=c.lineHeight;a=$o(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==te?(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==te?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==te?(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==te?f.width=c.size+"%":f.height=c.size+"%")} function ap(a,b,c,d){d=void 0===d?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function bp(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",To);To.prototype.enableTextDisplayer=To.prototype.enableTextDisplayer; To.prototype.setTextLanguage=To.prototype.setTextLanguage;To.prototype.setTextVisibility=To.prototype.setTextVisibility;To.prototype.isTextVisible=To.prototype.isTextVisible;To.prototype.remove=To.prototype.remove;To.prototype.destroy=To.prototype.destroy;To.prototype.append=To.prototype.append;To.prototype.configure=To.prototype.configure;function cp(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=Jo(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 qe: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}S("shaka.text.WebVttGenerator",function(){});function dp(a,b){this.h=a;this.g=b;this.i=void 0;this.u=!1;this.F=!0;this.l=this.C=!1;this.s=this.m=void 0;this.B=0;this.G=!1;this.D=new Oc;this.j=null}dp.prototype.setMediaElement=function(a){this.j=a;ep(this)};dp.prototype.configure=function(a){this.g=a};function fp(a){a.u=!1;a.F=!0;a.C=!1;a.l=!1;a.m=0;a.s=0;a.B=0;a.G=!1;a.j=null;a.D.Sa()}function gp(a,b){a.l=b;a.l?a.i==hp?a.i=ip:a.i==jp&&(a.i=kp):a.i==ip?a.i=hp:a.i==kp&&(a.i=jp)} function lp(a,b){if(a.g&&a.g.enabled&&a.g.version==mp&&a.j&&a.j.autoplay){var c=a.j.play();c&&c.then(function(){a.B=b}).catch(function(){a.B=0})}} function np(a,b,c){try{if(!a.g.enabled)return b;var d=op(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=pp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=qp;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=rp;break a}e=void 0}d.ot=e;d.su= !0;var f=sp(d);return tp(b,f)}catch(g){return bb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function ep(a){a.D.qa(a.j,"play",function(){a.m||(a.m=Date.now())});a.D.qa(a.j,"playing",function(){a.s||(a.s=Date.now())})}function op(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}} function up(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled)if(a=vp(a,c),d)d=wp(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var e=sp(a);e&&(b.uris=b.uris.map(function(f){return tp(f,e)}))}}function xp(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 yp(a){if(0===a.type)return zp;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?qp:Ap;if("audio"==b)return pp;if("text"==b)return"application/mp4"===a.mimeType?Bp:Cp}}function Dp(a,b){b=a.h.Qb()[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 Ep(a,b){b=a.h.Qb()[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 Fp(a,b){var c=a.h.qb();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 Ap:return a.videoBandwidth||NaN;case pp:return a.audioBandwidth||NaN;default:return a.bandwidth}} function vp(a,b){b=void 0===b?{}:b;Object.assign(b,op(a));b.pr=a.h.Xa();var c=b.ot===Ap||b.ot===qp;a.C&&c&&(b.bs=!0,b.su=!0,a.C=!1);null==b.su&&(b.su=a.F);b.v===mp&&(a.h.T()&&(b.ltc=a.h.pf()),c=!a.G&&a.s&&a.m?a.s-(a.B||a.m):void 0,void 0!=c&&(b.msd=c,a.G=!0));return xp(a,b)} function sp(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 wp(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,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd: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 Zp(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Gp);Gp.prototype.getBandwidthEstimate=Gp.prototype.getBandwidthEstimate;Gp.prototype.getRoundTripTime=Gp.prototype.Xk;Gp.prototype.getResponseDelay=Gp.prototype.Wk;Gp.prototype.getEstimatedThroughput=Gp.prototype.Pi; Gp.prototype.getMaxBitrate=Gp.prototype.Qi;var Ip="etp",Hp="mb",Xp="rd",Yp="rtt";function $p(){this.g=null;this.h=[]}function aq(a,b){return Q(function(c){if(1==c.g)return a.g?F(c,new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;I(c)})}$p.prototype.release=function(){0B.end&&(B.end=D.end)}return B};d.sa=new km(q);d.sa.addEventListener("regionadd", function(A){yq(d,A.region,"metadataadded")});if(m)return F(z,k(function(){return Q(function(A){return F(A,zq(d,c),0)})},"initializeSrcEqualsDrmInner_"),23);d.Ta=new km(q);return F(z,k(function(){return Q(function(A){if(1==A.g)return F(A,Promise.race([e.na,e.u]),2);d.yc=e.G;var B=e;B.oa=!0;d.G=B.l;d.i=e.ih();I(A)})},"waitForFinish"),15);case 15:if(d.I){z.A(16);break}return F(z,k(function(){return Q(function(A){return F(A,uq(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&& (d.s.enableTextDisplayer?d.s.enableTextDisplayer():Uc("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),F(z,k(function(){return Q(function(A){return F(A,e.u,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Le=e.F;d.G&&d.G.setMediaElement&&d.h&&d.G.setMediaElement(d.h);d.Fe=mo(e);d.Ee=e.Na;if(r=e.B)d.L=r;l&&d.h&&"AUDIO"===d.h.nodeName&&(Aq(d),d.configure("manifest.disableVideo",!0));if(e.i){z.A(19);break}return F(z,k(function(){return Q(function(A){return F(A, ro(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.D=no(e),F(z,k(function(){return Q(function(A){return F(A,d.D.$b(d.h),0)})},"drmEngine_.attach"),21);case 21:return!(u=e.D)||d.Na&&d.Na==u||(d.u=lo(e),d.Na=e.D,"function"!=typeof d.u.setMediaElement&&(Uc("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.u.setMediaElement=function(){}),"function"!=typeof d.u.setCmsdManager&&(Uc("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."), d.u.setCmsdManager=function(){}),"function"!=typeof d.u.trySuggestStreams&&(Uc("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.u.trySuggestStreams=function(){})),w=oo(e),v=e.J,F(z,k(function(){return Q(function(A){return F(A,Bq(d,n,v,w),0)})},"loadInner_"),22);case 22:jo(e);d.wc&&Rb().eg()&&mf(d.wc)&&Ak(d.I,d.U,d.wc);z.A(14);break;case 23:return F(z,k(function(){return Q(function(A){return F(A,Cq(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(lq("loaded")); case 6:ya(z);if(!e){z.A(25);break}return F(z,e.destroy(),25);case 25:d.La=null;Ba(z,0);break;case 5:y=xa(z);if(!y||7E3==y.code){z.A(27);break}return F(z,d.lc(!1),27);case 27:throw y;}})};function Aq(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})} p.om=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?F(e,Dq(c),2):3!=e.g?(d=e.h,F(e,c.lc(a,b),3)):e.return(d)})};p.Ki=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?F(e,Dq(c,b),2):3!=e.g?(d=e.h,F(e,c.detach(a),3)):e.return(d)})}; function Dq(a,b){b=void 0===b?!1:b;var c,d;return Q(function(e){if(1==e.g){c=null;if(!(a.i&&a.G&&a.yc&&a.U&&a.g))return e.A(2);d=a.h.currentTime;a.T()&&!b&&(d=null);return F(e,Eq(a,a.U,d,a.wc,a.g,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.Pe.push(c);a.G&&a.G.setMediaElement&&a.G.setMediaElement(null);var f=c,g=a.G,h=a.yc;f.h=a.i;f.l=g;f.G=h;f=c;g=a.Na;f.j=a.u;f.D=g;c.B=a.L;c.start();a.i=null;a.G=null;a.yc=null;a.u=null;a.Na=null}return e.return(c)})} p.preload=function(a,b,c,d){b=void 0===b?null:b;var e=this,f,g;return Q(function(h){if(1==h.g)return f=cq(e),Vn(f,d||e.g,cq(e)),F(h,xq(e,a,b,c,!1,f),2);(g=h.h)?g.start():tq(e,new V(2,7,7005));return h.return(g)})};p.Og=function(){var a=this,b,c,d,e;return Q(function(f){b=[];c=t(a.Pe);for(d=c.next();!d.done;d=c.next())e=d.value,e.s||b.push(e.destroy());a.Pe=[];return F(f,Promise.all(b),0)})}; function xq(a,b,c,d,e,f){e=void 0===e?!1:e;var g,h,k,l,m;return Q(function(n){if(1==n.g)return d?n.A(2):F(n,wq(a,b),3);2!=n.g&&(d=n.h);if(g=Fq(a,d))return n.return(null);h=f||a.g;k=!1;l=!0;e&&(a.u&&a.Na==h.abrFactory&&(l=!1),a.h&&"AUDIO"===a.h.nodeName&&(k=!0));m=Eq(a,b,c,d||null,h,!e,k,l);m=e?m.then(function(q){q.C=!1;return q}):m.then(function(q){a.Pe.push(q);return q});return n.return(m)})} function Eq(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,r,u,w,v,y,z,A,B,D,G;return Q(function(C){if(1==C.g){k=null;l=Ed(e);g&&(l.manifest.disableVideo=!0);m=function(){return k.P&&k.s?null:k};n=function(){return m()?m().getConfiguration():a.g};if(Infinity!=a.oa.width||Infinity!=a.oa.height||a.g.ignoreHardwareResolution)return C.A(2);q=Rb();return F(C,q.nc(),3)}2!=C.g&&(r=C.h,a.oa.width=r.width,a.oa.height=r.height);u=new ui(l,a.oa,null);w={networkingEngine:a.H, filter:function(E){var H,K;return Q(function(J){if(1==J.g)return F(J,vi(u,E),2);if(4!=J.g){H=J.h;if(!H)return J.A(0);K=lq("trackschanged");return F(J,Promise.resolve(),4)}k.dispatchEvent(K);I(J)})},makeTextStreamsForClosedCaptions:function(E){return Gq(a,E)},onTimelineRegionAdded:function(E){lm(k.H,E)},onEvent:function(E){return k.dispatchEvent(E)},onError:function(E){return k.onError(E)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},updateDuration:function(){a.l&&k.P&&a.l.updateDuration()}, newDrmInfo:function(E){var H=k.i,K=H?H.g:null;K&&H.B&&yi(u,K.keySystem,E)},onManifestUpdated:function(){var E=(new Map).set("isLive",a.T());k.dispatchEvent(lq("manifestupdated",E));io(k,!1,function(){if(a.C)a.C.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},onMetadata:function(E,H,K,J){var L=E;if("com.apple.hls.interstitial"==E&&(L="com.apple.quicktime.HLS",E={startTime:H,endTime:K,values:J},a.C))a.C.onHLSInterstitialMetadata(a,a.h,E);J=t(J);E=J.next(); for(var N={};!E.done;N={Ih:void 0},E=J.next())N.Ih=E.value,"ID"!=N.Ih.name&&io(k,!1,function(O){return function(){Hq(a,H,K,L,O.Ih)}}(N))},disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)},addFont:function(E,H){return a.addFont(E,H)}};v=new km(function(){return a.xa()});v.addEventListener("regionadd",function(E){var H=E.region;Iq(a,"timelineregionadded",H,k);io(k,!1,function(){a.C&&(a.C.onDashTimedMetadata(H),a.C.onDASHInterstitialMetadata(a,a.h,H))})});y=null;l.streaming.observeQualityChanges&& (y=new em(function(){return a.Qb()}),y.addEventListener("qualitychange",function(E){Jq(a,E.quality,E.position)}),y.addEventListener("audiotrackchange",function(E){Jq(a,E.quality,E.position,!0)}));z=!0;A={xc:a.H,onError:function(E){return k.onError(E)},Lf:function(E){io(k,!0,function(){if(a.D)a:{var H=E,K=lq("keystatuschanged");a.dispatchEvent(K);var J=Object.keys(H);1==J.length&&""==J[0]&&(J=["00"],H={"00":H[""]});K=1==J.length&&"00"==J[0];var L=!1;if(J.length){J=a.keySystem();for(var N=gh(a.g.drm.clearKeys), O=t(a.i.variants),M=O.next();!M.done;M=O.next()){M=M.value;var P=[];M.audio&&P.push(M.audio);M.video&&P.push(M.video);P=t(P);for(var R=P.next();!R.done;R=P.next()){var T=R.value;R=M.allowedByKeySystem;if(T.keyIds.size)if(T.drmInfos.length&&!N.size){T=t(T.drmInfos);for(var ca=T.next();!ca.done;ca=T.next())if(ca=ca.value,ca.keyIds.size&&ca.keySystem==J){M.allowedByKeySystem=!0;ca=t(ca.keyIds);for(var Y=ca.next();!Y.done;Y=ca.next())if(Y=Y.value,(Y=H[K?"00":Y])||a.D.F)M.allowedByKeySystem=M.allowedByKeySystem&& !!Y&&!Ai.includes(Y)}}else for(M.allowedByKeySystem=!0,T=t(T.keyIds),ca=T.next();!ca.done;ca=T.next())if(ca=ca.value,(ca=H[K?"00":ca])||a.D.F)M.allowedByKeySystem=M.allowedByKeySystem&&!!ca&&!Ai.includes(ca);R!=M.allowedByKeySystem&&(L=!0)}}}if(L&&(Kq(a),!Lq(a)))break a;(H=a.l.s)&&!H.allowedByKeySystem&&iq(a)}})},onExpirationUpdated:function(E,H){var K=lq("expirationupdated");k.dispatchEvent(K);if((K=k.l)&&K.onExpirationUpdated)K.onExpirationUpdated(E,H)},onEvent:function(E){k.dispatchEvent(E);"drmsessionupdate"== E.type&&z&&(z=!1,E=Date.now()/1E3-k.Ia,(a.B||k.getStats()).m=E,a.P&&$c(a.P))}};B=eq(a,m);Wg(a.H,B);D=function(){return a.vd(A)};G={config:l,Gl:w,Rl:v,Ql:y,vd:D,Fl:u,networkingEngine:B,ek:f,dk:h};k=new ho(b,d,c,G);return C.return(k)})}function wq(a,b){var c,d,e;return Q(function(f){if(1==f.g)return c=a.g.manifest.retryParameters,F(f,Bo(b,a.H,c),2);d=f.h;"application/x-mpegurl"==d&&(e=Rb(),"WEBKIT"===e.Ga()&&(d="application/vnd.apple.mpegurl"));return f.return(d)})} function Fq(a,b){if(!Fi(Rb()))return!0;if(b){if(""==(a.h||Gi()).canPlayType(b))return!1;if(!Fi(Rb())||!Di.has(b))return!0;if(mf(b))return"WEBKIT"===Rb().Ga()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if("application/dash+xml"===b||"video/vnd.mpeg.dash.mpd"===b)return a.g.streaming.preferNativeDash}return!1} function Mq(a){var b=a.g.textDisplayFactory;if(a.si!==b){var c=a.s;a.s=b();a.s.configure?a.s.configure(a.g.textDisplayer):Uc("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.s.setTextLanguage||Uc("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!');c?(a.s.setTextVisibility(c.isTextVisible()),c.destroy().catch(function(){})):a.s.setTextVisibility(a.Y);a.I&&nl(a.I,a.s);a.si=b;a.l&&Wm(a.l)}else a.s&&a.s.configure&&a.s.configure(a.g.textDisplayer)} function uq(a){var b,c,d;return Q(function(e){if(1==e.g)return Rb(),qq(a,"media-source"),a.g.mediaSource.useSourceElements&&Nj(a.h),Mq(a),b=Nq(a.h,a.s,{Jk:function(){return a.keySystem()},onMetadata:function(f,g,h){f=t(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&"number"==typeof k.cueTime&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=t(k.frames),q=n.next();!q.done;q=n.next())Hq(a,l,m,"org.id3",q.value);if(a.C)a.C.onHlsTimedMetadata(k,l)}},Ll:function(f){a.Ta&&lm(a.Ta, {schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Nl:function(){a.G&&a.G.update&&a.G.update()}},a.P,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Ia=d,F(e,b.J,2);a.I=b;I(e)})} function Oq(a,b,c){function d(){return Pq(a)}a.j.o(b,"playing",d);a.j.o(b,"pause",d);a.j.o(b,"ended",d);a.j.o(b,"ratechange",function(){var f=a.h.playbackRate;0!=f&&(a.J&&(a.J.set(f),a.m==Qq&&a.u.playbackRateChanged(f),Rq(a,f)),f=lq("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.o(b.remote,"connect",function(){a.l&&"connected"==b.remote.state&&Sq(a);Kq(a)}),a.j.o(b.remote,"connecting",function(){return Kq(a)}),a.j.o(b.remote,"disconnect",function(){return Q(function(f){if(1==f.g)return a.l&&"disconnected"== b.remote.state?F(f,tn(a.l),3):f.A(2);2!=f.g&&Sq(a);Kq(a);I(f)})}));b.audioTracks&&(a.j.o(b.audioTracks,"addtrack",function(){return Kq(a)}),a.j.o(b.audioTracks,"removetrack",function(){return Kq(a)}),a.j.o(b.audioTracks,"change",function(){return Kq(a)}));b.videoTracks&&(a.j.o(b.videoTracks,"addtrack",function(){return Kq(a)}),a.j.o(b.videoTracks,"removetrack",function(){return Kq(a)}),a.j.o(b.videoTracks,"change",function(){return Kq(a)}));if(b.textTracks){var e=function(){a.m===Tq&&a.s instanceof Oo&&Sq(a);Kq(a)};a.j.o(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Uq(a,f);break;case "chapters":Vq(a,f);break;default:e()}});a.j.o(b.textTracks,"removetrack",e);a.j.o(b.textTracks,"change",e);"keep"!==a.g.streaming.crossBoundaryStrategy&&(a.j.o(b,"waiting",function(){a.l&&an(a.l)}),a.j.o(b,"timeupdate",function(){a.l&&an(a.l)}))}"none"!=b.preload&&a.j.qa(b,"loadedmetadata",function(){a.B.F=Date.now()/1E3-c})} function Bq(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,D,G,C,E,H,K,J,L,N,O,M;return Q(function(P){switch(P.g){case 1:qq(a,"load");e=a.h;a.J=new am({qf:function(){return e.playbackRate},bd:function(){return e.defaultPlaybackRate},Xh:function(R){e.playbackRate=R},hj:function(R){e.currentTime+=R}});Oq(a,e,b);"onchange"in window.screen&&a.j.o(window.screen,"change",function(){if(a.L.getConfiguration){var R=a.L.getConfiguration();"AUTO"==R.Lc?Lq(a):"AUTO"==a.g.preferredVideoHdrLevel&&a.g.abr.enabled&& (R.Lc="AUTO",a.L.configure(R),Lq(a))}});f=!1;g=t(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=ad(l));kq(a,a.g,f);a.Kd=a.g.preferredTextLanguage;a.Ke=a.g.preferredTextRole;a.Je=a.g.preferForcedSubs;Wq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u.init(function(R,T,ca){a.i&&a.l&&R!=a.l.s&&Xq(a,R,!0,void 0===T?!1:T,void 0===ca?0:ca)});a.u.setMediaElement(e);a.u.setCmsdManager(a.na);a.l=Yq(a);a.l.configure(a.g.streaming);a.m=Qq; a.dispatchEvent(lq("streaming"));m=c;case 2:(q=a.l.s)||m||(m=Lq(a)?a.u.chooseVariant():null);r=[];n=q||m;u=t([n.video,n.audio]);for(w=u.next();!w.done;w=u.next())(v=w.value)&&!v.segmentIndex&&(r.push(v.createSegmentIndex()),v.dependencyStream&&r.push(v.dependencyStream.createSegmentIndex()));if(!(0E&&(B=E);return F(P,br(m,B),9);case 9:H=P.h,y(H);case 8:Xq(a,m,!0,!1,0);case 7:return a.F.ready(),K=a.rc().find(function(R){return R.active}), K||((J=jg(a.i.textStreams,a.Kd,a.Ke,a.Je)[0]||null)&&$n(a.B.h,J,!0),m&&(J?(mg(m.audio,J,a.g)&&(a.Y=!0),a.Y&&a.s.setTextVisibility(!0)):(a.Y=!1,a.s.setTextVisibility(!1)),cr(a)),J&&(a.g.streaming.alwaysStreamText||a.gd())&&(Vm(a.l,J),dr(a))),F(P,a.l.start(d),10);case 10:a.g.abr.enabled&&(a.u.enable(),er(a));Kq(a);Lq(a);a.i.variants.some(function(R){return R.primary});if((L=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)N= function(){return fr(a)},a.j.o(e,"timeupdate",N);L||(O=function(){return gr(a)},a.j.o(e,"timeupdate",O),gr(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.'), l.resolve()),a.j.qa(d,"error",function(){l.reject(sq(a))}),F(w,Df(a.g.streaming.loadTimeout,l),4);case 4:if((n=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return fr(a)},a.j.o(d,"timeupdate",q);n||(r=function(){return gr(a)},a.j.o(d,"timeupdate",r),gr(a));a.C&&(a.C.onManifestUpdated(n),n&&(u=a.xa().end,a.j.o(d,"progress",function(){var v=a.xa().end;u!=v&&(a.C.onManifestUpdated(a.T()),u=v)}))); a.Z=!0;I(w)}})}function kr(a){var b=a.g.preferredAudioLanguage;""!=b&&a.yj(b,a.g.preferredVariantRole)}function mr(a){var b=a.g.preferredTextLanguage;""!=b&&a.Sh(b,a.g.preferredTextRole,a.g.preferForcedSubs)} function Uq(a,b){if("metadata"==b.kind){b.mode="hidden";a.j.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,Hq(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={Fc:void 0},f=e.next())g.Fc=f.value,"com.apple.quicktime.HLS"==g.Fc.type&&null!=g.Fc.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.Fc.startTime&&k.endTime==h.Fc.endTime}}(g)), f||(f={startTime:g.Fc.startTime,endTime:g.Fc.endTime,values:[]},d.push(f)),f.values.push(g.Fc.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.C&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.C.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new zf(function(){var d=nr(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ka().X(.5); a.Ie.push(function(){c.stop()})}}function yq(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(lq(c,b))}function Hq(a,b,c,d,e){a.sa&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),lm(a.sa,b))}function Vq(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new zf(function(){b.mode="hidden"})).Ka().X(.5);a.Ie.push(function(){c.stop()})}} p.Vl=function(){for(var a=this.$;a.g;)a.release()};p.vd=function(a){return new yh(a)}; function eq(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?io(b(),!0,f):f()}b||(b=function(){return null});var e=new Sg(function(f,g,h,k,l){var m=b()?b().j:a.u;m&&m.segmentDownloaded(f,g,h,k,l)},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(lq("downloadheadersreceived",g));d(function(){if(a.na){var k=a.na;if(k.h.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;lv);if(z){var A=z.next().value;if(A&&A!=q){if(n&&!ud(q.S(),A.S())){var B=A.S()[0],D=new URL(B),G=new URL(n);if(D.origin!==G.origin)var C=B;else{for(var E=D.pathname.split("/").slice(1),H=G.pathname.split("/").slice(1,-1);E[0]===H[0];)E.shift(),H.shift();for(;H.length;)H.shift(),E.unshift("..");C=E.join("/")}r.nor=C}if((A.startByte|| A.endByte)&&(q.startByte!=A.startByte||q.endByte!=A.endByte)){var K=A.startByte+"-";A.endByte&&(K+=A.endByte);r.nrr=K}}}var J=k.h.Xa()||1,L=Ep(k,w.type)||500,N=w.bandwidth;var O=N?N*(q.endTime-q.startTime)/1E3/(L/J/1E3)*k.g.rtpSafetyFactor:NaN;isNaN(O)||(r.rtp=O)}}u&&r.ot!==Bp&&(r.tb=Fp(k,r.ot)/1E3);up(k,g,r)}}catch(M){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:up(k,g,{ot:"k"});break;case 4:up(k,g,{ot:"o"})}})},function(f,g,h,k){(f=b()?b().l:a.G)&& f.banLocation&&f.banLocation(k)},function(f,g){if(g.data){g=g.data.byteLength;var h=b()?b().getStats():a.B;h&&(fo(h,g),0===f&&(h.bj=g))}});e.configure(a.g.networking);return e}function Zq(a,b){return new Ql(a.h,a.i,a.g.streaming,b,function(){a.cb&&dm(a.cb,!0);a.l&&a.l.md();a.O&&or(a)},function(c){return a.dispatchEvent(c)})} function $q(a,b){var c=a.T()||"number"===typeof b&&0=e&&0=b)return 1;if(!(a<=this.h.currentTime)&&al(r,m))&&(q=r);q!=m&&(q?(m=$f(q),k.ye(m,!0,d||0)):iq(k))}var k=this;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;f=void 0===f?!1:f;g=void 0===g?"":g;if(this.i&&this.F&&(h(),!this.Ca()))return;(function(){if(k.h&&k.h.audioTracks){var l= jg(k.qb(),a,b||"",!1)[0];l&&k.ye(l)}})()};p.Sh=function(a,b,c){function d(){e.Kd=a;e.Ke=b||"";e.Je=c||!1;var f=jg(e.i.textStreams,e.Kd,e.Ke,e.Je)[0]||null;f&&f!=e.l.B&&($n(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.gd())&&(Vm(e.l,f),Sq(e),dr(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.F&&(d(),!this.Ca()))return;(function(){var f=jg(e.rc(),a,b||"",c||!1)[0];f&&e.$f(f)})()}; p.dm=function(a,b,c){function d(){for(var f=null,g=t(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}null!=f&&(e.L=e.g.adaptationSetCriteriaFactory(),e.L.configure({language:f.language,role:"",channelCount:0,Lc:"",spatialAudio:!1,videoLayout:"",Rd:"",Uc:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Td:"",We:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),iq(e,b,c))}var e= this;b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.F&&(d(),!this.Ca()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=t(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&vr(e,g)}})()};p.gd=function(){var a=this.Y;return this.s?this.s.isTextVisible():a};p.xk=function(){return this.Ya.map(function(a){return ag(a)})}; p.wk=function(a){Uc("getChapters","Please use an getChaptersAsync.");if(!this.Ya.length)return[];var b=yc(a);a=this.Ya.filter(function(f){return yc(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.Hb(function(f){var g=f.S()[0],h=f.startTime+"-"+f.endTime+"-"+g;f={id:h,title:g,startTime:f.startTime,endTime:f.endTime};d.has(h)||(c.push(f),d.add(h))});return c}; p.fh=function(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b.Ya.length)return l.return([]);c=yc(a);d=b.Ya.filter(function(m){return yc(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=t(d);h=g.next();case 2:if(h.done){l.A(4);break}k=h.value;if(k.segmentIndex){l.A(5);break}return F(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Hb(function(m){var n=m.S()[0],q=m.startTime+"-"+m.endTime+"-"+n;m={id:q,title:n,startTime:m.startTime,endTime:m.endTime};f.has(q)|| (e.push(m),f.add(q))});h=g.next();l.A(2);break;case 4:return l.return(e)}})};function ir(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function jr(a){return Array.from(a.h.textTracks).find(function(b){return"Shaka Player TextTrack"==b.label})}function nr(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})} p.Ae=function(a){a=!!a;this.Y!=a&&(this.Y=a,this.m==Qq?(this.s.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.B||(a=jg(this.i.textStreams,this.Kd,this.Ke,this.Je),0=Math.floor(d.end)&&a.ud():Math.floor(c)<=Math.floor(d.start+f)&&a.ud()})} function Pq(a){if(a.B&&a.O){var b=a.B.g,c="playing";a.O.g==ti?c="buffering":a.isEnded()?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(lq("statechanged",c)))}} function fr(a){var b=a.h.playbackRate,c=a.T();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Oi();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Sc(d,!1):1==e&&b!==a.J.bd()&&a.ud()}if(c&&(c=a.xa(),Number.isFinite(c.end)&&!(a.h.currentTime1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency, a.R=Math.max(a.R-(g-f)/2,f+d),a.Lb=Date.now());e&&null!==a.R&&(h=a.R+d,k=a.R-d);g=c.end-a.h.currentTime;d=0;a.m==Tq&&(e=a.h.buffered,0h?(b!=l&&a.Sc(l,!1),a.Lb=null):void 0!=k&&m&&g-de)&&a.ugb&&(b+=Math.pow(2,32)),b=b.toString(16);return new V(2,3,3016,c,b,a.h.error.message)}function Wq(a,b,c){0=this.xa().end};S("shaka.Player",X);X.prototype.isEnded=X.prototype.isEnded;X.prototype.isRemotePlayback=X.prototype.Ca;X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.Zh;X.prototype.getFetchedPlaybackInfo=X.prototype.Gk;X.prototype.getManifestParserFactory=X.prototype.Ok; X.prototype.getManifest=X.prototype.ih;X.prototype.retryStreaming=X.prototype.Oh;X.prototype.setMaxHardwareResolution=X.prototype.jm;X.prototype.addChaptersTrack=X.prototype.Xe;X.prototype.addThumbnailsTrack=X.prototype.Ye;X.prototype.addTextTrackAsync=X.prototype.Ud;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.Qb;X.prototype.getSegmentAvailabilityDuration=X.prototype.rf;X.prototype.getPresentationStartTimeAsDate=X.prototype.kh; X.prototype.getPlayheadTimeAsDate=X.prototype.Sk;X.prototype.setTextTrackVisibility=X.prototype.Ae;X.prototype.getChaptersAsync=X.prototype.fh;X.prototype.getChapters=X.prototype.wk;X.prototype.getChaptersTracks=X.prototype.xk;X.prototype.isTextTrackVisible=X.prototype.gd;X.prototype.selectVariantsByLabel=X.prototype.dm;X.prototype.selectTextLanguage=X.prototype.Sh;X.prototype.selectAudioLanguage=X.prototype.yj;X.prototype.getTextLanguages=X.prototype.Zk;X.prototype.getAudioLanguages=X.prototype.qk; X.prototype.getTextLanguagesAndRoles=X.prototype.$k;X.prototype.getAudioLanguagesAndRoles=X.prototype.rk;X.prototype.getVideoTracks=X.prototype.getVideoTracks;X.prototype.selectVideoTrack=X.prototype.Aj;X.prototype.getAudioTracks=X.prototype.getAudioTracks;X.prototype.selectAudioTrack=X.prototype.zj;X.prototype.selectVariantTrack=X.prototype.ye;X.prototype.selectTextTrack=X.prototype.$f;X.prototype.getThumbnails=X.prototype.Si;X.prototype.getAllThumbnails=X.prototype.pk; X.prototype.getImageTracks=X.prototype.hh;X.prototype.getTextTracks=X.prototype.rc;X.prototype.getVariantTracks=X.prototype.qb;X.prototype.cancelTrickPlay=X.prototype.ud;X.prototype.trickPlay=X.prototype.Sc;X.prototype.useTrickPlayTrackIfAvailable=X.prototype.oi;X.prototype.getPlaybackRate=X.prototype.Xa;X.prototype.isBuffering=X.prototype.xf;X.prototype.getKeyStatuses=X.prototype.nf;X.prototype.getActiveSessionsMetadata=X.prototype.eh;X.prototype.getExpiration=X.prototype.be; X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.vl;X.prototype.goToLive=X.prototype.ol;X.prototype.seekRange=X.prototype.xa;X.prototype.isVideoOnly=X.prototype.xh;X.prototype.isAudioOnly=X.prototype.Cd;X.prototype.isInProgress=X.prototype.fd;X.prototype.isLive=X.prototype.T;X.prototype.getQueueManager=X.prototype.lh;X.prototype.getAdManager=X.prototype.mf;X.prototype.getAssetUri=X.prototype.$c; X.prototype.getNetworkingEngine=X.prototype.Ib;X.prototype.getMediaElement=X.prototype.Rk;X.prototype.getManifestType=X.prototype.jh;X.prototype.getLoadMode=X.prototype.Kk;X.prototype.resetConfiguration=X.prototype.tj;X.prototype.getBufferFullness=X.prototype.Oi;X.prototype.getNonDefaultConfiguration=X.prototype.Ri;X.prototype.getConfigurationForLowLatency=X.prototype.Ak;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configurationForLowLatency=X.prototype.kk; X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.Vl;X.prototype.destroyAllPreloads=X.prototype.Og;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Ki;X.prototype.unloadAndSavePreload=X.prototype.om;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.sm;X.prototype.unload=X.prototype.lc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.xi;X.prototype.attach=X.prototype.$b; X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:b={};if(!a){k.A(2);break}return F(k,li(),3);case 3:b=k.h;case 2:return c=Ei(),d=Bk(),e=Rb(),F(k,e.nc(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=oq,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};X.isBrowserSupported=pq;X.setQueueManagerFactory=function(a){gq=a};X.setAdManagerFactory=function(a){fq=a};X.registerSupportPlugin=nq;X.prototype.destroy=X.prototype.destroy; var mq=0,bq=1,Qq=2,Tq=3;X.LoadMode={DESTROYED:mq,NOT_LOADED:bq,MEDIA_SOURCE:Qq,SRC_EQUALS:Tq};X.version="v4.15.4";var Gr=["4","15"];Vc=new function(a){this.g=a;this.i=Wc;this.h=Xc}(new Tc(Number(Gr[0]),Number(Gr[1])));var oq=new Map,fq=null,gq=null;function Hr(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function Ir(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Jr(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.j=this.h.getVolume();this.l=new Oc;this.l.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=Jr.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()}; p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()}; p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.m.volume=a;return this.h.setVolume(a)};p.isMuted=function(){return 0==this.h.getVolume()};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){this.h.resize(a,b)};p.setMuted=function(a){(this.m.muted=a)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()}; p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()}; p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",Jr);Jr.prototype.release=Jr.prototype.release;Jr.prototype.getPodIndex=Jr.prototype.getPodIndex; Jr.prototype.getTimeOffset=Jr.prototype.getTimeOffset;Jr.prototype.getMediaUrl=Jr.prototype.getMediaUrl;Jr.prototype.getAdvertiserName=Jr.prototype.getAdvertiserName;Jr.prototype.getCreativeAdId=Jr.prototype.getCreativeAdId;Jr.prototype.getAdId=Jr.prototype.getAdId;Jr.prototype.getVastAdId=Jr.prototype.getVastAdId;Jr.prototype.getVastMediaWidth=Jr.prototype.getVastMediaWidth;Jr.prototype.getVastMediaHeight=Jr.prototype.getVastMediaHeight;Jr.prototype.getVastMediaBitrate=Jr.prototype.getVastMediaBitrate; Jr.prototype.getDescription=Jr.prototype.getDescription;Jr.prototype.getTitle=Jr.prototype.getTitle;Jr.prototype.getPositionInSequence=Jr.prototype.getPositionInSequence;Jr.prototype.getSequenceLength=Jr.prototype.getSequenceLength;Jr.prototype.setMuted=Jr.prototype.setMuted;Jr.prototype.resize=Jr.prototype.resize;Jr.prototype.isLinear=Jr.prototype.isLinear;Jr.prototype.isMuted=Jr.prototype.isMuted;Jr.prototype.setVolume=Jr.prototype.setVolume;Jr.prototype.getVolume=Jr.prototype.getVolume; Jr.prototype.play=Jr.prototype.play;Jr.prototype.pause=Jr.prototype.pause;Jr.prototype.skip=Jr.prototype.skip;Jr.prototype.canSkipNow=Jr.prototype.canSkipNow;Jr.prototype.getTimeUntilSkippable=Jr.prototype.getTimeUntilSkippable;Jr.prototype.isSkippable=Jr.prototype.isSkippable;Jr.prototype.isPaused=Jr.prototype.isPaused;Jr.prototype.getRemainingTime=Jr.prototype.getRemainingTime;Jr.prototype.getMinSuggestedDuration=Jr.prototype.getMinSuggestedDuration;Jr.prototype.getDuration=Jr.prototype.getDuration; Jr.prototype.isUsingAnotherMediaElement=Jr.prototype.isUsingAnotherMediaElement;Jr.prototype.hasCustomClick=Jr.prototype.hasCustomClick;Jr.prototype.isClientRendering=Jr.prototype.isClientRendering;Jr.prototype.needsSkipUI=Jr.prototype.needsSkipUI;function Kr(){} function Lr(a,b){var c=[];a=t(Pd(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=Td(d.value,"InLine"))if(d=Td(d,"Creatives")){d=t(Pd(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=Td(e,"Linear");f&&Mr(c,b,f);if(e=Td(e,"NonLinearAds")){e=Pd(e,"NonLinear");e=t(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=Td(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=Td(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=Rd(l)){"text/html"===g&&(l="data:text/html;charset=UTF-8,"+ encodeURIComponent(l));var m=Wd(k,"width",be)||Wd(k,"expandedWidth",be),n=Wd(k,"height",be)||Wd(k,"expandedHeight",be);if(m||n){var q=null;(k=k.attributes.minSuggestedDuration)&&(q=Cd(k));k=0;null!=h&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:q,once:!0,pre:null==h,post:Infinity==h,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}},displayOnBackground:!1, currentVideo:null,background:null})}}}}}}return c} function Mr(a,b,c){var d=0;null!=b&&(d=b);var e=null;c.attributes.skipoffset&&(e=Cd(c.attributes.skipoffset),isNaN(e)&&(e=null));if(c=Td(c,"MediaFiles")){var f=Pd(c,"MediaFile");c=f;f=f.filter(function(h){return"streaming"==h.attributes.delivery});f.length&&(c=f);c=c.sort(function(h,k){return(parseInt(k.attributes.height,10)||0)-(parseInt(h.attributes.height,10)||0)});c=t(c);for(f=c.next();!f.done;f=c.next())if(f=f.value,!f.attributes.apiFramework){var g=Rd(f);if(g){a.push({id:null,groupId:null,startTime:d, endTime:null,uri:g,mimeType:f.attributes.type||null,isSkippable:null!=e,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}S("shaka.ads.Utils",Kr);Kr.ADS_LOADED="ads-loaded";Kr.AD_STARTED="ad-started";Kr.AD_FIRST_QUARTILE="ad-first-quartile";Kr.AD_MIDPOINT="ad-midpoint";Kr.AD_THIRD_QUARTILE="ad-third-quartile";Kr.AD_COMPLETE="ad-complete"; Kr.AD_STOPPED="ad-stopped";Kr.AD_SKIPPED="ad-skipped";Kr.AD_VOLUME_CHANGED="ad-volume-changed";Kr.AD_MUTED="ad-muted";Kr.AD_PAUSED="ad-paused";Kr.AD_RESUMED="ad-resumed";Kr.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Kr.CUEPOINTS_CHANGED="ad-cue-points-changed";Kr.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Kr.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Kr.AD_CLICKED="ad-clicked";Kr.AD_PROGRESS="ad-progress";Kr.AD_BUFFERING="ad-buffering";Kr.AD_IMPRESSION="ad-impression"; Kr.AD_DURATION_CHANGED="ad-duration-changed";Kr.AD_CLOSED="ad-closed";Kr.AD_LOADED="ad-loaded";Kr.ALL_ADS_COMPLETED="all-ads-completed";Kr.AD_LINEAR_CHANGED="ad-linear-changed";Kr.AD_METADATA="ad-metadata";Kr.AD_RECOVERABLE_ERROR="ad-recoverable-error";Kr.AD_ERROR="ad-error";Kr.AD_BREAK_READY="ad-break-ready";Kr.AD_INTERACTION="ad-interaction";Kr.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Kr.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Kr.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Nr(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.F=!1;this.B=this.s=null;this.G=NaN;this.l=e;this.j=null;this.h=new Oc;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.D=new google.ima.AdDisplayContainer(this.u,this.i);this.D.initialize();this.m=new google.ima.AdsLoader(this.D);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.15.4");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m, google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Or(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Pr(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.qa(this.i,"play",function(){f.F=!0})}Nr.prototype.configure=function(a){this.s=a};Nr.prototype.stop=function(){this.g&&this.g.stop();this.u&&Pj(this.u)}; Nr.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.D.destroy()};function Pr(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new U("ad-error",b));Qr(a,null);a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))} function Or(a,b){a.l(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.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 U("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 U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Rr(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth, a.i.offsetHeight)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.qa(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){Qr(a,null)}} function Rr(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new U(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Pr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Sr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Sr(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){Qr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Qr(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 Sr(a,b){var c=b.getAd();c?(a.j=new Jr(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.s.supportsMultipleMediaElements||a.l(new U("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new U("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.j=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):ab("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")} function Qr(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.s.supportsMultipleMediaElements&&a.l(new U("ad-content-resume-requested"));a.l(new U("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 Tr(a,b,c,d,e,f){this.g=a;this.i=b;this.j=(this.h=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.B=c;this.s=d;this.m=e;this.u=f;this.C=b.overlay}p=Tr.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return this.u};p.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};p.getMinSuggestedDuration=function(){return this.getDuration()}; p.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()=r&&(!e.F.has(n)&&Zr(n)&&e.F.set(n,e.j.preload(n.uri,null,n.mimeType||void 0)),$r(e,n));v.A(4);break}if(!e.F.has(n)){v.A(7);break}return F(v,e.F.get(n),8);case 8:(u=v.h)&&u.destroy(),e.F.delete(n);case 7:as(e,n),w=JSON.stringify(n),e.R.has(w)&&e.R.delete(w),e.H.delete(n),bs(e),n.overlay||(g=!0);case 4:m=l.next();v.A(3);break;case 5:g&&cs(e),I(v)}})});this.configure(this.D.getConfiguration().ads)}p=Vr.prototype;p.configure=function(a){this.L=a;ds(this)}; function es(a){if(!a.$&&a.H.size){a.I.o(a.g,"playing",a.U);a.I.o(a.g,"timeupdate",a.U);a.I.o(a.g,"seeked",a.ba);a.I.o(a.g,"ended",a.Y);if("requestVideoFrameCallback"in a.g&&!fs()){var b=a.g,c=function(){-1!=a.O&&(a.Y(),-1!=a.O&&(a.O=b.requestVideoFrameCallback(c)))};a.O=b.requestVideoFrameCallback(c)}else a.P.ya(.025);a.N&&a.N.ya(1);a.$=!0}} function bs(a){a.$&&!a.H.size&&(a.I.Da(a.g,"playing",a.U),a.I.Da(a.g,"timeupdate",a.U),a.I.Da(a.g,"seeked",a.ba),a.I.Da(a.g,"ended",a.Y),-1!=a.O&&(a.g.cancelVideoFrameCallback(a.O),a.O=-1),a.P&&a.P.stop(),a.N&&a.N.stop(),a.$=!1)} function ds(a){if(a.C&&a.L&&!a.J){var b=a.L.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.B==b&&(a.B=!b,a.B?(a.h=a.g,a.G&&(a.G.parentElement&&a.C.removeChild(a.G),a.G=null)):(a.G||(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.display="none",b.setAttribute("playsinline",""),a.G=b),a.h=a.G))}else a.B=!0} p.stop=function(){this.l&&this.l.Sa();this.R.clear();this.H.clear();this.j.Og();if(this.F.size){var a=Array.from(this.F.values());a=t(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&b.then(function(c){c&&c.destroy()})}this.F.clear();if(this.K.size)for(a=Array.from(this.K.keys()),a=t(a),b=a.next();!b.done;b=a.next())as(this,b.value);this.K.clear();this.j.detach();this.J=!1;this.u=this.m=null;this.B=!0;this.h=this.g;this.G=null;gs(this);bs(this);this.C&&Pj(this.C);this.s&&(this.s.stop(),this.s= null)};p.release=function(){this.stop();this.I&&this.I.release();this.l&&this.l.release();this.P&&(this.P.stop(),this.P=null);this.N&&(this.N.stop(),this.N=null);this.j.destroy()};p.Sb=function(){return this.j};function hs(a,b){var c;Q(function(d){if(1==d.g)return Wr(a),F(d,is(a,b),2);c=d.h;c.length?js(a,c):ab("Unsupported HLS interstitial",b);I(d)})} function ks(a,b){var c=Td(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f="true"==c.attributes.loop,g=Wd(c,"z",be);if(d&&0!=g){var h=null,k=Td(c,"Background");if(k){var l=k.attributes.uri;l?h="center / contain no-repeat url('"+l+"')":h=Rd(k)}k=1920;l=1080;var m=Td(c,"Viewport");if(m){k=Wd(m,"x",be);if(null==k)return;l=Wd(m,"y",be);if(null==l)return}var n={viewport:{x:k,y:l},topLeft:{x:0,y:0},size:{x:k,y:l}},q=Td(c,"Overlay");if(m&&q){var r=Td(q,"TopLeft"),u=Td(q,"Size");if(r&& u){q=Wd(r,"x",be);if(null==q)return;r=Wd(r,"y",be);if(null==r)return;var w=Wd(u,"x",be);if(null==w)return;u=Wd(u,"y",be);if(null==u)return;n.topLeft.x=q;n.topLeft.y=r;n.size.x=w;n.size.y=u}}q=null;c=Td(c,"Squeeze");if(m&&c&&(u=Td(c,"TopLeft"),c=Td(c,"Size"),u&&c)){m=Wd(u,"x",be);if(null==m)return;q=Wd(u,"y",be);if(null==q)return;u=Wd(c,"x",be);if(null==u)return;c=Wd(c,"y",be);if(null==c)return;q={viewport:{x:k,y:l},topLeft:{x:m,y:q},size:{x:u,y:c}}}js(a,[{id:b.id,groupId:null,startTime:b.startTime, endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:n,displayOnBackground:-1==g,currentVideo:q,background:h}])}} p.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return c={type:12},F(n,ls(b,a,c),2);case 2:d=n.h;e=Hd(d,"VAST,vmap:VMAP");if(!e)throw new V(2,10,10007);f=[];if("VAST"==e.tagName){f=Lr(e,b.m);n.A(3);break}if("vmap:VMAP"!=e.tagName){n.A(3);break}for(var q=[],r=t(Pd(e,"vmap:AdBreak")),u=r.next();!u.done;u=r.next()){var w=u.value,v=w.attributes.timeOffset;v&&(u=null,"start"==v?u=0:"end"==v?u=Infinity:u=Cd(v),(w=Td(w,"vmap:AdSource"))&&(w=Td(w,"vmap:AdTagURI"))&& (w=Qd(w))&&q.push({time:u,uri:w}))}g=t(q);h=g.next();case 5:if(h.done){n.A(3);break}k=h.value;return F(n,ls(b,k.uri,c),8);case 8:l=n.h;m=Hd(l,"VAST");if(!m)throw new V(2,10,10007);f.push.apply(f,x(Lr(m,k.time)));h=g.next();n.A(5);break;case 3:js(b,f),I(n)}})}; function js(a,b){var c,d,e,f,g,h,k,l;Q(function(m){switch(m.g){case 1:c=!1,d=t(b),e=d.next();case 2:if(e.done){m.A(4);break}f=e.value;if(!f.uri){ab("Missing URL in interstitial",f);m.A(3);break}if(f.mimeType){m.A(5);break}ta(m,6);g=a.j.Ib();return F(m,Bo(f.uri,g,a.D.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;wa(m,5);break;case 6:xa(m);case 5:h=f.id||JSON.stringify(f);if(a.R.has(h)){m.A(3);break}f.loop&&!f.overlay&&ab("Loop is only supported in overlay interstitials",f); f.overlay||(c=!0);a.R.add(h);a.H.add(f);k=!1;f.pre&&null==a.m?k=!0:0!=f.startTime||f.canJump?null!=a.m&&(l=f.startTime-a.m,0=l&&(k=!0)):k=!0;k&&(!a.F.has(f)&&Zr(f)&&a.F.set(f,a.j.preload(f.uri,null,f.mimeType||void 0)),$r(a,f));case 3:e=d.next();m.A(2);break;case 4:c&&cs(a),es(a),I(m)}})} function Xr(a,b,c){b=void 0===b?!1:b;c=void 0===c?null:c;var d=0,e=null;if(a.H.size&&null!=a.m){var f=a.g.ended,g=Array.from(a.H).sort(function(n,q){return q.startTime-n.startTime}),h=g;h=b?g.filter(function(n){return n.pre}):f?g.filter(function(n){return n.post}):g.filter(function(n){return!n.pre&&!n.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.m-Math.round(1E3*h.startTime)/1E3,m=1;a.L.allowStartInMiddleOfInterstitial&& h.endTime&&Infinity!=h.endTime&&(m=h.endTime-h.startTime);0=h.startTime?!1:!0)}k&&(!a.u||h.startTime>=a.u.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001Math.abs(g.startTime-b.startTime)}).length);b.once&&(f++,a.H.delete(b),bs(a),b.overlay||cs(a));b.mimeType&&(b.mimeType.startsWith("image/")||"text/html"===b.mimeType)?b.overlay?ms(a,b,c,d,f):ab("Unsupported interstitial",b):a.B&&b.overlay?ab("Unsupported interstitial",b):ns(a,b,c,d,e,f)} function ms(a,b,c,d,e){function f(){a.s&&(a.s.stop(),a.s=null);a.C.removeChild(k);gs(a,b);a.i(new U("ad-stopped"));a.l.Sa();var q=Xr(a,b.pre,d-e);q?Yr(a,q,c,++d,Date.now(),e):a.J=!1}a.J=!0;var g=b.overlay,h="text/html"==b.mimeType?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";os(a,b);a.i(new U("ad-started",(new Map).set("ad",new Ur(b,c,d))));"iframe"==h?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){a.i(new U("ad-error",(new Map).set("originalEvent", q)));f()});var l=g.viewport,m=g.topLeft;g=g.size;0==l.x&&0==l.y?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||"iframe"!=h||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.C.appendChild(k);var n=Date.now();a.s&&a.s.stop();a.s=new zf(function(){b.playoutLimit&&(Date.now()-n)/1E3>b.playoutLimit?(a.i(new U("ad-complete")), f()):b.endTime&&a.g.currentTime>b.endTime?(a.i(new U("ad-complete")),f()):a.g.currentTimeb.endTime)a.s&&a.s.stop(),a.i(new U("ad-skipped")),f()})} function ns(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,D,G,C,E,H;Q(function(K){switch(K.g){case 1:g=Date.now();a.J=!0;if(!a.B||1!=d){K.A(2);break}a.i(new U("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new Ig;k=function(J){return Q(function(L){if(1==L.g)return"detach"!=J.state?L.A(0):fs()?F(L,new Promise(function(N){return(new zf(N)).X(.1)}),3):L.A(3);h.resolve();a.l.Da(a.D,"onstatechange",k);I(L)})};a.l.o(a.D,"onstatechange",k);return F(K,h,2);case 2:return os(a,b),a.B|| (a.h.style.display="",b.overlay?(a.h.loop=b.loop,l=b.overlay.viewport,m=b.overlay.topLeft,n=b.overlay.size,a.h.style.height=n.y/l.y*100+"%",a.h.style.left=m.x/l.x*100+"%",a.h.style.top=m.y/l.y*100+"%",a.h.style.width=n.x/l.x*100+"%"):(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.g.currentTime+=b.resumeOffset),a.h.loop=!1,a.h.style.height="100%",a.h.style.left="0",a.h.style.top="0",a.h.style.width="100%")),q=!1,r=function(){if(!a.B&&!b.overlay&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&& Infinity!=b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var J=Date.now();a.g.currentTime+=(J-e)/1E3;e=J}},u=function(J){var L,N;return Q(function(O){if(1==O.g){r();L=Xr(a,b.pre,d-f);if(J&&b.groupId)for(;L&&L.groupId==b.groupId;)d++,L=Xr(a,b.pre,d-f);a.s&&(!b.groupId||L&&L.groupId!=b.groupId)&&(a.s.stop(),a.s=null);gs(a,b);if(L&&!L.overlay)return O.A(2);b.post&&(a.m=null,a.u=null);return a.B?F(O,a.j.detach(),4):F(O,a.j.lc(),4)}2!=O.g&&(a.B&&(N=b.resumeOffset,null==N&&(N=b.timelineRange&& b.endTime&&Infinity!=b.endTime?b.endTime-(a.m||0):(Date.now()-e)/1E3),a.i(new U("ad-content-resume-requested",(new Map).set("offset",N)))),a.i(new U("ad-stopped")),a.l.Sa(),a.J=!1,a.B?cs(a):(a.h.style.display="none",r(),a.g.ended||a.g.play()));ds(a);L&&(a.i(new U("ad-stopped")),a.l.Sa(),Yr(a,L,c,++d,e,f));I(O)})},w=function(J){return Q(function(L){if(q)return L.return();q=!0;a.i(new U("ad-error",(new Map).set("originalEvent",J)));return F(L,u(!1),0)})},v=function(){return Q(function(J){if(1==J.g){if(q)return J.return(); q=!0;return F(J,u(!1),2)}a.i(new U("ad-complete"));I(J)})},a.Z=function(){return Q(function(J){if(q)return J.return();q=!0;a.i(new U("ad-skipped"));return F(J,u(!0),0)})},y=new Tr(a.h,b,a.Z,c,d,!a.B),a.B||(y.setMuted(a.g.muted),y.setVolume(a.g.volume)),a.i(new U("ad-started",(new Map).set("ad",y))),(z=y.canSkipNow())&&a.i(new U("ad-skip-state-changed")),a.l.qa(a.j,"error",w),a.l.o(a.h,"timeupdate",function(){if(a.h.duration){var J=y.canSkipNow();z!=J&&0=J.playRangeEnd?v():a.i(new U("ad-paused"))}),a.l.o(a.h,"volumechange",function(){a.h.muted?a.i(new U("ad-muted")):a.i(new U("ad-volume-changed"))}), ta(K,4),Wr(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(A=b.endTime-b.startTime,0b.endTime)&&a.Z()}));wa(K,0);break;case 4:H=xa(K);if(!a.J)return K.return();w(H);I(K)}})} function os(a,b){b.displayOnBackground&&(a.g.style.zIndex="1");if(null!=b.currentVideo){var c=b.currentVideo;a.g.style.transformOrigin="top left";var d=!0,e=[],f=c.topLeft.x/c.viewport.x*100;0=f&&(e.push("translateX("+f+"%)"),d=!1);f=c.topLeft.y/c.viewport.y*100;0=f&&(e.push("translateY("+f+"%)"),d=!1);f=c.size.x/c.viewport.x;1>f&&e.push("scaleX("+f+")");c=c.size.y/c.viewport.y;1>f&&e.push("scaleY("+c+")");e.length&&(a.g.style.transform=e.join(" "));d&&(a.g.style.transition="transform 250ms")}a.C&& (a.C.style.pointerEvents="none",b.background&&(a.C.style.background=b.background));a.G&&(a.G.style.background=b.overlay?"":"rgb(0, 0, 0)")}function gs(a,b){if(!b||b.displayOnBackground)a.g.style.zIndex="";b&&null==b.currentVideo||(a.g.style.transformOrigin="",a.g.style.transition="",a.g.style.transform="");a.C&&(a.C.style.pointerEvents="",!b||b.background)&&(a.C.style.background="");a.G&&(a.G.style.background="")} function is(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,D,G,C,E,H,K,J,L,N,O,M,P,R,T,ca,Y,Ma,Na,Ea,va,Ja,Pa,za;return Q(function(ja){switch(ja.g){case 1:c=[];if(!b)return ja.return(c);d=b.values.find(function(Aa){return"X-ASSET-URI"==Aa.key});e=b.values.find(function(Aa){return"X-ASSET-LIST"==Aa.key});if(!d&&!e)return ja.return(c);f=null;if(g=b.values.find(function(Aa){return"ID"==Aa.key}))f=g.data;h=null==f?Math.floor(10*b.startTime)/10:b.startTime;(k=b.endTime)&&Infinity!=b.endTime&&"number"== typeof b.endTime&&(k=null==f?Math.floor(10*b.endTime)/10:b.endTime);l=b.values.find(function(Aa){return"X-RESTRICT"==Aa.key});n=m=!0;l&&l.data&&(q=l.data,m=!q.includes("SKIP"),n=!q.includes("JUMP"));r=m?0:null;if(u=b.values.find(function(Aa){return"X-ENABLE-SKIP-AFTER"==Aa.key}))w=u.data,r=parseFloat(w),isNaN(r)&&(r=m?0:null);v=null;if(y=b.values.find(function(Aa){return"X-ENABLE-SKIP-FOR"==Aa.key}))z=y.data,v=parseFloat(z),isNaN(r)&&(v=null);A=null;if(B=b.values.find(function(Aa){return"X-RESUME-OFFSET"== Aa.key}))D=B.data,A=parseFloat(D),isNaN(A)&&(A=null);G=null;if(C=b.values.find(function(Aa){return"X-PLAYOUT-LIMIT"==Aa.key}))E=C.data,G=parseFloat(E),isNaN(G)&&(G=null);J=K=H=!1;if(L=b.values.find(function(Aa){return"CUE"==Aa.key}))N=L.data,H=N.includes("ONCE"),K=N.includes("PRE"),J=N.includes("POST");O=!1;(M=b.values.find(function(Aa){return"X-TIMELINE-OCCUPIES"==Aa.key}))?(P=M.data,O=P.includes("RANGE")):!B&&a.D.T()&&(O=!K&&!J);if(d){R=d.data;if(!R)return ja.return(c);c.push({id:f,groupId:null, startTime:h,endTime:k,uri:R,mimeType:null,isSkippable:m,skipOffset:r,skipFor:v,canJump:n,resumeOffset:A,playoutLimit:G,once:H,pre:K,post:J,timelineRange:O,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});ja.A(2);break}if(!e){ja.A(2);break}T=e.data;if(!T)return ja.return(c);ta(ja,4);ca={type:11};return F(ja,ls(a,T,ca),6);case 6:Y=ja.h;Ma=Wb(Y);Na=JSON.parse(Ma);if(Ea=Na["SKIP-CONTROL"])va=Ea["ENABLE-SKIP-AFTER"],"number"==typeof va&&(r=parseFloat(va),isNaN(va)&&(r=m? 0:null)),Ja=Ea["ENABLE-SKIP-FOR"],"number"==typeof Ja&&(v=parseFloat(Ja),isNaN(Ja)&&(v=null));for(Pa=0;Pad.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.L.includes(d.adId)&&(a.B=b,a.h.currentTime=c.startTimeInSeconds)}} function xs(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.D,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"),zs(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),zs(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),zs(a,"thirdQuartile"));d=a.g.getRemainingTime(); e=a.g.getDuration();a.g.canSkipNow()&&0=d||d>e)&&rs(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.L.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}rs(a);a.K=e;a.g=new ps(g,f+1,e.ads.length,!0,a.h);a.D=g;0===f&&zs(a,"breakStart");As(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.B),a.B=null)}}} function rs(a){if(a.g){for(;a.C.lastChild;)a.C.removeChild(a.C.firstChild);a.I||a.L.push(a.D.adId);var b=a.g.m;(void 0===b?0:b)?zs(a,"skip"):zs(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.s.Da(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&zs(a,"breakEnd");a.g=null;a.D=null;a.K=null}} function As(a){var b=!1;a.h.paused?b=!0:(zs(a,"impression"),zs(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&zs(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||zs(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(zs(a,"impression"),zs(a,"start"),b=!1):zs(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){zs(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 zs(a,b){var c=a.D.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.K.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=Xg([e],Gg()),e.method="POST",a.J.request(7,e,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break; case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("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 U("ad-skip-state-changed"))}};function Bs(a,b){this.g=a;this.i=null;this.h=b}p=Bs.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.i?this.i.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};p.isPaused=function(){return this.h.paused};p.isSkippable=function(){return this.g.isSkippable()}; p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};p.skip=function(){this.h.currentTime+=this.getRemainingTime()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.play()};p.getVolume=function(){return this.h.volume};p.setVolume=function(a){this.h.volume=a};p.isMuted=function(){return this.h.muted};p.isLinear=function(){return!0};p.resize=function(){}; p.setMuted=function(a){this.h.muted=a};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()}; p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",Bs); Bs.prototype.release=Bs.prototype.release;Bs.prototype.getPodIndex=Bs.prototype.getPodIndex;Bs.prototype.getTimeOffset=Bs.prototype.getTimeOffset;Bs.prototype.getMediaUrl=Bs.prototype.getMediaUrl;Bs.prototype.getAdvertiserName=Bs.prototype.getAdvertiserName;Bs.prototype.getCreativeAdId=Bs.prototype.getCreativeAdId;Bs.prototype.getAdId=Bs.prototype.getAdId;Bs.prototype.getVastAdId=Bs.prototype.getVastAdId;Bs.prototype.getVastMediaWidth=Bs.prototype.getVastMediaWidth; Bs.prototype.getVastMediaHeight=Bs.prototype.getVastMediaHeight;Bs.prototype.getVastMediaBitrate=Bs.prototype.getVastMediaBitrate;Bs.prototype.getDescription=Bs.prototype.getDescription;Bs.prototype.getTitle=Bs.prototype.getTitle;Bs.prototype.getPositionInSequence=Bs.prototype.getPositionInSequence;Bs.prototype.getSequenceLength=Bs.prototype.getSequenceLength;Bs.prototype.setMuted=Bs.prototype.setMuted;Bs.prototype.resize=Bs.prototype.resize;Bs.prototype.isLinear=Bs.prototype.isLinear; Bs.prototype.isMuted=Bs.prototype.isMuted;Bs.prototype.setVolume=Bs.prototype.setVolume;Bs.prototype.getVolume=Bs.prototype.getVolume;Bs.prototype.play=Bs.prototype.play;Bs.prototype.pause=Bs.prototype.pause;Bs.prototype.skip=Bs.prototype.skip;Bs.prototype.canSkipNow=Bs.prototype.canSkipNow;Bs.prototype.getTimeUntilSkippable=Bs.prototype.getTimeUntilSkippable;Bs.prototype.isSkippable=Bs.prototype.isSkippable;Bs.prototype.isPaused=Bs.prototype.isPaused;Bs.prototype.getRemainingTime=Bs.prototype.getRemainingTime; Bs.prototype.getMinSuggestedDuration=Bs.prototype.getMinSuggestedDuration;Bs.prototype.getDuration=Bs.prototype.getDuration;Bs.prototype.isUsingAnotherMediaElement=Bs.prototype.isUsingAnotherMediaElement;Bs.prototype.hasCustomClick=Bs.prototype.hasCustomClick;Bs.prototype.isClientRendering=Bs.prototype.isClientRendering;Bs.prototype.needsSkipUI=Bs.prototype.needsSkipUI;function Cs(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.B=this.m=this.s=null;this.C="";this.D=[];this.h=new Oc;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 U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Ds(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 Bs(f,e.l);e.B&&(e.m.i=e.B);e.i(new U("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.B=f.getStreamData().adProgressData;e.m&&(e.m.i=e.B)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))}); this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("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 U("ad-skipped"));e.i(new U("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.D= f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=Cs.prototype;p.configure=function(){};p.stop=function(){this.C="";this.s=null;this.D=[]};p.release=function(){this.stop();this.h&&this.h.release()};p.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};p.getCuePoints=function(){return this.D}; function Ds(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.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 Es(){jb.call(this);this.h=this.i=this.j=this.g=null;this.m=new Hr;this.s=navigator.language;this.l=null}pa(Es,jb);p=Es.prototype;p.setLocale=function(a){this.s=a};p.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};p.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Vr(a,b,c,function(e){return Fs(d,e)});this.g.configure(this.l)}; p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new V(2,10,1E4);this.j&&this.j.release();this.j=new Nr(a,b,this.s,c,function(e){return Fs(d,e)});this.j.configure(this.l)};p.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);jb.prototype.release.call(this)}; p.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new Hr};p.requestClientSideAds=function(a){if(!this.j)throw new V(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)}; p.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new V(1,10,10001);var b=this.j;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new qs(a,b,c,function(e){return Fs(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new V(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new V(1,10,10004)):(d.l=new Ig,ts(d,a,b),d.H=c||"",d.O=Date.now()/1E3,a=d.l);return a}; p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new V(1,10,10005);var b=this.i;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new V(2,10,10002);this.h&&this.h.release();this.h=new Cs(a,b,this.s,function(d){return Fs(c,d)});this.h.configure(this.l)}; p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.h)throw new V(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('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 overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.15.4";c=this.h;c.j?a=Promise.reject(new V(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&& (c.G=!0),c.j=new Ig,c.g.requestStream(a),c.C=b||"",c.F=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new V(1,10,10003);(a.mpt||a.mpv)&&ab('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 overridden.');a.mpt="Shaka Player";a.mpv="v4.15.4";this.h.g.replaceAdTagParameters(a)}; p.getServerSideCuePoints=function(){Uc("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:Ir(a),started:a.h,overlayAds:a.j,playedCompletely:a.l,skipped:a.m,errors:a.i}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)}; p.onDashTimedMetadata=function(a){this.h&&"urn:google:dai:2018"==a.schemeIdUri&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};p.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};p.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&hs(this.g,c))}; p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==d||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==d){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b="urn:mpeg:dash:event:alternativeMPD:replace:2025"==c.schemeIdUri,d="urn:mpeg:dash:event:alternativeMPD:insert:2025"==c.schemeIdUri,b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=t(c.eventNode.children),m=l.next();!m.done;m= l.next())if(m=m.value,"AlternativeMPD"==m.tagName){if(m=m.attributes.uri){k=m;break}}else if("InsertPresentation"==m.tagName||"ReplacePresentation"==m.tagName){var n=m.attributes.url;if(n){k=n;(l=Wd(m,"maxDuration",be))&&(g=l/c.timescale);(l=Wd(m,"returnOffset",be))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&js(a,[{id:c.id,groupId:null,startTime:e,endTime:f,uri:k,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?h:null,playoutLimit:g,once:!1,pre:!1,post:!1,timelineRange:b&& !d,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else("urn:mpeg:dash:event:2012"==d||"urn:scte:dash:scte214-events"==d)&&c.eventNode&&Td(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&ks(this.g,c))}};p.addCustomInterstitial=function(a){if(!this.g)throw new V(1,10,10006);js(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new V(1,10,10006);return this.g.addAdUrlInterstitial(a)}; p.getInterstitialPlayer=function(){if(!this.g)throw new V(1,10,10006);return this.g.Sb()};function Fs(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++;var c=b.ad;c&&!c.isLinear()&&a.m.j++;break;case "ad-complete":a.m.l++;break;case "ad-skipped":a.m.m++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Es);Es.prototype.getInterstitialPlayer=Es.prototype.getInterstitialPlayer;Es.prototype.addAdUrlInterstitial=Es.prototype.addAdUrlInterstitial; Es.prototype.addCustomInterstitial=Es.prototype.addCustomInterstitial;Es.prototype.onDASHInterstitialMetadata=Es.prototype.onDASHInterstitialMetadata;Es.prototype.onHLSInterstitialMetadata=Es.prototype.onHLSInterstitialMetadata;Es.prototype.onCueMetadataChange=Es.prototype.onCueMetadataChange;Es.prototype.onHlsTimedMetadata=Es.prototype.onHlsTimedMetadata;Es.prototype.onDashTimedMetadata=Es.prototype.onDashTimedMetadata;Es.prototype.onManifestUpdated=Es.prototype.onManifestUpdated; Es.prototype.getStats=Es.prototype.getStats;Es.prototype.getCuePoints=Es.prototype.getCuePoints;Es.prototype.getServerSideCuePoints=Es.prototype.getServerSideCuePoints;Es.prototype.replaceServerSideAdTagParameters=Es.prototype.replaceServerSideAdTagParameters;Es.prototype.requestServerSideStream=Es.prototype.requestServerSideStream;Es.prototype.initServerSide=Es.prototype.initServerSide;Es.prototype.addMediaTailorTrackingUrl=Es.prototype.addMediaTailorTrackingUrl; Es.prototype.requestMediaTailorStream=Es.prototype.requestMediaTailorStream;Es.prototype.initMediaTailor=Es.prototype.initMediaTailor;Es.prototype.updateClientSideAdsRenderingSettings=Es.prototype.updateClientSideAdsRenderingSettings;Es.prototype.requestClientSideAds=Es.prototype.requestClientSideAds;Es.prototype.onAssetUnload=Es.prototype.onAssetUnload;Es.prototype.release=Es.prototype.release;Es.prototype.initClientSide=Es.prototype.initClientSide;Es.prototype.initInterstitial=Es.prototype.initInterstitial; Es.prototype.configure=Es.prototype.configure;Es.prototype.setLocale=Es.prototype.setLocale;Es.ADS_LOADED="ads-loaded";Es.AD_STARTED="ad-started";Es.AD_FIRST_QUARTILE="ad-first-quartile";Es.AD_MIDPOINT="ad-midpoint";Es.AD_THIRD_QUARTILE="ad-third-quartile";Es.AD_COMPLETE="ad-complete";Es.AD_STOPPED="ad-stopped";Es.AD_SKIPPED="ad-skipped";Es.AD_VOLUME_CHANGED="ad-volume-changed";Es.AD_MUTED="ad-muted";Es.AD_PAUSED="ad-paused";Es.AD_RESUMED="ad-resumed";Es.AD_SKIP_STATE_CHANGED="ad-skip-state-changed"; Es.CUEPOINTS_CHANGED="ad-cue-points-changed";Es.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Es.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Es.AD_CLICKED="ad-clicked";Es.AD_PROGRESS="ad-progress";Es.AD_BUFFERING="ad-buffering";Es.AD_IMPRESSION="ad-impression";Es.AD_DURATION_CHANGED="ad-duration-changed";Es.AD_CLOSED="ad-closed";Es.AD_LOADED="ad-loaded";Es.ALL_ADS_COMPLETED="all-ads-completed";Es.AD_LINEAR_CHANGED="ad-linear-changed";Es.AD_METADATA="ad-metadata"; Es.AD_RECOVERABLE_ERROR="ad-recoverable-error";Es.AD_ERROR="ad-error";Es.AD_BREAK_READY="ad-break-ready";Es.AD_INTERACTION="ad-interaction";Es.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Es.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Es.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";fq=function(){return new Es};function Gs(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof U){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(Ij(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 Hs(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=Is(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 Is(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}} var Js="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Ks="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Ls=["loop","playbackRate"],Ms=["pause","play"],Ns=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages", 4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),Os=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks", 2).set("getVariantTracks",2),Ps=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Qs=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Rs=[["isTextTrackVisible","setTextTrackVisibility"]],Ss="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "), Ts="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function Us(a,b,c,d,e,f,g){var h=this;this.G=a;this.J=g;this.l=new zf(b);this.K=c;this.u=!1;this.B=d;this.F=e;this.L=f;this.i=this.m=!1;this.I="";this.s=null;this.C=function(){return Vs(h)};this.D=function(k,l){k=Hs(l);switch(k.type){case "event":var m=k.targetName,n=Xa(k.event);h.B(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.u&&(h.K(),h.u=!1);break;case "asyncComplete":if(q=k.id,n=k.error,l=k.res,k=h.h.get(q),h.h.delete(q),k)if(n){q=new V(n.severity, n.category,n.code);for(m in n)q[m]=n[m];k.reject(q)}else k.resolve(l)}};this.g={video:{},player:{}};this.H=0;this.h=new Map;this.j=null;Ws.add(this)}p=Us.prototype;p.destroy=function(){Ws.delete(this);Xs(this);Ys&&Zs(this);this.l&&(this.l.stop(),this.l=null);this.F=this.B=null;this.i=this.m=!1;this.D=this.C=this.j=this.h=this.g=this.s=null;return Promise.resolve()};p.Pa=function(){return this.i};p.Tf=function(){return this.I}; p.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ka();var a=new chrome.cast.SessionRequest(this.G,[],null,this.J,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Ws),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Ig;d.u=!0;$s(d,e)}},function(b){for(var c=t(Ws),d=c.next();!d.done;d=c.next())d=d.value,at="available"==b,d.l.Ka()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});at&&this.l.X(bt);(a=Ys)&& a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Ig,this.u=!0,$s(this,a)):Ys=null}else window.__onGCastApiAvailable!==ct&&(dt=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=ct)};p.Th=function(a){this.s=a;this.i&&et(this,{type:"appData",appData:this.s})}; p.cast=function(){var a=this;return Q(function(b){if(!a.m)throw new V(1,8,8E3);if(!at)throw new V(1,8,8001);if(a.i)throw new V(1,8,8002);a.j=new Ig;chrome.cast.requestSession(function(c){return $s(a,c)},function(c){return ft(a,c)});return F(b,a.j,0)})};function gt(a){a.i&&chrome.cast.requestSession(function(b){return $s(a,b)},function(b){return ft(a,b)})}p.zd=function(){if(this.i){Xs(this);if(Ys){Zs(this);try{Ys.stop(function(){},function(){})}catch(a){}Ys=null}Vs(this)}}; p.get=function(a,b){var c=this;if("video"==a){if(Ms.includes(b))return function(){return c.qj.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))}}else if("player"==a){if(Ps.has(b)&&!this.get("player","isLive")())return function(){};if(Ss.includes(b))return function(){return c.qj.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))};if(Ts.includes(b))return function(){return c.Wl.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))};if(Ns.has(b)||Os.has(b))return function(){return c.g[a][b]}}return this.g[a][b]}; p.set=function(a,b,c){this.g[a][b]=c;et(this,{type:"set",targetName:a,property:b,value:c})};function $s(a,b){var c=a.L();Ys=b;b.addUpdateListener(a.C);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Vs(a);et(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function ft(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 V(2,8,c,b))} p.qj=function(a,b){et(this,{type:"call",targetName:a,methodName:b,args:Ka.apply(2,arguments)})};p.Wl=function(a,b){var c=Ka.apply(2,arguments),d=new Ig,e=this.H.toString();this.H++;this.h.set(e,d);try{et(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Zs(a){var b=Ys;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)} function Vs(a){var b=Ys?"connected"==Ys.status:!1;if(a.i&&!b){a.F();for(var c in a.g)a.g[c]={};Xs(a)}a.i=b;a.I=b?Ys.receiver.friendlyName:"";a.l.Ka()}function Xs(a){if(a.h)for(var b=t(a.h.keys()),c=b.next();!c.done;c=b.next()){c=c.value;var d=a.h.get(c);a.h.delete(c);d.reject(new V(1,7,7E3))}} function et(a,b){b=Gs(b);var c=Ys;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new V(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.B("player",c),a.zd(),b;}}var bt=.02,at=!1,Ys=null,dt=null,Ws=new Set;function ct(a){dt?window.__onGCastApiAvailable=dt:delete window.__onGCastApiAvailable;dt=null;if(a)for(var b=t(Ws),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function ht(a,b,c,d){d=void 0===d?!1:d;jb.call(this);var e=this;this.i=a;this.h=b;this.l=this.s=this.m=this.u=this.j=null;this.H=c;this.G=d;this.D=[];this.C=[];this.B=[];this.F=new Map;this.g=null;window.chrome?(this.g=new Us(c,function(){return it(e)},function(){return jt(e)},function(f,g){return kt(e,f,g)},function(){return lt(e)},function(){return mt(e)},d),nt(this)):(this.j=this.i,this.u=this.h)}pa(ht,jb);p=ht.prototype; p.destroy=function(a){this.g&&(void 0===a?0:a)&&this.g.zd();this.l&&(this.l.release(),this.l=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.j=this.i=null;jb.prototype.release.call(this);return Promise.all(a)};p.Kc=function(){return this.j};p.Sb=function(){return this.u};p.Dg=function(){return this.g?this.g.m&&at:!1};p.Pa=function(){return this.g?this.g.Pa():!1};p.Tf=function(){return this.g?this.g.Tf():""}; p.cast=function(){var a=this;return Q(function(b){return 1==b.g?a.g?F(b,a.g.cast(),2):b.return():a.h?F(b,a.h.lc(),0):b.return()})};p.Th=function(a){this.g&&this.g.Th(a)};p.Oj=function(){this.g&>(this.g)};p.zd=function(){this.g&&this.g.zd()}; p.Ei=function(a,b){b=void 0===b?!1:b;var c=this;return Q(function(d){if(1==d.g){if(a==c.H&&b==c.G)return d.return();c.H=a;c.G=b;if(!c.g)return d.return();c.g.zd();return F(d,c.g.destroy(),2)}c.g=null;c.g=new Us(a,function(){return it(c)},function(){return jt(c)},function(e,f){return kt(c,e,f)},function(){return lt(c)},function(){return mt(c)},b);c.g.init();I(d)})}; function nt(a){a.g.init();a.l=new Oc;for(var b=t(Js),c=b.next();!c.done;c=b.next())a.l.o(a.i,c.value,function(f){a.g.Pa()||(f=Xa(f),a.m.dispatchEvent(f))});for(var d in Ya)a.l.o(a.h,Ya[d],function(f){a.g.Pa()||a.s.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={me:b.me},b.me=e,Object.defineProperty(a.j,b.me,{configurable:!1,enumerable:!0,get:function(f){return function(){return ot(a,f.me)}}(b),set:function(f){return function(g){var h=f.me;a.g.Pa()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};pt(a, function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return qt(a,f)}})});rt(a);a.m=new jb;a.m.Qe=a.j;a.s=new jb;a.s.Qe=a.u;a.l.o(a.h,"unloading",function(){a.g&&a.g.Pa()||st(a)})}function rt(a){var b=new Map;pt(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(ju())}function ju(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function ku(a,b){lu(a)&&(a.i[a.h][a.g]=new Qt(b,a.D,a.B,a.u,a.C),a.g++)}function lu(a){var b=a.gc;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=ju()} function nu(a,b,c){var d=new oe(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":qe;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.L;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.K;e.viewportAnchorUnits=a.J?pd:2;switch(a.G){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=Nt(d,"svc"+c,a.i,a.j,b))a.j=b;return c}hu.prototype.display=function(){this.l=!0};function ou(){this.i=[];this.h=null;this.g=0}function pu(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0this.h.length)throw new V(2,2,3E3);this.g+=a}; qu.prototype.vj=function(a){if(0>this.g-a)throw new V(2,2,3E3);this.g-=a};function su(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null} function tu(a,b,c,d){if(!a.g)return[];if(24==c)return c=ru(b).value,d=ru(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),ku(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!lu(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=nu(b,d,a.i));b.h+1>=b.s?mu(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=nu(b,d,a.i));b.i[b.h]=ju();b.g=0;break;case 12:b.isVisible()&& (e=nu(b,d,a.i)),iu(b),b.h=0,b.g=0}return e?[e]:[]} function uu(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=ru(b).value;b=[];c=t(vu(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=nu(e,d,a.i);f&&b.push(f)}iu(e)}return b}if(137===c)for(b=ru(b).value,b=t(vu(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=ru(b).value;b=null;c=t(vu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=nu(e,d,a.i)),e.l=!1;return b? [b]:[]}if(139===c){c=ru(b).value;b=null;c=t(vu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=nu(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(140===c)return b=ru(b).value,wu(a,b,d);if(143===c)return d=wu(a,255,d),xu(a),d;if(144===c)b.skip(1),d=ru(b).value,a.g&&(a.g.B=0<(d&128),a.g.D=0<(d&64));else if(145===c)d=ru(b).value,c=ru(b).value,b.skip(1),a.g&&(b=yu((c&48)>>4,(c&12)>>2,c&3),a.g.C=yu((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=ru(b).value,b=ru(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=ru(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];e||(f=new hu(c,a.i),f.j=d,a.h[c]=f);d=ru(b).value;f=ru(b).value;var g=ru(b).value,h=ru(b).value,k=ru(b).value;b=ru(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.B=!1,b.C="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.K=f&127;b.H=g;b.G=(h&240)>>4;b.J=0<(f&128);b.s=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]} function vu(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function wu(a,b,c){var d=[];b=t(vu(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=nu(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function xu(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function yu(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return zu[a<<2|b<<1|c]} var Au=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"]]),zu="black blue green cyan red magenta yellow white".split(" ");function Bu(){this.h=[];this.g=[];this.i=new ou;this.l=0;this.m=new Map([["CC1",new bu(0,0)],["CC2",new bu(0,1)],["CC3",new bu(1,0)],["CC4",new bu(1,1)]]);this.u=this.s=0;this.j=new Map;this.C=!0;this.B=new Set;Cu(this)}Bu.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Cu(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())xu(b.value)}; function Cu(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,St(c.i),St(c.j),St(c.s);a.C=!0} Bu.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 ih(a,0);if(!(8>a.getLength())&&181===a.aa()&&49===a.Fa()&&1195456820===a.W()&&3===a.aa()&&(c=a.aa(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d>2,g=a.aa(),h=a.aa();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Fb:g,mc: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})))}}; Bu.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=Du(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())pu(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Eu(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b}; function Du(a,b){var c=b.type;if(16===(b.Fb&112)){var d=b.Fb>>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.Fb&&255===b.mc||!b.Fb&&!b.mc||!Fu(b.Fb)||!Fu(b.mc))return 45<=++a.l&&Cu(a),null;a.l=0;b.Fb&=127;b.mc&=127;var e=b.Fb;if(1<=e&&15>=e||!b.Fb&&!b.mc)return null;e=null;if(16===(b.Fb&112))a:{a.B.add(d),d=b.Fb;a=b.mc;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=gu[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,au(g,c,1+g.g-g.h,g.h),Vt(g,0,c-1),Vt(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",Wt(c.g,0,32),d=!1,b=gu[(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=fu[(a& 14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))Wt(c.g,1,a);else if(18===(d&246)&&32===(a&224))Wt(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.mc){case 32:du(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=cu(c,2,a);break;case 38:d=cu(c,3,a);break;case 39:d=cu(c,4,a);break;case 40:Wt(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:St(c.s);eu(c);break;case 43:eu(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Tt(b,c.l,a));Vt(b,0,15);break;case 45:b= c.g;3!==c.h?d=null:(d=Tt(b,c.l,a),e=b.g-b.h+1,au(b,e-1,e,b.h),Vt(b,0,e-1),Vt(b,b.g,15-b.g),c.l=a);break;case 46:Vt(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Tt(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,du(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.B=a-32)}e=null}else a=b.mc,Wt(c.g,0,b.Fb),Wt(c.g,0,a);return e} function Eu(a,b){var c=[];try{for(;b.Oa();){var d=ru(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=ru(b).value&63);if(0!=e){a.B.add("svc"+e);a.j.has(e)||a.j.set(e,new su(e));for(var g=a.j.get(e),h=b.Ua();b.Ua()-h=m)var r=tu(e,k,m,n);else if(128<=m&&159>=m)r=uu(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?ku(e.g,"\u266a"):ku(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&ku(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(Au.has(k)){var u=Au.get(k);ku(e.g,u)}else ku(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?ku(e.g,"_"):ku(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(w){if(w instanceof V&&3E3===w.code)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data."); else throw w;}return c}function Fu(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}Bu.prototype.getStreams=function(){return Array.from(this.B)};S("shaka.cea.CeaDecoder",Bu);kd=function(){return new Bu};function Gu(a){for(var b=[],c=a,d=a=0;d>1&63;r=39==r||40==r;break;case Nu:h=2;b.skip(1);r=q>>1&63;r=23==r||24==r;break;default:return}if(r)for(q=0,lc.byteLength){c=[];break a}var f=Kb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Qu(a){a=hc(Qd(a));a=Pu(a).filter(function(b){return b.type===Ru})[0];if(!a)return null;a=Xb(a.value,!0);return(a=Id(a,"WRMHEADER"))?a:null} function Su(a){try{var b=Qu(a);if(b)a:{for(var c=t(Sd(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=t(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if("LA_URL"==h.tagName){var k=Qd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Ru=1;function Tu(a,b,c){var d=Uu(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1"+a+"");return Su(a)}return""} function Wu(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.Nd];if(h){var k;if((k=Ud(g.node,"urn:microsoft:playready","pro"))&&Qd(k)){k=Qd(k);k=hc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:xh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Nd){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]),q=new Uint8Array([]);l=[{initData:xh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=mc(h,b,g.init||a||k||l);if(h=Zu.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Uu(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=$u(c.value))&&b.push(c);return b} function $u(a){var b=a.attributes.schemeIdUri,c=Xd(a,"urn:mpeg:cenc:2013","default_KID"),d=Vd(a,"urn:mpeg:cenc:2013","pssh").map(Rd),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new V(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:hc(g),keyId:null}})}catch(g){throw new V(2,4,4007);}return{node:a,Nd:b,keyId:c,init:0v)if(r){r=Wd(r,"t",ee);if(null== r)break;else if(u>=r)break;v=Math.ceil((r-u)/w)-1}else{if(Infinity==a)break;else if(u/f>=a)break;v=Math.ceil((a*f-u)/w)-1}0>>31;q&=2147483647;var u=g.reader.W();g.reader.skip(4);if(1==r)throw new V(2,3,3006);h.push(new Aj(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function jv(a){this.h=Ob(a);this.g=new ih(this.h,0)}jv.prototype.Oa=function(){return this.g.Oa()}; function kv(a){var b=lv(a);if(7=c&&(c=v.timeline+1)}-1==k&&(k=c);r=new Lv(n,a.M.originalId,a.bandwidth,a.M.jb,a.Ob,u,w,m,g,a.M.Zf,k)}n.timeline&&"image"!==a.ua.contentType&&"text"!==a.ua.contentType&&a.presentationTimeline.lj(r.h?r.h.timeline:[],u);d&&a.qc&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.fc:-1;l=-1;r instanceof Lv&&(l=r.hf());return{endTime:d,timeline:l,Zc:function(){r instanceof Lv&&0==r.getNumReferences()&&Kv(r,n,u,w,m);return Promise.resolve(r)}, timescale:n.timescale}}function Fv(a){return a.Pc}function Hv(a){var b=bv(a,Fv),c=cv(a,Fv,"media"),d=cv(a,Fv,"index"),e=cv(a,Fv,"k"),f=0;e&&(f=parseInt(e,10));return{hg:b.hg,mb:b.mb,timescale:b.timescale,Be:b.Be,fc:b.fc,mi:b.mi,timeline:b.timeline,ec:c&&cc(c),je:d,mimeType:a.M.mimeType,codecs:a.M.codecs,bandwidth:a.bandwidth,Kl:f}} function Iv(a){var b=a.je?1:0;b+=a.timeline?1:0;b+=a.mb?1:0;if(0==b)throw new V(2,4,4002);1!=b&&(a.je&&(a.timeline=null),a.hg=null,a.mb=null);if(!a.je&&!a.ec)throw new V(2,4,4002);} function Jv(a,b,c,d,e,f,g,h){function k(L){var N=L-v,O=N*w,M=b.hg,P=N*M;"BigInt"in window&&P>Number.MAX_SAFE_INTEGER&&(P=BigInt(N)*BigInt(M));O+=q;N=O+w;M=Math.min(N,m());var R=[],T=b.Kl;if(T)for(var ca=(M-O)/T,Y={},Ma=0;Mam()&&!O.length?null:O})}return Promise.resolve(K)} function Gv(a,b){var c=a.M.vf;c||(c=cv(a,Fv,"initialization"));if(!c)return null;c=cc(c);var d=a.M.originalId,e=a.bandwidth||null,f=a.M.jb,g=a.Ob;b=new yj(function(){var h=av(c,d,null,null,e,null);return lc(f(),[h],g())},0,null,sv(a),null,null,b,a.ua.encrypted);b.codecs=a.M.codecs;b.mimeType=a.M.mimeType;a.va&&(b.g=a.va.start+a.va.duration);return b} function Lv(a,b,c,d,e,f,g,h,k,l,m){Vl.call(this,[]);this.h=a;this.F=b;this.C=c;this.D=d;this.H=e;this.j=f;this.l=g;this.u=h;this.B=k;this.G=l;this.I=m;Mv(this)}pa(Lv,Vl);p=Lv.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){Vl.prototype.release.call(this);this.h=null}; p.hb=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 Kv(a,b,c,d,e){Nv(a,e);if(a.h){c=a.h.timeline;a.h.ec!==b.ec&&(a.h.ec=b.ec);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.hb(a.j)}} p.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){c=this.h.timeline[a];var d=c.cm,e=c.ni+this.h.mi,f=this.j-this.h.fc,g=this.j+c.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=.1h&&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 qb(k.location)).Gb))return!1;return!0});d.length&&(a.C=d[0].Hh);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:lc(a.i,d)};function Vv(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.s=!1;this.m=new Set}p=Vv.prototype;p.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()};p.jl=function(){return this.l};p.mh=function(){return this.j.slice()};p.Hk=function(){return this.i}; p.Ji=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})),d.dependencyStream&&(d.dependencyStream.matchedStreams=d.dependencyStream.matchedStreams.filter(function(e){return e!== a}));else if(a.type==sc)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 Wv(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[Xv(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Yv(n),n]})),l=new Map(h.textStreams.map(function(n){return[Zv(n),n]}));h=new Map(h.imageStreams.map(function(n){return[$v(n),n]}));if(b){var m=aw(sc);l.set(Zv(m),m);m=aw("image");h.set($v(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{zi:c,Xj:d,Sj:e,Wi:f}} p.Hg=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,D,G,C,E,H,K,J,L,N,O,M,P,R,T,ca;return Q(function(Y){if(1==Y.g){e=uc;if(!b&&1==a.length)return f=Wv(a,!1),g=f.zi,h=f.Xj,k=f.Sj,l=f.Wi,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.A(2);m=c?d.m.size:0;n=-1;for(q=0;q=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){J.A(4);break}n=m.value;return F(J,iw(a,n,c,d,f,h,g),5);case 5:q=J.h;if(!q)throw new V(2,4,4037);m=l.next();J.A(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(w=u.value,v=t(w),y=v.next();!y.done;y=v.next())z=y.value,(A=jw(a,z,c,e,f,h))&&b.push(A);B=t(h);for(D=B.next();!D.done;D= B.next())for(G=D.value,C=t(G),E=C.next(),H={};!E.done;H={ai:void 0},E=C.next())if(H.ai=E.value,!kw(H.ai)&&(K=b.some(function(L){return function(N){return lw(a,L.ai,N)}}(H))))throw new V(2,4,4037);return J.return(b)}})}function iw(a,b,c,d,e,f,g){return Q(function(h){if(1==h.g)return mw(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 Aw}else{if(c>a)return Aw;if(a-ca-b)return Aw}return Cw}function Bw(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return av&&w>u&&a.L++;null==w&&(w=u);if(!(null!==a.N&&null!==r&&null!==q&&q< a.N)||a.F.includes(r)||l+1==d.length){null!==q&&(null===a.N||q>a.N)&&(a.N=q);k=bx(a,b,c,{start:q,duration:w,node:m,Zi:null==w||!n});h.push(k);b.za.id&&w&&a.oa.set(b.za.id,w);if(null==w){k=null;break}k=q+w}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.F.includes(c)||a.F.push(c);else a.F=h.map(function(y){return y.id});return null!=f?{periods:h,duration:f+g,Li:!1}:{periods:h,duration:k,Li:!0}} function Vw(a){var b=Array.from(a.D.keys()).filter(function(h){return!a.F.includes(h)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=t(a.D.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.s.get(f);g&&(g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Ji(g,c),a.s.delete(f)))}d&&a.D.delete(c)}}function Ww(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=t(a.C.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.C.delete(d)} function bx(a,b,c,d){b.za=cx(a,d.node,null,c);b.va=d;b.za.wb=b.wb;b.za.id||(b.za.id="__shaka_period_"+d.start);var e=Pd(d.node,"EventStream");c=b.presentationTimeline.Kb();e=t(e);for(var f=e.next();!f.done;f=e.next())dx(a,d.start,d.duration,f.value,c);c=Pd(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=ex(a,e)))b.Ob=e;c=Pd(d.node,"AdaptationSet").map(function(r,u){return fx(a,b,u,r)}).filter(Cf);if(b.qc){e= [];f=t(c);for(var g=f.next();!g.done;g=f.next()){g=t(g.value.Yl);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new V(2,4,4018);}e=new Map;f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.nk),h=g.next();!h.done;h=g.next()){var k=t(h.value);h=k.next().value;k=k.next().value;e.set(h,k)}if(e.size)for(f=null,g=t(c),h=g.next();!h.done;h=g.next()){h=h.value;k=[];for(var l=t(h.streams),m=l.next(),n={};!m.done;n={bi:void 0},m=l.next())if(n.bi=m.value,e.has(n.bi.originalId)){f|| (f=Pd(d.node,"AdaptationSet").map(function(r,u){return fx(a,b,u,r)}).filter(Cf));m=t(f);for(var q=m.next();!q.done;q=m.next())if(q=q.value.streams.find(function(r){return function(u){return u.originalId==r.bi.originalId}}(n)))q.dependencyStream=e.get(q.originalId),q.originalId+=q.dependencyStream.originalId,k.push(q)}k.length&&h.streams.push.apply(h.streams,x(k))}d=c.filter(function(r){return!r.li});c=c.filter(function(r){return r.li});if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next())for(e= e.value,f=e.li.split(" "),g=t(d),h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id))for(h=t(h.streams),k=h.next();!k.done;k=h.next())lg(k.value,e.streams);c=gx(a.g.disableAudio,d,"audio");e=gx(a.g.disableVideo,d,"video");f=gx(a.g.disableText,d,sc);d=gx(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new V(2,4,4004);return{id:b.za.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}} function gx(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])} function fx(a,b,c,d){function e(L){var N=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];N&&L&&(L=lc(b.ua.jb(),[L],b.Ob()),a.j.addFont(N,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=cx(a,d,b.za,null);b.ua.position=c;var h=!1;c=Pd(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(Cf), l=void 0,m=b.ua.contentType==sc;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(null==q||"urn:mpeg:dash:role:2011"==q)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=Pd(d,"EssentialProperty");c=null;var u=!1;n=null;q=!1;r=t(r);for(var w=r.next();!w.done;w=r.next()){w=w.value;var v=w.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==v)c=w.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"== v)var y=g(parseInt(w.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==v)var z=f(parseInt(w.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v&&a.g.dash.enableFastSwitching?u=!0:"urn:dvb:dash:fontdownload:2014"==v?e(w):"urn:mpeg:dash:urlparam:2014"==v?(n=ex(a,w))||(q=!0):q=!0)}if(q)return null;var A=null;q=Pd(d,"SupplementalProperty");q=t(q);for(r=q.next();!r.done;r=q.next())r=r.value,w=r.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"== w?A=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?y=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?z=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==w?e(r):"urn:mpeg:dash:urlparam:2014"==w&&(n=ex(a,r));n&&(b.Ob=n);n=Pd(d,"Accessibility");var B=new Map,D;n=t(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=q||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!= q||a.g.disableText)"urn:mpeg:dash:role:2011"==q?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==q&&("1"==r?D="visually impaired":"2"==r?D="hard of hearing":"9"==r&&(D="spoken subtitles"));else if(q=1,null!=r)for(r=t(r.split(";")),w=r.next();!w.done;w=r.next()){v=w.value;var G=w=void 0;v.includes("=")?(v=v.split("="),w="svc"+v[0],G=v[1].split(",")[0].split(":").pop()):(w="svc"+q,q++,G=v);B.set(w,yc(G))}else B.set("svc1","und");else if(q=1,null!=r)for(r= r.split(";"),w=t(r),v=w.next();!v.done;v=w.next()){G=v.value;var C=v=void 0;G.includes("=")?(G=G.split("="),v=G[0].startsWith("CC")?G[0]:"CC"+G[0],C=G[1]||"und"):(v="CC"+q,2==r.length?q+=2:q++,C=G);B.set(v,yc(C))}else B.set("CC1","und");n=Pd(d,"ContentProtection");var E=Tu(n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.ua.encrypted=0a.J)){var c=a.J;0<=a.g.updatePeriod&&(c=a.g.updatePeriod);a.K.X(Math.max(c-b,Mc(a.ra)))}} function cx(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Kf:null,audioSamplingRate:null,wb:0,Zf:0,encrypted:!1};d=d||c.jb;var e=b.attributes.id,f=b.attributes.supplementalId,g=Pd(b,"BaseURL"),h,k=!1;if(a.h)for(var l=t(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=Rd(n);m&&n&&(Tv(a.h,e,m,n),k=!0)}k&&a.h||(h=g.map(Rd));l=b.attributes.contentType||c.contentType;m=b.attributes.mimeType||c.mimeType;n= Bm([b.attributes.codecs||c.codecs]).join(",");var q=Wd(b,"frameRate",he)||c.frameRate,r=b.attributes.sar||c.pixelAspectRatio,u=mx(Pd(b,"InbandEventStream"),c.emsgSchemeIdUris),w=Pd(b,"AudioChannelConfiguration");w=nx(w)||c.Kf;var v=Wd(b,"audioSamplingRate",ee)||c.audioSamplingRate;l||(l=ix(m,n));var y=Td(b,"SegmentBase"),z=Td(b,"SegmentTemplate"),A=y?Wd(y,"availabilityTimeOffset",fe)||0:0,B=z?Wd(z,"availabilityTimeOffset",fe)||0:0,D=g&&g.length?Wd(g[0],"availabilityTimeOffset",fe)||0:0;A=c.wb+D+A+ B;B=null;(D=Td(b,"SegmentSequenceProperties"))&&(D=Td(D,"SAP"))&&(B=Wd(D,"cadence",be));D=b.attributes.label;var G=Pd(b,"Label");G&&G.length&&(G=G[0],Qd(G)&&(D=Qd(G)));return{jb:function(){return lc(d(),g.length?a.h&&k?Uv(a.h,e):h?h:[]:[])},Od:y||c.Od,Bc:Td(b,"SegmentList")||c.Bc,Pc:z||c.Pc,Rf:Td(b,"ProducerReferenceTime")||c.Rf,width:Wd(b,"width",ee)||c.width,height:Wd(b,"height",ee)||c.height,contentType:l,mimeType:m,codecs:n,frameRate:q,pixelAspectRatio:r,emsgSchemeIdUris:u,id:f||e,originalId:e, language:b.attributes.lang,Kf:w,audioSamplingRate:v,wb:A,vf:null,Zf:B||c.Zf,label:D||null,encrypted:!1}}function mx(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 nx(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(Rd).filter(Cf);return d.length?lc(a.B,d):[]}S("shaka.dash.DashParser",Hw);Ci("application/dash+xml",function(){return new Hw});Ci("video/vnd.mpeg.dash.mpd",function(){return new Hw});function px(){}S("shaka.dependencies",px);px.has=function(a){return qx.has(a)};px.add=function(a,b){if(!rx[a])throw Error(a+" is not supported");a==sx?Uc("mux.js","mux.js is no longer used in Shaka Player."):qx.set(a,function(){return b})};var sx="muxjs",rx={In:sx,ISOBoxer:"ISOBoxer"};px.Allowed=rx;var qx=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function tx(){this.j=new Qb(function(){return navigator.userAgent.match(/Smart( ?|_)TV/i)||navigator.userAgent.match(/Android ?TV/i)?"TV":navigator.userAgentData?navigator.userAgentData.mobile?"MOBILE":"DESKTOP":/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?"MOBILE":navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase()?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?"MOBILE":"DESKTOP"});this.l=new Qb(function(){return navigator.vendor.includes("Apple")&& (navigator.userAgent.includes("Version/")||navigator.userAgent.includes("OS/"))?"WEBKIT":navigator.userAgent.includes("Edge/")?"EDGE":navigator.userAgent.includes("Chrome/")?"CHROMIUM":navigator.userAgent.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Fi(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=tx.prototype;p.ic=function(){return!!navigator.mediaCapabilities};p.Ja=function(){return this.j.value()};p.Ga=function(){return this.l.value()};p.xe=function(){return!1}; p.rj=function(){return!1};p.wf=function(){return!1};p.sj=function(){return!1};p.we=function(){return!1};p.od=function(){return!0};p.pd=function(){return!0};p.Ce=function(){return!0};p.xj=function(){return 0};p.nc=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Jj=function(){return!1};p.$h=function(){return!1}; p.$a=function(a){var b=this.Ja();if("TV"===b||"CONSOLE"===b||"CAST"===b)a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.ei=function(){return!!window.indexedDB};p.pj=function(){return[]};function On(a){Rb();return void 0!==window.matchMedia&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"}p.eg=function(){return!1};p.fj=function(){return!1};p.Ph=function(){return!1};p.di=function(){return!0};p.gj=function(){return!1}; p.Rj=function(){return!0};p.toString=function(){return"Device: "+this.Rb()+" v"+this.Ha()+"; Type: "+this.Ja()};function ux(){tx.call(this);this.g=new Qb(function(){var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null});this.h=new Qb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1this.g&&a.push("opus");return a};p.fj=function(){return!0};p.gj=function(){return 3===this.Ha()}; navigator.userAgent.includes("Tizen")&&(Tb=function(){return new Dx});function Ex(){tx.apply(this,arguments)}pa(Ex,tx);Ex.prototype.Ha=function(){return null};Ex.prototype.Rb=function(){return"Vizio"};Ex.prototype.Ja=function(){return"TV"};Ex.prototype.ic=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(Tb=function(){return new Ex});function Fx(){tx.call(this);this.h=new Qb(function(){return navigator.userAgent.includes("DT_STB_BCM")});this.g=new Qb(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null})}pa(Fx,tx);p=Fx.prototype;p.Ha=function(){return this.g.value()};p.Rb=function(){return"WebKit STB"};p.Ja=function(){return"TV"};p.Ga=function(){return"WEBKIT"}; p.ic=function(){return!1};p.od=function(){var a=this.g.value();return null!==a?15<=a:!0};p.nc=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.di=function(){return!this.h.value()}; if(navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("DT_STB_BCM")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1b.length||"data"!=b[0])throw new V(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new V(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1",gc(b),""].join("\n")))d.licenseServerUri=Su(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=Px(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=Px(b,"URI");c=fy(c.split("?")[0]);c=Kb(c.data);d=mc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:c}]);(b=Ox(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2)); b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.Ya=new Set;this.i=new Map;this.l=null;this.F="";this.La=new Zx;this.K=-1;this.Z=Infinity;this.Y=this.yc=this.Ta=!1;this.D=new zf(function(){if(a.R&&!a.g.continueLoadingWhenPaused&&(a.P.Da(a.R,"timeupdate"),a.R.paused)){a.P.qa(a.R,"timeupdate",function(){return iy(a)});return}iy(a)});this.sa=jy;this.m=null;this.Na=0;this.s=Infinity;this.fb=this.Ia=this.O=0;this.U=new Qg;this.H=new Map;this.I=new Map;this.ra=new Map;this.ba=new Map;this.L= new Map;this.na=new Map;this.oa=new Map;this.wc=this.$=!1;this.cb=new Lc(5);this.j=null;this.N=!0;this.P=new Oc;this.u=this.R=null;this.Lb=function(){return!1}}p=gy.prototype;p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.Lb=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.T()&&this.D.Ka()}; p.start=function(a,b){var c=this,d;return Q(function(e){return 1==e.g?(c.h=b,c.$=b.isLowLatencyMode(),F(e,ky(c,[a]).promise,2)):3!=e.g?(d=e.h,c.F=d.uri,F(e,ly(c,d.data),3)):e.return(c.m)})}; p.stop=function(){this.D&&(this.D.stop(),this.D=null);var a=[];this.U&&(a.push(this.U.destroy()),this.U=null);this.g=this.h=null;this.Ya.clear();this.m=null;this.i.clear();this.J.clear();this.I.clear();this.B.clear();this.ra.clear();this.ba.clear();this.L.clear();this.na.clear();this.oa.clear();this.j&&this.j.destroy();this.P&&(this.P.release(),this.P=null);return Promise.all(a)}; p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,q;return Q(function(r){if(1==r.g){if(!my(a))return r.return();b=[];c=Array.from(a.i.values());a.s=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(ny(a,g));return F(r,Promise.all(b),2)}oy(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.ee});d.length&&!h&&(k=py,qy(a,k.bk),l=d.map(function(u){return u.uc}),a.l.vb(Math.min.apply(Math,x(l))), a.h.updateDuration());h&&ry(a);m=t(d);for(n=m.next();!n.done;n=m.next())q=n.value,q.stream.isAudioMuxedInVideo||!q.stream.segmentIndex||cg(q.stream.segmentIndex)||a.h.disableStream(q.stream);I(r)})};function sy(a,b){return my(a)?a.C.get(b.type):b.Ef} function ny(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,D,G,C,E,H,K,J,L,N,O,M,P,R,T,ca,Y,Ma,Na;return Q(function(Ea){switch(Ea.g){case 1:if(b.stream.isAudioMuxedInVideo)return Ea.return();c=[];d=t(b.S());for(e=d.next();!e.done;e=d.next())f=e.value,g=new qb(f),h=g.g,b.df&&(0<=b.Vb&&h.add("_HLS_msn",String(b.Vb)),0<=b.Wb&&h.add("_HLS_part",String(b.Wb))),b.ef&&h.add("_HLS_skip","YES"),Hb(h)&&vb(g,xb(h.toString())),c.push(g.toString());ta(Ea,2);return F(Ea,ky(a,c,!0).promise,4);case 4:k=Ea.h;wa(Ea, 3);break;case 2:throw l=xa(Ea),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Ea.return();m=$x(a.La,k.data);if(1!=m.type)throw new V(2,4,4017);n=k.uri;n==k.originalUri||b.S().includes(n)||b.Uf.push(n);q=Sx(m.ka,"EXT-X-DEFINE");r=ty(a,q,n);u=b.stream;w=sy(a,b);return F(Ea,uy(a,m,u.mimeType,b.S,r),5);case 5:v=Ea.h;y=v.keyIds;z=v.drmInfos;A=v.encrypted;B=v.wi;u.encrypted||!A||B||(u.encrypted=!0);D=function(va,Ja){return va.size===Ja.size&&[].concat(x(va)).every(function(Pa){return Ja.has(Pa)})}; D(u.keyIds,y)||(u.keyIds=y,u.drmInfos=z,a.h.newDrmInfo(u));G=vy(a,m,w,r,b.S,b.type);C=G.segments;if(E=G.bandwidth)u.bandwidth=E;H=jm(u);K=t(C);for(J=K.next();!J.done;J=K.next())L=J.value,L.ea&&(L.ea.Ed=H);u.segmentIndex.pe(C,a.l.Kb());C.length&&(N=Vx(m.ka,"EXT-X-MEDIA-SEQUENCE",0),M=(O=Ux(m.ka,"EXT-X-SKIP"))?Number(Ox(O,"SKIPPED-SEGMENTS")):0,P=wy(N,C),R=P.Vb,T=P.Wb,b.Vb=R+M,b.Wb=T,ca=w.get(N),u.segmentIndex.hb(ca));if(Y=cg(u.segmentIndex))b.hd=Y.startTime,Ma=C[C.length-1],b.uc=Ma.endTime;if(Na=Ux(m.ka, "EXT-X-ENDLIST"))b.ee=!0;xy(a,m);yy(a,m.ka,u.type,r,b.S);I(Ea)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.R=a}; function zy(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.K,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=sy(a,f);if(g=cg(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.K=Math.max(a.K,l));f.Pg=l;break}}}}if(!(0>a.K))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Ay(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.K-d.Pg,0Math.abs(c))){b.hd+=c;b.uc+=c;a=sy(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.S()}} function ly(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,D,G,C,E,H,K,J,L,N,O,M,P,R,T,ca,Y,Ma,Na,Ea,va,Ja,Pa,za,ja;return Q(function(Aa){switch(Aa.g){case 1:c=uc;d=$x(a.La,b);e=Sx(d.ka,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new xl(null,0);a.l.nd(!0);k=function(){return[a.F]};l=null;m=new Map;if(1==d.type)return a.N=!1,R=Sx(d.ka,"EXT-X-DEFINE"),m=ty(a,R,a.F),l=c.Ea,T="",ca=new Map,F(Aa,Dy(a,a.G++,m,d,k,"",l,T,!0,"Media Playlist",null,ca,null,!1,null,!1),7);Ey(a,e);n=Sx(d.ka,"EXT-X-MEDIA");q=Sx(d.ka,"EXT-X-STREAM-INF"); r=Sx(d.ka,"EXT-X-IMAGE-STREAM-INF");u=Sx(d.ka,"EXT-X-I-FRAME-STREAM-INF");w=Sx(d.ka,"EXT-X-SESSION-KEY");v=Sx(d.ka,"EXT-X-SESSION-DATA");y=Sx(d.ka,"EXT-X-CONTENT-STEERING");Fy(a,v);return F(Aa,Gy(a,y),4);case 4:if(!a.g.ignoreSupplementalCodecs){z=[];A=t(q);B=A.next();for(D={};!B.done;D={Pj:void 0},B=A.next())if(G=B.value,C=Ox(G,"SUPPLEMENTAL-CODECS"))D.Pj=C.split(/\s*,\s*/).map(function(eb){return eb.split("/")[0]}),E=G.attributes.map(function(eb){return function(fb){var nb=fb.name,wb=fb.value;"CODECS"== nb&&(wb=eb.Pj.join(","),fb=fb.value.split(","),1d-2&&(e=Math.max(1,d-2));for(e=d-e;ea.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.Gj(0);a.l.Uh(c);a.l.nd(!1)} function Fz(a,b,c,d,e){var f=Ux(c,"EXT-X-MAP");if(!f)return null;var g=Px(f,"URI"),h=Wx(d(),g,e);g=[h.toString(),Ox(f,"BYTERANGE","")].join("-");if(!a.ra.has(g)){var k=void 0,l=null,m=!1;c=t(c);for(var n=c.next();!n.done;n=c.next())n=n.value,"EXT-X-KEY"==n.name?(m=Px(n,"METHOD"),ez(m)&&n.idJ?1:0}),c=0;cm))continue}if(null==m){var r=Ox(g,"DURATION")||Ox(g,"PLANNED-DURATION");if(r){var u= parseFloat(r);isNaN(u)||(m=l+u);if(0>k-f+u)continue}}var w=Ox(g,"CLASS")||"com.apple.quicktime.HLS",v="YES"==Ox(g,"END-ON-NEXT");if(null==m&&v){for(var y=c+1;yk){m=Math.max(0,B-f);break}}}if(null==m)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var D=[],G=t(g.attributes),C=G.next();!C.done;C=G.next()){var E=C.value;if(!y.includes(E.name)){var H= Yx(E.value,d);if("X-ASSET-URI"==E.name||"X-ASSET-LIST"==E.name)H=Wx(e(),E.value,d)[0];D.push({key:E.name,description:"",data:H,mimeType:null,pictureType:null})}}if(1C)if(E){E=Wd(E,"t",ee);if(null==E)break;else if(H>=E)break;C=Math.ceil((E-H)/K)-1}else{if(Infinity==z)break;else if(H/v>=z)break;C=Math.ceil((z*v-H)/K)-1}for(E=0;E<=C;++E)D=H+K,B.push({start:H/v,end:D/v,ni:H}),H=D}v=B;y=t(y);for(z=y.next();!z.done;z=y.next())(z=Xz(a,w,z.value,v,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=sc||a.g.disableText||m.push(z):n.push(z):r.push(z))}q=[];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 aA(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 bA(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""} function cA(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={fg:void 0},g=e.next())h.fg=g.value,d.push(new Aj(h.fg.start,h.fg.end,function(k){return function(){return lc(a.l,[f.replace("{start time}",String(k.fg.ni))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",Uz); var Zz="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Yz=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");Ci("application/vnd.ms-sstr+xml",function(){return new Uz});function dA(a,b,c,d,e,f,g){if(200<=c&&299>=c&&202!=c||304==c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=Zb(b)}catch(h){}throw new V(401==c||403==c?2:1,1,1001,d,c,f,a,g,e||d);};function eA(){} function fA(a,b,c,d,e,f){var g=new gA;gh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new hA,k={Ci:!1,Uj:!1};a=iA(a,b,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 Jg(a,function(){k.Ci=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new zf(function(){k.Uj=!0;h.abort()});l.X(b/1E3);a.finally(function(){l.stop()})}return a} function iA(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,w,v,y,z,A,B,D,G,C;return Q(function(E){switch(E.g){case 1:return l=jA,m=kA,q=new ArrayBuffer(0),u=r=0,w={},v=Date.now(),ta(E,2),F(E,l(a,d),4);case 4:n=E.h;w=lA(n.headers);g(w);if("HEAD"==d.method){E.A(5);break}z=(y=n.headers.get("Content-Length"))?parseInt(y,10):0;if(!n.body)return F(E,n.arrayBuffer(),9);A=n.clone().body.getReader();B=function(H){function K(){var J,L,N,O;return Q(function(M){switch(M.g){case 1:return ta(M,2),F(M,A.read(),4);case 4:J= M.h;wa(M,3);break;case 2:return xa(M),M.return();case 3:if(J.done){M.A(5);break}r+=J.value.byteLength;if(!h){M.A(5);break}return F(M,h(J.value),5);case 5:L=Date.now();N=r-u;if(100=k||J.done)O=J.done?0:z-r,f(L-v,N,O),u=r,v=L;J.done?H.close():(H.enqueue(J.value),K());I(M)}})}K()};new m({start:B});return F(E,n.arrayBuffer(),8);case 8:q=E.h;E.A(5);break;case 9:q=E.h,D=Date.now(),f(D-v,q.byteLength,0);case 5:b.headers.Range&&(G=b.headers.Range.replace("bytes=","").split("-").filter(function(H){return H}).map(function(H){return parseInt(H, 10)}),2==G.length&&q.byteLength!=G[1]-G[0]+1&&ab("Payload length does not match range requested bytes",b,n));wa(E,3);break;case 2:C=xa(E);if(e.Ci)throw new V(1,1,7001,a,c);if(e.Uj)throw new V(1,1,1003,a,c);throw new V(1,1,1002,a,C,c);case 3:return E.return(dA(w,q,n.status,a,n.url,b,c))}})}function lA(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b} function mA(){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)}S("shaka.net.HttpFetchPlugin",eA);eA.isSupported=mA;eA.parse=fA;var jA=window.fetch,hA=window.AbortController,kA=window.ReadableStream,gA=window.Headers;mA()&&(Tg("http",fA,2,!0),Tg("https",fA,2,!0),Tg("blob",fA,2,!0));function nA(){} function oA(a,b,c,d,e,f){var g=new pA,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;var q={};g.onabort=function(){n(new V(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var u=g.getAllResponseHeaders().trim().split("\r\n"),w={};u=t(u);for(var v=u.next();!v.done;v=u.next())v=v.value.split(": "),w[v[0].toLowerCase()]=v.slice(1).join(": "); q=w;e(q)}};g.onload=function(u){var w=g.response;try{d(Date.now()-h,u.loaded-k,0);var v=dA(q,w,g.status,a,g.responseURL,b,c);m(v)}catch(y){n(y)}};g.onerror=function(u){n(new V(1,1,1002,a,u,c))};g.ontimeout=function(){n(new V(1,1,1003,a,c))};g.onprogress=function(u){var w=Date.now(),v=f.minBytesForProgressEvents||0,y=u.loaded-k;if(100=v||u.lengthComputable&&u.loaded==u.total)d(w-h,y,4==g.readyState?0:u.total-u.loaded),k=u.loaded,h=w};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(), b.headers[r]);g.send(b.body)});return new Jg(l,function(){g.abort();return Promise.resolve()})}S("shaka.net.HttpXHRPlugin",nA);nA.parse=oA;var pA=window.XMLHttpRequest;Tg("http",oA,1,!0);Tg("https",oA,1,!0);Tg("blob",oA,1,!0);function qA(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function rA(a){var b=a.cc(!1);return b?gc(b):a.S().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.startByte+":"+a.endByte}function sA(a,b){return Fm(a.g.S(),a.g.startByte,a.g.endByte,b.streaming.retryParameters)};function tA(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function uA(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}tA.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 vA(a){return 0==a.i?0:a.j/a.i};function wA(a){var b=this;this.u=a;this.i=new Map;this.h=new eh(function(){return xA(b).catch(function(){})});this.j=[];this.s=function(){};this.m=function(){};this.g=new tA;this.l=!1}wA.prototype.destroy=function(){return this.h.destroy()};function yA(a,b,c){a.s=b;a.m=c}function xA(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)} wA.prototype.queue=function(a,b,c,d,e){var f=this;fh(this.h);var g=(this.i.get(a)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return Q(function(u){if(1==u.g)return F(u,zA(f,b),2);h=u.h;if(f.h.g)throw new V(2,9,7001);if(d)for(m in k=Kb(h),l=new wh(k),l.data)n=Number(m),q=l.data[n],r=l.g[n],f.m(q,r);f.g.close(c,h.byteLength);f.s(vA(f.g),f.g.g);return u.return(e(h))})});this.i.set(a,g);return g}; function AA(a,b,c,d,e,f){fh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new V(2,9,7001);if(e){var h=Kb(c);h=new wh(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.s(vA(a.g),a.g.g);return f(c)});a.i.set(b,g)}function BA(a){return Q(function(b){return 1==b.g?F(b,Promise.all(a.i.values()),2):b.return(a.g.g)})} function zA(a,b){var c,d,e,f;return Q(function(g){if(1==g.g)return c=ch,d=a.u.request(c,b),e=function(){return d.abort()},a.j.push(e),F(g,d.promise,2);f=g.h;sd(a.j,e);return g.return(f.data)})};function CA(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Ig;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}CA.prototype.abort=function(){var a=this;return Q(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return F(b,a.g,4)}if(2!=b.g)return wa(b,0);xa(b);I(b)})}; function DA(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return Q(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return F(g,b(f.key,f.value,f),2)}f.continue();I(g)})}})}CA.prototype.store=function(){return this.h};CA.prototype.promise=function(){return this.g};function EA(a){this.h=a;this.g=[]}EA.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function FA(a,b){return GA(a,b,"readwrite")}function GA(a,b,c){c=a.h.transaction([b],c);var d=new CA(c,b);a.g.push(d);d.promise().then(function(){sd(a.g,d)},function(){sd(a.g,d)});return d};function HA(a,b,c){this.h=new EA(a);this.i=b;this.g=c}p=HA.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return IA(this.i)};p.removeSegments=function(a,b){return JA(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,KA(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Hi(e)}))})};p.addManifests=function(){return IA(this.g)}; p.updateManifest=function(){return Promise.reject(new V(2,9,9016,"Cannot modify values in "+this.g))};function LA(a,b,c){a=FA(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}p.updateManifestExpiration=function(a,b){var c=FA(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()};p.removeManifests=function(a,b){return JA(this,this.g,a,b)}; p.getManifests=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,KA(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Wd(e)})))})};p.getAllManifests=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=GA(a.h,a.g,"readonly"),c=new Map,F(d,DA(b,function(e,f){var g;return Q(function(h){if(1==h.g)return F(h,a.Wd(f),2);g=h.h;c.set(e,g);I(h)})}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};p.Hi=function(a){return a};p.Wd=function(a){return Promise.resolve(a)}; function IA(a){return Promise.reject(new V(2,9,9011,"Cannot add new value to "+a))}p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=FA(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={Mh:void 0},h=g.next())l=h.value,k.Mh=e.add(l),k.Mh.onsuccess=function(n){return function(){f.push(n.Mh.result)}}(k);return F(m,d.promise(),2)}return m.return(f)})}; function JA(a,b,c,d){a=FA(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={yh:void 0},e=c.next())f.yh=e.value,b.delete(f.yh).onsuccess=function(g){return function(){return d(g.yh)}}(f);return a.promise()} function KA(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=GA(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={Wf:void 0,zf:void 0},k=h.next())l.zf=k.value,l.Wf=e.get(l.zf),l.Wf.onsuccess=function(n){return function(){void 0==n.Wf.result&&g.push(n.zf);f[n.zf]=n.Wf.result}}(l);return F(m,d.promise(),2)}if(g.length)throw new V(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function MA(a){this.g=new EA(a)}MA.prototype.destroy=function(){return this.g.destroy()};MA.prototype.getAll=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=GA(a.g,"session-ids","readonly"),c=[],F(d,DA(b,function(e,f){c.push(f)}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};MA.prototype.add=function(a){var b=FA(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()}; MA.prototype.remove=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=FA(b.g,"session-ids"),F(d,DA(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):F(d,c.promise(),0)})};function NA(){this.g=new Map}NA.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)};NA.prototype.init=function(){var a=this;OA.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 PA(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ub:d,ib:f},ib:e})})});if(b)return b;throw new V(2,9,9013,"Could not find a cell that supports add-operations");}function QA(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ub:d,ib:f},e)})})} function RA(a,b,c){a=a.g.get(b);if(!a)throw new V(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new V(2,9,9013,"Could not find cell with name "+c);return b}function SA(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function TA(a){var b=Array.from(a.g.keys());if(!b.length)throw new V(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()} function UA(a){var b,c,d;return Q(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0b;if(!k||!l){m.A(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ya(m),F(m,e.destroy(),10);case 10:Ba(m,0);break;case 2:xa(m),m.A(3)}})}; p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};Ci("application/x-offline-manifest",function(){return new oB});function pB(){}function qB(a,b){var c=hB(a);c&&"manifest"==c.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=Mg(a)):a=c&&"segment"==c.g?rB(c.key(),c,b):Kg(new V(2,1,9004,a));return a} function rB(a,b,c){var d=new NA;return Mg(void 0).ab(function(){return d.init()}).ab(function(){return RA(d,b.Ub(),b.ib())}).ab(function(e){return e.getSegments([b.key()])}).ab(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}S("shaka.offline.OfflineScheme",pB);pB.plugin=qB;Tg("offline",qB);function sB(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,tB(w.info,q)){w.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=uB(a,b,g);return F(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})} function uB(a,b,c){var d,e;return Q(function(f){switch(f.g){case 1:return d=new yh({xc:b,onError:function(){},Lf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),F(f,Gh(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),F(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],F(f,Promise.all(c.sessionIds.map(function(g){return Q(function(h){if(1== h.g)return ta(h,2),F(h,Sh(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);xa(h);I(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function tB(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&td(a.audioCapabilities,b.audioCapabilities,c)&&td(a.videoCapabilities,b.videoCapabilities,c)};function vB(a,b,c){var d=b.presentationTimeline.getDuration();b=wB(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function xB(a,b){var c=jB(new iB(a.Ub(),a.ib()),b),d=b.appMetadata||{};c=wB(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 wB(a){var b=[],c=ig(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push($f(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ag(c.value));return b};function yB(){this.g=new Map}function zB(a,b){var c=b.audio,d=b.video;c&&!d&&a.g.set(c.id,c.bandwidth||b.bandwidth);!c&&d&&a.g.set(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.set(c.id,e);a.g.set(d.id,f)}}function AB(a,b){a.g.set(b.id,b.bandwidth||2048)}function BB(a,b){a=a.g.get(b);null==a&&(a=0);return a};function CB(a){var b=this;if(a&&a.constructor!=X)throw new V(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Ib()):(this.h=Qn(),this.g=new Sg,this.g.configure(this.h.networking));this.i=[];this.l=[];var c=!a;this.j=new eh(function(){var d,e,f,g,h;return Q(function(k){switch(k.g){case 1:return F(k,Promise.all(b.l.map(function(l){return xA(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 F(k,Promise.all(e),3);case 3:if(!c){k.A(4); break}return F(k,b.g.destroy(),4);case 4:b.h=null,b.g=null,I(k)}})});this.m=1E9}function DB(){if(Fi(Rb()))a:{var a=t(OA.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}p=CB.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=wn(a,b));return Vn(this.h,a)};p.getConfiguration=function(){var a=Qn();Vn(a,this.h,Qn());return a};p.Ib=function(){return this.g}; p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new wA(this.g);this.l.push(h);b=EB(this,a,b||{},d||[],e||[],function(){var k;return Q(function(l){if(1==l.g)return c?l.A(2):F(l,Bo(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=Hi(a,c||null);return l.return(k())})},g,h);b=new Jg(b,function(){return xA(h)});b.finally(function(){sd(f.l,h)});return FB(this,b)}; function EB(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,u,w,v,y,z,A,B,D,G,C,E,H,K,J,L,N,O,M;return Q(function(P){switch(P.g){case 1:return GB(),l=k=null,m=new NA,r=q=n=null,ta(P,2,3),F(P,f(),5);case 5:return k=P.h,F(P,HB(a,b,k,g),6);case 6:u=P.h;IB(a);w=!u.presentationTimeline.T()&&!u.presentationTimeline.fd();if(!w)throw new V(2,9,9005,b);v=t(d);y=v.next();case 7:if(y.done){P.A(9);break}z=y.value;return F(P,JB(a,z,u),10);case 10:A=P.h;u.imageStreams.push(A);IB(a);y=v.next();P.A(7);break;case 9:B=t(e),D=B.next(); case 11:if(D.done)return Ih(g.drm.clearKeys,u.variants),E=u.variants.some(function(R){if(R.audio)for(var T=t(R.audio.drmInfos),ca=T.next();!ca.done;ca=T.next())if(ca.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=t(R.video.drmInfos),T=R.next();!T.done;T=R.next())if(T.value.licenseServerUri.startsWith("data:"))return!0;return!1}),H=g.offline.usePersistentLicense,E&&(H=!1),F(P,a.vd(u,function(R){r=r||R},g,H),15);G=D.value;return F(P,KB(a,u,G.uri,G.language,G.kind,G.mime,G.codecs), 14);case 14:C=P.h;u.textStreams.push(C);IB(a);D=B.next();P.A(11);break;case 15:l=P.h;IB(a);if(r)throw r;return F(P,LB(u,l,g,H),16);case 16:return F(P,m.init(),17);case 17:return IB(a),F(P,PA(m),18);case 18:return n=P.h,IB(a),K=MB(l,u,b,c,g,h,H),J=K.El,L=K.ki,F(P,n.ib.addManifests([J]),19);case 19:N=P.h;IB(a);q=N[0];IB(a);if(r)throw r;return F(P,NB(a,L,q,J,h,g,n.ib,u,l,H),20);case 20:return IB(a),OB(u,J,l,H),F(P,n.ib.updateManifest(q,J),21);case 21:return IB(a),O=new gB("manifest",n.path.Ub,n.path.ib, q),P.return(xB(O,J));case 3:return ya(P),F(P,m.destroy(),22);case 22:if(!k){P.A(23);break}return F(P,k.stop(),23);case 23:if(!l){P.A(25);break}return F(P,l.destroy(),25);case 25:Ba(P,0);break;case 2:M=xa(P);if(null==q){P.A(27);break}return F(P,PB(q),27);case 27:throw r||M;}})} function NB(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,u,w,v,y,z,A,B;return Q(function(D){switch(D.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new V(2,9,7001);};r=function(G,C){var E,H,K,J,L,N,O,M,P;return Q(function(R){if(1==R.g){E=t(G);H=E.next();for(K={};!H.done;K={pc:void 0},H=E.next())K.pc=H.value,q(),J=sA(K.pc,f),L=K.pc.i,N=K.pc.h,O=function(T){return function(ca){var Y,Ma,Na,Ea;return Q(function(va){switch(va.g){case 1:Y=T.pc.g;Ma=Y.cc(!1);if(!Y.aesKey||Ma){va.A(2);break}return F(va,Em(ca,Y.aesKey, T.pc.j),3);case 3:ca=va.h;case 2:return Na=rA(Y),F(va,g.addSegments([{data:ca}]),4);case 4:Ea=va.h,q(),m[Na]=Ea[0],n+=ca.byteLength,I(va)}})}}(K),M=K.pc.g,(P=M.cc(!1))?AA(e,K.pc.groupId,P,L,N,O):e.queue(K.pc.groupId,J,L,N,O);return F(R,BA(e),2)}q();if(!C||e.l)return R.A(0);OB(h,d,k,l);return F(R,g.updateManifest(c,d),0)})};u=!1;ta(D,2);if(!QB(h)||!u||RB(h)){D.A(4);break}return F(D,r(b.filter(function(G){return G.h}),!0),5);case 5:return q(),b=b.filter(function(G){return!G.h}),w=m,v=n,m={},n=0,F(D, SB(g,c,d,w,v,function(){return IB(a)}),6);case 6:q();case 4:if(u){D.A(7);break}return F(D,r(b,!1),8);case 8:return q(),y=m,z=n,m={},n=0,F(D,SB(g,c,d,y,z,function(){return q()}),9);case 9:q();case 7:wa(D,0);break;case 2:return A=xa(D),B=Object.values(m),F(D,g.removeSegments(B,function(){}),10);case 10:throw A;}})} function PB(a){var b,c,d,e;return Q(function(f){switch(f.g){case 1:return b=new NA,F(f,b.init(),2);case 2:return F(f,PA(b),3);case 3:return c=f.h,d=new gB("manifest",c.path.Ub,c.path.ib,a),F(f,b.destroy(),4);case 4:return e=new CB,F(f,e.remove(d.toString()),0)}})} function SB(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,w,v;return Q(function(y){switch(y.g){case 1:g=!1;ta(y,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())r=q.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 F(y,a.updateManifest(b,c),4);case 4:g=!0;f();wa(y,0);break;case 2:return w=xa(y),F(y,PB(b),5);case 5:if(g){y.A(6);break}v=Object.values(d);return F(y,a.removeSegments(v,function(){}),6);case 6:throw w;}})} function LB(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,B,D,G,C,E,H,K,J,L,N,O,M,P,R;return Q(function(T){switch(T.g){case 1:return e={width:Infinity,height:Infinity},Hf(a,c.restrictions,e),F(T,Kf(b,a,d,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:f=[];g=c.preferredDecodingAttributes;h=c.preferredVideoCodecs;k=c.preferredAudioCodecs;l=c.preferredTextFormats;Ff(a,h,k,g,l);m=t(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push($f(q));r=t(a.textStreams);for(u=r.next();!u.done;u= r.next())w=u.value,f.push(ag(w));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())z=y.value,f.push(bg(z));return F(T,c.offline.trackSelectionCallback(f),3);case 3:A=T.h;B=a.presentationTimeline.getDuration();D=0;G=t(A);for(C=G.next();!C.done;C=G.next())E=C.value,H=E.bandwidth*B/8,D+=H;ta(T,4);return F(T,c.offline.downloadSizeCallback(D),6);case 6:K=T.h;if(!K)throw new V(2,9,9014);wa(T,5);break;case 4:J=xa(T);if(J instanceof V)throw J;throw new V(2,9,9015);case 5:L=new Set;N=new Set;O=new Set; M=t(A);for(P=M.next();!P.done;P=M.next())R=P.value,"variant"==R.type&&L.add(R.id),"text"==R.type&&N.add(R.id),"image"==R.type&&O.add(R.id);a.variants=a.variants.filter(function(ca){return L.has(ca.id)});a.textStreams=a.textStreams.filter(function(ca){return N.has(ca.id)});a.imageStreams=a.imageStreams.filter(function(ca){return O.has(ca.id)});TB(a);I(T)}})} function MB(a,b,c,d,e,f,g){var h=vB(c,b,d),k=e.offline.progressCallback;yA(f,function(u,w){h.size=w;k(h,u)},function(u,w){l&&g&&m==w&&Oh(a,"cenc",u)});var l=QB(b)&&!RB(b),m=null;l&&(m=UB.get(a.g.keySystem));for(var n=new yB,q=t(b.textStreams),r=q.next();!r.done;r=q.next())n.g.set(r.value.id,52);q=t(b.imageStreams);for(r=q.next();!r.done;r=q.next())AB(n,r.value);q=t(b.variants);for(r=q.next();!r.done;r=q.next())zB(n,r.value);f=VB(f,n,b,e);e=f.streams;f=f.ki;(n=a.g)&&g&&(n.initData=[]);return{El:{creationTime:Date.now(), originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.be(),streams:e,sessionIds:g?Xh(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},ki:f}}function QB(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})} function RB(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 OB(a,b,c,d){b.expiration=c.be();c=Xh(c);b.sessionIds=d?c:[];if(QB(a)&&d&&!c.length)throw new V(2,9,9007);}p.remove=function(a){return WB(this,XB(this,a))}; function XB(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:GB();c=hB(b);if(null==c||"manifest"!=c.g)throw new V(2,9,9004,b);d=c;e=new NA;ua(k,2);return F(k,e.init(),4);case 4:return F(k,RA(e,d.Ub(),d.ib()),5);case 5:return f=k.h,F(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],F(k,Promise.all([YB(a,h,e),ZB(f,d,h)]),2);case 2:return ya(k),F(k,e.destroy(),8);case 8:Ba(k,0)}})} function $B(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:bf(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:bf(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function YB(a,b,c){return Q(function(d){return F(d,aC(a.g,a.h.drm,c,b),0)})} function ZB(a,b,c){function d(){}var e=bC(c);xB(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Xl=function(){return WB(this,cC(this))}; function cC(a){var b,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return GB(),b=a.g,c=a.h.drm,d=new NA,e=!1,ua(n,2),F(n,d.init(),4);case 4:f=[],SA(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,sB(c,b,l),9);case 9:return m=n.h,F(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return ya(n),F(n,d.destroy(),11);case 11:Ba(n,3);break;case 3:return n.return(!e)}})} p.list=function(){return WB(this,dC())};function dC(){var a,b,c;return Q(function(d){switch(d.g){case 1:return GB(),a=[],b=new NA,ua(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),QA(b,function(e,f){c=c.then(function(){var g;return Q(function(h){if(1==h.g)return F(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=xB(new gB("manifest",e.Ub,e.ib,l),k);a.push(k)});I(h)})})}),F(d,c,2);case 2:return ya(d),F(d,b.destroy(),6);case 6:Ba(d,3);break;case 3:return d.return(a)}})} function HB(a,b,c,d){var e,f,g,h,k;return Q(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},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){}, addFont:function(){}},c.configure(d.manifest),IB(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,IB(a),k=eC(h),F(l,Promise.all(kb(k,function(m){return m.createSegmentIndex()})),3);IB(a);if(e)throw e;return l.return(h)})} function JB(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,w,v,y;return Q(function(z){switch(z.g){case 1:return F(z,fC(a,b),2);case 2:d=z.h;if("text/vtt"!=d)throw new V(1,2,2017,b);return F(z,gC(b,a.g,a.h.streaming.retryParameters),3);case 3:e=z.h;f=qf(d);if(!f)throw new V(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Kb(e);l=g.parseMedia(k,h,b,[]);m=[];n=t(l);q=n.next();for(r={};!q.done;r={mg:void 0,xd:void 0},q=n.next())r.xd=q.value,r.mg=null, u=function(A){return function(){null==A.mg&&(A.mg=lc([b],[A.xd.payload]));return A.mg||[]}}(r),w=new Aj(r.xd.startTime,r.xd.endTime,u,0,null,null,0,0,Infinity),r.xd.payload.includes("#xywh")&&(v=r.xd.payload.split("#xywh=")[1].split(","),4===v.length&&w.dg({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),m.push(w);y=d;if(!m.length){z.A(4);break}return F(z,Bo(m[0].S()[0],a.g,a.h.manifest.retryParameters),5);case 5:y=z.h;case 4:return z.return({id:a.m++, originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Vl(m),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([bf(y|| "","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})} function KB(a,b,c,d,e,f,g){var h,k,l;return Q(function(m){if(1==m.g)return f?m.A(2):F(m,fC(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Xl(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:sc,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null, audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([bf(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=bf(h.mimeType,h.codecs);l=sf(k);if(!l)throw new V(2,2,2014,f);return m.return(h)})} function fC(a,b){var c;return Q(function(d){switch(d.g){case 1:return ta(d,2),F(d,Bo(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:xa(d);case 3:if(c)return d.return(c);throw new V(1,2,2011,b);}})}function gC(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=ch,e=Xg([a],c),e.method="GET",F(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})} p.vd=function(a,b,c,d){var e=this,f;return Q(function(g){return 1==g.g?(f=new yh({xc:e.g,onError:b,Lf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),F(g,Dh(f,a.variants,d),2)):3!=g.g?F(g,Qh(f),3):g.return(f)})}; function VB(a,b,c,d){var e=new Map,f=eC(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=hC(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()),ki:Array.from(e.values())}} function hC(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,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;iC(d,c.presentationTimeline.Kb(),function(l,m){var n=rA(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=BB(b,d.id)*r;r=uA(a.g,r);f.set(n,new qA(l,r,k,!1,m))}l.ea&&(q=rA(l.ea),f.has(q)||(r=.5* BB(b,d.id),r=uA(a.g,r),f.set(q,new qA(l.ea,r,k,!0,m))));g.segments.push({pendingInitSegmentRefId:q,initSegmentKey:q?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});0!==h&&(k=(k+1)%h)});return g} function iC(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function IB(a){if(a.j.g)throw new V(2,9,7001);}function GB(){if(!DB())throw new V(2,9,9E3);}function WB(a,b){return Q(function(c){if(1==c.g)return a.i.push(b),ua(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);ya(c);sd(a.i,b);return Ba(c,0)})}function FB(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){sd(a.i,c)})} function bC(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 aC(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=TA(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:$B(d,!1),videoCapabilities:$B(d,!0)}});return F(h,sB(b,a,f),2)}return 3!=h.g?(g=h.h,F(h,e.remove(g),3)):F(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})} function eC(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 TB(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());}S("shaka.offline.Storage",CB);CB.deleteAll=function(){var a;return Q(function(b){return 1==b.g?(a=new NA,ua(b,2),F(b,UA(a),2)):5!=b.g?(ya(b),F(b,a.destroy(),5)):Ba(b,0)})}; CB.prototype.list=CB.prototype.list;CB.prototype.removeEmeSessions=CB.prototype.Xl;CB.prototype.remove=CB.prototype.remove;CB.prototype.store=CB.prototype.store;CB.prototype.getNetworkingEngine=CB.prototype.Ib;CB.prototype.getConfiguration=CB.prototype.getConfiguration;CB.prototype.configure=CB.prototype.configure;CB.prototype.destroy=CB.prototype.destroy;CB.support=DB; var UB=(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").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c"); nq("offline",DB);function jC(){}function kC(){for(var a=t(lC),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){ab("Error installing polyfill!",c)}}}function mC(a,b){a={priority:b||0,callback:a};for(b=0;b=b?(FC(),GC()):15>=b&&FC());a=t(a.pj());for(b=a.next();!b.done;b=a.next())HC(b.value);(window.MediaSource||window.ManagedMediaSource)&&IC();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&JC()} function FC(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ka.apply(0,arguments));b.abort=function(){};return b}}function GC(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}} function IC(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ff(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ff(c)&&b(c)}}} function HC(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return jf(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return jf(d)!=a&&c(d)}}} function JC(){var a=MediaSource.isTypeSupported;Rb().Rj()&&(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)})}jC.MediaSource=DC;DC.install=EC;mC(EC);function KC(){}function LC(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?MC():void 0!=window.orientation&&NC())}function MC(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})} function NC(){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 OC;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}jC.Orientation=KC;KC.install=LC;function OC(){jb.call(this);this.type="";this.angle=0}pa(OC,jb); OC.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)}; OC.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};mC(LC);function PC(){}var QC,RC,SC,TC,UC,VC; function WC(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=XC){if(void 0===a?0:a)QC=!0,RC=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),SC=HTMLMediaElement.prototype.setMediaKeys,TC=window.MediaKeys,UC=window.MediaKeySystemAccess,VC=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=YC;window.MediaKeys=ZC;window.MediaKeySystemAccess= $C;navigator.requestMediaKeySystemAccess=aD;window.shakaMediaKeysPolyfill=XC;Sf.clear();Ag.clear()}}function aD(a,b){try{var c=new $C(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function YC(a){var b=this.mediaKeys;b&&b!=a&&bD(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?bD(a,this):Promise.resolve()} function cD(a){a=Kb(a.initData);if(Ob(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Xb(a.subarray(4),!0);a=$b(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Lb(a);this.dispatchEvent(b)}jC.PatchedMediaKeysApple=PC; PC.uninstall=function(){window.shakaMediaKeysPolyfill==XC&&QC&&(QC=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",RC),HTMLMediaElement.prototype.setMediaKeys=SC,window.MediaKeys=TC,window.MediaKeySystemAccess=UC,navigator.requestMediaKeySystemAccess=VC,RC=VC=SC=UC=TC=null,window.shakaMediaKeysPolyfill="",Sf.clear(),Ag.clear())};PC.install=WC; function $C(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;} $C.prototype.createMediaKeys=function(){var a=new ZC(this.keySystem);return Promise.resolve(a)};$C.prototype.getConfiguration=function(){return this.g};function ZC(a){this.h=new WebKitMediaKeys(a);this.g=new Oc}ZC.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new dD(this.h,a)};ZC.prototype.setServerCertificate=function(){return Promise.resolve(!1)}; function bD(a,b){a.g.Sa();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",cD);try{return El(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}ZC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function dD(a){jb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Oc;this.sessionId="";this.expiration=NaN;this.closed=new Ig;this.keyStatuses=new eD}pa(dD,jb);p=dD.prototype; p.generateRequest=function(a,b){var c=this;this.h=new Ig;try{var d=this.l.createSession("video/mp4",Kb(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.Jc()?"license-request":"license-renewal").set("message",Lb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(fD(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:fD(c,"output-not-allowed");break;default:fD(c,"internal-error")}});fD(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))}; p.update=function(a){this.g=new Ig;try{this.i.update(Kb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function fD(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)} function eD(){this.size=0;this.g=void 0}p=eD.prototype;p.Jc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,zg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=zg.value();return this.g&&Jb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var XC="apple";mC(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||WC())});function gD(){}function hD(){if(window.MediaKeys){var a=Rb();MediaKeys.prototype.setServerCertificate&&a.Ce()||(MediaKeys.prototype.setServerCertificate=iD)}}function iD(){return Promise.resolve(!1)}jC.PatchedMediaKeysCert=gD;gD.install=hD;mC(hD);function jD(){} function kD(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)lD="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=mD;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=nD;window.MediaKeys=oD;window.MediaKeySystemAccess=pD;window.shakaMediaKeysPolyfill=qD}} function rD(a){var b=lD;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function mD(a,b){try{var c=new pD(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function nD(a){var b=this.mediaKeys;b&&b!=a&&sD(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&sD(a,this);return Promise.resolve()}jC.PatchedMediaKeysWebkit=jD;jD.install=kD; function pD(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;}pD.prototype.createMediaKeys=function(){var a=new oD(this.g);return Promise.resolve(a)};pD.prototype.getConfiguration=function(){return this.h};function oD(a){this.l=a;this.h=null;this.g=new Oc;this.i=[];this.j=new Map} function sD(a,b){a.h=b;a.g.Sa();var c=lD;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Lb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=tD(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Jc()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){(d=tD(a,d.sessionId))&&d.ready()}), a.g.o(b,c+"keyerror",function(d){var e=tD(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?uD(e,"output-restricted"):1==f?uD(e,"expired"):uD(e,"internal-error"))}}))} oD.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 vD(b,this.l,a);this.i.push(a);return a};oD.prototype.setServerCertificate=function(){return Promise.resolve(!1)};oD.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")}; function tD(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 vD(a,b,c){jb.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 Ig;this.keyStatuses=new wD}pa(vD,jb);p=vD.prototype;p.ready=function(){uD(this,"usable");this.g&&this.g.resolve();this.g=null}; function xD(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=Kb($b("LOAD_SESSION|"+c));else{var e=$b("PERSISTENT|");d=kc(e,b)}else d=Kb(b)}catch(g){return Promise.reject(g)}a.h=new Ig;var f=rD("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new zf(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h} function yD(a,b,c){if(a.g)a.g.then(function(){return yD(a,b,c)}).catch(function(){return yD(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Wb(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=hc(e.keys[0].k);e=hc(e.keys[0].kid)}else d=Kb(c),e=null;var f=rD("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}} function uD(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}p.generateRequest=function(a,b){return xD(this,b,null)};p.load=function(a){return"persistent-license"==this.l?xD(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Ig;yD(this,b,a);return b}; p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=rD("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function wD(){this.size=0;this.g=void 0}p=wD.prototype;p.Jc=function(){return this.g}; p.forEach=function(a){this.g&&a(this.g,zg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=zg.value();return this.g&&Jb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var lD="",qD="webkit";mC(kD);function zD(){}function AD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=BD,Object.defineProperty(a,"disablePictureInPicture",{get:CD,set:DD,enumerable:!0,configurable:!0}),document.exitPictureInPicture=ED,document.addEventListener("webkitpresentationmodechanged",FD,!0))}} function FD(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 BD(){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 ED(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))} function CD(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function DD(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}jC.PiPWebkit=zD;zD.install=AD;mC(AD);function GD(){}function HD(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=ID))}function ID(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}jC.RandomUUID=GD;GD.install=HD;mC(HD);function JD(){}function KD(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:LD})}function LD(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}jC.Symbol=JD;JD.install=KD;mC(KD);function MD(){}function ND(){for(var a=t([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),b=a.next();!b.done;b=a.next())b=b.value,b.prototype.indexOf||(b.prototype.indexOf=OD),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=PD),b.prototype.includes||(b.prototype.includes=QD)}function OD(a,b){return Array.prototype.indexOf.call(this,a,b)}function PD(a,b){return Array.prototype.lastIndexOf.call(this,a,b)} function QD(a,b){return-1!==this.indexOf(a,b)}jC.TypedArray=MD;MD.install=ND;mC(ND);function RD(){}function SD(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}jC.VideoPlayPromise=RD;RD.install=SD;mC(SD);function TD(){}function UD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||"number"===typeof Gi().webkitDroppedFrameCount)&&(a.getVideoPlaybackQuality=VD)}}function VD(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}jC.VideoPlaybackQuality=TD;TD.install=UD;mC(UD);function WD(){}function XD(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=YD;else if(6==b)a=ZD;else{try{var c=!!YD(1,2,"")}catch(d){c=!1}c&&(a=YD)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function YD(a,b,c){return new window.TextTrackCue(a,b,c)}function ZD(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}jC.VTTCue=WD;WD.install=XD;mC(XD);function $D(a){jb.call(this);this.h=a;this.l=null;this.g=[];this.i=-1;this.j=null;this.m=new Oc}pa($D,jb);p=$D.prototype;p.destroy=function(){var a=this;return Q(function(b){if(1==b.g)return F(b,a.removeAllItems(),2);a.h=null;a.m&&(a.m.release(),a.m=null);jb.prototype.release.call(a);I(b)})};p.configure=function(a){this.l=a};p.getConfiguration=function(){return this.l};p.getCurrentItem=function(){return this.g.length&&0<=this.i&&this.i=b.g.length)throw new V(2,7,7007);c=b.g[a];b.i!=a&&(b.i=a,b.dispatchEvent(new U("currentitemchanged")));d=b.h.h;e=b.l?b.l.preloadNextUrlWindow:0;0=b.g.length||f||b.h.T()||!d.duration)return D.return();y=b.h.xa().end-d.currentTime;if(isNaN(y)){D.A(0);break}if(!(y<=e)){D.A(0);break}z= b.l&&b.l.repeatMode;A=null;b.i+1 can only be inside
in TTML");q=t(Pd(e,"div"));for(r=q.next();!r.done;r=q.next())if(Pd(r.value,"span").length)throw new V(2,2,2001," can only be inside

in TTML");if(b=jE(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"), a.push(b);return a}; function jE(a,b,c,d,e,f,g,h,k,l,m,n,q){var r=l;if(Nd(a)){if(!m)return null;var u={tagName:"span",children:[Qd(a)],attributes:{},parent:null}}else u=a;for(var w=null,v=t(kE),y=v.next();!y.done&&!(w=lE(u,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;y=Yd(u,kE,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&z.test(y)){v=parseInt(y.split(":").pop(),10)-1;if(v>=q.length)return null;v=q[v]}else n&&y&&!y.startsWith("#")&&(z=new qb(n),y=new qb(y),(y=z.resolve(y).toString())&& (v=y));if("p"==a.tagName||w||v)m=!0;a=m;y="default"==(u.attributes["xml:space"]||(h?"default":"preserve"));z=u.children.every(Nd);h=[];if(!z)for(var A=t(u.children),B=A.next();!B.done;B=A.next())(B=jE(B.value,b,c,d,e,f,g,y,k,u,m,n,q))&&h.push(B);d=null!=l;n=Qd(u);n=u.children.length&&n&&/\S/.test(n);A=u.attributes.begin||u.attributes.end||u.attributes.dur;if(!(A||n||"br"==u.tagName||0!=h.length||d&&!y))return null;q=mE(u,c);n=q.start;for(q=q.end;r&&r.tagName&&"tt"!=r.tagName;)q=nE(r,c,n,q),n=q.start, q=q.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;q=null==q?Infinity:q+b.periodStart;n=Math.max(n,b.segmentStart);q=Math.min(q,b.segmentEnd);if(!A&&0c.length)return f;var g=a;for(a=null;!a&&!(a=e?Xd(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 nE(a,b,c,d){a=mE(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 mE(a,b){var c=BE(a.attributes.begin,b),d=BE(a.attributes.end,b);a=BE(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}} function BE(a,b){var c=null;if(CE.test(a)){a=CE.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(DE.test(a))c=EE(DE,a);else if(FE.test(a))c=EE(FE,a);else if(GE.test(a))a=GE.exec(a),c=Number(a[1])/b.frameRate;else if(HE.test(a))a=HE.exec(a),c=Number(a[1])/b.g;else if(IE.test(a))c=EE(IE,a);else if(a)throw new V(2,2,2001,"Could not parse cue time range in TTML");return c} function EE(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 hE(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Wc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",dE);dE.prototype.parseMedia=dE.prototype.parseMedia;dE.prototype.setManifestType=dE.prototype.setManifestType;dE.prototype.setSequenceMode=dE.prototype.setSequenceMode;dE.prototype.parseInit=dE.prototype.parseInit; function gE(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 pE=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,xE=/^(\d{1,4}(?:\.\d+)?|100)%$/,wE=/^(\d+px|\d+em|\d*\.?\d+c)$/,qE=/^(\d+)px (\d+)px$/,CE=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,DE=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,FE=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,GE=/^(\d*(?:\.\d*)?)f$/,HE=/^(\d*(?:\.\d*)?)t$/,IE=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),vE=(new Map).set("left",ve).set("center","center").set("right", "end").set("start",ve).set("end","end"),uE=(new Map).set("left","line-left").set("center","center").set("right","line-right"),eE=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],fE=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],kE=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];of("application/ttml+xml",function(){return new dE});function JE(){this.g=new dE}JE.prototype.parseInit=function(a){var b=!1;(new lh).box("moov",qh).box("trak",qh).box("mdia",qh).box("minf",qh).box("stbl",qh).V("stsd",sh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new V(2,2,2007);};JE.prototype.setSequenceMode=function(){};JE.prototype.setManifestType=function(){}; JE.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new lh).box("moof",qh).box("traf",qh).V("tfhd",function(y){e=Ii(y.reader,y.flags).Zd}).V("trun",function(y){y=Li(y.reader,y.version,y.flags);y=t(y.Qh);for(var z=y.next();!z.done;z=y.next())h.push(z.value.sampleSize||e||0)}).V("subs",function(y){for(var z=y.reader,A=z.W(),B=-1,D=0;D").replace(/{\/b}/g,"").replace(/{i}/g,"").replace(/{\/i}/g,"").replace(/{u}/g,"").replace(/{\/u}/g,"")+"\n\n";return b}S("shaka.text.SrtTextParser",RE);RE.srt2webvtt=SE;RE.prototype.parseMedia=RE.prototype.parseMedia; RE.prototype.setManifestType=RE.prototype.setManifestType;RE.prototype.setSequenceMode=RE.prototype.setSequenceMode;RE.prototype.parseInit=RE.prototype.parseInit;of("text/srt",function(){return new RE});function TE(){}TE.prototype.parseInit=function(){};TE.prototype.setSequenceMode=function(){};TE.prototype.setManifestType=function(){}; TE.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Wb(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=UE.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=VE.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(WE);else if("Style"==a){a=f.split(WE);f={};for(var g=0;g>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null} function XE(a){a=$E.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",TE);TE.prototype.parseMedia=TE.prototype.parseMedia;TE.prototype.setManifestType=TE.prototype.setManifestType;TE.prototype.setSequenceMode=TE.prototype.setSequenceMode;TE.prototype.parseInit=TE.prototype.parseInit;var UE=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,VE=/^\s*([^:]+):\s*(.*)/,WE=/\s*,\s*/,$E=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/; of("text/x-ssa",function(){return new TE});function aF(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 cF(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,Ma:a,wa:e}} function gF(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 hF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=hF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?bd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?Rb().we()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.j}; p.transmux=function(a,b,c,d){a=Kb(a);for(var e=Zj(a),f=e.length;fa.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new bk(a.subarray(b+2));dk(c,2);dk(c,3);var d=ek(c,11)+1<<1,e=ek(c,2);if(3==e){e=ek(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=ek(c,2);var g=ek(c,3),h=ek(c,1);c=ek(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,Ma:a,wa:d}};function jF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=jF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?bd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j}; p.transmux=function(a,b,c,d){a=Kb(a);for(var e=Zj(a),f=e.length;fe?lk(c,16):lk(c,64))}gk(c);d=hk(c);if(0===d)hk(c);else if(1===d)for(dk(c,1),gk(c),gk(c),d=hk(c),e=0;e=q?(d=r[q-1],e=u[q-1]):255===q&&(d=ek(c,16),e=ek(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1, k[3],k[4],k[5],255,225].concat(k,[1],b));return{height:c,width:f,Wa:a,bb:d,eb:e}} function mF(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=[],w=t(e.nalus),v=w.next();!v.done;v=w.next()){v=v.value;var y=v.fullData.byteLength,z=new Uint8Array(4);z[0]=y>>24&255;z[1]=y>>16&255;z[2]=y>>8&255;z[3]=y&255;u.push(z);u.push(v.fullData)}e.data=kc.apply(dc,x(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;gG;G++)ek(a,2);for(G=0;GK;K++)for(var J=0;J<(3===K?2:6);J++)if(jk(a)){var L=Math.min(64,1<<4+(K<<1));1=L?(H=N[L-1],K=O[L-1]):255===L&&(H=ek(a,16),K=ek(a,16)));jk(a)&&jk(a);jk(a)&&(ek(a,3),jk(a),jk(a)&&(kk(a),kk(a),kk(a)));jk(a)&&(hk(a),hk(a));jk(a);jk(a);jk(a);if(L=jk(a))hk(a),hk(a),hk(a),hk(a);if(jk(a)&&(ek(a,32),ek(a,32),jk(a)&&hk(a),jk(a))){O=!1;L=jk(a);N=jk(a);if(L||N){if(O=jk(a))kk(a),ek(a, 5),jk(a),ek(a,5);ek(a,4);ek(a,4);O&&ek(a,4);ek(a,5);ek(a,5);ek(a,5)}for(M=0;M<=f;M++){var R=!0;P=1;jk(a)||(R=jk(a));var T=!1;R?hk(a):T=jk(a);T||(P=hk(a)+1);if(L){for(R=0;R>8;e[14]=d.Gf&255;e[15]=252|d.Fh&3;e[16]=252|d.Gg&3;e[17]=248|d.Cg&7;e[18]=248|d.Bg&7;e[19]=0;e[20]=0;e[21]=(d.Ig&3)<<6|(d.Dh&7)<<3|(d.ii?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 sF(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*tF[14*(3===c?3-d:3===d?3:4)+e-1];f=uF[3*(3===c?0:2===c?1:2)+f];c=vF[c][d];var h=wF[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,wa:k,$l:8*c*h}}return null} function xF(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function yF(a,b){if(b+1d;d++)this.usertype[d]!==DF[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=BF.prototype;p.destroy=function(){}; p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return bd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return bd(b)||bd(a)};p.convertCodecs=function(a,b){return b.replace("mss/","")};p.getOriginalMimeType=function(){return this.h}; p.transmux=function(a,b,c){if(!c)return Promise.resolve(Kb(a));if(!b.mssPrivateData)return Promise.reject(new V(2,3,3020,c?c.S()[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 q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var 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;Na[1]=Ma>>16&255;Na[2]=Ma>>8&255;Na[3]=Ma&255;M.push(Na);M.push(ca.fullData)}}var Ea=M.length?{data:kc.apply(dc,x(M)),isKeyframe:O}:null;if(Ea){null==E&&null!=L.dts&&(E=L.dts);var va=void 0;va=J+ 1>>24&255,yd.sampleRate>>>17&255,yd.sampleRate>>>8&255,yd.sampleRate>>>0&255,0,0].concat(x(fc)));for(var xz=yd.sampleRate,yz=t(k.yb()),Tp=yz.next();!Tp.done;Tp=yz.next()){var Up=Tp.value,Eg=Up.data;null==kl&&null!==Up.pts&&(kl=Up.pts);for(var ii=0;iia&&(a="0"+a);a=e+":"+a;b&&(10>e&&(a="0"+a),a=d+":"+a,0d&&(a="0"+a),a=c+":"+a));return a};function mG(a,b){fG.call(this,a,b);var c=this;this.g=Lj();this.g.classList.add("shaka-ad-info");this.g.disabled=!0;this.parent.appendChild(this.g);this.h=new zf(function(){if(c.ad.isLinear()){var d="",e=c.ad.getSequenceLength();1Date.now()){c.l.stop();c.s=Date.now();var e=parseInt(c.h.textContent,10);e=c.m?e-d:e+d;c.h.textContent=e.toString()+"s";c.g.style.opacity="1";c.l.X(.5)}})}pa(vG,fG);S("shaka.ui.HiddenSeekButton",vG);function xG(a,b){vG.call(this,a,b);this.g.classList.add("shaka-fast-forward-container");this.i.textContent="fast_forward";this.m=!1}pa(xG,vG);S("shaka.ui.HiddenFastForwardButton",xG);function yG(a,b){vG.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.m=!0}pa(yG,vG);S("shaka.ui.HiddenRewindButton",yG);function zG(a,b,c,d){fG.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.i=!1;this.bar=document.createElement("input");this.F=new zf(function(){e.onChangeEnd();e.i=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.bar.disabled= !this.controls.Ba();this.container.appendChild(this.bar);this.parent.appendChild(this.container);this.K=new zf(function(){e.bar.disabled=!1});this.eventManager.o(this.controls,"showingui",function(){e.K.X(0)});this.eventManager.o(this.controls,"hidingui",function(){e.K.stop();e.bar.disabled=!0});this.eventManager.o(this.bar,"mousedown",function(f){e.bar.disabled||(e.i=!0,e.onChangeStart(),f.stopPropagation())});this.eventManager.o(this.bar,"touchstart",function(f){e.bar.disabled||(e.i=!0,AG(e,f), e.onChangeStart(),f.stopPropagation())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.i&&(AG(e,f),e.onChange(),f.stopPropagation())});this.eventManager.o(this.bar,"touchend",function(f){e.i&&(e.i=!1,AG(e,f),e.onChangeEnd(),f.stopPropagation())});this.eventManager.o(this.bar,"touchcancel",function(f){e.i&&(e.i=!1,AG(e,f),e.onChangeEnd(),f.stopPropagation())});this.eventManager.o(this.bar,"mouseup",function(f){e.i&&(e.i=!1,e.onChangeEnd(), f.stopPropagation())});this.eventManager.o(this.bar,"blur",function(){e.i&&(e.i=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}pa(zG,fG);p=zG.prototype;p.release=function(){this.F&&(this.F.stop(),this.F=null);fG.prototype.release.call(this)};p.setRange=function(a,b){this.bar.min=a;this.bar.max=b};p.onChangeStart=function(){};p.onChange=function(){};p.onChangeEnd=function(){}; p.changeTo=function(a){this.i||(this.i=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a=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,q){return n.start-q.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.D.style.background="linear-gradient("+d.join(",")+")"}else a.D.style.background="transparent",a.B.stop()}function HG(a){function b(){DG(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 FG(a){a.bar.ariaLabel=a.localization.resolve("SEEK")} function KG(a,b,c){var d=a.j.clientWidth;a.j.style.width="auto";a.j.style.height="20px";a.j.style.top="-30px";a.j.style.left=Math.min(a.bar.offsetWidth-d,Math.max(0,b-d/2))+"px";a.j.style.right="";a.j.style.visibility="visible";b=a.player.xa();a.player.T()?(c=b.end-c,1>c?(a.j.textContent=a.localization.resolve("LIVE"),a.j.style.left="",a.j.style.right="0px"):a.j.textContent="-"+lG(c,3600<=c)):(c-=b.start,a.j.textContent=lG(c,3600<=c))} function JG(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A;Q(function(B){switch(B.g){case 1:return 0>c&&(c=0),d=a.player.xa(),e=Math.max(Math.ceil(d.start),Math.min(Math.floor(d.end),c)),a.player.T()?(f=d.end-c,a.G.textContent=1>f?a.localization.resolve("LIVE"):"-"+lG(f,3600<=f)):a.G.textContent=lG(c,3600<=c),F(B,a.player.Si(null,e),2);case 2:g=B.h;if(!g||!g.uris||!g.uris.length)return EG(a),KG(a,b,c),B.return();g.width'; ta(B,5);q=ch;r=Fm(g.uris,g.startByte,g.endByte,a.player.getConfiguration().streaming.retryParameters);a.l=a.player.Ib().request(q,r,{type:1});return F(B,a.l.promise,7);case 7:u=B.h;a.l=null;"mjpg"==g.codecs?(w=(new lh).box("mdat",vh(function(D){n=URL.createObjectURL(new Blob([D],{type:"image/jpeg"}))})),w.parse(u.data,!1)):(v=g.mimeType||"image/jpeg",y=new Blob([u.data],{type:v}),n=URL.createObjectURL(y));wa(B,4);break;case 5:z=xa(B);if(7001==z.code)return B.return();throw z;case 4:try{a.h.removeChild(a.g)}catch(D){}a.g= W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=n;a.g.onload=function(){n.startsWith("blob:")&&URL.revokeObjectURL(n)};a.h.insertBefore(a.g,a.h.firstChild);case 3:A=k/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="-"+A*g.positionX+"px",a.g.style.top="-"+A*g.positionY+"px",a.g.style.transform= "scale("+A+")",a.g.style.transformOrigin="left top",l=Math.floor(k*g.height/g.width),a.h.style.height=l+"px",a.h.style.top=-(l-h)+"px",I(B)}})}function EG(a){a.h.style.visibility="hidden"}function IG(a){a.j.style.visibility="hidden"}S("shaka.ui.SeekBar",CG);function LG(){}LG.prototype.create=function(a,b){return new CG(a,b)};CG.Factory=LG;function MG(a,b){fG.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");kG(this.h,!1);this.j.appendChild(this.h);this.g=Lj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;kG(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);NG(this);this.i=new zf(function(){if(c.ad.isSkippable()){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 UG(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 VG(){var a=new Float32Array(4);a[3]=1;return a}function WG(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0=f;f++){var g=f*e/100,h=Math.sin(g);g=Math.cos(g);for(var k=0;100>=k;k++){var l=2*k*a/100;b.push(Math.sin(l)*h,g,Math.cos(l)*h);c.push(k/100,f/100)}}for(e=0;100>e;e++)for(a=0;100>a;a++)f=101*e+a,h=f+101,d.push(f,h,f+1),d.push(h,h+1,f+1);return{Wj:b,Tj:c,indices:d}};function YG(a,b,c,d,e){this.i=a;this.oa=b;this.s=c;this.g=d;this.u=new Oc;this.L=VG();this.h=VG();this.ba=this.na=this.$=this.l=null;this.D=QG();this.I=QG();this.N=QG();this.Y=QG();this.C=null;this.O=!1;this.J=this.B=null;this.ra=this.sa=0;this.Z=this.P=this.R=this.K=null;this.H=this.G=0;this.j=75;this.U=0;this.m=e;this.F=-1;ZG(this)} YG.prototype.release=function(){-1!=this.F&&(this.i.cancelVideoFrameCallback(this.F),this.F=-1);this.u&&(this.u.release(),this.u=null);this.B&&(this.B.stop(),this.B=null);this.J&&(this.J.stop(),this.J=null)};YG.prototype.Qd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.s.width,this.s.height);$G(this,!1)}; function ZG(a){aH(a);bH(a);cH(a);dH(a);eH(a);El(a.i,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){a.i.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA&&$G(a);if("requestVideoFrameCallback"in a.i){var b=function(){-1!=a.F&&($G(a),-1!=a.F&&(a.F=a.i.requestVideoFrameCallback(b)))};a.F=a.i.requestVideoFrameCallback(b)}else{var c;a.u.o(a.i,"canplaythrough",function(){$G(a)});a.u.o(a.i,"playing",function(){a.B&&a.B.stop();if(!c){var d=a.oa.qb();d=t(d);for(var e=d.next();!e.done;e=d.next())(e=e.value.frameRate)&& (!c||cMath.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 q=1/Math.sqrt(d*d+e*e+m*m);d*=q;e*=q;m*=q;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(q=Math.sqrt(n*n+l*l+h*h))?(q=1/q,n*=q,l*=q,h*=q):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var u=d*l-e*n;(q=Math.sqrt(k*k+r*r+u*u))?(q=1/q,k*=q,r*=q,u*=q):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}TG(a.L,a.D);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 bH(a){fH(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 cH(a){var b=gH(a,a.g.VERTEX_SHADER),c=gH(a,a.g.FRAGMENT_SHADER);a.l=a.g.createProgram();a.g.attachShader(a.l,b);a.g.attachShader(a.l,c);a.g.linkProgram(a.l);"cubemap"==a.m?(a.R=a.g.getAttribLocation(a.l,"aVertexPosition"),a.P=a.g.getAttribLocation(a.l,"aTextureCoord")):(a.R=a.g.getAttribLocation(a.l,"a_vPosition"),a.g.enableVertexAttribArray(a.R),a.P=a.g.getAttribLocation(a.l,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.P))} function gH(a,b){switch(b){case a.g.VERTEX_SHADER:var c="cubemap"==a.m?"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.m?"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 dH(a){a.K="cubemap"==a.m?{Wj:[-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],Tj:[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]}:"halfequirectangular"==a.m?XG(!0): XG();a.$=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.$);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Wj),a.g.STATIC_DRAW);a.na=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.na);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Tj),a.g.STATIC_DRAW);a.ba=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ba);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.K.indices),a.g.STATIC_DRAW)} function eH(a){a.Z=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.Z);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 $G(a,b){b=void 0===b?!0:b;var c=a.oa.m==Qq;if(!(!a.i||2>a.i.readyState||!c&&0==a.i.playbackRate)){RG(a.I,a.j*Math.PI/180,1.5625);"cubemap"==a.m?RG(a.I,a.j*Math.PI/180,2.5):RG(a.I,a.j*Math.PI/180,1.5625);a.g.useProgram(a.l);a.g.clear(a.g.COLOR_BUFFER_BIT);fH(a);b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.Z),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.i));if("equirectangular"==a.m||"halfequirectangular"== a.m)SG(a.N,a.D,a.Y),SG(a.N,a.I,a.N);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.$);a.g.vertexAttribPointer(a.R,3,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.R);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.na);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.ba);"cubemap"==a.m?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uProjectionMatrix"),!1,a.I),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uModelViewMatrix"),!1,a.N)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l, "u_VPMatrix"),!1,a.N);a.g.uniform1i(a.g.getUniformLocation(a.l,"uSampler"),0);a.O&&a.g.viewport(0,0,a.s.width/2,a.s.height);a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0);a.O&&(a.g.viewport(a.s.width/2,0,a.s.width/2,a.s.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0))}} function fH(a){var b=a.i.videoWidth;b||(b=a.s.scrollWidth);var c=a.i.videoHeight;c||(c=a.s.scrollHeight);if(a.sa!==b||a.ra!==c){a.s.width=b;a.s.height=c;a.sa=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 hH(a,b,c,d){var e=Infinity,f=90*Math.PI/180;"halfequirectangular"==a.m&&(e=90*Math.PI/180,f/=2);var g="cubemap"==a.m?a.N:a.D;a.G+=b;a.H+=c;if(a.G-e){e=Math.sin(b);b=Math.cos(b);var h=g[0],k=g[1],l=g[2],m=g[3],n=g[8],q=g[9],r=g[10],u=g[11];g!==g&&(g[4]=g[4],g[5]=g[5],g[6]=g[6],g[7]=g[7],g[12]=g[12],g[13]=g[13],g[14]=g[14],g[15]=g[15]);g[0]=h*b-n*e;g[1]=k*b-q*e;g[2]=l*b-r*e;g[3]=m*b-u*e;g[8]=h*e+n*b;g[9]=k*e+q*b;g[10]=l*e+r*b;g[11]=m*e+u*b}else a.G-=b;a.H-f?(f=QG(),e=QG(),b= -1*c,c=Math.sin(b),b=Math.cos(b),h=e[4],k=e[5],l=e[6],m=e[7],n=e[8],q=e[9],r=e[10],u=e[11],e!==f&&(f[0]=e[0],f[1]=e[1],f[2]=e[2],f[3]=e[3],f[12]=e[12],f[13]=e[13],f[14]=e[14],f[15]=e[15]),f[4]=h*b+n*c,f[5]=k*b+q*c,f[6]=l*b+r*c,f[7]=m*b+u*c,f[8]=n*b-h*c,f[9]=q*b-k*c,f[10]=r*b-l*c,f[11]=u*b-m*c,SG(g,f,g)):a.H-=c;c=QG();f=QG();e=Math.sin(d);d=Math.cos(d);b=f[0];h=f[1];k=f[2];l=f[3];m=f[4];n=f[5];q=f[6];r=f[7];f!==c&&(c[8]=f[8],c[9]=f[9],c[10]=f[10],c[11]=f[11],c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]= f[15]);c[0]=b*d+m*e;c[1]=h*d+n*e;c[2]=k*d+q*e;c[3]=l*d+r*e;c[4]=m*d-b*e;c[5]=n*d-h*e;c[6]=q*d-k*e;c[7]=r*d-l*e;SG(g,c,g);$G(a,!1)} function iH(a,b){if(void 0===b||b)TG(a.h,a.D),a.U=0,a.C=VG(),a.C[0]=(a.h[0]-a.L[0])/20,a.C[1]=(a.h[1]-a.L[1])/20,a.C[2]=(a.h[2]-a.L[2])/20,a.C[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.C[0];a.h[1]-=a.C[1];a.h[2]-=a.C[2];a.h[3]-=a.C[3];b=QG();WG(a.h,a.h);UG(b,a.h);a.D=b;a.J&&(a.J.stop(),a.J=null);20>a.U?a.J=(new zf(function(){iH(a,!1);a.G=0;a.H=0;a.U++;$G(a,!1)})).X(.025):(UG(b,a.L),a.D=b)};function jH(a,b,c,d,e){jb.call(this);var f=this;this.i=a;this.l=b;this.F=c;this.J=d;this.u=e;this.s=new Oc;this.h=new Oc;this.B=kH(this.l);this.g=null;this.m=!1;this.I=this.H=this.G=this.D=this.C=0;this.j=null;this.s.o(d,"loading",function(){f.g&&iH(f.g);lH(f)});this.s.o(d,"spatialvideoinfo",function(g){g=g.detail;switch(g.projection){case "rect":f.j=null;break;case "equi":f.j="equirectangular";break;case "hequ":switch(g.hfov){case 360:f.j="equirectangular";break;case 180:f.j="halfequirectangular"; break;default:null==g.hfov?f.j="halfequirectangular":f.j=null}break;case "fish":f.j="halfequirectangular";break;default:f.j=null}lH(f)});this.s.o(d,"nospatialvideoinfo",function(){f.j=null;lH(f)});this.s.o(d,"unloading",function(){f.j=null;lH(f)});lH(this)}pa(jH,jb);p=jH.prototype;p.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);jb.prototype.release.call(this)};p.configure=function(a){this.u=a;lH(this)}; p.Eg=function(){return this.l?!!this.B:!!kH(document.createElement("canvas"))};p.Tb=function(){return!!this.g};p.Qd=function(){this.g?this.g.Qd():ab("Not playing VR content")};p.qh=function(a){this.g?hH(this.g,a*mH,0,0):ab("Not playing VR content")};p.oh=function(a){this.g?hH(this.g,0,a*mH,0):ab("Not playing VR content")};p.ph=function(a){this.g?hH(this.g,0,0,a*mH):ab("Not playing VR content")}; function lH(a){if(a.u.displayInVrMode||a.j){a.l||(a.l=document.createElement("canvas"),a.l.classList.add("shaka-vr-canvas-container"),a.F.parentElement.insertBefore(a.l,a.F.nextElementSibling),a.B=kH(a.l));var b=a.j||a.u.defaultVrProjectionMode;a.g?a.g.m!=b&&(a.h.Sa(),a.g.release(),nH(a,b)):(a.l.style.display="",nH(a,b),a.dispatchEvent(new U("vrstatuschanged",(new Map).set("newStatus",a.Tb()))))}else!a.u.displayInVrMode&&!a.j&&a.l&&a.g&&(a.l.style.display="none",a.h.Sa(),a.g.release(),a.g=null,a.dispatchEvent(new U("vrstatuschanged", (new Map).set("newStatus",a.Tb()))))}function nH(a,b){a.B&&a.l&&(a.g=new YG(a.F,a.J,a.l,a.B,b),oH(a))}function kH(a){if(!a)return null;var b=Rb().Ja();if("TV"==b||"CONSOLE"==b||"CAST"==b)return null;b=t(["webgl2","webgl"]);for(var c=b.next();!c.done;c=b.next())if(c=a.getContext(c.value))return c;return null} function oH(a){a.h.o(a.i,"mousedown",function(d){if(!a.m){var e=d.clientX;d=d.clientY;a.m=!0;a.C=e;a.D=d}});0=e.j&&(e.j+=f);20>e.j?e.j=20:100\n \n \n \n \n \n \n \n ')} function IH(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.Ya=new xG(b,a);a.H.push(a.Ya)}function JH(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.cb=new yG(b,a);a.H.push(a.cb)} function KH(a){a.L=W("div");a.L.classList.add("shaka-bottom-controls");a.L.classList.add("shaka-no-propagation");a.h.appendChild(a.L);a.i.o(a.L,"click",function(e){e.target.closest(".shaka-overflow-button")||a.Mc()});SH(a);TH(a);a.F=W("div");a.F.classList.add("shaka-controls-button-panel");a.F.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.F.classList.add("shaka-tooltips-on");a.L.appendChild(a.F);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())if(c=c.value, CH.get(c)){var d=CH.get(c).create(a.F,a);a.H.push(d);"time_and_duration"==c&&(c=new mG(a.F,a),a.H.push(c))}else ab("Unrecognized control panel element requested:",c)}function TH(a){if(a.g.addSeekBar)a.u=UH.create(a.L,a),a.H.push(a.u);else{for(var b=t(a.I),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a=a.F;a.classList.contains("shaka-tooltips-on")&&a.classList.add("shaka-tooltips-low-position")}} function EH(a){a.G=W("div");a.G.classList.add("shaka-client-side-ad-container");kG(a.G,!1);a.i.o(a.G,"click",function(){wG(a)});a.l.appendChild(a.G)} function wH(a){a.i.o(a.s,"buffering",function(){VH(a)});VH(a);a.i.o(window,"keydown",function(b){WH(a,b)});a.i.o(window,"click",function(){return a.Mc()});a.i.o(a,"submenuopen",function(){a.Mc()});a.i.o(a.B,"play",function(){rH(a)});a.i.o(a.B,"pause",function(){rH(a)});a.i.o(a.l,"mousemove",function(b){RH(a,b)});a.i.o(a.l,"touchmove",function(b){RH(a,b)},{passive:!0});a.i.o(a.l,"touchend",function(b){RH(a,b)},{passive:!0});a.i.o(a.l,"mouseleave",function(){a.O||a.J.Ka()});a.i.o(a.l,"wheel",function(b){RH(a, b)},{passive:!0});a.i.o(a.D,"caststatuschanged",function(){yH(a)});a.i.o(a.C,"vrstatuschanged",function(){a.dispatchEvent(new U("vrstatuschanged"))});a.i.o(a.l,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&RH(a,b);if(a.g.enableKeyboardPlaybackControls&&a.s.$c()){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.u&& e&&!d&&0Math.abs(g-f)&&(g=Infinity);try{navigator.mediaSession.setPositionState({duration:Math.max(0,g),playbackRate:a.B.playbackRate,position:Math.max(0,f)})}catch(h){}}},d=function(){try{navigator.mediaSession.setPositionState()}catch(f){}}, e=function(f){var g=a.g.keyboardSeekDistance;switch(f.action){case "pause":tG(a);break;case "play":tG(a);break;case "seekbackward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||XH(a,a.u.getValue()-(f.seekOffset||g));break;case "seekforward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.j&&a.j.isLinear()||XH(a,a.u.getValue()+(f.seekOffset||g));break;case "seekto":if(f.seekTime&&!isFinite(f.seekTime))break;a.j&&a.j.isLinear()||XH(a,a.s.xa().start+f.seekTime);break;case "stop":a.s.lc(); break;case "enterpictureinpicture":a.j&&a.j.isLinear()||a.qd()}};b("pause",e);b("play",e);b("seekbackward",e);b("seekforward",e);b("seekto",e);b("stop",e);("documentPictureInPicture"in window||document.pictureInPictureEnabled)&&b("enterpictureinpicture",e);b=function(){a.s.T()||0!=a.s.xa().start?(c(),a.i.o(a.B,"timeupdate",c)):d()};a.s.Z&&b();a.i.o(a.s,"loaded",b);a.i.o(a.s,"unloading",function(){a.i.Da(a.B,"timeupdate",c)});a.i.o(a.s,"metadata",function(f){if(f=f.payload){var g;"TIT2"==f.key&&f.data&& (g=f.data);var h;"APIC"==f.key&&"--\x3e"==f.mimeType&&(h=f.data);g&&(f={title:g,artwork:[]},navigator.mediaSession.metadata&&(f=navigator.mediaSession.metadata,f.title=g),navigator.mediaSession.metadata=new MediaMetadata(f));h&&(g=a.m,h!=g.poster&&(g.poster=h),g={title:"",artwork:[{src:h}]},navigator.mediaSession.metadata&&(g=navigator.mediaSession.metadata,g.artwork=[{src:h}]),navigator.mediaSession.metadata=new MediaMetadata(g))}})}} function AH(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 YH(a){return Q(function(b){return a.B&&0!=a.B.readyState&&!a.D.Pa()&&a.g.enableFullscreenOnRotation&&a.ke()?screen.orientation.type.includes("landscape")&&!a.Nc()?F(b,NH(a),0):screen.orientation.type.includes("portrait")&&a.Nc()?F(b,OH(a),0):b.A(0):b.return()})} function RH(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),rH(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.O=Date.now():a.O+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 ab("Not playing VR content"),a=null;return a};p.hl=function(){var a=this.C;a.g?a=a.g.j:(ab("Not playing VR content"),a=null);return a}; p.lm=function(a){var b=this.C;b.g?(0>a?(ab("Field of view should be greater than 0"),a=0):100=b.alpha&&(h="display");break;case "display":0>=--k&&(h="fadeOut");break;case "fadeOut":g=Math.max(0,g-l),0>=g&&(h="transition",f=d(),k=Math.round(60*b.displayDuration),h="fadeIn")}0b&&(c=t([c,b]),b=c.next().value,c=c.next().value);b/c>16/9&&(c=Math.round(9*b/16));a=a.controls.g.qualityMarks;return 8640<=c?c+"p":4320<=c?a["4320"]:2160<=c?a["2160"]:1440<=c?a["1440"]:1080<=c?a["1080"]:720<=c?a["720"]:""} function ZJ(a){var b=gG(a.menu);Pj(a.menu);a.menu.appendChild(b);b=0;b=a.player.Cd()?dK(a):eK(a);var c=Lj();c.classList.add("shaka-enable-abr-button");a.eventManager.o(c,"click",function(){a.player.configure({abr:{enabled:!0}});ZJ(a)});a.l=W("span");a.l.textContent=a.localization.resolve("AUTO_QUALITY");c.appendChild(a.l);a.player.getConfiguration().abr.enabled&&(c.ariaSelected="true",c.appendChild(jG()),a.l.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY")); a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(c);iG(a.menu);a.controls.dispatchEvent(new U("resolutionselectionupdated"));YJ(a);kG(a.button,0f&&(e=t([e,f]),f=e.next().value,e=e.next().value);var g=e;f/e>16/9&&(g=Math.round(9*f/16));f=g+"p";e=new Set;g=t(c);for(var h=g.next();!h.done;h=g.next())h=h.value,h.frameRate&&e.add(Math.round(h.frameRate));1=e)&&(f+=Math.round(b.frameRate));if("PQ"==b.hdr||"HLG"==b.hdr)f+=" HDR";(b.videoLayout|| "").includes("CH-STEREO")&&(f+=" 3D");if(c.some(function(l){return d(b,l)})&&(c.some(function(l){return d(b,l)&&l.bandwidth==b.bandwidth})||(f+=" ("+Math.round(b.bandwidth/1E3)+" kbits/s)"),a.controls.g.showVideoCodec)){var k=function(l){var m="";l&&(l=gf(l),m=l.startsWith("dovi-")?"Dolby Vision":l.toUpperCase());return m?" "+m:m};c.some(function(l){return d(b,l)&&k(l.codecs)!=k(b.codecs)})&&(f+=k(b.codecs))}return f} function aK(a,b,c){var d=Math.round(b.bandwidth/1E3)+" kbits/s";if(a.controls.g.showAudioCodec){var e=function(f){var g="";f&&(g=gf(f).toUpperCase());return g?" "+g:g};c.some(function(f){return e(f.codecs)!=e(b.codecs)})&&(d+=e(b.codecs))}return d} function YJ(a){var b=a.player.Cd()?"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.l.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}S("shaka.ui.ResolutionSelection",XJ);function fK(){} fK.prototype.create=function(a,b){return new XJ(a,b)};gI("quality",new fK);BH("quality",new fK);function gK(a,b){fG.call(this,a,b);var c=this;this.g=Lj();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);hK(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){hK(c)});this.eventManager.o(this.localization,"locale-changed",function(){hK(c)}); this.eventManager.o(this.g,"click",function(){if(c.controls.Ba()&&c.video.duration){var d=c.h.indexOf(c.player.Xa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.Sc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",function(){c.g.setAttribute("shaka-status",c.player.Xa()+"x")})}pa(gK,fG);function hK(a){a.g.ariaLabel=a.localization.resolve("REWIND")}S("shaka.ui.RewindButton",gK);function iK(){} iK.prototype.create=function(a,b){return new gK(a,b)};BH("rewind",new iK);function jK(a,b){fG.call(this,a,b);var c=this;this.l=this.controls.D;this.g=Lj();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i); this.j=W("span");this.j.classList.add("shaka-current-selection-span");a.appendChild(this.j);this.g.appendChild(a);kK(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){kK(c)});this.eventManager.o(this.localization,"locale-changed",function(){kK(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.C,"vrstatuschanged",function(){lK(c)});this.eventManager.o(this.adManager,"ad-started",function(){lK(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){lK(c)});this.eventManager.o(this.player,"unloading",function(){lK(c)});this.eventManager.o(this.player,"loaded",function(){lK(c)});this.eventManager.o(this.video,"play", function(){lK(c)});this.eventManager.o(this.video,"pause",function(){lK(c)});this.eventManager.o(this.video,"seeking",function(){lK(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){lK(c)});lK(this)}pa(jK,fG);function lK(a){var b=!0;a.controls.Tb()&&(b=!1);b&&a.l.Pa()&&(b=!1);b&&(a.player.drmInfo()||a.player.Cd())&&(b=!1);b&&a.ad&&(b=!1);b&&a.video.remote&&"disconnected"!=a.video.remote.state&&(b=!1);kG(a.g,b)} function kK(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}S("shaka.ui.SaveVideoFrameButton",jK);function mK(){}mK.prototype.create=function(a,b){return new jK(a,b)};gI("save_video_frame",new mK);pG("save_video_frame",new mK);function nK(a,b){fG.call(this,a,b);var c=this;if(this.h=this.player.lh())this.g=Lj(),this.g.classList.add("shaka-skip-next-button"),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-tooltip"),this.g.textContent="skip_next",this.parent.appendChild(this.g),oK(this),pK(this),this.eventManager.o(this.localization,"locale-updated",function(){oK(c)}),this.eventManager.o(this.localization,"locale-changed",function(){oK(c)}),this.eventManager.o(this.g,"click",function(){c.controls.Ba()&& c.h.playItem(c.h.getCurrentItemIndex()+1)}),this.eventManager.o(this.h,"currentitemchanged",function(){pK(c)}),this.eventManager.o(this.h,"itemsinserted",function(){pK(c)}),this.eventManager.o(this.h,"itemsremoved",function(){pK(c)}),this.eventManager.o(this.player,"loading",function(){pK(c)})}pa(nK,fG);function oK(a){a.g.ariaLabel=a.localization.resolve("SKIP_NEXT")}function pK(a){var b=a.h.getItems().length;b=1