/* @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 ba(a){var b=0;return function(){return b>>0)+"_",e=0;return b}); ha("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 Sa(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e=f}});ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push([d,b[d]]);return c}}); var Ta="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;cb||1342177279>>=1)c+=c;return d}});ha("Number.EPSILON",function(){return Math.pow(2,-52)}); ha("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});ha("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push(b[d]);return c}});ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}}); ha("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ra(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}});ha("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}});var Ua=this||self; function T(a,b){a=a.split(".");var c=Ua;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 Va(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Va.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Wa(a){return a.h/(1-Math.pow(a.g,a.i))};function Xa(){this.h=new Va(2);this.j=new Va(5);this.g=0;this.i=128E3;this.l=16E3}Xa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Xa.prototype.sample=function(a,b){if(!(bb)throw Error("Bad port number "+b);a.sd=b}else a.sd=null} function Fb(a,b,c){b instanceof Hb?a.g=b:(c||(b=Ib(b,Nb)),a.g=new Hb(b))}function Gb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ib(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Ob),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ob(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Jb=/[#\/\?@]/g,Lb=/[#\?:]/g,Kb=/[#\?]/g,Nb=/[#\?@]/g,Mb=/#/g;function Hb(a){this.g=a||null} function Pb(a){if(!a.fb&&(a.fb=new Map,a.Id=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 bc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Yb(a);for(var e=0;e=c[d]}if(!a)return"";var c=Tb(a);if(239==c[0]&&187==c[1]&&191==c[2])return ac(c);if(254==c[0]&&255==c[1])return bc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return bc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return bc(a,!1);if(0==c[1]&&0==c[3])return bc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return ac(a);throw new U(2,2,2003);} function ec(a){if(window.TextEncoder&&!rb().kh()){var b=new TextEncoder;return Ub(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||""}T("shaka.util.StringUtils",$b);$b.resetFromCharCode=function(){hc.g=void 0}; $b.toUTF16=fc;$b.toUTF8=ec;$b.fromBytesAutoDetect=dc;$b.fromUTF16=bc;$b.fromUTF8=ac;var hc=new pb(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 pd(a){return"string"===typeof a}function qd(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 rd(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 sd(a){if("string"===typeof a)return ic(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:ic(a)} function td(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=sd(a))&&(a=a.trim());return a}function ud(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())ud(d.value,b,c)}return c}function vd(a,b){a=rd(a,b);return 1!=a.length?null:a[0]}function wd(a,b,c){a=xd(a,b,c);return 1!=a.length?null:a[0]} function yd(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 zd(a,b,c){b=md(b);return a.attributes[b+":"+c]||null}function xd(a,b,c){var d=md(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 Ad(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=zd(a,d.value,c))return d;return null} function Bd(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 Cd(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 Dd(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 Ed(a){a=Number(a);return 0===a%1?a:null}function Fd(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(!Wc(a.nestedCues,b.nestedCues,ce))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(!Wc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0} function ee(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&he(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=je(c);a.payload="";try{var m=kd(""+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())ke(c.value,a,b);else a.payload=ic(c);else a.payload=ic(c)}else a.payload=ic(c)}function he(a){for(var b=t(Object.entries(le)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Rd(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(me));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Rd(0,0,""),e.backgroundColor=d,a.set("."+c,e)} function je(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 ke(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Qc;d.position=null;d.size=0;d.textAlign=Ud;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=ne(g.backgroundColor,h.backgroundColor),h.color=ne(g.color,h.color),h.fontFamily=ne(g.fontFamily,h.fontFamily), h.fontSize=ne(g.fontSize,h.fontSize),h.textShadow=ne(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=be(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=oe;break;case "i":d.fontStyle=pe;break;case "u":d.textDecoration.push(qe);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break; if(f=dd(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(pd(a)||1==e.length&&pd(e[0]))for(c=sd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=be(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));G(d)})};function We(a,b,c){a.l=b;a.m=c}function Xe(a,b,c){a.C=b;if(b=a.o.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 Ye(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ye(a,d.value,c)} function Ze(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,[]);Ye(a,k,e);k.startTime>=a.l&&k.startTimey?(y=C,A=[E.Mf]):C==y&&A.push(E.Mf);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=Je(q.codecs),u=Je(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=Je(y.codecs),C=Je(z.codecs);if(A!=C)return(w[A]||1)-(w[C]||1)}return y.width-z.width}return y.bandwidth-z.bandwidth});b=Gc();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=Je(q.codecs),u=Je(e.codecs),r!==u))continue;r=Je(q.codecs);u=Je(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 sf(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 tf(a,b,c){a.variants=a.variants.filter(function(d){return uf(d,b,c)})} function uf(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 vf(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,wf(a,b,0=a&&e.width>=b){a=e.height;b=e.width;break}c=gg(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&& !c.length&&(c=gg(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.s-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.s<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))} function gg(a,b,c,d,e){if(a.C){var f=a.C.Vh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return uf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function hg(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})}T("shaka.abr.SimpleAbrManager",fg);fg.prototype.configure=fg.prototype.configure; fg.prototype.setCmsdManager=fg.prototype.setCmsdManager;fg.prototype.setMediaElement=fg.prototype.setMediaElement;fg.prototype.playbackRateChanged=fg.prototype.playbackRateChanged;fg.prototype.setVariants=fg.prototype.setVariants;fg.prototype.getBandwidthEstimate=fg.prototype.getBandwidthEstimate;fg.prototype.trySuggestStreams=fg.prototype.trySuggestStreams;fg.prototype.segmentDownloaded=fg.prototype.segmentDownloaded;fg.prototype.disable=fg.prototype.disable;fg.prototype.enable=fg.prototype.enable; fg.prototype.chooseVariant=fg.prototype.chooseVariant;fg.prototype.init=fg.prototype.init;fg.prototype.release=fg.prototype.release;fg.prototype.stop=fg.prototype.stop;var jg=1;T("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function kg(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(lg(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||lg(e))return!0}return!1} function mg(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 lg(d)?c.push(d):lg(f)&&c.push(f)}return c} function ng(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function og(a){return a?!!a.match(/^com\.apple\.fps/):!1}function lg(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}var pg=new pb(function(){return Ub(new Uint8Array([0]))}),qg=new Map;function rg(a,b){var c=sg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=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 tg(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 U(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return F(d,new Promise(function(e){(new af(e)).ha(c/1E3)}),2)}a.h*=a.m;G(d)})}function sg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function ug(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}ug.prototype.resolve=function(){};ug.prototype.reject=function(){};function vg(a,b){this.promise=a;this.i=b;this.g=null}function wg(a){return new vg(Promise.reject(a),function(){return Promise.resolve()})}function xg(){var a=Promise.reject(new U(2,7,7001));a.catch(function(){});return new vg(a,function(){return Promise.resolve()})}function yg(a){return new vg(Promise.resolve(a),function(){return Promise.resolve()})}function zg(a){return new vg(a,function(){return a.catch(function(){})})}vg.prototype.abort=function(){this.g||(this.g=this.i());return this.g}; function Ag(a){return new vg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}vg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this}; vg.prototype.Ua=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Bg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new ug;f.catch(function(){});var g=new U(2,7,7001);this.promise.then(c(!0),c(!1));return new vg(f,function(){return d()})}; function Bg(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()}}}fa.Object.defineProperties(vg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});T("shaka.util.AbortableOperation",vg);vg.prototype.chain=vg.prototype.Ua;vg.prototype["finally"]=vg.prototype.finally; vg.all=Ag;vg.prototype.abort=vg.prototype.abort;vg.notAbortable=zg;vg.completed=yg;vg.aborted=xg;vg.failed=wg;function V(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 Cg(a){var b=new V(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}V.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};V.prototype.stopImmediatePropagation=function(){this.g=!0};V.prototype.stopPropagation=function(){};T("shaka.util.FakeEvent",V); var Dg={hl:"abrstatuschanged",il:"adaptation",jl:"audiotrackchanged",kl:"audiotrackschanged",ll:"boundarycrossed",ol:"buffering",ql:"canupdatestarttime",rl:"complete",ul:"currentitemchanged",vl:"downloadcompleted",wl:"downloadfailed",xl:"downloadheadersreceived",yl:"drmsessionupdate",Al:"emsg",Gl:"itemsinserted",Hl:"itemsremoved",Xl:"prft",Error:"error",Bl:"expirationupdated",Cl:"firstquartile",Dl:"gapjumped",Il:"keystatuschanged",Ml:"loaded",Nl:"loading",Pl:"manifestparsed",Ql:"manifestupdated", Rl:"mediaqualitychanged",Sl:"mediasourcerecovered",Tl:"metadataadded",Metadata:"metadata",Ul:"midpoint",Vl:"nospatialvideoinfo",Wl:"onstatechange",Yl:"ratechange",am:"segmentappended",bm:"sessiondata",cm:"spatialvideoinfo",dm:"stalldetected",em:"started",fm:"statechanged",gm:"streaming",hm:"textchanged",im:"texttrackvisibility",jm:"thirdquartile",lm:"timelineregionadded",mm:"timelineregionenter",nm:"timelineregionexit",om:"trackschanged",qm:"unloading",sm:"variantchanged"};function Eg(){this.Xa=new hb;this.xe=this}Eg.prototype.addEventListener=function(a,b){this.Xa&&this.Xa.push(a,b)};Eg.prototype.removeEventListener=function(a,b){this.Xa&&this.Xa.remove(a,b)};Eg.prototype.dispatchEvent=function(a){if(!this.Xa)return!0;var b=this.Xa.get(a.type)||[],c=this.Xa.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.xe;a.currentTarget=this.xe;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented}; Eg.prototype.release=function(){this.Xa=null};function Fg(){this.g=[]}function Gg(a,b){a.g.push(b.finally(function(){Uc(a.g,b)}))}Fg.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 Hg(a,b,c,d,e,f,g){Eg.call(this);this.i=null;this.j=!1;this.s=new Fg;this.g=new Set;this.h=new Set;this.o=a||null;this.m=b||null;this.A=c||null;this.B=d||null;this.C=e||null;this.G=f||null;this.F=g||null;this.l=new Map}pa(Hg,Eg);p=Hg.prototype;p.configure=function(a){this.i=a};function Ig(a,b,c,d){d=void 0===d?!1:d;c=c||Jg;var e=Kg.get(a);(!e||c>=e.priority)&&Kg.set(a,{priority:c,tf:b,yk:d})} function Lg(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.Bk=function(a){this.g.add(a)};p.Xk=function(a){this.g.delete(a)};p.ij=function(){this.g.clear()};p.Ck=function(a){this.h.add(a)};p.Yk=function(a){this.h.delete(a)};p.jj=function(){this.h.clear()};p.Jh=function(){this.l.clear()}; function Mg(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();Eg.prototype.release.call(this);return this.s.destroy()}; p.request=function(a,b,c){var d=this,e=new Ng;if(this.j){var f=Promise.reject(new U(2,7,7001));f.catch(function(){});return new Og(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?fd(b.retryParameters):sg();b.uris=fd(b.uris);f=Pg(this,a,b,c);var g=f.Ua(function(){return Qg(d,a,b,c,new rg(b.retryParameters,!1),0,null,e)}),h=g.Ua(function(q){return Rg(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.Ua(function(q){var r=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=r;q.Yj||!d.o||u.fromCache||"HEAD"==b.method||a!=Sg||d.o(u.timeMs,u.data.byteLength,Tg(c),b,c);d.F&&d.F(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new Og(n.promise,function(){return n.abort()},e);Gg(this.s,f);return f}; function Pg(a,b,c,d){function e(h){f=f.Ua(function(){c.body&&(c.body=Ub(c.body));return h(b,c,d)})}var f=yg(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Ua(void 0,function(h){if(h instanceof U&&7001==h.code)throw h;throw new U(2,1,1006,h);})} function Qg(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 bh();var b=Tb(this.h,this.g,a);this.g+=a;return b}; p.skip=function(a){if(this.g+a>this.h.byteLength)throw bh();this.g+=a};p.Ci=function(a){if(this.ga||a>this.h.byteLength)throw bh();this.g=a};p.Uc=function(){for(var a=this.g;this.Fa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Tb(this.h,a,this.g-a);this.g+=1;return ac(a)};function bh(){return new U(2,3,3E3)}T("shaka.util.DataViewReader",$g);$g.prototype.readTerminatedString=$g.prototype.Uc;$g.prototype.seek=$g.prototype.seek;$g.prototype.rewind=$g.prototype.Ci; $g.prototype.skip=$g.prototype.skip;$g.prototype.readBytes=$g.prototype.Sb;$g.prototype.readUint64=$g.prototype.vd;$g.prototype.readInt32=$g.prototype.Tg;$g.prototype.readUint32=$g.prototype.T;$g.prototype.readUint16=$g.prototype.Aa;$g.prototype.readUint8=$g.prototype.X;$g.prototype.getLength=$g.prototype.getLength;$g.prototype.getPosition=$g.prototype.Ma;$g.prototype.hasMoreData=$g.prototype.Fa;var ah=1;$g.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ah};function ch(){this.i=new Map;this.h=new Map;this.g=!1}p=ch.prototype;p.box=function(a,b){a=dh(a);this.i.set(a,eh);this.h.set(a,b);return this};p.R=function(a,b){a=dh(a);this.i.set(a,fh);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new $g(a,0);for(this.g=!1;a.Fa()&&!this.g;)this.qd(0,a,b,c)}; p.qd=function(a,b,c,d){var e=b.Ma();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.T(),g=b.T(),h=gh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ma()+8>b.getLength()){this.g=!0;return}f=b.vd();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==fh){if(d&&b.Ma()+4>b.getLength()){this.g=!0;return}n=b.T();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(g-=b.Ma(),b=0>24&255,a>>16&255,a>>8&255,a&255)}function ih(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}T("shaka.util.Mp4Parser",ch);ch.headerSize=ih;ch.typeToString=gh;ch.allData=mh;ch.audioSampleEntry=lh;ch.visualSampleEntry=kh;ch.sampleDescription=jh;ch.children=hh;ch.prototype.parseNext=ch.prototype.qd;ch.prototype.parse=ch.prototype.parse; ch.prototype.stop=ch.prototype.stop;ch.prototype.fullBox=ch.prototype.R;ch.prototype.box=ch.prototype.box;var eh=0,fh=1;function nh(a){var b=this;this.g=[];this.h=[];this.data=[];(new ch).box("moov",hh).box("moof",hh).R("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.s(new U(2,6,6006,f.message,f,h))}})}function $h(a){return Q(function(b){return 1==b.g?a.K?F(b,a.m,3):b.u(0):F(b,Promise.all(a.S.map(function(c){return c.promise})),0)})} function Jh(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&&lc(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=Mg([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=dc(y.body);if(A){var C=JSON.parse(A);C.type||(C.type=z.sessionType,y.body=ec(JSON.stringify(C)))}}catch(E){}}if(ng(a.g.keySystem))if(y=bc(g.body,!0,!0),y.includes("PlayReadyKeyMessage")){y=kd(y,"PlayReadyKeyMessage");z=ud(y,"HttpHeader");z=t(z);for(A=z.next();!A.done;A=z.next())C=A.value,A=ud(C,"name")[0],C=ud(C,"value")[0],g.headers[sd(A)]=sd(C);y=ud(y,"Challenge")[0];g.body=mc(sd(y))}else g.headers["Content-Type"]="text/xml; charset=utf-8"; k=Date.now();wa(v,2);m=a.C.pc.request(2,g,{isPreload:a.P()});a.S.push(m);return F(v,m.promise,4);case 4:l=v.h;Uc(a.S,m);za(v,3);break;case 2:n=Aa(v);if(a.l.g)return v.return();q=new U(2,6,6007,n);1==a.i.size?(a.s(q),d&&d.Ib&&d.Ib.reject(q)):(d&&d.Ib&&d.Ib.reject(q),a.i.delete(c),Ph(a)&&(a.m.resolve(),a.L.ha(.1)));return v.return();case 3:if(a.l.g)return v.return();a.H+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&lc(l.data);wa(v,5);return F(v,c.update(l.data),7);case 7:za(v,6);break;case 5:return r= Aa(v),u=new U(2,6,6008,r.message),a.s(u),d&&d.Ib&&d.Ib.reject(u),v.return();case 6:if(a.l.g)return v.return();w=new V("drmsessionupdate");a.C.onEvent(w);d&&(d.Ib&&d.Ib.resolve(),Xh(a,d));G(v)}})} function Zh(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(ng(a.g.keySystem)&&16==g.byteLength&&h.$g()){h=Yb(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=oc(g).slice(0,32);a.W.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ib&&(a.i.delete(b),ai(b));Ph(a)&&(a.m.resolve(), a.L.ha(bi))}function qh(a){var b=a.W,c=a.ka;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.s(new U(2,6,6014));a.C.nf(Zg(c))} function ci(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S;return Q(function(aa){if(1==aa.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 aa.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(W,Fa){var Ga,ya,qa,Ca,Ja,ra,da,sa,Za,$a,ib,qb,mb;return Q(function(Na){switch(Na.g){case 1:return wa(Na,2),F(Na,Fa.createMediaKeys(),5);case 5:Ga=Na.h;case 4:za(Na,3);break;case 2:return Aa(Na),Na.return();case 3:qa= (ya=Fa.getConfiguration().sessionTypes)?ya.includes("persistent-license"):!1;u.ki()&&(qa=!1);Ca=Fa.getConfiguration().videoCapabilities;Ja=Fa.getConfiguration().audioCapabilities;ra={persistentState:qa,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.has(W)&&r.get(W)?ra=r.get(W):r.set(W,ra);(da=Ca[0].encryptionScheme)&&!ra.encryptionSchemes.includes(da)&&ra.encryptionSchemes.push(da);(sa=Ca[0].robustness)&&!ra.videoRobustnessLevels.includes(sa)&&ra.videoRobustnessLevels.push(sa); (Za=Ja[0].robustness)&&!ra.audioRobustnessLevels.includes(Za)&&ra.audioRobustnessLevels.push(Za);if("getStatusForPolicy"in Ga){$a=[];ib=t(f);qb=ib.next();for(mb={};!qb.done;mb={Rd:void 0},qb=ib.next())mb.Rd=qb.value,ra.minHdcpVersions.includes(mb.Rd)||$a.push(Ga.getStatusForPolicy({minHdcpVersion:mb.Rd}).then(function(Td){return function(gc){"usable"!=gc||ra.minHdcpVersions.includes(Td.Rd)||ra.minHdcpVersions.push(Td.Rd)}}(mb)));return F(Na,Promise.all($a),0)}Na.u(0)}})};v=function(W,Fa,Ga,ya){var qa, Ca,Ja,ra,da,sa,Za,$a,ib,qb,mb;return Q(function(Na){switch(Na.g){case 1:wa(Na,2);qa=fd(n);Ca=t(qa.videoCapabilities);for(Ja=Ca.next();!Ja.done;Ja=Ca.next())ra=Ja.value,ra.encryptionScheme=Fa,ra.robustness=Ga;da=t(qa.audioCapabilities);for(sa=da.next();!sa.done;sa=da.next())Za=sa.value,Za.encryptionScheme=Fa,Za.robustness=ya;$a=fd(qa);$a.persistentState="required";$a.sessionTypes=["persistent-license"];ib=[$a,qa];mb=rb();return"MOBILE"==mb.La()?F(Na,ef(5,navigator.requestMediaKeySystemAccess(W,ib)), 7):F(Na,navigator.requestMediaKeySystemAccess(W,ib),6);case 6:qb=Na.h;Na.u(5);break;case 7:qb=Na.h;case 5:return F(Na,w(W,qb),8);case 8:za(Na,0);break;case 2:Aa(Na),G(Na)}})};y=function(W,Fa,Ga,ya){var qa,Ca,Ja,ra;return Q(function(da){switch(da.g){case 1:return wa(da,2),qa={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:W,video:{encryptionScheme:Fa, robustness:Ga},audio:{encryptionScheme:Fa,robustness:ya}}},Ja=rb(),"MOBILE"==Ja.La()?F(da,ef(5,navigator.mediaCapabilities.decodingInfo(qa)),7):F(da,navigator.mediaCapabilities.decodingInfo(qa),6);case 6:Ca=da.h;da.u(5);break;case 7:Ca=da.h;case 5:return ra=Ca.keySystemAccess,F(da,w(W,ra),8);case 8:za(da,0);break;case 2:Aa(da),G(da)}})};z=t(a);for(A=z.next();!A.done;A=z.next())C=A.value,r.set(C,null);E=function(W){return"WEBKIT"===rb().Da()&&"org.w3.clearkey"===W?!1:!0};H=[];B=t(q);for(D=B.next();!D.done;D= B.next())for(I=D.value,K=t(a),J=K.next();!J.done;J=K.next())L=J.value,E(L)&&(H.push(v(L,I,"","")),H.push(y(L,I,"","")));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())S=R.value,E(M)&&(H.push(v(M,null,S,"")),H.push(v(M,null,"",S)),H.push(y(M,null,S,"")),H.push(y(M,null,"",S)));return F(aa,Promise.all(H),2)}return aa.return(Zg(r))})} function ai(a){return Q(function(b){if(1==b.g)return wa(b,2),F(b,ef(di,Promise.all([a.close().catch(function(){}),a.closed])),4);if(2!=b.g)return za(b,0);Aa(b);G(b)})} function wh(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 wa(g,2),a.oa||a.B.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?F(g,ai(e),5):F(g,e.remove(),5);if(2!=g.g)return za(g,0);Aa(g);G(g)})})),0)})}function Eh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])} function uh(a){a.i.forEach(function(b,c){var d=b.Og,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Og=e)})}function Ph(a){a=a.i.values();return Xg(a,function(b){return b.loaded})}function Oh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.W.get(c.value))return!1;return!0} function Dh(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 Vh(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Ha:void 0},l=a.next()){m.Ha=l.value;b.includes(m.Ha.encryptionScheme)||b.push(m.Ha.encryptionScheme);"org.w3.clearkey"==m.Ha.keySystem&&m.Ha.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ha.licenseServerUri)||k.push(m.Ha.licenseServerUri):c.includes(m.Ha.licenseServerUri)||c.push(m.Ha.licenseServerUri);e.includes(m.Ha.serverCertificateUri)||e.push(m.Ha.serverCertificateUri);m.Ha.serverCertificate&& (d.some(function(r){return function(u){return Sb(u,r.Ha.serverCertificate)}}(m))||d.push(m.Ha.serverCertificate));if(m.Ha.initData){l=t(m.Ha.initData);for(var n=l.next(),q={};!n.done;q={Fg:void 0},n=l.next())q.Fg=n.value,f.some(function(r){return function(u){var w=r.Fg;return u.keyId&&u.keyId==w.keyId?!0:u.initDataType==w.initDataType&&Sb(u.initData,w.initData)}}(q))||f.push(q.Fg)}if(m.Ha.keyIds)for(l=t(m.Ha.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ha.keySystemUris&&h)for(m=t(m.Ha.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 Ci(a,b,c){var d=a.T(),e=[],f=null;c&1&&(f=a.Tg());c&4&&a.skip(4);for(var g=0;ga?"0":"")+a};function Ii(a){if(!Ji){Ji=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Ki=Li("ftyp",b,d,b,c);b=Li("dref",Mi);Ni=Li("dinf",b)}this.g=a} function Oi(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=Li;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/(Pi+1));m=Math.floor(m%(Pi+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(Qi(h,4)),[0,0,0,0],x(Qi(n,4)),x(Qi(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(Qi(k,2)),[0,0],x(Qi(l, 2)),[0,0]));h=Li("tkhd",h);k=Li;n=g.duration*g.timescale;l=Math.floor(n/(Pi+1));n=Math.floor(n%(Pi+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(Qi(g.timescale,4)),x(Qi(l,4)),x(Qi(n,4)),x(Qi(m,2)),[0,0]));l=Li("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Ri;break;case "audio":m=Si}n=Li("hdlr",m);a:{switch(g.type){case "video":g=Li("minf",Li("vmhd",Ti),Ni,Ui(g));break a; case "audio":g=Li("minf",Li("smhd",Vi),Ni,Ui(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=pc.apply(jc,x(b));f=a.g[0];c=Li;d=f.duration*f.timescale;e=Math.floor(d/(Pi+1));d=Math.floor(d%(Pi+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(Qi(f.timescale,4)),x(Qi(e,4)),x(Qi(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=Li("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(Qi(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Li("trex",k),h.call(g,k);a=pc.apply(jc,x(d));a=Li("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=pc.apply(jc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Ki.byteLength+ a.byteLength);b.set(Ki);b.set(a,Ki.byteLength);return b} function Ui(a){var b=Li,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=rb().be()?"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(Qi(c,2)),x(Qi(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=Xi(a);g=new Uint8Array([]);a.encrypted&&(g=Yi(0,a.stream,a.codecs),d="encv");d=Li(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=Yi(0,a.stream,a.codecs),d="enca");a=Li(d,Zi(a),c,e)}d=a}a=Li("stsd",$i,d);return b("stbl",a,Li("stts",aj),Li("stsc",bj),Li("stsz",cj),Li("stco",dj))}function Xi(a){if(!a.Va&&!a.Wa)return new Uint8Array([]);var b=a.Wa;a=new Uint8Array([].concat(x(Qi(a.Va,4)),x(Qi(b,4))));return Li("pasp",a)} function Zi(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(Qi(a.stream.audioSamplingRate||44100,2)),[0,0]))} function Yi(a,b,c){a=Li;c=new Uint8Array([].concat(x(Qi(ej(c.split(".")[0]),4))));c=Li("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(Qi(ej(d),4)),[0,1,0,0]));d=Li("schm",d);e=Li;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=Wi(h.value)}b=new Uint8Array([0,0,0,0,0, 0,1,8]);b=Li("tenc",b,f);return a("sinf",c,d,e("schi",b))} function fj(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=Li;var g=new Uint8Array([0,0,0,0].concat(x(Qi(c.data?c.data.Tb:0,4))));g=Li("mfhd",g);var h;var k=c.data?c.data.yb:[];var l=new Uint8Array(4+k.length);for(h=0;h>8*b&255);return c}function Wi(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,nj(a,k.start,k.size+4)}}return a} function kj(a,b,c,d,e,f){var g=Yi(new Ii([]),a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Yb(a).setUint32(4,f);a.set(g,d.size);nj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=rb().Ye()?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,nj(f,e.start,e.size+a.byteLength);a=Yb(f,c.start);c=ih(c);b=a.getUint32(c);a.setUint32(c,b+1);return f} function nj(a,b,c){a=Yb(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 oj(a){function b(e){d.push({start:e.start,size:e.size});hh(e)}var c=Tb(a),d=[];(new ch).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=Yb(c,e.start),g=0;ga.end(0)-a.start(0)}function wj(a){return!a||vj(a)?null:a.length?a.end(a.length-1):null}function xj(a,b){return!a||!a.length||vj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function yj(a,b){if(!a||!a.length||vj(a))return 0;var c=0;a=t(zj(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 Aj(a,b,c){if(!a||!a.length||vj(a))return null;a=zj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function zj(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 Kj(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 Lj(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 Mj(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=ac(Tb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=ac(Tb(a.data,3+c,f)),h;"--\x3e"===d?h=ac(Tb(a.data,4+c+f)):h=Ub(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=ac(Tb(a.data,1,d));a=ac(Tb(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=ac(Tb(a.data,1,d));a=ac(Tb(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=ac(Tb(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=Ub(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=ac(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=ac(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ub(a.data),b):null} function Nj(a){for(var b=0,c=[];Jj(a,b);){var d=Lj(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+=Lj(a,b+6),Kj(a,b+10)&&(d+=10),b+=d;return 0>>32-c;a.g-=c;0>>b))return a.h<<=b,a.g-=b,b;Rj(a);return b+Uj(a)}function Vj(a){Sj(a,1+Uj(a))}function X(a){var b=Uj(a);return Tj(a,b+1)-1}function Wj(a){a=X(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Xj(a){return 1===Tj(a,1)}function Yj(a){return Tj(a,8)} function Zj(a,b){for(var c=8,d=8,e=0;ea.length)return this;for(var b=Math.max(0,ck(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,We:-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.s&&(a.s=e);c.pts=ek(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=c.pts!= e?ek(d,a.o):d);a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.xk=function(a){wb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Qg(a,{Xd:null,state:null})}; p.Qg=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.Xd&&(c=k.length?k[k.length-1]:b.Xd)&&(c.data=pc(c.data,a),c.fullData=pc(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=pc.apply(jc,x(c.value)),(c=dk(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Nj(c.data),dts:c.dts,pts:c.pts});return a}; p.rb=function(){if(this.i.length&&!this.h.length)for(var a=t(this.i),b=a.next();!b.done;b=a.next()){var c=pc.apply(jc,x(b.value)),d=dk(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=pc(b.data,c),this.h.push(b))}return this.h}; p.Qc=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=pc.apply(jc,x(c.value)),e=dk(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=pc(c.data,d),this.g.push(c))}if(a){b={Xd:null,state:null};c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())e=e.value,e.nalus=this.Qg(e,b),e.nalus.length&&(c.push(e), b.Xd=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.rb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Qc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.Md=function(){return{audio:this.A,video:this.m}};p.Ve=function(){for(var a=[],b=t(this.Qc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a}; p.Wj=function(){wb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Dg();return{height:a.height,width:a.width}};p.Dg=function(){return"hvc"==this.m?fk(this):ok(this)};function pk(a){var b=a.Qc();return 1h?Zj(c,16):Zj(c,64))}}Vj(c);g=X(c);if(0===g)X(c);else if(1===g)for(Sj(c,1),Vj(c),Vj(c),g=X(c),h=0;hy;y++)Tj(d,2);for(y=0;yB;B++)H|=(E>>B&1)<<31-B;return H>>>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=pk(a);return b}function ek(a,b){var c=1;for(a>b&&(c=-1);4294967296ck(a)?!1:!0}function ck(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 Hk(a,b){return a.l.size?b==wc?a.h.h:wj(Gk(a,b)):null}function Ik(a,b,c){if(b==wc)return a=a.h,null==a.h||a.hb?F(g,Lk(e,a,function(){return Rk(e,a,b,c)},null),5):g.u(0)):e.m?F(g,Lk(e,f.ea,function(){return Rk(e,f.ea,b,c)},null),0):g.u(0)})}; function Sk(a,b){var c;return Q(function(d){return 1==d.g?(c=yc,b==c.Ya?a.h?F(d,a.h.remove(0,Infinity),0):d.return():F(d,Lk(a,b,function(){return Rk(a,b,0,a.i.duration)},null),4)):a.m?F(d,Lk(a,c.ea,function(){return Rk(a,c.ea,0,a.i.duration)},null),0):d.u(0)})}p.flush=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=yc,a==c.Ya?d.return():F(d,Lk(b,a,function(){b.g.currentTime-=.001;Dk(b,a)},null),2)):b.m?F(d,Lk(b,c.ea,function(){var e=c.ea;b.g.currentTime-=.001;Dk(b,e)},null),0):d.u(0)})}; function Tk(a,b,c,d,e,f,g,h,k){var l,m,n;return Q(function(q){if(1==q.g){l=yc;if(b==l.Ya)return f||(a.h.s=c),We(a.h,d,e),q.return();m=[];return F(q,Uk(a,b,g,h,k),2)}n=q.h;n||(m.push(Lk(a,b,function(){return Mk(a,b)},null)),a.m&&m.push(Lk(a,l.ea,function(){return Mk(a,l.ea)},null)));f||(m.push(Lk(a,b,function(){return Nk(a,b,c)},null)),a.m&&m.push(Lk(a,l.ea,function(){return Nk(a,l.ea,c)},null)));if(0!=d||Infinity!=e)m.push(Lk(a,b,function(){return Vk(a,b,d,e)},null)),a.m&&m.push(Lk(a,l.ea,function(){return Vk(a, l.ea,d,e)},null));return m.length?F(q,Promise.all(m),0):q.u(0)})}function Wk(a,b,c){var d,e;return Q(function(f){if(1==f.g){d=yc;if(b==d.Ya)return f.return();b==d.xa&&(a.Ta=new ug);if(!a.G||(e=Hk(a,b))&&.1>Math.abs(e-c))return f.return();Lk(a,b,function(){return Mk(a,b)},null);a.m&&Lk(a,d.ea,function(){return Mk(a,d.ea)},null);return F(f,Lk(a,b,function(){return Nk(a,b,c)},null),2)}return a.m?F(f,Lk(a,d.ea,function(){return Nk(a,d.ea,c)},null),0):f.u(0)})} p.endOfStream=function(a){var b=this;return Q(function(c){return F(c,Xk(b,function(){yk(b)||zk(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.ob=function(a){var b=this;return Q(function(c){return F(c,Xk(b,function(){if(b.A.durationReductionEmitsUpdateEnd&&ac&&(c+=.001);var d=!0;"HLS"==a.S&&(d=Hk(a,b),d=!d||.15=b.o&&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=Aj(c,b,a.h.gapDetectionThreshold),null==d||0==d&&!a.A||(e=c.start(d), (f=a.h.gapPadding)&&(e=Math.ceil(100*(e+f))/100),e>=a.B.Eb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.j&&(a.j=e),a.C++,a.s(new V("gapjumped")))))}}} function nl(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new ql(new rl(a.g),b,function(){var d;return Q(function(e){if(1==e.g)return d=zj(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.u(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.s(new V("stalldetected"));G(e)})})}function ql(a,b,c){this.h=a;this.m=pl(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.o=b;this.j=c} ql.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function rl(a){var b=this;this.g=a;this.h=new jb;this.i=!1;this.h.D(this.g,"audiofocuspaused",function(){b.i=!0});this.h.D(this.g,"audiofocusgranted",function(){b.i=!1});this.h.D(this.g,"audiofocuslost",function(){b.i=!0})} function pl(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(zj(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}rl.prototype.release=function(){this.h&&this.h.release();this.h=null};function sl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=tl.value().get(b),c.za(a,b,d))}var tl=new pb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function ul(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new jb;this.i=new vl(a);sl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){wl(e,e.j())})}ul.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 xl(a){return a.o?a.g.currentTime:a.j()} function yl(a,b){0Math.abs(a.g.currentTime-b)?Al(a):(a.h.za(a.g,"seeking",function(){Al(a)}),zl(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Al(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)} function vl(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new af(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--)})}vl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function zl(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ga(.1)};function Bl(a){this.g=a;this.i=!1;this.h=null;this.j=new jb}p=Bl.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=Cl(b);null!==e&&(d=b.h.getTime()/1E3-e,d=Dl(b,d))}null==d?b.i=!0:(0>d&&(d=Math.max(0,c+d)),c!=d?(b.j.za(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;sl(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.Qf=function(a){this.h=this.i?this.h:a};p.Be=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(Cl(this)||0),a=Dl(this,a));return a||0};p.Bh=function(){return 0};p.Ah=function(){return 0};p.ni=function(){};p.$h=function(){var a=wj(this.g.buffered);return null!=a&&a>=this.g.duration-1};function Cl(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null} function Dl(a,b){a=a.g.seekable;0l-k&&(k=l-3);ha.g.getDuration()?a.g.Vb():a.g.Eb():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):0>b&&(b=a.g.Eb()+b);return Il(a,Hl(a,b))}p.ni=function(){this.j.pf()};p.$h=function(){if(this.g.V()){var a=this.g.zc(),b=wj(this.h.buffered);if(null!=b&&b>=a)return!0}return!1}; function Il(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Fl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.Vb(),f=a.g.Eb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Od(c),k=a.g.Od(d);c=a.g.Od(c+d);return b>=g?Il(a,b):b>f?f-a.l.safeSeekEndOffset:b=h||xj(a.h.buffered,b)?b:c}function Hl(a,b){var c=a.g.Vb();if(ba?a:b};function Jl(a){this.g=a;this.m=null;this.i=0;this.o=!1}p=Jl.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.pk=function(){this.o=!0};p.Db=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Rf(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.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)}; p.gf=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.gf(a);this.$a(b)};p.$a=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}}; p.hd=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new rj(a.startTime,b,a.C,a.startByte,a.endByte,a.Y,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,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.Gf=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new af(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Ga(a))};Jl.prototype[Symbol.iterator]=function(){return this.Ub(0)}; Jl.prototype.Ub=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]}; T("shaka.media.SegmentIterator",Kl);Kl.prototype.resetToLastIndependent=Kl.prototype.Yg;Kl.prototype.next=Kl.prototype.next;Kl.prototype.current=Kl.prototype.current;Kl.prototype.currentPosition=Kl.prototype.mj;Kl.prototype.setReverse=Kl.prototype.zd;function Ml(){Jl.call(this,[]);this.h=[]}pa(Ml,Jl);p=Ml.prototype;p.clone=function(){var a=new Ml;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.Db=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Db(a)};function Nl(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 Ol(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.Ne();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.gf=function(){};p.$a=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.$a(a);for(;1=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)} Tl.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.gg;a:{var e=c.ae;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.od;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width); 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&&!Wc(d.roles,e.roles);(g||h||d)&&Xl(this,a,e.contentType)&&(c.gg=e,d=new V("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Xl(this,a,e.contentType)&&(c.gg=e,JSON.stringify(e),c=new V("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}}; function Xl(a,b,c){return(a=a.h()[c])&&0=a[0].start&&b=d?!1:!0})}else b.ae=[]} function Yl(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 Zl(a){Eg.call(this);this.h=new Map;this.i=a;this.g=null}pa(Zl,Eg);Zl.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);Eg.prototype.release.call(this)};function $l(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 V("regionadd",new Map([["region",b]])),a.dispatchEvent(b),am(a))} function am(a){a.g||(a.g=(new af(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&&jm(this,d);b&&hm(this)}; bm.prototype.zd=function(a){this.o=a;this.g&&this.g.zd(a)};function hm(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={Gg:void 0},d=c.next())e.Gg=d.value,b.some(function(f){return function(g){return qj(g.Y,f.Gg)}}(e))||jm(a,e.Gg)}function lm(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&jm(a,d)}hm(a)}function mm(a,b){b&&b!==a.i&&(km(a),a.i=b)}function jm(a,b){var c=a.h;b instanceof pj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()} function fm(a){this.g=a;this.Zd=this.nh=null}function gm(a,b,c){var d=new Uint8Array(0);a.Zd=a.g(b,c,function(e){return Q(function(f){if(1==f.g)return 0>3,31===K&&B.Fa()&&(K=32+((I&7)<<3)+((B.X()&224)>>5)),D+="."+K));g.push(D);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(B){var D=y||"";switch(y){case "dvav":D="avc3";break;case "dva1":D="avc1"}B=B.reader;B.skip(1);B=D+"."+Gi(B.X())+Gi(B.X())+Gi(B.X());h.push(B);l=!0}).box("hvcC",function(B){var D=y||"";switch(y){case "dvh1":D="hvc1";break;case "dvhe":D="hev1"}var I=B.reader;I.skip(1);B=I.X();var K=["","A","B","C"][B>>6],J=B&31,L=I.T(),N=(B&32)>>5?"H":"L";B=[I.X(),I.X(),I.X(),I.X(),I.X(),I.X()];I=I.X();for(var O=0,M=0;32>M;M++){O|=L&1;if(31== M)break;O<<=1;L>>=1}D=D+("."+K+J)+("."+Gi(O,!0));D+="."+N+I;K="";for(J=B.length;J--;)if((N=B[J])||K)K="."+N.toString(16).toUpperCase()+K;D+=K;h.push(D);l=!0}).box("dvcC",function(B){var D=y||"";switch(y){case "hvc1":D="dvh1";break;case "hev1":D="dvhe";break;case "avc1":D="dva1";break;case "avc3":D="dvav";break;case "av01":D="dav1"}var I=B.reader;I.skip(2);B=I.X();I=I.X();h.push(D+"."+Hi(B>>1&127)+"."+Hi(B<<5&32|I>>3&31));l=!0}).box("dvvC",function(B){var D=y||"";switch(y){case "hvc1":D="dvh1";break; case "hev1":D="dvhe";break;case "avc1":D="dva1";break;case "avc3":D="dvav";break;case "av01":D="dav1"}var I=B.reader;I.skip(2);B=I.X();I=I.X();h.push(D+"."+Hi(B>>1&127)+"."+Hi(B<<5&32|I>>3&31));l=!0}).R("vpcC",function(B){var D=y||"",I=B.reader;B=I.X();var K=I.X();I=I.X()>>4&15;h.push(D+"."+Hi(B)+"."+Hi(K)+"."+Hi(I));l=!0}).box("av1C",function(B){var D=y||"";switch(y){case "dav1":D="av01"}var I=B.reader;I.skip(1);B=I.X();I=I.X();var K=B>>>5,J=(I&64)>>6;h.push(D+"."+K+"."+Hi(B&31)+(I>>>7?"H":"M")+ "."+Hi(2===K&&J?(I&32)>>5?12:10:J?10:8)+"."+((I&16)>>4)+"."+((I&8)>>3)+((I&4)>>2)+(I&3)+"."+Hi(1)+"."+Hi(1)+"."+Hi(1)+".0");l=!0}).box("enca",lh).box("encv",kh).box("sinf",hh).box("frma",function(B){B=Ei(B.reader).codec;f(B)}).box("colr",function(B){h=h.map(function(K){if(K.startsWith("av01.")){var J=B.reader,L=J.Ma(),N=J.Sb(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.Aa();O=J.Aa();var M=J.Aa(),P=J.X()>> 7,R=K.split(".");10==R.length&&(R[6]=Hi(N),R[7]=Hi(O),R[8]=Hi(M),R[9]=String(P),K=R.join("."))}J.seek(L)}return K});var D=Fi(B.reader),I=D.colorGamut;w=D.le;v=I}).parse(a||b,!0,!0);if(!g.length&&!h.length)return null;var z=k&&!l,A=new Map;if(l&&!c){c=new Lc("video/mp4");a&&c.init(a);try{c.rf(b);for(var C=t(c.Pf()),E=C.next();!E.done;E=C.next()){var H=E.value;A.set(H,H)}}catch(B){}c.Cd()}return{type:z?"audio":"video",mimeType:z?"audio/mp4":"video/mp4",codecs:pm(g.concat(h)).join(", "),language:m,height:n, width:q,channelCount:r,sampleRate:u,closedCaptions:A,le:w,colorGamut:v,frameRate:null}}function pm(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Le(d);b.has(e)||(c.push(d),b.add(e))}b=xc("audio",c);d=xc("video",c);a=xc(wc,c);d=qm(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b} function qm(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?Ec('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a} function rm(a){var b=null;(new ch).box("moov",hh).box("trak",hh).box("mdia",hh).box("minf",hh).box("stbl",hh).R("stsd",jh).box("encv",kh).box("enca",lh).box("sinf",hh).box("schi",hh).R("tenc",function(c){c=c.reader;c.X();c.X();c.X();c.X();b=oc(c.Sb(16))}).parse(a,!0);return b} function sm(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Tb(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 tm(a,b,c,d,e){a=Mg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function um(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.K=new Map;this.C=1;this.A=this.o=null;this.P=0;this.h=new Map;this.I=!1;this.S=null;this.B=!1;this.l=new Ug(function(){return vm(c)});this.M=Date.now()/1E3;this.m=new Map;this.N={projection:null,hfov:null};this.W=0;this.U=Infinity;this.F=null;this.L=[];this.s=new af(function(){if(c.j&&c.g)if(c.j.presentationTimeline.V()){var d=c.j.presentationTimeline.Vb(),e=c.j.presentationTimeline.Eb();1a.g.sb(),d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.sa&&e.sa.zd(c),e.aa&&e.aa.zd(c);d=t(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.zd(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Ec&&(Hm(a,b,!1,0,!1),c.Ec=d);else if(b=c.Ec)c.Ec=null,Hm(a,b,!0,0,!1)} function Im(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.o=b;a.I&&(b.video&&Hm(a,b.video,c,d,e,f),b.audio&&Hm(a,b.audio,c,d,e,f))}function Jm(a,b){Q(function(c){if(1==c.g)return a.F=null,a.A=b,a.I?b.segmentIndex?c.u(2):F(c,b.createSegmentIndex(),2):c.return();Hm(a,b,!0,0,!1);G(c)})}function Km(a){var b=a.h.get(wc);b&&Hm(a,b.stream,!0,0,!0)} function Lm(a,b){for(var c=t(a.K.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.K.delete(d))}} function Hm(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=wc?g&&(g.Ec&&(b.trickModeVideo?(g.Ec=b,b=b.trickModeVideo):g.Ec=null),g.stream!=b||e)&&(a.m.has(b)?g.aa=a.m.get(b):g.aa&&mm(g.aa,b),b.type==wc&&(e=Ee(b.mimeType,b.codecs),Bk(a.g.Z,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Pa?(e="("+g.type+":"+g.stream.id+")",a.K.has(e)||a.K.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream= b,g.sa=null,g.Wf=!!f,b.dependencyStream?g.Ld=Dm(a,b.dependencyStream):g.Ld=null,e&&(g.xb=null,g.kc=null,g.jc=null,b.isAudioMuxedInVideo&&(b=null,"video"===g.type?b=a.h.get("audio"):"audio"===g.type&&(b=a.h.get("video")),b&&(xm(b).catch(function(){}),b.xb=null,b.kc=null,b.jc=null,Mm(a,b),Nm(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.Jc?g.Nf=!0:g.Pa?(g.Hc=!0,g.Me=d,g.Nf=!0):(wm(g),Om(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Pa||g.zb||Em(a,g,0),Nm(a,g).catch(function(h){if(a.g)a.g.onError(h)})): Cm(a,b)} function Nm(a,b){var c,d;return Q(function(e){if(1==e.g){if(!b.Gb)return e.return();c=b.stream;d=b.Gb;return c.segmentIndex?e.u(2):F(e,c.createSegmentIndex(),2)}if(b.Gb!=d||b.stream!=c)return e.return();var f=a.g.Pc();var g=Hk(a.g.Z,b.type),h=b.stream.segmentIndex.find(b.Ia?b.Ia.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.Y)&&(h+=(k.endByte?k.endByte-k.startByte:null)|| 0),k=a.g.getBandwidthEstimate(),f=8*h/k<(g||0)-f-a.i.rebufferingGoal||b.Gb.h.g>h?!0:!1):f=!1;f&&b.Gb.abort();G(e)})} p.Xc=function(){if(this.g){for(var a=this.g.Pc(),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.Z;d==wc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&aa.g.sb()):null} function zm(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={Kb:void 0},e=d.next())if(f.Kb=e.value,f.Kb.audio)if(a.m.has(f.Kb.audio)){if(e=a.m.get(f.Kb.audio),lm(e,b),!(0=b||!c.some(function(h){return function(k){return gf(h.Kb.audio.language,k)}}(f))||!(e=ym(a,f.Kb.audio))|| (f.Kb.audio.segmentIndex||f.Kb.audio.createSegmentIndex(),a.m.set(f.Kb.audio,e))}p.updateDuration=function(){var a=Hc(),b=this.j.presentationTimeline.getDuration();Infinity>b?(a&&(this.s&&this.s.stop(),Zk(this.g.Z)),this.g.Z.ob(b)):a?(this.s&&this.s.Ga(.5),this.g.Z.ob(Infinity)):this.g.Z.ob(Math.pow(2,32))}; function Sm(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:Vg(a.l);if(b.Pa||null==b.zb||b.Jc)return k.return();b.zb=null;if(!b.Hc){k.u(2);break}return F(k,Om(a,b,b.Nf,b.Me),3);case 3:return k.return();case 2:Lm(a,b);if(b.stream.segmentIndex){k.u(4);break}c=b.stream;wa(k,5);return F(k,b.stream.createSegmentIndex(),7);case 7:za(k,6);break;case 5:return d=Aa(k),F(k,Tm(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Pa||b.zb|| Em(a,b,0),k.return();case 4:wa(k,9);e=Um(a,b);null!=e&&(Em(a,b,e),b.Qd=!1);za(k,10);break;case 9:return f=Aa(k),F(k,Tm(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.u(0);break}return F(k,a.g.Z.endOfStream(),13);case 13:Vg(a.l),h=a.g.Z.getDuration(),0!=h&&hh&&k)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(wc))&&Vm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.sa;k=Wm(a,b,d,k);if(!k)return c;g=!1;h&&b.Wf&&(g=!0,b.Wf=!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,Vm(m)||m.sa&&!m.sa.current()||(h=Math.min(h,m.Ia?m.Ia.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;if("keep"!==a.i.crossBoundaryStrategy&&Xm(a,b,k))return null;b.aa&&b.sa&& !a.m.has(b.stream)&&(b.aa.$a(k.startTime+.001),dm(b.aa,k.startTime).catch(function(){}));Ym(a,b,d,k,g).catch(function(){});b.Ld&&Zm(a,b.Ld,d,f);return null} function Wm(a,b,c,d){if(b.sa)return(c=b.sa.current())&&b.Ia&&.001>Math.abs(b.Ia.startTime-c.startTime)&&(c=b.sa.next().value),c;if(b.Ia||d)return c=b.Ia?b.Ia.endTime:d,a=0>a.g.sb(),b.stream.segmentIndex&&(b.sa=b.stream.segmentIndex.Ub(c,!1,a)),b.sa&&b.sa.next().value;d=a.j.sequenceMode?0:a.i.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.sb();var f=null;d&&(b.stream.segmentIndex&&(b.sa=b.stream.segmentIndex.Ub(e,!1,a)),f=b.sa&&b.sa.next().value);f||(b.stream.segmentIndex&&(b.sa=b.stream.segmentIndex.Ub(c, !1,a)),f=b.sa&&b.sa.next().value);return f} function Ym(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H;return Q(function(B){switch(B.g){case 1:f=yc;g=b.stream;h=b.sa;b.Pa=!0;wa(B,2);if(2==d.Bc())throw new U(1,1,1011);return F(B,$m(a,b,d,e),4);case 4:Vg(a.l);if(a.B)return B.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(D){var I,K,J,L;return Q(function(N){switch(N.g){case 1:if(u)return N.return();w= !0;Vg(a.l);if(a.B)return N.return();wa(N,2);r=pc(r,D);I=!1;K=0;(new ch).box("mdat",function(O){K=O.size+O.start;I=!0}).parse(r,!1,!0);if(!I){N.u(4);break}J=r.subarray(0,K);r=r.subarray(K);return F(N,an(a,b,c,g,d,J,!0,e),5);case 5:b.aa&&b.sa&&dm(b.aa,d.startTime,!0);case 4:za(N,0);break;case 2:v=L=Aa(N),G(N)}})},F(B,bn(a,b,d,y),9);n=bn(a,b,d);return F(B,n,7);case 7:q=B.h;Vg(a.l);if(a.B)return B.return();Vg(a.l);return b.Hc?(b.Pa=!1,Em(a,b,0),B.return()):F(B,an(a,b,c,g,d,q,!1,e),6);case 9:z=B.h;if(v)throw v; if(w){B.u(10);break}u=!0;Vg(a.l);return a.B?B.return():b.Hc?(b.Pa=!1,Em(a,b,0),B.return()):F(B,an(a,b,c,g,d,z,!1,e),10);case 10:b.aa&&b.sa&&dm(b.aa,d.startTime,!0);case 6:Vg(a.l);if(a.B)return B.return();b.Ia=d;h.next();b.Pa=!1;b.Vg=!1;A=a.g.Z.Lb();C=A[b.type];fb(JSON.stringify(C));b.Hc||(E=null,b.type===f.xa?E=a.h.get(f.ea):b.type===f.ea&&(E=a.h.get(f.xa)),E&&E.type==f.ea?a.g.pf(d,b.stream,E.stream.isAudioMuxedInVideo):a.g.pf(d,b.stream,b.stream.codecs.includes(",")));Em(a,b,0);za(B,0);break;case 2:H= Aa(B);Vg(a.l,H);if(a.B)return B.return();b.Pa=!1;if(7001==H.code)b.Pa=!1,wm(b),Em(a,b,0),B.u(0);else if(b.type==f.Ya&&a.i.ignoreTextStreamFailures)a.h.delete(f.Ya),B.u(0);else{if(3017==H.code)return F(B,cn(a,b,H),0);b.Qd=!0;1==H.category&&b.aa&&jm(b.aa,d);H.severity=2;return F(B,Tm(a,b,H),0)}}})} function Zm(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.Ub(c))&&g.next().value;h&&a.L.includes(h.startTime);)h=g&&g.next().value;if(!h){w.u(0);break}k=h.Y;if(!k||qj(k,b.xb)){w.u(3);break}b.xb=k;wa(w,4);return F(w,bn(a,b,k),6);case 6:l=w.h;var v=a.g.Z;v.M&&Bc(v.M,l,0,e);a.L=[];za(w,3);break;case 4:throw m=Aa(w),b.xb=null,m;case 3:if(b.Ia&&b.Ia==h){w.u(0);break}b.Ia=h;wa(w,8);return F(w,bn(a,b,h),10);case 10:n=w.h;v=a.g.Z;v.M&& Bc(v.M,n,0,e);a.L.push(h.startTime);za(w,9);break;case 8:throw q=Aa(w),b.Ia=null,q;case 9:r=Math.max.apply(Math,[0].concat(x(a.L)));u=a.g.Pc();if(u+d>r)return F(w,Zm(a,b,h.startTime,d),0);w.u(0)}})} function cn(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.Vg}))return l.u(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 Em(a,b,4),l.return();h=Math.round(100*a.C);if(20k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():F(q,a.g.Z.remove(b.type,g,g+n,e),2)}if(4!= q.g)return Vg(a.l),a.F?F(q,dn(a,a.F,c),4):q.u(0);Vg(a.l);G(q)})}function Vm(a){return a&&a.type==wc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)} function bn(a,b,c,d){var e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(e=c.Wb())return l.return(e);f=null;if(b.aa){var m=b.aa,n=m.h;c instanceof pj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.nh=d),f=m.Zd):f=null}f||(f=Rm(c,b.stream,d||null,a.i.retryParameters,a.g.pc));g=0;b.sa&&(g=b.sa.h);b.Gb=f;return F(l,f.promise,2);case 2:h=l.h;b.Gb=null;k=h.data;if(!c.aesKey){l.u(3);break}return F(l,sm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})} function Rm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof rj?a:void 0,h=g?1:0;a=tm(a.O(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(Sg,a,{type:h,stream:b,segment:g,isPreload:f})} function Om(a,b,c,d){var e,f;return Q(function(g){if(1==g.g)return b.Hc=!1,b.Nf=!1,b.Me=0,b.Jc=!0,b.Ia=null,b.sa=null,b.aa&&!a.m.has(b.stream)&&km(b.aa),d?(e=a.g.Pc(),f=a.g.Z.getDuration(),F(g,a.g.Z.remove(b.type,e+d,f),3)):F(g,Sk(a.g.Z,b.type),4);if(3!=g.g)return Vg(a.l),c?F(g,a.g.Z.flush(b.type),3):g.u(3);Vg(a.l);b.Jc=!1;b.endOfStream=!1;b.Pa||b.zb||Em(a,b,0);G(g)})} function Em(a,b,c){var d=b.type;if(d!=wc||a.h.has(d))b.zb=(new $e(function(){var e;return Q(function(f){if(1==f.g)return wa(f,2),F(f,Sm(a,b),4);if(2!=f.g)return za(f,0);e=Aa(f);if(a.g)a.g.onError(e);G(f)})})).ha(c)}function wm(a){null!=a.zb&&(a.zb.stop(),a.zb=null)}function xm(a){return Q(function(b){return a.Gb?F(b,a.Gb.abort(),0):b.u(0)})} function Tm(a,b,c){var d;return Q(function(e){if(1==e.g)return 3024==c.code?(b.Pa=!1,wm(b),Em(a,b,0),e.return()):F(e,tg(a.S),2);Vg(a.l);if(1===c.category&&1003!=c.code){if(b.Ec)return Gm(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);G(e)})} function gn(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.Mb||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 ln(a,b){return a&&b} function mn(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=Ub(mc(c)))}};nn.muxFairPlayRequest=function(a,b){rn(a,b)}; nn.expressplayFairPlayRequest=function(a,b){if(2===a){var c=b.drmInfo;c&&og(c.keySystem)&&rn(a,b)}};nn.conaxFairPlayRequest=function(a,b){rn(a,b)};nn.ezdrmFairPlayRequest=function(a,b){rn(a,b)};nn.verimatrixFairPlayRequest=function(a,b){2===a&&(a=b.drmInfo)&&og(a.keySystem)&&(a=Tb(b.body),a=lc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=ec("spc="+a))};nn.muxInitDataTransform=function(a,b,c){return qn(a,b,c)}; nn.expressplayInitDataTransform=function(a,b,c){return qn(a,b,c)};nn.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Xb(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 wn(a,b){if("AUTO"==b){var c=a.some(function(d){return d.video&&d.video.hdr&&"HLG"==d.video.hdr?!0:!1});b=Cn(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})} function vn(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function An(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Bn(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Dn(){} function En(){var a=Infinity,b=rb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:sg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&"skd"==k&&(k=l.serverCertificate,l=on(h),h=pn(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;Gc()&&b.$c()&&(d="smooth",e=!0);e={retryParameters:sg(),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:Fn,manifestPreprocessorTXml:Gn,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.Zc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Fn,manifestPreprocessorTXml:Gn,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 ln([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:sg(),failureCallback:function(h){return ln([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 ln([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k){return ln([h,k])},dispatchAllEmsgBoxes:!1, useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new fg},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(sn,[null].concat(x(Oa.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(Hn(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.Sa(g)} function In(){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 Jn(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 jn(a,b,c||En(),d,"")} function Hn(a,b,c){var d=c;"AUTO"==d&&(c=a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1}),d=Cn(c));var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=pf(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return hf(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!=wc&&"image"!=c.type||b.push(c);return b}function Fn(a){return ln([a],a)}function Gn(a){return ln([a],a)}T("shaka.util.PlayerConfiguration",Dn);Dn.mergeConfigObjects=Jn;Dn.createDefaultForLL=In;Dn.createDefault=En;function Kn(){this.g=null;this.h=[]}function Ln(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 Mn(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 Nn(){this.i=this.h=null;this.g=[]}function On(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 Pn(){this.B=this.W=NaN;this.l="";this.j=this.di=this.s=this.A=this.K=this.C=this.o=this.m=this.I=this.F=this.i=this.S=this.U=this.M=this.N=this.P=NaN;this.L=0;this.G=this.H=NaN;this.g=new Kn;this.h=new Nn}function Qn(a,b,c){a.P=b;a.N=c}function Rn(a,b,c){a.W=b;a.B=c}function Sn(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function Tn(a,b){a.j=isNaN(a.j)?b:a.j+b} function Un(a){var b=a.W,c=a.B,d=a.l,e=a.A,f=a.N,g=a.P,h=a.M,k=a.U,l=a.S,m=a.s,n=a.i,q=a.F,r=a.I,u=a.m,w=Ln(a.g,"playing"),v=Ln(a.g,"paused"),y=Ln(a.g,"buffering"),z=a.o,A=a.C,C=a.K,E=a.di,H=a.j,B=a.L,D=a.H,I=a.G,K=Mn(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:C,manifestSizeBytes:E,bytesDownloaded:H,nonFatalErrorCount:B,manifestPeriodCount:D,manifestGapCount:I,stateHistory:K,switchHistory:J}};function Vn(a,b,c,d){Eg.call(this);this.N=a;this.W=b;this.Oa=d.networkingEngine;this.m=c;this.A=null;this.Ka=0;this.ab=d.ed;this.F=d.kk;this.eb=d.lk;this.g=d.config;this.l=this.G=this.h=null;this.wa=!1;this.H=d.Ak;this.ya=!1;this.i=null;this.oa=!1;this.j=this.C=null;this.ia=!1;this.M=new Map;this.Ba=!1;this.Ta=d.zk;this.$=new Pn;this.va=new ug;this.s=new ug;this.P=null;this.o=!1;this.ka=d.cj;this.U=this.K=null;this.Za=d.bj;this.S=!1;this.L=[];this.I=[];this.B=!0}pa(Vn,Eg); function Wn(a,b,c){(a=b?a.I:a.L)?a.push(c):c()}function Xn(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 Yn(a,b){a.P=b;a.S=!0;if(a.L){b=t(a.L);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.L=null}p=Vn.prototype;p.getStartTime=function(){return this.m};p.kd=function(){return this.N};p.Ag=function(){return this.h};function Zn(a){a.ia=!0;return a.j}function $n(a){a.ya=!0;return a.H}p.getStats=function(){return this.$}; function ao(a){a.oa=!0;return a.i}p.Kj=function(){return this.K?Of(this.K):null};p.Jj=function(){return this.U?Pf(this.U):null};function bo(a){a.Ba=!0;return a.M} 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 wa(c,3),F(c,co(a),5);case 5:eo(a);if("webkit"===window.shakaMediaKeysPolyfill){c.u(6);break}return F(c,to(a),7);case 7:eo(a);case 6:return F(c,uo(a),8);case 8:eo(a);if(!a.ka||!a.i){c.u(9);break}return F(c,$h(a.i),10);case 10:eo(a);case 9:a.s.resolve();za(c,0);break;case 3:b=Aa(c),b instanceof U&&(7001==b.code||7003==b.code)||a.s.reject(b),G(c)}})})()}; p.dispatchEvent=function(a){return this.P?this.P.dispatchEvent(a):Eg.prototype.dispatchEvent.call(this,a)};p.onError=function(a){2===a.severity&&(this.s.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new V("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function eo(a){if(a.o)throw new U(2,7,7003);}function vo(a,b){a.dispatchEvent(new V("onstatechange",(new Map).set("state",b)))} function co(a){var b,c,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:vo(a,"manifest-parser");a.l||(a.G=yi(a.N,a.W),a.l=a.G(),a.l.configure(a.g.manifest,function(){return a.B}));b=Date.now()/1E3;vo(a,"manifest");if(a.h){m.u(2);break}return F(m,a.l.start(a.N,a.eb),3);case 3:a.h=m.h;if(1!=a.h.variants.length){m.u(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?Co:zo;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.dd==e&&h.cd==f&&h.Rc(d,b)}}};function Ao(a,b,c,d){b=new V(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Bo=1,zo=2,Co=3;function Do(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:var n=(new Bb(a)).mb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Eo.get(d))return m.return(e);f=0;g=Mg([a],c);wa(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];za(m,3);break;case 2:k=Aa(m);if(!k||1002!=k.code&&1001!=k.code){m.u(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 Eo=(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 Fo={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"},Go=t(Object.keys(Fo)),Ho=Go.next();!Ho.done;Ho=Go.next()){var Io=Ho.value;Fo[Io.toLowerCase()]=Fo[Io]};function Jo(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Jo(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=oe,e=a.fontStyle==pe,f=a.textDecoration.includes(qe);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Ko(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Ko(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 Ko(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 Oo(a,b){var c=Lo(b),d=[];b=a.cues?Array.from(a.cues):[];c=t(c);for(var e=c.next(),f={};!e.done;f={md:void 0},e=c.next())f.md=e.value,!b.some(function(g){return function(h){return h.startTime==g.md.startTime&&h.endTime==g.md.endTime&&h.text==g.md.payload?!0:!1}}(f))&&f.md.payload&&(e=No(f.md))&&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 Po(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)&&Oo(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.B(),this.i=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.s}; p.setTextVisibility=function(a){this.s=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.za(this.i,"unloading",this.B),this.l.D(this.i,"textchanged",this.m),this.l.D(this.j.textTracks,"change",this.A),this.m())}; function Ro(a){var b=rb();return a.forced&&"WEBKIT"===b.Da()?"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"}T("shaka.text.NativeTextDisplayer",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(a,b){wb("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=So.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;Po(this.g,function(c){return c.startTimea});return!0}; p.append=function(a){this.g&&Oo(this.g,a)};p.destroy=function(){this.g&&(Po(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&&To(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){To(this)};function To(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")} T("shaka.text.SimpleTextDisplayer",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 Uo(){}p=Uo.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(){};T("shaka.text.StubTextDisplayer",Uo);Uo.prototype.enableTextDisplayer=Uo.prototype.enableTextDisplayer;Uo.prototype.setTextLanguage=Uo.prototype.setTextLanguage;Uo.prototype.setTextVisibility=Uo.prototype.setTextVisibility; Uo.prototype.isTextVisible=Uo.prototype.isTextVisible;Uo.prototype.destroy=Uo.prototype.destroy;Uo.prototype.append=Uo.prototype.append;Uo.prototype.remove=Uo.prototype.remove;Uo.prototype.configure=Uo.prototype.configure;function Vo(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.o=b;this.B=this.s=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.A=new af(function(){c.j.paused||Wo(c)});Xo(this);this.l=new Map;this.i=new jb;this.i.D(document,"fullscreenchange",function(){Wo(c,!0)});this.i.D(this.j,"seeking", function(){Wo(c,!0)});this.i.D(this.j,"ratechange",function(){Xo(c)});this.i.D(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.s=e/d:c.s=null});this.C=null;"ResizeObserver"in window&&(this.C=new ResizeObserver(function(){Wo(c,!0)}),this.C.observe(this.g));this.F=new Map}p=Vo.prototype;p.configure=function(a){this.B=a;Xo(this);Wo(this,!0)}; p.append=function(a){var b=[].concat(x(this.h));a=t(Mo(a));for(var c=a.next(),d={};!c.done;d={eg:void 0},c=a.next())d.eg=c.value,b.some(function(e){return function(f){return ce(f,e.eg)}}(d))||this.h.push(d.eg);this.h.length&&Xo(this);Wo(this)}; p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.o.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.A&&(this.A.stop(),this.A=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.C&&(this.C.disconnect(),this.C=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});Wo(this,c>this.h.length);this.h.length||Xo(this);return!0}; p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.o.appendChild(this.g),Wo(this,!0)):this.g.parentElement&&this.o.removeChild(this.g)};p.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function Xo(a){a.A&&(a.h.length?a.A.Ga((a.B?a.B.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.A.stop())} function Yo(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1} function Zo(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.Zi:null;l&&(g.push(l.fg),l.Wc&&g.push(l.Wc),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?Yo(a,n)||(f=!0):($o(a,k,e),l=a.l.get(k),n=l.Zi,f=!0));0a.s&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Wd?(f.width="100%",c.lineAlign==Yd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Yd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Yd?f.right=d+"%":"end"==c.lineAlign&&(f.left= 100-d+"%"))));f.lineHeight=c.lineHeight;a=bp(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Wd?(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==Wd?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Wd?(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==Wd?f.width=c.size+"%":f.height=c.size+"%")} function cp(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 dp(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}T("shaka.text.UITextDisplayer",Vo);Vo.prototype.enableTextDisplayer=Vo.prototype.enableTextDisplayer; Vo.prototype.setTextLanguage=Vo.prototype.setTextLanguage;Vo.prototype.setTextVisibility=Vo.prototype.setTextVisibility;Vo.prototype.isTextVisible=Vo.prototype.isTextVisible;Vo.prototype.remove=Vo.prototype.remove;Vo.prototype.destroy=Vo.prototype.destroy;Vo.prototype.append=Vo.prototype.append;Vo.prototype.configure=Vo.prototype.configure;function ep(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=Lo(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 Ud: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}T("shaka.text.WebVttGenerator",function(){});function fp(a,b){this.h=a;this.g=b;this.i=void 0;this.s=!1;this.F=!0;this.l=this.B=!1;this.o=this.m=void 0;this.A=0;this.G=!1;this.C=new jb;this.j=null}fp.prototype.setMediaElement=function(a){this.j=a;gp(this)};fp.prototype.configure=function(a){this.g=a};function hp(a){a.s=!1;a.F=!0;a.B=!1;a.l=!1;a.m=0;a.o=0;a.A=0;a.G=!1;a.j=null;a.C.Qa()}function ip(a,b){a.l=b;a.l?a.i==jp?a.i=kp:a.i==lp&&(a.i=mp):a.i==kp?a.i=jp:a.i==mp&&(a.i=lp)} function np(a,b){if(a.g&&a.g.enabled&&a.g.version==op&&a.j&&a.j.autoplay){var c=a.j.play();c&&c.then(function(){a.A=b}).catch(function(){a.A=0})}} function pp(a,b,c){try{if(!a.g.enabled)return b;var d=qp(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=rp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=sp;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=tp;break a}e=void 0}d.ot=e;d.su= !0;var f=up(d);return vp(b,f)}catch(g){return cb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function gp(a){a.C.za(a.j,"play",function(){a.m||(a.m=Date.now())});a.C.za(a.j,"playing",function(){a.o||(a.o=Date.now())})}function qp(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 wp(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled)if(a=xp(a,c),d)d=yp(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var e=up(a);e&&(b.uris=b.uris.map(function(f){return vp(f,e)}))}}function zp(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 Ap(a){if(0===a.type)return Bp;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?sp:Cp;if("audio"==b)return rp;if("text"==b)return"application/mp4"===a.mimeType?Dp:Ep}}function Fp(a,b){b=a.h.Lb()[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 Gp(a,b){b=a.h.Lb()[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 Hp(a,b){var c=a.h.Ob();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 Cp:return a.videoBandwidth||NaN;case rp:return a.audioBandwidth||NaN;default:return a.bandwidth}} function xp(a,b){b=void 0===b?{}:b;Object.assign(b,qp(a));b.pr=a.h.sb();var c=b.ot===Cp||b.ot===sp;a.B&&c&&(b.bs=!0,b.su=!0,a.B=!1);null==b.su&&(b.su=a.F);b.v===op&&(a.h.V()&&(b.ltc=a.h.Se()),c=!a.G&&a.o&&a.m?a.o-(a.A||a.m):void 0,void 0!=c&&(b.msd=c,a.G=!0));return zp(a,b)} function up(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 yp(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 Np(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}T("shaka.util.CmsdManager",Ip);Ip.prototype.getBandwidthEstimate=Ip.prototype.getBandwidthEstimate;Ip.prototype.getRoundTripTime=Ip.prototype.Nj;Ip.prototype.getResponseDelay=Ip.prototype.Mj;Ip.prototype.getEstimatedThroughput=Ip.prototype.Th; Ip.prototype.getMaxBitrate=Ip.prototype.Vh;var Kp="etp",Jp="mb",Lp="rd",Mp="rtt";function Op(){this.g=null;this.h=[]}function Pp(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.u(2);a.g=b;G(c)})}Op.prototype.release=function(){0C.end&&(C.end=E.end)}return C};d.wa=new Zl(q);d.wa.addEventListener("regionadd", function(A){lq(d,A.region,"metadataadded")});if(m)return F(z,k(function(){return Q(function(A){return F(A,mq(d,c),0)})},"initializeSrcEqualsDrmInner_"),23);d.Za=new Zl(q);return F(z,k(function(){return Q(function(A){if(1==A.g)return F(A,Promise.race([e.va,e.s]),2);d.qc=e.G;var C=e;C.wa=!0;d.G=C.l;d.i=e.Ag();G(A)})},"waitForFinish"),15);case 15:if(d.I){z.u(16);break}return F(z,k(function(){return Q(function(A){return F(A,hq(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&& (d.o.enableTextDisplayer?d.o.enableTextDisplayer():wb("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),F(z,k(function(){return Q(function(A){return F(A,e.s,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.re=e.F;d.G&&d.G.setMediaElement&&d.h&&d.G.setMediaElement(d.h);d.ke=$n(e);d.je=e.Ta;if(r=e.A)d.M=r;l&&d.h&&"AUDIO"===d.h.nodeName&&(nq(d),d.configure("manifest.disableVideo",!0));if(e.i){z.u(19);break}return F(z,k(function(){return Q(function(A){return F(A, to(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.C=ao(e),F(z,k(function(){return Q(function(A){return F(A,d.C.dc(d.h),0)})},"drmEngine_.attach"),21);case 21:return!(u=e.C)||d.Ta&&d.Ta==u||(d.s=Zn(e),d.Ta=e.C,"function"!=typeof d.s.setMediaElement&&(wb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(wb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."), d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(wb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=function(){})),w=bo(e),v=e.K,F(z,k(function(){return Q(function(A){return F(A,oq(d,n,v,w),0)})},"loadInner_"),22);case 22:Xn(e);d.nc&&rb().Ui()&&Pe(d.nc)&&wk(d.I,d.W,d.nc);z.u(14);break;case 23:return F(z,k(function(){return Q(function(A){return F(A,pq(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent($p("loaded")); case 6:Ba(z);if(!e){z.u(25);break}return F(z,e.destroy(),25);case 25:d.Oa=null;Da(z,0);break;case 5:y=Aa(z);if(!y||7E3==y.code){z.u(27);break}return F(z,d.vc(!1),27);case 27:throw y;}})};function nq(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.Wk=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,qq(c),2):3!=e.g?(d=e.h,F(e,c.vc(a,b),3)):e.return(d)})};p.Nh=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,qq(c,b),2):3!=e.g?(d=e.h,F(e,c.detach(a),3)):e.return(d)})}; function qq(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.qc&&a.W&&a.g))return e.u(2);d=a.h.currentTime;a.V()&&!b&&(d=null);return F(e,rq(a,a.W,d,a.nc,a.g,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.we.push(c);a.G&&a.G.setMediaElement&&a.G.setMediaElement(null);var f=c,g=a.G,h=a.qc;f.h=a.i;f.l=g;f.G=h;f=c;g=a.Ta;f.j=a.s;f.C=g;c.A=a.M;c.start();a.i=null;a.G=null;a.qc=null;a.s=null;a.Ta=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=Rp(e),Jn(f,d||e.g,Rp(e)),F(h,kq(e,a,b,c,!1,f),2);(g=h.h)?g.start():gq(e,new U(2,7,7005));return h.return(g)})};p.ig=function(){var a=this,b,c,d,e;return Q(function(f){b=[];c=t(a.we);for(d=c.next();!d.done;d=c.next())e=d.value,e.o||b.push(e.destroy());a.we=[];return F(f,Promise.all(b),0)})}; function kq(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.u(2):F(n,jq(a,b),3);2!=n.g&&(d=n.h);if(g=sq(a,d))return n.return(null);h=f||a.g;k=!1;l=!0;e&&(a.s&&a.Ta==h.abrFactory&&(l=!1),a.h&&"AUDIO"===a.h.nodeName&&(k=!0));m=rq(a,b,c,d||null,h,!e,k,l);m=e?m.then(function(q){q.B=!1;return q}):m.then(function(q){a.we.push(q);return q});return n.return(m)})} function rq(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,C,E,H;return Q(function(B){if(1==B.g){k=null;l=fd(e);g&&(l.manifest.disableVideo=!0);m=function(){return k.S&&k.o?null:k};n=function(){return m()?m().getConfiguration():a.g};if(Infinity!=a.va.width||Infinity!=a.va.height||a.g.ignoreHardwareResolution)return B.u(2);q=rb();return F(B,q.fc(),3)}2!=B.g&&(r=B.h,a.va.width=r.width,a.va.height=r.height);u=new li(l,a.va,null);w={networkingEngine:a.H, filter:function(D){var I,K;return Q(function(J){if(1==J.g)return F(J,mi(u,D),2);if(4!=J.g){I=J.h;if(!I)return J.u(0);K=$p("trackschanged");return F(J,Promise.resolve(),4)}k.dispatchEvent(K);G(J)})},makeTextStreamsForClosedCaptions:function(D){return tq(a,D)},onTimelineRegionAdded:function(D){$l(k.H,D)},onEvent:function(D){return k.dispatchEvent(D)},onError:function(D){return k.onError(D)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},updateDuration:function(){a.l&&k.S&&a.l.updateDuration()}, newDrmInfo:function(D){var I=k.i,K=I?I.g:null;K&&I.A&&pi(u,K.keySystem,D)},onManifestUpdated:function(){var D=(new Map).set("isLive",a.V());k.dispatchEvent($p("manifestupdated",D));Wn(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},onMetadata:function(D,I,K,J){var L=D;if("com.apple.hls.interstitial"==D&&(L="com.apple.quicktime.HLS",D={startTime:I,endTime:K,values:J},a.B))a.B.onHLSInterstitialMetadata(a,a.h,D);J=t(J);D=J.next(); for(var N={};!D.done;N={Sg:void 0},D=J.next())N.Sg=D.value,"ID"!=N.Sg.name&&Wn(k,!1,function(O){return function(){uq(a,I,K,L,O.Sg)}}(N))},disableStream:function(D){return a.disableStream(D,a.g.streaming.maxDisabledTime)},addFont:function(D,I){return a.addFont(D,I)}};v=new Zl(function(){return a.Ra()});v.addEventListener("regionadd",function(D){var I=D.region;vq(a,"timelineregionadded",I,k);Wn(k,!1,function(){a.B&&(a.B.onDashTimedMetadata(I),a.B.onDASHInterstitialMetadata(a,a.h,I))})});y=null;l.streaming.observeQualityChanges&& (y=new Tl(function(){return a.Lb()}),y.addEventListener("qualitychange",function(D){wq(a,D.quality,D.position)}),y.addEventListener("audiotrackchange",function(D){wq(a,D.quality,D.position,!0)}));z=!0;A={pc:a.H,onError:function(D){return k.onError(D)},nf:function(D){Wn(k,!0,function(){if(a.C)a:{var I=D,K=$p("keystatuschanged");a.dispatchEvent(K);var J=Object.keys(I);1==J.length&&""==J[0]&&(J=["00"],I={"00":I[""]});K=1==J.length&&"00"==J[0];var L=!1;if(J.length){J=a.keySystem();for(var N=Yg(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 S=R.value;R=M.allowedByKeySystem;if(S.keyIds.size)if(S.drmInfos.length&&!N.size){S=t(S.drmInfos);for(var aa=S.next();!aa.done;aa=S.next())if(aa=aa.value,aa.keyIds.size&&aa.keySystem==J){M.allowedByKeySystem=!0;aa=t(aa.keyIds);for(var W=aa.next();!W.done;W=aa.next())if(W=W.value,(W=I[K?"00":W])||a.C.F)M.allowedByKeySystem=M.allowedByKeySystem&& !!W&&!ri.includes(W)}}else for(M.allowedByKeySystem=!0,S=t(S.keyIds),aa=S.next();!aa.done;aa=S.next())if(aa=aa.value,(aa=I[K?"00":aa])||a.C.F)M.allowedByKeySystem=M.allowedByKeySystem&&!!aa&&!ri.includes(aa);R!=M.allowedByKeySystem&&(L=!0)}}}if(L&&(xq(a),!yq(a)))break a;(I=a.l.o)&&!I.allowedByKeySystem&&Xp(a)}})},onExpirationUpdated:function(D,I){var K=$p("expirationupdated");k.dispatchEvent(K);if((K=k.l)&&K.onExpirationUpdated)K.onExpirationUpdated(D,I)},onEvent:function(D){k.dispatchEvent(D);"drmsessionupdate"== D.type&&z&&(z=!1,D=Date.now()/1E3-k.Ka,(a.A||k.getStats()).m=D,a.S&&Cc(a.S))}};C=Tp(a,m);Lg(a.H,C);E=function(){return a.ed(A)};H={config:l,lk:w,Ak:v,zk:y,ed:E,kk:u,networkingEngine:C,cj:f,bj:h};k=new Vn(b,d,c,H);return B.return(k)})}function jq(a,b){var c,d,e;return Q(function(f){if(1==f.g)return c=a.g.manifest.retryParameters,F(f,Do(b,a.H,c),2);d=f.h;"application/x-mpegurl"==d&&(e=rb(),"WEBKIT"===e.Da()&&(d="application/vnd.apple.mpegurl"));return f.return(d)})} function sq(a,b){if(!wi(rb()))return!0;if(b){if(""==(a.h||xi()).canPlayType(b))return!1;if(!wi(rb())||!ui.has(b))return!0;if(Pe(b))return"WEBKIT"===rb().Da()&&(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 zq(a){var b=a.g.textDisplayFactory;if(a.Ch!==b){var c=a.o;a.o=b();a.o.configure?a.o.configure(a.g.textDisplayer):wb("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.o.setTextLanguage||wb("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!');c?(a.o.setTextVisibility(c.isTextVisible()),c.destroy().catch(function(){})):a.o.setTextVisibility(a.$);a.I&&bl(a.I,a.o);a.Ch=b;a.l&&Km(a.l)}else a.o&&a.o.configure&&a.o.configure(a.g.textDisplayer)} function hq(a){var b,c,d;return Q(function(e){if(1==e.g)return rb(),dq(a,"media-source"),a.g.mediaSource.useSourceElements&&Dj(a.h),zq(a),b=Aq(a.h,a.o,{Cj: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())uq(a,l,m,"org.id3",q.value);if(a.B)a.B.onHlsTimedMetadata(k,l)}},tk:function(f){a.Za&&$l(a.Za, {schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},wk:function(){a.G&&a.G.update&&a.G.update()}},a.S,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Ka=d,F(e,b.K,2);a.I=b;G(e)})} function Bq(a,b,c){function d(){return Cq(a)}a.j.D(b,"playing",d);a.j.D(b,"pause",d);a.j.D(b,"ended",d);a.j.D(b,"ratechange",function(){var f=a.h.playbackRate;0!=f&&(a.K&&(a.K.set(f),a.m==Dq&&a.s.playbackRateChanged(f),Eq(a,f)),f=$p("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.D(b.remote,"connect",function(){a.l&&"connected"==b.remote.state&&Fq(a);xq(a)}),a.j.D(b.remote,"connecting",function(){return xq(a)}),a.j.D(b.remote,"disconnect",function(){return Q(function(f){if(1==f.g)return a.l&&"disconnected"== b.remote.state?F(f,gn(a.l),3):f.u(2);2!=f.g&&Fq(a);xq(a);G(f)})}));b.audioTracks&&(a.j.D(b.audioTracks,"addtrack",function(){return xq(a)}),a.j.D(b.audioTracks,"removetrack",function(){return xq(a)}),a.j.D(b.audioTracks,"change",function(){return xq(a)}));b.videoTracks&&(a.j.D(b.videoTracks,"addtrack",function(){return xq(a)}),a.j.D(b.videoTracks,"removetrack",function(){return xq(a)}),a.j.D(b.videoTracks,"change",function(){return xq(a)}));if(b.textTracks){var e=function(){a.m===Gq&&a.o instanceof Qo&&Fq(a);xq(a)};a.j.D(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Hq(a,f);break;case "chapters":Iq(a,f);break;default:e()}});a.j.D(b.textTracks,"removetrack",e);a.j.D(b.textTracks,"change",e);"keep"!==a.g.streaming.crossBoundaryStrategy&&(a.j.D(b,"waiting",function(){a.l&&Pm(a.l)}),a.j.D(b,"timeupdate",function(){a.l&&Pm(a.l)}))}"none"!=b.preload&&a.j.za(b,"loadedmetadata",function(){a.A.F=Date.now()/1E3-c})} function oq(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M;return Q(function(P){switch(P.g){case 1:dq(a,"load");e=a.h;a.K=new Pl({Te:function(){return e.playbackRate},Oc:function(){return e.defaultPlaybackRate},ih:function(R){e.playbackRate=R},li:function(R){e.currentTime+=R}});Bq(a,e,b);"onchange"in window.screen&&a.j.D(window.screen,"change",function(){if(a.M.getConfiguration){var R=a.M.getConfiguration();"AUTO"==R.Dc?yq(a):"AUTO"==a.g.preferredVideoHdrLevel&&a.g.abr.enabled&& (R.Dc="AUTO",a.M.configure(R),yq(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=Dc(l));Zp(a,a.g,f);a.ud=a.g.preferredTextLanguage;a.qe=a.g.preferredTextRole;a.pe=a.g.preferForcedSubs;Jq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.s.init(function(R,S,aa){a.i&&a.l&&R!=a.l.o&&Kq(a,R,!0,void 0===S?!1:S,void 0===aa?0:aa)});a.s.setMediaElement(e);a.s.setCmsdManager(a.oa);a.l=Lq(a);a.l.configure(a.g.streaming);a.m=Dq; a.dispatchEvent($p("streaming"));m=c;case 2:(q=a.l.o)||m||(m=yq(a)?a.s.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(!(0D&&(C=D);return F(P,Pq(m,C),9);case 9:I=P.h,y(I);case 8:Kq(a,m,!0,!1,0);case 7:return a.F.ready(),K=a.Cc().find(function(R){return R.active}), K||((J=bg(a.i.textStreams,a.ud,a.qe,a.pe)[0]||null)&&On(a.A.h,J,!0),m&&(J?(eg(m.audio,J,a.g)&&(a.$=!0),a.$&&a.o.setTextVisibility(!0)):(a.$=!1,a.o.setTextVisibility(!1)),Qq(a)),J&&(a.g.streaming.alwaysStreamText||a.Ig())&&(Jm(a.l,J),Rq(a))),F(P,a.l.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),Sq(a));xq(a);yq(a);a.i.variants.some(function(R){return R.primary});if((L=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)N= function(){return Tq(a)},a.j.D(e,"timeupdate",N);L||(O=function(){return Uq(a)},a.j.D(e,"timeupdate",O),Uq(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.za(d,"error",function(){l.reject(fq(a))}),F(w,ef(a.g.streaming.loadTimeout,l),4);case 4:if((n=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return Tq(a)},a.j.D(d,"timeupdate",q);n||(r=function(){return Uq(a)},a.j.D(d,"timeupdate",r),Uq(a));a.B&&(a.B.onManifestUpdated(n),n&&(u=a.Ra().end,a.j.D(d,"progress",function(){var v=a.Ra().end;u!=v&&(a.B.onManifestUpdated(a.V()),u=v)}))); a.Ka=!0;G(w)}})}function Yq(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Fi(b,a.g.preferredVariantRole)}function $q(a){var b=a.g.preferredTextLanguage;""!=b&&a.dh(b,a.g.preferredTextRole,a.g.preferForcedSubs)} function Hq(a,b){if("metadata"==b.kind){b.mode="hidden";a.j.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,uq(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={xc:void 0},f=e.next())g.xc=f.value,"com.apple.quicktime.HLS"==g.xc.type&&null!=g.xc.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.xc.startTime&&k.endTime==h.xc.endTime}}(g)), f||(f={startTime:g.xc.startTime,endTime:g.xc.endTime,values:[]},d.push(f)),f.values.push(g.xc.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.B&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.V()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.B.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new af(function(){var d=ar(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Hb().ha(.5); a.oe.push(function(){c.stop()})}}function lq(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent($p(c,b))}function uq(a,b,c,d,e){a.wa&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),$l(a.wa,b))}function Iq(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new af(function(){b.mode="hidden"})).Hb().ha(.5);a.oe.push(function(){c.stop()})}} p.Ek=function(){for(var a=this.ia;a.g;)a.release()};p.ed=function(a){return new ph(a)}; function Tp(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?Wn(b(),!0,f):f()}b||(b=function(){return null});var e=new Hg(function(f,g,h,k,l){var m=b()?b().j:a.s;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($p("downloadheadersreceived",g));d(function(){if(a.oa){var k=a.oa;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&&!Wc(q.O(),A.O())){var C=A.O()[0],E=new URL(C),H=new URL(n);if(E.origin!==H.origin)var B=C;else{for(var D=E.pathname.split("/").slice(1),I=H.pathname.split("/").slice(1,-1);D[0]===I[0];)D.shift(),I.shift();for(;I.length;)I.shift(),D.unshift("..");B=D.join("/")}r.nor=B}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.sb()||1,L=Gp(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!==Dp&&(r.tb=Hp(k,r.ot)/1E3);wp(k,g,r)}}catch(M){cb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:wp(k,g,{ot:"k"});break;case 4:wp(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.A;h&&(Tn(h,g),0===f&&(h.di=g))}});e.configure(a.g.networking);return e}function Mq(a,b){return new El(a.h,a.i,a.g.streaming,b,function(){a.eb&&Sl(a.eb,!0);a.l&&a.l.Xc();a.P&&br(a)},function(c){return a.dispatchEvent(c)})} function Nq(a,b){var c=a.V()||"number"===typeof b&&0=e&&0=b)return 1;if(!(a<=this.h.currentTime)&&al(r,m))&&(q=r);q!=m&&(q?(m=Of(q),k.Bf(m,!0,d||0)):Xp(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.ua()))return;(function(){if(k.h&&k.h.audioTracks){var l= bg(k.Ob(),a,b||"",!1)[0];l&&k.Bf(l)}})()};p.dh=function(a,b,c){function d(){e.ud=a;e.qe=b||"";e.pe=c||!1;var f=bg(e.i.textStreams,e.ud,e.qe,e.pe)[0]||null;f&&f!=e.l.A&&(On(e.A.h,f,!1),e.g.streaming.alwaysStreamText||e.Ig())&&(Jm(e.l,f),Fq(e),Rq(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.F&&(d(),!this.ua()))return;(function(){var f=bg(e.Cc(),a,b||"",c||!1)[0];f&&e.eh(f)})()}; p.Nk=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.M=e.g.adaptationSetCriteriaFactory(),e.M.configure({language:f.language,role:"",channelCount:0,Dc:"",spatialAudio:!1,videoLayout:"",Bd:"",Ic:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Dd:"",De:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),Xp(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.ua()))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&&ir(e,g)}})()};p.Ig=function(){var a=this.$;return this.o?this.o.isTextVisible():a};p.uj=function(){return this.ab.map(function(a){return Pf(a)})}; p.sj=function(a){wb("getChapters","Please use an getChaptersAsync.");if(!this.ab.length)return[];var b=hf(a);a=this.ab.filter(function(f){return hf(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.Db(function(f){var g=f.O()[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.tj=function(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b.ab.length)return l.return([]);c=hf(a);d=b.ab.filter(function(m){return hf(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.u(4);break}k=h.value;if(k.segmentIndex){l.u(5);break}return F(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Db(function(m){var n=m.O()[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.u(2);break;case 4:return l.return(e)}})};function Wq(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Xq(a){return Array.from(a.h.textTracks).find(function(b){return"Shaka Player TextTrack"==b.label})}function ar(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})} p.jh=function(a){a=!!a;this.$!=a&&(this.$=a,this.m==Dq?(this.o.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.A||(a=bg(this.i.textStreams,this.ud,this.qe,this.pe),0=Math.floor(d.end)&&a.Fd():Math.floor(c)<=Math.floor(d.start+f)&&a.Fd()})} function Cq(a){if(a.A&&a.P){var b=a.A.g,c="playing";a.P.g==ki?c="buffering":a.Ud()?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($p("statechanged",c)))}} function Tq(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Sh();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.ie(d,!1):1==e&&b!==a.K.Oc()&&a.Fd()}if(c&&(c=a.Ra(),Number.isFinite(c.end)&&!(a.h.currentTime1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency, a.U=Math.max(a.U-(g-f)/2,f+d),a.Xb=Date.now());e&&null!==a.U&&(h=a.U+d,k=a.U-d);g=c.end-a.h.currentTime;d=0;a.m==Gq&&(e=a.h.buffered,0h?(b!=l&&a.ie(l,!1),a.Xb=null):void 0!=k&&m&&g-de)&&a.Rfb&&(b+=Math.pow(2,32)),b=b.toString(16);return new U(2,3,3016,c,b,a.h.error.message)}function Jq(a,b,c){0=this.Ra().end};T("shaka.Player",Y);Y.prototype.isEnded=Y.prototype.Ud;Y.prototype.isRemotePlayback=Y.prototype.ua;Y.prototype.addFont=Y.prototype.addFont;Y.prototype.setVideoContainer=Y.prototype.Mi;Y.prototype.getFetchedPlaybackInfo=Y.prototype.yj;Y.prototype.getManifestParserFactory=Y.prototype.Ej; Y.prototype.getManifest=Y.prototype.Ag;Y.prototype.retryStreaming=Y.prototype.Zg;Y.prototype.setMaxHardwareResolution=Y.prototype.Tk;Y.prototype.addChaptersTrack=Y.prototype.Ee;Y.prototype.addThumbnailsTrack=Y.prototype.Fe;Y.prototype.addTextTrackAsync=Y.prototype.Ed;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getBufferedInfo=Y.prototype.Lb;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Ue;Y.prototype.getPresentationStartTimeAsDate=Y.prototype.Bg; Y.prototype.getPlayheadTimeAsDate=Y.prototype.Ij;Y.prototype.setTextTrackVisibility=Y.prototype.jh;Y.prototype.getChaptersAsync=Y.prototype.tj;Y.prototype.getChapters=Y.prototype.sj;Y.prototype.getChaptersTracks=Y.prototype.uj;Y.prototype.isTextTrackVisible=Y.prototype.Ig;Y.prototype.selectVariantsByLabel=Y.prototype.Nk;Y.prototype.selectTextLanguage=Y.prototype.dh;Y.prototype.selectAudioLanguage=Y.prototype.Fi;Y.prototype.getTextLanguages=Y.prototype.Oj;Y.prototype.getAudioLanguages=Y.prototype.pj; Y.prototype.getTextLanguagesAndRoles=Y.prototype.Pj;Y.prototype.getAudioLanguagesAndRoles=Y.prototype.qj;Y.prototype.getVideoTracks=Y.prototype.getVideoTracks;Y.prototype.selectVideoTrack=Y.prototype.Ok;Y.prototype.getAudioTracks=Y.prototype.getAudioTracks;Y.prototype.selectAudioTrack=Y.prototype.Mk;Y.prototype.selectVariantTrack=Y.prototype.Bf;Y.prototype.selectTextTrack=Y.prototype.eh;Y.prototype.getThumbnails=Y.prototype.Rj;Y.prototype.getAllThumbnails=Y.prototype.oj; Y.prototype.getImageTracks=Y.prototype.Aj;Y.prototype.getTextTracks=Y.prototype.Cc;Y.prototype.getVariantTracks=Y.prototype.Ob;Y.prototype.cancelTrickPlay=Y.prototype.Fd;Y.prototype.trickPlay=Y.prototype.ie;Y.prototype.useTrickPlayTrackIfAvailable=Y.prototype.yh;Y.prototype.getPlaybackRate=Y.prototype.sb;Y.prototype.isBuffering=Y.prototype.Hg;Y.prototype.getKeyStatuses=Y.prototype.Re;Y.prototype.getActiveSessionsMetadata=Y.prototype.zg;Y.prototype.getExpiration=Y.prototype.Nd; Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.isFullyLoaded=Y.prototype.bk;Y.prototype.goToLive=Y.prototype.Xj;Y.prototype.seekRange=Y.prototype.Ra;Y.prototype.isVideoOnly=Y.prototype.hk;Y.prototype.isAudioOnly=Y.prototype.$j;Y.prototype.isInProgress=Y.prototype.Sc;Y.prototype.isLive=Y.prototype.V;Y.prototype.getQueueManager=Y.prototype.Xh;Y.prototype.getAdManager=Y.prototype.Rh;Y.prototype.getAssetUri=Y.prototype.kd; Y.prototype.getNetworkingEngine=Y.prototype.Nb;Y.prototype.getMediaElement=Y.prototype.Hj;Y.prototype.getManifestType=Y.prototype.Uh;Y.prototype.getLoadMode=Y.prototype.Dj;Y.prototype.resetConfiguration=Y.prototype.Ai;Y.prototype.getBufferFullness=Y.prototype.Sh;Y.prototype.getNonDefaultConfiguration=Y.prototype.Wh;Y.prototype.getConfigurationForLowLatency=Y.prototype.vj;Y.prototype.getConfiguration=Y.prototype.getConfiguration;Y.prototype.configurationForLowLatency=Y.prototype.lj; Y.prototype.configure=Y.prototype.configure;Y.prototype.releaseAllMutexes=Y.prototype.Ek;Y.prototype.destroyAllPreloads=Y.prototype.ig;Y.prototype.preload=Y.prototype.preload;Y.prototype.detachAndSavePreload=Y.prototype.Nh;Y.prototype.unloadAndSavePreload=Y.prototype.Wk;Y.prototype.load=Y.prototype.load;Y.prototype.updateStartTime=Y.prototype.$k;Y.prototype.unload=Y.prototype.vc;Y.prototype.detach=Y.prototype.detach;Y.prototype.attachCanvas=Y.prototype.dj;Y.prototype.attach=Y.prototype.dc; Y.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.u(2);break}return F(k,ci(),3);case 3:b=k.h;case 2:return c=vi(),d=xk(),e=rb(),F(k,e.fc(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=cq,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})}; Y.isBrowserSupported=function(){window.Promise||bb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;rb();return wi()?!0:""!=xi().canPlayType("application/x-mpegurl")};Y.setQueueManagerFactory=function(a){Vp=a};Y.setAdManagerFactory=function(a){Up=a};Y.registerSupportPlugin=bq;Y.prototype.destroy=Y.prototype.destroy;var aq=0,Qp=1,Dq=2,Gq=3; Y.LoadMode={DESTROYED:aq,NOT_LOADED:Qp,MEDIA_SOURCE:Dq,SRC_EQUALS:Gq};Y.version="v4.15.4";var tr=["4","15"];xb=new function(a){this.g=a;this.i=yb;this.h=zb}(new vb(Number(tr[0]),Number(tr[1])));var cq=new Map,Up=null,Vp=null;function ur(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function vr(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function wr(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 jb;this.l.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=wr.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};T("shaka.ads.ClientSideAd",wr);wr.prototype.release=wr.prototype.release;wr.prototype.getPodIndex=wr.prototype.getPodIndex; wr.prototype.getTimeOffset=wr.prototype.getTimeOffset;wr.prototype.getMediaUrl=wr.prototype.getMediaUrl;wr.prototype.getAdvertiserName=wr.prototype.getAdvertiserName;wr.prototype.getCreativeAdId=wr.prototype.getCreativeAdId;wr.prototype.getAdId=wr.prototype.getAdId;wr.prototype.getVastAdId=wr.prototype.getVastAdId;wr.prototype.getVastMediaWidth=wr.prototype.getVastMediaWidth;wr.prototype.getVastMediaHeight=wr.prototype.getVastMediaHeight;wr.prototype.getVastMediaBitrate=wr.prototype.getVastMediaBitrate; wr.prototype.getDescription=wr.prototype.getDescription;wr.prototype.getTitle=wr.prototype.getTitle;wr.prototype.getPositionInSequence=wr.prototype.getPositionInSequence;wr.prototype.getSequenceLength=wr.prototype.getSequenceLength;wr.prototype.setMuted=wr.prototype.setMuted;wr.prototype.resize=wr.prototype.resize;wr.prototype.isLinear=wr.prototype.isLinear;wr.prototype.isMuted=wr.prototype.isMuted;wr.prototype.setVolume=wr.prototype.setVolume;wr.prototype.getVolume=wr.prototype.getVolume; wr.prototype.play=wr.prototype.play;wr.prototype.pause=wr.prototype.pause;wr.prototype.skip=wr.prototype.skip;wr.prototype.canSkipNow=wr.prototype.canSkipNow;wr.prototype.getTimeUntilSkippable=wr.prototype.getTimeUntilSkippable;wr.prototype.isSkippable=wr.prototype.isSkippable;wr.prototype.isPaused=wr.prototype.isPaused;wr.prototype.getRemainingTime=wr.prototype.getRemainingTime;wr.prototype.getMinSuggestedDuration=wr.prototype.getMinSuggestedDuration;wr.prototype.getDuration=wr.prototype.getDuration; wr.prototype.isUsingAnotherMediaElement=wr.prototype.isUsingAnotherMediaElement;wr.prototype.hasCustomClick=wr.prototype.hasCustomClick;wr.prototype.isClientRendering=wr.prototype.isClientRendering;wr.prototype.needsSkipUI=wr.prototype.needsSkipUI;function xr(){} function yr(a,b){var c=[];a=t(rd(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=vd(d.value,"InLine"))if(d=vd(d,"Creatives")){d=t(rd(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=vd(e,"Linear");f&&zr(c,b,f);if(e=vd(e,"NonLinearAds")){e=rd(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=vd(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=vd(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=td(l)){"text/html"===g&&(l="data:text/html;charset=UTF-8,"+ encodeURIComponent(l));var m=yd(k,"width",Ed)||yd(k,"expandedWidth",Ed),n=yd(k,"height",Ed)||yd(k,"expandedHeight",Ed);if(m||n){var q=null;(k=k.attributes.minSuggestedDuration)&&(q=dd(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 zr(a,b,c){var d=0;null!=b&&(d=b);var e=null;c.attributes.skipoffset&&(e=dd(c.attributes.skipoffset),isNaN(e)&&(e=null));if(c=vd(c,"MediaFiles")){var f=rd(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=td(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}}}}T("shaka.ads.Utils",xr);xr.ADS_LOADED="ads-loaded";xr.AD_STARTED="ad-started";xr.AD_FIRST_QUARTILE="ad-first-quartile";xr.AD_MIDPOINT="ad-midpoint";xr.AD_THIRD_QUARTILE="ad-third-quartile";xr.AD_COMPLETE="ad-complete"; xr.AD_STOPPED="ad-stopped";xr.AD_SKIPPED="ad-skipped";xr.AD_VOLUME_CHANGED="ad-volume-changed";xr.AD_MUTED="ad-muted";xr.AD_PAUSED="ad-paused";xr.AD_RESUMED="ad-resumed";xr.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";xr.CUEPOINTS_CHANGED="ad-cue-points-changed";xr.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";xr.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";xr.AD_CLICKED="ad-clicked";xr.AD_PROGRESS="ad-progress";xr.AD_BUFFERING="ad-buffering";xr.AD_IMPRESSION="ad-impression"; xr.AD_DURATION_CHANGED="ad-duration-changed";xr.AD_CLOSED="ad-closed";xr.AD_LOADED="ad-loaded";xr.ALL_ADS_COMPLETED="all-ads-completed";xr.AD_LINEAR_CHANGED="ad-linear-changed";xr.AD_METADATA="ad-metadata";xr.AD_RECOVERABLE_ERROR="ad-recoverable-error";xr.AD_ERROR="ad-error";xr.AD_BREAK_READY="ad-break-ready";xr.AD_INTERACTION="ad-interaction";xr.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";xr.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";xr.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Ar(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new jb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.15.4");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m, google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Br(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Cr(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.za(this.i,"play",function(){f.F=!0})}Ar.prototype.configure=function(a){this.o=a};Ar.prototype.stop=function(){this.g&&this.g.stop();this.s&&Ej(this.s)}; Ar.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function Cr(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new V("ad-error",b));Dr(a,null);a.l(new V("ad-cue-points-changed",(new Map).set("cuepoints",[])))} function Br(a,b){a.l(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.l(new V("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 V("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Er(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth, a.i.offsetHeight)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.za(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){Dr(a,null)}} function Er(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new V(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Cr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Fr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){Fr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE, function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Dr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Dr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")}); a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")}); a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g, google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})} function Fr(a,b){var c=b.getAd();c?(a.j=new wr(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.o.supportsMultipleMediaElements||a.l(new V("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new V("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.o.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))):bb("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")} function Dr(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new V("ad-content-resume-requested"));a.l(new V("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function Gr(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.A=c;this.o=d;this.m=e;this.s=f;this.B=b.overlay}p=Gr.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return this.s};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)&&Mr(n)&&e.F.set(n,e.j.preload(n.uri,null,n.mimeType||void 0)),Nr(e,n));v.u(4);break}if(!e.F.has(n)){v.u(7);break}return F(v,e.F.get(n),8);case 8:(u=v.h)&&u.destroy(),e.F.delete(n);case 7:Or(e,n),w=JSON.stringify(n),e.U.has(w)&&e.U.delete(w),e.H.delete(n),Pr(e),n.overlay||(g=!0);case 4:m=l.next();v.u(3);break;case 5:g&&Qr(e),G(v)}})});this.configure(this.C.getConfiguration().ads)}p=Ir.prototype;p.configure=function(a){this.M=a;Rr(this)}; function Sr(a){if(!a.ka&&a.H.size){a.I.D(a.g,"playing",a.W);a.I.D(a.g,"timeupdate",a.W);a.I.D(a.g,"seeked",a.oa);a.I.D(a.g,"ended",a.$);if("requestVideoFrameCallback"in a.g&&!Tr()){var b=a.g,c=function(){-1!=a.P&&(a.$(),-1!=a.P&&(a.P=b.requestVideoFrameCallback(c)))};a.P=b.requestVideoFrameCallback(c)}else a.S.Ga(.025);a.N&&a.N.Ga(1);a.ka=!0}} function Pr(a){a.ka&&!a.H.size&&(a.I.Ja(a.g,"playing",a.W),a.I.Ja(a.g,"timeupdate",a.W),a.I.Ja(a.g,"seeked",a.oa),a.I.Ja(a.g,"ended",a.$),-1!=a.P&&(a.g.cancelVideoFrameCallback(a.P),a.P=-1),a.S&&a.S.stop(),a.N&&a.N.stop(),a.ka=!1)} function Rr(a){if(a.B&&a.M&&!a.K){var b=a.M.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.A==b&&(a.A=!b,a.A?(a.h=a.g,a.G&&(a.G.parentElement&&a.B.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.A=!0} p.stop=function(){this.l&&this.l.Qa();this.U.clear();this.H.clear();this.j.ig();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.L.size)for(a=Array.from(this.L.keys()),a=t(a),b=a.next();!b.done;b=a.next())Or(this,b.value);this.L.clear();this.j.detach();this.K=!1;this.s=this.m=null;this.A=!0;this.h=this.g;this.G=null;Ur(this);Pr(this);this.B&&Ej(this.B);this.o&&(this.o.stop(),this.o= null)};p.release=function(){this.stop();this.I&&this.I.release();this.l&&this.l.release();this.S&&(this.S.stop(),this.S=null);this.N&&(this.N.stop(),this.N=null);this.j.destroy()};p.ld=function(){return this.j};function Vr(a,b){var c;Q(function(d){if(1==d.g)return Jr(a),F(d,Wr(a,b),2);c=d.h;c.length?Xr(a,c):bb("Unsupported HLS interstitial",b);G(d)})} function Yr(a,b){var c=vd(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f="true"==c.attributes.loop,g=yd(c,"z",Ed);if(d&&0!=g){var h=null,k=vd(c,"Background");if(k){var l=k.attributes.uri;l?h="center / contain no-repeat url('"+l+"')":h=td(k)}k=1920;l=1080;var m=vd(c,"Viewport");if(m){k=yd(m,"x",Ed);if(null==k)return;l=yd(m,"y",Ed);if(null==l)return}var n={viewport:{x:k,y:l},topLeft:{x:0,y:0},size:{x:k,y:l}},q=vd(c,"Overlay");if(m&&q){var r=vd(q,"TopLeft"),u=vd(q,"Size");if(r&& u){q=yd(r,"x",Ed);if(null==q)return;r=yd(r,"y",Ed);if(null==r)return;var w=yd(u,"x",Ed);if(null==w)return;u=yd(u,"y",Ed);if(null==u)return;n.topLeft.x=q;n.topLeft.y=r;n.size.x=w;n.size.y=u}}q=null;c=vd(c,"Squeeze");if(m&&c&&(u=vd(c,"TopLeft"),c=vd(c,"Size"),u&&c)){m=yd(u,"x",Ed);if(null==m)return;q=yd(u,"y",Ed);if(null==q)return;u=yd(c,"x",Ed);if(null==u)return;c=yd(c,"y",Ed);if(null==c)return;q={viewport:{x:k,y:l},topLeft:{x:m,y:q},size:{x:u,y:c}}}Xr(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,Zr(b,a,c),2);case 2:d=n.h;e=jd(d,"VAST,vmap:VMAP");if(!e)throw new U(2,10,10007);f=[];if("VAST"==e.tagName){f=yr(e,b.m);n.u(3);break}if("vmap:VMAP"!=e.tagName){n.u(3);break}for(var q=[],r=t(rd(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=dd(v),(w=vd(w,"vmap:AdSource"))&&(w=vd(w,"vmap:AdTagURI"))&& (w=sd(w))&&q.push({time:u,uri:w}))}g=t(q);h=g.next();case 5:if(h.done){n.u(3);break}k=h.value;return F(n,Zr(b,k.uri,c),8);case 8:l=n.h;m=jd(l,"VAST");if(!m)throw new U(2,10,10007);f.push.apply(f,x(yr(m,k.time)));h=g.next();n.u(5);break;case 3:Xr(b,f),G(n)}})}; function Xr(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.u(4);break}f=e.value;if(!f.uri){bb("Missing URL in interstitial",f);m.u(3);break}if(f.mimeType){m.u(5);break}wa(m,6);g=a.j.Nb();return F(m,Do(f.uri,g,a.C.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;za(m,5);break;case 6:Aa(m);case 5:h=f.id||JSON.stringify(f);if(a.U.has(h)){m.u(3);break}f.loop&&!f.overlay&&bb("Loop is only supported in overlay interstitials",f); f.overlay||(c=!0);a.U.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)&&Mr(f)&&a.F.set(f,a.j.preload(f.uri,null,f.mimeType||void 0)),Nr(a,f));case 3:e=d.next();m.u(2);break;case 4:c&&Qr(a),Sr(a),G(m)}})} function Kr(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.M.allowStartInMiddleOfInterstitial&& h.endTime&&Infinity!=h.endTime&&(m=h.endTime-h.startTime);0=h.startTime?!1:!0)}k&&(!a.s||h.startTime>=a.s.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001Math.abs(g.startTime-b.startTime)}).length);b.once&&(f++,a.H.delete(b),Pr(a),b.overlay||Qr(a));b.mimeType&&(b.mimeType.startsWith("image/")||"text/html"===b.mimeType)?b.overlay?$r(a,b,c,d,f):bb("Unsupported interstitial",b):a.A&&b.overlay?bb("Unsupported interstitial",b):as(a,b,c,d,e,f)} function $r(a,b,c,d,e){function f(){a.o&&(a.o.stop(),a.o=null);a.B.removeChild(k);Ur(a,b);a.i(new V("ad-stopped"));a.l.Qa();var q=Kr(a,b.pre,d-e);q?Lr(a,q,c,++d,Date.now(),e):a.K=!1}a.K=!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";bs(a,b);a.i(new V("ad-started",(new Map).set("ad",new Hr(b,c,d))));"iframe"==h?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){a.i(new V("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.B.appendChild(k);var n=Date.now();a.o&&a.o.stop();a.o=new af(function(){b.playoutLimit&&(Date.now()-n)/1E3>b.playoutLimit?(a.i(new V("ad-complete")), f()):b.endTime&&a.g.currentTime>b.endTime?(a.i(new V("ad-complete")),f()):a.g.currentTimeb.endTime)a.o&&a.o.stop(),a.i(new V("ad-skipped")),f()})} function as(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I;Q(function(K){switch(K.g){case 1:g=Date.now();a.K=!0;if(!a.A||1!=d){K.u(2);break}a.i(new V("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new ug;k=function(J){return Q(function(L){if(1==L.g)return"detach"!=J.state?L.u(0):Tr()?F(L,new Promise(function(N){return(new af(N)).ha(.1)}),3):L.u(3);h.resolve();a.l.Ja(a.C,"onstatechange",k);G(L)})};a.l.D(a.C,"onstatechange",k);return F(K,h,2);case 2:return bs(a,b),a.A|| (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.A&&!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=Kr(a,b.pre,d-f);if(J&&b.groupId)for(;L&&L.groupId==b.groupId;)d++,L=Kr(a,b.pre,d-f);a.o&&(!b.groupId||L&&L.groupId!=b.groupId)&&(a.o.stop(),a.o=null);Ur(a,b);if(L&&!L.overlay)return O.u(2);b.post&&(a.m=null,a.s=null);return a.A?F(O,a.j.detach(),4):F(O,a.j.vc(),4)}2!=O.g&&(a.A&&(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 V("ad-content-resume-requested",(new Map).set("offset",N)))),a.i(new V("ad-stopped")),a.l.Qa(),a.K=!1,a.A?Qr(a):(a.h.style.display="none",r(),a.g.ended||a.g.play()));Rr(a);L&&(a.i(new V("ad-stopped")),a.l.Qa(),Lr(a,L,c,++d,e,f));G(O)})},w=function(J){return Q(function(L){if(q)return L.return();q=!0;a.i(new V("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 V("ad-complete"));G(J)})},a.ia=function(){return Q(function(J){if(q)return J.return();q=!0;a.i(new V("ad-skipped"));return F(J,u(!0),0)})},y=new Gr(a.h,b,a.ia,c,d,!a.A),a.A||(y.setMuted(a.g.muted),y.setVolume(a.g.volume)),a.i(new V("ad-started",(new Map).set("ad",y))),(z=y.canSkipNow())&&a.i(new V("ad-skip-state-changed")),a.l.za(a.j,"error",w),a.l.D(a.h,"timeupdate",function(){if(a.h.duration){var J=y.canSkipNow();z!=J&&0=J.playRangeEnd?v():a.i(new V("ad-paused"))}),a.l.D(a.h,"volumechange",function(){a.h.muted? a.i(new V("ad-muted")):a.i(new V("ad-volume-changed"))}),wa(K,4),Jr(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(A=b.endTime-b.startTime,0b.endTime)&&a.ia()}));za(K,0); break;case 4:I=Aa(K);if(!a.K)return K.return();w(I);G(K)}})} function bs(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.B&& (a.B.style.pointerEvents="none",b.background&&(a.B.style.background=b.background));a.G&&(a.G.style.background=b.overlay?"":"rgb(0, 0, 0)")}function Ur(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.B&&(a.B.style.pointerEvents="",!b||b.background)&&(a.B.style.background="");a.G&&(a.G.style.background="")} function Wr(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,aa,W,Fa,Ga,ya,qa,Ca,Ja,ra;return Q(function(da){switch(da.g){case 1:c=[];if(!b)return da.return(c);d=b.values.find(function(sa){return"X-ASSET-URI"==sa.key});e=b.values.find(function(sa){return"X-ASSET-LIST"==sa.key});if(!d&&!e)return da.return(c);f=null;if(g=b.values.find(function(sa){return"ID"==sa.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(sa){return"X-RESTRICT"==sa.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(sa){return"X-ENABLE-SKIP-AFTER"==sa.key}))w=u.data,r=parseFloat(w),isNaN(r)&&(r=m?0:null);v=null;if(y=b.values.find(function(sa){return"X-ENABLE-SKIP-FOR"==sa.key}))z=y.data,v=parseFloat(z),isNaN(r)&&(v=null);A=null;if(C=b.values.find(function(sa){return"X-RESUME-OFFSET"== sa.key}))E=C.data,A=parseFloat(E),isNaN(A)&&(A=null);H=null;if(B=b.values.find(function(sa){return"X-PLAYOUT-LIMIT"==sa.key}))D=B.data,H=parseFloat(D),isNaN(H)&&(H=null);J=K=I=!1;if(L=b.values.find(function(sa){return"CUE"==sa.key}))N=L.data,I=N.includes("ONCE"),K=N.includes("PRE"),J=N.includes("POST");O=!1;(M=b.values.find(function(sa){return"X-TIMELINE-OCCUPIES"==sa.key}))?(P=M.data,O=P.includes("RANGE")):!C&&a.C.V()&&(O=!K&&!J);if(d){R=d.data;if(!R)return da.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:H,once:I,pre:K,post:J,timelineRange:O,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});da.u(2);break}if(!e){da.u(2);break}S=e.data;if(!S)return da.return(c);wa(da,4);aa={type:11};return F(da,Zr(a,S,aa),6);case 6:W=da.h;Fa=ac(W);Ga=JSON.parse(Fa);if(ya=Ga["SKIP-CONTROL"])qa=ya["ENABLE-SKIP-AFTER"],"number"==typeof qa&&(r=parseFloat(qa),isNaN(qa)&&(r=m? 0:null)),Ca=ya["ENABLE-SKIP-FOR"],"number"==typeof Ca&&(v=parseFloat(Ca),isNaN(Ca)&&(v=null));for(Ja=0;Jad.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.M.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}} function ks(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.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),ms(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),ms(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),ms(a,"thirdQuartile"));d=a.g.getRemainingTime(); e=a.g.getDuration();a.g.canSkipNow()&&0=d||d>e)&&es(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.M.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}es(a);a.L=e;a.g=new cs(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&ms(a,"breakStart");ns(a);break}}}if(!a.g)for(d= t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;fb&&(a.h.currentTime=a.A),a.A=null)}}} function es(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.M.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?ms(a,"skip"):ms(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Ja(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&ms(a,"breakEnd");a.g=null;a.C=null;a.L=null}} function ns(a){var b=!1;a.h.paused?b=!0:(ms(a,"impression"),ms(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&ms(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||ms(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(ms(a,"impression"),ms(a,"start"),b=!1):ms(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){ms(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target, d.type,d.listener)} function ms(a,b){var c=a.C.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.L.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=Mg([e],sg()),e.method="POST",a.K.request(7,e,d))}switch(b){case "impression":a.i(new V("ad-impression"));break;case "start":a.i(new V("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new V("ad-muted"));break;case "unmute":a.i(new V("ad-volume-changed"));break; case "resume":a.i(new V("ad-resumed"));break;case "pause":a.i(new V("ad-paused"));break;case "firstQuartile":a.i(new V("ad-first-quartile"));break;case "midpoint":a.i(new V("ad-midpoint"));break;case "thirdQuartile":a.i(new V("ad-third-quartile"));break;case "complete":a.i(new V("ad-complete"));a.i(new V("ad-stopped"));break;case "skip":a.i(new V("ad-skipped"));a.i(new V("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active"); break;case "skipStateChanged":a.i(new V("ad-skip-state-changed"))}};function os(a,b){this.g=a;this.i=null;this.h=b}p=os.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};T("shaka.ads.ServerSideAd",os); os.prototype.release=os.prototype.release;os.prototype.getPodIndex=os.prototype.getPodIndex;os.prototype.getTimeOffset=os.prototype.getTimeOffset;os.prototype.getMediaUrl=os.prototype.getMediaUrl;os.prototype.getAdvertiserName=os.prototype.getAdvertiserName;os.prototype.getCreativeAdId=os.prototype.getCreativeAdId;os.prototype.getAdId=os.prototype.getAdId;os.prototype.getVastAdId=os.prototype.getVastAdId;os.prototype.getVastMediaWidth=os.prototype.getVastMediaWidth; os.prototype.getVastMediaHeight=os.prototype.getVastMediaHeight;os.prototype.getVastMediaBitrate=os.prototype.getVastMediaBitrate;os.prototype.getDescription=os.prototype.getDescription;os.prototype.getTitle=os.prototype.getTitle;os.prototype.getPositionInSequence=os.prototype.getPositionInSequence;os.prototype.getSequenceLength=os.prototype.getSequenceLength;os.prototype.setMuted=os.prototype.setMuted;os.prototype.resize=os.prototype.resize;os.prototype.isLinear=os.prototype.isLinear; os.prototype.isMuted=os.prototype.isMuted;os.prototype.setVolume=os.prototype.setVolume;os.prototype.getVolume=os.prototype.getVolume;os.prototype.play=os.prototype.play;os.prototype.pause=os.prototype.pause;os.prototype.skip=os.prototype.skip;os.prototype.canSkipNow=os.prototype.canSkipNow;os.prototype.getTimeUntilSkippable=os.prototype.getTimeUntilSkippable;os.prototype.isSkippable=os.prototype.isSkippable;os.prototype.isPaused=os.prototype.isPaused;os.prototype.getRemainingTime=os.prototype.getRemainingTime; os.prototype.getMinSuggestedDuration=os.prototype.getMinSuggestedDuration;os.prototype.getDuration=os.prototype.getDuration;os.prototype.isUsingAnotherMediaElement=os.prototype.isUsingAnotherMediaElement;os.prototype.hasCustomClick=os.prototype.hasCustomClick;os.prototype.isClientRendering=os.prototype.isClientRendering;os.prototype.needsSkipUI=os.prototype.needsSkipUI;function ps(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new jb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new V("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){qs(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length? e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new os(f,e.l);e.A&&(e.m.i=e.A);e.i(new V("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active"); var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new V("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new V("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new V("ad-third-quartile"))}); this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new V("ad-complete"));e.i(new V("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new V("ad-skipped"));e.i(new V("ad-stopped"))});this.h.D(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.C= f;e.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=ps.prototype;p.configure=function(){};p.stop=function(){this.B="";this.o=null;this.C=[]};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.C}; function qs(a,b){a.i(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Z(){Eg.call(this);this.h=this.i=this.j=this.g=null;this.m=new ur;this.o=navigator.language;this.l=null}pa(Z,Eg);p=Z.prototype;p.setLocale=function(a){this.o=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 Ir(a,b,c,function(e){return rs(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 U(2,10,1E4);this.j&&this.j.release();this.j=new Ar(a,b,this.o,c,function(e){return rs(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);Eg.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 V("ad-stopped"));this.dispatchEvent(new V("ad-content-attach-requested"));this.m=new ur};p.requestClientSideAds=function(a){if(!this.j)throw new U(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 U(1,10,10001);var b=this.j;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new ds(a,b,c,function(e){return rs(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new U(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new ug,gs(d,a,b),d.H=c||"",d.P=Date.now()/1E3,a=d.l);return a}; p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new U(1,10,10005);var b=this.i;b.G=a;b.i(new V("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 U(2,10,10002);this.h&&this.h.release();this.h=new ps(a,b,this.o,function(d){return rs(c,d)});this.h.configure(this.l)}; p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.h)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&bb('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 U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&& (c.G=!0),c.j=new ug,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new U(1,10,10003);(a.mpt||a.mpv)&&bb('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(){wb("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:vr(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&&Vr(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=yd(m,"maxDuration",Ed))&&(g=l/c.timescale);(l=yd(m,"returnOffset",Ed))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&Xr(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&&vd(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&Yr(this.g,c))}};p.addCustomInterstitial=function(a){if(!this.g)throw new U(1,10,10006);Xr(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new U(1,10,10006);return this.g.addAdUrlInterstitial(a)}; p.getInterstitialPlayer=function(){if(!this.g)throw new U(1,10,10006);return this.g.ld()};function rs(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)}T("shaka.ads.AdManager",Z);Z.prototype.getInterstitialPlayer=Z.prototype.getInterstitialPlayer;Z.prototype.addAdUrlInterstitial=Z.prototype.addAdUrlInterstitial; Z.prototype.addCustomInterstitial=Z.prototype.addCustomInterstitial;Z.prototype.onDASHInterstitialMetadata=Z.prototype.onDASHInterstitialMetadata;Z.prototype.onHLSInterstitialMetadata=Z.prototype.onHLSInterstitialMetadata;Z.prototype.onCueMetadataChange=Z.prototype.onCueMetadataChange;Z.prototype.onHlsTimedMetadata=Z.prototype.onHlsTimedMetadata;Z.prototype.onDashTimedMetadata=Z.prototype.onDashTimedMetadata;Z.prototype.onManifestUpdated=Z.prototype.onManifestUpdated;Z.prototype.getStats=Z.prototype.getStats; Z.prototype.getCuePoints=Z.prototype.getCuePoints;Z.prototype.getServerSideCuePoints=Z.prototype.getServerSideCuePoints;Z.prototype.replaceServerSideAdTagParameters=Z.prototype.replaceServerSideAdTagParameters;Z.prototype.requestServerSideStream=Z.prototype.requestServerSideStream;Z.prototype.initServerSide=Z.prototype.initServerSide;Z.prototype.addMediaTailorTrackingUrl=Z.prototype.addMediaTailorTrackingUrl;Z.prototype.requestMediaTailorStream=Z.prototype.requestMediaTailorStream; Z.prototype.initMediaTailor=Z.prototype.initMediaTailor;Z.prototype.updateClientSideAdsRenderingSettings=Z.prototype.updateClientSideAdsRenderingSettings;Z.prototype.requestClientSideAds=Z.prototype.requestClientSideAds;Z.prototype.onAssetUnload=Z.prototype.onAssetUnload;Z.prototype.release=Z.prototype.release;Z.prototype.initClientSide=Z.prototype.initClientSide;Z.prototype.initInterstitial=Z.prototype.initInterstitial;Z.prototype.configure=Z.prototype.configure;Z.prototype.setLocale=Z.prototype.setLocale; Z.ADS_LOADED="ads-loaded";Z.AD_STARTED="ad-started";Z.AD_FIRST_QUARTILE="ad-first-quartile";Z.AD_MIDPOINT="ad-midpoint";Z.AD_THIRD_QUARTILE="ad-third-quartile";Z.AD_COMPLETE="ad-complete";Z.AD_STOPPED="ad-stopped";Z.AD_SKIPPED="ad-skipped";Z.AD_VOLUME_CHANGED="ad-volume-changed";Z.AD_MUTED="ad-muted";Z.AD_PAUSED="ad-paused";Z.AD_RESUMED="ad-resumed";Z.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Z.CUEPOINTS_CHANGED="ad-cue-points-changed";Z.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded"; Z.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Z.AD_CLICKED="ad-clicked";Z.AD_PROGRESS="ad-progress";Z.AD_BUFFERING="ad-buffering";Z.AD_IMPRESSION="ad-impression";Z.AD_DURATION_CHANGED="ad-duration-changed";Z.AD_CLOSED="ad-closed";Z.AD_LOADED="ad-loaded";Z.ALL_ADS_COMPLETED="all-ads-completed";Z.AD_LINEAR_CHANGED="ad-linear-changed";Z.AD_METADATA="ad-metadata";Z.AD_RECOVERABLE_ERROR="ad-recoverable-error";Z.AD_ERROR="ad-error";Z.AD_BREAK_READY="ad-break-ready";Z.AD_INTERACTION="ad-interaction"; Z.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Z.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Z.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Up=function(){return new Z};function ss(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof V){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(zj(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 ts(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=us(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 us(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}} var vs="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ws="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),xs=["loop","playbackRate"],ys=["pause","play"],zs=(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),As=(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),Bs=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Cs=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Ds=[["isTextTrackVisible","setTextTrackVisibility"]],Es="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "), Fs="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function Gs(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new af(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.M=f;this.i=this.m=!1;this.I="";this.o=null;this.B=function(){return Hs(h)};this.C=function(k,l){k=ts(l);switch(k.type){case "event":var m=k.targetName,n=Cg(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(q=k.id,n=k.error,l=k.res,k=h.h.get(q),h.h.delete(q),k)if(n){q=new U(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;Is.add(this)}p=Gs.prototype;p.destroy=function(){Is.delete(this);Js(this);Ks&&Ls(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.i=this.m=!1;this.C=this.B=this.j=this.h=this.g=this.o=null;return Promise.resolve()};p.ub=function(){return this.i};p.Ug=function(){return this.I}; p.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Hb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Is),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new ug;d.s=!0;Ms(d,e)}},function(b){for(var c=t(Is),d=c.next();!d.done;d=c.next())d=d.value,Ns="available"==b,d.l.Hb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Ns&&this.l.ha(Os);(a=Ks)&& a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new ug,this.s=!0,Ms(this,a)):Ks=null}else window.__onGCastApiAvailable!==Ps&&(Qs=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Ps)};p.fh=function(a){this.o=a;this.i&&Rs(this,{type:"appData",appData:this.o})}; p.cast=function(){var a=this;return Q(function(b){if(!a.m)throw new U(1,8,8E3);if(!Ns)throw new U(1,8,8001);if(a.i)throw new U(1,8,8002);a.j=new ug;chrome.cast.requestSession(function(c){return Ms(a,c)},function(c){return Ss(a,c)});return F(b,a.j,0)})};function Ts(a){a.i&&chrome.cast.requestSession(function(b){return Ms(a,b)},function(b){return Ss(a,b)})}p.jd=function(){if(this.i){Js(this);if(Ks){Ls(this);try{Ks.stop(function(){},function(){})}catch(a){}Ks=null}Hs(this)}}; p.get=function(a,b){var c=this;if("video"==a){if(ys.includes(b))return function(){return c.wi.apply(c,[a,b].concat(x(Oa.apply(0,arguments))))}}else if("player"==a){if(Bs.has(b)&&!this.get("player","isLive")())return function(){};if(Es.includes(b))return function(){return c.wi.apply(c,[a,b].concat(x(Oa.apply(0,arguments))))};if(Fs.includes(b))return function(){return c.Fk.apply(c,[a,b].concat(x(Oa.apply(0,arguments))))};if(zs.has(b)||As.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;Rs(this,{type:"set",targetName:a,property:b,value:c})};function Ms(a,b){var c=a.M();Ks=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Hs(a);Rs(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Ss(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 U(2,8,c,b))} p.wi=function(a,b){Rs(this,{type:"call",targetName:a,methodName:b,args:Oa.apply(2,arguments)})};p.Fk=function(a,b){var c=Oa.apply(2,arguments),d=new ug,e=this.H.toString();this.H++;this.h.set(e,d);try{Rs(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Ls(a){var b=Ks;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)} function Hs(a){var b=Ks?"connected"==Ks.status:!1;if(a.i&&!b){a.F();for(var c in a.g)a.g[c]={};Js(a)}a.i=b;a.I=b?Ks.receiver.friendlyName:"";a.l.Hb()}function Js(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 U(1,7,7E3))}} function Rs(a,b){b=ss(b);var c=Ks;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},eb)}catch(d){throw b=new U(2,8,8005,d),c=new V("error",(new Map).set("detail",b)),a.A("player",c),a.jd(),b;}}var Os=.02,Ns=!1,Ks=null,Qs=null,Is=new Set;function Ps(a){Qs?window.__onGCastApiAvailable=Qs:delete window.__onGCastApiAvailable;Qs=null;if(a)for(var b=t(Is),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Us(a,b,c,d){d=void 0===d?!1:d;Eg.call(this);var e=this;this.i=a;this.h=b;this.l=this.o=this.m=this.s=this.j=null;this.H=c;this.G=d;this.C=[];this.B=[];this.A=[];this.F=new Map;this.g=null;window.chrome?(this.g=new Gs(c,function(){return Vs(e)},function(){return Ws(e)},function(f,g){return Xs(e,f,g)},function(){return Ys(e)},function(){return Zs(e)},d),$s(this)):(this.j=this.i,this.s=this.h)}pa(Us,Eg);p=Us.prototype; p.destroy=function(a){this.g&&(void 0===a?0:a)&&this.g.jd();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.s=this.j=this.i=null;Eg.prototype.release.call(this);return Promise.all(a)};p.Vj=function(){return this.j};p.ld=function(){return this.s};p.fj=function(){return this.g?this.g.m&&Ns:!1};p.ub=function(){return this.g?this.g.ub():!1};p.Ug=function(){return this.g?this.g.Ug():""}; 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.vc(),0):b.return()})};p.fh=function(a){this.g&&this.g.fh(a)};p.Uk=function(){this.g&&Ts(this.g)};p.jd=function(){this.g&&this.g.jd()}; p.gj=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.jd();return F(d,c.g.destroy(),2)}c.g=null;c.g=new Gs(a,function(){return Vs(c)},function(){return Ws(c)},function(e,f){return Xs(c,e,f)},function(){return Ys(c)},function(){return Zs(c)},b);c.g.init();G(d)})}; function $s(a){a.g.init();a.l=new jb;for(var b=t(vs),c=b.next();!c.done;c=b.next())a.l.D(a.i,c.value,function(f){a.g.ub()||(f=Cg(f),a.m.dispatchEvent(f))});for(var d in Dg)a.l.D(a.h,Dg[d],function(f){a.g.ub()||a.o.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={Vd:b.Vd},b.Vd=e,Object.defineProperty(a.j,b.Vd,{configurable:!1,enumerable:!0,get:function(f){return function(){return at(a,f.Vd)}}(b),set:function(f){return function(g){var h=f.Vd;a.g.ub()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};bt(a, function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return ct(a,f)}})});dt(a);a.m=new Eg;a.m.xe=a.j;a.o=new Eg;a.o.xe=a.s;a.l.D(a.h,"unloading",function(){a.g&&a.g.ub()||et(a)})}function dt(a){var b=new Map;bt(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(Wt())}function Wt(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Xt(a,b){Yt(a)&&(a.i[a.h][a.g]=new Ct(b,a.C,a.A,a.s,a.B),a.g++)}function Yt(a){var b=a.gc;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=Wt()} function $t(a,b,c){var d=new Rd(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Ud;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.M;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Rc: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=zt(d,"svc"+c,a.i,a.j,b))a.j=b;return c}Ut.prototype.display=function(){this.l=!0};function au(){this.i=[];this.h=null;this.g=0}function bu(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0this.h.length)throw new U(2,2,3E3);this.g+=a}; cu.prototype.Ci=function(a){if(0>this.g-a)throw new U(2,2,3E3);this.g-=a};function eu(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null} function fu(a,b,c,d){if(!a.g)return[];if(24==c)return c=du(b).value,d=du(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),Xt(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!Yt(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=$t(b,d,a.i));b.h+1>=b.o?Zt(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=$t(b,d,a.i));b.i[b.h]=Wt();b.g=0;break;case 12:b.isVisible()&& (e=$t(b,d,a.i)),Vt(b),b.h=0,b.g=0}return e?[e]:[]} function gu(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=du(b).value;b=[];c=t(hu(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=$t(e,d,a.i);f&&b.push(f)}Vt(e)}return b}if(137===c)for(b=du(b).value,b=t(hu(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=du(b).value;b=null;c=t(hu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=$t(e,d,a.i)),e.l=!1;return b? [b]:[]}if(139===c){c=du(b).value;b=null;c=t(hu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=$t(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(140===c)return b=du(b).value,iu(a,b,d);if(143===c)return d=iu(a,255,d),ju(a),d;if(144===c)b.skip(1),d=du(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=du(b).value,c=du(b).value,b.skip(1),a.g&&(b=ku((c&48)>>4,(c&12)>>2,c&3),a.g.B=ku((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=du(b).value,b=du(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=du(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 Ut(c,a.i),f.j=d,a.h[c]=f);d=du(b).value;f=du(b).value;var g=du(b).value,h=du(b).value,k=du(b).value;b=du(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]} function hu(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function iu(a,b,c){var d=[];b=t(hu(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=$t(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function ju(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ku(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return lu[a<<2|b<<1|c]} var mu=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"]]),lu="black blue green cyan red magenta yellow white".split(" ");function nu(){this.h=[];this.g=[];this.i=new au;this.l=0;this.m=new Map([["CC1",new Ot(0,0)],["CC2",new Ot(0,1)],["CC3",new Ot(1,0)],["CC4",new Ot(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;ou(this)}nu.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;ou(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())ju(b.value)}; function ou(a){a.o=0;a.s=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,Et(c.i),Et(c.j),Et(c.o);a.B=!0} nu.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new $g(a,0);if(!(8>a.getLength())&&181===a.X()&&49===a.Aa()&&1195456820===a.T()&&3===a.X()&&(c=a.X(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d>2,g=a.X(),h=a.X();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Bb:g,ec: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})))}}; nu.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=pu(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())bu(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=qu(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b}; function pu(a,b){var c=b.type;if(16===(b.Bb&112)){var d=b.Bb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Bb&&255===b.ec||!b.Bb&&!b.ec||!ru(b.Bb)||!ru(b.ec))return 45<=++a.l&&ou(a),null;a.l=0;b.Bb&=127;b.ec&=127;var e=b.Bb;if(1<=e&&15>=e||!b.Bb&&!b.ec)return null;e=null;if(16===(b.Bb&112))a:{a.A.add(d),d=b.Bb;a=b.ec;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=Tt[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,Nt(g,c,1+g.g-g.h,g.h),Ht(g,0,c-1),Ht(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.s=f,g.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",It(c.g,0,32),d=!1,b=Tt[(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=St[(a& 14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))It(c.g,1,a);else if(18===(d&246)&&32===(a&224))It(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.ec){case 32:Qt(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Pt(c,2,a);break;case 38:d=Pt(c,3,a);break;case 39:d=Pt(c,4,a);break;case 40:It(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Et(c.o);Rt(c);break;case 43:Rt(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Ft(b,c.l,a));Ht(b,0,15);break;case 45:b= c.g;3!==c.h?d=null:(d=Ft(b,c.l,a),e=b.g-b.h+1,Nt(b,e-1,e,b.h),Ht(b,0,e-1),Ht(b,b.g,15-b.g),c.l=a);break;case 46:Ht(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Ft(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Qt(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.A=a-32)}e=null}else a=b.ec,It(c.g,0,b.Bb),It(c.g,0,a);return e} function qu(a,b){var c=[];try{for(;b.Fa();){var d=du(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=du(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new eu(e));for(var g=a.j.get(e),h=b.Ma();b.Ma()-h=m)var r=fu(e,k,m,n);else if(128<=m&&159>=m)r=gu(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?Xt(e.g,"\u266a"):Xt(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&Xt(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(mu.has(k)){var u=mu.get(k);Xt(e.g,u)}else Xt(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?Xt(e.g,"_"):Xt(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(w){if(w instanceof U&&3E3===w.code)cb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data."); else throw w;}return c}function ru(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}nu.prototype.getStreams=function(){return Array.from(this.A)};T("shaka.cea.CeaDecoder",nu);Nc=function(){return new nu};function su(a){for(var b=[],c=a,d=a=0;d>1&63;r=39==r||40==r;break;case zu: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=Tb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Cu(a){a=mc(sd(a));a=Bu(a).filter(function(b){return b.type===Du})[0];if(!a)return null;a=bc(a.value,!0);return(a=kd(a,"WRMHEADER"))?a:null} function Eu(a){try{var b=Cu(a);if(b)a:{for(var c=t(ud(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=sd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Du=1;function Fu(a,b,c){var d=Gu(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 Eu(a)}return""} function Iu(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.xd];if(h){var k;if((k=wd(g.node,"urn:microsoft:playready","pro"))&&sd(k)){k=sd(k);k=mc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:oh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.xd){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:oh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=rc(h,b,g.init||a||k||l);if(h=Lu.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Gu(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Mu(c.value))&&b.push(c);return b} function Mu(a){var b=a.attributes.schemeIdUri,c=zd(a,"urn:mpeg:cenc:2013","default_KID"),d=xd(a,"urn:mpeg:cenc:2013","pssh").map(td),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new U(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:mc(g),keyId:null}})}catch(g){throw new U(2,4,4007);}return{node:a,xd:b,keyId:c,init:0v)if(r){r=yd(r,"t",Gd);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.T();g.reader.skip(4);if(1==r)throw new U(2,3,3006);h.push(new rj(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 Wu(a){this.h=Yb(a);this.g=new $g(this.h,0)}Wu.prototype.Fa=function(){return this.g.Fa()}; function Xu(a){var b=Yu(a);if(7=c&&(c=v.timeline+1)}-1==k&&(k=c);r=new xv(n,a.J.originalId,a.bandwidth,a.J.cb,a.Jb,u,w,m,g,a.J.Af,k)}n.timeline&&"image"!==a.ma.contentType&&"text"!==a.ma.contentType&&a.presentationTimeline.pi(r.h?r.h.timeline:[],u);d&&a.ic&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.$b:-1;l=-1;r instanceof xv&&(l=r.Ne());return{endTime:d,timeline:l,Nc:function(){r instanceof xv&&0==r.getNumReferences()&&wv(r,n,u,w,m);return Promise.resolve(r)}, timescale:n.timescale}}function rv(a){return a.Fc}function tv(a){var b=Ou(a,rv),c=Pu(a,rv,"media"),d=Pu(a,rv,"index"),e=Pu(a,rv,"k"),f=0;e&&(f=parseInt(e,10));return{Ff:b.Ff,gb:b.gb,timescale:b.timescale,fe:b.fe,$b:b.$b,wh:b.wh,timeline:b.timeline,Zb:c&&ic(c),Td:d,mimeType:a.J.mimeType,codecs:a.J.codecs,bandwidth:a.bandwidth,rk:f}} function uv(a){var b=a.Td?1:0;b+=a.timeline?1:0;b+=a.gb?1:0;if(0==b)throw new U(2,4,4002);1!=b&&(a.Td&&(a.timeline=null),a.Ff=null,a.gb=null);if(!a.Td&&!a.Zb)throw new U(2,4,4002);} function vv(a,b,c,d,e,f,g,h){function k(L){var N=L-v,O=N*w,M=b.Ff,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=[],S=b.rk;if(S)for(var aa=(M-O)/S,W={},Fa=0;Fam()&&!O.length?null:O})}return Promise.resolve(K)} function sv(a,b){var c=a.J.Xe;c||(c=Pu(a,rv,"initialization"));if(!c)return null;c=ic(c);var d=a.J.originalId,e=a.bandwidth||null,f=a.J.cb,g=a.Jb;b=new pj(function(){var h=Nu(c,d,null,null,e,null);return qc(f(),[h],g())},0,null,ev(a),null,null,b,a.ma.encrypted);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;a.na&&(b.g=a.na.start+a.na.duration);return b} function xv(a,b,c,d,e,f,g,h,k,l,m){Jl.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.H=e;this.j=f;this.l=g;this.s=h;this.A=k;this.G=l;this.I=m;yv(this)}pa(xv,Jl);p=xv.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){Jl.prototype.release.call(this);this.h=null}; p.$a=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 wv(a,b,c,d,e){zv(a,e);if(a.h){c=a.h.timeline;a.h.Zb!==b.Zb&&(a.h.Zb=b.Zb);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.$a(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.Lk,e=c.xh+this.h.wh,f=this.j-this.h.$b,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 Bb(k.location)).Cb))return!1;return!0});d.length&&(a.B=d[0].Rg);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.B=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:qc(a.i,d)};function Hv(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}p=Hv.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.s=this.o=!1;this.m.clear()};p.Uj=function(){return this.l};p.Cg=function(){return this.j.slice()};p.zj=function(){return this.i}; p.Mh=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==wc)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 Iv(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[Jv(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Kv(n),n]})),l=new Map(h.textStreams.map(function(n){return[Lv(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Mv(n),n]}));if(b){var m=Nv(wc);l.set(Lv(m),m);m=Nv("image");h.set(Mv(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Fh:c,Yi:d,Vi:e,Zh:f}} p.ag=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,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,aa;return Q(function(W){if(1==W.g){e=yc;if(!b&&1==a.length)return f=Iv(a,!1),g=f.Fh,h=f.Yi,k=f.Vi,l=f.Zh,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()),W.u(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.u(4);break}n=m.value;return F(J,Vv(a,n,c,d,f,h,g),5);case 5:q=J.h;if(!q)throw new U(2,4,4037);m=l.next();J.u(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=Wv(a,z,c,e,f,h))&&b.push(A);C=t(h);for(E=C.next();!E.done;E= C.next())for(H=E.value,B=t(H),D=B.next(),I={};!D.done;I={lh:void 0},D=B.next())if(I.lh=D.value,!Xv(I.lh)&&(K=b.some(function(L){return function(N){return Yv(a,L.lh,N)}}(I))))throw new U(2,4,4037);return J.return(b)}})}function Vv(a,b,c,d,e,f,g){return Q(function(h){if(1==h.g)return Zv(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 Cw}else{if(c>a)return Cw;if(a-ca-b)return Cw}return Ew}function Dw(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return av&&w>u&&a.M++;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=dx(a,b,c,{start:q,duration:w,node:m,bi:null==w||!n});h.push(k);b.ra.id&&w&&a.wa.set(b.ra.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,Oh:!1}:{periods:h,duration:k,Oh:!0}} function Xw(a){var b=Array.from(a.C.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.C.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.o.get(f);g&&(g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Mh(g,c),a.o.delete(f)))}d&&a.C.delete(c)}}function Yw(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=t(a.B.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.B.delete(d)} function dx(a,b,c,d){b.ra=ex(a,d.node,null,c);b.na=d;b.ra.pb=b.pb;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=rd(d.node,"EventStream");c=b.presentationTimeline.Fb();e=t(e);for(var f=e.next();!f.done;f=e.next())fx(a,d.start,d.duration,f.value,c);c=rd(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=gx(a,e)))b.Jb=e;c=rd(d.node,"AdaptationSet").map(function(r,u){return hx(a,b,u,r)}).filter(df);if(b.ic){e= [];f=t(c);for(var g=f.next();!g.done;g=f.next()){g=t(g.value.Hk);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new U(2,4,4018);}e=new Map;f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.nj),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={mh:void 0},m=l.next())if(n.mh=m.value,e.has(n.mh.originalId)){f|| (f=rd(d.node,"AdaptationSet").map(function(r,u){return hx(a,b,u,r)}).filter(df));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.mh.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.vh});c=c.filter(function(r){return r.vh});if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next())for(e= e.value,f=e.vh.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())dg(k.value,e.streams);c=ix(a.g.disableAudio,d,"audio");e=ix(a.g.disableVideo,d,"video");f=ix(a.g.disableText,d,wc);d=ix(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.ra.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}} function ix(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 hx(a,b,c,d){function e(L){var N=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];N&&L&&(L=qc(b.ma.cb(),[L],b.Jb()),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.ma=ex(a,d,b.ra,null);b.ma.position=c;var h=!1;c=rd(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(df), l=void 0,m=b.ma.contentType==wc;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=rd(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=gx(a,w))||(q=!0):q=!0)}if(q)return null;var A=null;q=rd(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=gx(a,r));n&&(b.Jb=n);n=rd(d,"Accessibility");var C=new Map,E;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?E="visually impaired":"2"==r?E="hard of hearing":"9"==r&&(E="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 H=w=void 0;v.includes("=")?(v=v.split("="),w="svc"+v[0],H=v[1].split(",")[0].split(":").pop()):(w="svc"+q,q++,H=v);C.set(w,hf(H))}else C.set("svc1","und");else if(q=1,null!=r)for(r= r.split(";"),w=t(r),v=w.next();!v.done;v=w.next()){H=v.value;var B=v=void 0;H.includes("=")?(H=H.split("="),v=H[0].startsWith("CC")?H[0]:"CC"+H[0],B=H[1]||"und"):(v="CC"+q,2==r.length?q+=2:q++,B=H);C.set(v,hf(B))}else C.set("CC1","und");n=rd(d,"ContentProtection");var D=Fu(n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.ma.encrypted=0a.K)){var c=a.K;0<=a.g.updatePeriod&&(c=a.g.updatePeriod);a.L.ha(Math.max(c-b,Wa(a.ya)))}} function ex(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,mf:null,audioSamplingRate:null,pb:0,Af:0,encrypted:!1};d=d||c.cb;var e=b.attributes.id,f=b.attributes.supplementalId,g=rd(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=td(n);m&&n&&(Fv(a.h,e,m,n),k=!0)}k&&a.h||(h=g.map(td));l=b.attributes.contentType||c.contentType;m=b.attributes.mimeType||c.mimeType;n= pm([b.attributes.codecs||c.codecs]).join(",");var q=yd(b,"frameRate",Kd)||c.frameRate,r=b.attributes.sar||c.pixelAspectRatio,u=ox(rd(b,"InbandEventStream"),c.emsgSchemeIdUris),w=rd(b,"AudioChannelConfiguration");w=px(w)||c.mf;var v=yd(b,"audioSamplingRate",Gd)||c.audioSamplingRate;l||(l=kx(m,n));var y=vd(b,"SegmentBase"),z=vd(b,"SegmentTemplate"),A=y?yd(y,"availabilityTimeOffset",Hd)||0:0,C=z?yd(z,"availabilityTimeOffset",Hd)||0:0,E=g&&g.length?yd(g[0],"availabilityTimeOffset",Hd)||0:0;A=c.pb+E+A+ C;C=null;(E=vd(b,"SegmentSequenceProperties"))&&(E=vd(E,"SAP"))&&(C=yd(E,"cadence",Ed));E=b.attributes.label;var H=rd(b,"Label");H&&H.length&&(H=H[0],sd(H)&&(E=sd(H)));return{cb:function(){return qc(d(),g.length?a.h&&k?Gv(a.h,e):h?h:[]:[])},yd:y||c.yd,tc:vd(b,"SegmentList")||c.tc,Fc:z||c.Fc,vf:vd(b,"ProducerReferenceTime")||c.vf,width:yd(b,"width",Gd)||c.width,height:yd(b,"height",Gd)||c.height,contentType:l,mimeType:m,codecs:n,frameRate:q,pixelAspectRatio:r,emsgSchemeIdUris:u,id:f||e,originalId:e, language:b.attributes.lang,mf:w,audioSamplingRate:v,pb:A,Xe:null,Af:C||c.Af,label:E||null,encrypted:!1}}function ox(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 px(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(td).filter(df);return d.length?qc(a.A,d):[]}T("shaka.dash.DashParser",Jw);ti("application/dash+xml",function(){return new Jw});ti("video/vnd.mpeg.dash.mpd",function(){return new Jw});function rx(){}T("shaka.dependencies",rx);rx.has=function(a){return sx.has(a)};rx.add=function(a,b){if(!tx[a])throw Error(a+" is not supported");a==ux?wb("mux.js","mux.js is no longer used in Shaka Player."):sx.set(a,function(){return b})};var ux="muxjs",tx={vm:ux,ISOBoxer:"ISOBoxer"};rx.Allowed=tx;var sx=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function vx(){this.j=new pb(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 pb(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 wi(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=vx.prototype;p.bc=function(){return!!navigator.mediaCapabilities};p.La=function(){return this.j.value()};p.Da=function(){return this.l.value()};p.ce=function(){return!1}; p.xi=function(){return!1};p.Ye=function(){return!1};p.zi=function(){return!1};p.be=function(){return!1};p.Zc=function(){return!0};p.$c=function(){return!0};p.ge=function(){return!0};p.Ei=function(){return 0};p.fc=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Ni=function(){return!1};p.kh=function(){return!1}; p.Sa=function(a){var b=this.La();if("TV"===b||"CONSOLE"===b||"CAST"===b)a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.ph=function(){return!!window.indexedDB};p.ui=function(){return[]};function Cn(a){rb();return void 0!==window.matchMedia&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"}p.Ui=function(){return!1};p.ji=function(){return!1};p.$g=function(){return!1};p.oh=function(){return!0};p.ki=function(){return!1}; p.Ti=function(){return!0};p.toString=function(){return"Device: "+this.Mb()+" v"+this.Ca()+"; Type: "+this.La()};function wx(){vx.call(this);this.g=new pb(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 pb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1this.g&&a.push("opus");return a};p.ji=function(){return!0};p.ki=function(){return 3===this.Ca()}; navigator.userAgent.includes("Tizen")&&(tb=function(){return new Fx});function Gx(){vx.apply(this,arguments)}pa(Gx,vx);Gx.prototype.Ca=function(){return null};Gx.prototype.Mb=function(){return"Vizio"};Gx.prototype.La=function(){return"TV"};Gx.prototype.bc=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(tb=function(){return new Gx});function Hx(){vx.call(this);this.h=new pb(function(){return navigator.userAgent.includes("DT_STB_BCM")});this.g=new pb(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(Hx,vx);p=Hx.prototype;p.Ca=function(){return this.g.value()};p.Mb=function(){return"WebKit STB"};p.La=function(){return"TV"};p.Da=function(){return"WEBKIT"}; p.bc=function(){return!1};p.Zc=function(){var a=this.g.value();return null!==a?15<=a:!0};p.fc=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.oh=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 U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(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",lc(b),""].join("\n")))d.licenseServerUri=Eu(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=Rx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=Rx(b,"URI");c=hy(c.split("?")[0]);c=Tb(c.data);d=rc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:c}]);(b=Qx(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2)); b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.ab=new Set;this.i=new Map;this.l=null;this.F="";this.Oa=new ay;this.L=-1;this.ia=Infinity;this.$=this.qc=this.Za=!1;this.C=new af(function(){if(a.U&&!a.g.continueLoadingWhenPaused&&(a.S.Ja(a.U,"timeupdate"),a.U.paused)){a.S.za(a.U,"timeupdate",function(){return ky(a)});return}ky(a)});this.Ba=ly;this.m=null;this.Ta=0;this.o=Infinity;this.Xa=this.Ka=this.P=0;this.W=new Fg;this.H=new Map;this.I=new Map;this.ya=new Map;this.oa=new Map; this.M=new Map;this.va=new Map;this.wa=new Map;this.nc=this.ka=!1;this.eb=new Va(5);this.j=null;this.N=!0;this.S=new jb;this.s=this.U=null;this.Xb=function(){return!1}}p=iy.prototype;p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.Xb=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.V()&&this.C.Hb()}; p.start=function(a,b){var c=this,d;return Q(function(e){return 1==e.g?(c.h=b,c.ka=b.isLowLatencyMode(),F(e,my(c,[a]).promise,2)):3!=e.g?(d=e.h,c.F=d.uri,F(e,ny(c,d.data),3)):e.return(c.m)})}; p.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=null);this.g=this.h=null;this.ab.clear();this.m=null;this.i.clear();this.K.clear();this.I.clear();this.A.clear();this.ya.clear();this.oa.clear();this.M.clear();this.va.clear();this.wa.clear();this.j&&this.j.destroy();this.S&&(this.S.release(),this.S=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(!oy(a))return r.return();b=[];c=Array.from(a.i.values());a.o=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(py(a,g));return F(r,Promise.all(b),2)}qy(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.Pd});d.length&&!h&&(k=ry,sy(a,k.aj),l=d.map(function(u){return u.lc}),a.l.ob(Math.min.apply(Math,x(l))), a.h.updateDuration());h&&ty(a);m=t(d);for(n=m.next();!n.done;n=m.next())q=n.value,q.stream.isAudioMuxedInVideo||!q.stream.segmentIndex||Rf(q.stream.segmentIndex)||a.h.disableStream(q.stream);G(r)})};function uy(a,b){return oy(a)?a.B.get(b.type):b.ef} function py(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,aa,W,Fa,Ga;return Q(function(ya){switch(ya.g){case 1:if(b.stream.isAudioMuxedInVideo)return ya.return();c=[];d=t(b.O());for(e=d.next();!e.done;e=d.next())f=e.value,g=new Bb(f),h=g.g,b.Ke&&(0<=b.Qb&&h.add("_HLS_msn",String(b.Qb)),0<=b.Rb&&h.add("_HLS_part",String(b.Rb))),b.Le&&h.add("_HLS_skip","YES"),Qb(h)&&Fb(g,Gb(h.toString())),c.push(g.toString());wa(ya,2);return F(ya,my(a,c,!0).promise,4);case 4:k=ya.h;za(ya, 3);break;case 2:throw l=Aa(ya),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return ya.return();m=by(a.Oa,k.data);if(1!=m.type)throw new U(2,4,4017);n=k.uri;n==k.originalUri||b.O().includes(n)||b.wf.push(n);q=Ux(m.ba,"EXT-X-DEFINE");r=vy(a,q,n);u=b.stream;w=uy(a,b);return F(ya,wy(a,m,u.mimeType,b.O,r),5);case 5:v=ya.h;y=v.keyIds;z=v.drmInfos;A=v.encrypted;C=v.Eh;u.encrypted||!A||C||(u.encrypted=!0);E=function(qa,Ca){return qa.size===Ca.size&&[].concat(x(qa)).every(function(Ja){return Ca.has(Ja)})}; E(u.keyIds,y)||(u.keyIds=y,u.drmInfos=z,a.h.newDrmInfo(u));H=xy(a,m,w,r,b.O,b.type);B=H.segments;if(D=H.bandwidth)u.bandwidth=D;I=Yl(u);K=t(B);for(J=K.next();!J.done;J=K.next())L=J.value,L.Y&&(L.Y.od=I);u.segmentIndex.Wd(B,a.l.Fb());B.length&&(N=Xx(m.ba,"EXT-X-MEDIA-SEQUENCE",0),M=(O=Wx(m.ba,"EXT-X-SKIP"))?Number(Qx(O,"SKIPPED-SEGMENTS")):0,P=yy(N,B),R=P.Qb,S=P.Rb,b.Qb=R+M,b.Rb=S,aa=w.get(N),u.segmentIndex.$a(aa));if(W=Rf(u.segmentIndex))b.Tc=W.startTime,Fa=B[B.length-1],b.lc=Fa.endTime;if(Ga=Wx(m.ba, "EXT-X-ENDLIST"))b.Pd=!0;zy(a,m);Ay(a,m.ba,u.type,r,b.O);G(ya)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.U=a}; function By(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.L,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=uy(a,f);if(g=Rf(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.L=Math.max(a.L,l));f.jg=l;break}}}}if(!(0>a.L))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Cy(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.L-d.jg,0Math.abs(c))){b.Tc+=c;b.lc+=c;a=uy(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.O()}} function ny(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,aa,W,Fa,Ga,ya,qa,Ca,Ja,ra,da;return Q(function(sa){switch(sa.g){case 1:c=yc;d=by(a.Oa,b);e=Ux(d.ba,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new ll(null,0);a.l.Yc(!0);k=function(){return[a.F]};l=null;m=new Map;if(1==d.type)return a.N=!1,R=Ux(d.ba,"EXT-X-DEFINE"),m=vy(a,R,a.F),l=c.xa,S="",aa=new Map,F(sa,Fy(a,a.G++,m,d,k,"",l,S,!0,"Media Playlist",null,aa,null,!1,null,!1),7);Gy(a,e);n=Ux(d.ba,"EXT-X-MEDIA");q=Ux(d.ba,"EXT-X-STREAM-INF"); r=Ux(d.ba,"EXT-X-IMAGE-STREAM-INF");u=Ux(d.ba,"EXT-X-I-FRAME-STREAM-INF");w=Ux(d.ba,"EXT-X-SESSION-KEY");v=Ux(d.ba,"EXT-X-SESSION-DATA");y=Ux(d.ba,"EXT-X-CONTENT-STEERING");Hy(a,v);return F(sa,Iy(a,y),4);case 4:if(!a.g.ignoreSupplementalCodecs){z=[];A=t(q);C=A.next();for(E={};!C.done;E={Ri:void 0},C=A.next())if(H=C.value,B=Qx(H,"SUPPLEMENTAL-CODECS"))E.Ri=B.split(/\s*,\s*/).map(function(Za){return Za.split("/")[0]}),D=H.attributes.map(function(Za){return function($a){var ib=$a.name,qb=$a.value;"CODECS"== ib&&(qb=Za.Ri.join(","),$a=$a.value.split(","),1<$a.length&&($a=uc("audio",$a))&&(qb+=","+$a));return new Tx(ib,qb)}}(E)),z.push(new Nx(H.id,H.name,D,null));q.push.apply(q,x(z));I=[];K=t(u);J=K.next();for(L={};!J.done;L={Si:void 0},J=K.next())if(N=J.value,O=Qx(N,"SUPPLEMENTAL-CODECS"))L.Si=O.split(/\s*,\s*/).map(function(Za){return Za.split("/")[0]}),M=N.attributes.map(function(Za){return function($a){var ib=$a.name;$a=$a.value;"CODECS"==ib&&($a=Za.Si.join(","));return new Tx(ib,$a)}}(L)),I.push(new Nx(N.id, N.name,M,null));u.push.apply(u,x(I))}Jy(a,q);Ky(a,n);P=Ly(a,u);return F(sa,My(a,q,w,n,k,a.A,P),5);case 5:return f=sa.h,g=Ny(a,n),F(sa,Oy(a,r,u),6);case 6:h=sa.h;sa.u(3);break;case 7:W=sa.h,a.i.set(a.F,W),W.stream&&(Fa=Yl(W.stream),W.stream.segmentIndex.Db(function(Za){Za.Y&&(Za.Y.od=Fa)})),l=W.stream.type,Ga=!0,a.g.disableAudio&&"audio"==W.type?Ga=!1:a.g.disableVideo&&"video"==W.type&&!W.stream.codecs.includes(",")&&(Ga=!1),Ga&&f.push({id:0,language:hf(S||"und"),disabledUntilTime:0,primary:!0,audio:"audio"== W.type?W.stream:null,video:"video"==W.type?W.stream:null,bandwidth:W.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);Py(a,d);1==d.type&&(oy(a)&&(Qy(a,d),ya=a.o,a.C.ha(ya)),qa=Array.from(a.i.values()),Ry(a,qa),ty(a),Ay(a,d.ba,l,m,k));a.m={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode, type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.s};if(a.$||!a.g.hls.disableCodecGuessing){sa.u(8);break}Ca=[];Ja=t(a.m.variants);for(ra=Ja.next();!ra.done;ra=Ja.next())da=ra.value,da.audio&&""===da.audio.codecs&&Ca.push(da.audio.createSegmentIndex()),da.video&&""===da.video.codecs&&Ca.push(da.video.createSegmentIndex());return F(sa,Promise.all(Ca),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),G(sa)}})} function Sy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A;return Q(function(C){if(1==C.g){c=nm(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return C.return(c);d=Ty(a,b);e=d.segment;f=d.segmentIndex;g=e.O();h=g[0];k=new Bb(h);l=k.mb.split(".").pop();return(m=Uy.get(l))?C.return(nm(m)):F(C,Promise.all([Vy(a,e.Y,0),Vy(a,e,f)]),2)}n=C.h;q=n[1].mimeType;r=n[0].data;u=n[1].data;w="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");v=["audio/mp4","video/mp4","video/iso.segment"];y=e.Y||v.includes(q); if(!y&&rk(Tb(u))){var E=u,H=a.g.disableAudio,B=a.g.disableVideo,D=a.g.disableText;var I=Tb(E);var K=(new bk).parse(I),J=K.Md();I=K.Dg();var L=[],N=!1,O=!1;if(!H)switch(J.audio){case "aac":case "aac-loas":K.rb().length&&(L.push("mp4a.40.2"),N=!0);break;case "mp3":K.rb().length&&(L.push("mp4a.40.34"),N=!0);break;case "ac3":K.rb().length&&(L.push("ac-3"),N=!0);break;case "ec3":K.rb().length&&(L.push("ec-3"),N=!0);break;case "opus":K.rb().length&&(L.push("opus"),N=!0)}if(!B)switch(J.video){case "avc":I.codec? L.push(I.codec):L.push("avc1.42E01E");O=!0;break;case "hvc":I.codec?L.push(I.codec):L.push("hvc1.1.6.L93.90");O=!0;break;case "av1":L.push("av01.0.01M.08"),O=!0}if(L.length){H=N&&!O;B=new Map;if(O&&!D){D=new Lc("video/mp2t");D.rf(E);E=t(D.Pf());for(O=E.next();!O.done;O=E.next())O=O.value,B.set(O,O);D.Cd()}I={type:H?"audio":"video",mimeType:"video/mp2t",codecs:L.join(", "),language:null,height:I.height,width:I.width,channelCount:null,sampleRate:null,closedCaptions:B,le:null,colorGamut:null,frameRate:I.frameRate}}else I= null;if(z=I)return C.return(z)}else if(y||w.includes(l))if(A=om(r,u,a.g.disableText))return C.return(A);return q?C.return(nm(q)):C.return(c)})} function Vy(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b)return l.return({mimeType:null,data:null});d=Sg;e=tm(b.O(),b.Ac(),b.yc(),a.g.retryParameters);f=b instanceof rj?1:0;return F(l,Wy(a,e,d,{type:f}).promise,2);case 2:g=l.h;h=g.data;if(!b.aesKey){l.u(3);break}return F(l,sm(h,b.aesKey,c),4);case 4:h=l.h;case 3:return b instanceof rj?b.ee(h,!0):b.ee(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})} function ty(a){if(oy(a)){if(a.Ba==Xy){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.lc),c=Math.min(c,e.Tc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Cf(b)}}else a.l.ob(Yy(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=Rf(c.stream.segmentIndex))&& c.h&&a.l.hh(c.h);a.l.df()}function Gy(a,b){var c=(new Bb(a.F)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Qx(e,"NAME");var f=Qx(e,"VALUE");e=Qx(e,"QUERYPARAM");d&&f&&(a.A.has(d)||a.A.set(d,f));e&&(d=c.get(e)[0])&&!a.A.has(d)&&a.A.set(e,d)}} function vy(a,b,c){c=(new Bb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Qx(f,"NAME"),h=Qx(f,"VALUE");e=Qx(f,"QUERYPARAM");f=Qx(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.A.get(f))&&d.set(f,e)}return d} function Jy(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Qx(d,"AUDIO");c=Qx(d,"VIDEO");var f=Qx(d,"SUBTITLES");d=Zy(a,d);if(f){var g=uc(wc,d);a.I.set(f,g);Uc(d,g)}e&&(f=uc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=uc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}} function Hy(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Qx(d,"DATA-ID");c=Qx(d,"URI");var f=Qx(d,"LANGUAGE");d=Qx(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Yx([a.F],c,a.A)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new V("sessiondata",e);if(a.h)a.h.onEvent(c)}} function Iy(a,b){var c,d,e,f,g,h;return Q(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Qx(f,"PATHWAY-ID"),h=Qx(f,"SERVER-URI"),g&&h){a.j=new Bv(a.h);a.j.configure(a.g);a.j.i=[a.F];a.j.setManifestType("HLS");a.j.h=g;c=Cv(a.j,h);break}return F(k,c,0)})} function Ny(a,b){var c=Vx(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return $y(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Rx(d.value,"GROUP-ID");if(d=a.I.get(e))if(e=a.K.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=az(wc,d)||bz(wc),cz(f.stream)}}return b.filter(function(g){return g})} function cz(a){var b=new Set([Ee(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Db(function(c){c.mimeType&&b.add(Ee(c.mimeType,a.codecs))});a.fullMimeTypes=b} function Oy(a,b,c){var d,e;return Q(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return Q(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);wa(m,2);return F(m,dz(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=Aa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=ez(a,g);return"image"!==h.stream.type?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null; throw k;}})),F(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function fz(a,b,c){b=b.filter(function(h){var k=Qx(h,"URI")||"";h=Qx(h,"TYPE");return"SUBTITLES"!=h&&(""!=k||"AUDIO"==h)});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Ox(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)$y(a,d[g],c,!1)}function Ly(a,b){return b.map(function(c){c=ez(a,c);return"video"!==c.stream.type?null:c.stream}).filter(function(c){return c})} function My(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,aa,W,Fa,Ga,ya,qa,Ca,Ja;return Q(function(ra){switch(ra.g){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(0d-2&&(e=Math.max(1,d-2));for(e=d-e;ea.s&&(c=Math.min(-a.s,c),a.s+=c);a.l.Ji(0);a.l.gh(c);a.l.Yc(!1)} function rz(a,b,c,d,e){var f=Wx(c,"EXT-X-MAP");if(!f)return null;var g=Rx(f,"URI"),h=Yx(d(),g,e);g=[h.toString(),Qx(f,"BYTERANGE","")].join("-");if(!a.ya.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=Rx(n,"METHOD"),gz(m)&&n.idJ?1:0}),c=0;cm))continue}if(null==m){var r=Qx(g,"DURATION")||Qx(g,"PLANNED-DURATION");if(r){var u= parseFloat(r);isNaN(u)||(m=l+u);if(0>k-f+u)continue}}var w=Qx(g,"CLASS")||"com.apple.quicktime.HLS",v="YES"==Qx(g,"END-ON-NEXT");if(null==m&&v){for(var y=c+1;yk){m=Math.max(0,C-f);break}}}if(null==m)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var E=[],H=t(g.attributes),B=H.next();!B.done;B=H.next()){var D=B.value;if(!y.includes(D.name)){var I= $x(D.value,d);if("X-ASSET-URI"==D.name||"X-ASSET-LIST"==D.name)I=Yx(e(),D.value,d)[0];E.push({key:D.name,description:"",data:I,mimeType:null,pictureType:null})}}if(1B)if(D){D=yd(D,"t",Gd);if(null==D)break;else if(I>=D)break;B=Math.ceil((D-I)/K)-1}else{if(Infinity==z)break;else if(I/v>=z)break;B=Math.ceil((z*v-I)/K)-1}for(D=0;D<=B;++D)E=I+K,C.push({start:I/v,end:E/v,xh:I}),I=E}v=C;y=t(y);for(z=y.next();!z.done;z=y.next())(z=Jz(a,w,z.value,v,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=wc||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 Nz(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 Oz(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""} function Pz(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={Ef:void 0},g=e.next())h.Ef=g.value,d.push(new rj(h.Ef.start,h.Ef.end,function(k){return function(){return qc(a.l,[f.replace("{start time}",String(k.Ef.xh))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}T("shaka.mss.MssParser",Gz); var Lz="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Kz=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");ti("application/vnd.ms-sstr+xml",function(){return new Gz});function Qz(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=dc(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,f,a,g,e||d);};function Rz(){} function Sz(a,b,c,d,e,f){var g=new Tz;Yg(b.headers).forEach(function(m,n){g.append(n,m)});var h=new Uz,k={Ih:!1,Wi:!1};a=Vz(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 vg(a,function(){k.Ih=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new af(function(){k.Wi=!0;h.abort()});l.ha(b/1E3);a.finally(function(){l.stop()})}return a} function Vz(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,w,v,y,z,A,C,E,H,B;return Q(function(D){switch(D.g){case 1:return l=Wz,m=Xz,q=new ArrayBuffer(0),u=r=0,w={},v=Date.now(),wa(D,2),F(D,l(a,d),4);case 4:n=D.h;w=Yz(n.headers);g(w);if("HEAD"==d.method){D.u(5);break}z=(y=n.headers.get("Content-Length"))?parseInt(y,10):0;if(!n.body)return F(D,n.arrayBuffer(),9);A=n.clone().body.getReader();C=function(I){function K(){var J,L,N,O;return Q(function(M){switch(M.g){case 1:return wa(M,2),F(M,A.read(),4);case 4:J= M.h;za(M,3);break;case 2:return Aa(M),M.return();case 3:if(J.done){M.u(5);break}r+=J.value.byteLength;if(!h){M.u(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?I.close():(I.enqueue(J.value),K());G(M)}})}K()};new m({start:C});return F(D,n.arrayBuffer(),8);case 8:q=D.h;D.u(5);break;case 9:q=D.h,E=Date.now(),f(E-v,q.byteLength,0);case 5:b.headers.Range&&(H=b.headers.Range.replace("bytes=","").split("-").filter(function(I){return I}).map(function(I){return parseInt(I, 10)}),2==H.length&&q.byteLength!=H[1]-H[0]+1&&bb("Payload length does not match range requested bytes",b,n));za(D,3);break;case 2:B=Aa(D);if(e.Ih)throw new U(1,1,7001,a,c);if(e.Wi)throw new U(1,1,1003,a,c);throw new U(1,1,1002,a,B,c);case 3:return D.return(Qz(w,q,n.status,a,n.url,b,c))}})}function Yz(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b} function Zz(){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)}T("shaka.net.HttpFetchPlugin",Rz);Rz.isSupported=Zz;Rz.parse=Sz;var Wz=window.fetch,Uz=window.AbortController,Xz=window.ReadableStream,Tz=window.Headers;Zz()&&(Ig("http",Sz,2,!0),Ig("https",Sz,2,!0),Ig("blob",Sz,2,!0));function $z(){} function aA(a,b,c,d,e,f){var g=new bA,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 U(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=Qz(q,w,g.status,a,g.responseURL,b,c);m(v)}catch(y){n(y)}};g.onerror=function(u){n(new U(1,1,1002,a,u,c))};g.ontimeout=function(){n(new U(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 vg(l,function(){g.abort();return Promise.resolve()})}T("shaka.net.HttpXHRPlugin",$z);$z.parse=aA;var bA=window.XMLHttpRequest;Ig("http",aA,1,!0);Ig("https",aA,1,!0);Ig("blob",aA,1,!0);function cA(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function dA(a){var b=a.Wb(!1);return b?lc(b):a.O().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.startByte+":"+a.endByte}function eA(a,b){return tm(a.g.O(),a.g.startByte,a.g.endByte,b.streaming.retryParameters)};function fA(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function gA(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}fA.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 hA(a){return 0==a.i?0:a.j/a.i};function iA(a){var b=this;this.s=a;this.i=new Map;this.h=new Ug(function(){return jA(b).catch(function(){})});this.j=[];this.o=function(){};this.m=function(){};this.g=new fA;this.l=!1}iA.prototype.destroy=function(){return this.h.destroy()};function kA(a,b,c){a.o=b;a.m=c}function jA(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)} iA.prototype.queue=function(a,b,c,d,e){var f=this;Vg(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,lA(f,b),2);h=u.h;if(f.h.g)throw new U(2,9,7001);if(d)for(m in k=Tb(h),l=new nh(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.o(hA(f.g),f.g.g);return u.return(e(h))})});this.i.set(a,g);return g}; function mA(a,b,c,d,e,f){Vg(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new U(2,9,7001);if(e){var h=Tb(c);h=new nh(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.o(hA(a.g),a.g.g);return f(c)});a.i.set(b,g)}function nA(a){return Q(function(b){return 1==b.g?F(b,Promise.all(a.i.values()),2):b.return(a.g.g)})} function lA(a,b){var c,d,e,f;return Q(function(g){if(1==g.g)return c=Sg,d=a.s.request(c,b),e=function(){return d.abort()},a.j.push(e),F(g,d.promise,2);f=g.h;Uc(a.j,e);return g.return(f.data)})};function oA(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new ug;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}oA.prototype.abort=function(){var a=this;return Q(function(b){if(1==b.g){try{a.i.abort()}catch(c){}wa(b,2);return F(b,a.g,4)}if(2!=b.g)return za(b,0);Aa(b);G(b)})}; function pA(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();G(g)})}})}oA.prototype.store=function(){return this.h};oA.prototype.promise=function(){return this.g};function qA(a){this.h=a;this.g=[]}qA.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function rA(a,b){return sA(a,b,"readwrite")}function sA(a,b,c){c=a.h.transaction([b],c);var d=new oA(c,b);a.g.push(d);d.promise().then(function(){Uc(a.g,d)},function(){Uc(a.g,d)});return d};function tA(a,b,c){this.h=new qA(a);this.i=b;this.g=c}p=tA.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return uA(this.i)};p.removeSegments=function(a,b){return vA(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,wA(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Kh(e)}))})};p.addManifests=function(){return uA(this.g)}; p.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function xA(a,b,c){a=rA(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=rA(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 vA(this,this.g,a,b)}; p.getManifests=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,wA(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Hd(e)})))})};p.getAllManifests=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=sA(a.h,a.g,"readonly"),c=new Map,F(d,pA(b,function(e,f){var g;return Q(function(h){if(1==h.g)return F(h,a.Hd(f),2);g=h.h;c.set(e,g);G(h)})}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};p.Kh=function(a){return a};p.Hd=function(a){return Promise.resolve(a)}; function uA(a){return Promise.reject(new U(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=rA(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={Xg:void 0},h=g.next())l=h.value,k.Xg=e.add(l),k.Xg.onsuccess=function(n){return function(){f.push(n.Xg.result)}}(k);return F(m,d.promise(),2)}return m.return(f)})}; function vA(a,b,c,d){a=rA(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={Jg:void 0},e=c.next())f.Jg=e.value,b.delete(f.Jg).onsuccess=function(g){return function(){return d(g.Jg)}}(f);return a.promise()} function wA(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=sA(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={xf:void 0,Ze:void 0},k=h.next())l.Ze=k.value,l.xf=e.get(l.Ze),l.xf.onsuccess=function(n){return function(){void 0==n.xf.result&&g.push(n.Ze);f[n.Ze]=n.xf.result}}(l);return F(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function yA(a){this.g=new qA(a)}yA.prototype.destroy=function(){return this.g.destroy()};yA.prototype.getAll=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=sA(a.g,"session-ids","readonly"),c=[],F(d,pA(b,function(e,f){c.push(f)}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};yA.prototype.add=function(a){var b=rA(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()}; yA.prototype.remove=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=rA(b.g,"session-ids"),F(d,pA(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):F(d,c.promise(),0)})};function zA(){this.g=new Map}zA.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)};zA.prototype.init=function(){var a=this;AA.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 BA(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Pb:d,bb:f},bb:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function CA(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Pb:d,bb:f},e)})})} function DA(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function EA(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function FA(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()} function GA(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.u(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ba(m),F(m,e.destroy(),10);case 10:Da(m,0);break;case 2:Aa(m),m.u(3)}})}; p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};ti("application/x-offline-manifest",function(){return new aB});function bB(){}function cB(a,b){var c=UA(a);c&&"manifest"==c.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=yg(a)):a=c&&"segment"==c.g?dB(c.key(),c,b):wg(new U(2,1,9004,a));return a} function dB(a,b,c){var d=new zA;return yg(void 0).Ua(function(){return d.init()}).Ua(function(){return DA(d,b.Pb(),b.bb())}).Ua(function(e){return e.getSegments([b.key()])}).Ua(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}T("shaka.offline.OfflineScheme",bB);bB.plugin=cB;Ig("offline",cB);function eB(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,fB(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.u(4);break}g=f.value;h=gB(a,b,g);return F(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})} function gB(a,b,c){var d,e;return Q(function(f){switch(f.g){case 1:return d=new ph({pc:b,onError:function(){},nf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),wa(f,2),d.configure(a),F(f,Ah(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Aa(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 wa(h,2),F(h,Mh(d,g),4);if(2!=h.g)return e.push(g),za(h,0);Aa(h);G(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function fB(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Vc(a.audioCapabilities,b.audioCapabilities,c)&&Vc(a.videoCapabilities,b.videoCapabilities,c)};function hB(a,b,c){var d=b.presentationTimeline.getDuration();b=iB(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function jB(a,b){var c=WA(new VA(a.Pb(),a.bb()),b),d=b.appMetadata||{};c=iB(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 iB(a){var b=[],c=ag(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Of(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Pf(c.value));return b};function kB(){this.g=new Map}function lB(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 mB(a,b){a.g.set(b.id,b.bandwidth||2048)}function nB(a,b){a=a.g.get(b);null==a&&(a=0);return a};function oB(a){var b=this;if(a&&a.constructor!=Y)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Nb()):(this.h=En(),this.g=new Hg,this.g.configure(this.h.networking));this.i=[];this.l=[];var c=!a;this.j=new Ug(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 jA(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.u(4); break}return F(k,b.g.destroy(),4);case 4:b.h=null,b.g=null,G(k)}})});this.m=1E9}function pB(){if(wi(rb()))a:{var a=t(AA.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=oB.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=kn(a,b));return Jn(this.h,a)};p.getConfiguration=function(){var a=En();Jn(a,this.h,En());return a};p.Nb=function(){return this.g}; p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new iA(this.g);this.l.push(h);b=qB(this,a,b||{},d||[],e||[],function(){var k;return Q(function(l){if(1==l.g)return c?l.u(2):F(l,Do(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=yi(a,c||null);return l.return(k())})},g,h);b=new vg(b,function(){return jA(h)});b.finally(function(){Uc(f.l,h)});return rB(this,b)}; function qB(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M;return Q(function(P){switch(P.g){case 1:return sB(),l=k=null,m=new zA,r=q=n=null,wa(P,2,3),F(P,f(),5);case 5:return k=P.h,F(P,tB(a,b,k,g),6);case 6:u=P.h;uB(a);w=!u.presentationTimeline.V()&&!u.presentationTimeline.Sc();if(!w)throw new U(2,9,9005,b);v=t(d);y=v.next();case 7:if(y.done){P.u(9);break}z=y.value;return F(P,vB(a,z,u),10);case 10:A=P.h;u.imageStreams.push(A);uB(a);y=v.next();P.u(7);break;case 9:C=t(e),E=C.next(); case 11:if(E.done)return Ch(g.drm.clearKeys,u.variants),D=u.variants.some(function(R){if(R.audio)for(var S=t(R.audio.drmInfos),aa=S.next();!aa.done;aa=S.next())if(aa.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=t(R.video.drmInfos),S=R.next();!S.done;S=R.next())if(S.value.licenseServerUri.startsWith("data:"))return!0;return!1}),I=g.offline.usePersistentLicense,D&&(I=!1),F(P,a.ed(u,function(R){r=r||R},g,I),15);H=E.value;return F(P,wB(a,u,H.uri,H.language,H.kind,H.mime,H.codecs), 14);case 14:B=P.h;u.textStreams.push(B);uB(a);E=C.next();P.u(11);break;case 15:l=P.h;uB(a);if(r)throw r;return F(P,xB(u,l,g,I),16);case 16:return F(P,m.init(),17);case 17:return uB(a),F(P,BA(m),18);case 18:return n=P.h,uB(a),K=yB(l,u,b,c,g,h,I),J=K.jk,L=K.uh,F(P,n.bb.addManifests([J]),19);case 19:N=P.h;uB(a);q=N[0];uB(a);if(r)throw r;return F(P,zB(a,L,q,J,h,g,n.bb,u,l,I),20);case 20:return uB(a),AB(u,J,l,I),F(P,n.bb.updateManifest(q,J),21);case 21:return uB(a),O=new TA("manifest",n.path.Pb,n.path.bb, q),P.return(jB(O,J));case 3:return Ba(P),F(P,m.destroy(),22);case 22:if(!k){P.u(23);break}return F(P,k.stop(),23);case 23:if(!l){P.u(25);break}return F(P,l.destroy(),25);case 25:Da(P,0);break;case 2:M=Aa(P);if(null==q){P.u(27);break}return F(P,BB(q),27);case 27:throw r||M;}})} function zB(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,u,w,v,y,z,A,C;return Q(function(E){switch(E.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new U(2,9,7001);};r=function(H,B){var D,I,K,J,L,N,O,M,P;return Q(function(R){if(1==R.g){D=t(H);I=D.next();for(K={};!I.done;K={hc:void 0},I=D.next())K.hc=I.value,q(),J=eA(K.hc,f),L=K.hc.i,N=K.hc.h,O=function(S){return function(aa){var W,Fa,Ga,ya;return Q(function(qa){switch(qa.g){case 1:W=S.hc.g;Fa=W.Wb(!1);if(!W.aesKey||Fa){qa.u(2);break}return F(qa,sm(aa,W.aesKey, S.hc.j),3);case 3:aa=qa.h;case 2:return Ga=dA(W),F(qa,g.addSegments([{data:aa}]),4);case 4:ya=qa.h,q(),m[Ga]=ya[0],n+=aa.byteLength,G(qa)}})}}(K),M=K.hc.g,(P=M.Wb(!1))?mA(e,K.hc.groupId,P,L,N,O):e.queue(K.hc.groupId,J,L,N,O);return F(R,nA(e),2)}q();if(!B||e.l)return R.u(0);AB(h,d,k,l);return F(R,g.updateManifest(c,d),0)})};u=!1;wa(E,2);if(!CB(h)||!u||DB(h)){E.u(4);break}return F(E,r(b.filter(function(H){return H.h}),!0),5);case 5:return q(),b=b.filter(function(H){return!H.h}),w=m,v=n,m={},n=0,F(E, EB(g,c,d,w,v,function(){return uB(a)}),6);case 6:q();case 4:if(u){E.u(7);break}return F(E,r(b,!1),8);case 8:return q(),y=m,z=n,m={},n=0,F(E,EB(g,c,d,y,z,function(){return q()}),9);case 9:q();case 7:za(E,0);break;case 2:return A=Aa(E),C=Object.values(m),F(E,g.removeSegments(C,function(){}),10);case 10:throw A;}})} function BB(a){var b,c,d,e;return Q(function(f){switch(f.g){case 1:return b=new zA,F(f,b.init(),2);case 2:return F(f,BA(b),3);case 3:return c=f.h,d=new TA("manifest",c.path.Pb,c.path.bb,a),F(f,b.destroy(),4);case 4:return e=new oB,F(f,e.remove(d.toString()),0)}})} function EB(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;wa(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();za(y,0);break;case 2:return w=Aa(y),F(y,BB(b),5);case 5:if(g){y.u(6);break}v=Object.values(d);return F(y,a.removeSegments(v,function(){}),6);case 6:throw w;}})} function xB(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R;return Q(function(S){switch(S.g){case 1:return e={width:Infinity,height:Infinity},tf(a,c.restrictions,e),F(S,wf(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;rf(a,h,k,g,l);m=t(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(Of(q));r=t(a.textStreams);for(u=r.next();!u.done;u= r.next())w=u.value,f.push(Pf(w));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())z=y.value,f.push(Qf(z));return F(S,c.offline.trackSelectionCallback(f),3);case 3:A=S.h;C=a.presentationTimeline.getDuration();E=0;H=t(A);for(B=H.next();!B.done;B=H.next())D=B.value,I=D.bandwidth*C/8,E+=I;wa(S,4);return F(S,c.offline.downloadSizeCallback(E),6);case 6:K=S.h;if(!K)throw new U(2,9,9014);za(S,5);break;case 4:J=Aa(S);if(J instanceof U)throw J;throw new U(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(aa){return L.has(aa.id)});a.textStreams=a.textStreams.filter(function(aa){return N.has(aa.id)});a.imageStreams=a.imageStreams.filter(function(aa){return O.has(aa.id)});FB(a);G(S)}})} function yB(a,b,c,d,e,f,g){var h=hB(c,b,d),k=e.offline.progressCallback;kA(f,function(u,w){h.size=w;k(h,u)},function(u,w){l&&g&&m==w&&Ih(a,"cenc",u)});var l=CB(b)&&!DB(b),m=null;l&&(m=GB.get(a.g.keySystem));for(var n=new kB,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())mB(n,r.value);q=t(b.variants);for(r=q.next();!r.done;r=q.next())lB(n,r.value);f=HB(f,n,b,e);e=f.streams;f=f.uh;(n=a.g)&&g&&(n.initData=[]);return{jk:{creationTime:Date.now(), originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Nd(),streams:e,sessionIds:g?Rh(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},uh:f}}function CB(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})} function DB(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 AB(a,b,c,d){b.expiration=c.Nd();c=Rh(c);b.sessionIds=d?c:[];if(CB(a)&&d&&!c.length)throw new U(2,9,9007);}p.remove=function(a){return IB(this,JB(this,a))}; function JB(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:sB();c=UA(b);if(null==c||"manifest"!=c.g)throw new U(2,9,9004,b);d=c;e=new zA;xa(k,2);return F(k,e.init(),4);case 4:return F(k,DA(e,d.Pb(),d.bb()),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([KB(a,h,e),LB(f,d,h)]),2);case 2:return Ba(k),F(k,e.destroy(),8);case 8:Da(k,0)}})} function MB(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:Ee(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Ee(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function KB(a,b,c){return Q(function(d){return F(d,NB(a.g,a.h.drm,c,b),0)})} function LB(a,b,c){function d(){}var e=OB(c);jB(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Gk=function(){return IB(this,PB(this))}; function PB(a){var b,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return sB(),b=a.g,c=a.h.drm,d=new zA,e=!1,xa(n,2),F(n,d.init(),4);case 4:f=[],EA(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,eB(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.u(5);break;case 2:return Ba(n),F(n,d.destroy(),11);case 11:Da(n,3);break;case 3:return n.return(!e)}})} p.list=function(){return IB(this,QB())};function QB(){var a,b,c;return Q(function(d){switch(d.g){case 1:return sB(),a=[],b=new zA,xa(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),CA(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=jB(new TA("manifest",e.Pb,e.bb,l),k);a.push(k)});G(h)})})}),F(d,c,2);case 2:return Ba(d),F(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})} function tB(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),uB(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,uB(a),k=RB(h),F(l,Promise.all(Wg(k,function(m){return m.createSegmentIndex()})),3);uB(a);if(e)throw e;return l.return(h)})} function vB(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,SB(a,b),2);case 2:d=z.h;if("text/vtt"!=d)throw new U(1,2,2017,b);return F(z,TB(b,a.g,a.h.streaming.retryParameters),3);case 3:e=z.h;f=Te(d);if(!f)throw new U(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Tb(e);l=g.parseMedia(k,h,b,[]);m=[];n=t(l);q=n.next();for(r={};!q.done;r={Kf:void 0,gd:void 0},q=n.next())r.gd=q.value,r.Kf=null, u=function(A){return function(){null==A.Kf&&(A.Kf=qc([b],[A.gd.payload]));return A.Kf||[]}}(r),w=new rj(r.gd.startTime,r.gd.endTime,u,0,null,null,0,0,Infinity),r.gd.payload.includes("#xywh")&&(v=r.gd.payload.split("#xywh=")[1].split(","),4===v.length&&w.Df({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.u(4);break}return F(z,Do(m[0].O()[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 Jl(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([Ee(y|| "","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})} function wB(a,b,c,d,e,f,g){var h,k,l;return Q(function(m){if(1==m.g)return f?m.u(2):F(m,SB(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ll(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:wc,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([Ee(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=Ee(h.mimeType,h.codecs);l=Ue(k);if(!l)throw new U(2,2,2014,f);return m.return(h)})} function SB(a,b){var c;return Q(function(d){switch(d.g){case 1:return wa(d,2),F(d,Do(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;za(d,3);break;case 2:Aa(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}function TB(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=Sg,e=Mg([a],c),e.method="GET",F(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})} p.ed=function(a,b,c,d){var e=this,f;return Q(function(g){return 1==g.g?(f=new ph({pc:e.g,onError:b,nf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),F(g,xh(f,a.variants,d),2)):3!=g.g?F(g,Kh(f),3):g.return(f)})}; function HB(a,b,c,d){var e=new Map,f=RB(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=UB(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()),uh:Array.from(e.values())}} function UB(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;VB(d,c.presentationTimeline.Fb(),function(l,m){var n=dA(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=nB(b,d.id)*r;r=gA(a.g,r);f.set(n,new cA(l,r,k,!1,m))}l.Y&&(q=dA(l.Y),f.has(q)||(r=.5*nB(b, d.id),r=gA(a.g,r),f.set(q,new cA(l.Y,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 VB(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 uB(a){if(a.j.g)throw new U(2,9,7001);}function sB(){if(!pB())throw new U(2,9,9E3);}function IB(a,b){return Q(function(c){if(1==c.g)return a.i.push(b),xa(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);Ba(c);Uc(a.i,b);return Da(c,0)})}function rB(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Uc(a.i,c)})} function OB(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 NB(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=FA(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:MB(d,!1),videoCapabilities:MB(d,!0)}});return F(h,eB(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 RB(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 FB(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());}T("shaka.offline.Storage",oB);oB.deleteAll=function(){var a;return Q(function(b){return 1==b.g?(a=new zA,xa(b,2),F(b,GA(a),2)):5!=b.g?(Ba(b),F(b,a.destroy(),5)):Da(b,0)})}; oB.prototype.list=oB.prototype.list;oB.prototype.removeEmeSessions=oB.prototype.Gk;oB.prototype.remove=oB.prototype.remove;oB.prototype.store=oB.prototype.store;oB.prototype.getNetworkingEngine=oB.prototype.Nb;oB.prototype.getConfiguration=oB.prototype.getConfiguration;oB.prototype.configure=oB.prototype.configure;oB.prototype.destroy=oB.prototype.destroy;oB.support=pB; var GB=(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"); bq("offline",pB);function WB(){}function XB(a,b){a={priority:b||0,callback:a};for(b=0;b=b?(qC(),rC()):15>=b&&qC());a=t(a.ui());for(b=a.next();!b.done;b=a.next())sC(b.value);(window.MediaSource||window.ManagedMediaSource)&&tC();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&uC()} function qC(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Oa.apply(0,arguments));b.abort=function(){};return b}}function rC(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}} function tC(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Ie(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Ie(c)&&b(c)}}} function sC(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return Le(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return Le(d)!=a&&c(d)}}} function uC(){var a=MediaSource.isTypeSupported;rb().Ti()&&(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)})}WB.MediaSource=oC;oC.install=pC;XB(pC);function vC(){}function wC(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?xC():void 0!=window.orientation&&yC())}function xC(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})} function yC(){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 zC;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new V("change");b.dispatchEvent(c)})}WB.Orientation=vC;vC.install=wC;function zC(){Eg.call(this);this.type="";this.angle=0}pa(zC,Eg); zC.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)}; zC.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};XB(wC);function AC(){}var BC,CC,DC,EC,FC,GC; function HC(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=IC){if(void 0===a?0:a)BC=!0,CC=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),DC=HTMLMediaElement.prototype.setMediaKeys,EC=window.MediaKeys,FC=window.MediaKeySystemAccess,GC=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=JC;window.MediaKeys=KC;window.MediaKeySystemAccess= LC;navigator.requestMediaKeySystemAccess=MC;window.shakaMediaKeysPolyfill=IC;Ef.clear();qg.clear()}}function MC(a,b){try{var c=new LC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function JC(a){var b=this.mediaKeys;b&&b!=a&&NC(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?NC(a,this):Promise.resolve()} function OC(a){a=Tb(a.initData);if(Yb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=bc(a.subarray(4),!0);a=ec(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ub(a);this.dispatchEvent(b)}WB.PatchedMediaKeysApple=AC; AC.uninstall=function(){window.shakaMediaKeysPolyfill==IC&&BC&&(BC=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",CC),HTMLMediaElement.prototype.setMediaKeys=DC,window.MediaKeys=EC,window.MediaKeySystemAccess=FC,navigator.requestMediaKeySystemAccess=GC,CC=GC=DC=FC=EC=null,window.shakaMediaKeysPolyfill="",Ef.clear(),qg.clear())};AC.install=HC; function LC(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;} LC.prototype.createMediaKeys=function(){var a=new KC(this.keySystem);return Promise.resolve(a)};LC.prototype.getConfiguration=function(){return this.g};function KC(a){this.h=new WebKitMediaKeys(a);this.g=new jb}KC.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new PC(this.h,a)};KC.prototype.setServerCertificate=function(){return Promise.resolve(!1)}; function NC(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",OC);try{return sl(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}KC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function PC(a){Eg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new jb;this.sessionId="";this.expiration=NaN;this.closed=new ug;this.keyStatuses=new QC}pa(PC,Eg);p=PC.prototype; p.generateRequest=function(a,b){var c=this;this.h=new ug;try{var d=this.l.createSession("video/mp4",Tb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Bc()?"license-request":"license-renewal").set("message",Ub(e.message));e=new V("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(RC(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(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:RC(c,"output-not-allowed");break;default:RC(c,"internal-error")}});RC(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 ug;try{this.i.update(Tb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}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 RC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new V("keystatuseschange");a.dispatchEvent(b)} function QC(){this.size=0;this.g=void 0}p=QC.prototype;p.Bc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,pg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=pg.value();return this.g&&Sb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var IC="apple";XB(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||HC())});function SC(){}function TC(){if(window.MediaKeys){var a=rb();MediaKeys.prototype.setServerCertificate&&a.ge()||(MediaKeys.prototype.setServerCertificate=UC)}}function UC(){return Promise.resolve(!1)}WB.PatchedMediaKeysCert=SC;SC.install=TC;XB(TC);function VC(){} function WC(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)XC="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=YC;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ZC;window.MediaKeys=$C;window.MediaKeySystemAccess=aD;window.shakaMediaKeysPolyfill=bD}} function cD(a){var b=XC;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function YC(a,b){try{var c=new aD(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ZC(a){var b=this.mediaKeys;b&&b!=a&&dD(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&dD(a,this);return Promise.resolve()}WB.PatchedMediaKeysWebkit=VC;VC.install=WC; function aD(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;}aD.prototype.createMediaKeys=function(){var a=new $C(this.g);return Promise.resolve(a)};aD.prototype.getConfiguration=function(){return this.h};function $C(a){this.l=a;this.h=null;this.g=new jb;this.i=[];this.j=new Map} function dD(a,b){a.h=b;a.g.Qa();var c=XC;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ub(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=eD(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Bc()?"licenserequest":"licenserenewal").set("message",d.message),d=new V("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=eD(a,d.sessionId))&&d.ready()}), a.g.D(b,c+"keyerror",function(d){var e=eD(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?fD(e,"output-restricted"):1==f?fD(e,"expired"):fD(e,"internal-error"))}}))} $C.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 gD(b,this.l,a);this.i.push(a);return a};$C.prototype.setServerCertificate=function(){return Promise.resolve(!1)};$C.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")}; function eD(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 gD(a,b,c){Eg.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 ug;this.keyStatuses=new hD}pa(gD,Eg);p=gD.prototype;p.ready=function(){fD(this,"usable");this.g&&this.g.resolve();this.g=null}; function iD(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=Tb(ec("LOAD_SESSION|"+c));else{var e=ec("PERSISTENT|");d=pc(e,b)}else d=Tb(b)}catch(g){return Promise.reject(g)}a.h=new ug;var f=cD("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new af(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).ha(.01)}return a.h} function jD(a,b,c){if(a.g)a.g.then(function(){return jD(a,b,c)}).catch(function(){return jD(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=ac(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=mc(e.keys[0].k);e=mc(e.keys[0].kid)}else d=Tb(c),e=null;var f=cD("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}} function fD(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new V("keystatuseschange");a.dispatchEvent(b)}p.generateRequest=function(a,b){return iD(this,b,null)};p.load=function(a){return"persistent-license"==this.l?iD(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new ug;jD(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=cD("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 hD(){this.size=0;this.g=void 0}p=hD.prototype;p.Bc=function(){return this.g}; p.forEach=function(a){this.g&&a(this.g,pg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=pg.value();return this.g&&Sb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var XC="",bD="webkit";XB(WC);function kD(){}function lD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=mD,Object.defineProperty(a,"disablePictureInPicture",{get:nD,set:oD,enumerable:!0,configurable:!0}),document.exitPictureInPicture=pD,document.addEventListener("webkitpresentationmodechanged",qD,!0))}} function qD(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 mD(){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 pD(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))} function nD(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function oD(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}WB.PiPWebkit=kD;kD.install=lD;XB(lD);function rD(){}function sD(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=tD))}function tD(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}WB.RandomUUID=rD;rD.install=sD;XB(sD);function uD(){}function vD(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:wD})}function wD(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}WB.Symbol=uD;uD.install=vD;XB(vD);function xD(){}function yD(){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=zD),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=AD),b.prototype.includes||(b.prototype.includes=BD)}function zD(a,b){return Array.prototype.indexOf.call(this,a,b)}function AD(a,b){return Array.prototype.lastIndexOf.call(this,a,b)} function BD(a,b){return-1!==this.indexOf(a,b)}WB.TypedArray=xD;xD.install=yD;XB(yD);function CD(){}function DD(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}WB.VideoPlayPromise=CD;CD.install=DD;XB(DD);function ED(){}function FD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||"number"===typeof xi().webkitDroppedFrameCount)&&(a.getVideoPlaybackQuality=GD)}}function GD(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}WB.VideoPlaybackQuality=ED;ED.install=FD;XB(FD);function HD(){}function ID(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=JD;else if(6==b)a=KD;else{try{var c=!!JD(1,2,"")}catch(d){c=!1}c&&(a=JD)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function JD(a,b,c){return new window.TextTrackCue(a,b,c)}function KD(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}WB.VTTCue=HD;HD.install=ID;XB(ID);function LD(a){Eg.call(this);this.h=a;this.l=null;this.g=[];this.i=-1;this.j=null;this.m=new jb}pa(LD,Eg);p=LD.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);Eg.prototype.release.call(a);G(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 U(2,7,7007);c=b.g[a];b.i!=a&&(b.i=a,b.dispatchEvent(new V("currentitemchanged")));d=b.h.h;e=b.l?b.l.preloadNextUrlWindow:0;0=b.g.length||f||b.h.V()||!d.duration)return E.return();y=b.h.Ra().end-d.currentTime;if(isNaN(y)){E.u(0);break}if(!(y<=e)){E.u(0);break}z= b.l&&b.l.repeatMode;A=null;b.i+1 can only be inside
in TTML");q=t(rd(e,"div"));for(r=q.next();!r.done;r=q.next())if(rd(r.value,"span").length)throw new U(2,2,2001," can only be inside

in TTML");if(b=VD(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"), a.push(b);return a}; function VD(a,b,c,d,e,f,g,h,k,l,m,n,q){var r=l;if(pd(a)){if(!m)return null;var u={tagName:"span",children:[sd(a)],attributes:{},parent:null}}else u=a;for(var w=null,v=t(WD),y=v.next();!y.done&&!(w=XD(u,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;y=Ad(u,WD,"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 Bb(n),y=new Bb(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(pd);h=[];if(!z)for(var A=t(u.children),C=A.next();!C.done;C=A.next())(C=VD(C.value,b,c,d,e,f,g,y,k,u,m,n,q))&&h.push(C);d=null!=l;n=sd(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=YD(u,c);n=q.start;for(q=q.end;r&&r.tagName&&"tt"!=r.tagName;)q=ZD(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?zd(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 ZD(a,b,c,d){a=YD(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 YD(a,b){var c=mE(a.attributes.begin,b),d=mE(a.attributes.end,b);a=mE(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}} function mE(a,b){var c=null;if(nE.test(a)){a=nE.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(oE.test(a))c=pE(oE,a);else if(qE.test(a))c=pE(qE,a);else if(rE.test(a))a=rE.exec(a),c=Number(a[1])/b.frameRate;else if(sE.test(a))a=sE.exec(a),c=Number(a[1])/b.g;else if(tE.test(a))c=pE(tE,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c} function pE(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 TD(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Kc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}T("shaka.text.TtmlTextParser",PD);PD.prototype.parseMedia=PD.prototype.parseMedia;PD.prototype.setManifestType=PD.prototype.setManifestType;PD.prototype.setSequenceMode=PD.prototype.setSequenceMode;PD.prototype.parseInit=PD.prototype.parseInit; function SD(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 aE=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,iE=/^(\d{1,4}(?:\.\d+)?|100)%$/,hE=/^(\d+px|\d+em|\d*\.?\d+c)$/,bE=/^(\d+)px (\d+)px$/,nE=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,oE=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,qE=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,rE=/^(\d*(?:\.\d*)?)f$/,sE=/^(\d*(?:\.\d*)?)t$/,tE=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),gE=(new Map).set("left",Yd).set("center","center").set("right", "end").set("start",Yd).set("end","end"),fE=(new Map).set("left","line-left").set("center","center").set("right","line-right"),QD=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],RD=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],WD=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Re("application/ttml+xml",function(){return new PD});function uE(){this.g=new PD}uE.prototype.parseInit=function(a){var b=!1;(new ch).box("moov",hh).box("trak",hh).box("mdia",hh).box("minf",hh).box("stbl",hh).R("stsd",jh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};uE.prototype.setSequenceMode=function(){};uE.prototype.setManifestType=function(){}; uE.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new ch).box("moof",hh).box("traf",hh).R("tfhd",function(y){e=zi(y.reader,y.flags).Kd}).R("trun",function(y){y=Ci(y.reader,y.version,y.flags);y=t(y.ah);for(var z=y.next();!z.done;z=y.next())h.push(z.value.sampleSize||e||0)}).R("subs",function(y){for(var z=y.reader,A=z.T(),C=-1,E=0;E").replace(/{\/b}/g,"").replace(/{i}/g,"").replace(/{\/i}/g,"").replace(/{u}/g,"").replace(/{\/u}/g,"")+"\n\n";return b}T("shaka.text.SrtTextParser",CE);CE.srt2webvtt=DE;CE.prototype.parseMedia=CE.prototype.parseMedia; CE.prototype.setManifestType=CE.prototype.setManifestType;CE.prototype.setSequenceMode=CE.prototype.setSequenceMode;CE.prototype.parseInit=CE.prototype.parseInit;Re("text/srt",function(){return new CE});function EE(){}EE.prototype.parseInit=function(){};EE.prototype.setSequenceMode=function(){};EE.prototype.setManifestType=function(){}; EE.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=ac(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=FE.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=GE.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(HE);else if("Style"==a){a=f.split(HE);f={};for(var g=0;g>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null} function IE(a){a=LE.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}T("shaka.text.SsaTextParser",EE);EE.prototype.parseMedia=EE.prototype.parseMedia;EE.prototype.setManifestType=EE.prototype.setManifestType;EE.prototype.setSequenceMode=EE.prototype.setSequenceMode;EE.prototype.parseInit=EE.prototype.parseInit;var FE=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,GE=/^\s*([^:]+):\s*(.*)/,HE=/\s*,\s*/,LE=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/; Re("text/x-ssa",function(){return new EE});function ME(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 OE(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,Ea:a,qa:e}} function SE(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 TE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=TE.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?Ec(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?rb().be()?'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=Tb(a);for(var e=Oj(a),f=e.length;fa.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Qj(a.subarray(b+2));Sj(c,2);Sj(c,3);var d=Tj(c,11)+1<<1,e=Tj(c,2);if(3==e){e=Tj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Tj(c,2);var g=Tj(c,3),h=Tj(c,1);c=Tj(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,Ea:a,qa:d}};function VE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=VE.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?Ec(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=Tb(a);for(var e=Oj(a),f=e.length;fe?Zj(c,16):Zj(c,64))}Vj(c);d=X(c);if(0===d)X(c);else if(1===d)for(Sj(c,1),Vj(c),Vj(c),d=X(c),e=0;e=q?(d=r[q-1],e=u[q-1]):255===q&&(d=Tj(c,16),e=Tj(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,Na:a,Va:d,Wa:e}} function YE(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=pc.apply(jc,x(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;gH;H++)Tj(a,2);for(H=0;HK;K++)for(var J=0;J<(3===K?2:6);J++)if(Xj(a)){var L=Math.min(64,1<<4+(K<<1));1=L?(I=N[L-1],K=O[L-1]):255===L&&(I=Tj(a,16),K=Tj(a,16)));Xj(a)&&Xj(a);Xj(a)&&(Tj(a,3),Xj(a),Xj(a)&&(Yj(a),Yj(a),Yj(a)));Xj(a)&&(X(a),X(a));Xj(a);Xj(a);Xj(a);if(L=Xj(a))X(a),X(a),X(a),X(a);if(Xj(a)&&(Tj(a,32),Tj(a,32),Xj(a)&&X(a),Xj(a))){O=!1;L=Xj(a);N=Xj(a);if(L||N){if(O=Xj(a))Yj(a),Tj(a,5),Xj(a),Tj(a,5);Tj(a,4);Tj(a,4);O&& Tj(a,4);Tj(a,5);Tj(a,5);Tj(a,5)}for(M=0;M<=f;M++){var R=!0;P=1;Xj(a)||(R=Xj(a));var S=!1;R?X(a):S=Xj(a);S||(P=X(a)+1);if(L){for(R=0;R>8;e[14]=d.hf&255;e[15]=252|d.Pg&3;e[16]=252|d.$f&3;e[17]=248|d.Zf&7;e[18]=248|d.Yf&7;e[19]=0;e[20]=0;e[21]=(d.cg&3)<<6|(d.Ng&7)<<3|(d.rh?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 dF(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*eF[14*(3===c?3-d:3===d?3:4)+e-1];f=fF[3*(3===c?0:2===c?1:2)+f];c=gF[c][d];var h=hF[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,qa:k,Ik:8*c*h}}return null} function iF(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function jF(a,b){if(b+1d;d++)this.usertype[d]!==oF[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=mF.prototype;p.destroy=function(){}; p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return Ec(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Ec(b)||Ec(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(Tb(a));if(!b.mssPrivateData)return Promise.reject(new U(2,3,3020,c?c.O()[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;Ga[1]=Fa>>16&255;Ga[2]=Fa>>8&255;Ga[3]=Fa&255;M.push(Ga);M.push(aa.fullData)}}var ya=M.length?{data:pc.apply(jc,x(M)),isKeyframe:O}:null;if(ya){null==D&&null!=L.dts&&(D=L.dts);var qa=void 0;qa=J+ 1>>24&255,id.sampleRate>>>17&255,id.sampleRate>>>8&255,id.sampleRate>>>0&255,0,0].concat(x(Wb)));for(var vw=id.sampleRate,ww=t(k.rb()),po=ww.next();!po.done;po=ww.next()){var qo=po.value,Wf=qo.data;null==mk&&null!==qo.pts&&(mk=qo.pts);for(var sh=0;sh