/*
 @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,ba=typeof Object.create=="function"?Object.create:function(a){function b(){}b.prototype=a;return new b},ca=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ca(c,a,{configurable:!0,writable:!0,value:b})}}var ha;
if(typeof Object.setPrototypeOf=="function")ha=Object.setPrototypeOf;else{var ia;a:{var ja={a:!0},ka={};try{ka.__proto__=ja;ia=ka.a;break a}catch(a){}ia=!1}ha=ia?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var la=ha;
function ma(a,b){a.prototype=ba(b.prototype);a.prototype.constructor=a;if(la)la(a,b);else for(var c in b)if(c!="prototype")if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.uj=b.prototype}function na(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}
function t(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:na(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function y(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b});
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];typeof d==="function"&&typeof d.prototype[a]!="function"&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return oa(na(this))}})}return a});function oa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
function pa(){this.o=!1;this.m=null;this.h=void 0;this.g=1;this.j=this.l=0;this.B=this.i=null}function qa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}pa.prototype.u=function(a){this.h=a};function ra(a,b){a.i={Qf:b,eg:!0};a.g=a.l||a.j}pa.prototype.return=function(a){this.i={return:a};this.g=this.j};function C(a,b,c){a.g=c;return{value:b}}pa.prototype.A=function(a){this.g=a};function E(a){a.g=0}function sa(a,b,c){a.l=b;c!=void 0&&(a.j=c)}function ta(a,b,c){a.g=b;a.l=c||0}
function ua(a,b){a.l=b||0;b=a.i.Qf;a.i=null;return b}function va(a){a.B=[a.i];a.l=0;a.j=0}function wa(a,b){var c=a.B.splice(0)[0];(c=a.i=a.i||c)?c.eg?a.g=a.l||a.j:c.A!=void 0&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function xa(a){this.g=new pa;this.h=a}function za(a,b){qa(a.g);var c=a.g.m;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ca(a)}
function Ba(a,b,c,d){try{var e=b.call(a.g.m,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.m=null,ra(a.g,g),Ca(a)}a.g.m=null;d.call(a.g,f);return Ca(a)}function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ra(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.eg)throw b.Qf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function Da(a){this.next=function(b){qa(a.g);a.g.m?b=Ba(a,a.g.m.next,b,a.g.u):(a.g.u(b),b=Ca(a));return b};this.throw=function(b){qa(a.g);a.g.m?b=Ba(a,a.g.m["throw"],b,a.g.u):(ra(a.g,b),b=Ca(a));return b};this.return=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}function Ea(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
function F(a){return Ea(new Da(new xa(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(this.g==null){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=g!=null;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}typeof h=="function"?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(this.h!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;this.h===2&&this.H();this.B()};b.prototype.H=function(){var g=this;e(function(){if(g.C()){var h=ea.console;typeof h!=="undefined"&&h.error(g.i)}},1)};b.prototype.C=
function(){if(this.o)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if(typeof k==="undefined")return!0;typeof g==="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof h==="function"?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.B=function(){if(this.g!=null){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
b.prototype.J=function(g){var h=this.j();g.Jd(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,r){return typeof q=="function"?function(u){try{l(q(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.Jd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Jd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;this.g==null?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Jd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){q[u]=v;r--;r==0&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).Jd(n(q.length-1),m),k=h.next();
while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return l==="object"&&k!==null||l==="function"}function e(k){if(!Ha(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
m=new a([[k,2],[l,3]]);if(m.get(k)!=2||m.get(l)!=3)return!1;m.delete(k);m.set(l,4);return!m.has(k)&&m.get(l)==4}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ha(k,
g)&&Ha(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ha(k,g)&&Ha(k[g],this.g)?delete k[g][this.g]:!1};return b});
fa("Map",function(a){function b(){var h={};return h.Kb=h.next=h.head=h}function c(h,k){var l=h[1];return oa(function(){if(l){for(;l.head!=h[1];)l=l.Kb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;l=="object"||l=="function"?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Ha(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!=
4||m.value[1]!="t"||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Kb:this[1].Kb,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Kb.next=l.entry,this[1].Kb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.Kb.next=
h.entry.next,h.entry.next.Kb=h.entry.Kb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Kb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||f.value[0].x!=
4||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ia(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{$f:e,v:f}}return{$f:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ia(this,b,c).$f}});
function Ja(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.values",function(a){return a?a:function(){return Ja(this,function(b,c){return c})}});
fa("Array.from",function(a){return a?a:function(b,c,d){c=c!=null?c:function(h){return h};var e=[],f=typeof Symbol!="undefined"&&Symbol.iterator&&b[Symbol.iterator];if(typeof f=="function"){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});fa("Array.prototype.keys",function(a){return a?a:function(){return Ja(this,function(b){return b})}});
fa("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}});fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
function La(a,b,c){if(a==null)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}fa("String.prototype.includes",function(a){return a?a:function(b,c){return La(this,b,"includes").indexOf(b,c||0)!==-1}});
fa("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(e<0||e>1114111||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);e<=65535?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ia(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=La(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});
var Ma=typeof Object.assign=="function"?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ha(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Ma});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push(b[d]);return c}});
fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});fa("Number.EPSILON",function(){return 2.220446049250313E-16});fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=La(this,b,"endsWith");c===void 0&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;e>0&&c>0;)if(d[--c]!=b[--e])return!1;return e<=0}});fa("Array.prototype.entries",function(a){return a?a:function(){return Ja(this,function(b,c){return[b,c]})}});fa("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});
fa("String.prototype.repeat",function(a){return a?a:function(b){var c=La(this,null,"repeat");if(b<0||b>1342177279)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});var Na=this||self;
function S(a,b){a=a.split(".");var c=Na;a[0]in c||typeof c.execScript=="undefined"||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||b===void 0?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 Oa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Oa.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 Pa(a){return a.h/(1-Math.pow(a.g,a.i))};function Qa(){this.h=new Oa(2);this.j=new Oa(5);this.g=0;this.i=128E3;this.l=16E3}Qa.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)};Qa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Qa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Pa(this.h),Pa(this.j))};function Ra(){}function Sa(){}function Ta(){}function Va(a){var b=Fa.apply(1,arguments);Wa.has(a)||(Wa.add(a),Ta.apply(Ra,y(b)))}function Xa(){}function Ya(){}var Wa=new Set;
window.console&&((new Map).set(1,function(){return console.error.apply(console,y(Fa.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,y(Fa.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,y(Fa.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,y(Fa.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,y(Fa.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,y(Fa.apply(0,arguments)))}),
Ta=function(){return console.warn.apply(console,y(Fa.apply(0,arguments)))},Sa=function(){console.error.apply(console,y(Fa.apply(0,arguments)))});function Za(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function $a(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function ab(a,b){var c;c||(c=Za);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={fg:void 0},d=a.next()){e.fg=d.value;d=b.findIndex(function(f){return function(g){return c(f.fg,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0}
function bb(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=Za);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function db(){this.g=new Map}p=db.prototype;p.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};p.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};p.remove=function(a,b){if(this.g.has(a)){var c=this.g.get(a).filter(function(d){return d!=b});this.g.set(a,c);c.length||this.g.delete(a)}};p.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};p.size=function(){return this.g.size};p.keys=function(){return Array.from(this.g.keys())};function eb(){this.g=new db}p=eb.prototype;p.release=function(){this.Xa();this.g=null};p.G=function(a,b,c,d){this.g&&(a=new fb(a,b,c,d),this.g.push(b,a))};p.Ma=function(a,b,c,d){function e(g){f.cb(a,b,e);c(g)}var f=this;this.G(a,b,e,d)};p.cb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.cb(),this.g.remove(b,e))}};
p.Xa=function(){if(this.g){for(var a=[],b=t(this.g.g.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value));a=t(a);for(b=a.next();!b.done;b=a.next())b.value.cb();this.g.g.clear()}};S("shaka.util.EventManager",eb);eb.prototype.removeAll=eb.prototype.Xa;eb.prototype.unlisten=eb.prototype.cb;eb.prototype.listenOnce=eb.prototype.Ma;eb.prototype.listen=eb.prototype.G;eb.prototype.release=eb.prototype.release;
function fb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gb(a,d);this.target.addEventListener(b,c,this.g)}fb.prototype.cb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gb(a,b){if(b==void 0)return!1;if(typeof b=="boolean")return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return hb(a)?b:b.capture||!1}
function hb(a){var b=ib;if(b==void 0){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}ib=b}return b||!1}var ib=void 0;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function jb(a){this.h=a;this.g=void 0}jb.prototype.value=function(){this.g===void 0&&(this.g=this.h());return this.g};/*
 @license
 Shaka Player
 Copyright 2025 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function T(){return kb.value()}var lb=null,mb=null,kb=new jb(function(){var a=void 0;lb&&(a=lb());!a&&mb&&(a=mb());return a});function pb(a,b){this.g=a;this.h=b}pb.prototype.toString=function(){return"v"+this.g+"."+this.h};function U(a,b){var c=new pb(5,0),d=qb,e=d.g,f=c.h-e.h;((c.g-e.g||f)>0?d.i:d.h)(d.g,c,a,b)}function rb(a,b,c,d){Ta([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function sb(a,b,c,d){Sa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var qb=null;/*
 @license
 Copyright 2008 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
var tb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
function ub(a){var b;a instanceof ub?(vb(this,a.xb),this.xc=a.xc,wb(this,a.gb),xb(this,a.Lc),this.jb=a.jb,yb(this,a.g.clone()),this.bc=a.bc):a&&(b=String(a).match(tb))?(vb(this,b[1]||"",!0),this.xc=zb(b[2]||""),wb(this,b[3]||"",!0),xb(this,b[4]),this.jb=zb(b[5]||"",!0),yb(this,b[6]||"",!0),this.bc=zb(b[7]||"")):this.g=new Ab(null)}p=ub.prototype;p.xb="";p.xc="";p.gb="";p.Lc=null;p.jb="";p.bc="";
p.toString=function(){var a=[],b=this.xb;b&&a.push(Bb(b,Cb,!0),":");if(b=this.gb){a.push("//");var c=this.xc;c&&a.push(Bb(c,Cb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Lc;b!=null&&a.push(":",String(b))}if(b=this.jb)this.gb&&b.charAt(0)!="/"&&a.push("/"),a.push(Bb(b,b.charAt(0)=="/"?Db:Eb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.bc)&&a.push("#",Bb(b,Gb));return a.join("")};
p.resolve=function(a){var b=this.clone();b.xb==="data"&&(b=new ub);var c=!!a.xb;c?vb(b,a.xb):c=!!a.xc;c?b.xc=a.xc:c=!!a.gb;c?wb(b,a.gb):c=a.Lc!=null;var d=a.jb;if(c)xb(b,a.Lc);else if(c=!!a.jb){if(d.charAt(0)!="/")if(this.gb&&!this.jb)d="/"+d;else{var e=b.jb.lastIndexOf("/");e!=-1&&(d=b.jb.substr(0,e+1)+d)}if(d==".."||d==".")d="";else if(d.indexOf("./")!=-1||d.indexOf("/.")!=-1){e=d.lastIndexOf("/",0)==0;d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];h=="."?e&&g==d.length&&f.push(""):h==
".."?((f.length>1||f.length==1&&f[0]!="")&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.jb=d:c=a.g.toString()!=="";c?yb(b,a.g.clone()):c=!!a.bc;c&&(b.bc=a.bc);return b};p.clone=function(){return new ub(this)};function vb(a,b,c){a.xb=c?zb(b,!0):b;a.xb&&(a.xb=a.xb.replace(/:$/,""))}function wb(a,b,c){a.gb=c?zb(b,!0):b}function xb(a,b){if(b){b=Number(b);if(isNaN(b)||b<0)throw Error("Bad port number "+b);a.Lc=b}else a.Lc=null}
function yb(a,b,c){b instanceof Ab?a.g=b:(c||(b=Bb(b,Hb)),a.g=new Ab(b))}function zb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Bb(a,b,c){return a!=null?(a=encodeURI(a).replace(b,Ib),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ib(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Cb=/[#\/\?@]/g,Eb=/[#\?:]/g,Db=/[#\?]/g,Hb=/[#\?@]/g,Gb=/#/g;function Ab(a){this.g=a||null}
function Jb(a){if(!a.Oa&&(a.Oa=new Map,a.$c=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(d>=0){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f);e=e||"";a.add(f,decodeURIComponent(e))}}p=Ab.prototype;p.Oa=null;p.$c=null;p.add=function(a,b){Jb(this);this.g=null;var c=this.Oa.has(a)?this.Oa.get(a):null;c||this.Oa.set(a,c=[]);c.push(b);this.$c++;return this};
p.set=function(a,b){Jb(this);this.g=null;this.Oa.has(a)?this.Oa.set(a,[b]):this.add(a,b);return this};p.get=function(a){Jb(this);return this.Oa.get(a)||[]};p.toString=function(){if(this.g)return this.g;if(!this.Oa||!this.Oa.size)return"";for(var a=[],b=t(this.Oa.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.Oa.get(d);for(var e=0;e<d.length;e++){var f=c;d[e]!==""&&(f+="="+encodeURIComponent(d[e]));a.push(f)}}return this.g=a.join("&")};
p.clone=function(){var a=new Ab;a.g=this.g;if(this.Oa){for(var b=new Map,c=t(this.Oa),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;b.set(d,e.concat())}a.Oa=b;a.$c=this.$c}return a};function Kb(){}function Lb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=V(a);b=V(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Mb(a){return ArrayBuffer.isView(a)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function V(a,b,c){c=c===void 0?Infinity:c;return Nb(a,b===void 0?0:b,c,Uint8Array)}function Rb(a,b,c){c=c===void 0?Infinity:c;return Nb(a,b===void 0?0:b,c,Uint16Array)}function Sb(a,b,c){c=c===void 0?Infinity:c;return Nb(a,b===void 0?0:b,c,DataView)}
function Nb(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}S("shaka.util.BufferUtils",Kb);Kb.toDataView=Sb;Kb.toUint16=Rb;Kb.toUint8=V;Kb.toArrayBuffer=Mb;Kb.equal=Lb;function W(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Tb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}W.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};S("shaka.util.Error",W);var Tb=!0;W.Severity={RECOVERABLE:1,CRITICAL:2};W.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
W.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,
WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,
AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,
LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,
PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,
KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function Ub(){}
function Xb(a){if(!a)return"";a=V(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(window.TextDecoder&&!T().tf())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Sa('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;(a[c]&128)==0?d=a[c]:a.length>=c+2&&(a[c]&224)==192&&(a[c+1]&192)==128?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&(a[c]&240)==224&&(a[c+1]&192)==128&&(a[c+
2]&192)==128?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&(a[c]&241)==240&&(a[c+1]&192)==128&&(a[c+2]&192)==128&&(a[c+3]&192)==128&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(d<=65535)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 Yb(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new W(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Sb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return Zb(d)}
function $b(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=V(a);if(c[0]==239&&c[1]==187&&c[2]==191)return Xb(c);if(c[0]==254&&c[1]==255)return Yb(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return Yb(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return Yb(a,!1);if(c[1]==0&&c[3]==0)return Yb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Xb(a);throw new W(2,2,2003);}
function ac(a){if(window.TextEncoder&&!T().tf()){var b=new TextEncoder;return Mb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Mb(b)}function bc(a,b){for(var c=new ArrayBuffer(a.length*2),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(e*2,a.charCodeAt(e),b);return c}function Zb(a){return cc.value()(a)}
function dc(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\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=e[2]=="x"||e[2]=="X"?parseInt(e.substring(3),16):parseInt(e.substring(2),10),e>=0&&e<=1114111?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",Ub);Ub.resetFromCharCode=function(){cc.g=void 0};
Ub.toUTF16=bc;Ub.toUTF8=ac;Ub.fromBytesAutoDetect=$b;Ub.fromUTF16=Yb;Ub.fromUTF8=Xb;var cc=new jb(function(){function a(c){try{var d=new Uint8Array(c);return String.fromCharCode.apply(null,d).length>0}catch(e){return!1}}for(var b={Yb:65536};b.Yb>0;b={Yb:b.Yb},b.Yb/=2)if(a(b.Yb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Yb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Yb));return e}}(b);return null});function ec(){}function fc(a){a=Zb(V(a));return btoa(a)}function hc(a,b){b=b==void 0?!0:b;a=fc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function ic(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function jc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(d*2,2),16);return c}
function kc(a){var b=V(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),c.length==1&&(c="0"+c),a+=c;return a}function lc(){for(var a=Fa.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1?b.set(e,c):b.set(V(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",ec);ec.concat=lc;ec.toHex=kc;ec.fromHex=jc;ec.fromBase64=ic;ec.toBase64=hc;
ec.toStandardBase64=fc;function mc(a,b,c){c=c===void 0?"":c;if(b.length==0)return a;if(a.length==1&&b.length==1){var d=new ub(a[0]);b=new ub(b[0]);b=d.resolve(b);c&&yb(b,c);return[b.toString()]}b=b.map(function(h){return new ub(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new ub(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&yb(g,c),d.push(g.toString())}return d}
function nc(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
function oc(a){var b=b===void 0?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;k.length!=22&&(k=hc(jc(h),!1));var l=g;l.length!=22&&(l=hc(jc(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:V(ac(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function rc(a,b){if(b.length==1)return b[0];a=sc(a,b);if(a!=null)return a;throw new W(2,4,4025,b);}function sc(a,b){var c=tc.get(a);c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==uc?"":null}
function vc(a,b){var c=[];a=tc.get(a);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())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}
var uc="text",wc={sa:"video",Y:"audio",Ja:uc,ah:"image",ej:"application"},xc=1/15,tc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function yc(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.o=d;this.j=!1;a:{typeof libDPIModule==="undefined"&&Ta("Could not find LCEVC Library dependencies on this page");if(typeof LCEVCdec!=="undefined")this.h=LCEVCdec;else if(typeof LcevcDil!=="undefined")this.h=LcevcDil,this.j=!0,U("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ta("Could not find LCEVC Library on this page");a=!1;break a}typeof this.h.SupportObject==="undefined"?(Ta("Could not find LCEVC Library on this page"),
a=!1):(this.h.SupportObject.SupportStatus||Ta(this.h.SupportObject.SupportError),a=typeof this.h!=="undefined"&&typeof libDPIModule!=="undefined"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}
function zc(a,b,c,d){d.type!=="video"||a.o&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.o)}function Ac(a){a.g&&a.i.classList.add("shaka-hidden")}yc.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Bc(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}S("shaka.lcevc.Dec",yc);yc.prototype.release=yc.prototype.release;function Cc(a){if(Dc.has(a))return Dc.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),Dc.set(a,b),b):!1}function Ec(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}function Fc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var Dc=new Map;function Gc(){}Gc.prototype.extract=function(){};Gc.prototype.decode=function(){return[]};Gc.prototype.clear=function(){};Gc.prototype.getStreams=function(){return[]};function Hc(){}Hc.prototype.init=function(){};Hc.prototype.parse=function(){return[]};function Ic(){}Ic.prototype.init=function(){};Ic.prototype.m=function(){};Ic.prototype.j=function(){};Ic.prototype.remove=function(){};S("shaka.media.IClosedCaptionParser",Ic);function Jc(a){this.h=new Map;this.i=0;this.l=new Hc;if(a=Kc(a.toLowerCase()))this.l=a();this.g=new Gc;if(a=Lc)this.g=a(),this.h.set(this.i,this.g)}
Jc.prototype.init=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?-1:c;if(c!=-1&&this.i!=c){b=c;var d=this.h.get(b);this.h.set(this.i,this.g);if(d)this.g=d;else{if(d=Lc)this.g=d();this.h.set(b,this.g)}}else b||this.j();this.l.init(a);c!=-1&&(this.i=c)};Jc.prototype.m=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=V(b.packet);c.length>0&&this.g.extract(c,b.pts)}return this.g.decode()};Jc.prototype.j=function(){this.g.clear()};
Jc.prototype.remove=function(a){a=a===void 0?[]:a;a=new Set(a);for(var b=t(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=c.value,!a.has(c)){var d=this.h.get(c);d&&d.clear();this.h.delete(c)}};function Mc(a,b){Nc.set(a,b)}function Kc(a){return Nc.get(a)}S("shaka.media.ClosedCaptionParser",Jc);Jc.findDecoder=function(){return Lc};Jc.unregisterDecoder=function(){Lc=null};Jc.registerDecoder=function(a){Lc=a};Jc.findParser=Kc;Jc.unregisterParser=function(a){Nc.delete(a)};Jc.registerParser=Mc;
var Nc=new Map,Lc=null;function Oc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Pc;this.scroll=Qc}S("shaka.text.CueRegion",Oc);var Pc=1;Oc.units={PX:0,PERCENTAGE:Pc,LINES:2};var Qc="";Oc.scrollMode={NONE:Qc,UP:"up"};function Rc(a){this.h=a||"";this.g=0}function Sc(a){Tc(a,/[ \t]+/gm)}function Tc(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=b==null?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||b==null||b.position!=a.g)return null;a.g+=b.length;return b.results}function Uc(a){return a.g==a.h.length?null:(a=Tc(a,/[^ \t\n]*/gm))?a[0]:null}
function Vc(a){a=Tc(a,Wc);if(a==null)return null;var b=Number(a[2]),c=Number(a[3]);return b>59||c>59?null:(Number(a[6])||0)/1E3+c+b*60+(Number(a[1])||0)*3600}var Wc=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Xc(){}function Yc(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||ArrayBuffer.isView(d))return d;if(c.has(d))return null;var e=Array.isArray(d);if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Zc(a){var b={},c;for(c in a)b[c]=a[c];return b}
function $c(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];e!==void 0&&(e=$c(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if(typeof a=="function")a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=t(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],e!==void 0&&(e=$c(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}S("shaka.util.ObjectUtils",Xc);Xc.alphabeticalKeyOrderStringify=$c;
Xc.shallowCloneObject=Zc;Xc.cloneObject=Yc;/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function ad(a,b){var c=c===void 0?!1:c;a=$b(a);return bd(a,b,c)}function bd(a,b,c){a=cd(a,c===void 0?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function dd(a){return ed.has(a)?ed.get(a):""}
function cd(a,b){function c(f,g){g=g===void 0?!1:g;for(var h=[];a[e];)if(a.charCodeAt(e)==60){if(a.charCodeAt(e+1)===47){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(k==-1){var l=f.indexOf(".");l>0&&(k=g.indexOf(f.substring(0,l)))}if(k==-1)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(a.charCodeAt(e+1)===33){if(a.charCodeAt(e+2)==45){for(;e!==-1&&(a.charCodeAt(e)!==
62||a.charCodeAt(e-1)!=45||a.charCodeAt(e-2)!=45||e==-1);)e=a.indexOf(">",e+1);e===-1&&(e=a.length)}else if(a.charCodeAt(e+2)===91&&a.charCodeAt(e+8)===91&&a.substr(e+3,5).toLowerCase()==="cdata"){k=a.indexOf("]]\x3e",e);k==-1?(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=[];a.charCodeAt(e)!==62&&a[e];){var q=a.charCodeAt(e);if(q>64&&q<91||q>96&&q<123){q=d();for(var r=a.charCodeAt(e);r&&r!==39&&r!==34&&!(r>64&&r<91||r>96&&
r<123)&&r!==62;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(r===39||r===34){if(e===-1){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)typeof k[m]!=="string"&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(q.startsWith("xmlns:")){r=u;var v=q.split(":")[1];ed.set(r,v);fd.set(v,r)}m==="tt"&&q==="xml:space"&&u==="preserve"&&(l=!0);n[q]=u}e++}a.charCodeAt(e-1)!==47?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;
for(n=0;n<m;n++)q=k[n],typeof q!=="string"?b&&(q.parent=l):n==m-1&&q=="\n"&&k.pop();k=l}h.push(k);if(typeof k==="string")break;k.tagName[0]==="?"&&k.children&&(h.push.apply(h,y(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,e===-2&&(e=a.length),k=a.slice(k,e+1),g?k.length>0&&h.push(k):h.length&&k.length==1&&k[0]=="\n"?h.push(k):k.trim().length>0&&h.push(k),e++;return h}function d(){for(var f=e;"\r\n\t>/= ".indexOf(a[e])===-1&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
function gd(a){return typeof a==="string"}function hd(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c!=="string"&&b.push(c);return b}function id(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 jd(a){if(typeof a==="string")return dc(a);a=a.children.reduce(function(b,c){return typeof c==="string"?b+c:b},"");return a===""?null:dc(a)}
function kd(a){if(!Array.from(a.children).every(function(b){return typeof b==="string"}))return null;(a=jd(a))&&(a=a.trim());return a}function ld(a,b,c){c=c===void 0?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())ld(d.value,b,c)}return c}function md(a,b){a=id(a,b);return a.length!=1?null:a[0]}function nd(a,b,c){a=od(a,b,c);return a.length!=1?null:a[0]}
function pd(a,b,c,d){d=d===void 0?null:d;var e=null;a=a.attributes[b];a!=null&&(e=c(a));return e==null?d:e}function qd(a,b,c){b=dd(b);return a.attributes[b+":"+c]||null}function od(a,b,c){var d=dd(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 rd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=qd(a,d.value,c))return d;return null}
function sd(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 td(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 ud(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 vd(a){a=Number(a);return a%1===0?a:null}function wd(a){a=Number(a);return a%1===0&&a>0?a:null}function xd(a){a=Number(a);return a%1===0&&a>=0?a:null}function yd(a){a=Number(a);return isNaN(a)?null:a}function zd(a){return a?a.toLowerCase()==="true":!1}
function Ad(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
function Bd(a){var b=[];a=dc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Ob:c.split("/@")[1]||
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Ob=c.slice(1))}return b}
function Cd(a,b){var c=Bd(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;c==null&&(d.t!==null&&(c=Dd(a,"t",d.t)),d.n!==null&&(c=Dd(a,"n",d.n)));c===null?c=e==="prepend"?0:a.length:e==="prepend"?--c:e==="after"&&++c;e=b.tagName;(d=d.Ob)&&a[c]?Ed(a[c],e,d,kd(b)||""):(e!=="remove"&&e!=="replace"||a.splice(c,1),e!=="add"&&e!=="replace"||a.splice.apply(a,[c,0].concat(y(b.children))))}}
function Dd(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Ed(a,b,c,d){if(b==="remove")delete a.attributes[c];else if(b==="add"||b==="replace")a.attributes[c]=d}
function Fd(a){var b="",c=a.tagName.split(":");c.length>0&&(b=c[0],b=fd.has(b)?fd.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,typeof d=="string"?c=new Text(d):c=Fd(d),b.appendChild(c);return b}
function Gd(a){if(!a)return null;var b={tagName:a.tagName,attributes:Zc(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c==="string"?b.children.push(c):(c=Gd(c),c.parent=b,b.children.push(c));return b}var ed=new Map,fd=new Map;function Hd(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Oc;this.position=null;this.positionAlign=Jd;this.size=0;this.textAlign=Kd;this.direction=Ld;this.writingMode=Md;this.lineInterpretation=Nd;this.line=null;this.lineHeight="";this.lineAlign=Od;this.displayAlign=Pd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Qd;this.fontStyle=Rd;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={columns:32,rows:15}}function Sd(a,b){a=new Hd(a,b,"");a.lineBreak=!0;return a}Hd.prototype.clone=function(){var a=new Hd(0,0,""),b;for(b in this)a[b]=this[b],Array.isArray(a[b])&&(a[b]=a[b].slice());return a};
function Td(a,b){if(a.payload!=b.payload||!(Math.abs(a.startTime-b.startTime)<.001&&Math.abs(a.endTime-b.endTime)<.001))return!1;for(var c in a)if(c!="startTime"&&c!="endTime"&&c!="payload")if(c=="nestedCues"){if(!bb(a.nestedCues,b.nestedCues,Td))return!1}else if(c=="region"||c=="cellResolution")for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!bb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function Ud(a,b){b=b===void 0?new Map:b;var c=a.payload;if(c.includes("<")){b.size===0&&Vd(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)d[f]==="<"?e=f+1:d[f]===">"&&e>0&&(e=d.substr(e,f-e),e.match(Wd)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if(f[h]==="/"){var k=f.indexOf(">",h);if(k===-1){c=f;break a}if((k=f.substring(h+1,k))&&k=="v"){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,f[g]!="v"&&(g=-1)):f[h]===">"&&g>0&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=Xd(c);a.payload="";d="<span>"+c.replace(/\n/g,"<br />")+"</span>";try{var m=bd(d,"span")}catch(n){}if(m)if(m=
m.children,m.length!=1||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())Yd(c.value,a,b);else a.payload=dc(c);else a.payload=dc(c)}else a.payload=dc(c)}function Vd(a){for(var b=t(Object.entries(Zd)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Hd(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries($d));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Hd(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function Xd(a){var b={"< ":""," >":" &gt;"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}
function Yd(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Oc;d.position=null;d.size=0;d.textAlign=Kd;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=ae(g.backgroundColor,h.backgroundColor),h.color=ae(g.color,h.color),h.fontFamily=ae(g.fontFamily,h.fontFamily),
h.fontSize=ae(g.fontSize,h.fontSize),h.textShadow=ae(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=Sd(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=be;break;case "i":d.fontStyle=ce;break;case "u":d.textDecoration.push(de);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=f?Vc(new Rc(f)):null)d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(gd(a)||e.length==1&&gd(e[0]))for(c=jd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Sd(d.startTime,d.endTime),b.nestedCues.push(a)),e.length>0&&(a=d.clone(),a.payload=dc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())Yd(a.value,d,c)}function ae(a,b){return a&&a.length>0?a:b}S("shaka.text.Cue",Hd);
Hd.parseCuePayload=Ud;Hd.equal=Td;Hd.prototype.clone=Hd.prototype.clone;var Jd="auto";Hd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Jd};var Kd="center",ee={LEFT:"left",RIGHT:"right",CENTER:Kd,START:"start",END:"end"};Hd.textAlign=ee;var Pd="after",fe={BEFORE:"before",CENTER:"center",AFTER:Pd};Hd.displayAlign=fe;var Ld="ltr";Hd.direction={HORIZONTAL_LEFT_TO_RIGHT:Ld,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Md="horizontal-tb";
Hd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Md,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Nd=0;Hd.lineInterpretation={LINE_NUMBER:Nd,PERCENTAGE:1};var Od="start",ge={CENTER:"center",START:Od,END:"end"};Hd.lineAlign=ge;var Zd={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Hd.defaultTextColor=Zd;
var $d={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Hd.defaultTextBackgroundColor=$d;var Qd=400,be=700;Hd.fontWeight={NORMAL:Qd,BOLD:be};var Rd="normal",ce="italic",he={NORMAL:Rd,ITALIC:ce,OBLIQUE:"oblique"};Hd.fontStyle=he;var de="underline";Hd.textDecoration={UNDERLINE:de,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Wd=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function ie(){}ie.prototype.destroy=function(){};function je(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([ke,le,me,ne]),e=d.next();!e.done;e=d.next())if(e=oe.get(c+"-"+e.value)){var f=e.ie(),g=f.isSupported(a,b);f.destroy();if(g)return e.ie}return null}S("shaka.transmuxer.TransmuxerEngine",ie);ie.findTransmuxer=je;ie.unregisterTransmuxer=function(a,b){oe.delete(a.toLowerCase().split(";")[0]+"-"+b)};ie.registerTransmuxer=function(a,b,c){oe.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,ie:b})};
ie.prototype.destroy=ie.prototype.destroy;var oe=new Map,ne=1,me=2,le=3,ke=4;ie.PluginPriority={FALLBACK:ne,PREFERRED_SECONDARY:me,PREFERRED:le,APPLICATION:ke};function pe(){}function qe(a,b){var c=a;b&&!re.includes(a)&&(c+='; codecs="'+b+'"');return c}function se(a,b){b&&(a+='; codecs="'+b+'"');return a}function te(a,b,c){var d=qe(a,b);b=se(a,b);je(b)?(a=je(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c=a!="video/mp2t"&&c=="audio"?d.replace("video","audio"):d;return c}function ue(a){return a.split(";")[0].split("/")[1]}
function ve(a){var b=we(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case a==="mp4a"&&b==="69":case a==="mp4a"&&b==="6b":case a==="mp4a"&&b==="40.34":return"mp3";case a==="mp4a"&&b==="66":case a==="mp4a"&&b==="67":case a==="mp4a"&&b==="68":case a==="mp4a"&&b==="40.2":case a==="mp4a"&&b==="40.02":case a==="mp4a"&&b==="40.5":case a==="mp4a"&&b==="40.05":case a==="mp4a"&&b==="40.29":case a==="mp4a"&&b==="40.42":return"aac";case a==="mp4a"&&b==="a5":case a==="ac3":case a==="ac-3":return"ac-3";
case a==="mp4a"&&b==="a6":case a==="eac3":case a==="ec-3":return"ec-3";case a==="ac-4":return"ac-4";case a==="mp4a"&&b==="b2":return"dtsx";case a==="mp4a"&&b==="a9":return"dtsc";case a==="vp09":case a==="vp9":return"vp9";case a==="avc1":case a==="avc3":return"avc";case a==="hvc1":case a==="hev1":return"hevc";case a==="vvc1":case a==="vvi1":return"vvc";case a==="dvh1":case a==="dvhe":return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case a==="dvav":case a==="dva1":return"dovi-avc";case a==="dav1":return"dovi-av1";
case a==="dvc1":case a==="dvi1":return"dovi-vvc"}return a}function xe(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=we(c.value),b.push(c[0]);return b.sort().join(",")}function ye(a){return a.split(";")[0]}function ze(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Ae(a){return a==="application/x-mpegurl"||a==="application/vnd.apple.mpegurl"}
function we(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",pe);pe.getFullTypeWithAllCodecs=se;pe.getFullType=qe;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var re=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Be(a){this.i=null;this.l=a;this.C=!1;this.m=this.u=0;this.o=Infinity;this.h=this.g=null;this.D="";this.B=function(){};this.j=new Map}function Ce(a,b){De.set(a,b)}function Ee(a){return De.get(a)}function Fe(a){return De.has(a)?!0:a=="application/cea-608"||a=="application/cea-708"?!!Lc:!1}Be.prototype.destroy=function(){this.l=this.i=null;this.j.clear();return Promise.resolve()};
function Ge(a,b,c,d,e){var f,g,h,k,l,m,n;return F(function(q){if(q.g==1)return C(q,Promise.resolve(),2);if(!a.i||!a.l)return q.return();if(c==null||d==null)return a.i.parseInit(V(b)),q.return();f=a.C?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(V(b),g,e,[]);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.B(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.m&&r.startTime<a.o});a.l.append(n);a.g==null&&(a.g=Math.max(c,a.m));a.h=Math.min(d,a.o);E(q)})}
Be.prototype.remove=function(a,b,c){c=c===void 0?!1:c;var d=this;return F(function(e){if(e.g==1)return C(e,Promise.resolve(),2);if(a>=b)return e.return();c&&He(d,a,b);d.l&&d.l.remove(a,b)&&d.g!=null&&(b<=d.g||a>=d.h||(a<=d.g&&b>=d.h?d.g=d.h=null:a<=d.g&&b<d.h?d.g=b:a>d.g&&b>=d.h&&(d.h=a)),Ie(d));E(e)})};function Je(a,b,c){a.m=b;a.o=c}function Ke(a,b,c){a.D=b;if(b=a.j.get(b))b=b.filter(function(d){return d.endTime<=c}),b.length&&a.l.append(b)}
function Le(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Le(a,d.value,c)}
function Me(a,b,c){var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e=f.stream;f=f.cue;d.has(e)||d.set(e,[]);Le(a,f,c);f.startTime>=a.m&&f.startTime<a.o&&(d.get(e).push(f),e==a.D&&a.l.append([f]))}c=t(d.keys());for(b=c.next();!b.done;b=c.next())for(b=b.value,a.j.has(b)||a.j.set(b,[]),e=t(d.get(b)),f=e.next();!f.done;f=e.next())f=f.value,a.j.get(b).push(f);Ie(a)}
function He(a,b,c){for(var d=t(a.j.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f=a.j.get(e);f=f.filter(function(g){return g.startTime<b||g.endTime>=c});a.j.set(e,f)}}
function Ie(a){for(var b=Infinity,c=-Infinity,d=t(a.j.values()),e=d.next();!e.done;e=d.next()){e=t(e.value);for(var f=e.next();!f.done;f=e.next())f=f.value,b=Math.min(b,f.startTime),c=Math.max(c,f.endTime)}b!==Infinity&&c!==-Infinity&&(a.g=a.g==null?Math.max(b,a.m):Math.min(a.g,Math.max(b,a.m)),a.h=Math.max(a.h,Math.min(c,a.o)))}S("shaka.text.TextEngine",Be);Be.prototype.destroy=Be.prototype.destroy;Be.findParser=Ee;Be.unregisterParser=function(a){De.delete(a)};Be.registerParser=Ce;var De=new Map;function Ne(a){this.h=a;this.g=null}Ne.prototype.ka=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},a*1E3);return this};Ne.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Oe(a){this.h=a;this.g=null}Oe.prototype.$b=function(){this.stop();this.h();return this};Oe.prototype.ka=function(a){var b=this;this.stop();this.g=(new Ne(function(){b.h()})).ka(a);return this};Oe.prototype.Ba=function(a){var b=this;this.stop();this.g=(new Ne(function(){b.g.ka(a);b.h()})).ka(a);return this};Oe.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Oe);Oe.prototype.stop=Oe.prototype.stop;Oe.prototype.tickEvery=Oe.prototype.Ba;
Oe.prototype.tickAfter=Oe.prototype.ka;Oe.prototype.tickNow=Oe.prototype.$b;function Pe(a,b){return a.concat(b)}function Qe(){}function Re(a){return a!=null}function Se(a,b){return Promise.race([b,new Promise(function(c,d){(new Oe(d)).ka(a)})])};function Te(){}function Ue(a,b){a=Ve(a);b=Ve(b);return a.split("-")[0]==b.split("-")[0]}function We(a,b){a=Ve(a);b=Ve(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&a.length==1&&b.length==2}function Xe(a,b){a=Ve(a);b=Ve(b);a=a.split("-");b=b.split("-");return a.length==2&&b.length==2&&a[0]==b[0]}
function Ve(a){a=t(a.split("-x-"));var b=a.next().value;b=b===void 0?"":b;a=a.next().value;a=a===void 0?"":a;var c=t(b.split("-"));b=c.next().value;b=b===void 0?"":b;c=c.next().value;c=c===void 0?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=Ye.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function Ze(a,b){a=Ve(a);b=Ve(b);return b==a?4:We(b,a)?3:Xe(b,a)?2:We(a,b)?1:0}function $e(a){var b=a.indexOf("-");a=b>=0?a.substring(0,b):a;a=a.toLowerCase();return a=Ye.get(a)||a}
function af(a){return a.language?Ve(a.language):a.audio&&a.audio.language?Ve(a.audio.language):a.video&&a.video.language?Ve(a.video.language):"und"}
function bf(a,b){a=Ve(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(Ve(d.value));b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,We(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,Xe(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,We(a,b))return b;return null}S("shaka.util.LanguageUtils",Te);Te.findClosestLocale=bf;Te.getLocaleForVariant=af;
Te.getLocaleForText=function(a){return Ve(a.language||"und")};Te.getBase=$e;Te.relatedness=Ze;Te.areSiblings=function(a,b){var c=$e(a),d=$e(b);return a!=c&&b!=d&&c==d};Te.normalize=Ve;Te.isSiblingOf=Xe;Te.isParentOf=We;Te.areLanguageCompatible=Ue;Te.areLocaleCompatible=function(a,b){a=Ve(a);b=Ve(b);return a==b};
var Ye=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function cf(){}
function df(a,b,c,d,e){function f(z){var x=String(z.width||"")+String(z.height||"")+String(Math.round(z.frameRate||0))+(z.hdr||"")+z.fastSwitching;z.dependencyStream&&(x+=z.dependencyStream.baseOriginalId||"");z.roles&&(x+=z.roles.sort().join("_"));return x}function g(z){var x=z.language+(z.channelsCount||0)+(z.audioSamplingRate||0)+z.roles.join(",")+z.label+z.groupId+z.fastSwitching;z.dependencyStream&&(x+=z.dependencyStream.baseOriginalId||"");return x}if(e.length){var h=a.textStreams;e=t(e);for(var k=
e.next(),l={};!k.done;l={xf:void 0},k=e.next())if(l.xf=k.value,k=h.filter(function(z){return function(x){return x.codecs.startsWith(z.xf)||x.mimeType.startsWith(z.xf)?!0:!1}}(l)),k.length){h=k;break}a.textStreams=h}h=a.variants;if(b.length||c.length)h=ef(h,b,c);if(d.length){b=new db;c=t(h);for(h=c.next();!h.done;h=c.next())h=h.value,b.push(String(h.video.width||0),h);var m=[];b.forEach(function(z,x){z=0;var A=[];x=t(x);for(var D=x.next(),G={};!D.done;G={xe:void 0},D=x.next())G.xe=D.value,D=d.filter(function(H){return function(B){return H.xe.decodingInfos[0][B]}}(G)).length,
D>z?(z=D,A=[G.xe]):D==z&&A.push(G.xe);m.push.apply(m,y(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(z,x){return z.bandwidth-x.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=ve(q.codecs),u=ve(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 v={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(z,x){if(!z.bandwidth||!x.bandwidth||z.bandwidth==x.bandwidth){if(z.codecs&&x.codecs&&z.codecs!=x.codecs&&z.width==x.width){var A=ve(z.codecs),D=ve(x.codecs);if(A!=D)return(v[A]||1)-(v[D]||1)}return z.width-x.width}return z.bandwidth-x.bandwidth});b=Ec();var w=[];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=ve(q.codecs),u=ve(e.codecs),r!==u))continue;r=ve(q.codecs);u=ve(e.codecs);r!=u||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),w.push(e.id))}else l.push(e),w.push(e.id);c.set(k,l)}a.variants=a.variants.filter(function(z){var x=z.audio;z=z.video;return x&&!n.includes(x.id)||z&&!w.includes(z.id)?!1:!0})}
function ef(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 ff(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 gf(a,b,c,d){c=c===void 0?[]:c;d=d===void 0?{}:d;return F(function(e){if(e.g==1)return C(e,hf(a,b,b.offlineSessionIds.length>0,c,d),2);jf(b);return C(e,kf(b),0)})}
function hf(a,b,c,d,e){var f,g;return F(function(h){if(h.g==1)return T().Qg()&&lf(b.variants),C(h,mf(b.variants,c,!1,d),2);f=null;a&&(g=a.g)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=nf(k,f,e);if(!l){var m=[];k.audio&&m.push(of(k.audio));k.video&&m.push(of(k.video))}return l});E(h)})}
function lf(a){var b=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),c=new Set;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(b);for(var e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;if(a.codecs.includes(e)){a.codecs=a.codecs.replace(e,f);break}}}}
function nf(a,b,c){if(!a.decodingInfos.some(function(k){return!k.supported||b&&(k=k.keySystemAccess)&&(c[k.keySystem]||k.keySystem)!=b?!1:!0}))return!1;var d=T(),e=d.hb()==="Xbox";d=d.Ha()==="MOBILE"&&d.ua()==="GECKO";var f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(e&&f&&(g>1920||h>1080)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(e=f&&f.dependencyStream)&&!Bc(e))return!1;a=a.audio;return d&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
function pf(a,b){var c,d,e,f,g,h,k;return F(function(l){if(l.g==1){c=function(m,n){if(m){var q=Zc(m);q.supported=m.supported&&n.supported;q.powerEfficient=m.powerEfficient&&n.powerEfficient;q.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=n.keySystemAccess);return q}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,Id:void 0},g=f.next())k=g.value,h.Id=$c(k),h.cache=qf,h.cache.has(h.Id)?d=c(d,h.cache.get(h.Id)):e.push(rf(k).then(function(m){return function(n){var q=
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())q=c(q,r.value);q&&(m.cache.set(m.Id,q),d=c(d,q))}}(h)));return C(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);E(l)})}
function rf(a){var b=[""];a.video&&(b=ze(a.video.contentType).split(","));var c=[""];a.audio&&(c=ze(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={ac:void 0},g=f.next())g=g.value,h.ac=Yc(a),a.video&&(h.ac.video.contentType=qe(ye(h.ac.video.contentType),e)),a.audio&&(h.ac.audio.contentType=qe(ye(h.ac.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){(T().Ha()=="MOBILE"?Se(5,navigator.mediaCapabilities.decodingInfo(k.ac)):
navigator.mediaCapabilities.decodingInfo(k.ac)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
function mf(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,z,x,A,D,G,H;return F(function(B){switch(B.g){case 1:if(e=a.some(function(I){return I.decodingInfos.length}))return B.return();f=t(d);g=f.next();h={};case 2:if(g.done){B.A(4);break}h.ug=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){B.A(7);break}n=m.value;q=sf(n,b,c).filter(function(I){return function(O){O=O[0];return(O.keySystemConfiguration&&O.keySystemConfiguration.keySystem)===I.ug}}(h));r=t(q);u=r.next();case 8:if(u.done){B.A(10);break}v=u.value;
return C(B,pf(n,v),9);case 9:u=r.next();B.A(8);break;case 10:n.decodingInfos.some(function(I){return I.supported})&&(k=!0);m=l.next();B.A(5);break;case 7:if(k)return B.return();h={ug:void 0};g=f.next();B.A(2);break;case 4:w=t(a),z=w.next();case 12:if(z.done){B.A(0);break}x=z.value;A=sf(x,b,c).filter(function(I){I=I[0];I=I.keySystemConfiguration&&I.keySystemConfiguration.keySystem;return!I||!d.includes(I)});D=t(A);G=D.next();case 15:if(G.done){z=w.next();B.A(12);break}H=G.value;return C(B,pf(x,H),
16);case 16:G=D.next(),B.A(15)}})}
function sf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=ze(k);if(l.includes(",")&&!d){var m=l.split(","),n=ye(k);l=rc("video",m);m=rc("audio",m);m=tf(m,n);n=te(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}a:{n=l;if(n.includes("avc1")){if(l=n.split("."),l.length==3){n=l.shift()+".";n+=parseInt(l.shift(),10).toString(16);l=n+=("000"+parseInt(l.shift(),10).toString(16)).slice(-4);
break a}}else if(n=="vp9"){l="vp09.00.41.08";break a}l=n}k={contentType:te(ye(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||30};if(e.hdr)switch(e.hdr){case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=ye(l),l=tf(ze(l),k),k=te(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||
2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];f.length==0&&f.push(null);g.length==0&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||
c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map;n=t(n);for(m=n.next();!m.done;m=n.next()){m=m.value;var q=m.videoRobustness+","+m.audioRobustness;l.get(q)||l.set(q,[]);l.get(q).push(m)}l=t(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];q=t(h);for(var r=q.next();!r.done;r=q.next()){r=Object.assign({},r.value);for(var u={keySystem:k,initDataType:"cenc",
persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},v=t(n),w=v.next();!w.done;w=v.next()){w=w.value;if(w.initData&&w.initData.length){for(var z=new Set,x=t(w.initData),A=x.next();!A.done;A=x.next())z.add(A.value.initDataType);u.initDataType=w.initData[0].initDataType}w.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");w.persistentStateRequired&&(u.persistentState="required");w.sessionType&&(u.sessionTypes=[w.sessionType]);d&&(u.audio?(w.encryptionScheme&&(u.audio.encryptionScheme=
u.audio.encryptionScheme||w.encryptionScheme),u.audio.robustness=u.audio.robustness||w.audioRobustness):(u.audio={robustness:w.audioRobustness},w.encryptionScheme&&(u.audio.encryptionScheme=w.encryptionScheme)),u.audio.robustness==""&&delete u.audio.robustness);e&&(u.video?(w.encryptionScheme&&(u.video.encryptionScheme=u.video.encryptionScheme||w.encryptionScheme),u.video.robustness=u.video.robustness||w.videoRobustness):(u.video={robustness:w.videoRobustness},w.encryptionScheme&&(u.video.encryptionScheme=
w.encryptionScheme)),u.video.robustness==""&&delete u.video.robustness)}r.keySystemConfiguration=u;m.push(r)}a.push(m)}}return a}function tf(a,b){var c=T();return a.toLowerCase()=="flac"?c.ua()!="WEBKIT"?"flac":"fLaC":a.toLowerCase()==="opus"?c.ua()!="WEBKIT"?"opus":ue(b)=="mp4"?"Opus":"opus":a.toLowerCase()=="ac-3"&&c.hf()?"ec-3":a}function jf(a){a.textStreams=a.textStreams.filter(function(b){b=qe(b.mimeType,b.codecs);return Fe(b)})}
function kf(a){var b,c,d,e,f,g,h,k;return F(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;f=="application/mp4"&&e.codecs=="mjpg"&&(f="image/jpg");if(uf.has(f)){l.A(5);break}g=vf.get(f);if(!g){uf.set(f,!1);l.A(5);break}return C(l,wf(g),7);case 7:h=l.h,uf.set(f,h);case 5:(k=uf.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,E(l)}})}
function wf(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(c.height===2)}})}
function xf(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=b?b.groupId:null,k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=t(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,videoLabel:null,
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:"",audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,videoRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:h,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,
accessibilityPurpose:null,originalLanguage:null};if(c){a.videoId=c.id;a.originalVideoId=c.originalId;a.width=c.width||null;a.height=c.height||null;a.frameRate=c.frameRate||null;a.pixelAspectRatio=c.pixelAspectRatio||null;a.videoBandwidth=c.bandwidth||null;a.hdr=c.hdr||null;a.colorGamut=c.colorGamut||null;a.videoLayout=c.videoLayout||null;a.videoRoles=c.roles;a.videoLabel=c.label;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec,a.videoBandwidth&&
d.bandwidth&&(a.videoBandwidth+=d.bandwidth);if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;e=g.split(",");try{a.videoCodec=rc("video",e),a.audioCodec=rc("audio",e)}catch(r){}}}b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=
b.label,a.audioRoles=b.roles,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=b.originalLanguage,e=b.dependencyStream)&&(a.audioCodec=e.codecs||a.audioCodec,a.audioBandwidth&&e.bandwidth&&(a.audioBandwidth+=e.bandwidth));c&&!a.videoBandwidth&&(b?a.audioBandwidth&&(a.videoBandwidth=a.bandwidth-a.audioBandwidth):a.videoBandwidth=a.bandwidth);b&&!a.audioBandwidth&&(c?a.videoBandwidth&&(a.audioBandwidth=a.bandwidth-a.videoBandwidth):a.audioBandwidth=a.bandwidth);b=[];a.videoCodec&&b.push(a.videoCodec);
a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}function yf(a){return{id:a.id,active:!1,type:uc,bandwidth:a.bandwidth||0,language:a.language,label:a.label,kind:a.kind||null,mimeType:a.mimeType,codecs:a.codecs||null,primary:a.primary,roles:a.roles,accessibilityPurpose:a.accessibilityPurpose,forced:a.forced,originalTextId:a.originalId,originalLanguage:a.originalLanguage}}
function zf(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.g[0]||null);var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&b!=null&&(b/=Number(e.split("x")[0]));e&&c!=null&&(c/=Number(e.split("x")[1]));return{id:a.id,type:"image",bandwidth:a.bandwidth||0,width:b,height:c,mimeType:a.mimeType,codecs:a.codecs||null,tilesLayout:e||null,originalImageId:a.originalId}}function Af(a){a.__shaka_id||(a.__shaka_id=Bf++);return a.__shaka_id}
function Cf(a){var b={id:Af(a),active:a.mode!="disabled",type:uc,bandwidth:0,language:Ve(a.language||"und"),label:a.label,kind:a.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:a.kind=="forced",originalTextId:a.id,originalLanguage:a.language};a.kind=="captions"&&(b.mimeType="unknown");a.kind=="subtitles"&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);return b}
function Df(a,b){var c=a?a.language:null;c={id:Af(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:Ve(c||"und"),label:a?a.label:null,videoLabel:null,kind:a?a.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:a?a.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,
channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:b?b.id:null,originalAudioId:a?a.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:c};a&&a.kind&&(c.roles=[a.kind],c.audioRoles=[a.kind]);a&&a.configuration&&(a.configuration.codec&&(c.audioCodec=a.configuration.codec,c.codecs=c.audioCodec),a.configuration.bitrate&&(c.audioBandwidth=a.configuration.bitrate,c.bandwidth+=c.audioBandwidth),
a.configuration.sampleRate&&(c.audioSamplingRate=a.configuration.sampleRate),a.configuration.numberOfChannels&&(c.channelsCount=a.configuration.numberOfChannels));if(b&&b.configuration&&(b.configuration.codec&&(c.videoCodec=b.configuration.codec,c.codecs=c.codecs?c.codecs+(","+c.videoCodec):c.videoCodec),b.configuration.bitrate&&(c.videoBandwidth=b.configuration.bitrate,c.bandwidth+=c.videoBandwidth),b.configuration.framerate&&(c.frameRate=b.configuration.framerate),b.configuration.width&&(c.width=
b.configuration.width),b.configuration.height&&(c.height=b.configuration.height),b.configuration.colorSpace&&b.configuration.colorSpace.transfer))switch(b.configuration.colorSpace.transfer){case "pq":c.hdr="PQ";break;case "hlg":c.hdr="HLG";break;case "bt709":c.hdr="SDR"}return c}function Ef(a){return a.allowedByApplication&&a.allowedByKeySystem&&a.disabledUntilTime==0}function Ff(a){return a.filter(function(b){return Ef(b)})}
function Gf(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=bf(Ve(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Ve(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Hf(e,c),a.length)return a}else if(a=e.filter(function(k){return k.roles.length==0}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Pe,[]);return a.length?
Hf(e,a[0]):e}function Hf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function If(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}
function Jf(a,b){b.length&&(b=b.filter(function(c){return ve(a.codecs)==ve(c.codecs)}).sort(function(c,d){return c.bandwidth&&d.bandwidth&&c.bandwidth!=d.bandwidth?c.bandwidth-d.bandwidth:(c.width||0)-(d.width||0)}),a.trickModeVideo=b[0],b.length>1&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
function of(a){return a.type=="audio"?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:a.type=="video"?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
function Kf(a,b,c){if(c.autoShowText==0)return!1;if(c.autoShowText==1)return!0;var d=Ve(c.preferredTextLanguage);b=Ve(b.language);if(c.autoShowText==2)return Ue(b,d);if(c.autoShowText==3){if(!a)return!1;a=Ve(a.language);return Ue(b,d)&&!Ue(a,b)}Ta("Invalid autoShowText setting!");return!1}
function Lf(a){var b={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c?ye(c):"",codecs:c?ze(c):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,
dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};d.fullMimeTypes.add(qe(d.mimeType,d.codecs));c.startsWith("audio/")?(d.type="audio",b.audio=d):b.video=d}return b}S("shaka.util.StreamUtils",cf);cf.meetsRestrictions=ff;
var qf=new Map,Bf=0,uf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),vf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Mf(){var a=this;this.H=null;this.B=!1;this.u=new Qa;this.j=new eb;navigator.connection&&navigator.connection.addEventListener&&this.j.G(navigator.connection,"change",function(){if(a.B&&a.g.useNetworkInformation){a.u=new Qa;a.g&&a.u.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.o=[];this.J=1;this.K=!1;this.h=this.m=this.g=this.C=null;this.l=new Oe(function(){if(a.B&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=
a.chooseVariant();b&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.D=window;"documentPictureInPicture"in window&&this.j.G(window.documentPictureInPicture,"enter",function(){a.D=window.documentPictureInPicture.window;a.l&&a.l.$b();a.j.Ma(a.D,"pagehide",function(){a.D=window;a.l&&a.l.$b()})});this.F=this.i=null}p=Mf.prototype;p.stop=function(){this.H=null;this.B=!1;this.o=[];this.J=1;this.m=this.C=null;this.h&&(this.h.disconnect(),this.h=null);this.l&&this.l.stop();this.F=this.i=null};
p.release=function(){this.stop();this.j.release();this.l=null};p.init=function(a){this.H=a};
p.chooseVariant=function(a){a=a===void 0?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:this.D.devicePixelRatio,b=this.D.screen.height*c,c*=this.D.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:this.D.devicePixelRatio,e=this.m.clientHeight,f=this.m.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.m&&(e=this.i.height,f=this.i.width);b=Math.min(b,e*d);c=Math.min(c,
f*d)}e=this.o.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=this.o);d=e;a&&e.length!=this.o.length&&(d=this.o.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=Nf(this,this.g.restrictions,d,Infinity,Infinity);if(b!=Infinity||c!=Infinity){a=Of(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=Nf(this,this.g.restrictions,
d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Nf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=a[d];var g=isNaN(this.J)?1:Math.abs(this.J);f=g*e.bandwidth/this.g.bandwidthDowngradeTarget;for(var h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}g=g*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=f&&b<=g&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<
e.video.height))&&(c=e)}this.C=Date.now();return c};p.enable=function(){this.B=!0};p.disable=function(){this.B=!1};p.segmentDownloaded=function(a,b,c,d){var e=a;this.g.removeLatencyFromFirstPacketTime&&d&&d.packetNumber===1&&d.timeToFirstByte&&(e=a-d.timeToFirstByte);e>=this.g.cacheLoadThreshold&&this.u.sample(e,b);c&&this.C!=null&&this.B&&Pf(this)};p.trySuggestStreams=function(){this.B&&(this.C=Date.now(),Pf(this,!0))};
p.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=navigator.connection.downlink*1E6);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.u.getBandwidthEstimate(a);return this.F?this.F.getBandwidthEstimate(a):a};p.setVariants=function(a){if(ab(a,this.o))return!1;this.o=a;return!0};
p.playbackRateChanged=function(a){this.J=a};p.setMediaElement=function(a){function b(){c.l.ka(Qf)}var c=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.m));this.j.G(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.G(c.i,"resize",b))});this.j.G(a,"leavepictureinpicture",function(){c.i&&c.j.cb(c.i,"resize",b);c.i=null})};p.setCmsdManager=function(a){this.F=a};
p.configure=function(a){this.g=a;this.u&&this.g&&this.u.configure(this.g.advanced)};function Pf(a,b){if(b===void 0||!b){if(!a.K){b=a.u;if(!(b.g>=b.i))return;a.K=!0;a.C-=(a.g.switchInterval-a.g.minTimeToSwitch)*1E3}if(Date.now()-a.C<a.g.switchInterval*1E3)return}b=a.chooseVariant();a.getBandwidthEstimate();b&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}
function Nf(a,b,c,d,e){if(a.F){var f=a.F.Xf();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return ff(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function Of(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",Mf);Mf.prototype.configure=Mf.prototype.configure;
Mf.prototype.setCmsdManager=Mf.prototype.setCmsdManager;Mf.prototype.setMediaElement=Mf.prototype.setMediaElement;Mf.prototype.playbackRateChanged=Mf.prototype.playbackRateChanged;Mf.prototype.setVariants=Mf.prototype.setVariants;Mf.prototype.getBandwidthEstimate=Mf.prototype.getBandwidthEstimate;Mf.prototype.trySuggestStreams=Mf.prototype.trySuggestStreams;Mf.prototype.segmentDownloaded=Mf.prototype.segmentDownloaded;Mf.prototype.disable=Mf.prototype.disable;Mf.prototype.enable=Mf.prototype.enable;
Mf.prototype.chooseVariant=Mf.prototype.chooseVariant;Mf.prototype.init=Mf.prototype.init;Mf.prototype.release=Mf.prototype.release;Mf.prototype.stop=Mf.prototype.stop;var Qf=1;function Rf(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(D){return D!=null&&D.g.trim()!=""})){f=h;break}for(h=c.length-1;h>=0;h--)if(c[h].some(function(D){return D!=null&&D.g.trim()!=""})){g=h;break}if(f===-1||g===-1)return null;for(var k=h=!1,l="white",m="black",n=Sf(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,u=-1,v=0;v<q.length;v++)if(q[v]!=null&&q[v].g.trim()!==""){r=v;break}for(v=q.length-1;v>=0;v--)if(q[v]!=null&&q[v].g.trim()!==""){u=v;break}if(r===
-1||u===-1)q=Tf(d,e),a.nestedCues.push(q);else{for(;r<=u;r++)if(v=q[r]){var w=v.l,z=v.i,x=v.j,A=v.h;if(w!=h||z!=k||x!=l||A!=m)n.payload&&a.nestedCues.push(n),n=Sf(d,e,w,z,x,A),h=w,k=z,l=x,m=A;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Tf(d,e),a.nestedCues.push(n));n=Sf(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Sf(a,b,c,d,e,f){a=new Hd(a,b,"");c&&a.textDecoration.push(de);d&&(a.fontStyle=ce);a.color=e;a.backgroundColor=f;return a}
function Tf(a,b){a=new Hd(a,b,"");a.lineBreak=!0;return a}function Uf(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Vf(a,b){this.i=[];this.g=1;this.h=0;this.D=a;this.C=b;this.j=this.m=!1;this.l="white";this.o="black";this.u=this.B=null;Wf(this)}function Xf(a,b,c){var d="CC"+((a.D<<1|a.C)+1),e=new Hd(b,c,"");e.lineInterpretation=1;var f=Yf.get(a.g);f&&(e.line=f);a.u!=null&&a.B!=null&&(e.position=10+Math.min(70,a.u*10)+a.B*2.5);(b=Rf(e,d,a.i,b,c))&&a.g+b.cue.nestedCues.length-3>15&&(f=Yf.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Wf(a){Zf(a,0,15);a.g=1}
function $f(a,b,c){if(!(c<32||c>127)){var d="";switch(b){case 0:d=ag.has(c)?ag.get(c):String.fromCharCode(c);break;case 1:d=bg.get(c);break;case 2:a.i[a.g].pop();d=cg.get(c);break;case 3:a.i[a.g].pop(),d=dg.get(c)}d&&a.i[a.g].push(new Uf(d,a.m,a.j,a.o,a.l))}}function eg(a,b,c,d){if(!(c<0||b<0))if(b>=c)for(--d;d>=0;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Zf(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
var ag=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),bg=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),cg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),dg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),Yf=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function fg(a,b){this.h=0;this.o=new Vf(a,b);this.i=new Vf(a,b);this.g=this.j=new Vf(a,b);this.l=0;this.m=null}function gg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==3&&a.h!==4&&(e=Xf(d,a.l,c),c=a.i,c.g=c.h>0?c.h:0,Zf(c,0,15),c=a.j,c.g=c.h>0?c.h:0,Zf(c,0,15),d.g=15);a.h=3;d.h=b;return e}function hg(a){a.h=1;a.g=a.j;a.g.h=0}function ig(a){Va("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var jg="black green blue cyan red yellow magenta black".split(" "),kg="white green blue cyan red yellow magenta white_italics".split(" ");function lg(a,b){this.K=b;this.N=a;this.L=this.l=!1;this.m=this.o=this.H=this.M=this.J=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.D=this.B=!1;this.C="white";this.u="black";mg(this)}function mg(a){a.i=[];for(var b=0;b<16;b++)a.i.push(ng())}function ng(){for(var a=[],b=0;b<42;b++)a.push(null);return a}function og(a,b){pg(a)&&(a.i[a.h][a.g]=new Uf(b,a.D,a.B,a.u,a.C),a.g++)}function pg(a){var b=a.g<a.m&&a.g>=0;return a.h<a.o&&a.h>=0&&b}lg.prototype.isVisible=function(){return this.l};
function qg(a){for(var b=0,c=1;c<16;c++,b++)a.i[b]=a.i[c];for(c=0;c<1;c++,b++)a.i[b]=ng()}
function rg(a,b,c){var d=new Hd(a.j,b,"");d.textAlign=a.F===0?"left":a.F===1?"right":Kd;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?Pc:2;switch(a.H){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=Rf(d,"svc"+c,a.i,a.j,b))a.j=b;return c}lg.prototype.display=function(){this.l=!0};function sg(){this.i=[];this.h=null;this.g=0}function tg(a,b){b.type===3?(a.g=(b.value&63)*2-1,a.h=[]):a.h&&(a.g>0&&(a.h.push(b),a.g--),a.g===0&&(a.i.push(new ug(a.h)),a.h=null,a.g=0))}function ug(a){this.g=0;this.h=a}ug.prototype.La=function(){return this.g<this.h.length};ug.prototype.Da=function(){return this.g};function vg(a){if(!a.La())throw new W(2,2,3E3);return a.h[a.g++]}ug.prototype.skip=function(a){if(this.g+a>this.h.length)throw new W(2,2,3E3);this.g+=a};
ug.prototype.Ag=function(a){if(this.g-a<0)throw new W(2,2,3E3);this.g-=a};function wg(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
function xg(a,b,c,d){if(!a.g)return[];if(c==24)return c=vg(b).value,d=vg(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),og(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!pg(b)||b.g<=0&&b.h<=0||(b.g<=0?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=rg(b,d,a.i));b.h+1>=b.o?qg(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=rg(b,d,a.i));b.i[b.h]=ng();b.g=0;break;case 12:b.isVisible()&&
(e=rg(b,d,a.i)),mg(b),b.h=0,b.g=0}return e?[e]:[]}
function zg(a,b,c,d){if(c>=128&&c<=135)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(c===136){c=vg(b).value;b=[];c=t(Ag(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=rg(e,d,a.i);f&&b.push(f)}mg(e)}return b}if(c===137)for(b=vg(b).value,b=t(Ag(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(c===138){c=vg(b).value;b=null;c=t(Ag(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=rg(e,d,a.i)),e.l=!1;return b?
[b]:[]}if(c===139){c=vg(b).value;b=null;c=t(Ag(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=rg(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(c===140)return b=vg(b).value,Bg(a,b,d);if(c===143)return d=Bg(a,255,d),Cg(a),d;if(c===144)b.skip(1),d=vg(b).value,a.g&&(a.g.B=(d&128)>0,a.g.D=(d&64)>0);else if(c===145)d=vg(b).value,c=vg(b).value,b.skip(1),a.g&&(b=Dg((c&48)>>4,(c&12)>>2,c&3),a.g.C=Dg((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(c===146)d=vg(b).value,b=vg(b).value,a.g&&(a=
a.g,a.h=d&15,a.g=b&63);else if(c===151)b.skip(1),b.skip(1),d=vg(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(c>=152&&c<=159){c=(c&15)-8;e=a.h[c]!==null;e||(f=new lg(c,a.i),f.j=d,a.h[c]=f);d=vg(b).value;f=vg(b).value;var g=vg(b).value,h=vg(b).value,k=vg(b).value;b=vg(b).value;e&&(b&7)===0||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.B=!1,b.C="white",b.u="black");b=a.h[c];b.l=(d&32)>0;b.M=f&127;b.J=g;b.H=(h&240)>>4;b.L=(f&128)>0;b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
function Ag(a,b){for(var c=[],d=0;d<8;d++)(b&1)===1&&a.h[d]&&c.push(d),b>>=1;return c}function Bg(a,b,c){var d=[];b=t(Ag(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=rg(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function Cg(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Dg(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Eg[a<<2|b<<1|c]}
var Fg=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"]]),Eg="black blue green cyan red magenta yellow white".split(" ");function Gg(a,b){this.h=Sb(a);this.i=b==Hg;this.g=0}p=Gg.prototype;p.La=function(){return this.g<this.h.byteLength};p.Da=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.mb=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ig();}};p.kb=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ig();}};p.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};
p.df=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};p.Oc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ig();}if(b>2097151)throw new W(2,3,3001);this.g+=8;return b*4294967296+a};p.Vb=function(a,b){if(this.g+a>this.h.byteLength)throw Ig();var c=V(this.h,this.g,a);this.g+=a;return b?new Uint8Array(c):c};
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Ig();this.g+=a};p.Ag=function(a){if(this.g<a)throw Ig();this.g-=a};p.seek=function(a){if(a<0||a>this.h.byteLength)throw Ig();this.g=a};p.nc=function(){for(var a=this.g;this.La()&&this.h.getUint8(this.g)!=0;)this.g+=1;a=V(this.h,a,this.g-a);this.g+=1;return Xb(a)};function Ig(){return new W(2,3,3E3)}S("shaka.util.DataViewReader",Gg);Gg.prototype.readTerminatedString=Gg.prototype.nc;Gg.prototype.seek=Gg.prototype.seek;Gg.prototype.rewind=Gg.prototype.Ag;
Gg.prototype.skip=Gg.prototype.skip;Gg.prototype.readBytes=Gg.prototype.Vb;Gg.prototype.readUint64=Gg.prototype.Oc;Gg.prototype.readInt32=Gg.prototype.df;Gg.prototype.readUint32=Gg.prototype.O;Gg.prototype.readUint16=Gg.prototype.kb;Gg.prototype.readUint8=Gg.prototype.mb;Gg.prototype.getLength=Gg.prototype.getLength;Gg.prototype.getPosition=Gg.prototype.Da;Gg.prototype.hasMoreData=Gg.prototype.La;var Hg=1;Gg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Hg};function Jg(){this.h=[];this.g=[];this.i=new sg;this.l=0;this.m=new Map([["CC1",new fg(0,0)],["CC2",new fg(0,1)],["CC3",new fg(1,0)],["CC4",new fg(1,1)]]);this.u=this.o=0;this.j=new Map;this.C=!0;this.B=new Set;Kg(this)}Jg.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Kg(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Cg(b.value)};
function Kg(a){a.o=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,Wf(c.i),Wf(c.j),Wf(c.o);a.C=!0}
Jg.prototype.extract=function(a,b){if(this.C){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new Gg(a,0);if(!(a.getLength()<8)&&a.mb()===181&&a.kb()===49&&a.O()===1195456820&&a.mb()===3&&(c=a.mb(),(c&64)!==0))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.mb(),f=(e&4)>>2,g=a.mb(),h=a.mb();f&&(e&=3,e===0||e===1?this.h.push({pts:b,type:e,Za:g,Cb: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})))}};
Jg.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=Lg(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())tg(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Mg(this,d.value),b.push.apply(b,y(d));this.i.i=[];this.h=[];this.g=[];return b};
function Lg(a,b){var c=b.type;if((b.Za&112)===16){var d=b.Za>>3&1;c===0?a.o=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.o))+1);c=a.m.get(d);if(b.Za===255&&b.Cb===255||!b.Za&&!b.Cb||!Ng(b.Za)||!Ng(b.Cb))return++a.l>=45&&Kg(a),null;a.l=0;b.Za&=127;b.Cb&=127;var e=b.Za;if(e>=1&&e<=15||!b.Za&&!b.Cb)return null;e=null;if((b.Za&112)===16)a:{a.B.add(d),d=b.Za;a=b.Cb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,(d&240)===16&&(a&192)===64){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=a>95?a-96:a-64;g<=13?d=kg[Math.floor(g/2)]:g<=15?e=!0:f=Math.floor((g-16)/2);a=(a&1)===1;c.h!==4&&(g=c.g,c.h===3&&b!==g.g&&(c=1+b-g.h,eg(g,c,1+g.g-g.h,g.h),Zf(g,0,c-1),Zf(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.u=f,g.o="black")}else if((d&247)===17&&(a&240)===32)c.g.m=!1,c.g.j=!1,c.g.l="white",$f(c.g,0,32),d=!1,b=kg[(a&14)>>1],b==="white_italics"&&(b="white",d=!0),c.g.m=(a&1)===1,c.g.j=d,c.g.l=b;else if((d&247)===16&&(a&240)===32||(d&247)===23&&(a&255)===45)b="black",(d&7)===0&&(b=jg[(a&
14)>>1]),c.g.o=b;else if((d&247)===17&&(a&240)===48)$f(c.g,1,a);else if((d&246)===18&&(a&224)===32)$f(c.g,d&1?3:2,a);else{if((d&246)===20&&(a&240)===32){a=b.pts;d=null;switch(b.Cb){case 32:hg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=gg(c,2,a);break;case 38:d=gg(c,3,a);break;case 39:d=gg(c,4,a);break;case 40:$f(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Wf(c.o);ig(c);break;case 43:ig(c);break;case 44:b=c.i;d=null;c.h!==4&&(d=Xf(b,c.l,a));Zf(b,0,15);break;case 45:b=
c.g;c.h!==3?d=null:(d=Xf(b,c.l,a),e=b.g-b.h+1,eg(b,e-1,e,b.h),Zf(b,0,e-1),Zf(b,b.g,15-b.g),c.l=a);break;case 46:Zf(c.j,0,15);break;case 47:b=null,c.h!==4&&(b=Xf(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,hg(c),c.l=a,d=b}e=d;break a}(d==23||d==31)&&a>=33&&a<=35&&(c.g.B=a-32)}e=null}else a=b.Cb,$f(c.g,0,b.Za),$f(c.g,0,a);return e}
function Mg(a,b){var c=[];try{for(;b.La();){var d=vg(b).value,e=(d&224)>>5,f=d&31;e===7&&f!=0&&(e=vg(b).value&63);if(e!=0){a.B.add("svc"+e);a.j.has(e)||a.j.set(e,new wg(e));for(var g=a.j.get(e),h=b.Da();b.Da()-h<f;){e=g;var k=b,l=vg(k),m=l.value,n=l.pts;if(m===16){var q=vg(k);m=m<<16|q.value}if(m>=0&&m<=31)var r=xg(e,k,m,n);else if(m>=128&&m<=159)r=zg(e,k,m,n);else{if(m>=4096&&m<=4127)e=k,k=m&255,k>=8&&k<=15?e.skip(1):k>=16&&k<=23?e.skip(2):k>=24&&k<=31&&e.skip(3);else if(m>=4224&&m<=4255)e=k,k=m&
255,k>=128&&k<=135?e.skip(4):k>=136&&k<=143&&e.skip(5);else if(m>=32&&m<=127)k=m,e.g&&(k===127?og(e.g,"\u266a"):og(e.g,String.fromCharCode(k)));else if(m>=160&&m<=255)e.g&&og(e.g,String.fromCharCode(m));else if(m>=4128&&m<=4223){if(k=m&255,e.g)if(Fg.has(k)){var u=Fg.get(k);og(e.g,u)}else og(e.g,"_")}else m>=4256&&m<=4351&&e.g&&((m&255)!=160?og(e.g,"_"):og(e.g,"[CC]"));r=[]}c.push.apply(c,y(r))}}}}catch(v){if(v instanceof W&&v.code===3E3)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
else throw v;}return c}function Ng(a){for(var b=0;a;)b^=a&1,a>>=1;return b===1}Jg.prototype.getStreams=function(){return Array.from(this.B)};S("shaka.cea.CeaDecoder",Jg);Lc=function(){return new Jg};function Og(a){for(var b=[],c=a,d=a=0;d<c.length;)a==2&&c[d]==3?(a=0,c=[].concat(y(c)),c.splice(d,1),c=new Uint8Array(c)):c[d]==0?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;a[d]==255;)c+=255,d++;c+=a[d++];for(var e=0;a[d]==255;)e+=255,d++;e+=a[d++];c==4&&b.push(a.subarray(d,d+e));d+=e}return b};function Pg(){this.i=new Map;this.h=new Map;this.g=!1}p=Pg.prototype;p.box=function(a,b){a=Qg(a);this.i.set(a,Rg);this.h.set(a,b);return this};p.P=function(a,b){a=Qg(a);this.i.set(a,Sg);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new Gg(a,0);for(this.g=!1;a.La()&&!this.g;)this.Jc(0,a,b,c)};
p.Jc=function(a,b,c,d){var e=b.Da();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=Tg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Da()+8>b.getLength()){this.g=!0;return}f=b.Oc();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==Sg){if(d&&b.Da()+4>b.getLength()){this.g=!0;return}n=b.O();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(g-=b.Da(),b=g>0?b.Vb(g,!1):new Uint8Array(0),b=new Gg(b,0),l({name:h,
parser:this,partialOkay:c||!1,stopOnPartial:d||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Da(),b.getLength()-b.Da()))}};function Ug(a){for(var b=Vg(a);a.reader.La()&&!a.parser.g;)a.parser.Jc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Wg(a){for(var b=Vg(a),c=a.reader.O(),d=0;d<c&&(a.parser.Jc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial),!a.parser.g);d++);}
function Xg(a){var b=Vg(a);for(a.reader.skip(78);a.reader.La()&&!a.parser.g;)a.parser.Jc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Yg(a){var b=Vg(a);a.reader.skip(8);var c=a.reader.kb();a.reader.skip(6);c==2?a.reader.skip(48):a.reader.skip(12);for(c==1&&a.reader.skip(16);a.reader.La()&&!a.parser.g;)a.parser.Jc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Zg(a,b){return function(c){a(c.reader.Vb(c.reader.getLength()-c.reader.Da(),b))}}
function Qg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Tg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Vg(a){return 8+(a.has64BitSize?8:0)+(a.flags!=null?4:0)}S("shaka.util.Mp4Parser",Pg);Pg.headerSize=Vg;Pg.typeToString=Tg;Pg.allData=Zg;Pg.audioSampleEntry=Yg;Pg.visualSampleEntry=Xg;Pg.sampleDescription=Wg;Pg.children=Ug;Pg.prototype.parseNext=Pg.prototype.Jc;Pg.prototype.parse=Pg.prototype.parse;
Pg.prototype.stop=Pg.prototype.stop;Pg.prototype.fullBox=Pg.prototype.P;Pg.prototype.box=Pg.prototype.box;var Rg=0,Sg=1;function $g(a,b){var c=null,d=null,e=null,f=null,g=a.O();b&1&&(e=a.Oc());b&2&&(f=a.O());b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:g,ad:c,bd:d,hh:e,Bg:f}}function ah(a,b){return b==1?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*4294967296+a}):{baseMediaDecodeTime:a.O()}}function bh(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.kb();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function ch(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.df());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={nf:null,sampleSize:null,ke:null};c&256&&(h.nf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.ke=b==0?a.O():a.df());e.push(h)}return{tj:d,mf:e,Le:f}}function dh(a){a=a.O();return{codec:Tg(a)}};function eh(){this.j=new Map;this.i=this.h=0;this.g=fh}
eh.prototype.init=function(a){function b(f){f=f.name;gh.has(f)&&(c.g=gh.get(f))}var c=this,d=[],e=[];(new Pg).box("moov",Ug).box("mvex",Ug).P("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Ug).P("tkhd",function(f){var g=f.reader;f=f.version;f==1?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.O();f==1?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.kb();g.kb();g.kb();g.kb();d.push(h)}).box("mdia",Ug).P("mdhd",
function(f){f=bh(f.reader,f.version);e.push(f.timescale)}).box("minf",Ug).box("stbl",Ug).P("stsd",Wg).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",Xg).box("sinf",Ug).box("frma",function(f){f=dh(f.reader).codec;gh.has(f)&&(c.g=gh.get(f))}).parse(a,!0,!0);if(!d.length||!e.length||d.length!=e.length)throw new W(2,2,2010);this.g==fh&&Ta("Unable to determine bitstream format for CEA parsing!");
d.forEach(function(f,g){c.j.set(f,e[g])})};
eh.prototype.parse=function(a){var b=this;if(this.g==fh)return[];var c=[],d=0,e=[];(new Pg).box("moof",function(f){d=f.start;e=[];Ug(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,ad:b.h,bd:b.i,sg:[],timescale:9E4});Ug(f)}).P("trun",function(f){var g=e[e.length-1];f=ch(f.reader,f.version,f.flags);g.sg.push(f)}).P("tfhd",function(f){var g=e[e.length-1];f=$g(f.reader,f.flags);g.ad=f.ad||b.h;g.bd=f.bd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).P("tfdt",function(f){var g=e[e.length-
1];f=ah(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Da(),k=t(e),l=k.next();!l.done;l=k.next())l=l.value,l.baseMediaDecodeTime===null?Ta("Unable to find base media decode time for CEA captions!"):(f.reader.seek(h),hh(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.ad,l.bd,g,l.sg,c))}).parse(a,!1,!0);return c};
function hh(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.mf});n=[].concat.apply([],y(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Le);b.La();){g=b.O();var q=b.mb(),r=null;r=!1;h=1;switch(a.g){case ih:r=q&31;r=r==6;break;case jh:h=2;b.skip(1);r=q>>1&63;r=r==39||r==40;break;case kh:h=2;b.skip(1);r=q>>1&63;r=r==23||r==24;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].ke||0),q=(c+q)/d,h=b.Vb(g-h,!1),h=t(Og(h)),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:q});
else try{b.skip(g-h)}catch(u){break}m-=g+4;m==0&&(c=l<n.length?c+(n[l].nf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",eh);var fh=0,ih=1,jh=2,kh=3,gh=(new Map).set("avc1",ih).set("avc3",ih).set("dvav",ih).set("dva1",ih).set("hev1",jh).set("hvc1",jh).set("dvh1",jh).set("dvhe",jh).set("vvc1",kh).set("vvi1",kh).set("dvc1",kh).set("dvi1",kh);Mc("video/mp4",function(){return new eh});/*

 Copyright Brightcove, Inc.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/
function lh(a,b){this.j=a;if(b===void 0?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)d>=2&&a[d]==3&&a[d-1]==0&&a[d-2]==0||(b[c]=a[d],c++);this.j=V(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function mh(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);d!==0&&(c.set(a.j.subarray(b,b+d)),a.h=(new Gg(c,0)).O(),a.g=d*8,a.i-=d)}function nh(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=c*8;a.g-=c;mh(a)}a.h<<=b;a.g-=b}
function oh(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;a.g>0?a.h<<=c:a.i>0&&mh(a);c=b-c;return c>0?d<<c|oh(a,c):d}function ph(a){var b;for(b=0;b<a.g;++b)if((a.h&2147483648>>>b)!==0)return a.h<<=b,a.g-=b,b;mh(a);return b+ph(a)}function qh(a){nh(a,1+ph(a))}function rh(a){var b=ph(a);return oh(a,b+1)-1}function sh(a){return oh(a,1)===1}function th(a,b){for(var c=8,d=8,e=0;e<b;e++)d!==0&&(d=rh(a),d=(c+(1&d?1+d>>>1:-1*(d>>>1))+256)%256),c=d===0?c:d}S("shaka.util.ExpGolomb",lh);/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function uh(){}function vh(a,b){return b+10<=a.length&&a[b]===73&&a[b+1]===68&&a[b+2]===51&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function wh(a,b){return b+10<=a.length&&a[b]===51&&a[b+1]===68&&a[b+2]===73&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function xh(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 yh(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if(a.type==="APIC"){if(a.size<2||a.data[0]!==3)return null;var c=a.data.subarray(1).indexOf(0);if(c===-1)return null;var d=Xb(V(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(f===-1)return null;var g=Xb(V(a.data,3+c,f)),h;d==="--\x3e"?h=Xb(V(a.data,4+c+f)):h=Mb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if(a.type==="TXXX"){if(a.size<2||a.data[0]!==3)return null;
d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=Xb(V(a.data,1,d));a=Xb(V(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="WXXX"){if(a.size<2||a.data[0]!==3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=Xb(V(a.data,1,d));a=Xb(V(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="PRIV"){if(a.size<2)return null;c=a.data.indexOf(0);if(c===-1)return null;c=Xb(V(a.data,0,c));b.description=c;c=="com.apple.streaming.transportStreamTimestamp"?
(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=Mb(a.data.subarray(c.length+1)),b.data=a);return b}if(a.type[0]==="T"){if(a.size<2||a.data[0]!==3)return null;a=Xb(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return a.type[0]==="W"?(a=Xb(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Mb(a.data),b):null}
function zh(a){for(var b=0,c=[];vh(a,b);){var d=xh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=xh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=yh(e))&&c.push(f);b+=e.size+10}wh(a,b)&&(b+=10)}return c}S("shaka.util.Id3Utils",uh);uh.getID3Data=function(a,b){for(var c=b=b===void 0?0:b,d=0;vh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=xh(a,b+6),wh(a,b+10)&&(d+=10),b+=d;return d>0?a.subarray(c,c+d):new Uint8Array([])};
uh.getID3Frames=zh;function Ah(){this.H=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.C=this.D=null;this.i=[];this.h=[];this.F=null;this.l=[];this.B=this.o=this.u=null}p=Ah.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};p.Ig=function(a){this.B!=null&&this.B!=a&&(this.o=this.u=null);this.B=a};
p.parse=function(a){if(a.length<564)return this;for(var b=Math.max(0,Bh(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(a[e]==71){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if((a[e+3]&48)>>4>1){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.H=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.H:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Td:-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(m>0)for(var n=h+5,q=m;q>2;){var r=f[n+1]+2;switch(f[n]){case 5:var u=Zb(f.subarray(n+2,n+r));g.audio==-1&&u==="Opus"?(g.audio=l,g.audioCodec="opus"):g.video==-1&&u==="AV01"&&(g.video=l,g.videoCodec="av1");break;case 106:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");break;case 122:g.audio==-1&&(g.audio=l,g.audioCodec="ec3");break;case 124:g.audio==-1&&(g.audio=l,g.audioCodec="aac")}n+=r;q-=r}break;case 15:g.audio==-1&&(g.audio=
l,g.audioCodec="aac");break;case 17:g.audio==-1&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:g.Td==-1&&(g.Td=l);break;case 27:g.video==-1&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:g.audio==-1&&(g.audio=l,g.audioCodec="mp3");break;case 36:g.video==-1&&(g.video=l,g.videoCodec="hvc");break;case 129:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:g.audio==-1&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;f.video!=-1&&(this.K=f.video,this.m=f.videoCodec);f.audio!=-1&&(this.D=
f.audio,this.C=f.audioCodec);f.Td!=-1&&(this.F=f.Td);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.D:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);break;case this.F:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
function Ch(a,b){if((b[0]<<16|b[1]<<8|b[2])!==1)return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2;a.u==null&&(a.u=e);c.pts=Dh(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,a.o==null&&(a.o=d),c.dts=c.pts!=
e?Dh(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.Ei=function(a){U("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Ze(a,{kd:null,state:null})};
p.Ze=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;this.m=="hvc"&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;f==-1&&(l=0,m=this.m=="hvc"?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(f===1)f=n?0:2;else if(n)if(n==1){n=h-f-1;if(l>=0)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.kd)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength-
g)),n>0&&(n=a.subarray(0,n),f.data=lc(f.data,n),f.fullData=lc(f.fullData,n),f.state=0);h<d?(m=this.m=="hvc"?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}l>=0&&f>=0&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.kd&&(c=k.length?k[k.length-1]:b.kd)&&(c.data=lc(c.data,a),c.fullData=lc(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=lc.apply(ec,y(c.value)),(c=Ch(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:zh(c.data),dts:c.dts,pts:c.pts});return a};
p.Sf=function(){if(this.i.length&&!this.h.length)for(var a=t(this.i),b=a.next();!b.done;b=a.next()){var c=lc.apply(ec,y(b.value)),d=Ch(this,c);b=this.h.length?this.h[this.h.length-1]:null;d&&d.pts!=null&&d.dts!=null&&(!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=lc(b.data,c),this.h.push(b))}return this.h};
p.Rd=function(a){a=a===void 0?!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=lc.apply(ec,y(c.value)),e=Ch(this,d);c=this.g.length?this.g[this.g.length-1]:null;e&&e.pts!=null&&e.dts!=null&&(!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=lc(c.data,d),this.g.push(c))}if(a){b={kd:null,state:null};c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())e=e.value,e.nalus=this.Ze(e,b),e.nalus.length&&(c.push(e),
b.kd=e.nalus[e.nalus.length-1]);this.g=c}}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if(a=="audio"){a=null;var b=this.Sf();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return a=="video"?(a=null,b=this.Rd(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.Uf=function(){return{audio:this.C,video:this.m}};p.Sd=function(){for(var a=[],b=t(this.Rd()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value.nalus));return a};
p.ci=function(){U("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Zf();return{height:a.height,width:a.width}};p.Zf=function(){return this.m=="hvc"?Eh(this):Fh(this)};function Gh(a){var b=a.Rd();return b.length>1&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(Math.abs(1/(b-a)*9E4)):null}
function Fh(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Sd();if(!c.length)return b;c=c.find(function(r){return r.type==7});if(!c)return b;c=new lh(c.data);var d=oh(c,8),e=oh(c,8),f=oh(c,8);qh(c);if(Hh.includes(d)){var g=rh(c);g===3&&nh(c,1);qh(c);qh(c);nh(c,1);if(sh(c)){g=g!==3?8:12;for(var h=0;h<g;h++)sh(c)&&(h<6?th(c,16):th(c,64))}}qh(c);g=rh(c);if(g===0)rh(c);else if(g===1)for(nh(c,1),qh(c),qh(c),g=rh(c),h=0;h<g;h++)qh(c);qh(c);nh(c,1);g=rh(c);h=rh(c);var k=oh(c,1);k===0&&nh(c,
1);nh(c,1);var l=0,m=0,n=0,q=0;sh(c)&&(l=rh(c),m=rh(c),n=rh(c),q=rh(c));b.height=String((2-k)*(h+1)*16-n*2-q*2);b.width=String((g+1)*16-l*2-m*2);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Gh(a);return b}
function Eh(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Sd();if(!c.length)return b;c=c.find(function(G){return G.type==33});if(!c)return b;var d=new lh(c.fullData,!0);oh(d,8);oh(d,8);oh(d,4);var e=oh(d,3);sh(d);var f=oh(d,2),g=oh(d,1),h=oh(d,5),k=oh(d,32);c=oh(d,8);for(var l=oh(d,8),m=oh(d,8),n=oh(d,8),q=oh(d,8),r=oh(d,8),u=oh(d,8),v=[],w=[],z=0;z<e;z++)v.push(sh(d)),w.push(sh(d));if(e>0)for(z=e;z<8;z++)oh(d,2);for(z=0;z<e;z++)v[z]&&oh(d,88),w[z]&&oh(d,8);rh(d);e=rh(d);e==3&&oh(d,
1);v=rh(d);w=rh(d);var x=z=0,A=0,D=0;sh(d)&&(z+=rh(d),x+=rh(d),A+=rh(d),D+=rh(d));b.width=String(v-(z+x)*(e===1||e===2?2:1));b.height=String(w-(A+D)*(e===1?2:1));d=function(G){for(var H=0,B=0;B<32;B++)H|=(G>>B&1)<<31-B;return H>>>0}(k);g=g==1?"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=Gh(a);return b}function Dh(a,b){var c=1;for(a>b&&(c=-1);Math.abs(b-a)>4294967296;)a+=c*8589934592;return a}function Ih(a){return Bh(a)<0?!1:!0}function Bh(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(a[c]==71&&a[c+188]==71&&a[c+376]==71)return c;c++}return-1}S("shaka.util.TsParser",Ah);Ah.syncOffset=Bh;Ah.probe=Ih;Ah.prototype.getVideoInfo=Ah.prototype.Zf;Ah.prototype.getVideoResolution=Ah.prototype.ci;
Ah.prototype.getVideoNalus=Ah.prototype.Sd;Ah.prototype.getCodecs=Ah.prototype.Uf;Ah.prototype.getStartTime=Ah.prototype.getStartTime;Ah.prototype.getVideoData=Ah.prototype.Rd;Ah.prototype.getAudioData=Ah.prototype.Sf;Ah.prototype.getMetadata=Ah.prototype.getMetadata;Ah.prototype.parseNalus=Ah.prototype.Ze;Ah.prototype.parseAvcNalus=Ah.prototype.Ei;Ah.prototype.parse=Ah.prototype.parse;Ah.prototype.setDiscontinuitySequence=Ah.prototype.Ig;Ah.prototype.clearData=Ah.prototype.clearData;
Ah.Timescale=9E4;var Hh=[100,110,122,244,44,83,86,118,128,138,139,134];function Jh(){this.g=null}Jh.prototype.init=function(){};Jh.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Ah;var b=[];a=V(a);if(!Ih(a))return b;a=this.g.parse(a);var c=a.Uf(),d=a.Sd();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&d.time!=null)for(var e=t(Og(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
S("shaka.cea.TsCeaParser",Jh);Mc("video/mp2t",function(){return new Jh});S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});S("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});S("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function Kh(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(Lh(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||Lh(e))return!0}return!1}
function Mh(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(y(d.keyIds),y(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 Lh(d)?c.push(d):Lh(f)&&c.push(f)}return c}
function Nh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Oh(a){return a?!!a.match(/^com\.apple\.fps/):!1}function Lh(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}var Ph=new jb(function(){return Mb(new Uint8Array([0]))}),Qh=new Map;function Rh(a){var b=0,c=Sb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+4+2;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if((e&1)!=0||e+a>c.byteLength){c=[];break a}var f=V(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Sh(a){a=ic(jd(a));a=Rh(a).filter(function(b){return b.type===Th})[0];if(!a)return null;a=Yb(a.value,!0);return(a=bd(a,"WRMHEADER"))?a:null}
function Uh(a){try{var b=Sh(a);if(b)a:{for(var c=t(ld(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(h.tagName=="LA_URL"){var k=jd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Th=1;function Vh(a){var b=this;this.h=[];this.g=[];this.data=[];(new Pg).box("moov",Ug).box("moof",Ug).P("pssh",function(c){if(!(c.version>1)){var d=V(c.reader.h,-12,c.size);b.data.push(d);d=c.reader.Vb(16,!1);b.h.push(kc(d));if(c.version>0){d=c.reader.O();for(var e=0;e<d;e++){var f=c.reader.Vb(16,!1);f=kc(f);b.g.push(f)}}}}).parse(a)}
function Wh(a,b,c,d){var e=a.length,f=12+b.length+4+e;d>0&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Sb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;d<1?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(d>0)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=jc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Xh(){this.g=new Map}Xh.prototype.release=function(){this.g.clear()};
function Yh(a,b,c,d){var e=Zh(a,b),f=null;a=[];var g=[];b=null;var h=new Set(e.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(h.size>1)throw new W(2,4,4010);if(!c){g=e.filter(function(l){return l.Rc=="urn:mpeg:dash:sea:2012"});if(g.length>1)throw new W(2,4,4050);g.length&&(b=$h(g[0]));(g=e.find(function(l){return l.Rc=="urn:mpeg:dash:mp4protection:2011"}))&&g.encryptionScheme&&(k=g.encryptionScheme);g=e.filter(function(l){return l.Rc=="urn:mpeg:dash:mp4protection:2011"?(f=l.init||
f,!1):l.Rc!="urn:mpeg:dash:sea:2012"});g.length&&(a=ai(f,k,g,d,h),a.length==0&&(a=[nc("",k,f)]))}if(e.length&&!b&&(c||!g.length))for(a=[],c=t(Object.values(d)),d=c.next();!d.done;d=c.next())d=d.value,d!="org.w3.clearkey"&&a.push(nc(d,k,f));if(h=Array.from(h)[0]||null)for(k=t(a),c=k.next();!c.done;c=k.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Lf:h,qj:f,drmInfos:a,Fe:b,Rf:!0}}
function bi(a,b,c,d,e){var f=Yh(a,b,d,e);if(c.Rf){a=c.drmInfos.length==1&&!c.drmInfos[0].keySystem;b=f.drmInfos.length==0;if(c.drmInfos.length==0||a&&!b)c.drmInfos=f.drmInfos;c.Rf=!1}else if(f.drmInfos.length>0&&(c.drmInfos=c.drmInfos.filter(function(g){return f.drmInfos.some(function(h){return h.keySystem==g.keySystem})}),c.drmInfos.length==0))throw new W(2,4,4008);return f.Lf||c.Lf}
function ci(a){var b=nd(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=jd(b)))return b;if((b=nd(a.node,"urn:microsoft:playready","pro"))&&jd(b))return Uh(b);if(a=nd(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=jd(a)){b=ic(a);a=8;b=Sb(b);var c=b.getUint8(a);a+=20;c>0&&(a+=4+16*b.getUint32(a));a=V(b,a+4);a=fc(a);a=bd("<pro>"+a+"</pro>");return Uh(a)}return""}
function ai(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.Rc];if(h){var k;if((k=nd(g.node,"urn:microsoft:playready","pro"))&&jd(k)){k=jd(k);k=ic(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Wh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if(g.Rc==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){l=g;var m=e;if(m.size==0)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:Wh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=nc(h,b,g.init||a||k||l);if(h=di.get(h))k.licenseServerUri=h(g);a:{if(g=nd(g.node,"https://dashif.org/CPS","Certurl"))if(g=jd(g))break a;g=""}k.serverCertificateUri=g;f.push(k)}}return f}function Zh(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())(d=ei(a,d.value))&&c.push(d);return c}
function ei(a,b){var c=b.attributes.schemeIdUri,d=qd(b,"urn:mpeg:cenc:2013","default_KID"),e=od(b,"urn:mpeg:cenc:2013","pssh").map(kd),f=b.attributes.value;if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new W(2,4,4009);var g=[];try{g=e.map(function(h){if(!a.g.has(h)){var k=ic(h);a.g.set(h,k)}return{initDataType:"cenc",initData:a.g.get(h),keyId:null}})}catch(h){throw new W(2,4,4007);}return{node:b,Rc:c,keyId:d,init:g.length>0?g:null,encryptionScheme:f}}
function $h(a){if(!window.crypto||!window.crypto.subtle)throw Ta("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new W(2,4,4042);var b=nd(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new W(2,4,4051);if(b.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new W(2,4,4051);b=nd(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new W(2,4,4051);a=b.attributes.IV;b=dc(b.attributes.keyUriTemplate);
if(!a||!b)throw new W(2,4,4051);a=jc(a.substr(2));if(a.byteLength!=16)throw new W(2,4,4048);return{pi:b,iv:a}}
var di=(new Map).set("com.apple.fps",function(a){if("apple"===window.shakaMediaKeysPolyfill)throw new W(2,4,4054);if(a=nd(a.node,"https://dashif.org/CPS","Laurl"))if(a=jd(a))return a;return""}).set("com.widevine.alpha",function(a){var b=nd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=jd(b))?b:(a=nd(a.node,"urn:microsoft","laurl"))?dc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",ci).set("com.microsoft.playready.recommendation",ci).set("com.microsoft.playready.software",
ci).set("com.microsoft.playready.hardware",ci).set("org.w3.clearkey",function(a){var b=nd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=jd(b))?b:(a=nd(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&a.attributes.Lic_type==="EME-1.0"&&a&&(a=jd(a))?a:""});function fi(a,b){var c=gi();this.l=a.maxAttempts==null?c.maxAttempts:a.maxAttempts;this.j=a.baseDelay==null?c.baseDelay:a.baseDelay;this.o=a.fuzzFactor==null?c.fuzzFactor:a.fuzzFactor;this.m=a.backoffFactor==null?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=b===void 0?!1:b)this.g=1}
function hi(a){var b,c;return F(function(d){if(d.g==1){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new W(2,7,1010);b=a.g;a.g++;if(b==0)return d.return();c=a.h*(1+(Math.random()*2-1)*a.o);return C(d,new Promise(function(e){(new Oe(e)).ka(c/1E3)}),2)}a.h*=a.m;E(d)})}function gi(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function ii(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}ii.prototype.resolve=function(){};ii.prototype.reject=function(){};function ji(a,b){this.promise=a;this.i=b;this.g=null}function ki(a){return new ji(Promise.reject(a),function(){return Promise.resolve()})}function li(){var a=Promise.reject(new W(2,7,7001));a.catch(function(){});return new ji(a,function(){return Promise.resolve()})}function mi(a){return new ji(Promise.resolve(a),function(){return Promise.resolve()})}function ni(a){return new ji(a,function(){return a.catch(function(){})})}ji.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
function oi(a){return new ji(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}ji.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
ji.prototype.Wa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=pi(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new ii;f.catch(function(){});var g=new W(2,7,7001);this.promise.then(c(!0),c(!1));return new ji(f,function(){return d()})};
function pi(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}ea.Object.defineProperties(ji.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}});S("shaka.util.AbortableOperation",ji);ji.prototype.chain=ji.prototype.Wa;ji.prototype["finally"]=ji.prototype.finally;
ji.all=oi;ji.prototype.abort=ji.prototype.abort;ji.notAbortable=ni;ji.completed=mi;ji.aborted=li;ji.failed=ki;function qi(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}
qi.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};qi.prototype.stopImmediatePropagation=function(){this.g=!0};qi.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",qi);function ri(){this.Ya=new db;this.Df=this}ri.prototype.addEventListener=function(a,b){this.Ya&&this.Ya.push(a,b)};ri.prototype.removeEventListener=function(a,b){this.Ya&&this.Ya.remove(a,b)};ri.prototype.dispatchEvent=function(a){if(!this.Ya)return!0;var b=this.Ya.get(a.type)||[],c=this.Ya.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.Df;a.currentTarget=this.Df;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
ri.prototype.release=function(){this.Ya=null};function si(){this.g=[]}function ti(a,b){a.g.push(b.finally(function(){$a(a.g,b)}))}si.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 ui(a,b,c,d,e,f,g){ri.call(this);this.i=null;this.j=!1;this.u=new si;this.g=new Set;this.h=new Set;this.o=a||null;this.m=b||null;this.B=c||null;this.C=d||null;this.D=e||null;this.H=f||null;this.F=g||null;this.l=new Map}ma(ui,ri);p=ui.prototype;p.configure=function(a){this.i=a};function vi(a,b,c,d){d=d===void 0?!1:d;c=c||wi;var e=xi.get(a);(!e||c>=e.priority)&&xi.set(a,{priority:c,ie:b,Fi:d})}
function yi(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.Ii=function(a){this.g.add(a)};p.Zi=function(a){this.g.delete(a)};p.ih=function(){this.g.clear()};p.Ji=function(a){this.h.add(a)};p.$i=function(a){this.h.delete(a)};p.jh=function(){this.h.clear()};p.Kf=function(){this.l.clear()};
function zi(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:c===void 0?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();ri.prototype.release.call(this);return this.u.destroy()};
p.request=function(a,b,c){var d=this,e=new Ai;if(this.j){var f=Promise.reject(new W(2,7,7001));f.catch(function(){});return new Bi(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Yc(b.retryParameters):gi();b.uris=Yc(b.uris);f=Ci(this,a,b,c);var g=f.Wa(function(){return Di(d,a,b,c,new fi(b.retryParameters,!1),0,null,e)}),h=g.Wa(function(q){return Ei(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.Wa(function(q){var r=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=r;q.ei||!d.o||u.fromCache||b.method=="HEAD"||a!=Fi||d.o(u.timeMs,u.data.byteLength,Gi(c),b,c);d.F&&d.F(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new Bi(n.promise,function(){return n.abort()},e);ti(this.u,f);return f};
function Ci(a,b,c,d){function e(h){f=f.Wa(function(){c.body&&(c.body=Mb(c.body));return h(b,c,d)})}var f=mi(void 0);a.D&&e(a.D);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Wa(void 0,function(h){if(h instanceof W&&h.code==7001)throw h;throw new W(2,1,1006,h);})}
function Di(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://"));f>0&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new ub(c.uris[f]),l=k.xb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),vb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=xi.get(l))?l.ie:null;if(!n)return ki(new W(2,1,1E3,k));var q=l.Fi;(k=a.l.get(k.gb))&&(c.headers["common-access-token"]=k);var r=null,u=null,v=!1,w=!1,z;return ni(hi(e)).Wa(function(){if(a.j)return li();
z=Date.now();var x=0;c.requestStartTime=Date.now();var A=n(c.uris[f],c,b,function(H,B,I){r&&r.stop();u&&u.ka(G/1E3);a.o&&b==Fi&&(x++,c.packetNumber=x,a.o(H,B,Gi(d),c,d),m=!0,h.g=I)},function(H){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.m&&a.m(H,c,b)},{minBytesForProgressEvents:a.i.minBytesForProgressEvents});if(!q)return A;var D=c.retryParameters.connectionTimeout;D&&(r=new Oe(function(){v=!0;A.abort()}),r.ka(D/1E3));var G=c.retryParameters.stallTimeout;G&&(u=new Oe(function(){v=!0;A.abort()}));
return A}).Wa(function(x){r&&r.stop();u&&u.stop();x.timeMs==void 0&&(x.timeMs=Date.now()-z);var A=x.headers["common-access-token"];if(A){var D=new ub(x.uri);a.l.set(D.gb,A)}A={response:x,ei:m};!w&&a.m&&a.m(x.headers,c,b);a.B&&a.B(c,x);return A},function(x){r&&r.stop();u&&u.stop();if(a.C){var A=null,D=0;x instanceof W&&(A=x,x.code==1001&&(D=x.data[1]));a.C(c,A,D,v)}if(a.j)return li();v&&(x=new W(1,1,1003,c.uris[f],b));if(x instanceof W){if(x.code==7001)throw x;if(x.code==1010)throw g;if(x.severity==
1){A=(new Map).set("error",x);A=new qi("retry",A);A.cancelable=!0;a.dispatchEvent(A);if(A.defaultPrevented)throw x;f=(f+1)%c.uris.length;return Di(a,b,c,d,e,f,x,h)}}throw x;})}
function Ei(a,b,c,d){var e=mi(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={zg:void 0},f=a.next())g.zg=f.value,e=e.Wa(function(h){return function(){var k=c.response;k.data&&(k.data=Mb(k.data));return(0,h.zg)(b,k,d)}}(g));return e.Wa(function(){return c},function(h){var k=2;if(h instanceof W){if(h.code==7001)throw h;k=h.severity}throw new W(k,1,1007,h);})}function Gi(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.mc)return!1}return!0}S("shaka.net.NetworkingEngine",ui);
ui.prototype.request=ui.prototype.request;ui.prototype.destroy=ui.prototype.destroy;ui.makeRequest=zi;ui.defaultRetryParameters=function(){return gi()};ui.prototype.clearCommonAccessTokenMap=ui.prototype.Kf;ui.prototype.clearAllResponseFilters=ui.prototype.jh;ui.prototype.unregisterResponseFilter=ui.prototype.$i;ui.prototype.registerResponseFilter=ui.prototype.Ji;ui.prototype.clearAllRequestFilters=ui.prototype.ih;ui.prototype.unregisterRequestFilter=ui.prototype.Zi;
ui.prototype.registerRequestFilter=ui.prototype.Ii;ui.unregisterScheme=function(a){xi.delete(a)};ui.registerScheme=vi;ui.prototype.configure=ui.prototype.configure;function Ai(){this.g=0}ui.NumBytesRemainingClass=Ai;function Bi(a,b,c){ji.call(this,a,b);this.h=c}ma(Bi,ji);ui.PendingRequest=Bi;var Fi=1;ui.RequestType={MANIFEST:0,SEGMENT:Fi,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9};
ui.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var wi=3;ui.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:wi};var xi=new Map;function Hi(a,b,c,d,e,f){var g=(new Map).set("RepresentationID",b).set("Number",c).set("SubNumber",d).set("Bandwidth",e).set("Time",f);return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if(h=="$$")return"$";var n=g.get(k);if(n==null)return h;k=="RepresentationID"&&l&&(l=void 0);k=="Time"&&typeof n!="bigint"&&(Math.abs(n-Math.round(n))>=.2&&Ta("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=
n.toString();break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
function Ii(a,b){var c=Ji(a,b,"timescale"),d=1;c&&(d=wd(c)||1);c=Ji(a,b,"duration");var e=(c=wd(c||""))?c/d:null,f=Ji(a,b,"startNumber"),g=Number(Ji(a,b,"presentationTimeOffset"))||0,h=xd(f||"");if(f==null||h==null)h=1;f=null;if(b=Ki(a,b,"SegmentTimeline")){b=id(b,"S");f=d;a=a.$.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var q=b[n],r=b[n+1],u=pd(q,"t",xd),v=pd(q,"d",xd),w=pd(q,"r",vd);q=pd(q,"k",vd)||0;u!=null&&(u-=g);if(v){u=u!=null?u:m;w=w||0;if(w<0)if(r){r=pd(r,"t",xd);if(r==
null)break;else if(u>=r)break;w=Math.ceil((r-u)/v)-1}else{if(a==Infinity)break;else if(u/f>=a)break;w=Math.ceil((a*f-u)/v)-1}l.length>0&&u!=m&&(l[l.length-1].end=u/f);for(r=0;r<=w;++r)m=u+v,l.push({start:u/f,end:m/f,aj:u,$e:q,Oi:l.length+k}),u=m}}f=l}return{timescale:d,re:c,Pa:e,od:h,bb:g/d||0,wc:g,timeline:f}}function Li(a,b){return[b(a.I),b(a.aa),b(a.ha)].filter(Re)}function Ji(a,b,c){b=Li(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
function Ki(a,b,c){b=Li(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=md(d.value,c));d=b.next());return a}
function Mi(a,b,c,d,e,f){for(var g=qd(a,"http://www.w3.org/1999/xlink","href"),h=qd(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=dd("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(f>=5)return ki(new W(2,4,4028));if(h!="onLoad")return ki(new W(2,4,4027));var q=mc([d],[g]);return e.request(0,zi(q,b)).Wa(function(r){r=ad(r.data,a.tagName);if(!r)return ki(new W(2,4,4001,g));for(a.children=
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return Pi(a,b,c,q[0],e,f+1)})}
function Pi(a,b,c,d,e,f){f=f===void 0?0:f;if(qd(a,"http://www.w3.org/1999/xlink","href")){var g=Mi(a,b,c,d,e,f);c&&(g=g.Wa(void 0,function(){return Pi(a,b,c,d,e,f)}));return g}g=[];for(var h=t(hd(a)),k=h.next(),l={};!k.done;l={Zc:void 0},k=h.next())l.Zc=k.value,qd(l.Zc,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?a.children=a.children.filter(function(m){return function(n){return n!==m.Zc}}(l)):l.Zc.tagName!="SegmentTimeline"&&g.push(Pi(l.Zc,b,c,d,e,f));return oi(g).Wa(function(){return a})}
;function Qi(a,b,c,d,e,f,g,h){this.Ia=a;this.startByte=b;this.endByte=c;this.Ue=d===void 0?null:d;this.timescale=e===void 0?null:e;this.h=f===void 0?null:f;this.aesKey=g===void 0?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=h===void 0?!1:h}Qi.prototype.Ec=function(){return this.startByte};Qi.prototype.Cc=function(){return this.endByte};Qi.prototype.Lg=function(a){this.h=a};Qi.prototype.ec=function(){return this.h};
function Ri(a,b){return a===b?!0:a&&b?a.Ec()==b.Ec()&&a.Cc()==b.Cc()&&bb(a.Ia().sort(),b.Ia().sort())&&Lb(a.ec(),b.ec()):a==b}S("shaka.media.InitSegmentReference",Qi);Qi.prototype.getEndByte=Qi.prototype.Cc;Qi.prototype.getStartByte=Qi.prototype.Ec;
function X(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v){l=l===void 0?[]:l;r=r===void 0?Si:r;this.startTime=a;this.h=this.endTime=b;this.H=c;this.startByte=d;this.endByte=e;this.oa=f;this.l=g;this.F=h;this.D=k;this.g=l;this.tilesLayout=m===void 0?"":m;this.C=n===void 0?null:n;this.B=q===void 0?null:q;this.status=r;this.preload=!1;this.i=!0;this.u=!1;this.aesKey=u===void 0?null:u;this.thumbnailSprite=null;this.j=-1;this.m=v===void 0?!1:v;this.hd=this.mc=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.jg();
this.m&&this.g.length&&this.g[this.g.length-1].ig();this.o=this.bandwidth=this.mimeType=this.codecs=null;this.J=!1}p=X.prototype;p.Ia=function(){return this.H()};p.getStartTime=function(){return this.startTime};p.Ch=function(){return this.endTime};p.Ec=function(){return this.startByte};p.Cc=function(){return this.endByte};
function Ti(a){if(a.endByte)return a.endByte+1-a.startByte;if(a.bandwidth){var b=a.bandwidth*(a.endTime-a.startTime);if(!isNaN(b)&&b>0)return b}if(a.g.length>0&&a.m)for(a=t(a.g),a=a.next();!a.done;a=a.next()){Ti(a.value);break}return null}p.ai=function(){return this.tilesLayout};p.$h=function(){return this.C};p.fc=function(){return this.status};p.wi=function(){this.status=Ui};p.ui=function(){this.preload=!0};p.isPreload=function(){return this.preload};p.jd=function(){this.i=!1};p.ki=function(){return this.i};
p.jg=function(){this.mc=!0};p.mi=function(){return this.mc};p.ig=function(){this.hd=!0};p.li=function(){return this.hd};p.ti=function(){this.u=!0};p.gi=function(){return this.u};p.Ng=function(a){this.thumbnailSprite=a};p.Yh=function(){return this.thumbnailSprite};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.h+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.h+=a};
p.Wi=function(a){this.B==null?Sa("Sync attempted without sync time!"):(a=this.B-a-this.startTime,Math.abs(a)>=.001&&this.offset(a))};p.Lg=function(a,b){this.o=a;this.J=b===void 0?!1:b};p.ec=function(a){var b=this.o;(a===void 0||a)&&this.J&&(this.o=null);return b};function Vi(a,b){a.oa=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Vi(c.value,b)}S("shaka.media.SegmentReference",X);X.prototype.getSegmentData=X.prototype.ec;X.prototype.setSegmentData=X.prototype.Lg;X.prototype.syncAgainst=X.prototype.Wi;
X.prototype.offset=X.prototype.offset;X.prototype.getThumbnailSprite=X.prototype.Yh;X.prototype.setThumbnailSprite=X.prototype.Ng;X.prototype.hasByterangeOptimization=X.prototype.gi;X.prototype.markAsByterangeOptimization=X.prototype.ti;X.prototype.isLastPartial=X.prototype.li;X.prototype.markAsLastPartial=X.prototype.ig;X.prototype.isPartial=X.prototype.mi;X.prototype.markAsPartial=X.prototype.jg;X.prototype.isIndependent=X.prototype.ki;X.prototype.markAsNonIndependent=X.prototype.jd;
X.prototype.isPreload=X.prototype.isPreload;X.prototype.markAsPreload=X.prototype.ui;X.prototype.markAsUnavailable=X.prototype.wi;X.prototype.getStatus=X.prototype.fc;X.prototype.getTileDuration=X.prototype.$h;X.prototype.getTilesLayout=X.prototype.ai;X.prototype.getEndByte=X.prototype.Cc;X.prototype.getStartByte=X.prototype.Ec;X.prototype.getEndTime=X.prototype.Ch;X.prototype.getStartTime=X.prototype.getStartTime;X.prototype.getUris=X.prototype.Ia;var Si=0,Ui=1;X.Status={fj:Si,nj:Ui,kj:2};function Wi(a,b,c,d,e,f,g){var h,k=(new Pg).P("sidx",function(l){h=Xi(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new W(2,3,3004);}
function Xi(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(k==0)throw new W(2,3,3005);if(g.version==0){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Oc(),m=g.reader.Oc();g.reader.skip(2);var n=g.reader.kb();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.O(),r=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.O();g.reader.skip(4);if(r==1)throw new W(2,3,3006);h.push(new X(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 Yi(a){this.h=Sb(a);this.g=new Gg(this.h,0)}Yi.prototype.La=function(){return this.g.La()};
function Zi(a){var b=$i(a);if(b.length>7)throw new W(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=$i(a);a:{d=t(aj);for(var e=d.next();!e.done;e=d.next())if(Lb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Da();else{if(b.length==8&&b[1]&224)throw new W(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=e==0?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Da()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Da();d=Sb(a.h,a.g.Da(),b);a.g.skip(b);return new bj(c,
d)}function $i(a){var b=a.g.Da(),c=a.g.mb();if(c==0)throw new W(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return V(a.h,b,c)}var aj=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function bj(a,b){this.id=a;this.g=b}
function cj(a){if(a.g.byteLength>8)throw new W(2,3,3002);if(a.g.byteLength==8&&a.g.getUint8(0)&224)throw new W(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function dj(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Yi(a.g);for(var n=null,q=null;a.La();){var r=Zi(a);if(r.id==187){var u=ej(r);u&&(r=c*u.bj,u=b+u.Ki,n!=null&&m.push(new X(n+g,r+g,l,q,u-1,f,g,h,k)),n=r,q=u)}}n!=null&&m.push(new X(n+g,d+g,l,q,null,f,g,h,k));return m}
function ej(a){var b=new Yi(a.g);a=Zi(b);if(a.id!=179)throw new W(2,3,3013);a=cj(a);b=Zi(b);if(b.id!=183)throw new W(2,3,3012);b=new Yi(b.g);for(var c=0;b.La();){var d=Zi(b);if(d.id==241){c=cj(d);break}}return{bj:a,Ki:c}};function fj(a){this.g=a;this.m=null;this.i=0;this.o=!1}p=fj.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.xi=function(){this.o=!0};p.Rb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
p.find=function(a){for(var b=this.g.length-1,c=b;c>=0;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};p.get=function(a){if(this.g.length==0)return null;a-=this.i;return a<0||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.$d=function(a){if(!this.o&&a.length){var b=Math.round(a[0].startTime*1E3)/1E3;this.g=this.g.filter(function(c){return Math.round(c.startTime*1E3)/1E3<b});this.g.push.apply(this.g,y(a))}};p.ae=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(c.g.length==0||d.endTime>c.g[0].startTime)});this.$d(a);this.Ka(b)};p.Ka=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.cd=function(a,b,c){c=c===void 0?!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;this.g.length!=0&&(a=this.g[this.g.length-1],b=new X(a.startTime,b,a.H,a.startByte,a.endByte,a.oa,a.l,a.F,a.D,a.g,a.tilesLayout,a.C,a.B,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.j=a.j,this.g[this.g.length-1]=b)}};
p.se=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Oe(function(){var d=b();d?c.g.push.apply(c.g,y(d)):(c.m.stop(),c.m=null)}),this.m.Ba(a))};fj.prototype[Symbol.iterator]=function(){return this.pb(0)};
fj.prototype.pb=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this.find(a);if(d==null)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&e.g.length>0)for(var g=e.g.length-1;g>=0;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.i;)g--,h=e.g[g];if(!h.i)return Sa("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new gj(this,d,f,c)};fj.prototype.Kd=function(){return-1};
function hj(a,b,c){a=new X(a,a+b,function(){return c},0,null,null,a,a,a+b);return new fj([a])}S("shaka.media.SegmentIndex",fj);fj.forSingleSegment=hj;fj.prototype.getIteratorForTime=fj.prototype.pb;fj.prototype.updateEvery=fj.prototype.se;fj.prototype.fit=fj.prototype.cd;fj.prototype.evict=fj.prototype.Ka;fj.prototype.mergeAndEvict=fj.prototype.ae;fj.prototype.offset=fj.prototype.offset;fj.prototype.get=fj.prototype.get;fj.prototype.find=fj.prototype.find;fj.prototype.markImmutable=fj.prototype.xi;
fj.prototype.release=fj.prototype.release;fj.prototype.getNumEvicted=fj.prototype.getNumEvicted;fj.prototype.getNumReferences=fj.prototype.getNumReferences;function gj(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=gj.prototype;p.Tc=function(a){this.reverse=a};p.nh=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&a.g.length>0&&a.m&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&a.g.length>0?a.g[this.g]:a};
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&a.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(a=this.i.get(this.h))&&a.g.length>0?a.g.length-1:0)):(this.h--,this.g=0):a&&a.g.length>0?(this.g++,a.m&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.jf=function(){var a=this.current();if(a&&a.mc&&!a.i&&(a=this.i.get(this.h))&&a.g.length>0)for(var b=a.g[this.g];b.i&&!(this.g<=0);)this.g--,b=a.g[this.g]};
S("shaka.media.SegmentIterator",gj);gj.prototype.resetToLastIndependent=gj.prototype.jf;gj.prototype.next=gj.prototype.next;gj.prototype.current=gj.prototype.current;gj.prototype.currentPosition=gj.prototype.nh;gj.prototype.setReverse=gj.prototype.Tc;function ij(){fj.call(this,[]);this.h=[]}ma(ij,fj);p=ij.prototype;p.clone=function(){var a=new ij;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){this.h=[]};p.Rb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Rb(a)};
function jj(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(e!=null)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function kj(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.find(b)!=null)return c.Kd();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.$d=function(){};p.Ka=function(a){if(this.h.length){var b=this.h[0];b.Ka(a);b.getNumReferences()==0&&(this.h.shift(),this.i+=b.getNumEvicted(),b.release(),this.Ka(a))}};p.ae=function(){};p.cd=function(){};p.se=function(){};S("shaka.media.MetaSegmentIndex",ij);ij.prototype.updateEvery=ij.prototype.se;
ij.prototype.fit=ij.prototype.cd;ij.prototype.mergeAndEvict=ij.prototype.ae;ij.prototype.evict=ij.prototype.Ka;ij.prototype.merge=ij.prototype.$d;ij.prototype.offset=ij.prototype.offset;ij.prototype.get=ij.prototype.get;ij.prototype.find=ij.prototype.find;ij.prototype.forEachTopLevelReference=ij.prototype.Rb;ij.prototype.release=ij.prototype.release;function lj(a,b,c){b=Ki(a,b,"Initialization");if(!b)return null;var d=a.I.Na(),e=b.attributes.sourceURL;e&&(d=mc(d,[dc(e)],a.eb()));e=0;var f=null;if(b=pd(b,"range",ud))e=b.start,f=b.end;c=new Qi(function(){return d},e,f,mj(a),null,null,c,a.aa.encrypted);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;a.$&&!a.$.Wd&&(c.g=a.$.start+a.$.duration);return c}
function nj(a,b,c){var d=Number(Ji(a,oj,"presentationTimeOffset"))||0,e=Ji(a,oj,"timescale"),f=1;e&&(f=wd(e)||1);var g=d/f||0,h=lj(a,oj,c);pj(a,h);var k=Zc(a);return{endTime:-1,timeline:-1,cc:function(){var l=Ki(k,oj,"RepresentationIndex");var m=k.I.Na();l&&(l=dc(l.attributes.sourceURL))&&(m=mc(m,[l],k.eb()));l=qj(k);return rj(k,b,h,m,l.start,l.end,g)},timescale:f}}
function rj(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,w,z,x,A,D,G,H,B,I;return F(function(O){if(O.g==1)return h=a.presentationTimeline,k=!a.$a||!a.$.Wd,l=a.$.start,m=a.$.duration,n=a.I.mimeType.split("/")[1],q=b,r=null,u=[q(d,e,f,!1),n=="webm"?q(c.Ia(),c.startByte,c.endByte,!0):null],q=null,C(O,Promise.all(u),2);v=O.h;w=v[0];z=v[1]||null;x=null;A=l-g;D=l;G=m?l+m:Infinity;if(n=="mp4")var N=Wi(w,e,d,c,A,D,G);else{N=w;var P=new Yi(z);if(Zi(P).id!=440786851)throw new W(2,3,3008);var J=Zi(P);if(J.id!=408125543)throw new W(2,
3,3009);P=J.g.byteOffset;J=new Yi(J.g);for(var L=null;J.La();){var Q=Zi(J);if(Q.id==357149030){L=Q;break}}if(!L)throw new W(2,3,3010);L=new Yi(L.g);Q=1E6;for(J=null;L.La();){var K=Zi(L);if(K.id==2807729)Q=cj(K);else if(K.id==17545)if(K.g.byteLength==4)J=K.g.getFloat32(0);else if(K.g.byteLength==8)J=K.g.getFloat64(0);else throw new W(2,3,3003);}if(J==null)throw new W(2,3,3011);L=Q/1E9;J*=L;N=Zi(new Yi(N));if(N.id!=475249515)throw new W(2,3,3007);N=dj(N,P,L,J,d,c,A,D,G)}x=N;H=t(x);for(B=H.next();!B.done;B=
H.next())I=B.value,I.codecs=a.I.codecs,I.mimeType=a.I.mimeType,I.bandwidth=a.bandwidth;h.Xe(x);r=new fj(x);k&&r.cd(D,G,!0);return O.return(r)})}function oj(a){return a.Sc}function qj(a){var b=Ki(a,oj,"RepresentationIndex");a=Ji(a,oj,"indexRange");a=ud(a||"");b&&(a=pd(b,"range",ud,a));return a}function pj(a,b){sj(a,b);if(!qj(a))throw new W(2,4,4002);}
function sj(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=uc&&c!="mp4"&&c!="webm")throw new W(2,4,4006);if(c=="webm"&&!b)throw new W(2,4,4005);}
function mj(a){var b=a.I;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.fe,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.aa.label||null,roles:a.roles||null,language:a.aa.language||null}};function tj(a,b,c){var d=lj(a,uj,c),e=vj(a);if(!e.Pa&&!e.timeline&&e.Hc.length>1)throw new W(2,4,4002);if(!e.Pa&&!a.$.duration&&!e.timeline&&e.Hc.length==1)throw new W(2,4,4002);if(e.timeline&&e.timeline.length==0)throw new W(2,4,4002);var f=null,g=null;a.ha.id&&a.I.id&&(g=b.get(a.ha.id+","+a.I.id))&&(f=g.segmentIndex);var h=wj(a.$.start,a.$.duration,a.I.Na,e,d,c,a.I.mimeType,a.I.codecs,a.bandwidth,a.eb);b=!f;f?f.ae(h,a.presentationTimeline.Fb()):f=new fj(h);a.presentationTimeline.Xe(h);a.$a&&a.$.Wd||
f.cd(a.$.start,a.$.duration?a.$.start+a.$.duration:Infinity,b);g&&(g.segmentIndex=f);return{endTime:-1,timeline:-1,cc:function(){f&&f.getNumReferences()!=0||f.$d(h);return Promise.resolve(f)},timescale:e.timescale}}function uj(a){return a.Lb}function vj(a){var b=xj(a);a=Ii(a,uj);var c=a.od;c==0&&(c=1);var d=0;a.Pa?d=a.Pa*(c-1):a.timeline&&a.timeline.length>0&&(d=a.timeline[0].start);return{Pa:a.Pa,startTime:d,od:c,bb:a.bb,timescale:a.timescale,timeline:a.timeline,Hc:b}}
function wj(a,b,c,d,e,f,g,h,k,l){var m=d.Hc.length;d.timeline&&d.timeline.length!=d.Hc.length&&(m=Math.min(d.timeline.length,d.Hc.length));for(var n=a-d.bb,q=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={ue:void 0,le:void 0},w++){v.le=d.Hc[w];var z=u;u=void 0;u=d.Pa!=null?z+d.Pa:d.timeline?d.timeline[w].end:z+b;v.ue=null;v=new X(a+z,a+u,function(x){return function(){x.ue==null&&(x.ue=mc(c(),[x.le.zi],l()));return x.ue}}(v),v.le.start,v.le.end,e,n,a,q,[],"",null,null,Si,f);v.codecs=h;v.mimeType=
g;v.bandwidth=k;r.push(v)}return r}function xj(a){return[a.I.Lb,a.aa.Lb,a.ha.Lb].filter(Re).map(function(b){return id(b,"SegmentURL")}).reduce(function(b,c){return b.length>0?b:c}).map(function(b){b.attributes.indexRange&&!a.Qe&&(a.Qe=!0);var c=dc(b.attributes.media);b=pd(b,"mediaRange",ud,{start:0,end:null});return{zi:c,start:b.start,end:b.end}})};function yj(a,b,c,d,e,f,g,h,k,l){k||a.I.Ud||(a.I.Ud=Ji(a,zj,"initialization"));var m=a.I.Ud?Aj(a,g):null,n=Bj(a);Cj(n);var q=Zc(a);if(n.fd)return sj(a,m),{endTime:-1,timeline:-1,cc:function(){var z=Hi(n.fd,q.I.originalId,null,null,q.bandwidth||null,null);z=mc(q.I.Na(),[z]);return rj(q,b,m,z,0,null,n.bb)},timescale:n.timescale};if(n.Pa)return d||a.aa.contentType==="image"||a.aa.contentType==="text"||(d=a.$.start,l=a.ha.id,c=a.$.duration,l=(l=l!=null&&f.get(l)||c)?d+l:Infinity,a.presentationTimeline.We(n.Pa),
a.presentationTimeline.pg(d,l)),{endTime:-1,timeline:-1,cc:function(){return Dj(q,n,e,m,f,g,h,a.I.me)},timescale:n.timescale};var r=null;d=d=null;a.ha.id&&a.I.id&&(d=a.ha.id+","+a.I.id,d=c.get(d))&&(r=d.segmentIndex);var u=a.$.start,v=a.$.duration?u+a.$.duration:Infinity;if(r)l=r,Ej(l,n,u,v,m,a.$a),l.Ka(a.presentationTimeline.Fb());else{c=0;k=-1;if(a.ha.id!=null&&a.I.id!=null){var w=l.get(a.ha.id);if(w)k=w.timeline;else for(l=t(l.values()),w=l.next();!w.done;w=l.next())if(w=w.value,Math.abs(n.bb-
w.endTime)<=xc&&w.gf.includes(a.I.id)){k=w.timeline;break}else w.timeline>=c&&(c=w.timeline+1)}k==-1&&(k=c);r=new Fj(a.$a,n,a.I.originalId,a.bandwidth,a.I.Na,a.eb,u,v,m,g,a.I.me,k)}n.timeline&&a.aa.contentType!=="image"&&a.aa.contentType!=="text"&&a.presentationTimeline.qg(r.h?r.h.timeline:[],u);d&&a.$a&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.bb:-1;l=-1;r instanceof Fj&&(l=r.Kd());return{endTime:d,timeline:l,cc:function(){r instanceof Fj&&r.getNumReferences()==0&&Ej(r,n,u,
v,m,a.$a);return Promise.resolve(r)},timescale:n.timescale}}function zj(a){return a.Xb}function Bj(a){var b=Ii(a,zj),c=Ji(a,zj,"media"),d=Ji(a,zj,"index"),e=Ji(a,zj,"k"),f=0;e&&(f=parseInt(e,10));return{re:b.re,Pa:b.Pa,timescale:b.timescale,od:b.od,bb:b.bb,wc:b.wc,timeline:b.timeline,wb:c&&dc(c),fd:d,mimeType:a.I.mimeType,codecs:a.I.codecs,bandwidth:a.bandwidth,Ai:f}}
function Cj(a){var b=a.fd?1:0;b+=a.timeline?1:0;b+=a.Pa?1:0;if(b==0)throw new W(2,4,4002);b!=1&&(a.fd&&(a.timeline=null),a.re=null,a.Pa=null);if(!a.fd&&!a.wb)throw new W(2,4,4002);}
function Dj(a,b,c,d,e,f,g,h){function k(J){var L=J-w,Q=L*v,K=b.re,M=L*K;"BigInt"in window&&M>Number.MAX_SAFE_INTEGER&&(M=BigInt(L)*BigInt(K));Q+=q;L=Q+v;K=Math.min(L,m());var R=[],aa=b.Ai;if(aa)for(var nb=(K-Q)/aa,Aa={},cb=0;cb<aa;Aa={Rg:void 0},cb++){var Ua=Q+nb*cb,Ob=Ua+nb;Aa.Rg=cb;Aa=new X(Ua,Ob,function(ob){return function(){var Ga=Hi(z,A,J,ob.Rg,x,M);return mc(D(),[Ga],G())}}(Aa),0,null,d,H,q,m(),[],"",null,null,Si,f);Aa.codecs=a.I.codecs;Aa.mimeType=a.I.mimeType;h==0?cb>0&&Aa.jd():cb%h!=0&&
Aa.jd();R.push(Aa)}Q=new X(Q,K,function(){if(aa)return[];var ob=Hi(z,A,J,null,x,M);return mc(D(),[ob],G())},0,null,d,H,q,m(),R,"",null,null,Si,f,R.length>0);Q.codecs=a.I.codecs;Q.mimeType=a.I.mimeType;Q.bandwidth=a.bandwidth;Q.h=L;return Q}function l(){var J=[Math.max(n.Fb(),q),Math.min(n.Tb(),m())].map(function(L){return L-q});J=[Math.ceil(J[0]/v),Math.ceil(J[1]/v)-1];a.I.Va&&J[1]++;return J.map(function(L){return L+w})}function m(){var J=r!=null&&e.get(r)||u;return J?q+J:Infinity}var n=a.presentationTimeline,
q=a.$.start,r=a.ha.id,u=a.$.duration,v=b.Pa,w=b.od,z=b.wb,x=a.bandwidth||null,A=a.I.originalId,D=a.I.Na,G=a.eb,H=q-b.bb,B=l();c=a.$a?Math.max(B[0],B[1]-c+1):B[0];g=g||B[1];B=[];for(var I=c;I<=g;++I){var O=k(I);B.push(O)}var N=new fj(B);B=n.Tb()<m();I=n.U();if(B||I){var P=Math.max(c,g+1);c=v;a.I.Va&&(c=.1);N.se(c,function(){var J=n.Fb();N.Ka(J);var L=t(l());L.next();L=L.next().value;for(var Q=[];P<=L;){var K=k(P);Q.push(K);P++}return J>m()&&!Q.length?null:Q})}return Promise.resolve(N)}
function Aj(a,b){var c=a.I.Ud;c||(c=Ji(a,zj,"initialization"));if(!c)return null;c=dc(c);var d=a.I.originalId,e=a.bandwidth||null,f=a.I.Na,g=a.eb;b=new Qi(function(){var h=Hi(c,d,null,null,e,null);return mc(f(),[h],g())},0,null,mj(a),null,null,b,a.aa.encrypted);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;a.$&&!a.$.Wd&&(b.g=a.$.start+a.$.duration);return b}
function Fj(a,b,c,d,e,f,g,h,k,l,m,n){fj.call(this,[]);this.D=a;this.h=b;this.H=c;this.C=d;this.F=e;this.K=f;this.j=g;this.l=h;this.u=k;this.B=l;this.J=m;this.L=n;Gj(this)}ma(Fj,fj);p=Fj.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){fj.prototype.release.call(this);this.h=null};
p.Ka=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;b>0&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,this.getNumReferences()===0&&this.release())}};
function Ej(a,b,c,d,e,f){Hj(a,e);a.D=f;if(a.h){a.h.wc!==b.wc&&(a.h.timeline=b.timeline,a.h.wc=b.wc,a.h.bb=b.bb);a.h.wb!==b.wb&&(a.h.wb=b.wb);c=a.h.timeline;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();b.length>0&&a.h.timeline.push.apply(a.h.timeline,y(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;Gj(a)}function Hj(a,b){if(a.u!==b){a.u=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Vi(c,b)}}
function Gj(a){if(a.h&&!a.o){for(var b=[],c=t(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||d.end<=0||b.push(d);a.h.timeline=b;a.Ka(a.j)}}
p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:this.l===Infinity?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
p.get=function(a){var b=this;a-=this.i;if(a<0||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){c=this.h.timeline[a];var d=c.Oi,e=c.aj+this.h.wc,f=this.j-this.h.bb,g=this.j+c.end,h=g;a===this.getNumReferences()-1&&this.l!==Infinity&&(h=this.D&&Math.abs(h-this.l)>.1?Math.min(h,this.l):this.l);var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],q=!1;c.$e&&this.h&&this.h.wb&&(q=this.h.wb.includes("$SubNumber$"));if(q){q=(c.end-c.start)/c.$e;for(var r={},u=0;u<c.$e;r={ve:void 0,
Sg:void 0},u++){var v=c.start+q*u,w=v+q;r.Sg=u;r.ve=null;r=new X(this.j+v,this.j+w,function(z){return function(){if(!b.h)return[];z.ve==null&&(z.ve=Ij(b.h.wb,b.H,d,b.C,e,z.Sg,b.F,b.K));return z.ve}}(r),0,null,this.u,f,this.j,this.l,[],"",null,null,Si,this.B);r.codecs=k;r.mimeType=l;r.bandwidth=m;this.J==0?u>0&&r.jd():u%this.J!=0&&r.jd();n.push(r)}}c=new X(this.j+c.start,h,function(){return n.length>0||!b.h?[]:Ij(b.h.wb,b.H,d,b.C,e,null,b.F,b.K)},0,null,this.u,f,this.j,this.l,n,"",null,null,Si,this.B,
n.length>0);c.codecs=k;c.mimeType=l;c.h=g;c.bandwidth=m;this.g[a]=c}return c};p.Rb=function(a){Gj(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Ij(a,b,c,d,e,f,g,h){a=Hi(a,b,c,f,d||null,e);return mc(g(),[a],h()).map(function(k){return k.toString()})}p.Kd=function(){return this.L};function Jj(){}function Kj(a,b){Lj.set(a,b)}function Mj(){var a={};T();if(Nj())for(var b=t(Lj.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=Nj()?Lj.has(c):Oj().canPlayType(c)!="";return a}function Pj(a,b){if(b){var c=Lj.get(b.toLowerCase());if(c)return c}throw new W(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Jj);
Jj.unregisterParserByMime=function(a){Lj.delete(a)};Jj.registerParserByMime=Kj;Jj.registerParserByExtension=function(){U("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Jj.AccessibilityPurpose={oj:"visually impaired",gj:"hard of hearing",mj:"spoken subtitles"};var Lj=new Map;function Y(a,b,c){this.i=a;this.H=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.K=!1;this.J=0;this.D=c===void 0?!0:c;this.F=0;this.u=!1;this.m=a}p=Y.prototype;p.getDuration=function(){return this.l};p.Kh=function(){return this.h};p.Ti=function(a){this.i=a};p.Mb=function(a){this.l=a};p.Sh=function(){return this.i};p.Gg=function(a){this.B=a};p.rf=function(a){a&&!this.C&&(this.K=!0);this.C=a};p.Kg=function(a){this.o=a};p.Qd=function(){return this.o};
p.Hg=function(a){this.H=a};p.Bh=function(){return this.H};p.qg=function(a,b){if(a.length!=0){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(a.length!=0){var d=a[a.length-1].end+b;this.ee(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);this.i!=null&&this.D&&!this.u&&(this.i=c-this.g-this.h)}}};
p.Xe=function(a){if(a.length!=0){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.ee(b);this.g=Math.max(this.g,c);this.i!=null&&this.D&&!this.u&&(this.i=d-this.g-this.h)}};p.pg=function(a,b){this.ee(a);b==Infinity||this.U()||(this.g=Math.max(this.g,b))};p.Lh=function(){return this.g};p.gg=function(){this.u=!0};
p.ni=function(){return this.u};p.Jg=function(a){this.m=a};p.Gh=function(){return this.m};p.ee=function(a){this.j==null?this.j=a:this.K||(this.j=Math.min(this.j,a))};p.We=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){this.j!=null&&(this.j+=a);this.g!=null&&(this.g+=a)};p.U=function(){return this.l==Infinity&&!this.C};p.Gc=function(){return this.l!=Infinity&&!this.C};p.Fb=function(){return Math.max(this.J,this.Tb()-this.o)};p.Pg=function(a){this.J=a};
p.Tb=function(){return this.U()||this.Gc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.F,this.l):this.g?Math.min(this.g,this.l):this.l};p.dd=function(a){var b=Math.max(this.j,this.J);return this.o==Infinity?Math.ceil(b*1E3)/1E3:Math.max(b,Math.min(this.Tb()-this.o+a,this.ab()))};p.qb=function(){return this.dd(0)};p.ab=function(){return Math.max(0,this.Tb()-(this.U()||this.Gc()?this.H:0))};p.Xg=function(){return this.i==null||this.g!=null&&this.D?!1:!0};
p.Fg=function(a){this.F=a};p.uh=function(){return this.F};S("shaka.media.PresentationTimeline",Y);Y.prototype.getAvailabilityTimeOffset=Y.prototype.uh;Y.prototype.setAvailabilityTimeOffset=Y.prototype.Fg;Y.prototype.usingPresentationStartTime=Y.prototype.Xg;Y.prototype.getSeekRangeEnd=Y.prototype.ab;Y.prototype.getSeekRangeStart=Y.prototype.qb;Y.prototype.getSafeSeekRangeStart=Y.prototype.dd;Y.prototype.getSegmentAvailabilityEnd=Y.prototype.Tb;Y.prototype.setUserSeekStart=Y.prototype.Pg;
Y.prototype.getSegmentAvailabilityStart=Y.prototype.Fb;Y.prototype.isInProgress=Y.prototype.Gc;Y.prototype.isLive=Y.prototype.U;Y.prototype.offset=Y.prototype.offset;Y.prototype.notifyMaxSegmentDuration=Y.prototype.We;Y.prototype.notifyMinSegmentStartTime=Y.prototype.ee;Y.prototype.getInitialProgramDateTime=Y.prototype.Gh;Y.prototype.setInitialProgramDateTime=Y.prototype.Jg;Y.prototype.isStartTimeLocked=Y.prototype.ni;Y.prototype.lockStartTime=Y.prototype.gg;Y.prototype.getMaxSegmentEndTime=Y.prototype.Lh;
Y.prototype.notifyPeriodDuration=Y.prototype.pg;Y.prototype.notifySegments=Y.prototype.Xe;Y.prototype.notifyTimeRange=Y.prototype.qg;Y.prototype.getDelay=Y.prototype.Bh;Y.prototype.setDelay=Y.prototype.Hg;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Qd;Y.prototype.setSegmentAvailabilityDuration=Y.prototype.Kg;Y.prototype.setStatic=Y.prototype.rf;Y.prototype.setClockOffset=Y.prototype.Gg;Y.prototype.getPresentationStartTime=Y.prototype.Sh;Y.prototype.setDuration=Y.prototype.Mb;
Y.prototype.setPresentationStartTime=Y.prototype.Ti;Y.prototype.getMaxSegmentDuration=Y.prototype.Kh;Y.prototype.getDuration=Y.prototype.getDuration;function Qj(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=xe(d);b.has(e)||(c.push(d),b.add(e))}b=vc("audio",c);d=vc("video",c);a=vc(uc,c);d=Rj(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function Rj(a){if(a.length<=1)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?Cc('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function Sj(a,b,c){var d,e,f,g,h;return F(function(k){if(k.g==1)return d=b,d.cryptoKey?k.A(2):C(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=V(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;g>=0;g--)e[g]=f&255,f>>=8;b.blockCipherMode=="CBC"?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 Tj(a){this.o=null;this.B=a;this.H=new si;this.j=[];this.h=null;this.m=[];this.C=null;this.F=[];this.D=300;this.l=new Map;this.i=new Map;this.g=null;this.u="UNKNOWN"}Tj.prototype.configure=function(a){this.o=a};Tj.prototype.destroy=function(){this.B=this.o=null;this.j=[];this.h=null;this.m=[];this.F=[];this.l.clear();this.g!=null&&(this.g.stop(),this.g=null);return this.H.destroy()};Tj.prototype.setManifestType=function(a){this.u=a};
function Uj(a,b){var c,d,e,f,g,h,k;return F(function(l){if(l.g==1)return c=mc(a.j,[Vj(a,b)]),d=zi(c,a.o.retryParameters),e=a.B.networkingEngine.request(8,d),ti(a.H,e),sa(l,2),C(l,e.promise,4);if(l.g!=2)return f=l.h,g=Xb(f.data),h=JSON.parse(g),h.VERSION==1&&Wj(a,h,f.uri),ta(l,0);if((k=ua(l))&&k.code==7001)return l.return();a.g!=null&&(a.g.stop(),a.g=null);a.g=new Oe(function(){Uj(a,b)});a.g.ka(a.D);E(l)})}
function Vj(a,b){if(!a.m.length)return b;b=new ub(b);var c=a.C||a.m[0],d=Math.round(a.B.getBandwidthEstimate()),e=b.g;a.u=="DASH"?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):a.u=="HLS"&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Jb(e);e.$c&&yb(b,e);return b.toString()}
function Wj(a,b,c){a.g!=null&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Oe(function(){Uj(a,d)});if(c=b.TTL)a.D=c;a.g.ka(a.D);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}function Xj(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Tj.prototype.banLocation=function(a){this.i.set(a,Date.now()+6E4)};
function Yj(a,b,c){c=c===void 0?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Kc:void 0},f=e.next())if(g.Kc=f.value,f=b.get(g.Kc))d.push({bf:g.Kc,location:f});else if(f=a.F.find(function(k){return function(l){return l.hj==k.Kc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].$g?(h=new ub(h),wb(h,f["URI-REPLACEMENT"].$g),d.push({bf:g.Kc,location:h.toString()})):d.push({bf:g.Kc,location:h}))}e=Date.now();g=t(a.i.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
h=a.i.get(f),e>h&&a.i.delete(f);d=d.filter(function(k){for(var l=t(a.i.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new ub(k.location)).gb))return!1;return!0});d.length&&(a.C=d[0].bf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:mc(a.j,d)};function Zj(a,b,c,d,e){a=zi(a,d,e);if(b!=0||c!=null)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function ak(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.o=!1;this.m=new Set}p=ak.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.o=!1;this.m.clear()};p.bi=function(){return this.l};p.Pe=function(){return this.j.slice()};p.Eh=function(){return this.i};
p.Mf=function(a,b){if(a){if(a.type=="audio")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(a.type=="video")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==uc)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(a.type=="image")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 bk(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[ck(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[dk(n),n]})),l=new Map(h.textStreams.map(function(n){return[ek(n),n]}));h=new Map(h.imageStreams.map(function(n){return[fk(n),n]}));if(b){var m=gk(uc);l.set(ek(m),m);m=gk("image");h.set(fk(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Gf:c,Yg:d,Vg:e,ag:f}}
p.Ge=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,z,x,A,D,G,H,B,I,O,N,P,J,L,Q,K,M,R,aa,nb;return F(function(Aa){if(Aa.g==1){e=wc;if(!b&&a.length==1)return f=bk(a,!1),g=f.Gf,h=f.Yg,k=f.Vg,l=f.ag,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()),Aa.A(2);m=c?d.m.size:0;n=-1;for(q=0;q<a.length;q++)r=a[q],d.m.has(r.id)||(d.m.add(r.id),n==-1&&(n=q));if(n==-1)return Aa.return();u=bk(a,!0);v=u.Gf;w=u.Yg;z=u.Vg;
x=u.ag;return C(Aa,Promise.all([hk(d,d.h,v,n,m),hk(d,d.g,w,n,m),hk(d,d.j,z,n,m),hk(d,d.i,x,n,m)]),2)}A=0;D=[];if(d.g.length&&d.h.length)for(P=t(d.h),J=P.next();!J.done;J=P.next())for(L=J.value,Q=t(d.g),K=Q.next();!K.done;K=Q.next())M=K.value,R=Mh(L.drmInfos,M.drmInfos),L.drmInfos.length&&M.drmInfos.length&&!R.length||(aa=(L.bandwidth||0)+(M.bandwidth||0),L.dependencyStream&&(aa+=L.dependencyStream.bandwidth||0),M.dependencyStream&&(aa+=M.dependencyStream.bandwidth||0),nb=A++,D.push({id:nb,language:L.language,
disabledUntilTime:0,primary:L.primary,audio:L,video:M,bandwidth:aa,drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(G=d.g.length?d.g:d.h,H=t(G),B=H.next();!B.done;B=H.next())I=B.value,O=A++,N=I.bandwidth||0,I.dependencyStream&&(N+=I.dependencyStream.bandwidth||0),D.push({id:O,language:I.language,disabledUntilTime:0,primary:I.primary,audio:I.type==e.Y?I:null,video:I.type==e.sa?I:null,bandwidth:N,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,
decodingInfos:[]});d.l=D;E(Aa)})};
function hk(a,b,c,d,e){var f=ik,g=jk,h,k,l,m,n,q,r,u,v,w,z,x,A,D,G,H,B,I,O,N;return F(function(P){switch(P.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){P.A(4);break}n=m.value;return C(P,kk(a,n,c,d,g,h,e),5);case 5:q=P.h;if(!q)throw new W(2,4,4037);m=l.next();P.A(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v),z=w.next();!z.done;z=w.next())x=z.value,(A=lk(a,b,x,c,f,g,h))&&b.push(A);D=t(h);
for(G=D.next();!G.done;G=D.next())for(H=G.value,B=t(H),I=B.next(),O={};!I.done;O={uf:void 0},I=B.next())if(O.uf=I.value,!mk(O.uf)&&(N=b.some(function(J){return function(L){return nk(J.uf,L)}}(O))))throw new W(2,4,4037);return P.return(b)}})}function kk(a,b,c,d,e,f,g){return F(function(h){if(h.g==1)return ok(a,c,b,g>0),b.matchedStreams?b.segmentIndex?C(h,pk(b,d+g),2):h.A(2):h.return(!1);qk(b,d,e,f,g);return h.return(!0)})}
function pk(a,b){var c,d,e,f,g,h;return F(function(k){if(k.g==1){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex()),f.dependencyStream&&!f.dependencyStream.segmentIndex&&c.push(f.dependencyStream.createSegmentIndex());return C(k,Promise.all(c),2)}if(a.segmentIndex instanceof ij)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);E(k)})}
function lk(a,b,c,d,e,f,g){if(mk(c))return null;var h=e(c);ok(a,d,h);h.createSegmentIndex&&(h.createSegmentIndex=function(){return F(function(k){if(h.segmentIndex)return k.A(0);h.segmentIndex=new ij;return C(k,pk(h,0),0)})},h.closeSegmentIndex=function(){h.segmentIndex&&(h.segmentIndex.release(),h.segmentIndex=null);if(h.matchedStreams)for(var k=t(h.matchedStreams),l=k.next();!l.done;l=k.next()){l=l.value;var m;if(m=l.segmentIndex){a:{m=t(b);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n!==
h&&n.segmentIndex&&n.matchedStreams&&n.matchedStreams.includes(l)){m=!0;break a}m=!1}m=!m}m&&(l.segmentIndex.release(),l.segmentIndex=null)}});if(!h.matchedStreams||!h.matchedStreams.length)return null;qk(h,0,f,g,0);return h}
function qk(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;a.type=="audio"&&Ze(a.language,g.language)==0&&(h=!1);if(h&&((h=d[b-e])&&h.delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function ik(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set(a.keyIds);b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;b.trickModeVideo=null;b.dependencyStream=null;return b}
function jk(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);a.originalId==null?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Mh(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new W(2,
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=ik(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
for(var g=new ij,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),jk(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),jk(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=ik(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new ij,h=t(a.dependencyStream.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.dependencyStream.segmentIndex=g;return Promise.resolve()}),a.dependencyStream.matchedStreams.push(b.dependencyStream),jk(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),jk(a.dependencyStream,b))}
function ok(a,b,c,d){d=(d===void 0?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=rk(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function rk(a,b,c){var d={audio:ck,video:dk,text:ek,image:fk}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return nk(l,m)},video:function(l,m){return nk(l,m)},text:sk,image:tk}[c.type];for(var g={audio:uk,video:vk,text:wk,image:xk}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.o&&!mk(e)&&b.delete(d(e));return e}
function yk(a,b){return a.mimeType!=b.mimeType?!1:zk(a.codecs)===zk(b.codecs)}p.Og=function(a){this.o=a};function nk(a,b){return a.drmInfos&&!Kh(a.drmInfos,b.drmInfos)?!1:!0}function sk(a,b){return b.language?a.forced!==b.forced||Ze(a.language,b.language)==0||b.kind!=a.kind?!1:!0:!0}function tk(){return!0}
function uk(a,b,c){var d=Ak(a,b,c);if(d===Bk)return!0;if(d===Ck)return!1;d=Ze(a.language,b.language);var e=Ze(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1;if(c.roles.length!==b.roles.length)return c.roles.length<b.roles.length}else{if(!c.roles.length&&
b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Dk(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Bk)return!0;if(d==Ck)return!1;d=Dk(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Bk?!0:d==Ck?!1:a.bandwidth&&Ek(a.bandwidth,b.bandwidth,c.bandwidth)==Bk?!0:!1}
function vk(a,b,c){var d=Ak(a,b,c);if(d===Bk)return!0;if(d===Ck)return!1;d=Dk(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Bk)return!0;if(d==Ck)return!1;if(a.frameRate){d=Dk(a.frameRate,b.frameRate,c.frameRate);if(d==Bk)return!0;if(d==Ck)return!1}return a.bandwidth&&Ek(a.bandwidth,b.bandwidth,c.bandwidth)==Bk?!0:!1}
function wk(a,b,c){var d=Ze(a.language,b.language),e=Ze(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function xk(a,b,c){return Dk(a.width*a.height,b.width*b.height,c.width*c.height)==Bk?!0:!1}
function gk(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new fj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,
baseOriginalId:null}}function Dk(a,b,c){if(b==a&&a!=c)return Ck;if(c==a&&a!=b)return Bk;if(b>a){if(c<=a||c-a<b-a)return Bk;if(c-a>b-a)return Ck}else{if(c>a)return Ck;if(a-c<a-b)return Bk;if(a-c>a-b)return Ck}return Fk}function Ak(a,b,c){var d=a.mimeType===b.mimeType&&a.codecs===b.codecs,e=a.mimeType===c.mimeType&&a.codecs===c.codecs;if(d&&!e)return Ck;if(!d&&e)return Bk;b=yk(a,b);a=yk(a,c);return b&&!a?Ck:!b&&a?Bk:Fk}function Ek(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Bk:b<a?Ck:Fk}
function mk(a){switch(a.type){case uc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function dk(a){return Gk([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}
function ck(a){return Gk([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function ek(a){return Gk([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function fk(a){return Gk([a.width,a.codecs,a.mimeType])}function Gk(a){return JSON.stringify(a)}function zk(a){if(!Hk.has(a)){var b=ve(a);Hk.set(a,b)}return Hk.get(a)}
S("shaka.util.PeriodCombiner",ak);ak.prototype.setUseStreamOnce=ak.prototype.Og;ak.prototype.combinePeriods=ak.prototype.Ge;ak.prototype.deleteStream=ak.prototype.Mf;ak.prototype.getImageStreams=ak.prototype.Eh;ak.prototype.getTextStreams=ak.prototype.Pe;ak.prototype.getVariants=ak.prototype.bi;var Bk=1,Fk=0,Ck=-1,Hk=new Map;function Ik(){}function Jk(a){a=$b(a);return(new ub(a)).gb}function Kk(a,b,c){function d(h){Sb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(V(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new W(2,6,6015);var e;typeof b=="string"?e=bc(b,!0):e=b;a=$b(a);a=bc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Lk(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=$b(a).split("skd://").pop();return Kk(a,c,b)}
function Mk(a,b){a===2&&(a=b.drmInfo)&&Oh(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.drm.FairPlay",Ik);
Ik.commonFairPlayResponse=function(a,b){if(a===2&&(a=b.originalRequest.drmInfo)&&Oh(a.keySystem)){try{var c=Xb(b.data)}catch(e){return}a=!1;c=c.trim();c.substr(0,5)==="<ckc>"&&c.substr(-6)==="</ckc>"&&(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=Mb(ic(c)))}};Ik.muxFairPlayRequest=function(a,b){Mk(a,b)};
Ik.expressplayFairPlayRequest=function(a,b){if(a===2){var c=b.drmInfo;c&&Oh(c.keySystem)&&Mk(a,b)}};Ik.conaxFairPlayRequest=function(a,b){Mk(a,b)};Ik.ezdrmFairPlayRequest=function(a,b){Mk(a,b)};Ik.verimatrixFairPlayRequest=function(a,b){a===2&&(a=b.drmInfo)&&Oh(a.keySystem)&&(a=V(b.body),a=hc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=ac("spc="+a))};Ik.muxInitDataTransform=function(a,b,c){return Lk(a,b,c)};
Ik.expressplayInitDataTransform=function(a,b,c){return Lk(a,b,c)};Ik.conaxInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=$b(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(c.length*2);d=Rb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Kk(a,d,b)};Ik.ezdrmInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=$b(a).split(";").pop();return Kk(a,c,b)};
Ik.verimatrixInitDataTransform=function(a,b,c){return Lk(a,b,c)};Ik.initDataTransform=Kk;Ik.defaultGetContentId=Jk;Ik.isFairPlaySupported=function(){var a;return F(function(b){if(b.g==1)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},sa(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(b.g!=2)return b.return(!0);ua(b);return b.return(!1)})};function Nk(a,b,c){c=c===void 0?!0:c;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}
Nk.prototype.add=function(a,b){var c=this.h;b=b===void 0?!0:b;var d;if(!(d=!!c.audio!=!!a.audio||!!c.video!=!!a.video||c.language!=a.language)&&(d=c.audio&&a.audio)){d=c.audio;var e=a.audio;d=!(!((!d.channelsCount||!e.channelsCount||d.channelsCount>2||e.channelsCount>2)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!Ok(d,e))&&Pk(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||Ok(c,d))&&Pk(c.roles,d.roles)));return d?!1:(this.g.add(a),
!0)};Nk.prototype.values=function(){return this.g.values()};function Ok(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return xe(d)});b=b.codecs.split(",").map(function(d){return xe(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}
function Pk(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0}S("shaka.media.AdaptationSet",Nk);function Qk(){this.h=this.g=null}Qk.prototype.configure=function(a){this.g=a};Qk.prototype.getConfiguration=function(){return this.g};
Qk.prototype.create=function(a){var b;if(this.g.language){var c=Rk(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(f){return f.primary}),b=b.length?b:a);a=Sk(b,this.g.role);a.length&&(b=a);a=Tk(b,this.g.videoRole);a.length&&(b=a);this.g.videoLayout&&(a=Uk(b,this.g.videoLayout),a.length&&(b=a));this.g.hdrLevel&&(a=Vk(b,this.g.hdrLevel),a.length&&(b=a));var d=[this.g.channelCount,this.g.preferredAudioChannelCount];a=d.filter(function(f,g){return f&&d.indexOf(f)===g});if(a.length)for(a=t(a),
c=a.next();!c.done;c=a.next())if(c=Wk(b,c.value),c.length){b=c;break}this.g.audioLabel&&(a=Xk(b,this.g.audioLabel),a.length&&(b=a));this.g.videoLabel&&(a=Yk(b,this.g.videoLabel),a.length&&(b=a));a=Zk(b,this.g.spatialAudio);a.length&&(b=a);var e=[this.g.audioCodec,this.g.activeAudioCodec].concat(y(this.g.preferredAudioCodecs));a=e.filter(function(f,g){return f&&e.indexOf(f)===g});if(a.length)for(a=t(a),c=a.next();!c.done;c=a.next())if(c=$k(b,c.value),c.length){b=c;break}return this.h=new Nk(b[0],b,
!(this.g.codecSwitchingStrategy=="smooth"&&Ec()))};Qk.prototype.getLastAdaptationSet=function(){return this.h};function Rk(a,b){b=Ve(b);var c=bf(b,a.map(function(d){return af(d)}));return c?a.filter(function(d){return c==af(d)}):[]}function Sk(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):c.audio.roles.length==0:!1})}function Tk(a,b){return a.filter(function(c){return c.video?b?c.video.roles.includes(b):c.video.roles.length==0:!1})}
function Xk(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Yk(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function Wk(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount>b?!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 Vk(a,b){if(b=="AUTO"){var c=a.some(function(d){return d.video&&d.video.hdr&&d.video.hdr=="HLG"?!0:!1});b=T().Dc(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function Uk(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Zk(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function $k(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function al(){}
function bl(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&Object.keys(d).length==0:c.constructor==Object&&Object.keys(c).length==0;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?b[l]===void 0?n===void 0||h?delete a[l]:a[l]=Yc(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Yc(n)),m=bl(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||b[l]==null||typeof b[l]!="function"&&b[l].constructor!=n.constructor?(Sa("Invalid config, wrong type for "+m),
k=!1):typeof c[l]=="function"&&c[l].length!=b[l].length?(Ta("Unexpected number of arguments for "+m),a[l]=b[l]):a[l]=Array.isArray(a[l])?b[l].slice():b[l]:(Sa("Invalid config, unrecognized key "+m),k=!1)}return k}function cl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(e<0)break;if(e==0||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 dl(a,b){return a&&b}
function el(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])&&Object.keys(f[h]).length===0)delete f[h];else{var k=f[h];Array.isArray(k)&&k.length===0?delete f[h]:typeof f[h]=="function"?delete f[h]:e(f[h])&&(c(f[h]),Object.keys(f[h]).length===0&&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]),Object.keys(l).length>0||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?ab(l,g[k])||(h[k]=l):Number.isNaN(l)&&Number.isNaN(g[k])||l!==g[k]&&(h[k]=l);else h[k]=l;return h},{})}function e(f){return f&&typeof f==="object"&&!Array.isArray(f)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",al);al.getDifferenceFromConfigObjects=el;al.convertToConfigObject=cl;al.mergeConfigObjects=bl;function fl(){}
function gl(){var a=Infinity,b=T();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:gi(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&k=="skd"&&(k=l.serverCertificate,l=Jk(h),h=Kk(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";Ec()&&b.Zb()&&(d="smooth");var e={retryParameters:gi(),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,enableAudioGroups:!0,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:hl,manifestPreprocessorTXml:il,sequenceMode:!1,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.vc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:hl,manifestPreprocessorTXml:il,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
f={trackSelectionCallback:function(h){return F(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return F(function(l){if(l.g==1)return navigator.storage&&navigator.storage.estimate?C(l,navigator.storage.estimate(),3):l.return(!0);k=l.h;return l.return(k.usage+h<k.quota*.95)})},progressCallback:function(h,k){return dl([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:gi(),failureCallback:function(h){return dl([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:!0,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 dl([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k){return dl([h,k])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,
durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new Mf},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(Qk,[null].concat(y(Fa.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:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredAudioRole:"",preferredVideoRole:"",
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,targets:[]},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:Infinity,preloadPrevItem:!0,repeatMode:0}};f.trackSelectionCallback=function(h){return F(function(k){return k.return(jl(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.Ga(g)}
function kl(){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 ll(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 bl(a,b,c||gl(),d,"")}
function jl(a,b,c){var d=c;d=="AUTO"&&(c=a.some(function(h){return h.hdr&&h.hdr=="HLG"?!0:!1}),d=T().Dc(c));var e=a.filter(function(h){return h.type!="variant"||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=bf(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Ve(h.language)==f}));c.length==0&&(c=e.filter(function(h){return h.primary}));c.length==0&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&h.height<=480});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!=uc&&c.type!="image"||b.push(c);return b}function hl(a){return dl([a],a)}function il(a){return dl([a],a)}S("shaka.util.PlayerConfiguration",fl);fl.mergeConfigObjects=ll;fl.createDefaultForLL=kl;fl.createDefault=gl;function ml(a){return(new Date(Date.UTC(1900,0,1,0,0,0,0)+a)).getTime()};function nl(a,b){var c=new DOMParser,d=ol.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}
var ol=new jb(function(){if(typeof trustedTypes!=="undefined"){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function pl(){var a=this;this.j=this.g=null;this.B=[];this.h=null;this.Fa=1;this.H=[];this.l={be:"",type:"",profiles:[],Jb:null,Va:0,Na:null,md:0};this.u=new Map;this.C=new Map;this.o=new Map;this.D=new Map;this.xa=new Map;this.m=new ak;this.R=0;this.Ca=new Oa(5);this.L=new Oe(function(){if(a.K&&!a.g.continueLoadingWhenPaused&&(a.J.cb(a.K,"timeupdate"),a.K.paused)){a.J.Ma(a.K,"timeupdate",function(){return ql(a)});return}ql(a)});this.T=new si;this.N=null;this.F=[];this.ea=Infinity;this.wa=!1;this.i=
null;this.M=0;this.W=!1;this.J=new eb;this.K=null;this.X=!1;this.ba="";this.va=function(){return!1};this.Z=[];this.ma=new Set;this.ra=new Xh}p=pl.prototype;p.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.va=b);c&&this.h&&this.h.presentationTimeline.U()&&this.L.$b();this.i&&this.i.configure(this.g);this.m&&this.m.Og(this.g.dash.useStreamOnceInPeriodFlattening)};
p.start=function(a,b){var c=this,d;return F(function(e){if(e.g==1)return c.wa=b.isLowLatencyMode(),c.B=[a],c.j=b,C(e,rl(c),2);d=e.h;c.j&&sl(c,d);if(!c.j)throw new W(2,7,7001);return e.return(c.h)})};
p.stop=function(){for(var a=t(this.o.values()),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.B=[];this.h=null;this.o.clear();this.D.clear();this.u.clear();this.C.clear();this.l={be:"",type:"",profiles:[],Jb:null,Va:0,Na:null,md:0};this.m=null;this.L!=null&&(this.L.stop(),this.L=null);this.i&&this.i.destroy();this.J&&(this.J.release(),this.J=null);this.ma.clear();this.ra.release();return this.T.destroy()};
p.update=function(){var a=this,b;return F(function(c){if(c.g==1)return sa(c,2),C(c,rl(a),4);if(c.g!=2)return ta(c,0);b=ua(c);if(!a.j||!b)return c.return();a.j.onError(b);E(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.h&&this.h.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.h.presentationTimeline.Tb();var c=b.segmentIndex.find(a);c!=null&&(b=b.segmentIndex.get(c))&&(this.R=b.endTime-a,sl(this,0))}}};
p.banLocation=function(a){this.i&&this.i.banLocation(a)};p.setMediaElement=function(a){this.K=a};
function rl(a){var b,c,d,e,f,g,h,k,l,m,n;return F(function(q){if(q.g==1)return b=4,c="MPD",d=tl(a),e=a.B,d.length?(e=d,c="Patch",b=6):a.B.length>1&&a.i&&(f=Yj(a.i,"Location",!0),f.length&&(e=f)),g=zi(e,a.g.retryParameters),h=Date.now(),C(q,ul(a,g,0,{type:b}),2);if(q.g!=3){k=q.h;if(!a.j)return q.return(0);k.uri&&k.uri!=k.originalUri&&!a.B.includes(k.uri)&&a.B.unshift(k.uri);l=new ub(k.uri);a.ba=l.g.toString();return C(q,vl(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.Ca.sample(1,n);a.ma.clear();
return q.return(n)})}
function vl(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return F(function(v){if(v.g==1){e=b;f=a.g.dash.manifestPreprocessor;g=hl;if(f!=g){U("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");var w=e;try{var z=$b(w);var x=nl(z,d)}catch(A){x=null}h=x;if(!h)throw new W(2,4,4001,c);f(h);e=ac(h.outerHTML)}k=ad(e,d);if(!k)throw new W(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=il;l!=m&&l(k);if(d==="Patch")return v.return(wl(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(xl(a,
k,c));q=a.g.dash.xlinkFailGracefully;r=Pi(k,a.g.retryParameters,q,c,a.j.networkingEngine);ti(a.T,r);return C(v,r.promise,2)}u=v.h;return v.return(xl(a,u,c))})}
function xl(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,x,A,D,G,H,B,I,O,N,P,J,L,Q,K,M,R,aa,nb,Aa,cb,Ua,Ob,ob,Ga,Ka,Vb,Wb,Fb,Pb,Qb,pc,ya,wt,Ni,Oi,yg,fn,Id,gn,hn,jn;return F(function(qc){switch(qc.g){case 1:a.i&&a.i.l.clear();d=[c];e=[];f=new Map;g=id(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=kd(l))q=mc(d,[n])[0],m&&(a.i?Xj(a.i,"Location",m,q):f.set(m,q)),e.push(q);a.i?(r=Yj(a.i,"Location",!0),r.length>0&&(d=a.B=r)):e.length&&(d=a.B=e);a.l.be=
b.attributes.id||"";a.l.md=pd(b,"publishTime",sd)||0;a.H=id(b,"PatchLocation");u=Promise.resolve();if((v=md(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.i)a.i.j=d,a.i.h=w;else if(a.i=new Tj(a.j),a.i.configure(a.g),a.i.setManifestType("DASH"),a.i.j=d,a.i.h=w,z=kd(v))(x=pd(v,"queryBeforeStart",zd,!1))?u=Uj(a.i,z):Uj(a.i,z);A=t(f.keys());for(D=A.next();!D.done;D=A.next())G=D.value,H=f.get(G),Xj(a.i,"Location",G,H)}B=id(b,"BaseURL");I=!1;if(a.i)for(O=t(B),N=O.next();!N.done;N=
O.next())P=N.value,J=P.attributes.serviceLocation,L=kd(P),J&&L&&(Xj(a.i,"BaseURL",J,L),I=!0);a.Z.splice(0);I&&a.i||(Q=B.map(kd),a.Z.push.apply(a.Z,y(mc(d,Q))));K=a.i;M=a.Z;R=function(){return K&&I?Yj(K,"BaseURL"):M.slice()};a.l.Na=R;aa=0;B&&B.length&&(aa=pd(B[0],"availabilityTimeOffset",yd)||0);a.l.Va=aa;a.R=pd(b,"minimumUpdatePeriod",td,-1);nb=pd(b,"availabilityStartTime",sd);Aa=pd(b,"timeShiftBufferDepth",td);cb=a.g.dash.ignoreSuggestedPresentationDelay;Ua=null;cb||(Ua=pd(b,"suggestedPresentationDelay",
td));Ob=a.g.dash.ignoreMaxSegmentDuration;ob=null;Ob||(ob=pd(b,"maxSegmentDuration",td));Ga=b.attributes.type||"static";a.h&&a.h.presentationTimeline&&(a.X=a.h.presentationTimeline.U()&&Ga=="static");a.l.type=Ga;if(a.h)for(Ka=a.h.presentationTimeline,Vb=Ka.Fb(),Wb=t(a.o.values()),Fb=Wb.next();!Fb.done;Fb=Wb.next())Pb=Fb.value,Pb.segmentIndex&&Pb.segmentIndex.Ka(Vb);else Qb=a.g.dash.ignoreMinBufferTime,pc=0,Qb||(pc=pd(b,"minBufferTime",td)||0),ya=0,ya=Ua!=null?Math.min(Ua,Aa||Infinity):a.g.defaultPresentationDelay>
0?a.g.defaultPresentationDelay:Math.min(pc*1.5,Aa||Infinity),Ka=new Y(nb,ya,a.g.dash.autoCorrectDrift);Ka.rf(Ga=="static");(wt=Ka.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Aa=a.g.availabilityWindowOverride);Aa==null&&(Aa=Infinity);Ka.Kg(Aa);Ni=b.attributes.profiles||"";a.l.profiles=Ni.split(",");Oi={$a:Ga!="static",presentationTimeline:Ka,ha:null,$:null,aa:null,I:null,bandwidth:0,Qe:!1,Va:aa,Jb:null,profiles:Ni.split(","),roles:null,eb:function(){return""}};return C(qc,u,2);case 2:a.M=0;yg=yl(a,
Oi,R,b,!1);fn=yg.duration;Id=yg.periods;(Ga!="static"||a.X)&&yg.Pf||Ka.Mb(fn||Infinity);a.W&&a.wa&&Ka.Fg(a.ea);Ka.We(ob||1);a.W&&a.wa&&(gn=Ua!=null?Ua:a.g.defaultPresentationDelay,Ka.Hg(gn));if(!a.h)return C(qc,a.m.Ge(Id,Oi.$a),6);a.h.periodCount=Id.length;a.h.gapCount=a.M;return C(qc,zl(a,Id,!1),4);case 6:a.h={presentationTimeline:Ka,variants:a.m.l,textStreams:a.m.Pe(),imageStreams:a.m.i,offlineSessionIds:[],sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",
serviceDescription:Al(b),nextUrl:Bl(b),periodCount:Id.length,gapCount:a.M,isLowLatency:a.W,startTime:null};if(!Ka.Xg()){qc.A(7);break}hn=id(b,"UTCTiming");return C(qc,Cl(a,R,hn),8);case 8:jn=qc.h;if(!a.j)return qc.return();Ka.Gg(jn);case 7:Ka.gg(),a.m&&!a.h.presentationTimeline.U()&&a.m.release();case 4:a.j.makeTextStreamsForClosedCaptions(a.h),Dl(a),El(a,Id),E(qc)}})}
function zl(a,b,c){var d;return F(function(e){if(e.g==1)return C(e,a.m.Ge(b,!0,c),2);a.h.variants=a.m.l;d=a.m.Pe();d.length>0&&(a.h.textStreams=d);a.h.imageStreams=a.m.i;a.j.filter(a.h);E(e)})}
function wl(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,x,A,D,G,H,B,I,O,N,P,J;return F(function(L){if(L.g==1){c=b.attributes.mpdId;d=pd(b,"originalPublishTime",sd);if(!c||c!==a.l.be||d!==a.l.md)throw a.H=[],new W(1,4,4052);e=[];f=[];g=new Set;h=t(hd(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Bd(l.attributes.sel||""),n=m[m.length-1],q=kd(l)||"",n.name==="MPD")if(n.Ob==="mediaPresentationDuration"){r=kd(l)||"";var Q=td(r);if(Q!=null){a.l.Jb=Q;for(var K=t(a.u.values()),M=K.next();!M.done;M=K.next())M.value.Jb=
Q}}else if(n.Ob==="type"){a.h.presentationTimeline.rf(q=="static");a.l.type=q;Q=t(a.u.values());for(K=Q.next();!K.done;K=Q.next())K.value.$a=q=="dynamic";q=="static"&&(a.R=-1)}else n.Ob==="publishTime"?a.l.md=sd(q)||0:n.Ob===null&&l.tagName==="add"&&f.push(l);else if(n.name==="PatchLocation")Cd(a.H,l);else if(n.name==="Period")l.tagName==="add"?f.push(l):l.tagName==="remove"&&n.id&&Fl(a,n.id);else if(n.name==="SegmentTemplate"){K=Bd(l.attributes.sel||"");Q=K[K.length-1];if(Q.Ob){K=Gl(a,K);M=kd(l)||
"";for(var R=t(K),aa=R.next();!aa.done;aa=R.next())aa=a.u.get(aa.value),Ed(aa.I.Xb,l.tagName,Q.Ob,M);Q=K}else Q=[];u=Q;v=t(u);for(w=v.next();!w.done;w=v.next())z=w.value,g.add(z)}else if(n.name==="SegmentTimeline"||n.name==="S"){Q=Bd(l.attributes.sel||"");Q=Gl(a,Q);K=t(Q);for(M=K.next();!M.done;M=K.next())M=a.u.get(M.value),M=Ki(M,zj,"SegmentTimeline"),R=id(M,"S"),Cd(R,l),M.children=R;x=Q;A=t(x);for(D=A.next();!D.done;D=A.next())G=D.value,g.add(G)}H=t(g);for(B=H.next();!B.done;B=H.next())I=B.value,
Hl(a,I);O=t(f);for(N=O.next();!N.done;N=O.next())P=N.value,e.push.apply(e,y(Il(a,P)));if(!e.length)return L.A(2);a.h.periodCount+=e.length;a.h.gapCount=a.M;return C(L,zl(a,e,!0),2)}a.l.type=="static"&&(J=a.l.Jb,a.h.presentationTimeline.Mb(J||Infinity));E(L)})}
function Il(a,b){return yl(a,{$a:a.l.type=="dynamic",presentationTimeline:a.h.presentationTimeline,ha:null,$:null,aa:null,I:null,bandwidth:0,Qe:!1,Va:a.l.Va,profiles:a.l.profiles,Jb:a.l.Jb,roles:null,eb:function(){return""}},a.l.Na,b,!0).periods}function Fl(a,b){a.h.periodCount--;for(var c=t(a.u.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.u.get(d);Ki(e,zj,"SegmentTimeline").children=[];Hl(a,d);a.u.delete(d)}a.F=a.F.filter(function(f){return f!==b})}
function Gl(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,g.name==="Period"?c=g.id:g.name==="AdaptationSet"?(d=g.id,g.position!==null&&(e=g.position)):g.name==="Representation"&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.u.values()),a=e.next();!a.done;a=e.next())a=a.value,a.ha.id===c&&a.aa.id===d&&a.I.id&&b.push(c+","+a.I.id);else if(e>-1)for(d=t(a.u.values()),a=d.next();!a.done;a=d.next())a=a.value,a.ha.id===c&&a.aa.position===e&&a.I.id&&b.push(c+
","+a.I.id);return b}function Hl(a,b){var c=a.u.get(b),d=a.o.get(b);d.segmentIndex&&d.segmentIndex.Ka(a.h.presentationTimeline.Fb());try{var e=yj(c,function(f,g,h,k){return Jl(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.xa,c.I.aesKey,null,!0,a.C);d.createSegmentIndex=function(){return F(function(f){if(f.g==1)return d.segmentIndex?f.A(0):C(f,e.cc(),3);d.segmentIndex=f.h;E(f)})}}catch(f){if(b=c.I.contentType,b!=uc&&b!="application"&&b!="image"||f.code!=4002)throw f;}}
function Al(a){var b=md(a,"ServiceDescription");if(!b)return null;a=md(b,"Latency");b=md(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
return c}function Bl(a){a=id(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016")return b.attributes.value;return null}
function yl(a,b,c,d,e){var f=b.Jb;f||(f=pd(d,"mediaPresentationDuration",td),a.l.Jb=f);var g=0;a.h&&a.h.presentationTimeline&&a.X&&(g=a.h.presentationTimeline.qb());var h=[],k=g;d=id(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],q=pd(m,"start",td,k),r=m.attributes.id,u=pd(m,"duration",td);q=l==0&&q==0&&a.X?g:q;var v=null;if(n){var w=pd(n,"start",td);w!=null&&(v=w-q+g)}else f!=null&&(v=f-q+g);w=xc;v&&u&&Math.abs(v-u)>w&&v>u&&a.M++;v==null&&(v=u);if(!(a.N!==null&&r!==null&&q!==null&&q<
a.N)||a.F.includes(r)||l+1==d.length){q!==null&&(a.N===null||q>a.N)&&(a.N=q);k=Kl(a,b,c,{start:q,duration:v,node:m,Wd:v==null||!n});h.push(k);b.ha.id&&v&&a.xa.set(b.ha.id,v);if(v==null){k=null;break}k=q+v}}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(z){return z.id});return f!=null?{periods:h,duration:f+g,Pf:!1}:{periods:h,duration:k,Pf:!0}}
function Dl(a){var b=Array.from(a.D.keys()).filter(function(h){return!a.F.includes(h)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=t(a.D.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.o.get(f);g&&(g.segmentIndex&&g.segmentIndex.getNumReferences()!=0?d=!1:(a.m&&a.m.Mf(g,c),a.o.delete(f)))}d&&a.D.delete(c)}}function El(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=t(a.C.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.C.delete(d)}
function Kl(a,b,c,d){b.ha=Ll(a,d.node,null,c);b.$=d;b.ha.Va=b.Va;b.ha.id||(b.ha.id="__shaka_period_"+d.start);var e=id(d.node,"EventStream");c=b.presentationTimeline.Fb();e=t(e);for(var f=e.next();!f.done;f=e.next())Ml(a,d.start,d.duration,f.value,c);c=id(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(e=Nl(a,e)))b.eb=e;c=id(d.node,"AdaptationSet").map(function(r,u){return Ol(a,b,u,r)}).filter(Re);if(b.$a){e=
[];f=t(c);for(var g=f.next();!g.done;g=f.next()){g=t(g.value.Mi);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new W(2,4,4018);}e=new Map;f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.oh),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={vf:void 0},m=l.next())if(n.vf=m.value,e.has(n.vf.originalId)){f||
(f=id(d.node,"AdaptationSet").map(function(r,u){return Ol(a,b,u,r)}).filter(Re));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.vf.originalId}}(n)))q.dependencyStream=e.get(q.originalId),q.originalId+=q.dependencyStream.originalId,k.push(q)}k.length&&h.streams.push.apply(h.streams,y(k))}d=c.filter(function(r){return!r.yf});c=c.filter(function(r){return r.yf});if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next())for(e=
e.value,f=e.yf.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())Jf(k.value,e.streams);c=Pl(a.g.disableAudio,d,"audio");e=Pl(a.g.disableVideo,d,"video");f=Pl(a.g.disableText,d,uc);d=Pl(a.g.disableThumbnails,d,"image");if(e.length===0&&c.length===0)throw new W(2,4,4004);return{id:b.ha.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}
function Pl(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,y(e.streams));return d},[])}
function Ol(a,b,c,d){function e(J){var L=J.attributes["dvb:fontFamily"];J=J.attributes["dvb:url"];L&&J&&(J=mc(b.aa.Na(),[J],b.eb()),a.j.addFont(L,J[0]))}function f(J){switch(J){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(J){switch(J){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.aa=Ll(a,d,b.ha,null);b.aa.position=c;var h=!1;c=id(d,"Role");var k=c.map(function(J){return J.attributes.value}).filter(Re),
l=void 0,m=b.aa.contentType==uc;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(q==null||q=="urn:mpeg:dash:role:2011")switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=id(d,"EssentialProperty");c=null;var u=!1;n=null;q=!1;r=t(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if(w=="http://dashif.org/guidelines/trickmode")c=v.attributes.value;else if(w=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var z=
g(parseInt(v.attributes.value,10));else if(w=="urn:mpeg:mpegB:cicp:ColourPrimaries")var x=f(parseInt(v.attributes.value,10));else w!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(w=="urn:mpeg:dash:ssr:2023"&&a.g.dash.enableFastSwitching?u=!0:w=="urn:dvb:dash:fontdownload:2014"?e(v):w=="urn:mpeg:dash:urlparam:2014"?(n=Nl(a,v))||(q=!0):q=!0)}if(q)return null;var A=null;q=id(d,"SupplementalProperty");q=t(q);for(r=q.next();!r.done;r=q.next())r=r.value,v=r.attributes.schemeIdUri,v=="http://dashif.org/guidelines/last-segment-number"?
A=parseInt(r.attributes.value,10)-1:v=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?z=g(parseInt(r.attributes.value,10)):v=="urn:mpeg:mpegB:cicp:ColourPrimaries"?x=f(parseInt(r.attributes.value,10)):v=="urn:dvb:dash:fontdownload:2014"?e(r):v=="urn:mpeg:dash:urlparam:2014"&&(n=Nl(a,r));n&&(b.eb=n);n=id(d,"Accessibility");var D=new Map,G;n=t(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,q!="urn:scte:dash:cc:cea-608:2015"||a.g.disableText)if(q!="urn:scte:dash:cc:cea-708:2015"||
a.g.disableText)q=="urn:mpeg:dash:role:2011"?r!=null&&(k.push(r),r=="captions"&&(l="caption")):q=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(r=="1"?G="visually impaired":r=="2"?G="hard of hearing":r=="9"&&(G="spoken subtitles"));else if(q=1,r!=null)for(r=t(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var H=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],H=w[1].split(",")[0].split(":").pop()):(v="svc"+q,q++,H=w);D.set(v,Ve(H))}else D.set("svc1","und");else if(q=1,r!=null)for(r=r.split(";"),
v=t(r),w=v.next();!w.done;w=v.next()){H=w.value;var B=w=void 0;H.includes("=")?(H=H.split("="),w=H[0].startsWith("CC")?H[0]:"CC"+H[0],B=H[1]||"und"):(w="CC"+q,r.length==2?q+=2:q++,B=H);D.set(w,Ve(B))}else D.set("CC1","und");n=id(d,"ContentProtection");var I=Yh(a.ra,n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.aa.encrypted=n.length>0;var O=Ve(b.aa.language||"und"),N=b.aa.label,P=new Map;d=id(d,"Representation");if(!a.g.ignoreSupplementalCodecs){n=[];q=t(d);for(r=q.next();!r.done;r=q.next())if(v=
r.value,r=qd(v,"urn:scte:dash:scte214-extensions","supplementalCodecs"))v=Yc(v),v.attributes.codecs=r.split(" ").join(","),v.attributes.id&&(v.attributes.supplementalId=v.attributes.id+"_supplementalCodecs"),n.push(v);d.push.apply(d,y(n))}n=d.map(function(J){var L=Ql(a,b,I,l,O,N,h,k,D,J,G,A);return L&&(L.hdr=L.hdr||z,L.colorGamut=L.colorGamut||x,L.fastSwitching=u,J=J.attributes.dependencyId)?(L.baseOriginalId=J,P.set(J,L),null):L}).filter(function(J){return!!J});if(n.length==0&&P.size==0){c=b.aa.contentType==
"image";if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new W(2,4,4003);}if(!b.aa.contentType||b.aa.contentType=="application")for(b.aa.contentType=Rl(n[0].mimeType,n[0].codecs),m=t(n),q=m.next();!q.done;q=m.next())q.value.type=b.aa.contentType;m=b.aa.id||"__fake__"+a.Fa++;q=t(n);for(r=q.next();!r.done;r=q.next()){r=r.value;v=t(I.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(y(w.keyIds),y(r.keyIds))):w.keyIds||r.keyIds;a.g.enableAudioGroups&&
(r.groupId=m)}d=d.map(function(J){return J.attributes.supplementalId||J.attributes.id}).filter(Re);return{id:m,contentType:b.aa.contentType,language:O,rj:h,streams:n,drmInfos:I.drmInfos,yf:c,Mi:d,oh:P}}
function Nl(a,b){if((b=nd(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&pd(b,"useMPDUrlQuery",zd,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return c=="$querypart$"?a.ba:c.split("&").map(function(d){if(d=="$querypart$")return a.ba;var e=/\$query:(.*?)\$/g.exec(d);if(e&&e.length==2){e=e[1];var f=(new Ab(a.ba)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
function Ql(a,b,c,d,e,f,g,h,k,l,m,n){b.I=Ll(a,l,b.aa,null);var q=b.I.id;a.ea=Math.min(a.ea,b.I.Va);a.W=a.ea>0;if(!Sl(b.I))return null;var r=b.$.start;b.bandwidth=pd(l,"bandwidth",wd)||0;b.roles=h;var u=id(l,"SupplementalProperty"),v=id(l,"EssentialProperty"),w=id(l,"ContentProtection");l=null;var z=v.find(function(K){return K.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});z?l=Nl(a,z):(z=u.find(function(K){return K.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"}))&&(l=Nl(a,z));l&&(b.eb=
l);z=b.I.contentType;l=z==uc||z=="application";z=z=="image";w.length&&(b.aa.encrypted=!0);try{var x=void 0;if(c.Fe){var A=b.I.Na,D=b.eb,G=mc(A(),[c.Fe.pi],D()),H=zi(G,a.g.retryParameters);x={bitsKey:128,blockCipherMode:"CBC",iv:c.Fe.iv,firstMediaSequenceNumber:0,fetchKey:function(){var K,M,R;return F(function(aa){if(aa.g==1)return C(aa,ul(a,H,6),2);if(aa.g!=3){K=aa.h;if(!K.data||K.data.byteLength!=16)throw new W(2,4,4049);M={name:"AES-CBC"};R=x;return C(aa,window.crypto.subtle.importKey("raw",K.data,
M,!0,["decrypt"]),3)}R.cryptoKey=aa.h;x.fetchKey=void 0;E(aa)})}}}b.I.aesKey=x;A=function(K,M,R,aa){return Jl(a,K,M,R,aa)};if(b.I.Sc)var B=nj(b,A,x);else if(b.I.Lb)B=tj(b,a.o,x);else if(b.I.Xb)B=yj(b,A,a.o,!!a.h,a.g.dash.initialSegmentLimit,a.xa,x,n,!1,a.C);else{var I=b.$.duration||0,O=b.I.Na,N=b.I.mimeType,P=b.I.codecs;B={endTime:-1,timeline:-1,cc:function(){var K=hj(r,I,O());K.Rb(function(M){M.mimeType=N;M.codecs=P});return Promise.resolve(K)},timescale:1}}}catch(K){if((l||z)&&K.code==4002)return null;
throw K;}n=bi(a.ra,w,c,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;u.some(function(K){return K.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&K.attributes.value=="JOC"})&&(w=!0);u=!1;l&&(u=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var J;if(z&&((v=v.find(function(K){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(K.attributes.schemeIdUri)}))&&(J=v.attributes.value),!J))return null;
var L;l=b.I.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(L="PQ");v=b.I.id?b.ha.id+","+b.I.id:"";a.H.length&&q&&a.u.set(b.ha.id+","+q,Tl(b));b.I.je&&Ul(a,b.I.je,B,b.presentationTimeline);B.endTime!=-1&&b.ha.id!=null&&b.I.id!=null&&((q=a.C.get(b.ha.id))?(q.endTime=B.endTime,q.gf.includes(b.I.id)||q.gf.push(b.I.id),a.C.set(b.ha.id,q)):a.C.set(b.ha.id,{endTime:B.endTime,timeline:B.timeline,gf:[b.I.id]}));
var Q=v&&a.o.has(v)?a.o.get(v):{id:a.Fa++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){Q.segmentIndex&&(Q.segmentIndex.release(),Q.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:l,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:c.drmInfos.length>0,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.aa.language,label:f,
type:b.aa.contentType,primary:g,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:u,channelsCount:b.I.fe,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:L,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([qe(b.I.mimeType,b.I.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};Q.createSegmentIndex=function(){var K;return F(function(M){if(M.g==1){if(Q.segmentIndex)return M.A(0);
K=Q;return C(M,B.cc(),3)}K.segmentIndex=M.h;E(M)})};v&&b.$a&&!a.o.has(v)&&(b=b.ha.id||"",a.D.has(b)||a.D.set(b,[]),a.o.set(v,Q),a.D.get(b).push(v));return Q}
function Ul(a,b,c,d){if(!a.ma.has(b)){a.ma.add(b);var e=pd(b,"presentationTime",xd)||0,f=md(b,"UTCTiming"),g;if(g=f&&f.attributes.schemeIdUri)f=f.attributes.schemeIdUri,g=!(f==="urn:mpeg:dash:utc:http-ntp:2014"||f==="urn:mpeg:dash:utc:ntp:2014"||f==="urn:mpeg:dash:utc:sntp:2014");g?b=(pd(b,"wallClockTime",sd)||0)*1E3:(b=pd(b,"wallClockTime",xd)||0,b=ml(b));c=new Date(b-e/c.timescale*1E3);e=c.getTime()/1E3;isNaN(e)||(d.u||d.Jg(e),d=(new Map).set("detail",{wallClockTime:b,programStartDate:c}),d=new qi("prft",
d),a.j.onEvent(d))}}function Tl(a){function b(c){if(!c)return null;c=Zc(c);c.Sc=null;c.Lb=null;c.Xb=Gd(c.Xb);c.je=null;return c}a=Zc(a);a.ha=b(a.ha);a.aa=b(a.aa);a.I=b(a.I);a.$&&(a.$=Zc(a.$),a.$.node=null);return a}
function ql(a){var b,c;return F(function(d){switch(d.g){case 1:return b=0,sa(d,2),C(d,rl(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=ua(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();sl(a,b);E(d)}})}function sl(a,b){if(!(a.R<0)){var c=a.R;a.g.updatePeriod>=0&&(c=a.g.updatePeriod);a.L.ka(Math.max(c-b,Pa(a.Ca)))}}
function Ll(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,fe:null,audioSamplingRate:null,Va:0,me:1,encrypted:!1};d=d||c.Na;var e=b.attributes.id,f=b.attributes.supplementalId,g=id(b,"BaseURL"),h,k=!1;if(a.i)for(var l=t(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=kd(n);m&&n&&(Xj(a.i,e,m,n),k=!0)}k&&a.i||(h=g.map(kd));var q=a.i;a=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;
m=Qj([b.attributes.codecs||c.codecs]).join(",");n=pd(b,"frameRate",Ad)||c.frameRate;var r=b.attributes.sar||c.pixelAspectRatio,u=Vl(id(b,"InbandEventStream"),c.emsgSchemeIdUris),v=id(b,"AudioChannelConfiguration");v=Wl(v)||c.fe;var w=pd(b,"audioSamplingRate",xd)||c.audioSamplingRate;a||(a=Rl(l,m));var z=md(b,"SegmentBase"),x=md(b,"SegmentTemplate"),A=z?pd(z,"availabilityTimeOffset",yd)||0:0,D=x?pd(x,"availabilityTimeOffset",yd)||0:0,G=g&&g.length?pd(g[0],"availabilityTimeOffset",yd)||0:0;A=c.Va+G+
A+D;D=null;(G=md(b,"SegmentSequenceProperties"))&&(G=pd(G,"cadence",wd))&&(D=G);G=b.attributes.label;var H=id(b,"Label");H&&H.length&&(H=H[0],jd(H)&&(G=jd(H)));return{Na:function(){return mc(d(),g.length?q&&k?Yj(q,e):h?h:[]:[])},Sc:z||c.Sc,Lb:md(b,"SegmentList")||c.Lb,Xb:x||c.Xb,je:md(b,"ProducerReferenceTime")||c.je,width:pd(b,"width",xd)||c.width,height:pd(b,"height",xd)||c.height,contentType:a,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:u,id:f||e,originalId:e,language:b.attributes.lang,
fe:v,audioSamplingRate:w,Va:A,Ud:null,me:D||c.me,label:G||null,encrypted:!1}}function Vl(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 Wl(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;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&b>0&&b<c.length)return c[b]}}return null}
function Sl(a){var b=a.Sc?1:0;b+=a.Lb?1:0;b+=a.Xb?1:0;if(b==0)return a.contentType==uc||a.contentType=="application"?!0:!1;b!=1&&(a.Sc&&(a.Lb=null),a.Xb=null);return!0}
function Xl(a,b,c,d){var e,f,g,h,k,l,m;return F(function(n){if(n.g==1)return e=[dc(c)],f=mc(b(),e),g=zi(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.va()}),ti(a.T,h),C(n,h.promise,2);k=n.h;if(d=="HEAD"){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=Xb(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
function Cl(a,b,c){var d,e,f,g,h,k,l,m;return F(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;sa(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.A(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.A(8);
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ta("NTP UTCTiming scheme is not supported");break;default:Ta("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return C(n,Xl(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,Xl(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
3);break;case 5:ua(n);case 3:g=f.next();n.A(2);break;case 4:return Ta("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
function Ml(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=pd(d,"timescale",xd)||1,k=pd(d,"presentationTimeOffset",xd)||0;d=t(id(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=pd(l,"presentationTime",xd)||0,n=pd(l,"duration",xd)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;c!=null&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",timescale:h,eventElement:Fd(l),eventNode:Gd(l)},a.j.onTimelineRegionAdded(l))}}
function Jl(a,b,c,d,e){var f,g,h,k;return F(function(l){if(l.g==1)return f=Fi,g=e?0:1,h=Zj(b,c,d,a.g.retryParameters),C(l,ul(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Rl(a,b){b=qe(a,b);return Fe(b)?uc:a.split("/")[0]}function ul(a,b,c,d){d||(d={});d.isPreload=a.va();b=a.j.networkingEngine.request(c,b,d);ti(a.T,b);return b.promise}
function tl(a){var b=a.l.md;if(!a.l.be||!b||!a.H.length)return[];var c=Date.now()/1E3,d=a.H.filter(function(e){e=xd(e.attributes.ttl);return!e||b+e>c}).map(kd).filter(Re);return d.length?mc(a.B,d):[]}S("shaka.dash.DashParser",pl);Kj("application/dash+xml",function(){return new pl});Kj("video/vnd.mpeg.dash.mpd",function(){return new pl});function Yl(){}S("shaka.dependencies",Yl);Yl.has=function(a){return Zl.has(a)};Yl.add=function(a,b){if(!$l[a])throw Error(a+" is not supported");a==am?U("mux.js","mux.js is no longer used in Shaka Player."):Zl.set(a,function(){return b})};var am="muxjs",$l={sj:am,ISOBoxer:"ISOBoxer"};Yl.Allowed=$l;var Zl=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function bm(){}function cm(a,b){var c=document.createElement("source");c.src=a;c.type=b===void 0?"":b;return c}function dm(a){for(var b=!1,c=a.getElementsByTagName("source"),d=c.length-1;d>=0;--d)a.removeChild(c[d]),b=!0;a.src&&(a.removeAttribute("src"),b=!0);return b}function em(a){for(;a.firstChild;)a.removeChild(a.firstChild)}
function Oj(){if(fm)return fm;gm||(gm=new Oe(function(){fm=null}));(fm=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(fm=document.createElement("video"));gm.ka(1);return fm}
function hm(a,b){var c,d,e,f,g;return F(function(h){if(h.g==1)return"fonts"in document&&"FontFace"in window?C(h,document.fonts.ready,2):h.return();if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();m.done===!1;)l.push(m.value),m=k.next();return l};d=t(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&f.display==="swap")return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);E(h)})}
S("shaka.util.Dom",bm);bm.removeAllChildren=em;bm.clearSourceFromVideo=dm;var gm=null,fm=null;function im(){this.j=new jb(function(){return["Oculus","Quest"].some(function(a){return navigator.userAgent.includes(a.toLowerCase())})?"VR":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?navigator.userAgentData.platform.toLowerCase()=="android"?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?
"MOBILE":"DESKTOP"});this.l=new jb(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 Nj(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=im.prototype;p.yb=function(){return!!navigator.mediaCapabilities};
p.Ha=function(){return this.j.value()};p.ua=function(){return this.l.value()};p.Pc=function(){return!1};p.xg=function(){return!1};p.Vd=function(){return!1};p.yg=function(){return!1};p.hf=function(){return!1};p.vc=function(){return!0};p.Zb=function(){return!0};p.pd=function(){return!0};p.Cg=function(){return 0};p.Db=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Qg=function(){return!1};p.tf=function(){return!1};
p.Ga=function(a){var b=this.Ha();if(b==="TV"||b==="CONSOLE"||b==="CAST")a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.wg=function(){return[]};p.Dc=function(a){return window.matchMedia!==void 0&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"};p.Ug=function(){return!1};p.kg=function(){return!1};p.lf=function(){return!1};p.qe=function(){return!0};p.lg=function(){return!1};p.Tg=function(){return!0};p.uc=function(){return!1};
p.Ve=function(a){return a==="com.apple.fps"};p.pe=function(){return!0};p.toString=function(){return"Device: "+this.hb()+" v"+this.na()+"; Type: "+this.Ha()};function jm(){im.call(this);this.g=new jb(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 jb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}ma(jm,im);p=jm.prototype;p.na=function(){return this.g.value()};p.hb=function(){return"Apple Browser"};p.Ha=function(){return this.h.value()};
p.ua=function(){return"WEBKIT"};p.yb=function(){return!1};p.Pc=function(a,b){return b==="audio"};p.Vd=function(){return!0};p.yg=function(a){return a==="audio"};p.Ga=function(a){im.prototype.Ga.call(this,a);a.abr.minTimeToSwitch=.5;return a};p.Ug=function(){return!0};p.pe=function(){return!1};
(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(lb=function(){return new jm});function km(){if(!lm())throw Error("Not a Chromecast device!");im.call(this);this.h=new jb(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.g=new jb(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?mm:a.includes("fuchsia")?nm:om})}ma(km,im);p=km.prototype;p.na=function(){return this.h.value()};p.hb=function(){return"Chromecast with "+this.g.value()};
p.Ha=function(){return"CAST"};p.ua=function(){return"CHROMIUM"};p.yb=function(){return im.prototype.yb.call(this)&&this.g.value()!==om};p.Zb=function(){return this.g.value()!==om};p.Cg=function(){switch(this.g.value()){case mm:return 0;case nm:return 3;default:return 1}};
p.Db=function(){var a,b,c,d,e;return F(function(f){switch(f.g){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};sa(f,2);if(!(c=a)){f.A(4);break}return C(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.h;case 4:if(c){b.width=3840;b.height=2160;f.A(6);break}if(!(d=a)){f.A(7);break}return C(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:d=
f.h;case 7:d&&(b.width=1920,b.height=1080);case 6:ta(f,3);break;case 2:e=ua(f),Sa("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};p.Ga=function(a){im.prototype.Ga.call(this,a);a.streaming.stallSkip=0;return a};p.uc=function(){return!0};function lm(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var mm="Android",nm="Fuchsia",om="Linux";lm()&&(lb=function(){return new km});function pm(){im.call(this);var a=this;this.i=new jb(function(){var b=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return b?parseInt(b[2],10):null});this.g=new jb(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.h=new jb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?
navigator.platform.toLowerCase().includes("win32"):!1});this.u=new jb(function(){return navigator.userAgent.match(/Edge?\//)?!a.h.value():!0});this.o=new jb(function(){return navigator.userAgent.includes("sony.hbbtv.tv")});this.m=new jb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":navigator.userAgent.includes("Android")?!0:!1})}ma(pm,im);p=pm.prototype;p.na=function(){return this.i.value()};p.hb=function(){return this.g.value()};
p.Pc=function(a){return Nh(a)?this.g.value()==="Edge"&&this.h.value():!1};p.xg=function(){return this.g.value()==="Edge"&&this.h.value()};p.Vd=function(){return this.g.value()==="Edge"&&this.h.value()};p.Zb=function(){return this.u.value()};
p.Ga=function(a){im.prototype.Ga.call(this,a);if(this.h.value())switch(this.g.value()){case "Firefox":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case "Chrome":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}this.m.value()&&(a.drm.defaultAudioRobustnessForWidevine="",a.drm.defaultVideoRobustnessForWidevine="");
return a};p.lf=function(){return this.g.value()==="Edge"||this.o.value()};p.uc=function(){if(this.ua()==="GECKO"){var a=this.na();return a!==null?a>=100:im.prototype.uc.call(this)}return im.prototype.uc.call(this)};p.Ve=function(a){return this.ua()==="GECKO"?a.startsWith("com.microsoft.playready.recommendation"):im.prototype.Ve.call(this,a)};mb=function(){return new pm};function qm(){im.apply(this,arguments)}ma(qm,im);p=qm.prototype;p.na=function(){return null};p.hb=function(){return"Hisense"};p.Ha=function(){return"TV"};p.yb=function(){return!1};p.Db=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}b==null&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};p.Ga=function(a){im.prototype.Ga.call(this,a);a.streaming.stallSkip=0;return a};
if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))lb=function(){return new qm};function rm(){im.call(this);this.g=new jb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}ma(rm,im);p=rm.prototype;p.hb=function(){return"PlayStation"};p.Ha=function(){return"CONSOLE"};p.ua=function(){return"WEBKIT"};p.na=function(){return this.g.value()};p.yb=function(){return!1};p.vc=function(){return!1};p.Zb=function(){return!1};p.tf=function(){return this.na()===4};
p.Db=function(){var a,b,c,d,e;return F(function(f){switch(f.g){case 1:return a={width:1920,height:1080},b=!1,sa(f,2),C(f,window.msdk.device.getDisplayInfo(),4);case 4:c=f.h;b=c.resolution==="4K";ta(f,3);break;case 2:return ua(f),sa(f,5),C(f,window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.h;b=d.resolution==="4K";ta(f,3);break;case 5:e=ua(f),Ta("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
p.Ga=function(a){im.prototype.Ga.call(this,a);this.na()===4&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};p.lf=function(){return this.na()===4};p.qe=function(){return this.na()!==4};navigator.userAgent.includes("PlayStation")&&(lb=function(){return new rm});function sm(){im.call(this);var a=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=a?parseInt(a[1],10):null;this.h=a?parseInt(a[2],10):null}ma(sm,im);p=sm.prototype;p.na=function(){return this.g};p.hb=function(){return"Tizen"};p.ua=function(){return"CHROMIUM"};p.Ha=function(){return"TV"};p.Pc=function(){return!0};p.hf=function(){return this.na()===3};p.yb=function(){return!1};p.vc=function(){var a=this.na();return a!==null?a>=4:im.prototype.vc.call(this)};p.Zb=function(){return!1};
p.pd=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:im.prototype.pd.call(this)};
p.Db=function(){var a=window.devicePixelRatio;a={width:window.screen.width*a>1920?3840:1920,height:window.screen.height*a>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var b=webapis.systeminfo.getMaxVideoResolution();a.width=b.width;a.height=b.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,
a.height=2160)}catch(c){Ta("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.Ga=function(a){im.prototype.Ga.call(this,a);a.drm.ignoreDuplicateInitData=this.na()!==2;this.na()===3&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};p.wg=function(){var a=[];this.g!==null&&this.g<5&&a.push("opus");return a};
p.Dc=function(a){try{if(webapis.avinfo.isHdrTvSupport())return a?"HLG":"PQ"}catch(b){return im.prototype.Dc.call(this,a)}return"SDR"};p.kg=function(){return!0};p.lg=function(){return this.na()===3};navigator.userAgent.includes("Tizen")&&(lb=function(){return new sm});function tm(){im.apply(this,arguments)}ma(tm,im);tm.prototype.na=function(){return null};tm.prototype.hb=function(){return"Vizio"};tm.prototype.Ha=function(){return"TV"};tm.prototype.yb=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(lb=function(){return new tm});function um(){im.call(this);this.i=new jb(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")});this.h=new jb(function(){return navigator.userAgent.includes("SOPOpenBrowser")});this.g=new jb(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})}ma(um,im);p=um.prototype;p.na=function(){return this.g.value()};
p.hb=function(){return"WebKit STB"};p.Ha=function(){return"TV"};p.ua=function(){return"WEBKIT"};p.yb=function(){return!1};p.vc=function(){var a=this.g.value();return a!==null?a>=15:!0};p.Pc=function(){return this.h.value()};p.Db=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.qe=function(){return!this.i.value()};p.pe=function(){return!1};
if(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))lb=function(){return new um};function vm(){im.call(this);var a=this;this.h=wm();this.g=null;try{var b=new PalmServiceBridge;b.onservicecallback=function(c){c=JSON.parse(c);a.g=c.kh["tv.model.supportHDR"]||c.kh["tv.config.supportDolbyHDRContents"]||!1};b.call("luna://com.webos.service.config/getConfigs",JSON.stringify({pj:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(c){Ta("WebOS: getConfigs call failed",c)}}ma(vm,im);p=vm.prototype;p.na=function(){return this.h};p.hb=function(){return"WebOS"};p.Ha=function(){return"TV"};
p.ua=function(){return"CHROMIUM"};p.yb=function(){return!1};p.vc=function(){var a=this.na();return a!==null?a>3:im.prototype.vc.call(this)};p.Zb=function(){var a=this.na();return a!==null?a>6:im.prototype.Zb.call(this)};p.pd=function(){var a=this.na();return a!==null?a>3:im.prototype.pd.call(this)};p.Db=function(){var a={width:1920,height:1080};try{var b=JSON.parse(window.PalmSystem.deviceInfo);a.width=Math.max(1920,b.screenWidth);a.height=Math.max(1080,b.screenHeight)}catch(c){Ta("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.Ga=function(a){im.prototype.Ga.call(this,a);this.na()===3&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};p.Dc=function(a){return this.g==null?(Ta("WebOS: getConfigs call haven't finished"),im.prototype.Dc.call(this,a)):this.g?a?"HLG":"PQ":"SDR"};
function wm(){var a=null,b=navigator.userAgent.match(/Chrome\/(\d+)/);b&&(a=parseInt(b[1],10));switch(a){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}p.Tg=function(){return!1};p.uc=function(){var a=this.na();return a!==null?a>=6:im.prototype.uc.call(this)};if(navigator.userAgent.includes("Web0S")){var xm=new vm;lb=function(){return xm}};function ym(){im.call(this);this.g=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=a?parseInt(a[1],10):null}ma(ym,im);p=ym.prototype;p.na=function(){return this.h};p.hb=function(){return"Xbox"};p.Ha=function(){return"CONSOLE"};p.ua=function(){return this.g?"EDGE":"CHROMIUM"};p.Pc=function(){return!0};p.Vd=function(){return!0};p.Qg=function(){return this.g};
p.Db=function(){var a={width:1920,height:1080},b=zm();if(b)try{var c=new b.Media.Protection.ProtectionCapabilities,d=b.Media.Protection.ProtectionCapabilityResult;b=null;do b=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(b===d.maybe);b===d.probably&&(a.width=3840,a.height=2160)}catch(e){Ta("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.Ga=function(a){im.prototype.Ga.call(this,a);a.drm.parseInbandPsshEnabled=this.g;a.drm.preferredKeySystems.push("com.microsoft.playready");this.g&&(a.streaming.gapPadding=.01);return a};function zm(){var a=null;try{a=typeof Windows!=="undefined"?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||zm()!==null)lb=function(){return new ym};function Am(a){this.g=!1;this.h=new ii;this.i=a}Am.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Bm(a,b){if(a.g){if(b instanceof W&&b.code==7003)throw b;throw new W(2,7,7003,b);}};function Cm(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Dm(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Em(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Fm(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Gm(a){var b=this;this.D=a;this.i=this.B=null;this.R=!1;this.K=0;this.g=null;this.o=new eb;this.j=new Map;this.W=[];this.C=new Map;this.L=!1;this.l=new ii;this.h=null;this.u=function(c){c.severity==2&&b.l.reject(c);a.onError(c)};this.Z=new Map;this.ma=new Map;this.M=new Oe(function(){return Hm(b)});this.ea=!1;this.N=[];this.X=!1;this.F=new Oe(function(){Im(b)});this.l.catch(function(){});this.m=new Am(function(){return Jm(b)});this.ba=!1;this.H=this.J=null;this.T=function(){return!1}}p=Gm.prototype;
p.destroy=function(){return this.m.destroy()};function Jm(a){return F(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.l.reject(),a.F.stop(),a.F=null,a.M.stop(),a.M=null,C(b,Km(a),2);case 2:if(!a.i){b.A(3);break}sa(b,4);return C(b,a.i.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:ua(b);case 5:a.i=null;case 3:a.g=null,a.B=null,a.C=new Map,a.h=null,a.u=function(){},a.D=null,a.ba=!1,a.J=null,E(b)}})}p.configure=function(a,b){this.h=a;b&&(this.T=b);this.F&&this.R&&this.g&&this.F.Ba(this.h.updateExpirationTime)};
function Lm(a,b,c,d){d=d===void 0?!0:d;a.C=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next())a.C.set(e.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.C.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.ea=a.C.size>0;return Mm(a,b,d)}
function Mm(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,x,A,D;return F(function(G){if(G.g==1){Nm(a.h.clearKeys,b);d=b.some(function(H){return H.video&&H.video.drmInfos.length||H.audio&&H.audio.drmInfos.length?!0:!1});e=Em(a.h.servers);f=Em(a.h.advanced||{});!d&&c&&Om(b,e);g=new WeakSet;h=t(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Pm(l),n=t(m),q=n.next();!q.done;q=n.next())r=q.value,g.has(r)||(g.add(r),Qm(r,e,f,a.h.keySystemsMapping));u=function(H,B){var I=[];H=t(H);for(var O=H.next();!O.done;O=
H.next()){O=O.value;var N=O[B]||f.has(O.keySystem)&&f.get(O.keySystem)[B]||"",P;if(P=N=="")P=(P=O.keySystem)?!!P.match(/^com\.widevine\.alpha/):!1;P&&(B=="audioRobustness"?N=[a.h.defaultAudioRobustnessForWidevine]:B=="videoRobustness"&&(N=[a.h.defaultVideoRobustnessForWidevine]));if(typeof N==="string")I.push(O);else if(Array.isArray(N))for(N.length===0&&(N=[""]),N=t(N),P=N.next();!P.done;P=N.next()){var J={};I.push(Object.assign({},O,(J[B]=P.value,J)))}}return I};v=new WeakSet;w=t(b);for(z=w.next();!z.done;z=
w.next())x=z.value,x.video&&!v.has(x.video)&&(x.video.drmInfos=u(x.video.drmInfos,"videoRobustness"),x.video.drmInfos=u(x.video.drmInfos,"audioRobustness"),v.add(x.video)),x.audio&&!v.has(x.audio)&&(x.audio.drmInfos=u(x.audio.drmInfos,"videoRobustness"),x.audio.drmInfos=u(x.audio.drmInfos,"audioRobustness"),v.add(x.audio));return C(G,mf(b,a.ea,a.ba,a.h.preferredKeySystems),2)}Bm(a.m);A=d||e.size>0;if(!A)return a.R=!0,G.return(Promise.resolve());D=Rm(a,b);return G.return(d?D:D.catch(function(){}))})}
function Sm(a){var b;return F(function(c){switch(c.g){case 1:if(a.i.mediaKeys)return c.return();if(!a.J){c.A(2);break}return C(c,a.J,3);case 3:return Bm(a.m),c.return();case 2:return sa(c,4),a.J=a.i.setMediaKeys(a.B),C(c,a.J,6);case 6:ta(c,5);break;case 4:b=ua(c),a.u(new W(2,6,6003,b.message));case 5:Bm(a.m),E(c)}})}function Tm(a,b){return F(function(c){if(c.g==1)return C(c,Sm(a),2);Um(a,b.initDataType,V(b.initData));E(c)})}
p.Nb=function(a){var b=this,c,d;return F(function(e){if(e.g==1){if(b.i===a)return e.return();if(!b.B)return b.o.Ma(a,"encrypted",function(){b.u(new W(2,6,6010))}),e.return();b.i=a;b.h.delayLicenseRequestUntilPlayed&&b.o.Ma(b.i,"play",function(){for(var f=t(b.N),g=f.next();!g.done;g=f.next())Vm(b,g.value);b.X=!0;b.N=[]});b.i.remote?(b.o.G(b.i.remote,"connect",function(){return Km(b)}),b.o.G(b.i.remote,"connecting",function(){return Km(b)}),b.o.G(b.i.remote,"disconnect",function(){return Km(b)})):"webkitCurrentPlaybackTargetIsWireless"in
b.i&&b.o.G(b.i,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Km(b)});b.H=b.g?b.g.initData.find(function(f){return f.initData.length>0})||null:null;c=b.g.keySystem;return(d=T().Ve(c))||!b.H&&b.g.keySystem==="com.apple.fps"&&!b.C.size?e.A(2):C(e,Sm(b),2)}Wm(b).catch(function(){});!d&&(b.H||b.C.size||b.h.parseInbandPsshEnabled)||b.o.G(b.i,"encrypted",function(f){return Tm(b,f)});E(e)})};
function Xm(a){var b,c,d,e,f;return F(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=zi([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.D.lc.request(5,b,{isPreload:a.T()});return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=V(d.data);ta(g,4);break;case 3:throw e=ua(g),new W(2,6,6017,e);case 4:if(a.m.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
sa(g,6);return C(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=ua(g),new W(2,6,6004,f.message);}})}
function Wm(a){var b,c,d,e,f;return F(function(g){if(g.g==1){if(!a.C.size)return g.A(2);a.C.forEach(function(h,k){Ym(a,k,h)});return C(g,a.l,3)}if(g.g!=2){b=a.g&&a.g.keyIds||new Set([]);if(b.size>0&&Zm(a))return g.return(a.l);a.L=!1;a.l=new ii;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Um(a,f.initDataType,f.initData);$m(a)&&a.l.resolve();return g.return(a.l)})}
function Um(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.j.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Lb(c,e.value.initData))return;var f=!1;a.C.forEach(function(g){!f&&Lb(c,g.initData)&&(f=!0)});if(f)return}a.L=!0;a.j.size>0&&$m(a)&&(a.l.resolve(),a.L=!1,a.l=new ii,a.l.catch(function(){}));an(a,b,c,a.g.sessionType)}}
p.Me=function(){var a=this,b=this.j.keys();b=Cm(b,function(c){var d=a.j.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.Ne=function(){var a=Infinity,b=this.j.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};function bn(a){return a.K?a.K:NaN}p.Od=function(){return Fm(this.ma)};
function Rm(a,b){var c,d,e,f,g,h,k;return F(function(l){switch(l.g){case 1:c=new Map;d=cn(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new W(2,6,6020);throw new W(2,6,6001);}Bm(a.m);sa(l,2);d.getConfiguration();var m=e=a.h.keySystemsMapping[d.keySystem]||d.keySystem,n=c.get(e),q=[],r=[],u=[],v=[],w=[],z=new Set,x=new Set;dn(n,q,r,v,u,w,z,x);var A=a.ea?"persistent-license":"temporary";m={keySystem:m,encryptionScheme:q[0],licenseServerUri:r[0],distinctiveIdentifierRequired:n[0].distinctiveIdentifierRequired,
persistentStateRequired:n[0].persistentStateRequired,sessionType:n[0].sessionType||A,audioRobustness:n[0].audioRobustness||"",videoRobustness:n[0].videoRobustness||"",serverCertificate:v[0],serverCertificateUri:u[0],initData:w,keyIds:z};x.size>0&&(m.keySystemUris=x);n=t(n);for(x=n.next();!x.done;x=n.next())x=x.value,x.distinctiveIdentifierRequired&&(m.distinctiveIdentifierRequired=x.distinctiveIdentifierRequired),x.persistentStateRequired&&(m.persistentStateRequired=x.persistentStateRequired);a.g=
m;if(!a.g.licenseServerUri)throw new W(2,6,6012,a.g.keySystem);return C(l,d.createMediaKeys(),4);case 4:f=l.h;Bm(a.m);a.B=f;if(!(a.h.minHdcpVersion!=""&&"getStatusForPolicy"in a.B)){l.A(5);break}sa(l,6);return C(l,a.B.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),8);case 8:g=l.h;if(g!="usable")throw new W(2,6,6018);Bm(a.m);ta(l,5,2);break;case 6:h=ua(l,2);if(h instanceof W)throw h;throw new W(2,6,6019,h.message);case 5:return a.R=!0,a.F.Ba(a.h.updateExpirationTime),C(l,Xm(a),9);case 9:Bm(a.m);
ta(l,0);break;case 2:k=ua(l);Bm(a.m,k);a.g=null;if(k instanceof W)throw k;throw new W(2,6,6002,k.message);}})}
function cn(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Pm(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(c.size==1&&c.has(""))throw new W(2,6,6E3);d=a.h.preferredKeySystems;d.length||(e=Em(a.h.servers),e.size==1&&(d=Array.from(e.keys())));e=t(d);var g=e.next();for(f={};!g.done;f={vg:void 0},g=e.next()){f.vg=g.value;g=t(b);for(var h=g.next();!h.done;h=g.next())if(h=h.value.decodingInfos.find(function(n){return function(q){return q.supported&&
q.keySystemAccess!=null&&q.keySystemAccess.keySystem==n.vg}}(f)))return h.keySystemAccess}e=t([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=t(b),h=g.next();!h.done;h=g.next()){h=t(h.value.decodingInfos);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.supported&&k.keySystemAccess){var l=k.keySystemAccess.keySystem;if(!d.includes(l)){var m=c.get(l);!m&&a.h.keySystemsMapping[l]&&(m=c.get(a.h.keySystemsMapping[l]));l=t(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
f)return k.keySystemAccess}}}return null}function en(a){$m(a)&&a.l.resolve()}function kn(a,b){(new Oe(function(){b.loaded=!0;en(a)})).ka(ln)}
function Ym(a,b,c){var d,e,f,g,h,k,l;F(function(m){switch(m.g){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new W(2,6,6005,n.message),a.u(e),m.return(Promise.reject(e))}a.o.G(d,"message",function(n){a.i&&a.h.delayLicenseRequestUntilPlayed&&a.i.paused&&!a.X?a.N.push(n):Vm(a,n)});a.o.G(d,"keystatuseschange",function(n){return mn(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Ye:Infinity,Ab:null,type:"persistent-license"};a.j.set(d,f);sa(m,2);return C(m,
d.load(b),4);case 4:return g=m.h,Bm(a.m),g||(a.j.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.u(new W(h,6,6013)),f.loaded=!0),kn(a,f),en(a),m.return(d);case 2:k=ua(m),Bm(a.m,k),a.j.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.u(new W(l,6,6005,k.message)),f.loaded=!0,en(a);case 3:return m.return(Promise.resolve())}})}
function an(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.u(new W(2,6,6005,f.message));return}a.o.G(e,"message",function(f){a.i&&a.h.delayLicenseRequestUntilPlayed&&a.i.paused&&!a.X?a.N.push(f):Vm(a,f)});a.o.G(e,"keystatuseschange",function(f){return mn(a,f)});a.j.set(e,{initData:c,initDataType:b,loaded:!1,Ye:Infinity,Ab:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof W||(b=new W(2,6,6016,f));a.u(b);return}a.h.logLicenseExchange&&hc(c);e.generateRequest(b,c).catch(function(f){if(!a.m.g){a.j.delete(e);
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;h<0&&(h+=4294967296);h="0x"+h.toString(16)}a.u(new W(2,6,6006,f.message,f,h))}})}function nn(a){return F(function(b){return b.g==1?a.L?C(b,a.l,3):b.A(0):C(b,Promise.all(a.W.map(function(c){return c.promise})),0)})}
function Vm(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z;F(function(x){switch(x.g){case 1:c=b.target;a.h.logLicenseExchange&&hc(b.message);d=a.j.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];b.messageType=="individualization-request"&&f&&f.individualizationServer&&(e=f.individualizationServer);g=zi([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(a.g.keySystem==="org.w3.clearkey"){var A=g,D=a.g;try{var G=$b(A.body);if(G){var H=JSON.parse(G);H.type||(H.type=D.sessionType,A.body=ac(JSON.stringify(H)))}}catch(B){}}if(Nh(a.g.keySystem))if(A=Yb(g.body,!0,!0),A.includes("PlayReadyKeyMessage")){A=bd(A,"PlayReadyKeyMessage");D=ld(A,"HttpHeader");D=t(D);for(G=D.next();!G.done;G=D.next())H=G.value,G=ld(H,"name")[0],H=ld(H,"value")[0],g.headers[jd(G)]=jd(H);A=ld(A,"Challenge")[0];g.body=ic(jd(A))}else g.headers["Content-Type"]=
"text/xml; charset=utf-8";k=Date.now();sa(x,2);m=a.D.lc.request(2,g,{isPreload:a.T()});a.W.push(m);return C(x,m.promise,4);case 4:l=x.h;$a(a.W,m);ta(x,3);break;case 2:n=ua(x);if(a.m.g)return x.return();q={sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType};r=new W(2,6,6007,n,q);a.j.size==1?(a.u(r),d&&d.Ab&&d.Ab.reject(r)):(d&&d.Ab&&d.Ab.reject(r),a.j.delete(c),$m(a)&&(a.l.resolve(),a.M.ka(.1)));return x.return();case 3:if(a.m.g)return x.return();a.K+=(Date.now()-
k)/1E3;a.h.logLicenseExchange&&hc(l.data);sa(x,5);return C(x,c.update(l.data),7);case 7:ta(x,6);break;case 5:return v=(u=ua(x))&&u.message||String(u),w=new W(2,6,6008,v),a.u(w),d&&d.Ab&&d.Ab.reject(w),x.return();case 6:if(a.m.g)return x.return();z=new qi("drmsessionupdate");a.D.onEvent(z);d&&(d.Ab&&d.Ab.resolve(),kn(a,d));E(x)}})}
function mn(a,b){b=b.target;var c=a.j.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if(typeof g=="string"){var h=g;g=f;f=h}h=T();if(Nh(a.g.keySystem)&&g.byteLength==16&&h.lf()){h=Sb(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)}f!="status-pending"&&(c.loaded=!0);f=="expired"&&(d=!0);g=kc(g).slice(0,32);a.Z.set(g,f)});var e=b.expiration-Date.now();(e<0||d&&e<1E3)&&c&&!c.Ab&&(a.j.delete(b),on(b));$m(a)&&(a.l.resolve(),
a.M.ka(pn))}function Hm(a){var b=a.Z,c=a.ma;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return d=="expired"})&&a.u(new W(2,6,6014));a.D.rg(Fm(c))}
function qn(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,x,A,D,G,H,B,I,O,N,P,J,L,Q,K;return F(function(M){if(M.g==1){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 M.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"];r=new Map;u=T();v=function(R,aa,nb){var Aa,cb,Ua,Ob,ob,Ga,Ka,Vb,Wb,Fb,Pb,Qb,pc;return F(function(ya){switch(ya.g){case 1:return sa(ya,2),C(ya,aa.createMediaKeys(),5);case 5:Aa=ya.h;case 4:ta(ya,3);break;case 2:return ua(ya),ya.return();case 3:Ua=(cb=aa.getConfiguration().sessionTypes)?
cb.includes("persistent-license"):!1;u.lg()&&(Ua=!1);Ob=aa.getConfiguration().videoCapabilities;ob=aa.getConfiguration().audioCapabilities;Ga={persistentState:Ua,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.get(R)?Ga=r.get(R):r.set(R,Ga);(Ka=Ob[0].encryptionScheme)&&!Ga.encryptionSchemes.includes(Ka)&&Ga.encryptionSchemes.push(Ka);(Vb=Ob[0].robustness)&&!Ga.videoRobustnessLevels.includes(Vb)&&Ga.videoRobustnessLevels.push(Vb);(Wb=ob[0].robustness)&&
!Ga.audioRobustnessLevels.includes(Wb)&&Ga.audioRobustnessLevels.push(Wb);if(!(nb&&"getStatusForPolicy"in Aa)){ya.A(0);break}Fb=t(f);Pb=Fb.next();case 7:if(Pb.done){ya.A(0);break}Qb=Pb.value;if(Ga.minHdcpVersions.includes(Qb)){ya.A(8);break}return C(ya,Aa.getStatusForPolicy({minHdcpVersion:Qb}),10);case 10:if(pc=ya.h,pc=="usable")Ga.minHdcpVersions.includes(Qb)||Ga.minHdcpVersions.push(Qb);else{ya.A(0);break}case 8:Pb=Fb.next(),ya.A(7)}})};w=function(R,aa,nb,Aa,cb){cb=cb===void 0?!1:cb;var Ua,Ob,
ob,Ga,Ka,Vb,Wb,Fb,Pb,Qb,pc;return F(function(ya){switch(ya.g){case 1:sa(ya,2);Ua=Yc(n);Ob=t(Ua.videoCapabilities);for(ob=Ob.next();!ob.done;ob=Ob.next())Ga=ob.value,Ga.encryptionScheme=aa,Ga.robustness=nb;Ka=t(Ua.audioCapabilities);for(Vb=Ka.next();!Vb.done;Vb=Ka.next())Wb=Vb.value,Wb.encryptionScheme=aa,Wb.robustness=Aa;Fb=Yc(Ua);Fb.persistentState="required";Fb.sessionTypes=["persistent-license"];Pb=[Fb,Ua];pc=T();return pc.Ha()=="MOBILE"?C(ya,Se(5,navigator.requestMediaKeySystemAccess(R,Pb)),7):
C(ya,navigator.requestMediaKeySystemAccess(R,Pb),6);case 6:Qb=ya.h;ya.A(5);break;case 7:Qb=ya.h;case 5:return C(ya,v(R,Qb,cb),8);case 8:ta(ya,0);break;case 2:ua(ya),E(ya)}})};z=t(a);for(x=z.next();!x.done;x=z.next())A=x.value,r.set(A,null);D=function(R){return T().ua()==="WEBKIT"&&R==="org.w3.clearkey"?!1:!0};G=[];H=t(a);for(B=H.next();!B.done;B=H.next())if(I=B.value,D(I)){O=!0;N=t(q);for(P=N.next();!P.done;P=N.next())J=P.value,G.push(w(I,J,"","",O)),O=!1;L=t(k[I]||[]);for(Q=L.next();!Q.done;Q=L.next())K=
Q.value,G.push(w(I,null,K,"")),G.push(w(I,null,"",K))}return C(M,Promise.all(G),2)}return M.return(Fm(r))})}function on(a){return F(function(b){if(b.g==1)return sa(b,2),C(b,Se(rn,Promise.all([a.close().catch(function(){}),a.closed])),4);if(b.g!=2)return ta(b,0);ua(b);E(b)})}
function Km(a){var b;return F(function(c){b=Array.from(a.j.entries());a.j.clear();return C(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value;var f=d.next().value;return F(function(g){if(g.g==1)return sa(g,2),a.C.has(e.sessionId)||f.type!=="persistent-license"||a.h.persistentSessionOnlinePlayback?C(g,on(e),5):C(g,e.remove(),5);if(g.g!=2)return ta(g,0);ua(g);E(g)})})),0)})}function Pm(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function Im(a){a.j.forEach(function(b,c){var d=b.Ye,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Ye=e)})}function $m(a){a=a.j.values();return Dm(a,function(b){return b.loaded})}function Zm(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if(a.Z.get(c.value)!=="usable")return!1;return!0}
function Om(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 dn(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={za:void 0},l=a.next()){m.za=l.value;b.includes(m.za.encryptionScheme)||b.push(m.za.encryptionScheme);m.za.keySystem=="org.w3.clearkey"&&m.za.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.za.licenseServerUri)||k.push(m.za.licenseServerUri):c.includes(m.za.licenseServerUri)||c.push(m.za.licenseServerUri);e.includes(m.za.serverCertificateUri)||e.push(m.za.serverCertificateUri);m.za.serverCertificate&&
(d.some(function(r){return function(u){return Lb(u,r.za.serverCertificate)}}(m))||d.push(m.za.serverCertificate));if(m.za.initData){l=t(m.za.initData);for(var n=l.next(),q={};!n.done;q={Re:void 0},n=l.next())q.Re=n.value,f.some(function(r){return function(u){var v=r.Re;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&Lb(u.initData,v.initData)}}(q))||f.push(q.Re)}if(m.za.keyIds)for(l=t(m.za.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.za.keySystemUris&&h)for(m=t(m.za.keySystemUris),
l=m.next();!l.done;l=m.next())h.add(l.value)}if(k.length==1)c.push(k[0]);else if(k.length>0){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,y(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
function Qm(a,b,c,d){var e=a.keySystem;if(e&&(e!="org.w3.clearkey"||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.serverCertificate||(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=
c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&e=="com.microsoft.playready"&&(a.keySystem="com.chromecast.playready")}}function Nm(a,b){a=Em(a);if(a.size!=0){a=oc(a);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var rn=1,ln=5,pn=.5;function sn(){this.g=tn;this.i=(new Map).set(tn,2).set(un,1);this.h=0}function vn(a,b){var c=a.g!==b;a.g=b;c&&b===tn&&(a.h=Date.now());return c}var un=0,tn=1;function wn(a){for(var b=[],c=3;c>=0;c--)b.push(a>>8*c&255);return b}function xn(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<(a.length-c-1)*8;return b}
function yn(a){var b=Fa.apply(1,arguments),c=zn.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],zn.set(a,c));for(var d=8,e=b.length-1;e>=0;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}var zn=new Map;function An(a){a=V(a);var b=null;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).box("minf",Ug).box("stbl",Ug).P("stsd",Wg).box("enca",function(c){b=c.reader.h;return Yg(c)}).box("sinf",Ug).box("frma",function(c){c.parser.stop();dh(c.reader).codec==="ec-3"&&b&&b.getUint16(16)!==2&&b.setUint16(16,2)}).parse(a);return a}
function Bn(a,b,c){function d(r){n.push({box:r,ng:1701733217})}function e(r){n.push({box:r,ng:1701733238})}function f(r){k=!0;r.parser.stop()}function g(r){m.push(r);Ug(r)}var h=b=V(b),k=!1,l,m=[],n=[];(new Pg).box("moov",g).box("trak",g).box("mdia",g).box("minf",g).box("stbl",g).P("stsd",function(r){l=r;m.push(r);Wg(r)}).P("encv",f).P("enca",f).P("dvav",e).P("dva1",e).P("dvh1",e).P("dvhe",e).P("dvc1",e).P("dvi1",e).P("hev1",e).P("hvc1",e).P("avc1",e).P("avc3",e).P("ac-3",d).P("ec-3",d).P("ac-4",
d).P("Opus",d).P("fLaC",d).P("mp4a",d).parse(b);if(k)return b;if(n.length==0||!l)throw Ya(kc(b)),new W(2,3,3019,c);n.reverse();c=t(n);for(var q=c.next();!q.done;q=c.next())q=q.value,h=Cn(a,h,l,q.box,m,q.ng);return T().xg()?(a=new Uint8Array(b.byteLength+h.byteLength),a.set(h),a.set(b,h.byteLength),a):h}
function Dn(a){a=V(a);var b=[];(new Pg).box("mdat",function(g){b.push(g)}).parse(a);for(var c=[],d=0;d<b.length;d++){var e=b[d-1],f=b[d];c.push(En(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return lc.apply(ec,y(c))}
function En(a){function b(n){g.push(n);Ug(n)}var c,d,e,f,g=[];(new Pg).box("moof",b).box("traf",b).P("tfhd",function(n){c=n;e=$g(n.reader,n.flags)}).P("trun",function(n){d=n;f=ch(n.reader,n.version,n.flags)}).parse(a);if(e&&e.Bg!==2){var h=c.start+Vg(c)+4+(e.hh!==null?8:0),k=Sb(a);if(e.Bg!==null)k.setUint32(h,2);else{Fn(a,c.start,c.size+4);var l=k.getUint32(c.start+8);k.setUint32(c.start+8,l|2);f&&f.Le!==null&&k.setInt32(d.start+Vg(d)+4,f.Le+4);l=a.subarray(0,h);k=a.subarray(h);a=new Uint8Array(a.byteLength+
4);a.set(l);l=[];for(var m=3;m>=0;m--)l.push(2>>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,Fn(a,k.start,k.size+4)}}return a}
function Cn(a,b,c,d,e,f){var g=new Uint8Array([].concat(y(wn(xn(d.name.split(".")[0])))));g=yn("frma",g);var h="cenc";var k=a.drmInfos[0];k&&k.encryptionScheme&&(h=k.encryptionScheme);h=new Uint8Array([0,0,0,0].concat(y(wn(xn(h))),[0,1,0,0]));h=yn("schm",h);k=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.drmInfos);for(var l=a.next();!l.done;l=a.next())if((l=l.value)&&l.keyIds&&l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){k=m.value;m=new Uint8Array(k.length/2);for(var n=
0;n<k.length/2;n+=1)m[n]=parseInt(String(k[n*2]+k[n*2+1]),16);k=m}}a=new Uint8Array([0,0,0,0,0,0,1,8]);a=yn("tenc",a,k);a=yn("schi",a);h=yn("sinf",g,h,a);a=b.subarray(d.start,d.start+d.size);g=new Uint8Array(d.size+h.byteLength);g.set(a,0);Sb(g).setUint32(4,f);g.set(h,d.size);Fn(g,0,g.byteLength);f=new Uint8Array(b.byteLength+g.byteLength);d=T().Vd()?d.start:d.start+d.size;h=b.subarray(d);f.set(b.subarray(0,d));f.set(g,d);f.set(h,d+g.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,
Fn(f,e.start,e.size+g.byteLength);b=Sb(f,c.start);c=Vg(c);e=b.getUint32(c);b.setUint32(c,e+1);return f}function Fn(a,b,c){a=Sb(a,b);b=a.getUint32(0);b!=0&&(b==1?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}
function Gn(a){function b(e){d.push({start:e.start,size:e.size});Ug(e)}var c=V(a),d=[];(new Pg).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=Sb(c,e.start),g=0;g<e.size-3;g++){var h=f.getUint32(g);h==1633889587?f.setUint32(g,1700998451):h==1684103987&&f.setUint32(g,1684366131)}}).parse(c);return c};function Hn(a){return a.length==1&&a.end(0)-a.start(0)<1E-4}function In(a){return!a||Hn(a)?null:a.length==1&&a.start(0)<0?0:a.length?a.start(0):null}function Jn(a){return!a||Hn(a)?null:a.length?a.end(a.length-1):null}function Kn(a,b){return!a||!a.length||Hn(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ln(a,b){if(!a||!a.length||Hn(a))return 0;var c=0;a=t(Mn(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 Nn(a,b,c){if(!a||!a.length||Hn(a))return null;a=Mn(a).findIndex(function(d,e,f){return d.start>b&&(e==0||f[e-1].end-b<=c)});return a>=0?a:null}function Mn(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function On(a,b,c,d){var e=this;this.u=d;this.g=a;this.D=b;this.h=c;this.j=new eb;this.m=!1;this.l=0;this.C=!1;this.H=this.F=0;this.o=Pn(this);this.B=!1;this.j.G(a,"waiting",function(){return Qn(e)});this.i=(new Oe(function(){Qn(e)})).Ba(this.h.gapJumpTimerTime)}On.prototype.release=function(){this.j&&(this.j.release(),this.j=null);this.i!=null&&(this.i.stop(),this.i=null);this.o&&(this.o.release(),this.o=null);this.g=this.D=this.u=null};
On.prototype.ge=function(){this.B=!0;this.i&&this.i.Ba(this.h.gapJumpTimerTime);Qn(this)};
function Qn(a){if(a.g.readyState!=0){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||a.g.currentTime==a.l&&(a.g.autoplay||a.g.currentTime!=a.l)){var b;if(!(b=!a.o)){b=a.o;var c=b.h,d=Rn(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.i=!1;e=f-b.l;if(d=e>=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=Nn(c,b,a.h.gapDetectionThreshold),d==null||d==0&&!a.B||(e=c.start(d),(f=a.h.gapPadding)&&(e=Math.ceil((e+f)*
100)/100),e>=a.D.ab()||e-b<.001||(d!=0&&c.end(d-1),Sn(a,e),b==a.l&&(a.l=e),a.F++,a.u(new qi("gapjumped")))))}}}function Sn(a,b){a.C=!0;a.j.Ma(a.g,"seeked",function(){a.C=!1});a.g.currentTime=b}
function Pn(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new Tn(new Un(a.g),b,function(){var d;return F(function(e){if(e.g==1)return d=Mn(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.A(2)):C(e,a.g.play(),3):e.return();if(e.g!=2){if(!a.g)return e.return();a.g.pause();a.g.play()}a.H++;a.u(new qi("stalldetected"));E(e)})})}function Tn(a,b,c){this.h=a;this.m=Rn(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.o=b;this.j=c}
Tn.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function Un(a){var b=this;this.g=a;this.h=new eb;this.i=!1;this.h.G(this.g,"audiofocuspaused",function(){b.i=!0});this.h.G(this.g,"audiofocusgranted",function(){b.i=!1});this.h.G(this.g,"audiofocuslost",function(){b.i=!0})}
function Rn(a){if(a.g.paused||a.g.playbackRate==0||a.i||a.g.buffered.length==0)var b=!1;else a:{b=a.g.currentTime;a=t(Mn(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b}Un.prototype.release=function(){this.h&&this.h.release();this.h=null};/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Vn(a,b,c){this.g=a;this.i=b;this.h=c}function Wn(a,b){return F(function(c){if(c.g==1)return C(c,gf(a.h,b,a.g.drm.preferredKeySystems,a.g.drm.keySystemsMapping),2);a.g.streaming.dontChooseCodecs||df(b,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes,a.g.preferredTextFormats);if(!b.variants.some(Ef))throw new W(2,4,4032);return c.return(Xn(a,b))})}
function Yn(a,b){var c=a.g.restrictions;a=a.i;var d=!1;b=t(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=ff(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
function Xn(a,b){var c=Yn(a,b);if(b){var d=a.h?a.h.g:null;if(d&&a.h.B){for(var e=new Set,f=t(b.variants),g=f.next();!g.done;g=f.next())g=g.value,g.audio&&e.add(g.audio),g.video&&e.add(g.video);e=t(e);for(f=e.next();!f.done;f=e.next())Zn(a,d.keySystem,f.value)}$n(a,b)}return c}function Zn(a,b,c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Um(a.h,e.initDataType,e.initData)}}
function $n(a,b){a=a.h?a.h.Od():{};var c=Object.keys(a);c=c.length&&c[0]=="00";var d=!1,e=!1,f=new Set,g=new Set,h=new Set;b=t(b.variants);for(var k=b.next();!k.done;k=b.next())k=k.value,k.audio&&h.add(k.audio),k.video&&h.add(k.video),k.allowedByApplication?k.allowedByKeySystem&&(d=!0):e=!0;h=t(h);for(b=h.next();!b.done;b=h.next())if(b=b.value,b.keyIds.size)for(b=t(b.keyIds),k=b.next();!k.done;k=b.next()){k=k.value;var l=a[c?"00":k];l?ao.includes(l)&&g.add(l):f.add(k)}if(!d)throw a={hasAppRestrictions:e,
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new W(2,4,4012,a);}var ao=["output-restricted","internal-error"];function bo(a,b,c,d,e){var f=this;this.g=a;this.R=c;this.B=d;this.ea=b;this.l=new Map;this.D=new Map;this.Qa=new Map;this.h=null;this.Fa=!1;this.H=e||null;this.o=new Map;this.u=new eb;this.j=new Map;this.K=null;this.M=new ii;this.Ca="";this.ub=!1;this.xa=!0;this.N=!1;this.C=this.T=null;this.i=co(this,this.M);this.Ya=this.F=!1;this.L=new Am(function(){return eo(f)});this.J=!1;this.Z="UNKNOWN";this.rb=this.sb=!1;this.Ra=new ii;this.m=!1;this.wa=null;this.ba=new Map;this.ra=this.W=this.va=this.X=null;
this.ma=new ii;this.g.remote&&(this.N=this.g.remote.state!="disconnected",this.u.G(this.g.remote,"connect",function(){f.N=f.g.remote.state!="disconnected"}),this.u.G(this.g.remote,"connecting",function(){f.N=f.g.remote.state!="disconnected"}),this.u.G(this.g.remote,"disconnect",function(){f.N=f.g.remote.state!="disconnected"}))}
function co(a,b){a.xa=!0;if(window.ManagedMediaSource){a.C||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.u.G(c,"startstreaming",function(){a.xa=!0});a.u.G(c,"endstreaming",function(){a.xa=!1})}else c=new MediaSource;a.u.Ma(c,"sourceopen",function(){URL.revokeObjectURL(a.Ca);b.resolve()});a.u.Ma(a.g,"playing",function(){a.ub=!0});a.Ca=fo(c);a.B.useSourceElements?(a.g.removeAttribute("src"),a.T&&a.g.removeChild(a.T),a.C&&a.g.removeChild(a.C),a.T=cm(a.Ca),a.g.appendChild(a.T),a.C&&a.g.appendChild(a.C),
a.g.load()):a.g.src=a.Ca;return c}function go(a,b,c){a.g&&window.ManagedMediaSource&&a.i&&a.B.useSourceElements&&(a.C&&a.g.removeChild(a.C),a.C=cm(b,c),a.g.appendChild(a.C),a.g.disableRemotePlayback=!1)}
function ho(){var a='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(y(re)),b=
{};T();a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Fe(c))b[c]=!0;else if(Nj()){var d=ye(c),e=tf(ze(c),d);d=qe(d,e);b[c]=Cc(d)||(je(d)?!0:!1)}else b[c]=Oj().canPlayType(c)!="";d=c.split(";")[0];b[d]=b[d]||b[c]}return b}p=bo.prototype;p.destroy=function(){return this.L.destroy()};
function eo(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,u,v;return F(function(w){if(w.g==1){b=[];c=t(a.o);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=t(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.o.set(l,h.slice(0,1)),k&&b.push(k.p.catch(Qe)),m=t(h.slice(1)),n=m.next();!n.done;n=m.next())q=n.value,q.p.reject(new W(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return C(w,Promise.all(b),2)}r=t(a.j.values());for(u=r.next();!u.done;u=r.next())v=u.value,v.destroy();a.u&&(a.u.release(),a.u=null);a.g&&a.C&&
a.g.removeChild(a.C);a.g&&a.T&&(a.g.removeChild(a.T),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.T=null;a.C=null;a.B=null;a.i=null;a.h=null;a.ea=null;a.l.clear();a.Qa.clear();a.j.clear();a.K=null;a.o.clear();a.H=null;a.ba.clear();a.R=null;E(w)})}
p.init=function(a,b,c,d){b=b===void 0?!1:b;c=c===void 0?"UNKNOWN":c;d=d===void 0?!1:d;var e=this,f,g,h,k,l,m;return F(function(n){if(n.g==1)return f=wc,C(n,e.M,2);if(n.g!=3){if(!io(e)&&!jo(e))return n.A(3);Sa("Expected MediaSource to be open during init(); reopening the media source.");e.M=new ii;e.i=co(e,e.M);return C(n,e.M,3)}e.J=b;e.Z=c;e.sb=d;e.rb=!e.J&&e.Z=="HLS"&&!e.sb;e.ba.clear();e.X=null;e.va=null;e.W=null;e.ra=null;e.ma=new ii;g=t(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=
a.get(k),ko(e,k,l,l.codecs),e.m?(e.o.set(f.Y,[]),e.o.set(f.sa,[])):e.o.set(k,[]);(m=a.get(f.Y))&&m.isAudioMuxedInVideo&&(e.m=!0);E(n)})};
function ko(a,b,c,d){b=="audio"&&d&&(d=tf(d,c.mimeType));var e=qe(c.mimeType,d);if(b==uc)lo(a,e,a.J,c.external);else{var f=a.B.forceTransmux;if(!Cc(e)||!a.J&&re.includes(e))f=!0;var g=se(c.mimeType,d);if(f){f=sc("audio",(d||"").split(","));d=sc("video",(d||"").split(","));if(f&&d){a.m=!0;ko(a,"audio",c,f);ko(a,"video",c,d);return}if(d=je(g))e=d(),a.j.set(b,e),e=e.convertCodecs(b,g)}g=e+a.B.addExtraFeaturesToSourceBuffer(e);Bm(a.L);try{var h=a.i.addSourceBuffer(g)}catch(k){throw new W(2,3,3015,k,"The mediaSource_ status was "+
a.i.readyState+" expected 'open'",null);}a.J&&(h.mode=mo);a.u.G(h,"error",function(){var k=a.o.get(b)[0];k.p.reject(new W(2,3,3014,a.g.error?a.g.error.code:0,k.uri))});a.u.G(h,"updateend",function(){return no(a,b)});a.l.set(b,h);a.D.set(b,e);a.Qa.set(b,!!c.drmInfos.length)}}p.configure=function(a){this.B=a;this.h&&(this.h.B=a.modifyCueCallback)};function oo(a){return a.xa&&!a.N&&!a.F}
function lo(a,b,c,d){a.h||(a.h=new Be(a.ea),a.h&&(a.h.B=a.B.modifyCueCallback));var e=a.h;d=d||a.Fa;a=a.Z;b=="application/cea-608"||b=="application/cea-708"?e.i=null:(e.i=De.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):U("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):U("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.C=d)}
function io(a){return a.F?!1:a.i?a.i.readyState=="ended":!0}function jo(a){return a.F?!1:a.i?a.i.readyState=="closed":!0}function po(a,b){return a.l.size?b==uc?a.h.g:In(qo(a,b)):null}function ro(a,b){return a.l.size?b==uc?a.h.h:Jn(qo(a,b)):null}function so(a,b,c){if(b==uc)return a=a.h,a.h==null||a.h<c?0:a.h-Math.max(c,a.g);a=qo(a,b);return Ln(a,c)}
p.Sb=function(){var a={total:this.F?[]:Mn(this.g.buffered),audio:Mn(qo(this,"audio")),video:Mn(qo(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;b!=null&&c!=null&&a.text.push({start:b,end:c})}return a};function qo(a,b){if(a.F||a.N)return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function to(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=null,k=[],l=V(c);if(re.includes(f))c=zh(l),c.length&&d&&((g=c.find(function(u){return u.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof g.data=="number"&&(h=Math.round(g.data)/1E3),a.R.onMetadata([{cueTime:d.startTime,data:l,frames:c,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.oa){l=new Pg;var m=e.emsgSchemeIdUris!=null&&e.emsgSchemeIdUris.length>0||a.B.dispatchAllEmsgBoxes;m&&l.P("emsg",
function(u){var v=e.emsgSchemeIdUris;if(u.version===0){var w=u.reader.nc();var z=u.reader.nc();var x=u.reader.O();var A=u.reader.O();var D=u.reader.O();var G=u.reader.O();var H=d.startTime+A/x}else x=u.reader.O(),H=u.reader.Oc()/x+d.l,A=H-d.startTime,D=u.reader.O(),G=u.reader.O(),w=u.reader.nc(),z=u.reader.nc();u=u.reader.Vb(u.reader.getLength()-u.reader.Da(),!0);if(v&&v.includes(w)||a.B.dispatchAllEmsgBoxes)if(w=="urn:mpeg:dash:event:2012")a.R.Di();else if(v=H+D/x,a.R.Bi({startTime:H,endTime:v,schemeIdUri:w,
value:z,timescale:x,presentationTimeDelta:A,eventDuration:D,id:G,messageData:u}),w=="https://aomedia.org/emsg/ID3"||w=="https://developer.apple.com/streaming/emsg-id3")if(x=zh(u),x.length)a.R.onMetadata([{cueTime:H,data:u,frames:x,dts:H,pts:H}],0,v)});var n=d.oa.timescale;b=n&&!isNaN(n);var q=0,r=!1;b&&l.P("prft",function(u){var v=u.reader,w=u.version;v.O();u=v.O();var z=v.O();u=u*1E3+z/4294967296*1E3;w===0?v=v.O():(w=v.O(),v=v.O(),v=w*4294967296+v);u=ml(u);v=(new Map).set("detail",{wallClockTime:u,
programStartDate:new Date(u-v/n*1E3)});v=new qi("prft",v);a.R.onEvent(v)}).box("moof",Ug).box("traf",Ug).P("tfdt",function(u){r||(q=ah(u.reader,u.version).baseMediaDecodeTime/n,r=!0,m||u.parser.stop())});(m||b)&&l.parse(c,!1,g);r&&d.l==0&&(h=q)}else f.includes("/mp4")||f.includes("/webm")||!Ih(l)||(a.ba.has(b)||a.ba.set(b,new Ah),k=a.ba.get(b),k.clearData(),k.Ig(d.j),k.parse(l),l=k.getStartTime(b),l!=null&&(h=l),k=k.getMetadata());return{timestamp:h,metadata:k}}
function uo(a,b,c,d,e,f,g,h,k,l,m){g=g===void 0?!1:g;h=h===void 0?!1:h;k=k===void 0?!1:k;l=l===void 0?!1:l;var n,q,r,u,v,w,z,x,A,D,G,H,B,I,O,N,P,J,L,Q,K;return F(function(M){switch(M.g){case 1:n=wc;if(b!=n.Ja){M.A(2);break}if(a.Z!="HLS"){M.A(3);break}return C(M,a.Ra,4);case 4:q=M.h,a.h.u=q;case 3:return C(M,Ge(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.Ia()[0]:null),5);case 5:return M.return();case 2:if(l||!a.m){M.A(6);break}return C(M,uo(a,n.Y,c,d,e,f,g,h,k,!0),7);case 7:return C(M,uo(a,n.sa,
c,d,e,f,g,h,k,!0),8);case 8:return M.return();case 6:if(!a.l.has(b))return M.return();r=a.l.get(b).timestampOffset;u=a.D.get(b);a.j.has(b)&&(u=a.j.get(b).getOriginalMimeType());if(d&&(v=to(a,b,c,d,e,u,k),w=v.timestamp,z=v.metadata,w!=null&&(a.X==null&&b==n.sa&&(a.X=w,a.va=d.startTime,a.W!=null&&(x=0,a.va==a.ra&&(x=a.X-a.W),a.ma.resolve(x))),a.W==null&&b==n.Y&&(a.W=w,a.ra=d.startTime,a.X!=null&&(A=0,a.va==a.ra&&(A=a.X-a.W),a.ma.resolve(A))),D=w,G=re,!a.J&&G.includes(a.D.get(b))&&(D=0),H=d.startTime-
D,B=Math.abs(r-H),(B>=.001||g||h)&&(!k||H>0||!r)&&(r=H,a.rb&&(vo(a,b,function(){return wo(a,b)},null),vo(a,b,function(){return xo(a,b,r)},null))),(I=b==n.sa||!a.l.has(n.sa))&&a.Ra.resolve(r)),z.length))a.R.onMetadata(z,r,d?d.endTime:null);f&&b==n.sa&&(a.h||lo(a,"application/cea-608",a.J,!1),a.K||(O=u.split(";",1)[0],a.K=new Jc(O)),d?(N=a.K.m(c),N.length&&Me(a.h,N,r)):a.K.init(c,h,m));if(!a.j.has(b)){M.A(9);break}return C(M,a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:P=M.h,ArrayBuffer.isView(P)?
c=P:(J=P,J.init!=null&&(L=J.init,vo(a,b,function(){a.H&&zc(a.H,L,r,e);a.l.get(b).appendBuffer(L)},d?d.Ia()[0]:null)),c=J.data);case 9:c=yo(a,e,c,d,b);if(!d||!a.J||b==n.Ja){M.A(11);break}if(!g&&!h){M.A(11);break}Q=d.startTime;if(a.Z!="HLS"||a.m||b!=n.Y||!a.l.has(n.sa)){M.A(13);break}return C(M,a.ma,14);case 14:K=M.h,Math.abs(K)>.15&&(Q-=K);case 13:vo(a,b,function(){return wo(a,b)},null),vo(a,b,function(){return xo(a,b,Q)},null);case 11:return C(M,vo(a,b,function(){var R=c;a.H&&zc(a.H,R,r,e);a.l.get(b).appendBuffer(R)},
d?d.Ia()[0]:null),15);case 15:E(M)}})}function zo(a,b){var c=ro(a,"video")||0;Ke(a.h,b,c)}function Ao(a){a.h&&Ke(a.h,"",0)}p.remove=function(a,b,c,d){var e=this,f,g;return F(function(h){return h.g==1?(f=wc,a==f.sa&&e.K&&(e.K.remove(d),g=e.h.g||0,e.h.remove(g,c,!0)),a==f.Ja?C(h,e.h.remove(b,c),0):c>b?C(h,vo(e,a,function(){return Bo(e,a,b,c)},null),5):h.A(0)):e.m?C(h,vo(e,f.Y,function(){return Bo(e,f.Y,b,c)},null),0):h.A(0)})};
function Co(a,b){var c;return F(function(d){return d.g==1?(c=wc,b==c.Ja?a.h?C(d,a.h.remove(0,Infinity),0):d.return():b===c.sa&&a.K&&a.h?C(d,a.h.remove(0,Infinity,!0),4):d.A(4)):d.g!=6?C(d,vo(a,b,function(){return Bo(a,b,0,a.i.duration)},null),6):a.m?C(d,vo(a,c.Y,function(){return Bo(a,c.Y,0,a.i.duration)},null),0):d.A(0)})}
p.flush=function(a){var b=this,c;return F(function(d){return d.g==1?(c=wc,a==c.Ja?d.return():C(d,vo(b,a,function(){b.g.currentTime-=.001;no(b,a)},null),2)):b.m?C(d,vo(b,c.Y,function(){var e=c.Y;b.g.currentTime-=.001;no(b,e)},null),0):d.A(0)})};
function Do(a,b,c,d,e,f,g,h,k){var l,m,n;return F(function(q){if(q.g==1){l=wc;if(b==l.Ja)return f||(a.h.u=c),Je(a.h,d,e),q.return();m=[];return C(q,Eo(a,b,g,h,k),2)}n=q.h;n||(m.push(vo(a,b,function(){return wo(a,b)},null)),a.m&&m.push(vo(a,l.Y,function(){return wo(a,l.Y)},null)));f||(m.push(vo(a,b,function(){return xo(a,b,c)},null)),a.m&&m.push(vo(a,l.Y,function(){return xo(a,l.Y,c)},null)));if(d!=0||e!=Infinity)m.push(vo(a,b,function(){return Fo(a,b,d,e)},null)),a.m&&m.push(vo(a,l.Y,function(){return Fo(a,
l.Y,d,e)},null));return m.length?C(q,Promise.all(m),0):q.A(0)})}function Go(a,b,c){var d,e;return F(function(f){if(f.g==1){d=wc;if(b==d.Ja)return f.return();b==d.sa&&(a.Ra=new ii);if(!a.J||(e=ro(a,b))&&Math.abs(e-c)<.15)return f.return();vo(a,b,function(){return wo(a,b)},null);a.m&&vo(a,d.Y,function(){return wo(a,d.Y)},null);return C(f,vo(a,b,function(){return xo(a,b,c)},null),2)}return a.m?C(f,vo(a,d.Y,function(){return xo(a,d.Y,c)},null),0):f.A(0)})}
p.endOfStream=function(a){var b=this;return F(function(c){return C(c,Ho(b,function(){io(b)||jo(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.Mb=function(a){var b=this;return F(function(c){return C(c,Ho(b,function(){if(b.B.durationReductionEmitsUpdateEnd&&a<b.i.duration)for(var d=t(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:new ii,uri:null};b.o.get(e).unshift(f)}b.i.duration=a;b.wa=a}),0)})};p.getDuration=function(){return this.i.duration};
function Io(a,b,c){F(function(d){return a.L.g||a.g.error||a.N||a.F||io(a)||jo(a)?d.return():C(d,Ho(a,function(){io(a)||jo(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function Jo(a){F(function(b){return a.L.g||a.g.error||a.N||a.F||io(a)||jo(a)?b.return():C(b,Ho(a,function(){io(a)||jo(a)||a.i.clearLiveSeekableRange()}),0)})}function Bo(a,b,c,d){d<=c?no(a,b):a.l.get(b).remove(c,d)}
function wo(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;no(a,b)}function xo(a,b,c){c<0&&(c+=.001);a.l.get(b).timestampOffset=c;no(a,b)}function Fo(a,b,c,d){var e=a.l.get(b);if(e.appendWindowEnd!==d||e.appendWindowStart!==c)e.appendWindowStart=0,e.appendWindowEnd=d,e.appendWindowStart=c;no(a,b)}
function no(a,b){if(a.F||a.L.g){var c=a.o.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.o.set(b,[]))}else if(c=a.o.get(b)[0])c.p.resolve(),Ko(a,b)}function vo(a,b,c,d){Bm(a.L);c={start:c,p:new ii,uri:d};a.o.get(b).push(c);a.o.get(b).length==1&&Lo(a,b);return c.p}
function Ho(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u;return F(function(v){switch(v.g){case 1:Bm(a.L);c=[];d=Array.from(a.l.keys());e=t(d);f=e.next();for(g={};!f.done;g={ready:void 0},f=e.next())h=f.value,g.ready=new ii,k={start:function(w){return function(){return w.ready.resolve()}}(g),p:g.ready,uri:null},l=a.o.get(h),l.push(k),c.push(g.ready),l.length==1&&k.start();sa(v,2);return C(v,Promise.all(c),4);case 4:ta(v,3);break;case 2:throw m=ua(v),m;case 3:return sa(v,5,6),C(v,b(),6);case 6:va(v);n=t(d);for(q=
n.next();!q.done;q=n.next())r=q.value,Ko(a,r);wa(v,0);break;case 5:throw u=ua(v),new W(2,3,3015,u,a.g.error||"No error in the media element",null);}})}function Ko(a,b){a.o.get(b).shift();Lo(a,b)}function Lo(a,b){var c=a.o.get(b)[0];if(c)try{c.start()}catch(d){d.name=="QuotaExceededError"?c.p.reject(new W(2,3,3017,b)):oo(a)?c.p.reject(new W(2,3,3015,d,a.g.error||"No error in the media element",c.uri)):c.p.reject(new W(2,3,3024,b)),Ko(a,b)}}function Mo(a,b){a.ea=b;a.h&&(a.h.l=b)}
function yo(a,b,c,d,e){if(ue(a.D.get(e))!="mp4")return c;var f=d===null,g=a.Qa.get(e),h=a.R.Hh(),k=!1;d&&d.oa&&(k=d.oa.encrypted);d=d?d.Ia()[0]:null;var l=T();a.B.correctEc3Enca&&f&&e==="audio"&&(c=An(c));a.B.insertFakeEncryptionInInit&&g&&l.Pc(h,e)&&(f?c=Bn(b,c,d):!k&&l.yg(e)&&(c=Dn(c)));f&&l.hf()&&(c=Gn(c));return c}
function No(a,b,c,d){return vo(a,b,function(){if(b!==uc){a.D.get(b);if(Ec()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.B.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.D.set(b,c)}no(a,b)}},null)}
function Oo(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,x,A,D,G;return F(function(H){if(H.g==1){if(a.F||a.N)return H.return();c=wc;a.F=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.Ya=!0);a.ub&&(a.g.autoplay=!1);H.l=0;H.j=2;a.u.Xa();f=t(a.j.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=t(a.l.values());for(l=k.next();!l.done;l=k.next()){m=l.value;try{a.i.removeSourceBuffer(m)}catch(B){}}a.j.clear();a.l.clear();n=a.i.duration;a.M=new ii;a.i=co(a,a.M);return C(H,a.M,4)}if(H.g!=
2){!isNaN(n)&&n?a.i.duration=n:!isNaN(a.wa)&&a.wa&&(a.i.duration=a.wa);q=new ii;r=a.i.sourceBuffers;u=b.size;v=0;w=function(){v++;v===u&&(q.resolve(),a.u.cb(r,"addsourcebuffer",w))};a.u.G(r,"addsourcebuffer",w);z=t(b.keys());for(x=z.next();!x.done;x=z.next())A=x.value,D=b.get(A),ko(a,A,D,D.codecs);(G=b.get(c.Y))&&G.isAudioMuxedInVideo&&(a.m=!0);a.m&&!a.o.has(c.Y)&&a.o.set(c.Y,[]);a.g.currentTime=d;return C(H,q,2)}va(H);a.F=!1;Bm(a.L);a.u.Ma(a.g,"canplaythrough",function(){a.L.g||(a.g.autoplay=e,a.Ya&&
(a.Ya=!1,a.g.play()))});return wa(H,0)})}function Po(a,b){return Ho(a,function(){return Oo(a,b)})}function Qo(a,b,c,d){var e=!1,f=sc("audio",(d||"").split(",")),g=sc("video",(d||"").split(",")),h=g;b=="audio"&&(h=f);h||(h=d);d=qe(c,h);var k=ye(a.D.get(b)),l=a.B.forceTransmux;!Cc(d)||!a.J&&re.includes(d)?l=!0:l||c==k||(l=!T().pe()&&re.includes(c));if(l&&(a=se(c,h),c=je(a))){var m=c();f&&g&&(e=!0);d=m.convertCodecs(b,a)}b=ve(ze(d));return{zb:m,Xi:e,Hf:ye(d),codec:b,mimeType:d}}
function Ro(a,b,c,d,e){if(b==uc)return{type:So,ce:c,zb:null};var f=ve(ze(a.D.get(b))),g=ye(a.D.get(b)),h=Qo(a,b,c,d),k=h.zb,l=h.Xi,m=h.Hf,n=h.codec;h=h.mimeType;var q=!0;l&&a.D.has("audio")&&(c=Qo(a,"audio",c,d),d=ve(ze(a.D.get("audio"))),q=ye(a.D.get("audio")),q=d==c.codec&&q==c.Hf,c.zb&&c.zb.destroy());if(f===n&&g===m&&q)return{type:So,ce:h,zb:k};f=!0;if(a.m&&!e.has("audio")||l&&k&&!a.j.has(b))f=!1;if(f&&a.B.codecSwitchingStrategy==="smooth"&&Ec())return{type:To,ce:h,zb:k};k&&k.destroy();return{type:Uo,
ce:h,zb:null}}function Eo(a,b,c,d,e){var f,g,h,k,l,m;return F(function(n){if(n.g==1){f=wc;g=Ro(a,b,c,d,e);h=g.type;k=g.zb;l=g.ce;if(m=e.get(f.Y))a.m=m.isAudioMuxedInVideo;if(h==So)return a.j.has(b)&&!k?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&k?a.j.set(b,k):k&&(a.j.has(b)&&a.j.get(b).transmux!==k.transmux?(a.j.get(b).destroy(),a.j.set(b,k)):k.destroy()),n.return(!1);if(h==To)return C(n,No(a,b,l,k),3);if(h!=Uo)return n.A(3);k&&k.destroy();return C(n,Po(a,e),3)}return n.return(!0)})}
function Vo(a,b,c,d,e){a=Ro(a,b,c,d,e);a.zb&&a.zb.destroy();return a.type==Uo}var fo=window.URL.createObjectURL,mo="sequence",So="none",Uo="reset",To="changeType";function Wo(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Pd();this.h=new Oe(function(){b.g.mg(b.i*.25)})}Wo.prototype.release=function(){this.set(this.dc());this.h&&(this.h.stop(),this.h=null);this.g=null};Wo.prototype.set=function(a){this.i=a;Xo(this)};Wo.prototype.dc=function(){return this.g.dc()};function Xo(a){a.h.stop();var b=a.j?0:a.i;if(b>=0)try{a.g.Pd()!=b&&a.g.qf(b);return}catch(c){}a.h.Ba(.25);a.g.Pd()!=0&&a.g.qf(0)};function Yo(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Zo.value().get(b),c.Ma(a,b,d))}var Zo=new jb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function $o(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){e.l==null&&(e.l=d());return e.l};this.o=!1;this.h=new eb;this.i=new ap(a);Yo(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){bp(e,e.j())})}$o.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i!=null&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function cp(a){return a.o?a.g.currentTime:a.j()}
function dp(a,b){a.g.readyState>0?ep(a.i,b):Yo(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){bp(a,a.j())})}function bp(a,b){Math.abs(a.g.currentTime-b)<.001?fp(a):(a.h.Ma(a.g,"seeking",function(){fp(a)}),ep(a.i,a.g.currentTime&&a.g.currentTime!=0?a.g.currentTime:b))}function fp(a){a.o=!0;a.h.G(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
function ap(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Oe(function(){b.i<=0?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}ap.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function ep(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ba(.1)};function gp(a){this.g=a;this.i=!1;this.h=null;this.j=new eb}p=gp.prototype;p.ready=function(){function a(){if(b.h==null||b.h==0&&b.g.duration!=Infinity)b.i=!0;else{var c=b.g.currentTime,d=null;if(typeof b.h==="number")d=b.h;else if(b.h instanceof Date){var e=hp(b);e!==null&&(d=b.h.getTime()/1E3-e,d=ip(b,d))}d==null?b.i=!0:(d<0&&(d=Math.max(0,c+d)),c!=d?(b.j.Ma(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;Yo(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.ye=function(a){this.h=this.i?this.h:a};p.Fd=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(hp(this)||0),a=ip(this,a));return a||0};p.Cf=function(){return 0};p.Af=function(){return 0};p.Bf=function(){return!1};p.og=function(){};p.cg=function(){var a=Jn(this.g.buffered);return a!=null&&a>=this.g.duration-1};
function hp(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null}function ip(a,b){a=a.g.seekable;a.length>0&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
function jp(a,b,c,d,e,f){var g=this;this.h=a;this.g=b.presentationTimeline;this.l=c;this.u=e;this.o=null;this.i=new On(a,b.presentationTimeline,c,f);this.j=new $o(a,function(){a:{var h=g.i;h.m=!0;h.B=!1;h.i&&h.i.Ba(h.h.gapJumpTimerTime);Qn(h);var k=cp(g.j);h=kp(g,k);if(!Fc()&&Math.abs(h-k)>.001){k=!1;var l=T().Cg();if(l){var m=Date.now()/1E3;if(!g.o||g.o<m-l)g.o=m,k=!0}else k=!0;if(k){dp(g.j,h);h=void 0;break a}}g.u();h=void 0}return h},function(h){var k=g.i;k.g.seeking&&!k.m&&(k.m=!0,k.l=h);k.i&&
k.i.Ba(k.h.gapJumpTimerTime);Qn(k)},function(){return lp(g,d)});this.m=new Oe(function(){if(g.h.readyState!=0&&!g.h.paused){var h=cp(g.j),k=g.g.qb(),l=g.g.ab();l-k<3&&(k=l-3);h<k&&(h=kp(g,h),g.h.currentTime=h)}})}p=jp.prototype;p.ready=function(){this.m.Ba(.25)};p.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.m&&(this.m.stop(),this.m=null);this.h=this.j=this.g=this.l=null;this.u=function(){}};p.ye=function(a){dp(this.j,lp(this,a))};
p.Fd=function(){var a=cp(this.j);return this.h.readyState>0&&!this.h.paused?mp(this,a):a};p.Cf=function(){return this.i.H};p.Af=function(){return this.i.F};p.Bf=function(){return this.i.C};function lp(a,b){b==null?b=a.g.getDuration()<Infinity?a.g.qb():a.g.ab():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):b<0&&(b=a.g.ab()+b);return np(a,mp(a,b))}p.og=function(){this.i.ge()};p.cg=function(){if(this.g.U()){var a=this.g.Tb(),b=Jn(this.h.buffered);if(b!=null&&b>=a)return!0}return!1};
function np(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function kp(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.qb(),f=a.g.ab(),g=a.g.getDuration();f-e<3&&(e=f-3);var h=a.g.dd(c),k=a.g.dd(d);c=a.g.dd(c+d);return b>=g?np(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?a.g.U()&&a.l.returnToEndOfLiveWindowWhenOutside?f-a.l.safeSeekEndOffset:Kn(a.h.buffered,k)?k:c:b>=h||Kn(a.h.buffered,b)?b:c}function mp(a,b){var c=a.g.qb();if(b<c)return c;a=a.g.ab();return b>a?a:b};function op(a){var b=this;this.j=a;this.h=new eb;this.g=new Set;this.i=(new Oe(function(){pp(b,!1)})).$b();a.paused||this.i.Ba(.25);this.h.G(a,"playing",function(){b.i.$b().Ba(.25)});this.h.G(a,"pause",function(){b.i.stop()})}op.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function pp(a,b){var c=a.j.currentTime;a=t(a.g);for(var d=a.next();!d.done;d=a.next())d.value.j(c,b)};function qp(a){ri.call(this);this.g=new Map;this.h=a}ma(qp,ri);qp.prototype.release=function(){this.g.clear();ri.prototype.release.call(this)};function rp(a,b){var c=a.g.get(b);c||(c={nd:[],Ke:null,contentType:b},a.g.set(b,c));return c}function sp(a,b,c){var d=rp(a,b.contentType);tp(a,d);a={Ue:b,position:c};d=d.nd;b=d.findIndex(function(e){return e.position>=c});b>=0?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
qp.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.Ke;a:{var e=c.nd;for(var f=e.length-1;f>=0;f--){var g=e[f];if(g.position<=a){e=g.Ue;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&&!bb(d.roles,e.roles);(g||h||d)&&up(this,a,e.contentType)&&(c.Ke=e,d=new qi("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&up(this,a,e.contentType)&&(c.Ke=e,JSON.stringify(e),c=new qi("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function up(a,b,c){return(a=a.h()[c])&&a.length>0&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function tp(a,b){if((a=a.h()[b.contentType])&&a.length>0){var c=a[0].start,d=a[a.length-1].end,e=b.nd;b.nd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.nd=[]};function vp(a){ri.call(this);this.h=new Map;this.i=a;this.g=null}ma(vp,ri);vp.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);ri.prototype.release.call(this)};function wp(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 qi("regionadd",new Map([["region",b]])),a.dispatchEvent(b),xp(a))}
function xp(a){a.g||(a.g=(new Oe(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.endTime<b.start&&(a.h.delete(d),d=new qi("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).Ba(2))};function yp(a,b,c,d,e){function f(g,h){return h.fastSwitching&&g.mc&&g.hd?!1:!0}this.m=a;this.i=b;this.l=c;this.g=new Map;this.j=new Map;this.h=null;this.o=d;this.u=e||f}function zp(a,b){a.l=b;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
function Ap(a,b,c){c=c===void 0?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.h||(a.h=a.i.segmentIndex.pb(b,!0,a.o));if(!a.h)return Promise.resolve();c&&a.h.next();for(b=[];a.g.size<a.m;){c=a.h.next().value;if(!c)break;var d=!0;c.isPreload()&&c.endByte!=null&&(d=!1);c.fc()==2&&(d=!1);c.ec(!1)&&(d=!1);d&&c.oa&&b.push(Bp(a,c.oa));d&&!a.g.has(c)&&(d=new Cp(a.l),b.push(Dp(d,c,a.i)),a.g.set(c,d));if(!a.u(c,a.i))break}Ep(a);return Promise.all(b)}
function Bp(a,b){if(!a.i.segmentIndex||b.ec()||Array.from(a.j.keys()).some(function(e){return Ri(e,b)}))return Promise.resolve();var c=new Cp(a.l),d=Dp(c,b,a.i);a.j.set(b,c);return d}function Fp(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Gp(a,c)}function Hp(a){Fp(a,a.g);Fp(a,a.j);a.h=null}yp.prototype.Ka=function(a,b){b=b===void 0?!1:b;for(var c=t(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Gp(this,d);b&&Ep(this)};
yp.prototype.Tc=function(a){this.o=a;this.h&&this.h.Tc(a)};function Ep(a){if(a.g.size)for(var b=Array.from(a.g.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={Se:void 0},d=c.next())e.Se=d.value,b.some(function(f){return function(g){return Ri(g.oa,f.Se)}}(e))||Gp(a,e.Se)}function Ip(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&Gp(a,d)}Ep(a)}function Jp(a,b){b&&b!==a.i&&(Hp(a),a.i=b)}
function Gp(a,b){var c=a.g;b instanceof Qi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function Cp(a){this.g=a;this.ld=this.wf=null}function Dp(a,b,c){var d=new Uint8Array(0);a.ld=a.g(b,c,function(e){return F(function(f){if(f.g==1)return d.byteLength>0?d=lc(d,e):d=e,a.wf?C(f,a.wf(d),3):f.A(0);d=new Uint8Array(0);E(f)})});return a.ld.promise.catch(function(e){return e instanceof W&&e.code==7001?Promise.resolve():Promise.reject(e)})}Cp.prototype.abort=function(){this.ld&&this.ld.abort()};function Kp(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.M=new Map;this.C=1;this.B=this.o=null;this.X=0;this.h=new Map;this.N=!1;this.Z=null;this.D=!1;this.l=new Am(function(){return Lp(c)});this.T=Date.now()/1E3;this.m=new Map;this.W={projection:null,hfov:null};this.ea=0;this.ba=Infinity;this.H=null;this.R=[];this.u=new Oe(function(){if(c.j&&c.g)if(c.j.presentationTimeline.U()){var d=c.j.presentationTimeline.qb(),e=c.j.presentationTimeline.ab();e-d>1?Io(c.g.S,d,e):Jo(c.g.S)}else Jo(c.g.S),
c.u&&c.u.stop();else c.u&&c.u.stop()});this.J=null;this.K=!1;this.L=new Oe(function(){var d=c.g.video;!d.ended&&c.J&&(c.K=!0,d.currentTime=c.J,c.J=null)});this.F=new eb}p=Kp.prototype;p.destroy=function(){return this.l.destroy()};
function Lp(a){var b,c,d,e,f,g,h;return F(function(k){if(k.g==1){a.u&&a.u.stop();a.u=null;a.L&&a.L.stop();a.L=null;a.F&&(a.F.release(),a.F=null);b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,Mp(e),b.push(Np(e)),e.V&&(Hp(e.V),e.V=null);f=t(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,Hp(h);return C(k,Promise.all(b),2)}a.h.clear();a.m.clear();a.g=null;a.j=null;a.i=null;a.J=null;E(k)})}
p.configure=function(a){this.i=a;this.Z=new fi({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.h.get("audio");b&&b.V&&(Hp(b.V),b.V=null);b=t(this.m.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Hp(this.m.get(c)),this.m.delete(c)}a.disableTextPrefetch&&(b=this.h.get(uc))&&
b.V&&(Hp(b.V),b.V=null);a.disableVideoPrefetch&&(b=this.h.get("video"))&&b.V&&(Hp(b.V),b.V=null);b=t(this.h.keys());for(c=b.next();!c.done;c=b.next())c=this.h.get(c.value),c.V?(Ip(c.V,a.segmentPrefetchLimit),a.segmentPrefetchLimit>0||(Hp(c.V),c.V=null)):a.segmentPrefetchLimit>0&&(c.V=Op(this,c.stream));a.disableAudioPrefetch||Pp(this)};function Qp(a,b,c){a.j.presentationTimeline.U()||(a.ea=b,a.ba=c)}
p.start=function(a){var b=this;return F(function(c){if(c.g==1)return C(c,Rp(b,a||new Map),2);Bm(b.l);b.N=!0;E(c)})};function Sp(a,b){var c,d,e,f,g,h,k;F(function(l){switch(l.g){case 1:return c=wc,a.X++,d=a.X,sa(l,2),C(l,Co(a.g.S,c.Ja),4);case 4:ta(l,3);break;case 2:if(e=ua(l),a.g)a.g.onError(e);case 3:f=qe(b.mimeType,b.codecs),lo(a.g.S,f,a.j.sequenceMode,b.external),g=a.g.S.ea,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.X==d&&(k=Tp(a,b),a.h.set(c.Ja,k),Up(a,k,0)),E(l)}})}
function Vp(a){var b=a.h.get(uc);b&&(Mp(b),Np(b).catch(function(){}),a.H=a.h.get(uc),a.h.delete(uc),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.B=null}
function Wp(a,b){for(var c=a.g.ib()<0,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ia&&e.ia.Tc(c),e.V&&e.V.Tc(c);d=t(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.Tc(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Wb&&(Xp(a,b,!1,0,!1),c.Wb=d);else if(b=c.Wb)c.Wb=null,Xp(a,b,!0,0,!1)}
function Yp(a,b,c,d,e,f){c=c===void 0?!1:c;d=d===void 0?0:d;e=e===void 0?!1:e;f=f===void 0?!1:f;a.o=b;a.N&&(b.video&&Xp(a,b.video,c,d,e,f),b.audio&&Xp(a,b.audio,c,d,e,f))}function Zp(a,b){F(function(c){if(c.g==1)return a.H=null,a.B=b,a.N?b.segmentIndex?c.A(2):C(c,b.createSegmentIndex(),2):c.return();Xp(a,b,!0,0,!1);E(c)})}function $p(a){var b=a.h.get(uc);b&&Xp(a,b.stream,!0,0,!0)}
function aq(a,b){for(var c=t(a.M.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.M.delete(d))}}
function Xp(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=uc?g&&(g.Wb&&(b.trickModeVideo?(g.Wb=b,b=b.trickModeVideo):g.Wb=null),g.stream!=b||e)&&(a.m.has(b)?g.V=a.m.get(b):g.V&&Jp(g.V,b),b.type==uc&&g.stream!=b&&(e=qe(b.mimeType,b.codecs),lo(a.g.S,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.ya?(e="("+g.type+":"+g.stream.id+")",a.M.has(e)||a.M.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,
g.stream=b,g.ia=null,g.Ee=!!f,b.dependencyStream?g.Qb=Tp(a,b.dependencyStream):g.Qb=null,bq(a),e&&(g.Sa=null,g.Ib=null,g.Hb=null,b.isAudioMuxedInVideo&&(b=null,g.type==="video"?b=a.h.get("audio"):g.type==="audio"&&(b=a.h.get("video")),b&&(Np(b).catch(function(){}),b.Sa=null,b.Ib=null,b.Hb=null,cq(a,b),dq(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.ob?g.Vc=!0:g.ya?(g.Bb=!0,g.Ac=d,g.Vc=!0):(Mp(g),eq(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.ya||g.Ua||Up(a,g,0),dq(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
Sp(a,b)}
function dq(a,b){var c,d,e;return F(function(f){if(f.g==1){if(!b.Ea)return f.return();c=b.stream;d=b.Ea;return c.segmentIndex?f.A(2):C(f,c.createSegmentIndex(),2)}if(f.g!=4)return e=c.dependencyStream,!e||e.segmentIndex?f.A(4):C(f,e.createSegmentIndex(),4);if(b.Ea!=d||b.stream!=c)return f.return();var g=a.g.Eb();var h=ro(a.g.S,b.type),k=b.stream.segmentIndex.find(b.Aa?b.Aa.endTime:g),l=k==null?null:b.stream.segmentIndex.get(k);k=l?Ti(l):null;l&&!k&&(k=(l.endTime-l.getStartTime())*(b.stream.bandwidth||a.o.bandwidth)/
8);k?((l=l.oa)&&(k+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=a.g.getBandwidthEstimate(),g=k*8/l<(h||0)-g-a.i.rebufferingGoal||b.Ea.h.g>k?!0:!1):g=!0;g&&b.Ea.abort();E(f)})}
p.sc=function(){if(this.g){for(var a=this.g.Eb(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e;if(e=!this.K)e=this.g.S,d==uc?(e=e.h,e=e.g==null||e.h==null?!1:a>=e.g&&a<e.h):(e=qo(e,d),e=Kn(e,a)),e=!e;if(e){this.T=0;c.V&&(c.V.h=null);if(c.type==="audio"){e=t(this.m.values());for(var f=e.next();!f.done;f=e.next())f.value.h=null}c.ia=null;(ro(this.g.S,d)!=null||c.ya)&&cq(this,c);c.Ea&&(c.Ea.abort(),c.Ea=null);d===uc&&(d=this.g.S,d.K&&d.K.j());c.sc=!0}!this.K||
c.ob||c.ya||c.Ua||Up(this,c,0)}fq(this)&&gq(this)}};function cq(a,b){b.ob||b.Bb||(b.ya?(b.Bb=!0,b.Ac=0):po(a.g.S,b.type)==null?b.Ua==null&&Up(a,b,0):(Mp(b),eq(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function Rp(a,b){var c,d,e,f,g,h,k,l;return F(function(m){if(m.g==1){if(!a.o)throw new W(2,5,5006);c=hq(a,!0);d=a.g.S;return C(m,d.init(c,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}Bm(a.l);a.updateDuration();e=t(c.keys());for(f=e.next();!f.done;f=e.next())g=f.value,h=c.get(g),a.h.has(g)||(k=Tp(a,h),b.has(h.id)&&(l=b.get(h.id),zp(l,function(n,q,r){return iq(n,q,r||null,a.i.retryParameters,a.g.lc)}),k.V=l),a.h.set(g,k),Up(a,k,0));bq(a);E(m)})}
function Tp(a,b){var c={stream:b,type:b.type,ia:null,V:Op(a,b),Aa:null,Sa:null,Zd:null,Ib:null,Hb:null,Xd:null,Yd:null,Wb:null,endOfStream:!1,ya:!1,Ua:null,Bb:!1,Ac:0,Vc:!1,ob:!1,sc:!0,Ee:!1,ef:!1,ed:!1,Ea:null,Qb:null};b.dependencyStream&&(c.Qb=Tp(a,b.dependencyStream));return c}
function Op(a,b){if(b.type==="video"&&a.i.disableVideoPrefetch||b.type==="audio"&&a.i.disableAudioPrefetch||b.type===uc&&(b.mimeType=="application/cea-608"||b.mimeType=="application/cea-708")||b.type===uc&&a.i.disableTextPrefetch)return null;if(a.m.has(b))return a.m.get(b);var c=a.h.get(b.type);return(c=c&&c.V)&&b===c.i?c:a.i.segmentPrefetchLimit>0?new yp(a.i.segmentPrefetchLimit,b,function(d,e,f){return iq(d,e,f||null,a.i.retryParameters,a.g.lc)},a.g.ib()<0,a.g.Vi):null}
function Pp(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={fb:void 0},e=d.next())if(f.fb=e.value,f.fb.audio)if(a.m.has(f.fb.audio)){if(e=a.m.get(f.fb.audio),Ip(e,b),!(b>0&&c.some(function(h){return function(k){return Ue(h.fb.audio.language,k)}}(f)))){var g=a.h.get(f.fb.audio.type);e!==(g&&g.V)&&Hp(e);a.m.delete(f.fb.audio)}}else b<=0||!c.some(function(h){return function(k){return Ue(h.fb.audio.language,k)}}(f))||!(e=Op(a,f.fb.audio))||
(f.fb.audio.segmentIndex||f.fb.audio.createSegmentIndex(),a.m.set(f.fb.audio,e))}p.updateDuration=function(){var a=Fc(),b=this.j.presentationTimeline.getDuration();b<Infinity?(a&&(this.u&&this.u.stop(),Jo(this.g.S)),this.g.S.Mb(b)):a?(this.u&&this.u.Ba(.5),this.g.S.Mb(Infinity)):this.g.S.Mb(4294967296)};
function jq(a,b){var c,d,e,f,g,h,k,l,m;return F(function(n){switch(n.g){case 1:Bm(a.l);c=wc;if(b.ya||b.Ua==null||b.ob)return n.return();b.Ua=null;if(!b.Bb){n.A(2);break}return C(n,eq(a,b,b.Vc,b.Ac),3);case 3:return n.return();case 2:aq(a,b);if(b.stream.segmentIndex){n.A(4);break}d=b.stream;sa(n,5);return C(n,b.stream.createSegmentIndex(),7);case 7:ta(n,6);break;case 5:return e=ua(n),C(n,kq(a,b,e),8);case 8:return n.return();case 6:if(d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.ya||
b.Ua||Up(a,b,0),n.return();case 4:if(!b.Qb){n.A(9);break}if(b.Qb.stream.segmentIndex){n.A(9);break}sa(n,11);return C(n,b.Qb.stream.createSegmentIndex(),13);case 13:ta(n,9);break;case 11:ua(n);case 9:sa(n,14);f=lq(a,b);f!=null&&(Up(a,b,f),b.ed=!1);ta(n,15);break;case 14:return g=ua(n),C(n,kq(a,b,g),16);case 16:return n.return();case 15:if(b.type===c.Ja)return n.return();h=[b];k=b.type===c.Y?c.sa:c.Y;(l=a.h.get(k))&&h.push(l);if(!a.N||!h.every(function(q){return q.endOfStream})){n.A(0);break}return C(n,
a.g.S.endOfStream(),18);case 18:Bm(a.l),m=a.g.S.getDuration(),m!=0&&m<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.Mb(m),E(n)}})}
function lq(a,b){if(mq(b))return zo(a.g.S,b.stream.originalId||""),null;b.type==uc&&Ao(a.g.S);if(b.stream.isAudioMuxedInVideo&&b.type=="audio")return null;if(b.type!=uc&&jo(a.g.S))return nq(a,!0),null;var c=a.i.updateIntervalSeconds/Math.max(1,Math.abs(a.g.ib()));if(!oo(a.g.S)&&b.type!=uc)return c/2;var d=a.g.Eb();if(b.type==="audio")for(var e=t(a.m.keys()),f=e.next();!f.done;f=e.next())f=a.m.get(f.value),f.Ka(d,!0),Ap(f,d);e=b.Aa?b.Aa.endTime:d;var g=so(a.g.S,b.type,d);f=Math.max(1,Math.max(a.i.rebufferingGoal,
a.i.bufferingGoal)*a.C);var h=a.j.presentationTimeline.getDuration()-e,k=ro(a.g.S,b.type);if(h<1E-6&&k)return b.endOfStream=!0,b.type=="video"&&(a=a.h.get(uc))&&mq(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.ia;k=oq(a,b,d,k);if(!k)return c;g=b.Sa;var l=k.oa;g&&l&&Ri(l,g)&&(g.g=l.g);g=!1;h&&b.Ee&&(g=!0,b.Ee=!1);h=Infinity;l=Array.from(a.h.values());l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,mq(m)||m.ia&&!m.ia.current()||(h=Math.min(h,m.Aa?m.Aa.endTime:d));if(e>=
h+a.j.presentationTimeline.h)return c;b.V&&b.ia&&!a.m.has(b.stream)&&(b.V.Ka(k.startTime+.001),Ap(b.V,k.startTime).catch(function(){}));if(fq(a)&&pq(a,b,k))return null;qq(a,b,d,k,g).catch(function(){});b.Qb&&rq(a,b.Qb,d,f);return null}
function oq(a,b,c,d){if(b.ia)return(c=b.ia.current())&&b.Aa&&Math.abs(b.Aa.startTime-c.startTime)<.001&&(c=b.ia.next().value),c;if(b.Aa||d)return c=b.Aa?b.Aa.endTime:d,a=a.g.ib()<0,b.stream.segmentIndex&&(b.ia=b.stream.segmentIndex.pb(c,!1,a)),b.ia&&b.ia.next().value;d=a.j.sequenceMode||fq(a)?0:a.i.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=a.g.ib()<0;var f=null;d&&(b.stream.segmentIndex&&(b.ia=b.stream.segmentIndex.pb(e,!1,a)),f=b.ia&&b.ia.next().value);f||(b.stream.segmentIndex&&(b.ia=
b.stream.segmentIndex.pb(c,!1,a)),f=b.ia&&b.ia.next().value);return f}
function qq(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,v,w,z,x,A,D,G,H;return F(function(B){switch(B.g){case 1:f=wc;g=b.stream;h=b.ia;b.ya=!0;sa(B,2);if(d.fc()==2)throw new W(1,1,1011);return C(B,sq(a,b,d,e),4);case 4:Bm(a.l);if(a.D)return B.return();k=g.mimeType=="video/mp4"||g.mimeType=="audio/mp4";l=window.ReadableStream;if((m=a.i.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&(a.j.type!="HLS"||d.u))return r=new Uint8Array(0),v=u=!1,z=function(I){var O,N,P,J;return F(function(L){switch(L.g){case 1:if(u)return L.return();
v=!0;Bm(a.l);if(a.D)return L.return();sa(L,2);r=lc(r,I);O=!1;N=0;(new Pg).box("mdat",function(Q){N=Q.size+Q.start;O=!0}).parse(r,!1,!0);if(!O){L.A(4);break}P=r.subarray(0,N);r=r.subarray(N);return C(L,tq(a,b,c,g,d,P,!0,e),5);case 5:b.V&&b.ia&&Ap(b.V,d.startTime,!0);case 4:ta(L,0);break;case 2:w=J=ua(L),E(L)}})},C(B,uq(a,b,d,z),9);n=uq(a,b,d);return C(B,n,7);case 7:q=B.h;Bm(a.l);if(a.D)return B.return();Bm(a.l);return b.Bb?(b.ya=!1,Up(a,b,0),B.return()):C(B,tq(a,b,c,g,d,q,!1,e),6);case 9:x=B.h;if(w)throw w;
if(v){B.A(10);break}u=!0;Bm(a.l);return a.D?B.return():b.Bb?(b.ya=!1,Up(a,b,0),B.return()):C(B,tq(a,b,c,g,d,x,!1,e),10);case 10:b.V&&b.ia&&Ap(b.V,d.startTime,!0);case 6:Bm(a.l);if(a.D)return B.return();b.Aa=d;h.next();b.ya=!1;b.ef=!1;A=a.g.S.Sb();D=A[b.type];Xa(JSON.stringify(D));b.Bb||(G=null,b.type===f.sa?G=a.h.get(f.Y):b.type===f.Y&&(G=a.h.get(f.sa)),G&&G.type==f.Y?a.g.ge(d,b.stream,G.stream.isAudioMuxedInVideo):a.g.ge(d,b.stream,b.stream.codecs.includes(",")));Mp(b);Up(a,b,0);ta(B,0);break;case 2:H=
ua(B);Bm(a.l,H);if(a.D)return B.return();b.ya=!1;if(H.code==7001)b.ya=!1,Mp(b),Up(a,b,0),B.A(0);else if(b.type==f.Ja&&a.i.ignoreTextStreamFailures)a.h.delete(f.Ja),B.A(0);else{if(H.code==3017)return C(B,vq(a,b,H),0);b.ed=!0;H.category==1&&b.V&&Gp(b.V,d);H.severity=2;return C(B,kq(a,b,H),0)}}})}
function rq(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return F(function(v){switch(v.g){case 1:e=b.stream;for(h=(g=(f=e.segmentIndex)&&f.pb(c))&&g.next().value;h&&a.R.includes(h.startTime);)h=g&&g.next().value;if(!h){v.A(0);break}k=h.oa;if(!k||Ri(k,b.Sa)){v.A(3);break}b.Sa=k;sa(v,4);return C(v,uq(a,b,k),6);case 6:l=v.h;var w=a.g.S;w.H&&zc(w.H,l,0,e);a.R=[];ta(v,3);break;case 4:throw m=ua(v),b.Sa=null,m;case 3:if(b.Aa&&b.Aa==h){v.A(0);break}b.Aa=h;sa(v,8);return C(v,uq(a,b,h),10);case 10:n=v.h;w=a.g.S;w.H&&
zc(w.H,n,0,e);a.R.push(h.startTime);ta(v,9);break;case 8:throw q=ua(v),b.Aa=null,q;case 9:r=Math.max.apply(Math,[0].concat(y(a.R)));u=a.g.Eb();if(u+d>r)return C(v,rq(a,b,h.startTime,d),0);v.A(0)}})}
function vq(a,b,c){var d,e,f,g,h,k,l,m,n;return F(function(q){switch(q.g){case 1:d=Array.from(a.h.values());if(e=d.some(function(r){return r!=b&&r.ef})){q.A(2);break}if(a.i.avoidEvictionOnQuotaExceededError){f=wq(a,c);if(g=a.g.disableStream(b.stream,f))return q.return();Up(a,b,4);return q.return()}h=Math.round(100*a.C);if(h>20){a.C-=.2;q.A(3);break}if(h>4){a.C-=.04;q.A(3);break}k=wq(a,c);l=a.g.disableStream(b.stream,k);if(!l){b.ed=!0;a.D=!0;a.g.onError(c);q.A(5);break}a.C=1;m=a.g.Eb();return C(q,
xq(a,b,m),5);case 5:return q.return();case 3:return b.ef=!0,n=a.g.Eb(),C(q,xq(a,b,n),2);case 2:Up(a,b,4),E(q)}})}
function sq(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,z,x,A;return F(function(D){switch(D.g){case 1:e=wc;f=b.Aa==null;g=[];h=Math.max(0,Math.max(c.F,a.ea)-.1);k=Math.min(c.D,a.ba)+.1;l=c.codecs||b.stream.codecs;m=xe(l);n=ye(c.mimeType||b.stream.mimeType);q=c.l;if(q==b.Zd&&h==b.Ib&&k==b.Hb&&m==b.Xd&&n==b.Yd){D.A(2);break}r=b.Xd&&b.Yd&&Vo(a.g.S,b.type,n,l,hq(a));if(!r){D.A(3);break}u=null;b.type===e.sa?u=a.h.get(e.Y):b.type===e.Y&&(u=a.h.get(e.sa));if(!u){D.A(3);break}return C(D,Np(u).catch(function(){}),
5);case 5:u.Sa=null,u.Ib=null,u.Hb=null,cq(a,u);case 3:return C(D,yq(a,b,q,h,k,c,m,n),2);case 2:return Ri(c.oa,b.Sa)||(b.Sa=c.oa,c.i&&c.oa&&(v=uq(a,b,c.oa),w=function(){var G,H,B,I,O,N,P,J,L,Q,K;return F(function(M){switch(M.g){case 1:return sa(M,2),C(M,v,4);case 4:return G=M.h,Bm(a.l),H=null,B=new Map,I={projection:null,hfov:null},b.stream&&(O=b.stream.videoLayout)&&(N=O.split("/"),N.includes("PROJ-RECT")?I.projection="rect":N.includes("PROJ-EQUI")?I.projection="equi":N.includes("PROJ-HEQU")?I.projection=
"hequ":N.includes("PROJ-PRIM")?I.projection="prim":N.includes("PROJ-AIV")&&(I.projection="hequ")),P=new Pg,P.box("moov",Ug).box("trak",Ug).box("mdia",Ug).P("mdhd",function(R){H=bh(R.reader,R.version).timescale}).box("hdlr",function(R){R=R.reader;R.skip(8);switch(R.nc()){case "soun":B.set(e.Y,H);break;case "vide":B.set(e.sa,H)}H=null}),b.type!==e.sa||I.projection||P.box("minf",Ug).box("stbl",Ug).P("stsd",Wg).box("encv",Xg).box("avc1",Xg).box("avc3",Xg).box("hev1",Xg).box("hvc1",Xg).box("dvav",Xg).box("dva1",
Xg).box("dvh1",Xg).box("dvhe",Xg).box("dvc1",Xg).box("dvi1",Xg).box("vexu",Ug).box("proj",Ug).P("prji",function(R){R=R.reader.nc();I.projection=R}).box("hfov",function(R){R=R.reader.O()/1E3;I.hfov=R}),P.parse(G,!0,!0),b.type===e.sa&&zq(a,I),B.has(b.type)?c.oa.timescale=B.get(b.type):H!=null&&(c.oa.timescale=H),J=b.stream.segmentIndex,J instanceof ij&&(L=kj(J,c.startTime)),Q=b.stream.closedCaptions&&b.stream.closedCaptions.size>0,C(M,a.g.If(b.type,G),5);case 5:return C(M,uo(a.g.S,b.type,G,null,b.stream,
Q,b.sc,d,!1,!1,L),6);case 6:ta(M,0);break;case 2:throw K=ua(M),b.Sa=null,K;}})},z=c.startTime,f&&(x=ro(a.g.S,b.type),x!=null&&(z=x)),a.g.Ci(z,c.oa),g.push(w()))),A=b.Aa?b.Aa.j:-1,c.j!=A&&g.push(Go(a.g.S,b.type,c.startTime)),C(D,Promise.all(g),0)}})}
function yq(a,b,c,d,e,f,g,h){var k,l,m,n,q;return F(function(r){switch(r.g){case 1:k=wc;l=hq(a);sa(r,2);b.Ib=d;b.Hb=e;g&&(b.Xd=g);h&&(b.Yd=h);b.Zd=c;m=a.j.sequenceMode||a.j.type=="HLS";n=null;b.type===k.sa?n=a.h.get(k.Y):b.type===k.Y&&(n=a.h.get(k.sa));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){r.A(4);break}return C(r,Do(a.g.S,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return C(r,Do(a.g.S,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),6);case 6:ta(r,
0);break;case 2:throw q=ua(r),b.Ib=null,b.Hb=null,b.Xd=null,b.Yd=null,b.Zd=null,q;}})}
function tq(a,b,c,d,e,f,g,h){g=g===void 0?!1:g;h=h===void 0?!1:h;var k,l,m,n,q;return F(function(r){switch(r.g){case 1:return k=d.closedCaptions&&d.closedCaptions.size>0,a.i.shouldFixTimestampOffset&&(l=d.mimeType=="video/mp4"||d.mimeType=="audio/mp4",m=null,e.oa&&(m=e.oa.timescale),(n=l&&m&&d.type==="video"&&a.j.type=="DASH")&&(new Pg).box("moof",Ug).box("traf",Ug).P("tfdt",function(u){var v,w,z,x,A,D;return F(function(G){v=ah(u.reader,u.version);w=v.baseMediaDecodeTime;if(!w)return G.return();z=
-w/m;x=Number(b.Zd)||0;if(!(x<z))return G.A(0);A=b.Ib;D=b.Hb;return C(G,yq(a,b,z,A,D,e),0)})}).parse(f,!1,g)),C(r,xq(a,b,c),2);case 2:return Bm(a.l),q=b.sc,b.sc=!1,C(r,a.g.If(b.type,f),3);case 3:return C(r,uo(a.g.S,b.type,f,e,d,k,q,h,g),4);case 4:Bm(a.l),E(r)}})}
function xq(a,b,c){var d,e,f,g,h,k,l,m,n;return F(function(q){if(q.g==1){d=b.stream.segmentIndex;d instanceof ij&&(d.Ka(a.j.presentationTimeline.Fb()),e=[],jj(d,function(r){e.push(r.Kd())}));f=Math.max(a.i.bufferBehind*a.C,a.j.presentationTimeline.h);g=po(a.g.S,b.type);if(g==null)return a.H==b&&(a.H=null),q.return();h=c-g;k=a.i.evictionGoal;l=a.j.presentationTimeline.qb();m=a.j.presentationTimeline.ab();n=h-f;m-l>k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():C(q,a.g.S.remove(b.type,g,g+n,e),2)}if(q.g!=
4)return Bm(a.l),a.H?C(q,xq(a,a.H,c),4):q.A(0);Bm(a.l);E(q)})}function mq(a){return a&&a.type==uc&&(a.stream.mimeType=="application/cea-608"||a.stream.mimeType=="application/cea-708")}
function uq(a,b,c,d){var e,f,g,h,k;return F(function(l){switch(l.g){case 1:if(e=c.ec())return l.return(e);f=null;if(b.V){var m=b.V,n=m.g;c instanceof Qi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.wf=d),f=m.ld):f=null}f||(f=iq(c,b.stream,d||null,a.i.retryParameters,a.g.lc));g=0;b.ia&&(g=b.ia.h);b.Ea=f;return C(l,f.promise,2);case 2:h=l.h;b.Ea=null;k=h.data;if(!c.aesKey){l.A(3);break}return C(l,Sj(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
function iq(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a instanceof X?a:void 0,h=g?1:0;a=Zj(a.Ia(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(Fi,a,{type:h,stream:b,segment:g,isPreload:f})}
function eq(a,b,c,d){var e,f;return F(function(g){if(g.g==1)return b.Bb=!1,b.Vc=!1,b.Ac=0,b.ob=!0,b.Aa=null,b.ia=null,b.V&&!a.m.has(b.stream)&&Hp(b.V),d?(e=a.g.Eb(),f=a.g.S.getDuration(),C(g,a.g.S.remove(b.type,e+d,f),3)):C(g,Co(a.g.S,b.type),4);if(g.g!=3)return Bm(a.l),c?C(g,a.g.S.flush(b.type),3):g.A(3);Bm(a.l);b.ob=!1;b.endOfStream=!1;b.ya||b.Ua||Up(a,b,0);E(g)})}
function Up(a,b,c){var d=b.type;if(d!=uc||a.h.has(d))b.Ua=(new Ne(function(){var e;return F(function(f){if(f.g==1)return sa(f,2),C(f,jq(a,b),4);if(f.g!=2)return ta(f,0);e=ua(f);if(a.g)a.g.onError(e);E(f)})})).ka(c)}function Mp(a){a.Ua!=null&&(a.Ua.stop(),a.Ua=null)}function Np(a){return F(function(b){return a.Ea?C(b,a.Ea.abort(),0):b.A(0)})}
function kq(a,b,c){var d;return F(function(e){if(e.g==1)return c.code==3024?(b.ya=!1,Mp(b),Up(a,b,0),e.return()):C(e,hi(a.Z),2);Bm(a.l);if(c.category===1&&c.code!=1003){if(b.Wb)return Wp(a,!1),e.return();d=wq(a,c);c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||c.code!=1011)a.g.onError(c);c.handled||a.i.failureCallback(c);E(e)})}function wq(a,b){return a.i.maxDisabledTime===0&&b.code==1011?1:a.i.maxDisabledTime}
function nq(a,b){b=b===void 0?!1:b;var c,d,e,f,g,h;return F(function(k){if(k.g==1){c=Date.now()/1E3;d=a.i.minTimeBetweenRecoveries;if(!b){if(!a.i.allowMediaSourceRecoveries||c-a.T<d)return k.return(!1);a.T=c}e=wc;if(f=a.h.get(e.Y))Mp(f),f.Ea&&(f.Ea.abort(),f.Ea=null),f.Sa=null,f.Ib=null,f.Hb=null,f.ya=!1,f.Bb=!1,f.Ac=0,f.Vc=!1,f.ob=!1,f.ia&&f.ia.jf();if(g=a.h.get(e.sa))Mp(g),g.Ea&&(g.Ea.abort(),g.Ea=null),g.Sa=null,g.Ib=null,g.Hb=null,g.ya=!1,g.Bb=!1,g.Ac=0,g.Vc=!1,g.ob=!1,g.ia&&g.ia.jf();h=a.g.video.paused;
return C(k,Po(a.g.S,hq(a)),2)}!g||g.ob||g.ya||g.Ua||Up(a,g,0);!f||f.ob||f.ya||f.Ua||Up(a,f,0);h||a.g.video.play();return k.return(!0)})}function zq(a,b){if(a.W.projection!=b.projection||a.W.hfov!=b.hfov){if(b.projection!=null||b.hfov!=null){var c=(new Map).set("detail",b);c=new qi("spatialvideoinfo",c)}else c=new qi("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.W=b}}
function fq(a){if(a.i.crossBoundaryStrategy!=="keep")return!0;var b=T();if(!Ec()||!b.Zb()){b=t(a.h.keys());for(var c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==wc.Ja&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1)return!0}else if(!b.pe())for(b=t(a.h.keys()),c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==wc.Ja&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1){a=new Set;b=t(c.fullMimeTypes);for(c=b.next();!c.done;c=b.next())a.add(ue(c.value));return a.size>
1}return!1}function bq(a){a.F.Xa();fq(a)&&(a.F.G(a.g.video,"waiting",function(){return gq(a)}),a.F.G(a.g.video,"timeupdate",function(){return gq(a)}))}function gq(a){if(fq(a)){a.L.stop();var b=a.g.Eb(),c=a.h.get("video")||a.h.get("audio");c&&(c=c.Sa)&&c.g!==null&&(b=c.g-b,b<0||b>1||(a.J=c.g+.1,a.L.ka(b)))}}
function pq(a,b,c){if(b.type===uc)return!1;var d=b.Sa;if(!d)return!1;var e=c.oa;c=d.g!==e.g;a.i.crossBoundaryStrategy==="reset_to_encrypted"&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.i.crossBoundaryStrategy="keep"));a.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&d.encrypted==e.encrypted&&(c=!1);if(a.i.crossBoundaryStrategy==="keep"&&d.mimeType&&e.mimeType){var f=ve(ze(d.mimeType)),g=ve(ze(d.mimeType));d.mimeType==e.mimeType&&f==g&&(c=!1)}c&&(a.K||b.sc)&&(a.K=!1,nq(a,!0).then(function(){var h=
(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.g.onEvent(new qi("boundarycrossed",h))}));return c}function hq(a,b){function c(f){if(f.fullMimeTypes&&f.fullMimeTypes.size>1&&a.h.has(f.type)){var g=a.h.get(f.type),h=ro(a.g.S,g.type),k=a.g.Eb();(g=oq(a,g,k,h))&&g.codecs&&g.mimeType&&(f.codecs=g.codecs,f.mimeType=g.mimeType)}}b=b===void 0?!1:b;var d=new Map,e=a.o.audio;e&&(c(e),d.set("audio",e));if(e=a.o.video)c(e),d.set("video",e);b&&a.B&&d.set(uc,a.B);return d};function Aq(){this.g=null;this.h=[]}function Bq(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 Cq(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 Dq(){this.i=this.h=null;this.g=[]}function Eq(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 Fq(){this.C=this.Z=NaN;this.l="";this.j=this.hg=this.u=this.B=this.L=this.D=this.o=this.m=this.K=this.F=this.i=this.W=this.X=this.N=this.R=this.T=NaN;this.M=0;this.H=this.J=NaN;this.g=new Aq;this.h=new Dq}function Gq(a,b,c){a.T=b;a.R=c}function Hq(a,b,c){a.Z=b;a.C=c}function Iq(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function Jq(a,b){a.j=isNaN(a.j)?b:a.j+b}
function Kq(a){var b=a.Z,c=a.C,d=a.l,e=a.B,f=a.R,g=a.T,h=a.N,k=a.X,l=a.W,m=a.u,n=a.i,q=a.F,r=a.K,u=a.m,v=Bq(a.g,"playing"),w=Bq(a.g,"paused"),z=Bq(a.g,"buffering"),x=a.o,A=a.D,D=a.L,G=a.hg,H=a.j,B=a.M,I=a.J,O=a.H,N=Cq(a.g),P=[];a=t(a.h.g);for(var J=a.next();!J.done;J=a.next())J=J.value,P.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.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:v,pauseTime:w,bufferingTime:z,licenseTime:x,liveLatency:A,maxSegmentDuration:D,manifestSizeBytes:G,bytesDownloaded:H,nonFatalErrorCount:B,manifestPeriodCount:I,manifestGapCount:O,stateHistory:N,switchHistory:P}};function Lq(a,b,c,d){ri.call(this);this.N=a;this.X=b;this.Ca=d.networkingEngine;this.l=c;this.B=null;this.xa=0;this.Qa=d.Ld;this.F=d.ri;this.Ra=d.si;this.g=d.config;this.j=this.H=this.h=null;this.ra=!1;this.J=d.Hi;this.va=!1;this.i=null;this.ea=!1;this.o=null;this.M=new Map;this.wa=!1;this.Fa=d.Gi;this.Z=new Fq;this.ma=new ii;this.u=new ii;this.R=null;this.C=!1;this.ba=d.fh;this.W=this.m=null;this.T=!1;this.L=[];this.K=[];this.D=!0}ma(Lq,ri);function Mq(a,b,c){(a=b?a.K:a.L)?a.push(c):c()}
function Nq(a){if(a.K)for(var b=t(a.K),c=b.next();!c.done;c=b.next())c=c.value,c();a.K=null}function Oq(a,b){a.R=b;a.T=!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=Lq.prototype;p.getStartTime=function(){return this.l};p.Nd=function(){return this.N};p.Oe=function(){return this.h};function Pq(a){a.va=!0;return a.J}p.getStats=function(){return this.Z};function Qq(a){a.ea=!0;return a.i}p.Rh=function(){return this.m?xf(this.m):null};
p.Qh=function(){return this.W?yf(this.W):null};function Rq(a){a.wa=!0;return a.M}
p.start=function(){var a=this;(function(){var b;return F(function(c){switch(c.g){case 1:return C(c,Promise.resolve(),2);case 2:return sa(c,3),C(c,Sq(a),5);case 5:Tq(a);if("webkit"===window.shakaMediaKeysPolyfill){c.A(6);break}return C(c,Uq(a),7);case 7:Tq(a);case 6:if(!a.ba){c.A(8);break}return C(c,Vq(a),9);case 9:Tq(a);case 8:if(!a.ba||!a.i){c.A(10);break}return C(c,nn(a.i),11);case 11:Tq(a);case 10:a.u.resolve();ta(c,0);break;case 3:b=ua(c),b instanceof W&&(b.code==7001||b.code==7003)||a.u.reject(b),
E(c)}})})()};p.dispatchEvent=function(a){return this.R?this.R.dispatchEvent(a):ri.prototype.dispatchEvent.call(this,a)};p.onError=function(a){a.severity===2&&(this.u.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new qi("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Tq(a){if(a.C)throw new W(2,7,7003);}function Wq(a,b){a.dispatchEvent(new qi("onstatechange",(new Map).set("state",b)))}
function Sq(a){var b,c,d,e,f,g;return F(function(h){switch(h.g){case 1:Wq(a,"manifest-parser");a.j||(a.H=Pj(a.N,a.X),a.j=a.H(),a.j.configure(a.g.manifest,function(){return a.D}));b=Date.now()/1E3;Wq(a,"manifest");if(a.h){h.A(2);break}return C(h,a.j.start(a.N,a.Ra),3);case 3:return a.h=h.h,Xq(a.h),C(h,Yq(a),2);case 2:return a.ma.resolve(),c=new qi("manifestparsed",void 0),C(h,Promise.resolve(),5);case 5:a.dispatchEvent(c);if(a.h.variants.length==0)throw new W(2,4,4036);Xq(a.h);d=Yn(a.F,a.h);if(!d){h.A(6);
break}e=new qi("trackschanged",void 0);return C(h,Promise.resolve(),7);case 7:Tq(a),a.dispatchEvent(e);case 6:f=Date.now()/1E3,g=f-b,a.Z.K=g,E(h)}})}
function Uq(a,b){var c,d,e,f;return F(function(g){switch(g.g){case 1:if(!a.h||a.i)return g.return();Wq(a,"drm-engine");a.xa=Date.now()/1E3;a.i=a.Qa();a.F.h=a.i;a.i.configure(a.g.drm,function(){return a.D});c=Ff(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.U());return C(g,Lm(a.i,c,a.h.offlineSessionIds,d),2);case 2:Tq(a);if(!b){g.A(3);break}return C(g,a.i.Nb(b),4);case 4:Tq(a);case 3:return C(g,Wn(a.F,a.h),5);case 5:e=g.h;if(!e){g.A(0);break}f=new qi("trackschanged",
void 0);return C(g,Promise.resolve(),7);case 7:a.dispatchEvent(f),E(g)}})}p.configure=function(a,b){a=cl(a,b);ll(this.g,a)};p.getConfiguration=function(){return Yc(this.g)};
function Yq(a){var b,c,d,e,f;return F(function(g){a.B||(a.B=a.g.adaptationSetCriteriaFactory(),a.B.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredAudioRole,videoRole:a.g.preferredVideoRole,channelCount:a.g.preferredAudioChannelCount,hdrLevel:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,audioLabel:a.g.preferredAudioLabel,videoLabel:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:"",
activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:a.g.preferredAudioCodecs,preferredAudioChannelCount:a.g.preferredAudioChannelCount}));if(a.h.variants.length!=1&&a.h.type!="HLS")return g.A(0);b=Zq(a);if(!b)return g.A(0);c=[];d=t([b.video,b.audio]);for(e=d.next();!e.done;e=d.next())(f=e.value)&&!f.segmentIndex&&c.push(f.createSegmentIndex());return c.length>0?C(g,Promise.all(c),0):g.A(0)})}
function Vq(a){var b,c,d,e,f;return F(function(g){!a.m&&(b=Zq(a))&&(a.m=b);if(!a.m)return g.A(0);c=a.h.presentationTimeline.U();d=[];e=a.m;e.video&&d.push($q(a,e.video,c));e.audio&&d.push($q(a,e.audio,c));(f=Gf(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&Kf(e.audio,f,a.g)&&(d.push($q(a,f,c)),a.W=f);return C(g,Promise.all(d),0)})}
function Zq(a){if(!a.o){var b=a.g.abrFactory;a.o=b();a.o.configure(a.g.abr)}b=Ff(a.h.variants);b=a.B.create(b);a.o.setVariants(Array.from(b.values()));return a.o.chooseVariant(!0)}
function $q(a,b,c){var d,e,f,g,h;return F(function(k){if(k.g==1)return d=a.g.streaming.segmentPrefetchLimit||2,e=new yp(d,b,function(l,m,n){return iq(l,m,n||null,a.g.streaming.retryParameters,a.Ca,a.D)},!1),a.M.set(b.id,e),b.segmentIndex?k.A(2):C(k,b.createSegmentIndex(),2);f=typeof a.l==="number"?a.l:0;g=b.segmentIndex.pb(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=b.segmentIndex.g[0]||null);return h?c?h.oa?C(k,Bp(e,h.oa),0):k.A(0):C(k,Ap(e,h.startTime),0):k.A(0)})}p.dj=function(){return this.u};
p.destroy=function(){var a=this,b,c,d;return F(function(e){if(e.g==1)return a.C=!0,!a.j||a.ra?e.A(2):C(e,a.j.stop(),2);if(e.g!=4)return a.o&&a.o.release(),a.J&&!a.va&&a.J.release(),!a.i||a.ea?e.A(4):C(e,a.i.destroy(),4);if(a.M.size>0&&!a.wa)for(b=t(a.M.values()),c=b.next();!c.done;c=b.next())d=c.value,Hp(d);E(e)})};function Xq(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",Lq);
Lq.prototype.destroy=Lq.prototype.destroy;Lq.prototype.waitForFinish=Lq.prototype.dj;Lq.prototype.getPrefetchedTextTrack=Lq.prototype.Qh;Lq.prototype.getPrefetchedVariantTrack=Lq.prototype.Rh;function ar(a,b){ri.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{zc:null,yc:br,hc:function(d,e){return cr(c,"enter",d,e)}},{zc:dr,yc:br,hc:function(d,e){return cr(c,"enter",d,e)}},{zc:er,yc:br,hc:function(d,e){return cr(c,"enter",d,e)}},{zc:br,yc:dr,hc:function(d,e){return cr(c,"exit",d,e)}},{zc:br,yc:er,hc:function(d,e){return cr(c,"exit",d,e)}},{zc:dr,yc:er,hc:function(d,e){e?cr(c,"skip",d,e):(cr(c,"enter",d,e),cr(c,"exit",d,e))}},{zc:er,yc:dr,hc:function(d,e){return cr(c,"skip",
d,e)}}];this.h=new eb;this.h.G(this.i,"regionremove",function(d){c.g.delete(d.region)})}ma(ar,ri);ar.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ri.prototype.release.call(this)};
ar.prototype.j=function(a,b){if(!this.l||a!=0){this.l=!1;for(var c=t(this.i.h.values()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?dr:a>d.endTime?er:br;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.zc==e&&h.yc==f&&h.hc(d,b)}}};function cr(a,b,c,d){b=new qi(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var dr=1,br=2,er=3;function fr(a,b,c,d,e,f,g){if(c>=200&&c<=299&&c!=202||c==304)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=$b(b)}catch(h){}throw new W(c==401||c==403?2:1,1,1001,d,c,f,a,g,e||d);};function gr(){}
function hr(a,b,c,d,e,f){var g=new ir;try{Em(b.headers).forEach(function(m,n){g.append(n,m)})}catch(m){return ki(new W(1,1,1002,a,m,c))}var h=new jr,k={Jf:!1,Wg:!1};a=kr(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 ji(a,function(){k.Jf=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new Oe(function(){k.Wg=!0;h.abort()});l.ka(b/
1E3);a.finally(function(){l.stop()})}return a}
function kr(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,v,w,z,x,A,D,G,H,B;return F(function(I){switch(I.g){case 1:return l=lr,m=mr,q=new ArrayBuffer(0),u=r=0,v={},w=Date.now(),sa(I,2),C(I,l(a,d),4);case 4:n=I.h;v=nr(n.headers);g(v);if(d.method=="HEAD"){I.A(5);break}x=(z=n.headers.get("Content-Length"))?parseInt(z,10):0;if(!n.body)return C(I,n.arrayBuffer(),9);A=n.clone().body.getReader();D=function(O){function N(){var P,J,L,Q;return F(function(K){switch(K.g){case 1:return sa(K,2),C(K,A.read(),4);case 4:P=
K.h;ta(K,3);break;case 2:return ua(K),K.return();case 3:if(P.done){K.A(5);break}r+=P.value.byteLength;if(!h){K.A(5);break}return C(K,h(P.value),5);case 5:J=Date.now();L=r-u;if(J-w>100&&L>=k||P.done)Q=P.done?0:x-r,f(J-w,L,Q),u=r,w=J;P.done?O.close():(O.enqueue(P.value),N());E(K)}})}N()};new m({start:D});return C(I,n.arrayBuffer(),8);case 8:q=I.h;I.A(5);break;case 9:q=I.h,G=Date.now(),f(G-w,q.byteLength,0);case 5:b.headers.Range&&(H=b.headers.Range.replace("bytes=","").split("-").filter(function(O){return O}).map(function(O){return parseInt(O,
10)}),H.length==2&&q.byteLength!=H[1]-H[0]+1&&Ta("Payload length does not match range requested bytes",b,n));ta(I,3);break;case 2:B=ua(I);if(e.Jf)throw new W(1,1,7001,a,c);if(e.Wg)throw new W(1,1,1003,a,c);throw new W(1,1,1002,a,B,c);case 3:return I.return(fr(v,q,n.status,a,n.url,b,c))}})}function nr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
function or(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",gr);gr.isSupported=or;gr.parse=hr;var lr=window.fetch,jr=window.AbortController,mr=window.ReadableStream,ir=window.Headers;or()&&(vi("http",hr,2,!0),vi("https",hr,2,!0),vi("blob",hr,2,!0));function pr(){}
function qr(a,b,c,d,e,f){var g=new rr,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 W(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var u=g.getAllResponseHeaders().trim().split("\r\n"),v={};u=t(u);for(var w=u.next();!w.done;w=u.next())w=w.value.split(": "),v[w[0].toLowerCase()]=w.slice(1).join(": ");
q=v;e(q)}};g.onload=function(u){var v=g.response;try{d(Date.now()-h,u.loaded-k,0);var w=fr(q,v,g.status,a,g.responseURL,b,c);m(w)}catch(z){n(z)}};g.onerror=function(u){n(new W(1,1,1002,a,u,c))};g.ontimeout=function(){n(new W(1,1,1003,a,c))};g.onprogress=function(u){var v=Date.now(),w=f.minBytesForProgressEvents||0,z=u.loaded-k;if(v-h>100&&z>=w||u.lengthComputable&&u.loaded==u.total)d(v-h,z,g.readyState==4?0:u.total-u.loaded),k=u.loaded,h=v};for(var r in b.headers)try{g.setRequestHeader(r.toLowerCase(),
b.headers[r])}catch(u){throw new W(1,1,1002,a,u,c);}g.send(b.body)});return new ji(l,function(){g.abort();return Promise.resolve()})}S("shaka.net.HttpXHRPlugin",pr);pr.parse=qr;var rr=window.XMLHttpRequest;vi("http",qr,1,!0);vi("https",qr,1,!0);vi("blob",qr,1,!0);function sr(a,b,c){var d,e,f,g,h,k,l;return F(function(m){switch(m.g){case 1:var n=(new ub(a)).jb.split("/").pop().split(".");d=n.length==1?"":n.pop().toLowerCase();if(e=tr.get(d))return m.return(e);f=0;g=zi([a],c);sa(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=ua(m);if(!k||k.code!=1002&&k.code!=1001){m.A(3);break}g.method="GET";return C(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 tr=(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 ur={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"},vr=t(Object.keys(ur)),wr=vr.next();!wr.done;wr=vr.next()){var xr=wr.value;ur[xr.toLowerCase()]=ur[xr]};function yr(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return yr(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=be,e=a.fontStyle==ce,f=a.textDecoration.includes(de);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;e==""&&b&&(e=b.color);d="";(e=zr(e))&&(d+="."+e);e=a.backgroundColor;e==""&&b&&(e=b.backgroundColor);(b=zr(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+(k===void 0?"":k)+">"+g+"</"+h+">"},a.payload)}
function zr(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("#")&&a.length>7&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Ar(a,b){var c=[];a=t(Br(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,y(Ar(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=yr(d,b);c.push(e)}return c}
function Br(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={He:void 0},c=a.next())d.He=c.value,b.some(function(e){return function(f){return Td(e.He,f)}}(d))||b.push(d.He);return b}
function Cr(a){function b(d){for(var e=5381,f=d.length;f;)e=e*33^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}a.textAlign=="center"&&c.align!="center"&&(c.align="middle");a.writingMode=="vertical-lr"?c.vertical="lr":a.writingMode=="vertical-rl"&&
(c.vertical="rl");a.lineInterpretation==1&&(c.snapToLines=!1);a.line!=null&&(c.line=a.line);a.position!=null&&(c.position=a.position);return c}
function Dr(a,b){var c=Ar(b),d=[];b=a.cues?Array.from(a.cues):[];c=t(c);for(var e=c.next(),f={};!e.done;f={Fc:void 0},e=c.next())f.Fc=e.value,!b.some(function(g){return function(h){return h.startTime==g.Fc.startTime&&h.endTime==g.Fc.endTime&&h.text==g.Fc.payload?!0:!1}}(f))&&f.Fc.payload&&(e=Cr(f.Fc))&&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 Er(a,b){var c=!1;a.mode==="disabled"&&(c=!0,a.mode="hidden");for(var d=0;d<a.cues.length;){var e=a.cues[d];b(e)?a.removeCue(e):d++}c&&(a.mode="disabled")};function Fr(a){var b=this;this.i=a;this.l=new eb;this.j=null;this.h=new Map;this.g=-1;this.u=!1;this.o=null;this.C=function(){b.l.cb(b.i,"textchanged",b.m);b.l.cb(b.j.textTracks,"change",b.B);for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d.value.remove();b.h.clear();b.g=-1;b.j=null};this.m=function(){var c=new Map,d=b.i.Ub();d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;if(b.h.has(e.id)){var f=b.h.get(e.id);e.active||f.track.mode==="disabled"||(f.track.mode="disabled");b.h.delete(e.id)}else{f=
b.j.ownerDocument.createElement("track");f.kind=Gr(e);var g=f,h=void 0;if(e.label)h=e.label;else if(e.language)if(e.language in ur)h=ur[e.language];else{var k=$e(e.language);k in ur&&(h=ur[k]+" ("+e.language+")")}h||(h=e.originalTextId,e.language&&e.language!==e.originalTextId&&(h+=" ("+e.language+")"));g.label=h;e.language in ur&&(f.srclang=e.language);f.src="data:,WEBVTT";f.track.mode="disabled";b.j.appendChild(f)}c.set(e.id,f);e.active&&(b.g=e.id)}d=t(b.h.values());for(e=d.next();!e.done;e=d.next())e.value.remove();
b.g>-1&&(c.has(b.g)?(d=c.get(b.g).track,d.mode==="disabled"&&(d.mode=b.u?"showing":"hidden")):b.g=-1);b.h=c};this.B=function(){if(!b.o){var c=b.j;b.o=(new Oe(function(){b.o=null;if(b.j===c){var d=-1,e=!1;if(b.h.has(b.g)){var f=b.h.get(b.g);f.track.mode==="showing"?(d=b.g,e=!0):f.track.mode==="hidden"&&(d=b.g)}if(!e)for(e=t(b.h),f=e.next();!f.done;f=e.next()){var g=t(f.value);f=g.next().value;g=g.next().value;if(g.track.mode==="showing"){d=f;break}else d<0&&g.track.mode==="hidden"&&(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&&g.track.mode!=="disabled"&&(g.track.mode="disabled");b.g!==d&&(b.g=d,d>-1&&b.i.pf({id:d}));b.i.Mg(d>-1&&b.h.get(d).track.mode==="showing")}})).ka(0)}};this.l.G(a,"loaded",function(){return b.enableTextDisplayer()});this.enableTextDisplayer()}p=Fr.prototype;p.configure=function(){};
p.remove=function(a,b){if(this.i)this.h.has(this.g)&&Er(this.h.get(this.g).track,function(c){return c.startTime<b&&c.endTime>a});else return!1;return!0};p.append=function(a){this.h.has(this.g)&&Dr(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.C(),this.i=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.u};
p.setTextVisibility=function(a){this.u=a;if(this.h.has(this.g)){var b=this.h.get(this.g).track;b.mode!=="disabled"&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.i&&this.i.m===3)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,c.mode==="showing"){a=null;break}else a||c.mode!=="hidden"||(a=c);a&&(a.mode="showing")}else for(a=t(b),b=a.next();!b.done;b=
a.next())b=b.value,b.mode==="showing"&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.i&&this.i.m===2&&(this.j=this.i.h,this.l.Ma(this.i,"unloading",this.C),this.l.G(this.i,"textchanged",this.m),this.l.G(this.j.textTracks,"change",this.B),this.m())};
function Gr(a){var b=T();return a.forced&&b.ua()==="WEBKIT"?"forced":a.kind==="caption"||a.roles&&a.roles.some(function(c){return c.includes("transcribes-spoken-dialog")})&&a.roles.some(function(c){return c.includes("describes-music-and-sound")})?"captions":"subtitles"}S("shaka.text.NativeTextDisplayer",Fr);Fr.prototype.enableTextDisplayer=Fr.prototype.enableTextDisplayer;Fr.prototype.setTextLanguage=Fr.prototype.setTextLanguage;Fr.prototype.setTextVisibility=Fr.prototype.setTextVisibility;
Fr.prototype.isTextVisible=Fr.prototype.isTextVisible;Fr.prototype.destroy=Fr.prototype.destroy;Fr.prototype.append=Fr.prototype.append;Fr.prototype.remove=Fr.prototype.remove;Fr.prototype.configure=Fr.prototype.configure;function Hr(a,b){U("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,b.kind!=="metadata"&&b.kind!=="chapters"&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=Hr.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;Er(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
p.append=function(a){this.g&&Dr(this.g,a)};p.destroy=function(){this.g&&(Er(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?this.g.mode=="showing":!1};p.setTextVisibility=function(a){a&&!this.g&&Ir(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){Ir(this)};function Ir(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}
S("shaka.text.SimpleTextDisplayer",Hr);Hr.prototype.enableTextDisplayer=Hr.prototype.enableTextDisplayer;Hr.prototype.setTextLanguage=Hr.prototype.setTextLanguage;Hr.prototype.setTextVisibility=Hr.prototype.setTextVisibility;Hr.prototype.isTextVisible=Hr.prototype.isTextVisible;Hr.prototype.destroy=Hr.prototype.destroy;Hr.prototype.append=Hr.prototype.append;Hr.prototype.remove=Hr.prototype.remove;Hr.prototype.configure=Hr.prototype.configure;function Jr(){}p=Jr.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};S("shaka.text.StubTextDisplayer",Jr);Jr.prototype.enableTextDisplayer=Jr.prototype.enableTextDisplayer;Jr.prototype.setTextLanguage=Jr.prototype.setTextLanguage;Jr.prototype.setTextVisibility=Jr.prototype.setTextVisibility;
Jr.prototype.isTextVisible=Jr.prototype.isTextVisible;Jr.prototype.destroy=Jr.prototype.destroy;Jr.prototype.append=Jr.prototype.append;Jr.prototype.remove=Jr.prototype.remove;Jr.prototype.configure=Jr.prototype.configure;function Kr(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.o=b;this.C=this.u=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.B=new Oe(function(){c.j.paused||Lr(c)});Mr(this);this.l=new Map;this.i=new eb;this.i.G(document,"fullscreenchange",function(){Lr(c,!0)});this.i.G(this.j,"seeking",
function(){Lr(c,!0)});this.i.G(this.j,"ratechange",function(){Mr(c)});this.i.G(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.u=e/d:c.u=null});this.D=null;"ResizeObserver"in window&&(this.D=new ResizeObserver(function(){Lr(c,!0)}),this.D.observe(this.g));this.F=new Map}p=Kr.prototype;p.configure=function(a){this.C=a;Mr(this);Lr(this,!0)};
p.append=function(a){var b=[].concat(y(this.h));a=t(Br(a));for(var c=a.next(),d={};!c.done;d={Ie:void 0},c=a.next())d.Ie=c.value,b.some(function(e){return function(f){return Td(f,e.Ie)}}(d))||this.h.push(d.Ie);this.h.length&&Mr(this);Lr(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.B&&(this.B.stop(),this.B=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.D&&(this.D.disconnect(),this.D=null);return Promise.resolve()};p.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Lr(this,c>this.h.length);this.h.length||Mr(this);return!0};
p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.o.appendChild(this.g),Lr(this,!0)):this.g.parentElement&&this.o.removeChild(this.g)};p.setTextLanguage=function(a){a&&a!="und"?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function Mr(a){a.B&&(a.h.length?a.B.Ba((a.C?a.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.B.stop())}
function Nr(a,b){for(;b!=null;){if(b==a.g)return!0;b=b.parentElement}return!1}
function Or(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.Zg:null;l&&(g.push(l.Je),l.qc&&g.push(l.qc),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?Nr(a,n)||(f=!0):(Pr(a,k,e),l=a.l.get(k),n=l.Zg,f=!0));k.nestedCues.length>0&&n&&Or(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,r){return q.startTime!=
r.startTime?q.startTime-r.startTime:q.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.l.get(d.value),d.qc?(d.qc.contains(c)&&d.qc.removeChild(c),c.appendChild(d.qc),d.qc.appendChild(d.Je)):c.appendChild(d.Je)}}function Lr(a,b){if(a.g){var c=a.j.currentTime;if(!a.m||(b===void 0?0:b)){b=t(a.F.values());for(var d=b.next();!d.done;d=b.next())em(d.value);em(a.g);a.l.clear();a.F.clear()}a.m&&Or(a,a.h,a.g,c,[])}}
function Pr(a,b,c){var d=c.length>1,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&b.nestedCues.length>0;var f=document.createElement(e);e!="br"&&Qr(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.u===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Pc?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Pc?"%":"px");if(a.F.has(c))c=a.F.get(c);else{e=document.createElement("span");var k=g.heightUnits==Pc?"%":"px",l=g.widthUnits==
Pc?"%":"px",m=g.viewportAnchorUnits==Pc?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;g.heightUnits===2&&(n=g.height*5.33,k="%");g.widthUnits===2&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;g.viewportAnchorUnits===2?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.u===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-
g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*q/100+m);g.heightUnits!==0&&g.widthUnits!==0&&g.viewportAnchorUnits!==0&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
b.displayAlign=="before"?"flex-start":b.displayAlign=="center"?"center":"flex-end";a.F.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.l.set(b,{Je:f,Zg:e,qc:c})}
function Rr(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Jd?c:a==="left"||a==="start"&&b===Ld||a==="end"&&b==="rtl"?"line-left":a==="right"||a==="start"&&b==="rtl"||a==="end"&&b===Ld?"line-right":"center"}
function Qr(a,b,c,d,e){var f=b.style,g=c.nestedCues.length==0,h=d.length>1;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Sr(c.linePadding,c,a.o);f.paddingRight=Sr(c.linePadding,c,a.o);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Tr(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.setAttribute("translate","no"),l.textContent=
k)}if(h&&!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if(c.textAlign=="left"||c.textAlign=="start")f.width="100%",f.alignItems="start";else if(c.textAlign=="right"||c.textAlign=="end")f.width="100%",f.alignItems="end";f.justifyContent=c.displayAlign=="before"?"flex-start":c.displayAlign=="center"?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=
c.letterSpacing;d=a.C?a.C.fontScaleFactor:1;if(d!==1||c.fontSize)f.fontSize=Sr(c.fontSize||"1em",c,a.o,d);d=c.line;d!=null&&(g=c.lineInterpretation,g==Nd&&(g=1,h=16,a.u&&a.u<1&&(h=32),d=d<0?100+d/h*100:d/h*100),g==1&&(f.position="absolute",c.writingMode==Md?(f.width="100%",c.lineAlign==Od?f.top=d+"%":c.lineAlign=="end"&&(f.bottom=100-d+"%")):c.writingMode=="vertical-lr"?(f.height="100%",c.lineAlign==Od?f.left=d+"%":c.lineAlign=="end"&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Od?f.right=
d+"%":c.lineAlign=="end"&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=Rr(c);a=="line-left"?(f.cssFloat="left",c.position!==null&&(f.position="absolute",c.writingMode==Md?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):a=="line-right"?(f.cssFloat="right",c.position!==null&&(f.position="absolute",c.writingMode==Md?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):c.position!==null&&c.position!=50&&(f.position="absolute",c.writingMode==Md?(f.left=c.position+"%",
f.width="auto"):f.top=c.position+"%",c.size&&(f.transform="translateX(-50%)"));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==Md?f.width=c.size+"%":f.height=c.size+"%")}
function Sr(a,b,c,d){d=d===void 0?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 Tr(a,b){for(var c=a.length-1;c>=0;c--){var d=b(a[c]);if(d||d===0)return d}return null}S("shaka.text.UITextDisplayer",Kr);Kr.prototype.enableTextDisplayer=Kr.prototype.enableTextDisplayer;
Kr.prototype.setTextLanguage=Kr.prototype.setTextLanguage;Kr.prototype.setTextVisibility=Kr.prototype.setTextVisibility;Kr.prototype.isTextVisible=Kr.prototype.isTextVisible;Kr.prototype.remove=Kr.prototype.remove;Kr.prototype.destroy=Kr.prototype.destroy;Kr.prototype.append=Kr.prototype.append;Kr.prototype.configure=Kr.prototype.configure;function Ur(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.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(g*1E3%1E3);return(f<10?"0":"")+f+":"+(h<10?"0":"")+h+":"+(k<10?"0":"")+k+"."+(g<100?g<10?"00":"0":"")+g}var d=Ar(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 Kd:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Vr(a,b){this.g=b;this.j=a;this.D=new Map;this.l=void 0;this.C=!1;this.K=!0;this.o=this.J=!1;this.B=this.u=void 0;this.H=0;this.L={request:!1,response:!1,event:!1};this.m={};this.i=new eb;this.F=[];this.h=null}Vr.prototype.setMediaElement=function(a){this.h=a;Wr(this)};Vr.prototype.configure=function(a){this.g=a;Xr(this)};function Yr(a){a.D.clear();a.C=!1;a.K=!0;a.J=!1;a.o=!1;a.u=0;a.B=0;a.H=0;a.L={request:!1,response:!1,event:!1};Zr(a);a.m={};a.h=null;a.i.Xa()}
function $r(a,b){a.o=b;a.o?a.l==as?a.l=bs:a.l==cs&&(a.l=ds):a.l==bs?a.l=as:a.l==ds&&(a.l=cs)}function es(a,b){if(a.g&&a.g.enabled&&(fs(a,"ps",{tc:"d"}),a.h&&a.h.autoplay)){var c=a.h.play();c&&c.then(function(){a.H=b}).catch(function(){a.H=0})}}
function gs(a,b,c){try{if(!a.g.enabled)return b;var d=hs(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=is;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=js;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=ks;break a}e=void 0}d.ot=e;d.su=
!0;var f=ls(d);return ms(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
function Wr(a){a.i.G(a.h,"playing",function(){a.B||(a.B=Date.now());fs(a,"ps",{tc:"p"})});a.i.G(a.h,"volumechange",function(){fs(a,a.h.muted?"m":"um")});a.i.G(a.h,"play",function(){a.u||(a.u=Date.now(),fs(a,"ps",{tc:"s"}))});a.i.G(a.h,"pause",function(){fs(a,"ps",{tc:"a"})});a.i.G(a.j,"buffering",function(){fs(a,"ps",{tc:"w"})});a.i.G(a.h,"seeking",function(){return fs(a,"ps",{tc:"k"})});a.i.G(document,"fullscreenchange",function(){fs(a,document.fullscreenElement?"pe":"pc")});var b=a.h;(b.webkitPresentationMode||
b.webkitSupportsFullscreen)&&a.i.G(b,"webkitpresentationmodechanged",function(){b.webkitPresentationMode?fs(a,b.webkitPresentationMode!=="inline"?"pe":"pc"):b.webkitSupportsFullscreen&&fs(a,b.webkitDisplayingFullscreen?"pe":"pc")});a.i.G(a.h,"enterpictureinpicture",function(){fs(a,"pe")});a.i.G(a.h,"leavepictureinpicture",function(){fs(a,"pc")});"documentPictureInPicture"in window&&a.i.G(window.documentPictureInPicture,"enter",function(c){fs(a,"pe");a.i.Ma(c.window,"pagehide",function(){fs(a,"pc")})});
a.i.G(document,"visibilitychange",function(){document.hidden?fs(a,"b",{bg:!0}):fs(a,"b")});a.i.G(a.j,"complete",function(){fs(a,"ps",{tc:"e"})})}function Xr(a){Zr(a);var b=ns(a);b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value.timeInterval,c===void 0&&(c=os),c>=1){var d=new Oe(function(){return fs(a,ps)});d.Ba(c);a.F.push(d)}}function Zr(a){if(a.F)for(var b=t(a.F),c=b.next();!c.done;c=b.next())c.value.stop();a.F=[]}
function ns(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===qs&&b.enabled}):[]}function rs(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===ss&&b.enabled===!0}):[]}function hs(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.l,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.j.getBandwidthEstimate()/1E3}}
function fs(a,b,c){c=c===void 0?{}:c;b=Object.assign({e:b,ts:Date.now()},c);b=ts(a,b,qs);c=a.g.targets;if(!(a.g.version<us)&&c){var d=ns(a);c=Array.from(new Set([].concat(y(vs),y(ws))));d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=xs(e.includeKeys||[],c);f.includes(ys)||f.push(ys);f=zs(b,f);var g=e.events||[],h=f.e,k=f.sta;h&&(!As.includes(h)||!(h!=="ps"||k&&Bs.includes(k))||g&&g.length>0&&!g.includes(h))||Cs(a,f,e)}}}
function Ds(a,b,c){if(a.g.enabled){c=ts(a,c,Es);var d=Fs({mode:Es,useHeaders:a.g.useHeaders,includeKeys:a.g.includeKeys||[]});a.m[d]||(a.m[d]={request:1,response:1});c.sn=a.m[d].request++;d=a.g.includeKeys||[];var e=a.g.version==us?Array.from(new Set([].concat(y(vs),y(Gs)))):Hs;d=xs(d,e);c=zs(c,d);Is(c,b,a.g.useHeaders)}}
function Cs(a,b,c,d){var e=gi(),f=c.url;if(c.useHeaders){b=Js(b);if(!Object.keys(b).length)return;d&&Object.assign(d.headers,b);d=zi([f],e);Object.assign(d.headers,b)}else{b=ls(b);if(!b)return;f=ms(f,b);d&&(d.uri=f);d=zi([f],e)}a.j.J.request(9,d)}function Is(a,b,c){if(c)a=Js(a),Object.keys(a).length&&Object.assign(b.headers,a);else{var d=ls(a);d&&(b.uris=b.uris.map(function(e){return ms(e,d)}))}}
function xs(a,b){if(!a||a.length===0)return b;for(var c=t(a),d=c.next();!d.done;d=c.next())b.includes(d.value);return a=a.filter(function(e){return b.includes(e)})}function zs(a,b){return Object.keys(a).reduce(function(c,d){b.includes(d)&&(c[d]=a[d]);return c},{})}function Ks(a){if(a.type===0)return Ls;if(a=a.stream){var b=a.type;if(b=="video")return a.codecs&&a.codecs.includes(",")?js:Ms;if(b=="audio")return is;if(b=="text")return a.mimeType==="application/mp4"?Ns:Os}}
function Fs(a){var b=Object.keys(a).sort().reduce(function(c,d){d!=="enabled"&&(c[d]=a[d]);return c},{});return JSON.stringify(b)}function Ps(a,b){b=a.j.Sb()[b];if(!b.length)return NaN;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:NaN}function Qs(a,b){b=a.j.Sb()[b];if(!b.length)return 0;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:0}
function Rs(a,b){var c=a.j.Gb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.type==="variant"&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Ms:return a.videoBandwidth||NaN;case is:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function Ss(a,b,c){var d=b.segment,e=0;d&&(e=d.endTime-d.startTime);e={d:e*1E3,st:a.j.U()?Ts:Us};e.ot=Ks(b);var f=e.ot===Ms||e.ot===is||e.ot===js||e.ot===Ns;if(b=b.stream){var g=a.j.ib();if(f&&(e.bl=Ps(a,b.type),e.ot!==Ns)){var h=Qs(a,b.type);e.dl=g?h/Math.abs(g):h}b.bandwidth&&(e.br=b.bandwidth/1E3);if(b.segmentIndex&&d){if((g=b.segmentIndex.pb(d.endTime,!0,g<0))&&(g=g.next().value)&&g!=d){if(c&&!bb(d.Ia(),g.Ia())){var k=g.Ia()[0];h=new URL(k);var l=new URL(c);if(h.origin!==l.origin)c=k;else{c=h.pathname.split("/").slice(1);
k=l.pathname.split("/").slice(1,-1);l=Math.min(c.length,k.length);for(var m=0;m<l&&c[m]===k[m];m++)c.shift(),k.shift();for(;k.length;)k.shift(),c.unshift("..");c=c.join("/")+h.search+h.hash}e.nor=c}!g.startByte&&!g.endByte||d.startByte==g.startByte&&d.endByte==g.endByte||(c=g.startByte+"-",g.endByte&&(c+=g.endByte),e.nrr=c)}g=a.j.ib()||1;c=Qs(a,b.type)||500;d=(b=b.bandwidth)?b*(d.endTime-d.startTime)/1E3/(c/g/1E3)*a.g.rtpSafetyFactor:NaN;isNaN(d)||(e.rtp=d)}}f&&e.ot!==Ns&&(e.tb=Rs(a,e.ot)/1E3);return e}
function ts(a,b,c){Object.assign(b,hs(a));b.pr=a.j.ib();var d=b.ot===Ms||b.ot===js;a.J&&d&&(b.bs=!0,b.su=!0,a.J=!1);b.su==null&&(b.su=a.K);a.j.U()&&(d=Vs(a.j),b.ltc=d||void 0);document.hidden&&(b.bg=!0);d=a.B&&a.u?a.B-(a.H||a.u):void 0;d==void 0||a.L[c]||(b.msd=d,a.L[c]=!0);return b}
function ls(a){function b(n){return c(n/100)*100}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&n!=null&&n!==""&&n!==!1}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c,ttfb:c,ttlb: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)&&(h!=="v"||k!==1)&&(h!="pr"||k!==1)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m=l==="string"&&h!=="ot"&&h!=="sf"&&h!=="st"?h+"="+JSON.stringify(k):
l==="boolean"?h:l==="symbol"?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}
function Js(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[f[g]!=null?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=ls(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function ms(a,b){if(!b||a.includes("offline:"))return a;a=new ub(a);a.g.set("CMCD",b);return a.toString()}var ks="m",is="a",Ms="v",js="av",Ls="i",Os="c",Ns="tt",us=2,Us="v",Ts="l",as="d",bs="ld",cs="h",ds="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:as,ij:bs,HLS:cs,jj:ds,lj:"s",OTHER:"o"});
var Hs="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),vs="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),Gs="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),Ws="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),ws=["e","sta"],As="ps e t c b m um pe pc".split(" "),Bs="spawkrfeqd".split(""),os=10,ys="ts",ps="t",Es="request",ss="response",qs="event";function Xs(a){this.h=a;this.g=null}p=Xs.prototype;p.configure=function(a){this.h=a};p.Xf=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Ys)?this.g.get(Ys)*1E3:null};p.Vf=function(){return this.h.enabled&&this.g&&this.g.has(Zs)?this.g.get(Zs)*1E3:null};p.Uh=function(){return this.h.enabled&&this.g&&this.g.has($s)?this.g.get($s):null};p.Vh=function(){return this.h.enabled&&this.g&&this.g.has(at)?this.g.get(at):null};
p.getBandwidthEstimate=function(a){var b=this.Vf();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return c>0&&c<=1?a*(1-c)+b*c:a};function bt(a){return a?a.toLowerCase()==="false"?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Xs);Xs.prototype.getBandwidthEstimate=Xs.prototype.getBandwidthEstimate;Xs.prototype.getRoundTripTime=Xs.prototype.Vh;Xs.prototype.getResponseDelay=Xs.prototype.Uh;Xs.prototype.getEstimatedThroughput=Xs.prototype.Vf;
Xs.prototype.getMaxBitrate=Xs.prototype.Xf;var Zs="etp",Ys="mb",$s="rd",at="rtt";function ct(){this.g=null;this.h=[]}function dt(a,b){return F(function(c){if(c.g==1)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;E(c)})}ct.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function Z(a,b,c){b=b===void 0?null:b;ri.call(this);var d=this;this.m=et;this.h=null;this.ud=b;this.ba=!1;this.Dd=new eb;this.vd=new eb;this.j=new eb;this.kc=new eb;this.Nc=new eb;this.F=this.H=this.D=this.J=null;this.Gd=0;this.ma=new ct;this.R=this.ea=this.Z=this.i=this.Mc=this.K=this.l=this.sd=this.W=this.Ff=this.va=this.M=this.rb=this.xa=this.td=this.T=this.Fa=this.N=this.ub=null;this.Qa=!1;this.yd=this.o=null;this.Ed=1E9;this.Cd=[];this.Ic=new Map;this.sb=[];this.ze=-1;this.g=ft(this);this.Be=
kl();this.X=null;this.Hd=-1;this.jc=null;this.wa={width:Infinity,height:Infinity};this.xd=new Vn(this.g,this.wa,null);this.Bd=[];this.B=null;this.L=this.g.adaptationSetCriteriaFactory();this.L.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,
codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount});this.Qc=this.g.preferredTextLanguage;this.Xc=this.g.preferredTextRole;this.Wc=this.g.preferForcedSubs;this.wd=[];c&&c(this);this.M=new Vr(this,this.g.cmcd);this.va=new Xs(this.g.cmsd);this.J=gt(this);this.Uc=this.ra=this.Ca=this.C=null;this.De=!1;this.Ae=[];this.Ce=
new Oe(function(){return F(function(e){if(e.g==1)return d.ra?C(e,d.Nb(d.Uc,!0),3):e.A(0);if(e.g!=4)return C(e,d.load(d.ra),4);d.De?d.Uc.pause():d.Uc.play();d.ra=null;d.De=!1;E(e)})});ht&&(this.C=ht(),this.C.configure(this.g.ads),this.Nc.G(this.C,"ad-content-pause-requested",function(e){var f;return F(function(g){if(g.g==1){d.Ce.stop();if(d.ra)return g.A(0);d.Uc=d.h;d.De=d.gd();f=e.saveLivePosition||!1;return C(g,d.Of(!0,f),3)}d.ra=g.h;E(g)})}),this.Nc.G(this.C,"ad-content-resume-requested",function(e){e=
e.offset||0;if(d.ra){var f=d.ra;f.l&&e&&(typeof f.l==="number"?f.l+=e:f.l.setTime(f.l.getTime()+e*1E3))}d.Ce.ka(.1)}),this.Nc.G(this.C,"ad-content-attach-requested",function(){return F(function(e){return d.h||!d.Uc?e.A(0):C(e,d.Nb(d.Uc,!0),0)})}));it&&(this.Ca=it(this),this.Ca.configure(this.g.queue));this.Dd.G(window,"online",function(){jt(d);d.kf()});this.zd=new Oe(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,k.disabledUntilTime>0&&k.disabledUntilTime<=
e&&(k.disabledUntilTime=0,f=!0),k.disabledUntilTime>0&&(g=!1);g&&d.zd.stop();f&&kt(d,!1,void 0,!1,!1)});this.Ra=null;a&&(U("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Nb(a,!0));this.u=null}ma(Z,ri);function lt(a){a.W!=null&&(Ac(a.W),a.W.release(),a.W=null)}function mt(a,b,c){c||b.lcevc.enabled?(lt(a),a.W==null&&(a.W=new yc(a.h,a.Ff,b.lcevc,c),a.H&&(a.H.H=a.W))):lt(a)}function nt(a,b){return new qi(a,b)}p=Z.prototype;
p.destroy=function(){var a=this,b;return F(function(c){switch(c.g){case 1:if(a.m==ot)return c.return();lt(a);b=a.detach();a.m=ot;return C(c,b,2);case 2:return C(c,a.Nf(),3);case 3:a.Dd&&(a.Dd.release(),a.Dd=null);a.vd&&(a.vd.release(),a.vd=null);a.j&&(a.j.release(),a.j=null);a.kc&&(a.kc.release(),a.kc=null);a.Nc&&(a.Nc.release(),a.Nc=null);a.yd=null;a.g=null;a.B=null;a.ud=null;a.M=null;a.va=null;if(!a.J){c.A(4);break}return C(c,a.J.destroy(),5);case 5:a.J=null;case 4:a.o&&(a.o.release(),a.o=null),
a.Ca&&(a.Ca.destroy(),a.Ca=null),ri.prototype.release.call(a),E(c)}})};function pt(a,b){a.dispatchEvent(nt("onstatechange",(new Map).set("state",b)))}
p.Nb=function(a,b){b=b===void 0?!0:b;var c=this,d,e,f;return F(function(g){switch(g.g){case 1:if(c.m==ot)throw new W(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.A(2);break}return C(g,c.detach(),2);case 2:return C(g,qt(c,"attach"),4);case 4:if(g.h)return g.return();sa(g,5,6);d||(pt(c,"attach"),e=function(){var h=rt(c,!1);h&&st(c,h)},c.vd.G(a,"error",e),c.h=a,c.M&&c.M.setMediaElement(a));T();if(!b||!Nj()||c.H){g.A(6);break}return C(g,tt(c),6);case 6:va(g);c.ma.release();wa(g,0);break;case 5:return f=
ua(g),C(g,c.detach(),10);case 10:throw f;}})};p.gh=function(a){this.Ff=a};p.detach=function(a){a=a===void 0?!1:a;var b=this;return F(function(c){if(c.g==1){if(b.m==ot)throw new W(2,7,7E3);return C(c,b.rd(!1,a),2)}if(c.g!=3)return C(c,qt(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.vd.Xa(),b.h=null),pt(b,"detach"),b.C&&!a&&b.C.release()}finally{b.ma.release()}E(c)})};
function qt(a,b){var c;return F(function(d){return d.g==1?(c=++a.Gd,C(d,dt(a.ma,b),2)):c!=a.Gd?(a.ma.release(),d.return(!0)):d.return(!1)})}
p.rd=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,x;return F(function(A){switch(A.g){case 1:return c.m!=ot&&(c.m=et),C(A,qt(c,"unload"),2);case 2:if(A.h)return A.return();A.l=0;A.j=3;c.Qa=!1;pt(c,"unload");lt(c);d=c.wd.map(function(D){return D()});c.wd=[];return C(A,Promise.all(d),5);case 5:c.dispatchEvent(nt("unloading"));c.td&&(c.td.release(),c.td=null);c.xa&&(c.xa.release(),c.xa=null);c.rb&&(c.rb.release(),c.rb=null);c.h&&(c.j.Xa(),c.kc.Xa());c.zd.stop();
c.ub&&(c.ub.release(),c.ub=null);c.Fa&&(c.Fa.stop(),c.Fa=null);if(!c.K){A.A(6);break}return C(A,c.K.stop(),7);case 7:c.K=null,c.Mc=null;case 6:c.o&&c.o.stop();if(!c.l){A.A(8);break}return C(A,c.l.destroy(),9);case 9:c.l=null;case 8:c.N&&(c.N.release(),c.N=null);c.F&&(c.F.release(),c.F=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.D){A.A(10);break}return C(A,c.D.destroy(),11);case 11:c.D=null;case 10:if(!c.H){A.A(12);break}return C(A,c.H.destroy(),13);case 13:c.H=null;case 12:if(c.C&&!b)c.C.onAssetUnload();
c.ra&&!b&&(c.ra.destroy(),c.ra=null);b||c.Ce.stop();c.M&&Yr(c.M);c.va&&(c.va.g=null);if(!c.u){A.A(14);break}return C(A,c.u.destroy(),15);case 15:c.u=null;case 14:c.ba=!1;if(c.h){e=t(c.Ae);for(f=e.next();!f.done;f=e.next())g=f.value,g.src.startsWith("blob:")&&URL.revokeObjectURL(g.src),g.remove();c.Ae=[];dm(c.h)&&c.h.load()}if(!c.D){A.A(16);break}return C(A,c.D.destroy(),17);case 17:c.D=null;case 16:c.Ra&&c.Z!=c.Ra.Nd()&&(c.Ra.C||c.Ra.destroy(),c.Ra=null);c.Z=null;c.ea=null;c.T=null;if(c.i){h=t(c.i.variants);
for(k=h.next();!k.done;k=h.next())for(l=k.value,m=t([l.audio,l.video]),n=m.next();!n.done;n=m.next())(q=n.value)&&q.segmentIndex&&q.segmentIndex.release();r=t(c.i.textStreams);for(u=r.next();!u.done;u=r.next())v=u.value,v.segmentIndex&&v.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(qf.clear(),Qh.clear());c.i=null;c.B=new Fq;c.Ef=null;c.jc=null;c.X=null;c.Hd=-1;c.Cd=[];w=t(c.Ic.values());for(z=w.next();!z.done;z=w.next())x=z.value,x.stop();c.Ic.clear();c.sb=[];c.ze=-1;c.J&&c.J.Kf();
ut(c);case 3:va(A);c.ma.release();wa(A,4);break;case 4:T();if(a&&Nj()&&!c.H&&c.h)return C(A,tt(c),0);A.A(0)}})};p.cj=function(a){this.R=a};
p.load=function(a,b,c){b=b===void 0?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,z;return F(function(x){switch(x.g){case 1:if(d.m==ot)throw new W(2,7,7E3);e=null;f="";if(a instanceof Lq){if(a.C)throw new W(2,7,7006);e=a;f=e.Nd()||""}else f=a||"";return C(x,dt(d.ma,"load"),2);case 2:d.ma.release();if(!d.h)throw new W(2,7,7002);if(!d.Z){x.A(3);break}d.Z=f;return C(x,d.rd(!1),3);case 3:g=++d.Gd;h=function(){return F(function(A){if(A.g==1)return d.Gd==g?A.A(0):e?C(A,e.destroy(),3):A.A(3);throw new W(2,
7,7E3);})};k=function(A,D){return F(function(G){switch(G.g){case 1:return G.l=0,G.j=2,C(G,dt(d.ma,D),4);case 4:return C(G,h(),5);case 5:return C(G,A(),6);case 6:return C(G,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:va(G),d.ma.release(),wa(G,0)}})};sa(x,5,6);b==null&&e&&(b=e.getStartTime());d.R=b;d.Qa=!1;d.dispatchEvent(nt("loading"));if(e){c=e.X;x.A(8);break}if(c){x.A(8);break}return C(x,k(function(){return F(function(A){if(A.g==1)return C(A,vt(d,f),2);c=A.h;E(A)})},"guessMimeType_"),8);case 8:l=!!e;
if(e){Oq(e,d);d.B=e.getStats();x.A(11);break}return C(x,xt(d,f,b,c,!0,d.g),12);case 12:(e=x.h)?(e.D=!1,Oq(e,d),d.B=e.getStats(),e.start(),e.u.catch(function(){})):d.B=new Fq;case 11:m=!e;n=Date.now()/1E3;d.B=e?e.getStats():new Fq;d.Z=f;d.ea=c||null;ut(d);q=function(){var A=d.h?d.h.buffered:null;return{start:In(A)||0,end:Jn(A)||0}};d.xa=new vp(q);d.xa.addEventListener("regionadd",function(A){yt(d,A.region,"metadataadded")});if(m)return C(x,k(function(){return F(function(A){return C(A,zt(d,c),0)})},
"initializeSrcEqualsDrmInner_"),23);d.rb=new vp(q);return C(x,k(function(){return F(function(A){if(A.g==1)return C(A,Promise.race([e.ma,e.u]),2);d.Mc=e.H;var D=e;D.ra=!0;d.K=D.j;d.i=e.Oe();E(A)})},"waitForFinish"),15);case 15:if(d.H){x.A(16);break}return C(x,k(function(){return F(function(A){return C(A,tt(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&&(d.u.enableTextDisplayer?d.u.enableTextDisplayer():U("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),
C(x,k(function(){return F(function(A){return C(A,e.u,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.xd=e.F;d.K&&d.K.setMediaElement&&d.h&&d.K.setMediaElement(d.h);d.td=Pq(e);d.sd=e.Fa;if(r=e.B)d.L=r;l&&d.h&&d.h.nodeName==="AUDIO"&&(At(d),d.configure("manifest.disableVideo",!0));if(e.i){x.A(19);break}return C(x,k(function(){return F(function(A){return C(A,Uq(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.D=Qq(e),C(x,k(function(){return F(function(A){return C(A,d.D.Nb(d.h),0)})},
"drmEngine_.attach"),21);case 21:return u=d.g.abrFactory,d.o&&d.yd==u||(d.yd=u,d.o&&d.o.release(),d.o=u(),typeof d.o.setMediaElement!="function"&&(U("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),typeof d.o.setCmsdManager!="function"&&(U("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),typeof d.o.trySuggestStreams!="function"&&(U("AbrManager w/o trySuggestStreams",
"Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){}),d.o.configure(d.g.abr)),v=Rq(e),w=e.m,C(x,k(function(){return F(function(A){return C(A,Bt(d,n,w,v),0)})},"loadInner_"),22);case 22:Nq(e);d.ea&&T().Ug()&&Ae(d.ea)&&go(d.H,d.Z,d.ea);x.A(14);break;case 23:return C(x,k(function(){return F(function(A){return C(A,Ct(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(nt("loaded"));case 6:va(x);if(!e){x.A(25);break}return C(x,e.destroy(),25);case 25:d.Ra=
null;wa(x,0);break;case 5:z=ua(x);if(!z||z.code==7E3){x.A(27);break}return C(x,d.rd(!1),27);case 27:throw z;}})};function At(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.Yi=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d;return F(function(e){return e.g==1?C(e,Dt(c),2):e.g!=3?(d=e.h,C(e,c.rd(a,b),3)):e.return(d)})};p.Of=function(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c=this,d;return F(function(e){return e.g==1?C(e,Dt(c,b),2):e.g!=3?(d=e.h,C(e,c.detach(a),3)):e.return(d)})};
function Dt(a,b){b=b===void 0?!1:b;var c,d,e;return F(function(f){if(f.g==1){c=null;if(!(a.i&&a.K&&a.Mc&&a.Z&&a.g))return f.A(2);d=a.h.currentTime;a.U()&&!b&&(d=null);return C(f,Et(a,a.Z,d,a.ea,a.g,!0,!1),3)}if(f.g!=2){c=f.h;a.Bd.push(c);a.K&&a.K.setMediaElement&&a.K.setMediaElement(null);if(e=a.l?a.l.o:null)c.m=e;var g=c,h=a.K,k=a.Mc;g.h=a.i;g.j=h;g.H=k;c.B=a.L;c.start();a.i=null;a.K=null;a.Mc=null;a.o=null;a.yd=null}return f.return(c)})}
p.preload=function(a,b,c,d){b=b===void 0?null:b;var e=this,f,g;return F(function(h){if(h.g==1)return f=ft(e),ll(f,d||e.g,ft(e)),C(h,xt(e,a,b,c,!1,f),2);(g=h.h)?g.start():st(e,new W(2,7,7005));return h.return(g)})};p.Nf=function(){var a=this,b,c,d,e;return F(function(f){b=[];c=t(a.Bd);for(d=c.next();!d.done;d=c.next())e=d.value,e.C||b.push(e.destroy());a.Bd=[];return C(f,Promise.all(b),0)})};
function xt(a,b,c,d,e,f){e=e===void 0?!1:e;var g,h,k,l;return F(function(m){if(m.g==1)return d?m.A(2):C(m,vt(a,b),3);m.g!=2&&(d=m.h);if(g=Ft(a,d))return m.return(null);h=f||a.g;k=!1;e&&a.h&&a.h.nodeName==="AUDIO"&&(k=!0);l=Et(a,b,c,d||null,h,!e,k);l=e?l.then(function(n){n.D=!1;return n}):l.then(function(n){a.Bd.push(n);return n});return m.return(l)})}
function Et(a,b,c,d,e,f,g){f=f===void 0?!0:f;g=g===void 0?!1:g;var h,k,l,m,n,q,r,u,v,w,z,x,A,D,G;return F(function(H){if(H.g==1){h=null;k=Yc(e);g&&(k.manifest.disableVideo=!0);l=function(){return h.T&&h.C?null:h};m=function(){return l()?l().getConfiguration():a.g};if(a.wa.width!=Infinity||a.wa.height!=Infinity||a.g.ignoreHardwareResolution)return H.A(2);n=T();return C(H,n.Db(),3)}H.g!=2&&(q=H.h,a.wa.width=q.width,a.wa.height=q.height);r=new Vn(k,a.wa,null);u={networkingEngine:a.J,filter:function(B){var I,
O;return F(function(N){if(N.g==1)return C(N,Wn(r,B),2);if(N.g!=4){I=N.h;if(!I)return N.A(0);O=nt("trackschanged");return C(N,Promise.resolve(),4)}h.dispatchEvent(O);E(N)})},makeTextStreamsForClosedCaptions:function(B){return Gt(a,B)},onTimelineRegionAdded:function(B){wp(h.J,B)},onEvent:function(B){return h.dispatchEvent(B)},onError:function(B){return h.onError(B)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.l&&h.T&&a.l.updateDuration()},newDrmInfo:function(B){var I=
h.i,O=I?I.g:null;O&&I.B&&Zn(r,O.keySystem,B)},onManifestUpdated:function(){var B=(new Map).set("isLive",a.U());h.dispatchEvent(nt("manifestupdated",B));Mq(h,!1,function(){if(a.C)a.C.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(B,I,O,N){var P=B;if(B=="com.apple.hls.interstitial"||B=="com.apple.hls.overlay")if(P="com.apple.quicktime.HLS",B={startTime:I,endTime:O,values:N},a.C)a.C.onHLSInterstitialMetadata(a,a.h,B);N=t(N);B=N.next();
for(var J={};!B.done;J={cf:void 0},B=N.next())J.cf=B.value,J.cf.name!="ID"&&Mq(h,!1,function(L){return function(){Ht(a,I,O,P,L.cf)}}(J))},disableStream:function(B){return a.disableStream(B,a.g.streaming.maxDisabledTime)},addFont:function(B,I){return a.addFont(B,I)}};v=new vp(function(){return a.Ta()});v.addEventListener("regionadd",function(B){var I=B.region;It(a,"timelineregionadded",I,h);Mq(h,!1,function(){a.C&&(a.C.onDashTimedMetadata(I),a.C.onDASHInterstitialMetadata(a,a.h,I))})});w=null;k.streaming.observeQualityChanges&&
(w=new qp(function(){return a.Sb()}),w.addEventListener("qualitychange",function(B){Jt(a,B.quality,B.position)}),w.addEventListener("audiotrackchange",function(B){Jt(a,B.quality,B.position,!0)}));z=!0;x={lc:a.J,onError:function(B){return h.onError(B)},rg:function(B){Mq(h,!0,function(){a.D&&Kt(a,B)})},onExpirationUpdated:function(B,I){var O=nt("expirationupdated");h.dispatchEvent(O);if((O=h.j)&&O.onExpirationUpdated)O.onExpirationUpdated(B,I)},onEvent:function(B){h.dispatchEvent(B);B.type=="drmsessionupdate"&&
z&&(z=!1,B=Date.now()/1E3-h.xa,(a.B||h.getStats()).m=B,a.W&&Ac(a.W))}};A=gt(a,l);yi(a.J,A);D=function(){return a.Ld(x)};G={config:k,si:u,Hi:v,Gi:w,Ld:D,ri:r,networkingEngine:A,fh:f};h=new Lq(b,d,c,G);return H.return(h)})}
function vt(a,b){var c,d,e,f;return F(function(g){if(g.g==1)return c=a.g.manifest.retryParameters,C(g,sr(b,a.J,c),2);d=g.h;d=="application/x-mpegurl"&&(e=T(),e.ua()==="WEBKIT"&&(d="application/vnd.apple.mpegurl"));d=="video/quicktime"&&(f=T(),f.ua()==="CHROMIUM"&&(d="video/mp4"));return g.return(d)})}
function Ft(a,b){if(!Nj(T()))return!0;if(b){if((a.h||Oj()).canPlayType(b)=="")return!1;if(!Nj(T())||!Lj.has(b))return!0;if(Ae(b))return T().ua()==="WEBKIT"&&(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(b==="application/dash+xml"||b==="video/vnd.mpeg.dash.mpd")return a.g.streaming.preferNativeDash}return!1}
function Lt(a,b){var c=a.g.textDisplayFactory;a.Ef!==c||(b===void 0?0:b)?(b=a.u,a.u=c(),a.u.configure?a.u.configure(a.g.textDisplayer):U("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.u.setTextLanguage||U("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),b?(a.u.setTextVisibility(b.isTextVisible()),b.destroy().catch(function(){})):a.u.setTextVisibility(a.ba),a.H&&Mo(a.H,a.u),a.Ef=c,a.l&&$p(a.l)):a.u&&a.u.configure&&a.u.configure(a.g.textDisplayer)}
function tt(a){var b,c,d;return F(function(e){if(e.g==1)return T(),pt(a,"media-source"),a.g.mediaSource.useSourceElements&&dm(a.h),Lt(a),b=Mt(a.h,a.u,{Hh: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&&typeof k.cueTime=="number"&&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())Ht(a,l,m,"org.id3",q.value);if(a.C)a.C.onHlsTimedMetadata(k,l)}},Bi:function(f){a.rb&&wp(a.rb,{schemeIdUri:f.schemeIdUri,
startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Di:function(){a.K&&a.K.update&&a.K.update()}},a.W,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Fa=d,C(e,b.M,2);a.H=b;E(e)})}
function Nt(a,b,c){function d(){return Ot(a)}a.j.G(b,"playing",d);a.j.G(b,"pause",d);a.j.G(b,"ended",d);a.j.G(b,"ratechange",function(){var f=a.h.playbackRate;f!=0&&(a.N&&(a.N.set(f),a.m==Pt&&a.o.playbackRateChanged(f),Qt(a,f)),f=nt("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.G(b.remote,"connect",function(){a.l&&b.remote.state=="connected"&&Rt(a);St(a)}),a.j.G(b.remote,"connecting",function(){return St(a)}),a.j.G(b.remote,"disconnect",function(){return F(function(f){if(f.g==1)return a.l&&b.remote.state==
"disconnected"?C(f,nq(a.l),3):f.A(2);f.g!=2&&Rt(a);St(a);E(f)})}));b.audioTracks&&(a.j.G(b.audioTracks,"addtrack",function(){return St(a)}),a.j.G(b.audioTracks,"removetrack",function(){return St(a)}),a.j.G(b.audioTracks,"change",function(){return St(a)}));b.videoTracks&&(a.j.G(b.videoTracks,"addtrack",function(){return St(a)}),a.j.G(b.videoTracks,"removetrack",function(){return St(a)}),a.j.G(b.videoTracks,"change",function(){return St(a)}));(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&
a.j.G(b,"webkitpresentationmodechanged",function(){a.ud&&Lt(a,!0)});if(b.textTracks){var e=function(){a.m===Tt&&a.u instanceof Fr&&Rt(a);St(a)};a.j.G(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Ut(a,f);break;case "chapters":Vt(a,f);break;default:e()}});a.j.G(b.textTracks,"removetrack",e);a.j.G(b.textTracks,"change",e)}b.preload!="none"&&a.j.Ma(b,"loadedmetadata",function(){a.B.F=Date.now()/1E3-c})}
function Bt(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,z,x,A,D,G,H,B,I,O,N,P,J,L,Q,K;return F(function(M){switch(M.g){case 1:pt(a,"load");e=a.h;a.N=new Wo({Pd:function(){return e.playbackRate},dc:function(){return e.defaultPlaybackRate},qf:function(R){e.playbackRate=R},mg:function(R){e.currentTime+=R}});Nt(a,e,b);"onchange"in window.screen&&a.j.G(window.screen,"change",function(){if(a.L.getConfiguration){var R=a.L.getConfiguration();R.hdrLevel=="AUTO"?Wt(a):a.g.preferredVideoHdrLevel=="AUTO"&&a.g.abr.enabled&&
(R.hdrLevel="AUTO",a.L.configure(R),Wt(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=Bc(l));mt(a,a.g,f);a.Qc=a.g.preferredTextLanguage;a.Xc=a.g.preferredTextRole;a.Wc=a.g.preferForcedSubs;Xt(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(R,aa,nb){a.i&&a.l&&R!=a.l.o&&Yt(a,R,!0,aa===void 0?!1:aa,nb===void 0?0:nb)});a.o.setMediaElement(e);a.o.setCmsdManager(a.va);a.l=Zt(a);a.l.configure(a.g.streaming);
a.m=Pt;a.dispatchEvent(nt("streaming"));m=c;case 2:(q=a.l.o)||m||(m=$t(a,!0));r=[];n=q||m;u=t([n.video,n.audio]);for(v=u.next();!v.done;v=u.next())(w=v.value)&&!w.segmentIndex&&(r.push(w.createSegmentIndex()),w.dependencyStream&&r.push(w.dependencyStream.createSegmentIndex()));if(!(r.length>0)){M.A(4);break}return C(M,Promise.all(r),4);case 4:if(!n||n.disabledUntilTime!=0){M.A(2);break}if(a.K&&a.K.onInitialVariantChosen)a.K.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?
a.configure(a.Be):Ta("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."));a.M&&($r(a.M,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),es(a.M,b*1E3));Xt(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Qp(a.l,a.g.playRangeStart,a.g.playRangeEnd);a.Qa=!0;a.dispatchEvent(nt("canupdatestarttime"));z=function(R){a.F=au(a,R);a.ub=bu(a,R);cu(a,e,!1)};
a.g.streaming.startAtSegmentBoundary||(x=a.R,x==null&&a.i.startTime&&(x=a.i.startTime),z(x));if(q){M.A(7);break}if(!a.g.streaming.startAtSegmentBoundary){M.A(8);break}A=a.i.presentationTimeline;a.R instanceof Date&&(G=A.m||A.i,H=a.R.getTime()/1E3-G,H!=null&&(D=H));D==null&&(D=typeof a.R==="number"?a.R:a.h.currentTime);a.R==null&&a.i.startTime&&(D=a.i.startTime);B=A.qb();I=A.ab();D<B?D=B:D>I&&(D=I);return C(M,du(m,D),9);case 9:O=M.h,z(O);case 8:Yt(a,m,!0,!1,0);case 7:return a.F.ready(),N=a.Ub().find(function(R){return R.active}),
N||((P=Gf(a.i.textStreams,a.Qc,a.Xc,a.Wc)[0]||null)&&Eq(a.B.h,P,!0),m&&(P?(Kf(m.audio,P,a.g)&&(a.ba=!0),a.ba&&a.u.setTextVisibility(!0)):(a.ba=!1,a.u.setTextVisibility(!1)),eu(a)),P&&(a.g.streaming.alwaysStreamText||a.Te())&&(Zp(a.l,P),fu(a))),C(M,a.l.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),gu(a));St(a);a.i.variants.some(function(R){return R.primary});if((J=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)L=
function(){return hu(a)},a.j.G(e,"timeupdate",L);J||(Q=function(){return iu(a)},a.j.G(e,"timeupdate",Q),iu(a),a.i.nextUrl&&(a.g.streaming.preloadNextUrlWindow>0&&(K=function(){var R;return F(function(aa){if(aa.g==1){R=a.Ta().end-a.h.currentTime;if(isNaN(R)||!(R<=a.g.streaming.preloadNextUrlWindow))return aa.A(0);a.j.cb(e,"timeupdate",K);return C(aa,a.preload(a.i.nextUrl),4)}a.Ra=aa.h;E(aa)})},a.j.G(e,"timeupdate",K)),a.j.G(e,"ended",function(){a.load(a.Ra||a.i.nextUrl)})));if(a.C)a.C.onManifestUpdated(J);
E(M)}})}function zt(a,b){var c,d,e;return F(function(f){return f.g==1?(c=Date.now()/1E3,d=!0,a.D=a.Ld({lc:a.J,onError:function(g){st(a,g)},rg:function(){},onExpirationUpdated:function(){var g=nt("expirationupdated");a.dispatchEvent(g)},onEvent:function(g){a.dispatchEvent(g);g.type=="drmsessionupdate"&&d&&(d=!1,a.B.m=Date.now()/1E3-c)}}),a.D.configure(a.g.drm),e=Lf([b]),a.D.ba=!0,C(f,Lm(a.D,[e],[]),2)):C(f,a.D.Nb(a.h),0)})}
function Ct(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;return F(function(v){switch(v.g){case 1:pt(a,"src-equals");d=a.h;a.F=new gp(d);e=!1;a.wd.push(function(){e=!0});a.dispatchEvent(nt("canupdatestarttime"));a.R!=null&&a.F.ye(a.R);a.ub=ju(a,a.R||0);a.N=new Wo({Pd:function(){return d.playbackRate},dc:function(){return d.defaultPlaybackRate},qf:function(w){d.playbackRate=w},mg:function(w){d.currentTime+=w}});cu(a,d,!0);d.textTracks&&(Lt(a),f=function(w){if(!(a.u instanceof Fr)){var z=ku(a).find(function(x){return x.mode!==
"disabled"});z&&(z.mode=w?"showing":"hidden");a.u instanceof Hr&&(z=lu(a))&&(z.mode=!w&&a.u.isTextVisible()?"showing":"hidden")}},a.j.G(d,"enterpictureinpicture",function(){return f(!0)}),a.j.G(d,"leavepictureinpicture",function(){return f(!1)}),d.remote?(a.j.G(d.remote,"connect",function(){return f(!1)}),a.j.G(d.remote,"connecting",function(){return f(!1)}),a.j.G(d.remote,"disconnect",function(){return f(!1)})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.j.G(d,"webkitcurrentplaybacktargetiswirelesschanged",
function(){return f(!1)}),g=d,(g.webkitPresentationMode||g.webkitSupportsFullscreen)&&a.j.G(g,"webkitpresentationmodechanged",function(){g.webkitPresentationMode?f(g.webkitPresentationMode!=="inline"):g.webkitSupportsFullscreen&&f(g.webkitDisplayingFullscreen)}));Nt(a,d,b);h=gs(a.M,a.Z,c);!h.includes("#t=")&&(a.g.playRangeStart>0||isFinite(a.g.playRangeEnd))&&(h+="#t=",a.g.playRangeStart>0&&(h+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(h+=","+a.g.playRangeEnd));if(!a.H){v.A(2);break}return C(v,
a.H.destroy(),3);case 3:a.H=null;case 2:return dm(d),d.src=h,k=T(),k.Ha()=="TV"&&d.load(),d.preload!="none"&&!d.autoplay&&Ae(c)&&k.ua()==="WEBKIT"&&d.load(),a.m=Tt,a.dispatchEvent(nt("streaming")),l=new ii,Yo(d,HTMLMediaElement.HAVE_METADATA,a.j,function(){a.F.ready();a.ea&&Ae(a.ea)||l.resolve()}),m=function(){return new Promise(function(w){var z=new Oe(w);a.j.G(d.textTracks,"change",function(){return z.ka(.5)});z.ka(.5)})},Yo(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.j,function(){var w,z,x,A,D;return F(function(G){if(G.g==
1)return C(G,m(),2);if(e)return G.return();mu(a);w=ku(a);w.some(function(H){return H.mode==="showing"})&&(a.ba=!0,a.u.setTextVisibility(!0));if(!(a.u instanceof Fr))for(w.length&&(a.u.enableTextDisplayer?a.u.enableTextDisplayer():U("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),z=!1,x=t(w),A=x.next();!A.done;A=x.next())D=A.value,D.mode!=="disabled"&&(z?(D.mode="disabled",Ta("Found more than one enabled text track, disabling it",D)):(nu(a,D),z=
!0));ou(a);a.ea&&Ae(a.ea)&&l.resolve();E(G)})}),d.error?l.reject(rt(a)):d.preload=="none"&&(Ta('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),l.resolve()),a.j.Ma(d,"error",function(){l.reject(rt(a))}),C(v,Se(a.g.streaming.loadTimeout,l),4);case 4:if((n=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||
a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return hu(a)},a.j.G(d,"timeupdate",q);n||(r=function(){return iu(a)},a.j.G(d,"timeupdate",r),iu(a));a.C&&(a.C.onManifestUpdated(n),n&&(u=a.Ta().end,a.j.G(d,"progress",function(){var w=a.Ta().end;u!=w&&(a.C.onManifestUpdated(a.U()),u=w)})));a.Qa=!0;E(v)}})}function mu(a){var b=a.g.preferredAudioLanguage;b!=""&&a.Dg(b,a.g.preferredAudioRole)}
function ou(a){var b=a.g.preferredTextLanguage;b!=""&&a.Eg(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function Ut(a,b){if(b.kind=="metadata"){b.mode="hidden";a.j.G(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ht(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={Pb:void 0},f=e.next())g.Pb=f.value,g.Pb.type=="com.apple.quicktime.HLS"&&g.Pb.startTime!=null&&(f=d.find(function(h){return function(k){return k.startTime==h.Pb.startTime&&k.endTime==h.Pb.endTime}}(g)),
f||(f={startTime:g.Pb.startTime,endTime:g.Pb.endTime,values:[]},d.push(f)),f.values.push(g.Pb.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return h.key=="X-ASSET-URI"||h.key=="X-ASSET-LIST"})&&a.C&&(e.values.push({key:"CUE",description:"",data:e.startTime!=0||a.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.C.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new Oe(function(){var d=pu(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).$b().ka(.5);
a.wd.push(function(){c.stop()})}}function yt(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(nt(c,b))}function Ht(a,b,c,d,e){a.xa&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),wp(a.xa,b))}function Vt(a,b){if(b&&b.kind=="chapters"){b.mode="hidden";var c=(new Oe(function(){b.mode="hidden"})).$b().ka(.5);a.wd.push(function(){c.stop()})}}
p.Li=function(){for(var a=this.ma;a.g;)a.release()};p.Ld=function(a){return new Gm(a)};
function gt(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?Mq(b(),!0,f):f()}b||(b=function(){return null});var e=new ui(function(f,g,h,k,l){d(function(){a.o&&a.o.segmentDownloaded(f,g,h,k,l)})},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(nt("downloadheadersreceived",g));d(function(){if(a.va){var k=a.va;if(k.h.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;l<n.length;l++){var q=n[l].split("=");
m.set(q[0],bt(q[1]))}}catch(z){}if(m=f["cmsd-dynamic"]){a:{try{var r=new Map,u=m.split(";");for(m=1;m<u.length;m++){var v=u[m].split("=");r.set(v[0],bt(v[1]))}var w=r;break a}catch(z){w=null;break a}w=void 0}w&&(k.g=w)}}}})},function(f,g){f=(new Map).set("request",f).set("response",g);c(nt("downloadcompleted",f))},function(f,g,h,k){f=(new Map).set("request",f).set("error",g).set("httpResponseCode",h).set("aborted",k);c(nt("downloadfailed",f))},function(f,g,h){d(function(){if(a.M){var k=a.M,l=h;l=
l===void 0?{}:l;if(k.g.enabled)if(g.method==="HEAD")Ds(k,g,{});else switch(f){case 0:try{if(k.g.enabled){if(l.type){a:{switch(l.type){case 4:var m=k.o?bs:as;break a;case 3:case 2:m=k.o?ds:cs;break a;case 5:m="s";break a}m=void 0}k.l=m}Ds(k,g,{ot:ks,su:!k.C})}}catch(q){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",q)}break;case Fi:try{if(k.g.enabled){var n=Ss(k,l,g.uris[0]);n.ts=Date.now();k.D.set(g,n.ts);Ds(k,g,n)}}catch(q){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",
q)}break;case 2:case 5:case 6:Ds(k,g,{ot:"k"});break;case 4:Ds(k,g,{ot:"o"})}}})},function(f,g,h,k){(f=b()?b().j:a.K)&&f.banLocation&&f.banLocation(k)},function(f,g,h){if(g.data){var k=g.data.byteLength,l=b()?b().getStats():a.B;l&&(Jq(l,k),f===0&&(l.hg=k));k=a.M;h=h===void 0?{}:h;if(rs(k).length!==0)switch(f){case Fi:try{var m=Ss(k,h,g.uri);g.originalRequest&&g.originalRequest.timeToFirstByte!=null&&(m.ttfb=g.originalRequest.timeToFirstByte);g.timeMs!=null&&(m.ttlb=g.timeMs);var n=g.originalUri||
g.uri;if(n.includes("CMCD="))try{var q=new URL(n);q.searchParams.delete("CMCD");var r=q.toString()}catch(B){r=n}else r=n;m.url=r;k.D.has(g.originalRequest)?(m.ts=k.D.get(g.originalRequest),k.D.delete(g.originalRequest)):m.ts||(m.ts=Date.now());var u=rs(k);if(u.length!==0){var v=k.g.version==us?Array.from(new Set([].concat(y(vs),y(Ws)))):Hs;m.rc=g.status||0;var w=ts(k,m,ss);g.headers&&g.headers["CMSD-Static"]&&(w.cmsds=btoa(g.headers["CMSD-Static"]));g.headers&&g.headers["CMSD-Dynamic"]&&(w.cmsdd=
btoa(g.headers["CMSD-Dynamic"]));for(var z=t(u),x=z.next();!x.done;x=z.next()){var A=x.value,D=xs(A.includeKeys||[],v),G=Fs(A);k.m[G]||(k.m[G]={request:1,response:1});w.sn=k.m[G].response++;var H=zs(w,D);Cs(k,H,A,g)}}}catch(B){Va("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",B)}}}});e.configure(a.g.networking);return e}
function au(a,b){return new jp(a.h,a.i,a.g.streaming,b,function(){a.ub&&pp(a.ub,!a.F.Bf());a.l&&a.l.sc();a.T&&qu(a,"seeking")},function(c){return a.dispatchEvent(c)})}
function bu(a,b){var c=a.U()||typeof b==="number"&&b>0;b=new ar(a.td,c);b.addEventListener("enter",function(f){It(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){It(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(It(a,"timelineregionenter",g),It(a,"timelineregionexit",g))});var d=new ar(a.xa,c);d.addEventListener("enter",function(f){yt(a,f.region,"metadata")});c=new ar(a.rb,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",
f.region.emsg);a.dispatchEvent(nt("emsg",f))});var e=new op(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.sd&&e.g.add(a.sd);return e}function ju(a,b){b=new ar(a.xa,b instanceof Date||b>0);b.addEventListener("enter",function(d){yt(a,d.region,"metadata")});var c=new op(a.h);c.g.add(b);return c}
function cu(a,b,c){a.T=new sn;vn(a.T,un);ru(a);ut(a);a.Fa=new Oe(function(){qu(a)});a.g.streaming.rebufferingGoal&&a.Fa.Ba(.25);a.j.G(b,"waiting",function(){return qu(a,"waiting")});a.j.G(b,"canplaythrough",function(){return qu(a,"canplaythrough")});a.j.G(b,"playing",function(){return qu(a,"playing")});a.j.G(b,"seeked",function(){return qu(a,"seeked")});c&&(a.j.G(b,"stalled",function(){return qu(a,"stalled")}),a.j.G(b,"progress",function(){return qu(a,"progress")}),a.j.G(b,"timeupdate",function(){return qu(a,
"timeupdate")}))}function ru(a){var b=a.g.streaming.rebufferingGoal;a.T.i.set(tn,Math.min(.5,b/2)).set(un,b)}function qu(a,b){if(a.g.streaming.rebufferingGoal){b=a.H?io(a.H):!1;b=a.gd()||b||a.F.cg();var c=Ln(a.h.buffered,a.h.currentTime),d=a.T,e=d.i.get(d.g);vn(d,b||c>=e&&c>0?tn:un)&&ut(a)}else if(b){c=void 0;switch(b){case "seeking":case "waiting":c=un;break;case "canplaythrough":case "playing":case "seeked":c=tn}c!==void 0&&vn(a.T,c)&&ut(a)}}function Mt(a,b,c,d,e){return new bo(a,b,c,e,d)}
function Zt(a){return new Kp(a.i,{Eb:function(){return a.F?a.F.Fd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},ib:function(){return a.ib()},video:a.h,S:a.H,lc:a.J,onError:function(b){return st(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ge:function(b,c,d){var e=b.startTime,f=b.endTime,g=c.type;if(g!=uc){if(a.F){a.F.og();var h=po(a.H,g);!a.U()&&a.h.paused&&!a.h.seeking&&h!=null&&h>0&&a.F.Fd()<h&&a.F.ye(h)}qu(a)}d=(new Map).set("start",e).set("end",f).set("contentType",
g).set("isMuxed",d);a.dispatchEvent(nt("segmentappended",d));a.o&&c.fastSwitching&&b.mc&&b.hd&&a.o.trySuggestStreams()},Ci:function(b,c){(c=c.Ue)&&a.sd&&sp(a.sd,c,b)},If:function(b,c){var d=a.D;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new Vh(V(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(c==0)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;Um(d,"cenc",c);d=
d.l}}else d=Promise.resolve();return d},disableStream:function(b,c){return a.disableStream(b,c)},Vi:function(b,c){return a.g.abr.enabled&&c.fastSwitching&&b.mc&&b.hd?!1:!0}})}
p.configure=function(a,b){var c=this.getConfiguration();arguments.length==2&&typeof a=="string"&&(a=cl(a,b));"preferredVariantRole"in a&&(U("preferredVariantRole configuration","Please Use preferredAudioRole instead."),a.preferredAudioRole=a.preferredVariantRole,delete a.preferredVariantRole);a.streaming&&"forceTransmuxTS"in a.streaming&&(U("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,
delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(U("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);if(a.streaming&&"useNativeHlsOnSafari"in a.streaming){U("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var d=T();a.streaming.preferNativeHls=
a.streaming.useNativeHlsOnSafari&&d.ua()==="WEBKIT";delete a.streaming.useNativeHlsOnSafari}a.streaming&&typeof a.streaming.liveSync=="boolean"&&(U("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),d=a.streaming.liveSync,a.streaming.liveSync={},a.streaming.liveSync.enabled=d);if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){d=a.streaming.liveSyncMinLatency||0;var e=Math.abs((a.streaming.liveSyncMaxLatency||
1)-d)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=d+e;a.streaming.liveSync.targetLatencyTolerance=e}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(U("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMaxLatency);a.streaming&&"liveSyncMinLatency"in a.streaming&&(U("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),
delete a.streaming.liveSyncMinLatency);a.streaming&&"liveSyncTargetLatency"in a.streaming&&(U("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatency=a.streaming.liveSyncTargetLatency,delete a.streaming.liveSyncTargetLatency);a.streaming&&"liveSyncTargetLatencyTolerance"in a.streaming&&(U("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),
a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatencyTolerance=a.streaming.liveSyncTargetLatencyTolerance,delete a.streaming.liveSyncTargetLatencyTolerance);a.streaming&&"liveSyncPlaybackRate"in a.streaming&&(U("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.maxPlaybackRate=a.streaming.liveSyncPlaybackRate,delete a.streaming.liveSyncPlaybackRate);a.streaming&&"liveSyncMinPlaybackRate"in
a.streaming&&(U("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.minPlaybackRate=a.streaming.liveSyncMinPlaybackRate,delete a.streaming.liveSyncMinPlaybackRate);a.streaming&&"liveSyncPanicMode"in a.streaming&&(U("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicMode=a.streaming.liveSyncPanicMode,
delete a.streaming.liveSyncPanicMode);a.streaming&&"liveSyncPanicThreshold"in a.streaming&&(U("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicThreshold=a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){U("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");
var f=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return f};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(U("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&"parsePrftBox"in a.streaming&&(U("streaming.parsePrftBox configuration","Now fired without needing a configuration."),
delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(U("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),a.manifest.enableAudioGroups=a.manifest.dash.enableAudioGroups,delete a.manifest.dash.enableAudioGroups);a.streaming&&"dispatchAllEmsgBoxes"in a.streaming&&(U("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.dispatchAllEmsgBoxes=
a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in a.streaming&&(U("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),a.streaming.lowLatencyMode=a.streaming.autoLowLatencyMode,delete a.streaming.autoLowLatencyMode);a.manifest&&a.manifest.dash&&"ignoreSupplementalCodecs"in a.manifest.dash&&(U("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),
a.manifest.ignoreSupplementalCodecs=a.manifest.dash.ignoreSupplementalCodecs,delete a.manifest.dash.ignoreSupplementalCodecs);a.manifest&&a.manifest.hls&&"ignoreSupplementalCodecs"in a.manifest.hls&&(U("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),a.manifest.ignoreSupplementalCodecs=a.manifest.hls.ignoreSupplementalCodecs,delete a.manifest.hls.ignoreSupplementalCodecs);a.manifest&&a.manifest.dash&&"updatePeriod"in a.manifest.dash&&(U("manifest.dash.updatePeriod configuration",
"Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.dash.updatePeriod,delete a.manifest.dash.updatePeriod);a.manifest&&a.manifest.hls&&"updatePeriod"in a.manifest.hls&&(U("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.hls.updatePeriod,delete a.manifest.hls.updatePeriod);a.manifest&&a.manifest.dash&&"ignoreDrmInfo"in a.manifest.dash&&(U("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),
a.manifest.ignoreDrmInfo=a.manifest.dash.ignoreDrmInfo,delete a.manifest.dash.ignoreDrmInfo);if(a.drm&&a.drm.advanced){d=!1;for(var g in a.drm.advanced){var h=a.drm.advanced[g];e=h.videoRobustness;h=h.audioRobustness;"videoRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].videoRobustness)&&(a.drm.advanced[g].videoRobustness=[e],d=!0);"audioRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].audioRobustness)&&(a.drm.advanced[g].audioRobustness=[h],d=!0)}d&&U("AdvancedDrmConfiguration's videoRobustness and audioRobustness",
"These properties are no longer strings but array of strings, please update your usage of these properties.")}a.streaming&&"forceHTTP"in a.streaming&&(U("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTP=a.streaming.forceHTTP,delete a.streaming.forceHTTP);a.streaming&&"forceHTTPS"in a.streaming&&(U("streaming.forceHTTPS configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTPS=
a.streaming.forceHTTPS,delete a.streaming.forceHTTPS);a.streaming&&"minBytesForProgressEvents"in a.streaming&&(U("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),a.networking=a.networking||{},a.networking.minBytesForProgressEvents=a.streaming.minBytesForProgressEvents,delete a.streaming.minBytesForProgressEvents);g=ll(this.g,a,ft(this));su(this,c);return g};p.mh=function(a){this.Be=a};
function su(a,b){a.xd=new Vn(a.g,a.wa,a.D);if(a.K){var c=Yc(a.g.manifest);a.h&&a.h.nodeName==="AUDIO"&&(c.disableVideo=!0);a.K.configure(c)}a.D&&a.D.configure(a.g.drm);if(a.l){a.l.configure(a.g.streaming);try{a.m!=ot&&Xn(a.xd,a.i)&&St(a)}catch(e){st(a,e)}a.o&&Wt(a);c=a.l.o;!c||c.allowedByApplication&&c.allowedByKeySystem||kt(a)}a.J&&a.J.configure(a.g.networking);a.H&&(a.H.configure(a.g.mediaSource),a.H.Fa=a.g.manifest.segmentRelativeVttTiming);a.u&&Lt(a);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?
a.o.enable():a.o.disable(),gu(a));a.T&&ru(a);a.Fa&&(a.g.streaming.rebufferingGoal?a.Fa.Ba(.25):a.Fa.stop());a.i&&Xt(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.C&&a.C.configure(a.g.ads);a.M&&a.M.configure(a.g.cmcd);a.va&&a.va.configure(a.g.cmsd);a.Ca&&a.Ca.configure(a.g.queue);if(a.m==Pt&&a.L.getConfiguration){c=a.L.getConfiguration();var d=!1;b.preferredVideoHdrLevel!=a.g.preferredVideoHdrLevel&&c.hdrLevel!=a.g.preferredVideoHdrLevel&&(c.hdrLevel=a.g.preferredVideoHdrLevel,d=
!0);b.preferredVideoLayout!=a.g.preferredVideoLayout&&c.videoLayout!=a.g.preferredVideoLayout&&(c.videoLayout=a.g.preferredVideoLayout,d=!0);b.preferSpatialAudio!=a.g.preferSpatialAudio&&c.spatialAudio!=a.g.preferSpatialAudio&&(c.spatialAudio=a.g.preferSpatialAudio,d=!0);b.preferredVideoRole!=a.g.preferredVideoRole&&c.videoRole!=a.g.preferredVideoRole&&(c.videoRole=a.g.preferredVideoRole,d=!0);d&&(a.L.configure(c),kt(a))}}p.getConfiguration=function(){var a=ft(this);ll(a,this.g,ft(this));return a};
p.Ah=function(){return this.Be};p.Oh=function(){var a=ft(this);ll(a,this.g,ft(this));return el(this.g,ft(this))};p.Tf=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Ta().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};
p.Ni=function(){var a=this.getConfiguration(),b;for(b in this.g)delete this.g[b];ll(this.g,ft(this),ft(this));su(this,a)};p.Ih=function(){return this.m};p.Wf=function(){return this.i?this.i.type:null};p.Mh=function(){return this.h};p.Nh=function(){return this.J};p.Nd=function(){return this.Z};p.ph=function(){return this.C?this.C:null};p.Th=function(){return this.Ca?this.Ca:null};
p.U=function(){return this.i&&!this.qa()?this.i.presentationTimeline.U():this.h&&(this.h.src||this.qa())?this.h.duration==Infinity:!1};p.Gc=function(){return this.i?this.i.presentationTimeline.Gc():!1};p.ii=function(){if(this.i&&!this.qa()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&(this.h.src||this.qa())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1};
p.oi=function(){if(this.i&&!this.qa()){var a=this.i.variants;if(!a.length)return!1;a=a[0];return a.audio||!a.video?!1:!a.video.codecs.includes(",")}return this.h&&(this.h.src||this.qa())&&this.h.audioTracks?this.h.audioTracks.length==0:!1};
p.Ta=function(){if(this.i&&!this.qa()){if(!this.Qa&&this.i.type=="HLS")return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.qb(),end:a.ab()}}if(this.h&&(this.h.src||this.qa())&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};p.di=function(){this.U()&&(this.h.currentTime=this.Ta().end)};p.ji=function(){return this.Qa};
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.D?this.D.g:null};p.Ne=function(){return this.D?this.D.Ne():Infinity};p.Me=function(){return this.D?this.D.Me():[]};p.Od=function(){return this.D?this.D.Od():{}};p.dg=function(){return this.T?this.T.g==un:!!this.Z};p.ib=function(){return this.h?this.N?this.N.i:1:0};p.zf=function(a){this.m==Pt&&this.l&&Wp(this.l,a)};
p.qd=function(a,b){b=b===void 0?!0:b;a==0?Ta("A trick play rate of 0 is unsupported!"):(this.N.set(a),this.m==Pt&&(this.o.playbackRateChanged(a),this.zf(b&&a!=1)),Qt(this,a))};p.Yc=function(){var a=this.N.dc();this.m==Tt&&this.N.set(a);this.m==Pt&&(this.N.set(a),this.o.playbackRateChanged(a),this.zf(!1));this.kc.Xa()};
p.Gb=function(){if(this.i&&!this.qa()){for(var a=this.l?this.l.o:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Ef(e)){var f=xf(e);f.active=e==a;f.active||c==1||a==null||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}if(this.h&&this.h.audioTracks){var g=tu(this);a=Array.from(this.h.audioTracks);return a.length?a.map(function(h){return Df(h,g)}):g?[Df(null,g)]:[]}return[]};
p.Ub=function(){if(this.i){if(this.qa())return[];for(var a=this.l?this.l.B:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=yf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?ku(this).map(function(f){return Cf(f)}):[]};p.Fh=function(){var a=this.Cd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return zf(b)})};
p.qh=function(a){var b=this,c,d;return F(function(e){if(e.g==1)return C(e,uu(b,a),2);c=e.h;if(!c)return e.return(null);d=[];c.segmentIndex.Rb(function(f){var g=vu(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.columns,k=f.h-f.startTime,l=0;l<h;l++){var m=wu(f,c,f.startTime+k*l/h,g);d.push(m)}});c.closeSegmentIndex&&c.closeSegmentIndex();return e.return(d)})};function vu(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
p.Zh=function(a,b){var c=this,d,e,f,g,h,k;return F(function(l){if(l.g==1)return C(l,uu(c,a),2);d=l.h;if(!d)return l.return(null);d.closeSegmentIndex&&(c.Ic.has(d)||(e=new Oe(function(){d.closeSegmentIndex();c.Ic.delete(d)}),c.Ic.set(d,e)),f=c.Ic.get(d),f.ka(5));g=d.segmentIndex.find(b);if(g==null)return l.return(null);h=d.segmentIndex.get(g);return(k=vu(h.tilesLayout||d.tilesLayout))?l.return(wu(h,d,b,k)):l.return(null)})};
function uu(a,b){var c,d;return F(function(e){if(e.g==1){if(a.m!=Pt&&a.m!=Tt)return e.return(null);c=a.Cd;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return e.return(null);b!=null&&(d=c.find(function(f){return f.id==b}));return d?d.segmentIndex?e.A(2):C(e,d.createSegmentIndex(),2):e.return(null)}return e.return(d)})}
function wu(a,b,c,d){var e=b.width||0,f=b.height||0,g=e/d.columns,h=f/d.rows,k=d.columns*d.rows,l=a.h-a.startTime;l=a.C||l/k;var m=a.startTime,n=0,q=0;k>1&&(q=Math.floor((c-a.startTime)/l),m=a.startTime+q*l,n=q%d.columns*g,q=Math.floor(q/d.columns)*h);d=!1;if(c=a.thumbnailSprite)d=!0,h=c.height,n=c.positionX,q=c.positionY,g=c.width;return{segment:a,imageHeight:f,imageWidth:e,height:h,positionX:n,positionY:q,startTime:m,duration:l,uris:a.Ia(),startByte:a.Ec(),endByte:a.Cc(),width:g,sprite:d,mimeType:a.mimeType||
b.mimeType,codecs:a.codecs||b.codecs}}
p.pf=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.l.B&&(Eq(c.B.h,d,!1),Zp(c.l,d),Rt(c),fu(c),c.Qc=d.language)}var c=this;if(this.i&&this.F&&(b(),!this.qa()))return;(function(){if(c.h&&c.h.textTracks){var d=ku(c),e=d.find(function(h){return Af(h)===a.id});if(e){if(c.u instanceof Fr){d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f===e?c.ba?"showing":"hidden":"disabled";f.mode!==g&&(f.mode=g)}}else d=d.find(function(h){return h.mode!=="disabled"}),
d!==e&&(d&&(d.mode="disabled",c.j.cb(d,"cuechange"),c.u.remove(0,Infinity)),e&&nu(c,e));Rt(c);fu(c)}}})()};
function nu(a,b){a.j.G(b,"cuechange",function(){a.u.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},d=[],e=Array.from(b.activeCues||[]);e=t(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(f.endTime===Infinity||f.endTime<f.startTime)f=null;else{var g=new Hd(f.startTime,f.endTime,f.text);g.line=typeof f.line==="number"?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
Nd:1;g.position=typeof f.position==="number"?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;f.vertical==="lr"?g.writingMode="vertical-lr":f.vertical==="rl"&&(g.writingMode="vertical-rl");f.region&&(g.region.id=f.region.id,g.region.height=f.region.lines,g.region.heightUnits=2,g.region.regionAnchorX=f.region.regionAnchorX,g.region.regionAnchorY=f.region.regionAnchorY,g.region.scroll=f.region.scroll,g.region.viewportAnchorX=f.region.viewportAnchorX,
g.region.viewportAnchorY=f.region.viewportAnchorY,g.region.viewportAnchorUnits=Pc,g.region.width=f.region.width,g.region.widthUnits=Pc);Ud(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.u.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
p.oe=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&Ef(f)){var g=e.l.o;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount&&g.audio.label==f.audio.label)&&Ta("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.qa()?Yt(e,f,!1,!1,0):Yt(e,f,!1,b||!1,c||0);e.L.configure({language:f.language,
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",videoRole:f.video&&f.video.roles&&f.video.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,hdrLevel:f.video&&f.video.hdr?f.video.hdr:"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1,videoLayout:f.video&&f.video.videoLayout?f.video.videoLayout:"",audioLabel:f.audio&&f.audio.label?f.audio.label:"",videoLabel:f.video&&f.video.label?f.video.label:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,
audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:"",activeAudioCodec:g.audio&&g.audio.codecs?g.audio.codecs:"",activeAudioChannelCount:g.audio&&g.audio.channelsCount?g.audio.channelsCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount});Wt(e)}}var e=this;b=b===void 0?!1:b;c=c===void 0?0:c;if(this.i&&this.F&&(d(),!this.qa()))return;(function(){if(a.originalAudioId&&e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=t(f);for(var g=f.next();!g.done;g=
f.next())if(g=g.value,Af(g)==a.id){xu(e,g);break}}})()};
p.Pi=function(a,b){function c(){var e=d.L.getConfiguration();e.audioCodec=a.codecs||"";e.audioLabel=a.label||"";e.channelCount=a.channelsCount||0;e.language=a.language;e.role=a.roles[0]||"";e.spatialAudio=a.spatialAudio;d.L.configure(e);kt(d,!0,b,!1,!1)}var d=this;b=b===void 0?0:b;if(this.i&&this.F&&(c(),!this.qa()))return;(function(){if(d.h&&d.h.audioTracks){var e=Ve(a.language),f=Array.from(d.h.audioTracks),g=null;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=h.language||"und";if(h.label==
a.label&&Ve(k)==e&&h.kind==a.roles[0]){g=h;break}}g&&xu(d,g)}})()};
p.getAudioTracks=function(){if(this.i&&!this.qa()){var a=this.Gb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.m!=Pt||this.qa()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&(f.audioCodec||re.includes(f.audioMimeType||""))}));if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalAudioId;e||d.audioId==null||(e=String(d.audioId));!e&&d.codecs.includes(",")&&d.audioCodec&&(e="muxed-in-video");
e&&(e+=[d.language,d.label,d.channelsCount,d.spatialAudio].join("_"),a.set(e,{active:d.active,language:d.language,label:d.label,mimeType:d.audioMimeType,codecs:d.audioCodec,primary:d.primary,roles:d.audioRoles||[],accessibilityPurpose:d.accessibilityPurpose,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,originalLanguage:d.originalLanguage}))}return Array.from(a.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(f){var g=
f.language;g={active:f.enabled,language:Ve(g||"und"),label:f.label,mimeType:null,codecs:null,primary:f.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:g};f.kind&&g.roles.push(f.kind);f.configuration&&(f.configuration.codec&&(g.codecs=f.configuration.codec),f.configuration.sampleRate&&(g.audioSamplingRate=f.configuration.sampleRate),f.configuration.numberOfChannels&&(g.channelsCount=f.configuration.numberOfChannels));return g}):
[]};
p.Ri=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?0:c;var d=this.Gb();if(d.length){var e=d.find(function(f){return f.active});e&&(d=d.find(function(f){return f.audioId===e.audioId&&(f.videoBandwidth||f.bandwidth)==a.bandwidth&&f.width==a.width&&f.height==a.height&&f.frameRate==a.frameRate&&f.pixelAspectRatio==a.pixelAspectRatio&&f.hdr==a.hdr&&f.colorGamut==a.colorGamut&&f.videoLayout==a.videoLayout&&f.videoMimeType==a.mimeType&&f.videoCodec==a.codecs&&bb(f.videoRoles,a.roles)&&f.videoLabel==a.label}))&&
!d.active&&this.oe(d,b,c)}};
p.getVideoTracks=function(){if(this.m==Tt||this.qa())return[];var a=this.Gb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a.filter(function(f){return f.originalAudioId===b.originalAudioId&&f.audioId===b.audioId&&f.audioGroupId===b.audioGroupId&&f.videoCodec});if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalVideoId;e||d.videoId==null||(e=String(d.videoId));e&&a.set(e,{active:d.active,bandwidth:d.videoBandwidth||
d.bandwidth,width:d.width,height:d.height,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,mimeType:d.videoMimeType,codecs:d.videoCodec,roles:d.videoRoles||[],label:d.videoLabel})}return Array.from(a.values())};p.sh=function(){return yu(this.Gb())};p.Xh=function(){return yu(this.Ub())};p.rh=function(){return Array.from(zu(this.Gb()))};p.Wh=function(){return Array.from(zu(this.Ub()))};
p.Dg=function(a,b,c,d,e,f,g){function h(){function l(u,v){return u.video||v.video?u.video&&v.video?Math.abs((u.video.height||0)-(v.video.height||0))+Math.abs((u.video.width||0)-(v.video.width||0)):Infinity:0}var m=k.l.o;k.L=k.g.adaptationSetCriteriaFactory();k.L.configure({language:a,role:b||"",videoRole:m.video&&m.video.roles&&m.video.roles[0]||"",channelCount:c||0,hdrLevel:"",spatialAudio:f||!1,videoLayout:"",audioLabel:g||"",videoLabel:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,
audioCodec:e||"",activeAudioCodec:m.audio&&m.audio.codecs?m.audio.codecs:"",activeAudioChannelCount:m.audio&&m.audio.channelsCount?m.audio.channelsCount:0,preferredAudioCodecs:k.g.preferredAudioCodecs,preferredAudioChannelCount:k.g.preferredAudioChannelCount});var n=k.L.create(k.i.variants),q=null;n=t(n.values());for(var r=n.next();!r.done;r=n.next())r=r.value,Ef(r)&&(!q||l(q,m)>l(r,m))&&(q=r);q!=m&&(q?(m=xf(q),k.oe(m,!0,d||0)):kt(k))}var k=this;c=c===void 0?0:c;d=d===void 0?0:d;e=e===void 0?"":e;
f=f===void 0?!1:f;g=g===void 0?"":g;if(this.i&&this.F&&(h(),!this.qa()))return;(function(){if(k.h&&k.h.audioTracks){var l=Gf(k.Gb(),a,b||"",!1)[0];l&&k.oe(l)}})()};p.Eg=function(a,b,c){function d(){e.Qc=a;e.Xc=b||"";e.Wc=c||!1;var f=Gf(e.i.textStreams,e.Qc,e.Xc,e.Wc)[0]||null;f&&f!=e.l.B&&(Eq(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.Te())&&(Zp(e.l,f),Rt(e),fu(e))}var e=this;c=c===void 0?!1:c;if(this.i&&this.F&&(d(),!this.qa()))return;(function(){var f=Gf(e.Ub(),a,b||"",c||!1)[0];f&&e.pf(f)})()};
p.Qi=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}f!=null&&(e.L=e.g.adaptationSetCriteriaFactory(),e.L.configure({language:f.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),
kt(e,b,c))}var e=this;b=b===void 0?!0:b;c=c===void 0?0:c;if(this.i&&this.F&&(d(),!this.qa()))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&&xu(e,g)}})()};p.Te=function(){var a=this.ba;return this.u?this.u.isTextVisible():a};p.yh=function(){return this.sb.map(function(a){return yf(a)})};
p.wh=function(a){U("getChapters","Please use an getChaptersAsync.");if(!this.sb.length)return[];var b=Ve(a);a=this.sb.filter(function(f){return Ve(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.Rb(function(f){var g=f.Ia()[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.xh=function(a){var b=this,c,d,e,f,g,h,k;return F(function(l){switch(l.g){case 1:if(!b.sb.length)return l.return([]);c=Ve(a);d=b.sb.filter(function(m){return Ve(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=t(d);h=g.next();case 2:if(h.done){l.A(4);break}k=h.value;if(k.segmentIndex){l.A(5);break}return C(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Rb(function(m){var n=m.Ia()[0],q=m.startTime+"-"+m.endTime+"-"+n;m={id:q,title:n,startTime:m.startTime,endTime:m.endTime};f.has(q)||
(e.push(m),f.add(q))});h=g.next();l.A(2);break;case 4:return l.return(e)}})};function ku(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind!="metadata"&&b.kind!="chapters"&&b.label!="Shaka Player TextTrack"})}function lu(a){return Array.from(a.h.textTracks).find(function(b){return b.label=="Shaka Player TextTrack"})}function pu(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind=="metadata"})}
p.Mg=function(a){a=!!a;this.ba!=a&&(this.ba=a,this.m==Pt?(this.u.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.B||(a=Gf(this.i.textStreams,this.Qc,this.Xc,this.Wc),a.length>0&&(Zp(this.l,a[0]),Rt(this),fu(this))):Vp(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(a),eu(this))};
p.Ph=function(){if(this.F)var a=this.F.Fd();else{if(this.R==null)return new Date;if(this.R instanceof Date)return this.R;a=this.R}if(this.i&&!this.qa()){var b=this.i.presentationTimeline;return new Date(((b.m||b.i)+a)*1E3)}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+a*1E3)):null};
p.Yf=function(){if(this.i&&!this.qa()){var a=this.i.presentationTimeline;a=a.m||a.i;return a===null?null:new Date(a*1E3)}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};p.Qd=function(){return this.U()?this.i?this.i.presentationTimeline.Qd():null:null};p.Sb=function(){if(this.m==Pt)return this.H.Sb();var a={total:[],audio:[],video:[],text:[]};this.m==Tt&&(a.total=Mn(this.h.buffered));return a};
function Vs(a){if(!a.h||!a.h.currentTime)return null;var b=a.Yf();return b?Math.floor(Date.now()-(b.getTime()+a.h.currentTime*1E3)):null}p.getBandwidthEstimate=function(){return this.o?this.o.getBandwidthEstimate():NaN};
p.getStats=function(){if(this.m!=Pt&&this.m!=Tt)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,
switchHistory:[],stateHistory:[]};Ot(this);var a=this.h,b=a.currentTime/a.duration;isNaN(b)||this.U()||Iq(this.B,Math.round(100*b));this.F&&(this.B.W=this.F.Af(),this.B.X=this.F.Cf());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),Gq(this.B,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.B.N=Number(b.corruptedVideoFrames));this.B.o=this.D?bn(this.D):NaN;Hq(this.B,a.videoWidth||NaN,a.videoHeight||NaN);this.B.l="";this.U()&&(a=Vs(this),a!=null&&(this.B.D=a/1E3));b=this.Gb().find(function(e){return e.active});
a=this.Ub().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.N?this.N.i:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.B.B=d}b.width&&b.height&&Hq(this.B,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.B.l=b)}this.m!=Pt||this.qa()||(this.i&&(this.B.J=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&(this.B.L=this.i.presentationTimeline.h)),a=this.o.getBandwidthEstimate(),this.B.u=a);this.m==Tt&&Jq(this.B,NaN);
return Kq(this.B)};
p.dh=function(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=this,k,l,m,n,q,r,u,v,w,z,x,A;return F(function(D){switch(D.g){case 1:if(h.m!=Pt&&h.m!=Tt)throw new W(1,7,7004);c!="subtitles"&&c!="captions"&&Ta("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){D.A(2);break}return C(D,Au(h,a),3);case 3:d=D.h;case 2:k=[];h.C&&(k=h.C.getCuePoints());if(h.m!=Tt){D.A(4);break}l=T();g&&l.ua()==="WEBKIT"&&(c="forced");return C(D,Bu(h,a,b,c,d,f||"",k),5);case 5:m=D.h;if(m.track)return St(h),
Rt(h),D.return(Cf(m.track));throw new W(1,2,2012);case 4:n=wc;q=h.Ta();r=q.end-q.start;h.i&&(r=h.i.presentationTimeline.getDuration());if(r==Infinity)throw new W(1,4,4033);if(!k.length){D.A(6);break}return C(D,Cu(h,a,h.J,h.g.streaming.retryParameters),7);case 7:u=D.h,v=Du(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=fo(w),d="text/vtt";case 6:z={id:h.Ed++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:hj(0,r,[a]),mimeType:d||"",codecs:e||"",kind:c,
encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:n.Ja,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([qe(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};x=qe(z.mimeType,z.codecs);A=Fe(x);if(!A)throw new W(2,2,2014,d);h.i.textStreams.push(z);St(h);
Rt(h);return D.return(yf(z))}})};
p.eh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,z,x,A,D;return F(function(G){switch(G.g){case 1:if(c.m!=Pt&&c.m!=Tt)throw new W(1,7,7004);if(b){G.A(2);break}return C(G,Au(c,a),3);case 3:b=G.h;case 2:if(b!="text/vtt")throw new W(1,2,2017,a);d=wc;e=c.Ta();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(f==Infinity)throw new W(1,4,4045);return C(G,Cu(c,a,c.J,c.g.streaming.retryParameters),4);case 4:g=G.h;h=Ee(b);if(!h)throw new W(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,
segmentEnd:f,vttOffset:0};m=V(g);n=k.parseMedia(m,l,a,[]);q=[];r=t(n);u=r.next();for(v={};!u.done;v={we:void 0,Bc:void 0},u=r.next())v.Bc=u.value,v.we=null,w=function(H){return function(){H.we==null&&(H.we=mc([a],[H.Bc.payload]));return H.we||[]}}(v),z=new X(v.Bc.startTime,v.Bc.endTime,w,0,null,null,0,0,Infinity),v.Bc.payload.includes("#xywh")&&(x=v.Bc.payload.split("#xywh=")[1].split(","),x.length===4&&z.Ng({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],
10)})),q.push(z);A=b;if(!q.length){G.A(5);break}return C(G,sr(q[0].Ia()[0],c.J,c.g.manifest.retryParameters),6);case 6:A=G.h;case 5:return D={id:c.Ed++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new fj(q),mimeType:A||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.ah,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([qe(A||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.m==Tt?c.Cd.push(D):c.i.imageStreams.push(D),St(c),G.return(zf(D))}})};
p.bh=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,z,x;return F(function(A){switch(A.g){case 1:if(d.m!=Pt&&d.m!=Tt)throw new W(1,7,7004);if(c){A.A(2);break}return C(A,Au(d,a),3);case 3:c=A.h;case 2:e=wc;f=d.Ta();g=f.end-f.start;d.i&&(g=d.i.presentationTimeline.getDuration());if(g==Infinity)throw new W(1,4,4055);return C(A,Cu(d,a,d.J,d.g.streaming.retryParameters),4);case 4:h=A.h;k=Ee(c);if(!k)throw new W(2,2,2014,c);l=k();m={periodStart:0,segmentStart:0,segmentEnd:g,vttOffset:0};n=V(h);q=l.parseMedia(n,
m,a,[]);r=[];u=t(q);v=u.next();for(w={};!v.done;w={Md:void 0},v=u.next())w.Md=v.value,z=new X(w.Md.startTime,w.Md.endTime,function(D){return function(){return[D.Md.payload]}}(w),0,null,null,0,0,Infinity),r.push(z);x={id:d.Ed++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new fj(r),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:null,type:e.Ja,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([qe("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null};d.sb.push(x);St(d);return A.return(yf(x))}})};
function Au(a,b){var c;return F(function(d){switch(d.g){case 1:return sa(d,2),C(d,sr(b,a.J,a.g.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:ua(d);case 3:if(c)return d.return(c);throw new W(1,2,2011,b);}})}
function Bu(a,b,c,d,e,f,g){var h,k,l,m;return F(function(n){if(n.g==1)return e!="text/vtt"||g.length?C(n,Cu(a,b,a.J,a.g.streaming.retryParameters),3):n.A(2);n.g!=2&&(h=n.h,k=Du(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=fo(l),e="text/vtt");m=document.createElement("track");a:{var q=a.M,r=b;try{if(!q.g.enabled){var u=r;break a}var v=hs(q);v.ot=Os;v.su=!0;var w=ls(v);u=ms(r,w);break a}catch(z){Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z);u=r;break a}u=void 0}m.src=u;m.label=
f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);a.Ae.push(m);return n.return(m)})}function Cu(a,b,c,d){var e,f,g;return F(function(h){if(h.g==1){e=Fi;f=zi([b],d);f.method="GET";var k=a.M;try{k.g.enabled&&Ds(k,f,{ot:Os,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
function Du(a,b,c,d){var e=Ee(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=V(b),b=c.parseMedia(b,a,null,[]),Ur(b,d);throw new W(2,2,2014,c);}p.Si=function(a,b){this.wa.width=a;this.wa.height=b};p.kf=function(a){if(this.m==Pt){var b=this.l;a=a===void 0?.1:a;if(b.l.g)b=!1;else if(b.D)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.ed||d.ya||d.Ua||(d.ed=!1,Up(b,d,a));b=!0}}else b=!1;return b};
p.Oe=function(){Ta("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for.");return this.i};p.Jh=function(){return this.Mc};
p.Dh=function(){var a={video:null,audio:null,text:null};if(this.m!=Pt)return a;var b=this.l.o,c=this.h.currentTime;b=t([b.video,b.audio,this.l.B]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};d.type=="video"?(e.width=d.width,e.height=d.height,a.video=e):d.type=="audio"?a.audio=e:d.type==uc&&(a.text=e)}return a};
function ft(a){var b=gl();b.streaming.failureCallback=function(c){if(a.U()){var d=null;c.code==1001||c.code==1002?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):c.code==1003&&(d=.1);d!=null&&(c.severity=1,a.kf(d))}};b.textDisplayFactory=function(){if(a.ud){var c=a.h;c=c.webkitDisplayingFullscreen||c.webkitPresentationMode&&c.webkitPresentationMode!="inline"?!1:!0}else c=!1;return c?new Kr(a.h,a.ud):"track"in document.createElement("track")?new Fr(a):new Jr};return b}p.Ui=function(a){this.ud=a};
function Gt(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,e.mimeType!="application/cea-608"&&e.mimeType!="application/cea-708"||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new ij,l=e.closedCaptions.get(g);h={id:a.Ed++,originalId:g,groupId:null,
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:uc,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([qe(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
b.textStreams.push(h);c.add(g)}}
function du(a,b){var c,d,e,f,g;return F(function(h){if(h.g==1)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return F(function(r){if(r.g==1)return k?k.segmentIndex?r.A(2):C(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.pb(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},C(h,e(c,b),2);if(h.g!=3)return f=h.h,C(h,e(d,b),3);g=h.h;return g!=null&&f!=null?h.return(Math.max(g,f)):g!=null?h.return(g):f!=null?h.return(f):h.return(b)})}
function ut(a){var b=a.dg();if(a.B&&a.T&&a.F){if(a.g.streaming.rebufferingGoal==0){var c=a.N;c.j=!1;Xo(c)}else c=a.N,c.j=b,Xo(c);a.M&&(c=a.M,b||c.C||(c.C=!0),c.C&&b&&(c.J=!0,fs(c,"ps",{tc:"r"})),c.K=b);Ot(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Hd<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;
a.X&&(a.X=Math.min(a.X+ ++a.Hd*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(nt("buffering",b))}function Qt(a,b){a.kc.Xa();a.kc.G(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.Ta(),e=a.U(),f=e?a.g.streaming.safeSeekOffset:0;b>0?(!e||b>=1)&&Math.floor(c)>=Math.floor(d.end)&&a.Yc():Math.floor(c)<=Math.floor(d.start+f)&&a.Yc()})}
function Ot(a){if(a.B&&a.T){var b=a.B.g,c="playing";a.T.g==un?c="buffering":a.gd()?c="ended":a.h.paused&&(c="paused");var d=c;if(b.g==null)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(nt("statechanged",c)))}}
function hu(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Tf();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.qd(d,!1):e==1&&b!==a.N.dc()&&a.Yc()}if(c&&(c=a.Ta(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,a.i.serviceDescription.targetLatency!=null?h=a.i.serviceDescription.targetLatency+d:a.i.serviceDescription.maxLatency!=null&&(h=a.i.serviceDescription.maxLatency),a.i.serviceDescription.targetLatency!=null?
k=Math.max(0,a.i.serviceDescription.targetLatency-d):a.i.serviceDescription.minLatency!=null&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.X||typeof g!=="number"||(a.X=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.jc&&a.X!==null&&typeof g==="number"&&a.Hd<n&&Date.now()-a.jc>f*1E3&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
a.X=Math.max(a.X-(g-f)/2,f+d),a.jc=Date.now());e&&a.X!==null&&(h=a.X+d,k=a.X-d);g=c.end-a.h.currentTime;d=0;a.m==Tt&&(e=a.h.buffered,e.length>0&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=a.g.streaming.liveSync.panicThreshold*1E3;f=Date.now()-a.T.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.qd(m,!1):h!=void 0&&l&&g-d>h?(b!=l&&a.qd(l,!1),a.jc=null):k!=void 0&&m&&g-d<k?(b!=m&&a.qd(m,!1),a.jc=null):b!==a.N.dc()&&(a.Yc(),a.jc=Date.now())}}
function iu(a){if(a.h){var b=function(e,f){var g=g===void 0?Number.EPSILON:g;if(e===f)g=!0;else{var h=Math.abs(e-f);g=h<=g?!0:g!==Number.EPSILON?Math.abs(h-g)<=Number.EPSILON:!1}return(g||f>e)&&a.ze<e?(a.ze=e,!0):!1},c=a.Ta();c=c.end-c.start;c=c>0?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=nt("started");else if(b(25,c))d=nt("firstquartile");else if(b(50,c))d=nt("midpoint");else if(b(75,c))d=nt("thirdquartile");else{if(b(100,c)||c>100)d=nt("complete");a.g&&a.g.playRangeEnd!=Infinity&&
a.gd()&&a.h.pause()}d&&a.dispatchEvent(d)}}}function Wt(a){try{$n(a.xd,a.i)}catch(c){return st(a,c),!1}var b=Ff(a.i.variants);b=a.L.create(b);a=a.o.setVariants(Array.from(b.values()));return typeof a=="boolean"?a:!0}
function $t(a,b){b=b===void 0?!1:b;if(Wt(a)){if(!a.g.abr.enabled){var c=a.L;typeof c.getLastAdaptationSet!="function"&&(U("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),c.getLastAdaptationSet=function(){return null});if(c=c.getLastAdaptationSet())if(c=Array.from(c.values()),c.length){var d=a.l.o;if(d&&d.video&&(c=c.find(function(e){return e.video==d.video})))return c}}return a.o.chooseVariant(b)}return null}
function kt(a,b,c,d,e){b=b===void 0?!0:b;c=c===void 0?0:c;d=d===void 0?!1:d;e=e===void 0?!0:e;var f=$t(a);f&&Yt(a,f,e,b,c,d)}
function Yt(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a.l.o;if(b==g)d&&Yp(a.l,b,d,e,!0);else{var h=a.B.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Yp(a.l,b,d,e,f,c);d=null;g&&(d=xf(g));g=xf(b);g.active=!0;if(a.W&&(e=a.W,b=b.video)){b.dependencyStream&&(b=b.dependencyStream);f=0;h=-1;switch(b.mimeType){case "video/webm":f=1;break;case "video/mp4":f=2}switch(a.Wf()){case "DASH":h=1;break;case "HLS":h=0}e.g&&(e.g.setLevelSwitching(b.id,
!0),e.g.setContainerFormat(f),e.j||e.g.setStreamingFormat(h))}c?(c=(new Map).set("oldTrack",d).set("newTrack",g),c=nt("adaptation",c),Eu(a,c)):Fu(a,d,g);Gu(a,d,g)}}function xu(a,b){var c=Array.from(a.h.audioTracks).find(function(e){return e.enabled});b.enabled=!0;if(c){b.id!==c.id&&(c.enabled=!1);var d=tu(a);c=Df(c,d);b=Df(b,d);Fu(a,c,b);Gu(a,c,b)}}function tu(a){return a.h&&a.h.videoTracks?Array.from(a.h.videoTracks).find(function(b){return b.selected}):null}
function St(a){var b=nt("trackschanged");Eu(a,b);Hu(a)}function Fu(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=nt("variantchanged",b);Eu(a,b)}function Gu(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&Hu(a)}function Hu(a){var b=nt("audiotrackschanged");Eu(a,b)}function Rt(a){var b=nt("textchanged");Eu(a,b)}function eu(a){var b=nt("texttrackvisibility");Eu(a,b)}
function gu(a){a.g.abr.enabled||jt(a);var b=(new Map).set("newStatus",a.g.abr.enabled);Eu(a,nt("abrstatuschanged",b))}function fu(a){var b=a.Ub().find(function(c){return c.active});b&&a.u&&a.u.setTextLanguage&&a.u.setTextLanguage(b.language)}function jt(a,b){b=b===void 0?!0:b;if(a.m==Pt){a.zd.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Wt(a)}}
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===ot||!navigator.onLine||b==0||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?a.type=="audio"?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.zd.Ba(1);b=this.Sb().video.reduce(function(h,
k){return h+k.end-k.start},0);kt(this,!1,b,!0,!1);return!0}return!1};
function st(a,b){var c,d,e,f,g;return F(function(h){switch(h.g){case 1:if(a.m==ot)return h.return();b.severity===1&&a.B.M++;c=!0;if(!(a.Qa&&a.i&&a.l)||b.code!=3016&&b.code!=3014&&b.code!=3015&&b.code!=3024&&b.code!=3018){h.A(2);break}d=T();if(d.ua()==="WEBKIT"&&b.code==3016)return h.return();sa(h,3);return C(h,nq(a.l),5);case 5:e=h.h;c=!e;e&&(f=nt("mediasourcerecovered"),a.dispatchEvent(f));ta(h,2);break;case 3:ua(h),c=!0;case 2:if(!c)return h.return();b.severity===2&&jt(a,!1);g=nt("error",(new Map).set("detail",
b));a.dispatchEvent(g);g.defaultPrevented&&(b.handled=!0);E(h)}})}p.addFont=function(a,b){return hm(a,b)};function It(a,b,c,d){d=d===void 0?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,timescale:c.timescale,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(nt(b,a))}
function Jt(a,b,c,d){d=d===void 0?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(nt(d?"audiotrackchanged":"mediaqualitychanged",b))}
function rt(a,b){b=b===void 0?!0:b;if(!a.h.error)return b?new W(2,3,3016):null;var c=a.h.error.code;if(!b&&c==1)return null;if(b=a.h.error.msExtendedCode)b<0&&(b+=4294967296),b=b.toString(16);return new W(2,3,3016,c,b,a.h.error.message)}
function Kt(a,b){var c=nt("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);d.length==1&&d[0]==""&&(d=["00"],b={"00":b[""]});var e=d.length==1&&d[0]=="00";c=!1;if(d.length){d=a.keySystem();for(var f=Em(a.g.drm.clearKeys),g=function(u,v){u.allowedByKeySystem=!0;v=t(v);for(var w=v.next();!w.done;w=v.next())if(w=w.value,(w=b[e?"00":w])||a.D.H)u.allowedByKeySystem=u.allowedByKeySystem&&!!w&&!ao.includes(w)},h=t(a.i.variants),k=h.next();!k.done;k=h.next()){k=k.value;var l=If(k);l=t(l);for(var m=
l.next();!m.done;m=l.next()){m=m.value;var n=k.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!f.size&&a.i.type=="HLS")for(var q=t(m.drmInfos),r=q.next();!r.done;r=q.next())r=r.value,r.keySystem==d&&(r.keyIds.size?g(k,r.keyIds):g(k,m.keyIds));else g(k,m.keyIds);n!=k.allowedByKeySystem&&(c=!0)}}}if(c&&(St(a),!Wt(a)))return;(c=a.l.o)&&!c.allowedByKeySystem&&kt(a)}function Xt(a,b,c){b>0&&(a.U()||a.Pg(b));b=a.getDuration();c<b&&(a.U()||a.Mb(c))}
function Eu(a,b){F(function(c){if(c.g==1)return C(c,Promise.resolve(),2);a.m!=ot&&a.dispatchEvent(b);E(c)})}function zu(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ve(c.language)):b.add("und");return b}
function yu(a){for(var b=new Map,c=new Map,d=0;d<a.length;d++){var e=a[d],f="und",g=[];e.language&&(f=Ve(e.language));e.type=="variant"?g=e.audioRoles:g=e.roles;g&&g.length||(g=[""]);b.has(f)||b.set(f,new Set);g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,b.get(f).add(h),e.label&&(c.has(f)||c.set(f,new Map),c.get(f).set(h,e.label))}var k=[];b.forEach(function(l,m){l=t(l);for(var n=l.next();!n.done;n=l.next()){n=n.value;var q=null;c.has(m)&&c.get(m).has(n)&&(q=c.get(m).get(n));k.push({language:m,
role:n,label:q})}});return k}p.qa=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1};p.gd=function(){return!this.h||this.h.ended?!0:this.Qa&&!this.U()&&this.h.currentTime>=this.Ta().end};S("shaka.Player",Z);Z.prototype.isEnded=Z.prototype.gd;Z.prototype.isRemotePlayback=Z.prototype.qa;Z.prototype.addFont=Z.prototype.addFont;Z.prototype.setVideoContainer=Z.prototype.Ui;Z.prototype.getFetchedPlaybackInfo=Z.prototype.Dh;Z.prototype.getManifestParserFactory=Z.prototype.Jh;
Z.prototype.getManifest=Z.prototype.Oe;Z.prototype.retryStreaming=Z.prototype.kf;Z.prototype.setMaxHardwareResolution=Z.prototype.Si;Z.prototype.addChaptersTrack=Z.prototype.bh;Z.prototype.addThumbnailsTrack=Z.prototype.eh;Z.prototype.addTextTrackAsync=Z.prototype.dh;Z.prototype.getStats=Z.prototype.getStats;Z.prototype.getBufferedInfo=Z.prototype.Sb;Z.prototype.getSegmentAvailabilityDuration=Z.prototype.Qd;Z.prototype.getPresentationStartTimeAsDate=Z.prototype.Yf;
Z.prototype.getPlayheadTimeAsDate=Z.prototype.Ph;Z.prototype.setTextTrackVisibility=Z.prototype.Mg;Z.prototype.getChaptersAsync=Z.prototype.xh;Z.prototype.getChapters=Z.prototype.wh;Z.prototype.getChaptersTracks=Z.prototype.yh;Z.prototype.isTextTrackVisible=Z.prototype.Te;Z.prototype.selectVariantsByLabel=Z.prototype.Qi;Z.prototype.selectTextLanguage=Z.prototype.Eg;Z.prototype.selectAudioLanguage=Z.prototype.Dg;Z.prototype.getTextLanguages=Z.prototype.Wh;Z.prototype.getAudioLanguages=Z.prototype.rh;
Z.prototype.getTextLanguagesAndRoles=Z.prototype.Xh;Z.prototype.getAudioLanguagesAndRoles=Z.prototype.sh;Z.prototype.getVideoTracks=Z.prototype.getVideoTracks;Z.prototype.selectVideoTrack=Z.prototype.Ri;Z.prototype.getAudioTracks=Z.prototype.getAudioTracks;Z.prototype.selectAudioTrack=Z.prototype.Pi;Z.prototype.selectVariantTrack=Z.prototype.oe;Z.prototype.selectTextTrack=Z.prototype.pf;Z.prototype.getThumbnails=Z.prototype.Zh;Z.prototype.getAllThumbnails=Z.prototype.qh;
Z.prototype.getImageTracks=Z.prototype.Fh;Z.prototype.getTextTracks=Z.prototype.Ub;Z.prototype.getVariantTracks=Z.prototype.Gb;Z.prototype.cancelTrickPlay=Z.prototype.Yc;Z.prototype.trickPlay=Z.prototype.qd;Z.prototype.useTrickPlayTrackIfAvailable=Z.prototype.zf;Z.prototype.getPlaybackRate=Z.prototype.ib;Z.prototype.isBuffering=Z.prototype.dg;Z.prototype.getKeyStatuses=Z.prototype.Od;Z.prototype.getActiveSessionsMetadata=Z.prototype.Me;Z.prototype.getExpiration=Z.prototype.Ne;
Z.prototype.drmInfo=Z.prototype.drmInfo;Z.prototype.keySystem=Z.prototype.keySystem;Z.prototype.isFullyLoaded=Z.prototype.ji;Z.prototype.goToLive=Z.prototype.di;Z.prototype.seekRange=Z.prototype.Ta;Z.prototype.isVideoOnly=Z.prototype.oi;Z.prototype.isAudioOnly=Z.prototype.ii;Z.prototype.isInProgress=Z.prototype.Gc;Z.prototype.isLive=Z.prototype.U;Z.prototype.getQueueManager=Z.prototype.Th;Z.prototype.getAdManager=Z.prototype.ph;Z.prototype.getAssetUri=Z.prototype.Nd;
Z.prototype.getNetworkingEngine=Z.prototype.Nh;Z.prototype.getMediaElement=Z.prototype.Mh;Z.prototype.getManifestType=Z.prototype.Wf;Z.prototype.getLoadMode=Z.prototype.Ih;Z.prototype.resetConfiguration=Z.prototype.Ni;Z.prototype.getBufferFullness=Z.prototype.Tf;Z.prototype.getNonDefaultConfiguration=Z.prototype.Oh;Z.prototype.getConfigurationForLowLatency=Z.prototype.Ah;Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.configurationForLowLatency=Z.prototype.mh;
Z.prototype.configure=Z.prototype.configure;Z.prototype.releaseAllMutexes=Z.prototype.Li;Z.prototype.destroyAllPreloads=Z.prototype.Nf;Z.prototype.preload=Z.prototype.preload;Z.prototype.detachAndSavePreload=Z.prototype.Of;Z.prototype.unloadAndSavePreload=Z.prototype.Yi;Z.prototype.load=Z.prototype.load;Z.prototype.updateStartTime=Z.prototype.cj;Z.prototype.unload=Z.prototype.rd;Z.prototype.detach=Z.prototype.detach;Z.prototype.attachCanvas=Z.prototype.gh;Z.prototype.attach=Z.prototype.Nb;
Z.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return F(function(k){switch(k.g){case 1:b={};if(!a){k.A(2);break}return C(k,qn(),3);case 3:b=k.h;case 2:return c=Mj(),d=ho(),e=T(),C(k,e.Db(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=Iu,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};
Z.isBrowserSupported=function(){window.Promise||Ta("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;T();return Nj()?!0:Oj().canPlayType("application/x-mpegurl")!=""};Z.setQueueManagerFactory=function(a){it=a};Z.setAdManagerFactory=function(a){ht=a};Z.registerSupportPlugin=function(a,b){Iu.set(a,b)};Z.prototype.destroy=Z.prototype.destroy;var ot=0,et=1,Pt=2,Tt=3;
Z.LoadMode={DESTROYED:ot,NOT_LOADED:et,MEDIA_SOURCE:Pt,SRC_EQUALS:Tt};Z.version="v4.16.3";var Ju=["4","16"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new pb(Number(Ju[0]),Number(Ju[1])));var Iu=new Map,ht=null,it=null;function Ku(){}function Lu(a,b){a={priority:b||0,callback:a};for(b=0;b<Mu.length;b++)if(Mu[b].priority<a.priority){Mu.splice(b,0,a);return}Mu.push(a)}S("shaka.polyfill",Ku);Ku.register=Lu;Ku.installAll=function(){for(var a=t(Mu),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Ta("Error installing polyfill!",c)}}};var Mu=[];function Nu(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}Nu.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};Nu.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function Ou(a){if(a.startsWith("com.apple"))return"cbcs";if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("org.w3")||a.startsWith("com.huawei"))return"cenc";Ta("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}
function Pu(a){if(!a)return!1;a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&a.encryptionScheme!==void 0?!0:!1}function Qu(a,b){return!a||a==b||(a=="cbcs"||a=="cbcs-1-9")&&T().uc()?!0:!1};function Ru(){}var Su;function Tu(){T().qe()&&!Su&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(Su=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=Uu,navigator.emeEncryptionSchemePolyfilled=!0)}
function Uu(a,b){var c=this,d,e;return F(function(f){if(f.g==1)return C(f,Su.call(c,a,b),2);d=f.h;if(e=Pu(d))return navigator.requestMediaKeySystemAccess=Su,f.return(d);navigator.requestMediaKeySystemAccess=Vu;return f.return(Vu.call(c,a,b))})}
function Vu(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u;return F(function(v){if(v.g==1){d=Ou(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Wu(h.videoCapabilities,d),l=Wu(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),n.name="NotSupportedError",
n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(v,Su.call(c,a,e),2)}q=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new Nu(q,r,u))})}function Wu(a,b){return a?a.filter(function(c){return Qu(c.encryptionScheme,b)}):a}Ku.EmeEncryptionScheme=Ru;Ru.install=Tu;Lu(Tu);function Xu(){}var Yu;function Zu(){T().qe()&&!Yu&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(Yu=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=$u,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
function $u(a){var b=this,c,d,e;return F(function(f){switch(f.g){case 1:return C(f,Yu.call(b,a),2);case 2:c=f.h;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=Pu(d))return navigator.mediaCapabilities.decodingInfo=Yu,f.return(c);navigator.mediaCapabilities.decodingInfo=av;if(d){f.A(3);break}return C(f,bv(a),4);case 4:return c.keySystemAccess=f.h,f.return(c);case 3:return f.return(av.call(b,a))}})}
function av(a){var b=this,c,d,e,f,g,h,k;return F(function(l){switch(l.g){case 1:return d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=Ou(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},Qu(d,g)&&Qu(c,g))?C(l,Yu.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=new Nu(k.keySystemAccess,c,d);l.A(3);break}if(!a.keySystemConfiguration){l.A(3);
break}return C(l,bv(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
function bv(a){var b,c;return F(function(d){if(d.g==1){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return C(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}Ku.MCapEncryptionScheme=Xu;Xu.install=Zu;Lu(Zu,-2);function cv(){}function dv(){T().yb()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),cv.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=ev)}
function ev(a){var b,c,d,e,f,g,h,k,l,m,n;return F(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};T();c=a.video;d=a.audio;if(a.type!="media-source"){if(a.type=="file"){if(c&&(e=c.contentType,f=Oj().canPlayType(e)!="",!f)||d&&(g=d.contentType,h=Oj().canPlayType(g)!="",!h))return q.return(b)}else return q.return(b);q.A(2);break}if(!Nj())return q.return(b);if(!c){q.A(3);break}return C(q,fv(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var r=
T().Ha(),u=d.contentType;r==="CAST"&&d.spatialRendering&&(u+="; spatialRendering=true");l=Cc(u);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return C(q,gv(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}function fv(a){var b,c,d;return F(function(e){return e.g==1?(b=T(),c=b.Ha(),c!=="CAST"?e.A(2):C(e,hv(a),3)):e.g!=2?(d=e.h,e.return(d)):e.return(Cc(a.contentType))})}
function gv(a,b,c){var d,e,f,g,h,k,l,m,n,q,r;return F(function(u){switch(u.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},T().kg()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));
h={initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=ye(k)+";"+xe(k);n=ye(l)+";"+xe(l);q=c.keySystem;r=null;sa(u,2);if(Qh.has(m+"#"+n+"#"+q)){r=Qh.get(m+"#"+n+"#"+q)||null;u.A(4);break}return C(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=u.h,Qh.set(m+"#"+n+"#"+q,r);case 4:ta(u,
3);break;case 2:ua(u);case 3:return u.return(r)}})}
function hv(a){var b,c,d,e,f;return F(function(g){if(g.g==1){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(Cc(a.contentType));b=a.contentType;a.width&&a.height&&a.width>1280&&a.height>720&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),c<24||c>30)&&(b+="; framerate="+a.framerate);d=a.transferFunction||"";switch(d){case "":case "srgb":break;case "pq":b+="; eotf=smpte2084";break;case "hlg":b+="; eotf=arib-std-b67";break;
default:return g.return(!1)}e=!1;f=iv;return f.has(b)?(e=f.get(b),g.A(2)):C(g,cast.__platform__.canDisplayType(b),3)}g.g!=2&&(e=g.h,f.set(b,e));return g.return(e)})}Ku.MediaCapabilities=cv;cv.install=dv;cv.originalMcap=null;var iv=new Map;Lu(dv,-1);function jv(){}function kv(){var a=T(),b=a.ua()==="WEBKIT"?a.na():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(b<=12?(lv(),mv()):b<=15&&lv());a=t(a.wg());for(b=a.next();!b.done;b=a.next())nv(b.value);(window.MediaSource||window.ManagedMediaSource)&&ov();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&pv()}
function lv(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function mv(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function ov(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return ue(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return ue(c)!="mp2t"&&b(c)}}}
function nv(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return xe(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return xe(d)!=a&&c(d)}}}
function pv(){var a=MediaSource.isTypeSupported;T().Tg()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(d<0)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});f>=0&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Ku.MediaSource=jv;jv.install=kv;Lu(kv);function qv(){}var rv,sv,tv,uv,vv,wv;
function xv(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=yv){if(a===void 0?0:a)rv=!0,sv=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),tv=HTMLMediaElement.prototype.setMediaKeys,uv=window.MediaKeys,vv=window.MediaKeySystemAccess,wv=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=zv;window.MediaKeys=Av;window.MediaKeySystemAccess=
Bv;navigator.requestMediaKeySystemAccess=Cv;window.shakaMediaKeysPolyfill=yv;qf.clear();Qh.clear()}}function Cv(a,b){try{var c=new Bv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function zv(a){var b=this.mediaKeys;b&&b!=a&&Dv(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Dv(a,this):Promise.resolve()}
function Ev(a){a=V(a.initData);if(Sb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Yb(a.subarray(4),!0);a=ac(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Mb(a);this.dispatchEvent(b)}Ku.PatchedMediaKeysApple=qv;
qv.uninstall=function(){window.shakaMediaKeysPolyfill==yv&&rv&&(rv=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",sv),HTMLMediaElement.prototype.setMediaKeys=tv,window.MediaKeys=uv,window.MediaKeySystemAccess=vv,navigator.requestMediaKeySystemAccess=wv,sv=wv=tv=vv=uv=null,window.shakaMediaKeysPolyfill="",qf.clear(),Qh.clear())};qv.install=xv;
function Bv(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(c.persistentState=="required")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;}
Bv.prototype.createMediaKeys=function(){var a=new Av(this.keySystem);return Promise.resolve(a)};Bv.prototype.getConfiguration=function(){return this.g};function Av(a){this.h=new WebKitMediaKeys(a);this.g=new eb}Av.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary")throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Fv(this.h,a)};Av.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function Dv(a,b){a.g.Xa();if(!b)return Promise.resolve();a.g.G(b,"webkitneedkey",Ev);try{return Yo(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Av.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Fv(a){ri.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new eb;this.sessionId="";this.expiration=NaN;this.closed=new ii;this.keyStatuses=new Gv;this.onkeystatuseschange=null}
ma(Fv,ri);p=Fv.prototype;
p.generateRequest=function(a,b){var c=this;this.h=new ii;try{var d=this.l.createSession("video/mp4",V(b));this.i=d;this.sessionId=d.sessionId||"";this.j.G(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",c.keyStatuses.fc()==void 0?"license-request":"license-renewal").set("message",Mb(e.message));e=new qi("message",e);c.dispatchEvent(e)});this.j.G(d,"webkitkeyadded",function(){c.g&&(Hv(c,"usable"),c.g.resolve(),c.g=null)});this.j.G(d,"webkitkeyerror",
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(c.h!=null)c.h.reject(e),c.h=null;else if(c.g!=null)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Hv(c,"output-not-allowed");break;default:Hv(c,"internal-error")}});Hv(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 ii;try{this.i.update(V(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Xa()}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 Hv(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new qi("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}function Gv(){this.size=0;this.g=void 0}p=Gv.prototype;p.fc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,Ph.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Ph.value();return this.g&&Lb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var yv="apple";
Lu(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||xv())});function Iv(){}function Jv(){if(window.MediaKeys){var a=T();MediaKeys.prototype.setServerCertificate&&a.pd()||(MediaKeys.prototype.setServerCertificate=Kv)}}function Kv(){return Promise.resolve(!1)}Ku.PatchedMediaKeysCert=Iv;Iv.install=Jv;Lu(Jv);function Lv(){}
function Mv(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Nv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ov;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Pv;window.MediaKeys=Qv;window.MediaKeySystemAccess=Rv;window.shakaMediaKeysPolyfill=Sv}}
function Tv(a){var b=Nv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Ov(a,b){try{var c=new Rv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Pv(a){var b=this.mediaKeys;b&&b!=a&&Uv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Uv(a,this);return Promise.resolve()}Ku.PatchedMediaKeysWebkit=Lv;Lv.install=Mv;
function Rv(a,b){this.g=this.keySystem=a;var c=!1;a=="org.w3.clearkey"&&(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));f.persistentState=="required"&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if(a=="org.w3.clearkey"||a=="com.widevine.alpha")c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}Rv.prototype.createMediaKeys=function(){var a=new Qv(this.g);return Promise.resolve(a)};Rv.prototype.getConfiguration=function(){return this.h};function Qv(a){this.l=a;this.h=null;this.g=new eb;this.i=[];this.j=new Map}
function Uv(a,b){a.h=b;a.g.Xa();var c=Nv;b&&(a.g.G(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Mb(d.initData);a.h.dispatchEvent(e)}),a.g.G(b,c+"keymessage",function(d){var e=Vv(a,d.sessionId);e&&(d=(new Map).set("messageType",e.keyStatuses.fc()==void 0?"licenserequest":"licenserenewal").set("message",d.message),d=new qi("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.G(b,c+"keyadded",function(d){(d=Vv(a,d.sessionId))&&d.ready()}),
a.g.G(b,c+"keyerror",function(d){var e=Vv(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?(d.systemCode==45&&(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?Wv(e,"output-restricted"):f==1?Wv(e,"expired"):Wv(e,"internal-error"))}}))}
Qv.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary"&&a!="persistent-license")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 Xv(b,this.l,a);this.i.push(a);return a};Qv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};Qv.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function Vv(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 Xv(a,b,c){ri.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 ii;this.keyStatuses=new Yv;this.onkeystatuseschange=null}ma(Xv,ri);p=Xv.prototype;p.ready=function(){Wv(this,"usable");this.g&&this.g.resolve();this.g=null};
function Zv(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if(a.l=="persistent-license")if(c)var d=V(ac("LOAD_SESSION|"+c));else{var e=ac("PERSISTENT|");d=lc(e,b)}else d=V(b)}catch(g){return Promise.reject(g)}a.h=new ii;var f=Tv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if(g.name!="InvalidStateError")return a.h=null,Promise.reject(g);(new Oe(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).ka(.01)}return a.h}
function $v(a,b,c){if(a.g)a.g.then(function(){return $v(a,b,c)}).catch(function(){return $v(a,b,c)});else{a.g=b;if(a.i=="webkit-org.w3.clearkey"){var d=Xb(c);var e=JSON.parse(d);e.keys[0].kty!="oct"&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=ic(e.keys[0].k);e=ic(e.keys[0].kid)}else d=V(c),e=null;var f=Tv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function Wv(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new qi("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}p.generateRequest=function(a,b){return Zv(this,b,null)};p.load=function(a){return this.l=="persistent-license"?Zv(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new ii;$v(this,b,a);return b};
p.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Tv("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function Yv(){this.size=0;this.g=void 0}p=Yv.prototype;p.fc=function(){return this.g};
p.forEach=function(a){this.g&&a(this.g,Ph.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Ph.value();return this.g&&Lb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var Nv="",Sv="webkit";Lu(Mv);function aw(){}function bw(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=cw))}function cw(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Ku.RandomUUID=aw;aw.install=bw;Lu(bw);function dw(){}function ew(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:fw})}function fw(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Ku.Symbol=dw;dw.install=ew;Lu(ew);function gw(){}function hw(){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=iw),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=jw),b.prototype.includes||(b.prototype.includes=kw)}function iw(a,b){return Array.prototype.indexOf.call(this,a,b)}function jw(a,b){return Array.prototype.lastIndexOf.call(this,a,b)}
function kw(a,b){return this.indexOf(a,b)!==-1}Ku.TypedArray=gw;gw.install=hw;Lu(hw);function lw(){}function mw(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Ku.VideoPlayPromise=lw;lw.install=mw;Lu(mw);function nw(){}function ow(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||typeof Oj().webkitDroppedFrameCount==="number")&&(a.getVideoPlaybackQuality=pw)}}function pw(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ku.VideoPlaybackQuality=nw;nw.install=ow;Lu(ow);function qw(){}function rw(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(b==3)a=sw;else if(b==6)a=tw;else{try{var c=!!sw(1,2,"")}catch(d){c=!1}c&&(a=sw)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function sw(a,b,c){return new window.TextTrackCue(a,b,c)}function tw(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ku.VTTCue=qw;qw.install=rw;Lu(rw);function uw(){this.g="UNKNOWN"}uw.prototype.parseInit=function(){};uw.prototype.setSequenceMode=function(){};uw.prototype.setManifestType=function(a){this.g=a};
uw.prototype.parseMedia=function(a,b,c,d){var e=Xb(a);a=[];if(e=="")return a;var f=bd(e,"tt",!0);if(!f)throw new W(2,2,2005,"Failed to parse TTML.");e=ld(f,"body")[0];if(!e)return[];var g=rd(f,vw,"frameRate"),h=rd(f,vw,"subFrameRate"),k=rd(f,vw,"frameRateMultiplier"),l=rd(f,vw,"tickRate"),m=rd(f,vw,"cellResolution"),n=f.attributes["xml:space"]||"default",q=rd(f,ww,"extent");if(n!="default"&&n!="preserve")throw new W(2,2,2005,"Invalid xml:space value: "+n);n=n=="default";g=new xw(g,h,k,l);m=yw(m);
h=ld(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return v!="\n"});k=ld(f,"style");f=ld(f,"region");l=[];for(var r=t(f),u=r.next();!u.done;u=r.next())(u=zw(this,u.value,k,q))&&l.push(u);if(id(e,"p").length)throw new W(2,2,2001,"<p> can only be inside <div> in TTML");q=t(id(e,"div"));for(r=q.next();!r.done;r=q.next())if(id(r.value,"span").length)throw new W(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Aw(this,e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor=
"transparent"),a.push(b);return a};
function Aw(a,b,c,d,e,f,g,h,k,l,m,n,q,r){var u=m;if(gd(b)){if(!n)return null;var v={tagName:"span",children:[jd(b)],attributes:{},parent:null}}else v=b;for(var w=null,z=t(Bw),x=z.next();!x.done&&!(w=Cw(v,"backgroundImage",e,"#",x.value)[0]);x=z.next());z=null;x=rd(v,Bw,"backgroundImage");var A=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(x&&A.test(x)){z=parseInt(x.split(":").pop(),10)-1;if(z>=r.length)return null;z=r[z]}else q&&x&&!x.startsWith("#")&&(A=new ub(q),x=new ub(x),(x=A.resolve(x).toString())&&
(z=x));if(b.tagName=="p"||w||z)n=!0;b=n;x=(v.attributes["xml:space"]||(k?"default":"preserve"))=="default";A=v.children.every(gd);k=[];if(!A)for(var D=t(v.children),G=D.next();!G.done;G=D.next())(G=Aw(a,G.value,c,d,e,f,g,h,x,l,v,n,q,r))&&k.push(G);e=m!=null;q=jd(v);q=v.children.length&&q&&/\S/.test(q);D=v.attributes.begin||v.attributes.end||v.attributes.dur;if(!(D||q||v.tagName=="br"||k.length!=0||e&&!x))return null;r=Dw(v,d);q=r.start;for(r=r.end;u&&u.tagName&&u.tagName!="tt";)r=Ew(u,d,q,r),q=r.start,
r=r.end,u=u.parent;q==null&&(q=0);q+=c.periodStart;r=r==null?Infinity:r+c.periodStart;a.g!=="HLS"&&(q=Math.max(q,c.segmentStart),r=Math.min(r,c.segmentEnd));if(!D&&k.length>0)for(q=Infinity,r=0,c=t(k),d=c.next();!d.done;d=c.next())d=d.value,q=Math.min(q,d.startTime),r=Math.max(r,d.endTime);if(v.tagName=="br")return a=new Hd(q,r,""),a.lineBreak=!0,a;c="";A&&(c=dc(jd(v)||""),x&&(c=c.replace(/\s+/g," ")));c=new Hd(q,r,c);c.nestedCues=k;n||(c.isContainer=!0);l&&(c.cellResolution=l);l=Cw(v,"region",g,
"")[0];if(v.attributes.region&&l&&l.attributes["xml:id"]){var H=l.attributes["xml:id"];c.region=h.filter(function(B){return B.id==H})[0]}h=l;m&&e&&!v.attributes.region&&!v.attributes.style&&(h=Cw(m,"region",g,"")[0]);Fw(a,c,v,h,w,z,f,b,k.length==0);return c}
function zw(a,b,c,d){var e=new Oc,f=b.attributes["xml:id"];if(!f)return null;e.id=f;f=null;d&&(f=Gw.exec(d)||Hw.exec(d));d=f?Number(f[1]):null;f=f?Number(f[2]):null;var g,h=Iw(a,b,c,"extent");if(h){var k=(g=Gw.exec(h))||Hw.exec(h);k!=null&&(e.width=Number(k[1]),e.height=Number(k[2]),g||(d!=null&&(e.width=e.width*100/d),f!=null&&(e.height=e.height*100/f)),e.widthUnits=g||d!=null?Pc:0,e.heightUnits=g||f!=null?Pc:0)}if(a=Iw(a,b,c,"origin"))if(k=(g=Gw.exec(a))||Hw.exec(a),k!=null)e.viewportAnchorX=Number(k[1]),
e.viewportAnchorY=Number(k[2]),g?h||(e.width=100-e.viewportAnchorX,e.widthUnits=Pc,e.height=100-e.viewportAnchorY,e.heightUnits=Pc):(f!=null&&(e.viewportAnchorY=e.viewportAnchorY*100/f),d!=null&&(e.viewportAnchorX=e.viewportAnchorX*100/d)),e.viewportAnchorUnits=g||d!=null?Pc:0;return e}function Jw(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),b.length==4)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
function Fw(a,b,c,d,e,f,g,h,k){h=h||k;Kw(a,c,d,g,"direction",h)=="rtl"&&(b.direction="rtl");k=Kw(a,c,d,g,"writingMode",h);k=="tb"||k=="tblr"?b.writingMode="vertical-lr":k=="tbrl"?b.writingMode="vertical-rl":k=="rltb"||k=="rl"?b.direction="rtl":k&&(b.direction=Ld);(k=Kw(a,c,d,g,"textAlign",!0))?(b.positionAlign=Lw.get(k),b.lineAlign=Mw.get(k),b.textAlign=ee[k.toUpperCase()]):b.textAlign=Kd;if(k=Kw(a,c,d,g,"displayAlign",!0))b.displayAlign=fe[k.toUpperCase()];if(k=Kw(a,c,d,g,"color",h))b.color=Jw(k);
if(k=Kw(a,c,d,g,"backgroundColor",h))b.backgroundColor=Jw(k);if(k=Kw(a,c,d,g,"border",h))b.border=k;if(k=Kw(a,c,d,g,"fontFamily",h))switch(k){case "monospaceSerif":b.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":b.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":b.fontFamily="sans-serif";break;case "monospaceSansSerif":b.fontFamily="Consolas,monospace";break;case "proportionalSerif":b.fontFamily="serif";break;default:b.fontFamily=
k.split(",").filter(function(l){return l!="default"}).join(",")}(k=Kw(a,c,d,g,"fontWeight",h))&&k=="bold"&&(b.fontWeight=be);k=Kw(a,c,d,g,"wrapOption",h);b.wrapLine=k&&k=="noWrap"?!1:!0;(k=Kw(a,c,d,g,"lineHeight",h))&&k.match(Nw)&&(b.lineHeight=k);(k=Kw(a,c,d,g,"fontSize",h))&&(k.match(Nw)||k.match(Ow))&&(b.fontSize=k);if(k=Kw(a,c,d,g,"fontStyle",h))b.fontStyle=he[k.toUpperCase()];e?(f=e.attributes.imageType||e.attributes.imagetype,k=e.attributes.encoding,e=jd(e).trim(),f=="PNG"&&k=="Base64"&&e&&
(b.backgroundImage="data:image/png;base64,"+e)):f&&(b.backgroundImage=f);if(e=Kw(a,c,d,g,"textOutline",h))e=e.split(" "),e[0].match(Nw)?b.textStrokeColor=b.color:(b.textStrokeColor=Jw(e[0]),e.shift()),e[0]&&e[0].match(Nw)?b.textStrokeWidth=e[0]:b.textStrokeColor="";(e=Kw(a,c,d,g,"letterSpacing",h))&&e.match(Nw)&&(b.letterSpacing=e);(e=Kw(a,c,d,g,"linePadding",h))&&e.match(Nw)&&(b.linePadding=e);if(e=Kw(a,c,d,g,"opacity",h))b.opacity=parseFloat(e);(e=Iw(a,d,g,"textDecoration"))&&Pw(b,e);(e=Qw(a,c,
g,"textDecoration"))&&Pw(b,e);if(e=Kw(a,c,d,g,"textCombine",h))b.textCombineUpright=e;switch(Kw(a,c,d,g,"ruby",h)){case "container":b.rubyTag="ruby";break;case "text":b.rubyTag="rt"}}
function Pw(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(de)||a.textDecoration.push(de);break;case "noUnderline":a.textDecoration.includes(de)&&$a(a.textDecoration,de);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&$a(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&$a(a.textDecoration,"overline")}}function Kw(a,b,c,d,e,f){f=f===void 0?!0:f;return(b=Qw(a,b,d,e))?b:f?Iw(a,c,d,e):null}function Iw(a,b,c,d){if(!b)return null;var e=rd(b,ww,d);return e?e:Rw(a,b,c,d)}function Qw(a,b,c,d){var e=rd(b,ww,d);return e?e:Rw(a,b,c,d)}
function Rw(a,b,c,d){b=Cw(b,"style",c,"");for(var e=null,f=0;f<b.length;f++){var g=qd(b[f],"urn:ebu:tt:style",d);g||(g=rd(b[f],ww,d));g||(g=Qw(a,b[f],c,d));g&&(e=g)}return e}function Cw(a,b,c,d,e){var f=[];if(!a||c.length<1)return f;var g=a;for(a=null;!a&&!(a=e?qd(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 Ew(a,b,c,d){a=Dw(a,b);c==null?c=a.start:a.start!=null&&(c+=a.start);d==null?d=a.end:a.start!=null&&(d+=a.start);return{start:c,end:d}}function Dw(a,b){var c=Sw(a.attributes.begin,b),d=Sw(a.attributes.end,b);a=Sw(a.attributes.dur,b);d==null&&a!=null&&(d=c+a);return{start:c,end:d}}
function Sw(a,b){var c=null;if(Tw.test(a)){a=Tw.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+d*60+c*3600}else if(Uw.test(a))c=Vw(Uw,a);else if(Ww.test(a))c=Vw(Ww,a);else if(Xw.test(a))a=Xw.exec(a),c=Number(a[1])/b.frameRate;else if(Yw.test(a))a=Yw.exec(a),c=Number(a[1])/b.g;else if(Zw.test(a))c=Vw(Zw,a);else if(a)throw new W(2,2,2001,"Could not parse cue time range in TTML");return c}
function Vw(a,b){a=a.exec(b);return a==null||a[0]==""?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+(Number(a[2])||0)*60+(Number(a[1])||0)*3600}function yw(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",uw);uw.prototype.parseMedia=uw.prototype.parseMedia;uw.prototype.setManifestType=uw.prototype.setManifestType;uw.prototype.setSequenceMode=uw.prototype.setSequenceMode;uw.prototype.parseInit=uw.prototype.parseInit;
function xw(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);this.g==0&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var Gw=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Ow=/^(\d{1,4}(?:\.\d+)?|100)%$/,Nw=/^(\d+px|\d+em|\d*\.?\d+c)$/,Hw=/^(\d+)px (\d+)px$/,Tw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Uw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Ww=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,Xw=/^(\d*(?:\.\d*)?)f$/,Yw=/^(\d*(?:\.\d*)?)t$/,Zw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Mw=(new Map).set("left",Od).set("center","center").set("right",
"end").set("start",Od).set("end","end"),Lw=(new Map).set("left","line-left").set("center","center").set("right","line-right"),vw=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],ww=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Bw=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Ce("application/ttml+xml",function(){return new uw});function $w(){this.g=new uw}$w.prototype.parseInit=function(a){var b=!1;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).box("minf",Ug).box("stbl",Ug).P("stsd",Wg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new W(2,2,2007);};$w.prototype.setSequenceMode=function(a){this.g.setSequenceMode(a)};$w.prototype.setManifestType=function(a){this.g.setManifestType(a)};
$w.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new Pg).box("moof",Ug).box("traf",Ug).P("tfhd",function(z){e=$g(z.reader,z.flags).bd}).P("trun",function(z){z=ch(z.reader,z.version,z.flags);z=t(z.mf);for(var x=z.next();!x.done;x=z.next())h.push(x.value.sampleSize||e||0)}).P("subs",function(z){for(var x=z.reader,A=x.O(),D=-1,G=0;G<A;G++){var H=x.O();D+=H;H=x.kb();for(var B=[],I=0;I<H;I++)z.version==1?B.push(x.O()):B.push(x.kb()),x.mb(),x.mb(),x.O();g.set(D,B)}}).box("mdat",
Zg(function(z){f.push(z)},!1)).parse(a,!1);if(f.length==0)throw new W(2,2,2007);for(var k=lc.apply(ec,y(f)),l=0,m=0;m<h.length;m++){var n=V(k,l,h[m]);l+=h[m];var q=g.get(m);if(q&&q.length){n=V(n,0,q[0]);for(var r=[],u=q[0],v=1;v<q.length;v++){var w=V(a,u,q[v]);w=fc(w);r.push("data:image/png;base64,"+w);u+=q[v]}d=d.concat(this.g.parseMedia(n,b,c,r))}else d=d.concat(this.g.parseMedia(n,b,c,[]))}return d};S("shaka.text.Mp4TtmlParser",$w);$w.prototype.parseMedia=$w.prototype.parseMedia;
$w.prototype.setManifestType=$w.prototype.setManifestType;$w.prototype.setSequenceMode=$w.prototype.setSequenceMode;$w.prototype.parseInit=$w.prototype.parseInit;Ce('application/mp4; codecs="stpp"',function(){return new $w});Ce('application/mp4; codecs="stpp.ttml"',function(){return new $w});Ce('application/mp4; codecs="stpp.ttml.im1i"',function(){return new $w});Ce('application/mp4; codecs="stpp.ttml.im1t"',function(){return new $w});Ce('application/mp4; codecs="stpp.ttml.im2i"',function(){return new $w});
Ce('application/mp4; codecs="stpp.ttml.im2t"',function(){return new $w});Ce('application/mp4; codecs="stpp.ttml.etd1"',function(){return new $w});Ce('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new $w});Ce('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new $w});Ce('application/mp4; codecs="stpp.TTML.im1t"',function(){return new $w});function ax(){this.g="UNKNOWN"}ax.prototype.parseInit=function(){};ax.prototype.setSequenceMode=function(){};ax.prototype.setManifestType=function(a){this.g=a};
ax.prototype.parseMedia=function(a,b){a=Xb(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new W(2,2,2E3);a=b.vttOffset;if(this.g=="HLS")if(c[0].includes("X-TIMESTAMP-MAP")){a=c[0];var d=a.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);a=a.match(/MPEGTS:(\d+)/m);if(!d||!a)throw new W(2,2,2E3);d=(d=d[1])?Vc(new Rc(d)):null;if(d==null)throw new W(2,2,2E3);a=Number(a[1]);for(var e=b.segmentStart-b.periodStart;e>=95443.7176888889;)e-=
95443.7176888889,a+=8589934592;a=b.periodStart+a/9E4-d}else b.periodStart&&b.vttOffset==b.periodStart&&(a=0);b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Rc(e);var f=new Oc;Uc(e);Sc(e);for(var g=Uc(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=
Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Sc(e);g=Uc(e)}b.push(f)}d=new Map;Vd(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((f.length!=1||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&f[0]=="STYLE"){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),g!=-1&&(h[g].push(f[k]),
f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Hd(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var r=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=
!0;l.fontFamily=r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(parseInt(r,10)>=700||r=="bold")m=!0,l.fontWeight=be;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=Rd;break;case "italic":m=!0;l.fontStyle=ce;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine=r!="noWrap"}}}m&&
d.set(g,l)}}l=f;m=a;if(l.length==1&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Rc(l[0]),g=Vc(h),n=Tc(h,/[ \t]+--\x3e[ \t]+/g),k=Vc(h),g==null||n==null||k==null)Ta("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new Hd(g,k,m);Sc(h);for(g=Uc(h);g;)bx(l,g,b),Sc(h),
g=Uc(h);Ud(l,d);f!=null&&(l.id=f);f=l}f&&e.push(f)}return e};
function bx(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],b=="middle"?a.textAlign=Kd:a.textAlign=ee[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode=d[1]=="lr"?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b=="line-left"||b=="start"?"line-left":b=="line-right"||
b=="end"?"line-right":b=="center"||b=="middle"?"center":Jd);else if(d=/^region:(.*)$/.exec(b)){if(b=cx(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=ge[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Nd,a.line=Number(c[1]),c[2]&&(a.lineAlign=ge[c[2].toUpperCase()])}function cx(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
S("shaka.text.VttTextParser",ax);ax.prototype.parseMedia=ax.prototype.parseMedia;ax.prototype.setManifestType=ax.prototype.setManifestType;ax.prototype.setSequenceMode=ax.prototype.setSequenceMode;ax.prototype.parseInit=ax.prototype.parseInit;Ce("text/vtt",function(){return new ax});Ce('text/vtt; codecs="vtt"',function(){return new ax});Ce('text/vtt; codecs="wvtt"',function(){return new ax});function dx(){this.g=null}dx.prototype.parseInit=function(a){var b=this,c=!1;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).P("mdhd",function(d){d=bh(d.reader,d.version);b.g=d.timescale}).box("minf",Ug).box("stbl",Ug).P("stsd",Wg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new W(2,2,2008);if(!c)throw new W(2,2,2008);};dx.prototype.setSequenceMode=function(){};dx.prototype.setManifestType=function(){};
dx.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new W(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Pg).box("moof",Ug).box("traf",Ug).P("tfdt",function(A){g=!0;c=ah(A.reader,A.version).baseMediaDecodeTime}).P("tfhd",function(A){l=$g(A.reader,A.flags).ad}).P("trun",function(A){h=!0;d=ch(A.reader,A.version,A.flags).mf}).box("mdat",Zg(function(A){k=!0;e=A},!1)).parse(a,!1);if(!k&&!g&&!h)throw new W(2,2,2008);a=c;for(var m=new Gg(e,0),n=t(d),q=n.next();!q.done;q=
n.next()){q=q.value;var r=q.nf||l,u=q.ke?c+q.ke:a;a=u+(r||0);var v=0;do{var w=m.O();v+=w;var z=m.O(),x=null;Tg(z)=="vttc"?w>8&&(x=m.Vb(w-8,!1)):m.skip(w-8);r&&x&&(w=ex(x,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(Re)};function ex(a,b,c){var d,e,f;(new Pg).box("payl",Zg(function(g){d=Xb(g)},!1)).box("iden",Zg(function(g){e=Xb(g)},!1)).box("sttg",Zg(function(g){f=Xb(g)},!1)).parse(a);return d?fx(d,e,f,b,c):null}
function fx(a,b,c,d,e){a=new Hd(d,e,a);Ud(a);b&&(a.id=b);if(c)for(b=new Rc(c),c=Uc(b);c;)bx(a,c,[]),Sc(b),c=Uc(b);return a}S("shaka.text.Mp4VttParser",dx);dx.prototype.parseMedia=dx.prototype.parseMedia;dx.prototype.setManifestType=dx.prototype.setManifestType;dx.prototype.setSequenceMode=dx.prototype.setSequenceMode;dx.prototype.parseInit=dx.prototype.parseInit;Ce('application/mp4; codecs="wvtt"',function(){return new dx});function gx(){}ma(gx,Ik);S("shaka.util.FairPlayUtils",gx);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();

//# sourceMappingURL=shaka-player.dash.map