UNPKG

shaka-player

Version:
1,640 lines 721 kB
/*
 @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 r;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function ca(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 da=ca(this);function ea(a,b){if(b)a:{var c=da;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&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
ea("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;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(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}var ha="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ia;
if("function"==typeof Object.setPrototypeOf)ia=Object.setPrototypeOf;else{var ja;a:{var la={a:!0},ma={};try{ma.__proto__=la;ja=ma.a;break a}catch(a){}ja=!1}ia=ja?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ia;
function qa(a,b){a.prototype=ha(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Tk=b.prototype}function ua(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function va(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ua.prototype.u=function(a){this.h=a};
function wa(a,b){a.i={Ng:b,Zg:!0};a.g=a.m||a.j}ua.prototype.return=function(a){this.i={return:a};this.g=this.j};function F(a,b,c){a.g=c;return{value:b}}ua.prototype.s=function(a){this.g=a};function H(a){a.g=0}function xa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function za(a,b){a.m=0;a.j=b||0}function Aa(a,b,c){a.g=b;a.m=c||0}function Ba(a,b){a.m=b||0;b=a.i.Ng;a.i=null;return b}function Da(a){a.A=[a.i];a.m=0;a.j=0}
function Ea(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Zg?a.g=a.m||a.j:void 0!=c.s&&a.j<c.s?(a.g=c.s,a.i=null):a.g=a.j:a.g=b}function Ga(a){this.g=new ua;this.h=a}function Ha(a,b){va(a.g);var c=a.g.l;if(c)return Ja(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ka(a)}
function Ja(a,b,c,d){try{var e=b.call(a.g.l,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.l=null,wa(a.g,g),Ka(a)}a.g.l=null;d.call(a.g,f);return Ka(a)}function Ka(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,wa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Zg)throw b.Ng;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function La(a){this.next=function(b){va(a.g);a.g.l?b=Ja(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Ka(a));return b};this.throw=function(b){va(a.g);a.g.l?b=Ja(a,a.g.l["throw"],b,a.g.u):(wa(a.g,b),b=Ka(a));return b};this.return=function(b){return Ha(a,b)};this[Symbol.iterator]=function(){return this}}function Ma(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 Q(a){return Ma(new La(new Ga(a)))}function Na(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
ea("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(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.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.H(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.C(g):this.m(g)}};
b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.I(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(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.A()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.A=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
b.prototype.H=function(g){var h=this.j();g.Sd(h.resolve,h.reject)};b.prototype.I=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(p,q){return"function"==typeof p?function(u){try{l(p(u))}catch(w){m(w)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.Sd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Sd=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;null==this.g?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).Sd(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(w){p[u]=w;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).Sd(n(p.length-1),m),k=h.next();
while(!k.done)})};return b});function Oa(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
ea("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"object"===l&&null!==k||"function"===l}function e(k){if(!Oa(k,g)){var l=new c;ba(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(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}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(!Oa(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Oa(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Oa(k,
g)&&Oa(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Oa(k,g)&&Oa(k[g],this.g)?delete k[g][this.g]:!1};return b});
ea("Map",function(a){function b(){var h={};return h.Yb=h.next=h.head=h}function c(h,k){var l=h[1];return fa(function(){if(l){for(;l.head!=h[1];)l=l.Yb;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;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Oa(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||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=
m.value[0].x||"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?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],Yb:this[1].Yb,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Yb.next=l.entry,this[1].Yb=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.Yb.next=
h.entry.next,h.entry.next.Yb=h.entry.Yb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Yb=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});
ea("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||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)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||4!=f.value[0].x||
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?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 Qa(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}ea("Array.prototype.values",function(a){return a?a:function(){return Qa(this,function(b,c){return c})}});
ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){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}});ea("Array.prototype.keys",function(a){return a?a:function(){return Qa(this,function(b){return b})}});
ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});ea("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(0>c&&(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 Ra(a,b,c){if(null==a)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+""}ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ra(this,b,"includes").indexOf(b,c||0)}});
ea("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(0>e||1114111<e||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);65535>=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
function Sa(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{Xg:e,v:f}}return{Xg:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Sa(this,b,c).Xg}});
ea("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});
ea("Array.prototype.find",function(a){return a?a:function(b,c){return Sa(this,b,c).v}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ra(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}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Oa(b,d)&&c.push([d,b[d]]);return c}});
var Ta="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Oa(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Ta});ea("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;})})}});
ea("Array.prototype.entries",function(a){return a?a:function(){return Qa(this,function(b,c){return[b,c]})}});ea("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Ra(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Number.EPSILON",function(){return Math.pow(2,-52)});
ea("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});ea("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Oa(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
ea("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ra(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});var Ua=this||self;
function T(a,b){a=a.split(".");var c=Ua;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Va(){}function Wa(){};function Xa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Xa.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 Ya(a){return a.h/(1-Math.pow(a.g,a.i))};function Za(){this.h=new Xa(2);this.j=new Xa(5);this.g=0;this.i=128E3;this.l=16E3}Za.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)};Za.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)}};Za.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ya(this.h),Ya(this.j))};function $a(){}function ab(){}function bb(){}function cb(a){var b=Na.apply(1,arguments);fb.has(a)||(fb.add(a),bb.apply($a,y(b)))}function gb(){}function hb(){}function ib(){}var fb=new Set;
window.console&&((new Map).set(1,function(){return console.error.apply(console,y(Na.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,y(Na.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,y(Na.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,y(Na.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,y(Na.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,y(Na.apply(0,arguments)))}),
bb=function(){return console.warn.apply(console,y(Na.apply(0,arguments)))},ab=function(){console.error.apply(console,y(Na.apply(0,arguments)))});function kb(){this.g=new Map}r=kb.prototype;r.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};r.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};r.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)}};r.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};r.size=function(){return this.g.size};r.keys=function(){return Array.from(this.g.keys())};function lb(){this.g=new kb}r=lb.prototype;r.release=function(){this.Qa();this.g=null};r.D=function(a,b,c,d){this.g&&(a=new mb(a,b,c,d),this.g.push(b,a))};r.ma=function(a,b,c,d){function e(g){f.Ja(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};r.Ja=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.Ja(),this.g.remove(b,e))}};
r.Qa=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.Ja();this.g.g.clear()}};T("shaka.util.EventManager",lb);lb.prototype.removeAll=lb.prototype.Qa;lb.prototype.unlisten=lb.prototype.Ja;lb.prototype.listenOnce=lb.prototype.ma;lb.prototype.listen=lb.prototype.D;lb.prototype.release=lb.prototype.release;
function mb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=nb(a,d);this.target.addEventListener(b,c,this.g)}mb.prototype.Ja=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function nb(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return pb(a)?b:b.capture||!1}
function pb(a){var b=qb;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}qb=b}return b||!1}var qb=void 0;T("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function rb(a,b){this.g=a;this.h=b}rb.prototype.toString=function(){return"v"+this.g+"."+this.h};function sb(a,b){var c=new rb(5,0),d=tb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function vb(a,b,c,d){bb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function wb(a,b,c,d){ab([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var tb=null;/*
 @license
 Copyright 2008 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
var xb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
function yb(a){var b;a instanceof yb?(zb(this,a.Kb),this.Hc=a.Hc,Ab(this,a.nb),Bb(this,a.$c),this.ab=a.ab,Cb(this,a.g.clone()),this.qc=a.qc):a&&(b=String(a).match(xb))?(zb(this,b[1]||"",!0),this.Hc=Db(b[2]||""),Ab(this,b[3]||"",!0),Bb(this,b[4]),this.ab=Db(b[5]||"",!0),Cb(this,b[6]||"",!0),this.qc=Db(b[7]||"")):this.g=new Eb(null)}r=yb.prototype;r.Kb="";r.Hc="";r.nb="";r.$c=null;r.ab="";r.qc="";
r.toString=function(){var a=[],b=this.Kb;b&&a.push(Fb(b,Gb,!0),":");if(b=this.nb){a.push("//");var c=this.Hc;c&&a.push(Fb(c,Gb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.$c;null!=b&&a.push(":",String(b))}if(b=this.ab)this.nb&&"/"!=b.charAt(0)&&a.push("/"),a.push(Fb(b,"/"==b.charAt(0)?Hb:Ib,!0));(b=this.g.toString())&&a.push("?",b);(b=this.qc)&&a.push("#",Fb(b,Jb));return a.join("")};
r.resolve=function(a){var b=this.clone();"data"===b.Kb&&(b=new yb);var c=!!a.Kb;c?zb(b,a.Kb):c=!!a.Hc;c?b.Hc=a.Hc:c=!!a.nb;c?Ab(b,a.nb):c=null!=a.$c;var d=a.ab;if(c)Bb(b,a.$c);else if(c=!!a.ab){if("/"!=d.charAt(0))if(this.nb&&!this.ab)d="/"+d;else{var e=b.ab.lastIndexOf("/");-1!=e&&(d=b.ab.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ab=d:c=""!==a.g.toString();c?Cb(b,a.g.clone()):c=!!a.qc;c&&(b.qc=a.qc);return b};r.clone=function(){return new yb(this)};function zb(a,b,c){a.Kb=c?Db(b,!0):b;a.Kb&&(a.Kb=a.Kb.replace(/:$/,""))}function Ab(a,b,c){a.nb=c?Db(b,!0):b}function Bb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.$c=b}else a.$c=null}
function Cb(a,b,c){b instanceof Eb?a.g=b:(c||(b=Fb(b,Kb)),a.g=new Eb(b))}function Db(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Fb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Lb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Lb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Gb=/[#\/\?@]/g,Ib=/[#\?:]/g,Hb=/[#\?]/g,Kb=/[#\?@]/g,Jb=/#/g;function Eb(a){this.g=a||null}
function Mb(a){if(!a.Va&&(a.Va=new Map,a.kd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=Eb.prototype;r.Va=null;r.kd=null;function Nb(a){Mb(a);return a.kd}r.add=function(a,b){Mb(this);this.g=null;var c=this.Va.has(a)?this.Va.get(a):null;c||this.Va.set(a,c=[]);c.push(b);this.kd++;return this};
r.set=function(a,b){Mb(this);this.g=null;this.Va.has(a)?this.Va.set(a,[b]):this.add(a,b);return this};r.get=function(a){Mb(this);return this.Va.get(a)||[]};r.toString=function(){if(this.g)return this.g;if(!this.Va||!this.Va.size)return"";for(var a=[],b=t(this.Va.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.Va.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("&")};
r.clone=function(){var a=new Eb;a.g=this.g;if(this.Va){for(var b=new Map,c=t(this.Va),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.Va=b;a.kd=this.kd}return a};function Ob(){}function Pb(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=Qb(a);b=Qb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Sb(a){return ArrayBuffer.isView(a)?0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function Qb(a,b,c){c=void 0===c?Infinity:c;return Tb(a,void 0===b?0:b,c,Uint8Array)}function Ub(a,b,c){c=void 0===c?Infinity:c;return Tb(a,void 0===b?0:b,c,Uint16Array)}function Vb(a,b,c){c=void 0===c?Infinity:c;return Tb(a,void 0===b?0:b,c,DataView)}
function Tb(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)}T("shaka.util.BufferUtils",Ob);Ob.toDataView=Vb;Ob.toUint16=Ub;Ob.toUint8=Qb;Ob.toArrayBuffer=Sb;Ob.equal=Pb;function U(a,b,c){var d=Na.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(Wb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}U.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};T("shaka.util.Error",U);var Wb=!0;U.Severity={RECOVERABLE:1,CRITICAL:2};U.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
U.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,CHAPTERS_TRACK_FAILED:2015,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,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,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 Xb(a){this.h=a;this.g=void 0}Xb.prototype.value=function(){void 0===this.g&&(this.g=this.h());return this.g};function Yb(a,b){return a.length&&b.length&&a!==b?0<Zb(a,b).length:!0}
function Zb(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}}return c}
function $b(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function ac(a){return a?!!a.match(/^com\.apple\.fps/):!1}var bc=new Xb(function(){return Sb(new Uint8Array([0]))}),cc=new Map;function dc(a){this.h=a;this.g=null}dc.prototype.da=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()},1E3*a);return this};dc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function ec(a){this.h=a;this.g=null}ec.prototype.sb=function(){this.stop();this.h();return this};ec.prototype.da=function(a){var b=this;this.stop();this.g=(new dc(function(){b.h()})).da(a);return this};ec.prototype.ua=function(a){var b=this;this.stop();this.g=(new dc(function(){b.g.da(a);b.h()})).da(a);return this};ec.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};T("shaka.util.Timer",ec);ec.prototype.stop=ec.prototype.stop;ec.prototype.tickEvery=ec.prototype.ua;
ec.prototype.tickAfter=ec.prototype.da;ec.prototype.tickNow=ec.prototype.sb;function fc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function gc(a){return""!=hc().canPlayType(a)}function ic(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function jc(){return kc("Xbox One")}function lc(){return kc("Tizen")}function mc(){return kc("Tizen 3")}function nc(){return kc("Web0S")}function oc(){return nc()&&38===pc()}function qc(){return kc("CrKey")&&!kc("VIZIO SmartCast")}
function pc(){if(!kc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function rc(){return sc()&&((navigator.userAgentData&&navigator.userAgentData.platform?"macos"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("mac"):!1)||(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?!0:sc()&&1<navigator.maxTouchPoints))}
function tc(){return kc("PlayStation 5")}function uc(){return kc("PlayStation 4")}function vc(){return kc("Hisense")||kc("VIDAA")}function wc(){if(!rc()&&(!sc()||rc()))return null;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}
function xc(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function yc(){return navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase():kc("Android")}
function zc(){return navigator.userAgentData&&navigator.userAgentData.platform?"fuchsia"==navigator.userAgentData.platform.toLowerCase():kc("Fuchsia")}function Ac(){return lc()||nc()||jc()||uc()||tc()||qc()||vc()||kc("VIZIO SmartCast")||sc()&&!rc()?!0:!1}function kc(a){return(navigator.userAgent||"").includes(a)}function sc(){return(navigator.vendor||"").includes("Apple")}
function hc(){if(Bc)return Bc;Cc||(Cc=new ec(function(){Bc=null}));(Bc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Bc=document.createElement("video"));Cc.da(1);return Bc}function Dc(){if(mc()||kc("Tizen 2")||oc()||uc()||tc())return!1;var a=wc();return sc()&&!rc()&&null!=a&&15>a?!1:!0}
function Ec(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v;return Q(function(x){switch(x.g){case 1:a={width:Infinity,height:Infinity};if(qc()){q=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;xa(x,14);if(!(u=q)){x.s(16);break}return F(x,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),17)}if(lc()){b=window.devicePixelRatio;a.width=1920<window.screen.width*b?3840:1920;a.height=1080<window.screen.height*b?2160:1080;try{webapis.systeminfo&&
webapis.systeminfo.getMaxVideoResolution?(c=webapis.systeminfo.getMaxVideoResolution(),a.width=c.width,a.height=c.height):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(z){bb("Tizen: Error detecting screen size, default screen size 1920x1080.")}x.s(3);break}if(nc()){try{d=JSON.parse(window.PalmSystem.deviceInfo),a.width=
Math.max(1920,d.screenWidth),a.height=Math.max(1080,d.screenHeight)}catch(z){bb("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}x.s(3);break}if(vc()){e=null;if(window.Hisense_Get4KSupportState)try{e=window.Hisense_Get4KSupportState()}catch(z){}null==e&&(e=kc("UHD"));e?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);x.s(3);break}if(!uc()&&!tc()){f=void 0;try{f="undefined"!==typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(z){}if(f){a.width=
1920;a.height=1080;try{g=new f.Media.Protection.ProtectionCapabilities;h=f.Media.Protection.ProtectionCapabilityResult;k=null;do k=g.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(k===h.maybe);k===h.probably&&(a.width=3840,a.height=2160)}catch(z){bb("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else jc()&&
(a.width=1920,a.height=1080,bb("Xbox: Error detecting screen size, default screen size 1920x1080."));x.s(3);break}l=!1;xa(x,8);return F(x,window.msdk.device.getDisplayInfo(),10);case 10:m=x.h;l="4K"===m.resolution;Aa(x,9);break;case 8:return Ba(x),xa(x,11),F(x,window.msdk.device.getDisplayInfoImmediate(),13);case 13:n=x.h;l="4K"===n.resolution;Aa(x,9);break;case 11:p=Ba(x),bb("PlayStation: Failed to get the display info:",p);case 9:l?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);x.s(3);
break;case 17:u=x.h;case 16:if(u){a.width=3840;a.height=2160;x.s(18);break}if(!(w=q)){x.s(19);break}return F(x,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:w=x.h;case 19:w&&(a.width=1920,a.height=1080);case 18:Aa(x,3);break;case 14:v=Ba(x),ab("Failed to check canDisplayType:",v);case 3:return x.return(a)}})}function Fc(a){return void 0!==window.matchMedia&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"}var Cc=null,Bc=null;function Gc(){}
function Hc(a){if(!a)return"";a=Qb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!uc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&ab('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;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
function Ic(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Vb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Jc(d)}
function Kc(a){function b(d){return c.byteLength<=d||9<=c[d]&&126>=c[d]}if(!a)return"";var c=Qb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Hc(c);if(254==c[0]&&255==c[1])return Ic(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Ic(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Ic(a,!1);if(0==c[1]&&0==c[3])return Ic(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Hc(a);throw new U(2,2,2003);}
function Lc(a){if(window.TextEncoder&&!uc()){var b=new TextEncoder;return Sb(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 Sb(b)}function Mc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function Jc(a){return Nc.value()(a)}
function Pc(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="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}T("shaka.util.StringUtils",Gc);Gc.resetFromCharCode=function(){Nc.g=void 0};
Gc.toUTF16=Mc;Gc.toUTF8=Lc;Gc.fromBytesAutoDetect=Kc;Gc.fromUTF16=Ic;Gc.fromUTF8=Hc;var Nc=new Xb(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={jc:65536};0<b.jc;b={jc:b.jc},b.jc/=2)if(a(b.jc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.jc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.jc));return e}}(b);return null});function Qc(){}function Rc(a){a=Jc(Qb(a));return btoa(a)}function Sc(a,b){b=void 0==b?!0:b;a=Rc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Tc(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 Uc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
function Vc(a){var b=Qb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Wc(){for(var a=Na.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)&&1===e.BYTES_PER_ELEMENT?b.set(e,c):b.set(Qb(e),c);c+=e.byteLength}return b}T("shaka.util.Uint8ArrayUtils",Qc);Qc.concat=Wc;Qc.toHex=Vc;Qc.fromHex=Uc;Qc.fromBase64=Tc;Qc.toBase64=Sc;
Qc.toStandardBase64=Rc;function Xc(a,b,c){c=void 0===c?"":c;if(0==b.length)return a;if(1==a.length&&1==b.length){var d=new yb(a[0]);b=new yb(b[0]);b=d.resolve(b);c&&Cb(b,c);return[b.toString()]}b=b.map(function(h){return new yb(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new yb(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&Cb(g,c),d.push(g.toString())}return d}
function Yc(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
function $c(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Sc(Uc(h),!1));var l=g;22!=l.length&&(l=Sc(Uc(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:Qb(Lc(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 ad(a,b){if(1==b.length)return b[0];a=bd(a,b);if(null!=a)return a;throw new U(2,4,4025,b);}function bd(a,b){var c=cd.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==dd?"":null}
function ed(a,b){var c=[];a=cd.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 dd="text",fd={la:"video",V:"audio",za:dd,$e:"image",Mj:"application"},gd=1/15,cd=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function id(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.o=d;this.j=!1;a:{"undefined"===typeof libDPIModule&&bb("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,sb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{bb("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(bb("Could not find LCEVC Library on this page"),
a=!1):(this.h.SupportObject.SupportStatus||bb(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}
function jd(a,b,c,d){"video"!==d.type||a.o&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.o)}function kd(a){a.g&&a.i.classList.add("shaka-hidden")}id.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ld(a){return a&&"undefined"!==typeof LCEVCdec?"lvc1"==a.codecs:!1}T("shaka.lcevc.Dec",id);id.prototype.release=id.prototype.release;function md(a){if(nd.has(a))return nd.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),nd.set(a,b),b):!1}function od(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}function pd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var nd=new Map;function qd(){}qd.prototype.extract=function(){};qd.prototype.decode=function(){return[]};qd.prototype.clear=function(){};qd.prototype.getStreams=function(){return[]};function rd(){}rd.prototype.init=function(){};rd.prototype.parse=function(){return[]};function sd(){}sd.prototype.init=function(){};sd.prototype.i=function(){};sd.prototype.g=function(){};sd.prototype.j=function(){};T("shaka.media.IClosedCaptionParser",sd);function td(a){this.l=new rd;if(a=ud(a.toLowerCase()))this.l=a();this.h=new qd;if(a=vd)this.h=a()}td.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};td.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Qb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
td.prototype.g=function(){this.h.clear()};td.prototype.j=function(){return this.h.getStreams()};function wd(a,b){xd.set(a,b)}function ud(a){return xd.get(a)}T("shaka.media.ClosedCaptionParser",td);td.findDecoder=function(){return vd};td.unregisterDecoder=function(){vd=null};td.registerDecoder=function(a){vd=a};td.findParser=ud;td.unregisterParser=function(a){xd.delete(a)};td.registerParser=wd;var xd=new Map,vd=null;function yd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=zd;this.scroll=Ad}T("shaka.text.CueRegion",yd);var zd=1;yd.units={PX:0,PERCENTAGE:zd,LINES:2};var Ad="";yd.scrollMode={NONE:Ad,UP:"up"};function Bd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Cd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Dd(a,b,c){c||(c=Bd);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={ah:void 0},d=a.next()){e.ah=d.value;d=b.findIndex(function(f){return function(g){return c(f.ah,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
function Ed(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=Bd);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 Fd(a){this.h=a||"";this.g=0}function Gd(a){Hd(a,/[ \t]+/gm)}function Hd(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Id(a){return a.g==a.h.length?null:(a=Hd(a,/[^ \t\n]*/gm))?a[0]:null}
function Kd(a){a=Hd(a,Ld);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:(Number(a[6])||0)/1E3+c+60*b+3600*(Number(a[1])||0)}function Md(a){return a?Kd(new Fd(a)):null}var Ld=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Nd(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=d.constructor==Array;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 Od(a){var b={},c;for(c in a)b[c]=a[c];return b}
function Pd(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];void 0!==e&&(e=Pd(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if("function"==typeof a)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],void 0!==e&&(e=Pd(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a};/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function Qd(a,b){var c=void 0===c?!1:c;a=Kc(a);return Rd(a,b,c)}function Rd(a,b,c){a=Sd(a,void 0===c?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function Td(a){return Ud.has(a)?Ud.get(a):""}
function Sd(a,b){function c(f,g){g=void 0===g?!1:g;for(var h=[];a[e];)if(60==a.charCodeAt(e)){if(47===a.charCodeAt(e+1)){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0<l&&(k=g.indexOf(f.substring(0,l)))}if(-1==k)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(33===a.charCodeAt(e+1)){if(45==a.charCodeAt(e+2)){for(;-1!==e&&(62!==a.charCodeAt(e)||
45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var p=a.charCodeAt(e);if(64<p&&91>p||96<p&&123>p){p=d();for(var q=a.charCodeAt(e);q&&39!==q&&34!==q&&!(64<q&&91>q||96<q&&123>
q)&&62!==q;)e++,q=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===q||34===q){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(p.startsWith("xmlns:")){q=u;var w=p.split(":")[1];Ud.set(q,w);Vd.set(w,q)}"tt"===m&&"xml:space"===p&&"preserve"===u&&(l=!0);n[p]=u}e++}47!==a.charCodeAt(e-1)?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;for(n=
0;n<m;n++)p=k[n],"string"!==typeof p?b&&(p.parent=l):n==m-1&&"\n"==p&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,y(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,-2===e&&(e=a.length),k=a.slice(k,e+1),g?0<k.length&&h.push(k):h.length&&1==k.length&&"\n"==k[0]?h.push(k):0<k.trim().length&&h.push(k),e++;return h}function d(){for(var f=e;-1==="\r\n\t>/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
function Wd(a){return"string"===typeof a}function Xd(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function Yd(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 Zd(a){if("string"===typeof a)return Pc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Pc(a)}
function $d(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=Zd(a))&&(a=a.trim());return a}function ae(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())ae(d.value,b,c)}return c}function be(a,b){a=Yd(a,b);return 1!=a.length?null:a[0]}function ce(a,b,c){a=ee(a,b,c);return 1!=a.length?null:a[0]}
function he(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function ie(a,b,c){b=Td(b);return a.attributes[b+":"+c]||null}function ee(a,b,c){var d=Td(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 je(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=ie(a,d.value,c))return d;return null}
function ke(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 le(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 me(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 ne(a){a=Number(a);return 0===a%1?a:null}function oe(a){a=Number(a);return 0===a%1&&0<a?a:null}function pe(a){a=Number(a);return 0===a%1&&0<=a?a:null}function qe(a){a=Number(a);return isNaN(a)?null:a}function re(a){return a?"true"===a.toLowerCase():!1}
function se(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
function te(a){var b=[];a=Pc(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,ac:c.split("/@")[1]||
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].ac=c.slice(1))}return b}
function ue(a,b){var c=te(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=ve(a,"t",d.t)),null!==d.n&&(c=ve(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.ac)&&a[c]?we(a[c],e,d,$d(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(y(b.children))))}}
function ve(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 we(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
function xe(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=Vd.has(b)?Vd.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,"string"==typeof d?c=new Text(d):c=xe(d),b.appendChild(c);return b}
function ze(a){if(!a)return null;var b={tagName:a.tagName,attributes:Od(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=ze(c),c.parent=b,b.children.push(c));return b}var Ud=new Map,Vd=new Map;function Ae(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new yd;this.position=null;this.positionAlign=Be;this.size=0;this.textAlign=Ce;this.direction=De;this.writingMode=Ee;this.lineInterpretation=Fe;this.line=null;this.lineHeight="";this.lineAlign=Ge;this.displayAlign=He;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ie;this.fontStyle=Je;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={oc:32,rows:15}}function Ke(a,b){a=new Ae(a,b,"");a.lineBreak=!0;return a}Ae.prototype.clone=function(){var a=new Ae(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
function Le(a,b){if(a.payload!=b.payload||!(.001>Math.abs(a.startTime-b.startTime)&&.001>Math.abs(a.endTime-b.endTime)))return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Ed(a.nestedCues,b.nestedCues,Le))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Ed(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function Me(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&Ne(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(Pe)&&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(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(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=Qe(c);a.payload="";try{var m=Rd("<span>"+c+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=
m.length||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())Re(c.value,a,b);else a.payload=Pc(c);else a.payload=Pc(c)}else a.payload=Pc(c)}function Ne(a){for(var b=t(Object.entries(Se)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Ae(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Te));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Ae(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function Qe(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 Re(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new yd;d.position=null;d.size=0;d.textAlign=Ce;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=Ue(g.backgroundColor,h.backgroundColor),h.color=Ue(g.color,h.color),h.fontFamily=Ue(g.fontFamily,h.fontFamily),
h.fontSize=Ue(g.fontSize,h.fontSize),h.textShadow=Ue(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=Ke(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=Ve;break;case "i":d.fontStyle=We;break;case "u":d.textDecoration.push(Xe);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=Md(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Wd(a)||1==e.length&&Wd(e[0]))for(c=Zd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Ke(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Pc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())Re(a.value,d,c)}function Ue(a,b){return a&&0<a.length?a:b}T("shaka.text.Cue",Ae);Ae.parseCuePayload=Me;Ae.equal=Le;
Ae.prototype.clone=Ae.prototype.clone;var Be="auto";Ae.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Be};var Ce="center",Ye={LEFT:"left",RIGHT:"right",CENTER:Ce,START:"start",END:"end"};Ae.textAlign=Ye;var He="after",Ze={BEFORE:"before",CENTER:"center",AFTER:He};Ae.displayAlign=Ze;var De="ltr";Ae.direction={HORIZONTAL_LEFT_TO_RIGHT:De,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Ee="horizontal-tb";Ae.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Ee,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
var Fe=0;Ae.lineInterpretation={LINE_NUMBER:Fe,PERCENTAGE:1};var Ge="start",$e={CENTER:"center",START:Ge,END:"end"};Ae.lineAlign=$e;var Se={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Ae.defaultTextColor=Se;var Te={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Ae.defaultTextBackgroundColor=Te;var Ie=400,Ve=700;Ae.fontWeight={NORMAL:Ie,BOLD:Ve};
var Je="normal",We="italic",af={NORMAL:Je,ITALIC:We,OBLIQUE:"oblique"};Ae.fontStyle=af;var Xe="underline";Ae.textDecoration={UNDERLINE:Xe,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Pe=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function bf(){}bf.prototype.destroy=function(){};function cf(a,b,c){df.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,se:b})}function ef(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([ff,gf,hf,jf]),e=d.next();!e.done;e=d.next())if(e=df.get(c+"-"+e.value)){var f=e.se(),g=f.isSupported(a,b);f.destroy();if(g)return e.se}return null}T("shaka.transmuxer.TransmuxerEngine",bf);bf.findTransmuxer=ef;bf.unregisterTransmuxer=function(a,b){df.delete(a.toLowerCase().split(";")[0]+"-"+b)};
bf.registerTransmuxer=cf;bf.prototype.destroy=bf.prototype.destroy;var df=new Map,jf=1,hf=2,gf=3,ff=4;bf.PluginPriority={FALLBACK:jf,PREFERRED_SECONDARY:hf,PREFERRED:gf,APPLICATION:ff};function kf(){}function lf(a,b){var c=a;b&&!mf.includes(a)&&(c+='; codecs="'+b+'"');return c}function nf(a,b){b&&(a+='; codecs="'+b+'"');return a}function of(a,b,c){var d=lf(a,b);b=nf(a,b);ef(b)?(a=ef(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
function pf(a,b,c){var d=[b];qf.forEach(function(e,f){var g=a[f];"codecs"==f?mf.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function rf(a){return a.split(";")[0].split("/")[1]}
function sf(a){var b=tf(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:case "ac3"===a:case "ac-3"===a:return"ac-3";
case "mp4a"===a&&"a6"===b:case "eac3"===a:case "ec-3"===a:return"ec-3";case "ac-4"===a:return"ac-4";case "mp4a"===a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "vp09"===a:case "vp9"===a:return"vp9";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1";
case "dvc1"===a:case "dvi1"===a:return"dovi-vvc"}return a}function uf(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=tf(c.value),b.push(c[0]);return b.sort().join(",")}function vf(a){return a.split(";")[0]}function wf(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function xf(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}
function tf(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}T("shaka.util.MimeUtils",kf);kf.getFullTypeWithAllCodecs=nf;kf.getFullType=lf;var qf=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),mf=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function yf(a){this.i=null;this.j=a;this.B=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function zf(a,b){Af.set(a,b)}function Bf(a){return Af.get(a)}function Cf(a){return Af.has(a)?!0:"application/cea-608"==a||"application/cea-708"==a?!!vd:!1}yf.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
function Df(a,b,c,d,e){var f,g,h,k,l,m,n;return Q(function(p){if(1==p.g)return F(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Qb(b)),p.return();f=a.B?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Qb(b),g,e,[]);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(q){return q.startTime>=a.l&&q.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);H(p)})}
yf.prototype.remove=function(a,b){var c=this;return Q(function(d){if(1==d.g)return F(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));H(d)})};function Ef(a,b,c){a.l=b;a.m=c}function Ff(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
function Gf(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Gf(a,d.value,c)}
function Hf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Gf(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}T("shaka.text.TextEngine",yf);yf.prototype.destroy=yf.prototype.destroy;yf.findParser=Bf;yf.unregisterParser=function(a){Af.delete(a)};yf.registerParser=zf;var Af=new Map;function If(a,b){return a.concat(b)}function Jf(){}function Kf(a){return null!=a}function Lf(a,b){return Promise.race([b,new Promise(function(c,d){(new ec(d)).da(a)})])};function Mf(){}function Nf(a,b){a=Of(a);b=Of(b);return a.split("-")[0]==b.split("-")[0]}function Pf(a,b){a=Of(a);b=Of(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Sf(a,b){a=Of(a);b=Of(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
function Of(a){a=t(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=t(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=Tf.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function Uf(a,b){a=Of(a);b=Of(b);return b==a?4:Pf(b,a)?3:Sf(b,a)?2:Pf(a,b)?1:0}function Vf(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Tf.get(a)||a}
function $f(a){return a.language?Of(a.language):a.audio&&a.audio.language?Of(a.audio.language):a.video&&a.video.language?Of(a.video.language):"und"}
function ag(a,b){a=Of(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(Of(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,Pf(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,Sf(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Pf(a,b))return b;return null}T("shaka.util.LanguageUtils",Mf);Mf.findClosestLocale=ag;Mf.getLocaleForVariant=$f;
Mf.getLocaleForText=function(a){return Of(a.language||"und")};Mf.getBase=Vf;Mf.relatedness=Uf;Mf.areSiblings=function(a,b){var c=Vf(a),d=Vf(b);return a!=c&&b!=d&&c==d};Mf.normalize=Of;Mf.isSiblingOf=Sf;Mf.isParentOf=Pf;Mf.areLanguageCompatible=Nf;Mf.areLocaleCompatible=function(a,b){a=Of(a);b=Of(b);return a==b};
var Tf=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 bg(){}
function cg(a,b,c,d,e){function f(x){var z=String(x.width||"")+String(x.height||"")+String(Math.round(x.frameRate||0))+(x.hdr||"")+x.fastSwitching;x.dependencyStream&&(z+=x.dependencyStream.baseOriginalId||"");return z}function g(x){var z=x.language+(x.channelsCount||0)+(x.audioSamplingRate||0)+x.roles.join(",")+x.label+x.groupId+x.fastSwitching;x.dependencyStream&&(z+=x.dependencyStream.baseOriginalId||"");return z}if(e.length){var h=a.textStreams;e=t(e);for(var k=e.next(),l={};!k.done;l={sg:void 0},
k=e.next())if(l.sg=k.value,k=h.filter(function(x){return function(z){return z.codecs.startsWith(x.sg)||z.mimeType.startsWith(x.sg)?!0:!1}}(l)),k.length){h=k;break}a.textStreams=h}h=a.variants;if(b.length||c.length)h=dg(h,b,c);if(d.length){b=new kb;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(x,z){x=0;var D=[];z=t(z);for(var B=z.next(),I={};!B.done;I={Pe:void 0},B=z.next())I.Pe=B.value,B=d.filter(function(C){return function(A){return C.Pe.decodingInfos[0][A]}}(I)).length,
B>x?(x=B,D=[I.Pe]):B==x&&D.push(I.Pe);m.push.apply(m,y(D))});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(x,z){return x.bandwidth-z.bandwidth});var n=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=g(e);l=c.get(k)||[];if(l.length){var p=l[l.length-1],q=sf(p.codecs),u=sf(e.codecs);q!=u||e.bandwidth&&p.bandwidth&&!(e.bandwidth>p.bandwidth)||(l.push(e),n.push(e.id))}else l.push(e),
n.push(e.id);c.set(k,l)}var w={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};h=Array.from(b).sort(function(x,z){if(!x.bandwidth||!z.bandwidth||x.bandwidth==z.bandwidth){if(x.codecs&&z.codecs&&x.codecs!=z.codecs&&x.width==z.width){var D=sf(x.codecs),B=sf(z.codecs);if(D!=B)return(w[D]||1)-(w[B]||1)}return x.width-z.width}return x.bandwidth-z.bandwidth});b=od();var v=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=f(e);
l=c.get(k)||[];if(l.length){p=l[l.length-1];if(!b&&(q=sf(p.codecs),u=sf(e.codecs),q!==u))continue;q=sf(p.codecs);u=sf(e.codecs);q!=u||e.bandwidth&&p.bandwidth&&!(e.bandwidth>p.bandwidth)||(l.push(e),v.push(e.id))}else l.push(e),v.push(e.id);c.set(k,l)}a.variants=a.variants.filter(function(x){var z=x.audio;x=x.video;return z&&!n.includes(z.id)||x&&!v.includes(x.id)?!1:!0})}
function dg(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={Lh:void 0},d=b.next())if(e.Lh=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Lh)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={Cg:void 0},b=c.next())if(d.Cg=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Cg)}}(d)),b.length){a=b;break}return a}function eg(a,b,c){a.variants=a.variants.filter(function(d){return fg(d,b,c)})}
function fg(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 gg(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return Q(function(e){if(1==e.g)return F(e,hg(a,b,0<b.offlineSessionIds.length,c,d),2);ig(b);return F(e,jg(b),0)})}
function hg(a,b,c,d,e){var f,g;return Q(function(h){if(1==h.g)return jc()&&kg(b.variants),F(h,lg(b.variants,c,!1,d),2);f=null;a&&(g=a.h)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=mg(k,f,e);if(!l){var m=[];k.audio&&m.push(ng(k.audio));k.video&&m.push(ng(k.video))}return l});H(h)})}
function kg(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 mg(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=jc(),e=kc("Firefox")&&yc(),f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(d&&f&&(1920<g||1080<h)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(d=f&&f.dependencyStream)&&!ld(d))return!1;a=a.audio;return e&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
function og(a,b){var c,d,e,f,g,h,k;return Q(function(l){if(1==l.g){c=function(m,n){if(m){var p=Od(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,Rd:void 0},g=f.next())k=g.value,h.Rd=Pd(k),h.cache=pg,h.cache.has(h.Rd)?d=c(d,h.cache.get(h.Rd)):e.push(qg(k).then(function(m){return function(n){var p=
null;n=t(n||[]);for(var q=n.next();!q.done;q=n.next())p=c(p,q.value);p&&(m.cache.set(m.Rd,p),d=c(d,p))}}(h)));return F(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
function qg(a){var b=[""];a.video&&(b=wf(a.video.contentType).split(","));var c=[""];a.audio&&(c=wf(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={pc:void 0},g=f.next())g=g.value,h.pc=Nd(a),a.video&&(h.pc.video.contentType=lf(vf(h.pc.video.contentType),e)),a.audio&&(h.pc.audio.contentType=lf(vf(h.pc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){(yc()?Lf(5,navigator.mediaCapabilities.decodingInfo(k.pc)):
navigator.mediaCapabilities.decodingInfo(k.pc)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
function lg(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C;return Q(function(A){switch(A.g){case 1:if(e=a.some(function(E){return E.decodingInfos.length}))return A.return();f=t(d);g=f.next();h={};case 2:if(g.done){A.s(4);break}h.mh=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){A.s(7);break}n=m.value;p=rg(n,b,c).filter(function(E){return function(G){G=G[0];return(G.keySystemConfiguration&&G.keySystemConfiguration.keySystem)===E.mh}}(h));q=t(p);u=q.next();case 8:if(u.done){A.s(10);break}w=u.value;
return F(A,og(n,w),9);case 9:u=q.next();A.s(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();A.s(5);break;case 7:if(k)return A.return();h={mh:void 0};g=f.next();A.s(2);break;case 4:v=t(a),x=v.next();case 12:if(x.done){A.s(0);break}z=x.value;D=rg(z,b,c).filter(function(E){E=E[0];E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||!d.includes(E)});B=t(D);I=B.next();case 15:if(I.done){x=v.next();A.s(12);break}C=I.value;return F(A,og(z,C),16);case 16:I=B.next(),A.s(15)}})}
function rg(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=wf(k);if(l.includes(",")&&!d){var m=l.split(","),n=vf(k);l=ad("video",m);m=ad("audio",m);m=sg(m,n);n=of(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=tg(l);k={contentType:of(vf(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
"srgb";break;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=vf(l),l=sg(wf(l),k),k=of(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=[];0==f.length&&f.push(null);0==g.length&&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 p=m.videoRobustness+","+m.audioRobustness;l.get(p)||l.set(p,[]);l.get(p).push(m)}l=t(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];p=t(h);for(var q=p.next();!q.done;q=p.next()){q=Object.assign({},q.value);for(var u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},w=t(n),v=w.next();!v.done;v=w.next()){v=v.value;if(v.initData&&v.initData.length){for(var x=new Set,z=t(v.initData),
D=z.next();!D.done;D=z.next())x.add(D.value.initDataType);u.initDataType=v.initData[0].initDataType}v.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");v.persistentStateRequired&&(u.persistentState="required");v.sessionType&&(u.sessionTypes=[v.sessionType]);d&&(u.audio?(v.encryptionScheme&&(u.audio.encryptionScheme=u.audio.encryptionScheme||v.encryptionScheme),u.audio.robustness=u.audio.robustness||v.audioRobustness):(u.audio={robustness:v.audioRobustness},v.encryptionScheme&&(u.audio.encryptionScheme=
v.encryptionScheme)),""==u.audio.robustness&&delete u.audio.robustness);e&&(u.video?(v.encryptionScheme&&(u.video.encryptionScheme=u.video.encryptionScheme||v.encryptionScheme),u.video.robustness=u.video.robustness||v.videoRobustness):(u.video={robustness:v.videoRobustness},v.encryptionScheme&&(u.video.encryptionScheme=v.encryptionScheme)),""==u.video.robustness&&delete u.video.robustness)}q.keySystemConfiguration=u;m.push(q)}a.push(m)}}return a}
function sg(a,b){return"flac"==a.toLowerCase()?rc()?"fLaC":"flac":"opus"===a.toLowerCase()?rc()?"mp4"==rf(b)?"Opus":"opus":"opus":"ac-3"==a.toLowerCase()&&mc()?"ec-3":a}function tg(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}
function ig(a){a.textStreams=a.textStreams.filter(function(b){b=lf(b.mimeType,b.codecs);return Cf(b)})}
function jg(a){var b,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.s(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(ug.has(f)){l.s(5);break}g=vg.get(f);if(!g){ug.set(f,!1);l.s(5);break}return F(l,wg(g),7);case 7:h=l.h,ug.set(f,h);case 5:(k=ug.get(f))&&b.push(e);d=c.next();l.s(2);break;case 4:a.imageStreams=b,H(l)}})}
function wg(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(2===c.height)}})}
function xg(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),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label: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,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;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec;if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;
a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;c=g.split(",");try{a.videoCodec=ad("video",c),a.audioCodec=ad("audio",c)}catch(q){}}}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,b=b.dependencyStream)&&
(a.audioCodec=b.codecs||a.audioCodec);b=[];a.videoCodec&&b.push(a.videoCodec);a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}
function yg(a){return{id:a.id,active:!1,type:dd,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,
audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:a.originalId,originalImageId:null,accessibilityPurpose:a.accessibilityPurpose,originalLanguage:a.originalLanguage}}
function zg(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=Ag(a.segmentIndex));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,
videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId,accessibilityPurpose:null,originalLanguage:null}}function Bg(a){a.__shaka_id||(a.__shaka_id=Cg++);return a.__shaka_id}
function Dg(a){var b=Eg(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="unknown");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function Fg(a){var b=Eg(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
function Eg(a){var b=a.language;return{id:Bg(a),active:!1,type:"",bandwidth:0,language:Of(b||"und"),label:a.label,kind:a.kind,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:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,
videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function Gg(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function Hg(a){return a.filter(function(b){return Gg(b)})}
function Ig(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=ag(Of(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Of(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Jg(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(If,[]);return a.length?
Jg(e,a[0]):e}function Jg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Kg(a,b){b.length&&(b=b.filter(function(c){return sf(a.codecs)==sf(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],1<b.length&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
function ng(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
function Lg(a,b,c){if(0==c.autoShowText)return!1;if(1==c.autoShowText)return!0;var d=Of(c.preferredTextLanguage);b=Of(b.language);if(2==c.autoShowText)return Nf(b,d);if(3==c.autoShowText){if(!a)return!1;a=Of(a.language);return Nf(b,d)&&!Nf(a,b)}bb("Invalid autoShowText setting!");return!1}T("shaka.util.StreamUtils",bg);bg.meetsRestrictions=fg;
var pg=new Map,Cg=0,ug=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),vg=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Mg(){var a=this;this.G=null;this.o=!1;this.m=new Za;this.j=new lb;navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(a.o&&a.g.useNetworkInformation){a.m=new Za;a.g&&a.m.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.F=[];this.H=1;this.I=!1;this.h=this.l=this.g=this.u=null;this.A=new ec(function(){if(a.o&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=
a.chooseVariant();b&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.B=window;"documentPictureInPicture"in window&&this.j.D(window.documentPictureInPicture,"enter",function(){a.B=window.documentPictureInPicture.window;a.A&&a.A.sb();a.j.ma(a.B,"pagehide",function(){a.B=window;a.A&&a.A.sb()})});this.C=this.i=null}r=Mg.prototype;r.stop=function(){this.G=null;this.o=!1;this.F=[];this.H=1;this.l=this.u=null;this.h&&(this.h.disconnect(),this.h=null);this.A.stop();this.C=this.i=null};
r.release=function(){this.j.release();this.A=null};r.init=function(a){this.G=a};
r.chooseVariant=function(){var a=Infinity,b=Infinity;if(this.g.restrictToScreenSize){var c=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;a=this.B.screen.height*c;b=this.B.screen.width*c}if(this.h&&this.g.restrictToElementSize){c=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;var d=this.l.clientHeight,e=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(d=this.i.height,e=this.i.width);a=Math.min(a,d*c);b=Math.min(b,e*c)}c=this.F.filter(function(l){return l&&
!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});c.length||(c=this.F);d=c;c.length!=this.F.length&&(d=this.F.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));c=Ng(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=a||Infinity!=b){c=Og(c);c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.height>=a&&e.width>=b){a=e.height;b=e.width;break}c=Ng(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&&
!c.length&&(c=Ng(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d<c.length;d++){e=c[d];for(var f=isNaN(this.H)?1:Math.abs(this.H),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<c.length;k++)if(e.bandwidth!=c[k].bandwidth){h=c[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;a>=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width<e.video.width||b.video.height<e.video.height))&&(b=e)}this.u=Date.now();return b};
r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};r.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.m.sample(a,b),c&&null!=this.u&&this.o&&Pg(this))};r.trySuggestStreams=function(){null!=this.u&&this.o&&Pg(this)};
r.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.m.getBandwidthEstimate(a);return this.C?this.C.getBandwidthEstimate(a):a};r.setVariants=function(a){this.F=a};r.playbackRateChanged=function(a){this.H=a};
r.setMediaElement=function(a){function b(){c.A.da(Qg)}var c=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.l));this.j.D(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.D(c.i,"resize",b))});this.j.D(a,"leavepictureinpicture",function(){c.i&&c.j.Ja(c.i,"resize",b);c.i=null})};r.setCmsdManager=function(a){this.C=a};
r.configure=function(a){this.g=a;this.m&&this.g&&this.m.configure(this.g.advanced)};function Pg(a){if(!a.I){var b=a.m;if(!(b.g>=b.i))return;a.I=!0;a.u-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.u<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}
function Ng(a,b,c,d,e){if(a.C){var f=a.C.Ug();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return fg(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function Og(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}T("shaka.abr.SimpleAbrManager",Mg);Mg.prototype.configure=Mg.prototype.configure;
Mg.prototype.setCmsdManager=Mg.prototype.setCmsdManager;Mg.prototype.setMediaElement=Mg.prototype.setMediaElement;Mg.prototype.playbackRateChanged=Mg.prototype.playbackRateChanged;Mg.prototype.setVariants=Mg.prototype.setVariants;Mg.prototype.getBandwidthEstimate=Mg.prototype.getBandwidthEstimate;Mg.prototype.trySuggestStreams=Mg.prototype.trySuggestStreams;Mg.prototype.segmentDownloaded=Mg.prototype.segmentDownloaded;Mg.prototype.disable=Mg.prototype.disable;Mg.prototype.enable=Mg.prototype.enable;
Mg.prototype.chooseVariant=Mg.prototype.chooseVariant;Mg.prototype.init=Mg.prototype.init;Mg.prototype.release=Mg.prototype.release;Mg.prototype.stop=Mg.prototype.stop;var Qg=1;T("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function Rg(a,b){var c=Sg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
function Tg(a){var b,c;return Q(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new U(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return F(d,new Promise(function(e){(new ec(e)).da(c/1E3)}),2)}a.h*=a.m;H(d)})}function Sg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ug(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ug.prototype.resolve=function(){};Ug.prototype.reject=function(){};function Vg(a,b){this.promise=a;this.i=b;this.g=null}function Wg(a){return new Vg(Promise.reject(a),function(){return Promise.resolve()})}function Xg(){var a=Promise.reject(new U(2,7,7001));a.catch(function(){});return new Vg(a,function(){return Promise.resolve()})}function Yg(a){return new Vg(Promise.resolve(a),function(){return Promise.resolve()})}function Zg(a){return new Vg(a,function(){return a.catch(function(){})})}Vg.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
function $g(a){return new Vg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Vg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
Vg.prototype.Ha=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=ah(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ug;f.catch(function(){});var g=new U(2,7,7001);this.promise.then(c(!0),c(!1));return new Vg(f,function(){return d()})};
function ah(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}da.Object.defineProperties(Vg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});T("shaka.util.AbortableOperation",Vg);Vg.prototype.chain=Vg.prototype.Ha;Vg.prototype["finally"]=Vg.prototype.finally;
Vg.all=$g;Vg.prototype.abort=Vg.prototype.abort;Vg.notAbortable=Zg;Vg.completed=Yg;Vg.aborted=Xg;Vg.failed=Wg;function V(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
function bh(a){var b=new V(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}V.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};V.prototype.stopImmediatePropagation=function(){this.g=!0};V.prototype.stopPropagation=function(){};T("shaka.util.FakeEvent",V);
var ch={Oj:"abrstatuschanged",Pj:"adaptation",Qj:"audiotrackchanged",Rj:"audiotrackschanged",Sj:"boundarycrossed",Tj:"buffering",Uj:"complete",Vj:"downloadcompleted",Wj:"downloadfailed",Xj:"downloadheadersreceived",Yj:"drmsessionupdate",$j:"emsg",uk:"prft",Error:"error",ak:"expirationupdated",bk:"firstquartile",ck:"gapjumped",fk:"keystatuschanged",jk:"loaded",kk:"loading",mk:"manifestparsed",nk:"manifestupdated",pk:"mediaqualitychanged",qk:"mediasourcerecovered",Metadata:"metadata",rk:"midpoint",
sk:"nospatialvideoinfo",tk:"onstatechange",vk:"ratechange",xk:"segmentappended",yk:"sessiondata",zk:"spatialvideoinfo",Ak:"stalldetected",Bk:"started",Ck:"statechanged",Dk:"streaming",Ek:"textchanged",Fk:"texttrackvisibility",Gk:"thirdquartile",Hk:"timelineregionadded",Ik:"timelineregionenter",Jk:"timelineregionexit",Kk:"trackschanged",Mk:"unloading",Ok:"variantchanged"};function dh(){this.Ea=new kb;this.Ge=this}dh.prototype.addEventListener=function(a,b){this.Ea&&this.Ea.push(a,b)};dh.prototype.removeEventListener=function(a,b){this.Ea&&this.Ea.remove(a,b)};dh.prototype.dispatchEvent=function(a){if(!this.Ea)return!0;var b=this.Ea.get(a.type)||[],c=this.Ea.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.Ge;a.currentTarget=this.Ge;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
dh.prototype.release=function(){this.Ea=null};function eh(){this.g=[]}function fh(a,b){a.g.push(b.finally(function(){Cd(a.g,b)}))}eh.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 gh(a,b,c,d,e,f,g){dh.call(this);this.i=!1;this.u=new eh;this.g=new Set;this.h=new Set;this.m=a||null;this.l=b||null;this.C=c||null;this.F=d||null;this.G=e||null;this.I=f||null;this.H=g||null;this.A=this.B=!1;this.o=16E3;this.j=new Map}qa(gh,dh);r=gh.prototype;r.kg=function(a){this.B=a};r.lg=function(a){this.A=a};function hh(a,b,c,d){d=void 0===d?!1:d;c=c||ih;var e=jh.get(a);(!e||c>=e.priority)&&jh.set(a,{priority:c,se:b,ij:d})}
function kh(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)}r.lj=function(a){this.g.add(a)};r.Hj=function(a){this.g.delete(a)};r.$h=function(){this.g.clear()};r.mj=function(a){this.h.add(a)};r.Ij=function(a){this.h.delete(a)};r.ai=function(){this.h.clear()};r.Hg=function(){this.j.clear()};
function lh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();this.j.clear();dh.prototype.release.call(this);return this.u.destroy()};
r.request=function(a,b,c){var d=this,e=new mh;if(this.i){var f=Promise.reject(new U(2,7,7001));f.catch(function(){});return new nh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Nd(b.retryParameters):Sg();b.uris=Nd(b.uris);f=oh(this,a,b,c);var g=f.Ha(function(){return ph(d,a,b,c,new Rg(b.retryParameters,!1),0,null,e)}),h=g.Ha(function(p){return qh(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Ha(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.Oi||!d.m||u.fromCache||"HEAD"==b.method||a!=rh||d.m(u.timeMs,u.data.byteLength,sh(c));d.H&&d.H(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new nh(n.promise,function(){return n.abort()},e);fh(this.u,f);return f};
function oh(a,b,c,d){function e(h){f=f.Ha(function(){c.body&&(c.body=Sb(c.body));return h(b,c,d)})}var f=Yg(void 0);a.G&&e(a.G);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Ha(void 0,function(h){if(h instanceof U&&7001==h.code)throw h;throw new U(2,1,1006,h);})}
function ph(a,b,c,d,e,f,g,h){a.B&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.A&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.I&&a.I(b,d,c.uris[f],c.uris[f-1]);var k=new yb(c.uris[f]),l=k.Kb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),zb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=jh.get(l))?l.se:null;if(!n)return Wg(new U(2,1,1E3,k));var p=l.ij;(k=a.j.get(k.nb))&&(c.headers["common-access-token"]=k);var q=null,u=null,w=!1,v=!1,x;return Zg(Tg(e)).Ha(function(){if(a.i)return Xg();
x=Date.now();var z=0;c.requestStartTime=Date.now();var D=n(c.uris[f],c,b,function(C,A,E){q&&q.stop();u&&u.da(I/1E3);a.m&&b==rh&&(z++,c.packetNumber=z,a.m(C,A,sh(d),c),m=!0,h.g=E)},function(C){v=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.l&&a.l(C,c,b)},{minBytesForProgressEvents:a.o});if(!p)return D;var B=c.retryParameters.connectionTimeout;B&&(q=new ec(function(){w=!0;D.abort()}),q.da(B/1E3));var I=c.retryParameters.stallTimeout;I&&(u=new ec(function(){w=!0;D.abort()}));return D}).Ha(function(z){q&&
q.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-x);var D=z.headers["common-access-token"];if(D){var B=new yb(z.uri);a.j.set(B.nb,D)}D={response:z,Oi:m};!v&&a.l&&a.l(z.headers,c,b);a.C&&a.C(c,z);return D},function(z){q&&q.stop();u&&u.stop();if(a.F){var D=null,B=0;z instanceof U&&(D=z,1001==z.code&&(B=z.data[1]));a.F(c,D,B,w)}if(a.i)return Xg();w&&(z=new U(1,1,1003,c.uris[f],b));if(z instanceof U){if(7001==z.code)throw z;if(1010==z.code)throw g;if(1==z.severity){D=(new Map).set("error",
z);D=new V("retry",D);D.cancelable=!0;a.dispatchEvent(D);if(D.defaultPrevented)throw z;f=(f+1)%c.uris.length;return ph(a,b,c,d,e,f,z,h)}}throw z;})}
function qh(a,b,c,d){var e=Yg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={ph:void 0},f=a.next())g.ph=f.value,e=e.Ha(function(h){return function(){var k=c.response;k.data&&(k.data=Sb(k.data));return(0,h.ph)(b,k,d)}}(g));return e.Ha(function(){return c},function(h){var k=2;if(h instanceof U){if(7001==h.code)throw h;k=h.severity}throw new U(k,1,1007,h);})}function sh(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.o)return!1}return!0}T("shaka.net.NetworkingEngine",gh);
gh.prototype.request=gh.prototype.request;gh.prototype.destroy=gh.prototype.destroy;gh.makeRequest=lh;gh.defaultRetryParameters=function(){return Sg()};gh.prototype.clearCommonAccessTokenMap=gh.prototype.Hg;gh.prototype.clearAllResponseFilters=gh.prototype.ai;gh.prototype.unregisterResponseFilter=gh.prototype.Ij;gh.prototype.registerResponseFilter=gh.prototype.mj;gh.prototype.clearAllRequestFilters=gh.prototype.$h;gh.prototype.unregisterRequestFilter=gh.prototype.Hj;
gh.prototype.registerRequestFilter=gh.prototype.lj;gh.unregisterScheme=function(a){jh.delete(a)};gh.registerScheme=hh;gh.prototype.setForceHTTPS=gh.prototype.lg;gh.prototype.setForceHTTP=gh.prototype.kg;function mh(){this.g=0}gh.NumBytesRemainingClass=mh;function nh(a,b,c){Vg.call(this,a,b);this.h=c}qa(nh,Vg);gh.PendingRequest=nh;var rh=1;gh.RequestType={MANIFEST:0,SEGMENT:rh,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};
gh.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 ih=3;gh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ih};var jh=new Map;function th(a){this.g=!1;this.h=new Ug;this.i=a}th.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 uh(a,b){if(a.g){if(b instanceof U&&7003==b.code)throw b;throw new U(2,7,7003,b);}};function vh(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 wh(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Ah(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 Bh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Ch(a,b){this.h=Vb(a);this.i=b==Dh;this.g=0}r=Ch.prototype;r.ta=function(){return this.g<this.h.byteLength};r.Ba=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.X=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Eh();}};r.na=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Eh();}};r.S=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Eh();}};
r.$f=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Eh();}};r.bd=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 Eh();}if(2097151<b)throw new U(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Cb=function(a){if(this.g+a>this.h.byteLength)throw Eh();var b=Qb(this.h,this.g,a);this.g+=a;return b};
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Eh();this.g+=a};r.qh=function(a){if(this.g<a)throw Eh();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Eh();this.g=a};r.Cc=function(){for(var a=this.g;this.ta()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Qb(this.h,a,this.g-a);this.g+=1;return Hc(a)};function Eh(){return new U(2,3,3E3)}T("shaka.util.DataViewReader",Ch);Ch.prototype.readTerminatedString=Ch.prototype.Cc;Ch.prototype.seek=Ch.prototype.seek;Ch.prototype.rewind=Ch.prototype.qh;
Ch.prototype.skip=Ch.prototype.skip;Ch.prototype.readBytes=Ch.prototype.Cb;Ch.prototype.readUint64=Ch.prototype.bd;Ch.prototype.readInt32=Ch.prototype.$f;Ch.prototype.readUint32=Ch.prototype.S;Ch.prototype.readUint16=Ch.prototype.na;Ch.prototype.readUint8=Ch.prototype.X;Ch.prototype.getLength=Ch.prototype.getLength;Ch.prototype.getPosition=Ch.prototype.Ba;Ch.prototype.hasMoreData=Ch.prototype.ta;var Dh=1;Ch.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Dh};function Fh(){this.i=new Map;this.h=new Map;this.g=!1}r=Fh.prototype;r.box=function(a,b){a=Gh(a);this.i.set(a,Hh);this.h.set(a,b);return this};r.R=function(a,b){a=Gh(a);this.i.set(a,Ih);this.h.set(a,b);return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Ch(a,0);for(this.g=!1;a.ta()&&!this.g;)this.Yc(0,a,b,c)};
r.Yc=function(a,b,c,d){var e=b.Ba();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.S(),g=b.S(),h=Jh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ba()+8>b.getLength()){this.g=!0;return}f=b.bd();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==Ih){if(d&&b.Ba()+4>b.getLength()){this.g=!0;return}n=b.S();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Ba(),b=0<d?b.Cb(d):new Uint8Array(0),b=new Ch(b,0),l({name:h,parser:this,
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ba(),b.getLength()-b.Ba()))}};function Kh(a){for(var b=Lh(a);a.reader.ta()&&!a.parser.g;)a.parser.Yc(a.start+b,a.reader,a.partialOkay)}function Mh(a){for(var b=Lh(a),c=a.reader.S(),d=0;d<c&&(a.parser.Yc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Nh(a){var b=Lh(a);for(a.reader.skip(78);a.reader.ta()&&!a.parser.g;)a.parser.Yc(a.start+b,a.reader,a.partialOkay)}
function Oh(a){var b=Lh(a);a.reader.skip(8);var c=a.reader.na();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.ta()&&!a.parser.g;)a.parser.Yc(a.start+b,a.reader,a.partialOkay)}function Ph(a){return function(b){a(b.reader.Cb(b.reader.getLength()-b.reader.Ba()))}}function Gh(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 Jh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
function Lh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}T("shaka.util.Mp4Parser",Fh);Fh.headerSize=Lh;Fh.typeToString=Jh;Fh.allData=Ph;Fh.audioSampleEntry=Oh;Fh.visualSampleEntry=Nh;Fh.sampleDescription=Mh;Fh.children=Kh;Fh.prototype.parseNext=Fh.prototype.Yc;Fh.prototype.parse=Fh.prototype.parse;Fh.prototype.stop=Fh.prototype.stop;Fh.prototype.fullBox=Fh.prototype.R;Fh.prototype.box=Fh.prototype.box;var Hh=0,Ih=1;function Qh(a){var b=this;this.g=[];this.h=[];this.data=[];(new Fh).box("moov",Kh).box("moof",Kh).R("pssh",function(c){if(!(1<c.version)){var d=Qb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Vc(c.reader.Cb(16)));if(0<c.version){d=c.reader.S();for(var e=0;e<d;e++){var f=Vc(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
function Rh(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Vb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Uc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Sh(a){var b=this;this.C=a;this.j=this.A=null;this.ka=this.ea=!1;this.H=0;this.h=null;this.o=new lb;this.i=new Map;this.T=[];this.B=new Map;this.K=!1;this.m=new Ug;this.g=null;this.u=function(c){2==c.severity&&b.m.reject(c);a.onError(c)};this.Z=new Map;this.fa=new Map;this.L=new ec(function(){return Th(b)});this.O=!1;this.M=[];this.W=!1;this.I=new ec(function(){Uh(b)});this.m.catch(function(){});this.l=new th(function(){return Vh(b)});this.$=!1;this.F=this.G=null;this.P=function(){return!1}}
r=Sh.prototype;r.destroy=function(){return this.l.destroy()};function Vh(a){return Q(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.m.reject(),a.I.stop(),a.I=null,a.L.stop(),a.L=null,F(b,Wh(a),2);case 2:if(!a.j){b.s(3);break}xa(b,4);return F(b,a.j.setMediaKeys(null),6);case 6:Aa(b,5);break;case 4:Ba(b);case 5:a.j=null;case 3:a.h=null,a.A=null,a.B=new Map,a.g=null,a.u=function(){},a.C=null,a.$=!1,a.G=null,H(b)}})}r.configure=function(a,b){this.g=a;b&&(this.P=b);this.I&&this.I.ua(this.g.updateExpirationTime)};
function Xh(a,b,c){a.ka=!0;a.B=new Map;a.O=c;return Yh(a,b,!1)}function Zh(a,b,c,d){d=void 0===d?!0:d;a.B=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next())a.B.set(e.value,{initData:null,initDataType:null});c=t(a.g.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.B.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.O=0<a.B.size;return Yh(a,b,d)}
function $h(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return ai(a,g,[])}
function Yh(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C;return Q(function(A){if(1==A.g){bi(a.g.clearKeys,b);d=b.some(function(E){return E.video&&E.video.drmInfos.length||E.audio&&E.audio.drmInfos.length?!0:!1});!d&&c&&(e=Ah(a.g.servers),ci(b,e));f=new Set;g=t(b);for(h=g.next();!h.done;h=g.next())for(k=h.value,l=di(k),m=t(l),n=m.next();!n.done;n=m.next())p=n.value,f.add(p);q=t(f);for(u=q.next();!u.done;u=q.next())w=u.value,ei(w,Ah(a.g.servers),Ah(a.g.advanced||{}),a.g.keySystemsMapping);v=function(E,
G){var M=[];E=t(E);for(var L=E.next();!L.done;L=E.next()){L=L.value;var J=L[G]||a.g.advanced&&a.g.advanced[L.keySystem]&&a.g.advanced[L.keySystem][G]||"",K;if(K=""==J)K=(K=L.keySystem)?!!K.match(/^com\.widevine\.alpha/):!1;K&&("audioRobustness"==G?J=[a.g.defaultAudioRobustnessForWidevine]:"videoRobustness"==G&&(J=[a.g.defaultVideoRobustnessForWidevine]));if("string"===typeof J)M.push(L);else if(Array.isArray(J))for(0===J.length&&(J=[""]),J=t(J),K=J.next();!K.done;K=J.next()){var N={};M.push(Object.assign({},
L,(N[G]=K.value,N)))}}return M};x=new Set;z=t(b);for(D=z.next();!D.done;D=z.next())B=D.value,B.video&&!x.has(B.video)&&(B.video.drmInfos=v(B.video.drmInfos,"videoRobustness"),B.video.drmInfos=v(B.video.drmInfos,"audioRobustness"),x.add(B.video)),B.audio&&!x.has(B.audio)&&(B.audio.drmInfos=v(B.audio.drmInfos,"videoRobustness"),B.audio.drmInfos=v(B.audio.drmInfos,"audioRobustness"),x.add(B.audio));x.clear();return F(A,lg(b,a.O,a.$,a.g.preferredKeySystems),2)}uh(a.l);I=d||Object.keys(a.g.servers).length;
if(!I)return a.ea=!0,A.return(Promise.resolve());C=ai(a,void 0,b);return A.return(d?C:C.catch(function(){}))})}function fi(a){var b;return Q(function(c){switch(c.g){case 1:if(a.j.mediaKeys)return c.return();if(!a.G){c.s(2);break}return F(c,a.G,3);case 3:return uh(a.l),c.return();case 2:return xa(c,4),a.G=a.j.setMediaKeys(a.A),F(c,a.G,6);case 6:Aa(c,5);break;case 4:b=Ba(c),a.u(new U(2,6,6003,b.message));case 5:uh(a.l),H(c)}})}
function gi(a,b){return Q(function(c){if(1==c.g)return F(c,fi(a),2);hi(a,b.initDataType,Qb(b.initData));H(c)})}
r.Lb=function(a){var b=this;return Q(function(c){if(1==c.g){if(b.j===a)return c.return();if(!b.A)return b.o.ma(a,"encrypted",function(){b.u(new U(2,6,6010))}),c.return();b.j=a;b.o.ma(b.j,"play",function(){for(var d=t(b.M),e=d.next();!e.done;e=d.next())ii(b,e.value);b.W=!0;b.M=[]});b.j.remote?(b.o.D(b.j.remote,"connect",function(){return Wh(b)}),b.o.D(b.j.remote,"connecting",function(){return Wh(b)}),b.o.D(b.j.remote,"disconnect",function(){return Wh(b)})):"webkitCurrentPlaybackTargetIsWireless"in
b.j&&b.o.D(b.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Wh(b)});b.F=b.h?b.h.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.h.keySystem||b.B.size?F(c,fi(b),2):c.s(2)}ji(b).catch(function(){});b.F||b.B.size||b.g.parseInbandPsshEnabled||b.o.D(b.j,"encrypted",function(d){return gi(b,d)});H(c)})};
function ki(a){var b,c,d,e,f;return Q(function(g){switch(g.g){case 1:if(!a.A||!a.h)return g.return();if(!a.h.serverCertificateUri||a.h.serverCertificate&&a.h.serverCertificate.length){g.s(2);break}b=lh([a.h.serverCertificateUri],a.g.retryParameters);xa(g,3);c=a.C.Xb.request(5,b,{isPreload:a.P()});return F(g,c.promise,5);case 5:d=g.h;a.h.serverCertificate=Qb(d.data);Aa(g,4);break;case 3:throw e=Ba(g),new U(2,6,6017,e);case 4:if(a.l.g)return g.return();case 2:if(!a.h.serverCertificate||!a.h.serverCertificate.length)return g.return();
xa(g,6);return F(g,a.A.setServerCertificate(a.h.serverCertificate),8);case 8:Aa(g,0);break;case 6:throw f=Ba(g),new U(2,6,6004,f.message);}})}function li(a,b){var c,d,e;return Q(function(f){if(1==f.g)return F(f,mi(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.ub=new Ug,d.push(e.ub);d.push(c.remove());return F(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
function ji(a){var b,c,d,e,f;return Q(function(g){if(1==g.g){if(!a.B.size)return g.s(2);a.B.forEach(function(h,k){mi(a,k,h)});return F(g,a.m,3)}if(2!=g.g){b=a.h&&a.h.keyIds||new Set([]);if(0<b.size&&ni(a))return g.return(a.m);a.K=!1;a.m=new Ug;a.m.catch(function(){})}c=(a.h?a.h.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,hi(a,f.initDataType,f.initData);oi(a)&&a.m.resolve();return g.return(a.m)})}
function hi(a,b,c){if(c.length){if(a.g.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Pb(c,e.value.initData))return;var f=!1;a.B.forEach(function(g){!f&&Pb(c,g.initData)&&(f=!0)});if(f)return}a.K=!0;0<a.i.size&&oi(a)&&(a.m.resolve(),a.K=!1,a.m=new Ug,a.m.catch(function(){}));pi(a,b,c,a.h.sessionType)}}function qi(a){a=a.i.keys();a=vh(a,function(b){return b.sessionId});return Array.from(a)}
r.Gf=function(){var a=this,b=this.i.keys();b=vh(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.pd=function(){var a=Infinity,b=this.i.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};r.Yd=function(){return Bh(this.fa)};
function ai(a,b,c){var d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:d=new Map;if(c.length){e=ri(a,c,d);n.s(2);break}return F(n,si(a,b),3);case 3:e=n.h;case 2:f=e;if(!f){if(!navigator.requestMediaKeySystemAccess)throw new U(2,6,6020);throw new U(2,6,6001);}uh(a.l);xa(n,4);f.getConfiguration();g=a.g.keySystemsMapping[f.keySystem]||f.keySystem;if(c.length){var p=g;var q=d.get(g);var u=[],w=[],v=[],x=[],z=[],D=new Set,B=new Set;ti(q,u,w,x,v,z,D,B);var I=a.O?"persistent-license":"temporary";
p={keySystem:p,encryptionScheme:u[0],licenseServerUri:w[0],distinctiveIdentifierRequired:q[0].distinctiveIdentifierRequired,persistentStateRequired:q[0].persistentStateRequired,sessionType:q[0].sessionType||I,audioRobustness:q[0].audioRobustness||"",videoRobustness:q[0].videoRobustness||"",serverCertificate:x[0],serverCertificateUri:v[0],initData:z,keyIds:D};0<B.size&&(p.keySystemUris=B);q=t(q);for(B=q.next();!B.done;B=q.next())B=B.value,B.distinctiveIdentifierRequired&&(p.distinctiveIdentifierRequired=
B.distinctiveIdentifierRequired),B.persistentStateRequired&&(p.persistentStateRequired=B.persistentStateRequired);q=p}else q=g,B=b.get(g),p=[],u=[],w=[],v=[],x=[],z=new Set,ti(B.drmInfos,p,u,v,w,x,z),q={keySystem:q,encryptionScheme:p[0],licenseServerUri:u[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",
videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:v[0],serverCertificateUri:w[0],initData:x,keyIds:z};a.h=q;if(!a.h.licenseServerUri)throw new U(2,6,6012,a.h.keySystem);return F(n,f.createMediaKeys(),6);case 6:h=n.h;uh(a.l);a.A=h;if(!(""!=a.g.minHdcpVersion&&"getStatusForPolicy"in a.A)){n.s(7);break}xa(n,8);return F(n,a.A.getStatusForPolicy({minHdcpVersion:a.g.minHdcpVersion}),10);case 10:k=n.h;if("usable"!=k)throw new U(2,6,6018);uh(a.l);Aa(n,7,4);break;
case 8:l=Ba(n,4);if(l instanceof U)throw l;throw new U(2,6,6019,l.message);case 7:return a.ea=!0,F(n,ki(a),11);case 11:uh(a.l);Aa(n,0);break;case 4:m=Ba(n);uh(a.l,m);a.h=null;if(m instanceof U)throw m;throw new U(2,6,6002,m.message);}})}
function ri(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(di(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(1==c.size&&c.has(""))throw new U(2,6,6E3);d=a.g.preferredKeySystems;d.length||(e=Ah(a.g.servers),1==e.size&&(d=Array.from(e.keys())));e=t(d);var g=e.next();for(f={};!g.done;f={nh:void 0},g=e.next()){f.nh=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(p){return p.supported&&
null!=p.keySystemAccess&&p.keySystemAccess.keySystem==n.nh}}(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.g.keySystemsMapping[l]&&(m=c.get(a.g.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 si(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x;return Q(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new U(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.g.preferredKeySystems);h=g.next();case 2:if(h.done){z.s(4);break}k=h.value;if(!b.has(k)){z.s(3);break}l=b.get(k);xa(z,6);return F(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
z.h,z.return(c);case 6:Ba(z);case 7:uh(a.l);case 3:h=g.next();z.s(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.s(11);break}p=n.value;q=t(b.keys());u=q.next();case 12:if(u.done){n=m.next();z.s(9);break}w=u.value;v=b.get(w);x=v.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=p){z.s(13);break}xa(z,15);return F(z,navigator.requestMediaKeySystemAccess(w,[v]),17);case 17:return c=z.h,z.return(c);case 15:Ba(z);case 16:uh(a.l);case 13:u=q.next();z.s(12);break;case 11:return z.return(c)}})}
function ui(a){oi(a)&&a.m.resolve()}function vi(a,b){(new ec(function(){b.loaded=!0;ui(a)})).da(wi)}
function mi(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:try{d=a.A.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.u(e),m.return(Promise.reject(e))}a.o.D(d,"message",function(n){a.j&&a.g.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.W?a.M.push(n):ii(a,n)});a.o.D(d,"keystatuseschange",function(n){return xi(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Vf:Infinity,ub:null,type:"persistent-license"};a.i.set(d,f);xa(m,2);return F(m,
d.load(b),4);case 4:return g=m.h,uh(a.l),g||(a.i.delete(d),h=a.g.persistentSessionOnlinePlayback?1:2,a.u(new U(h,6,6013)),f.loaded=!0),vi(a,f),ui(a),m.return(d);case 2:k=Ba(m),uh(a.l,k),a.i.delete(d),l=a.g.persistentSessionOnlinePlayback?1:2,a.u(new U(l,6,6005,k.message)),f.loaded=!0,ui(a);case 3:return m.return(Promise.resolve())}})}
function pi(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.u(new U(2,6,6005,f.message));return}a.o.D(e,"message",function(f){a.j&&a.g.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.W?a.M.push(f):ii(a,f)});a.o.D(e,"keystatuseschange",function(f){return xi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Vf:Infinity,ub:null,type:d});try{c=a.g.initDataTransform(c,b,a.h)}catch(f){b=f;f instanceof U||(b=new U(2,6,6016,f));a.u(b);return}a.g.logLicenseExchange&&Sc(c);e.generateRequest(b,c).catch(function(f){if(!a.l.g){a.i.delete(e);
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.u(new U(2,6,6006,f.message,f,h))}})}function yi(a){return Q(function(b){return 1==b.g?a.K?F(b,a.m,3):b.s(0):F(b,Promise.all(a.T.map(function(c){return c.promise})),0)})}
function ii(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w;Q(function(v){switch(v.g){case 1:c=b.target;a.g.logLicenseExchange&&Sc(b.message);d=a.i.get(c);e=a.h.licenseServerUri;f=a.g.advanced[a.h.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=lh([e],a.g.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.h;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
f.headers[h];if("org.w3.clearkey"===a.h.keySystem){var x=g,z=a.h;try{var D=Kc(x.body);if(D){var B=JSON.parse(D);B.type||(B.type=z.sessionType,x.body=Lc(JSON.stringify(B)))}}catch(I){}}if($b(a.h.keySystem))if(x=Ic(g.body,!0,!0),x.includes("PlayReadyKeyMessage")){x=Rd(x,"PlayReadyKeyMessage");z=ae(x,"HttpHeader");z=t(z);for(D=z.next();!D.done;D=z.next())B=D.value,D=ae(B,"name")[0],B=ae(B,"value")[0],g.headers[Zd(D)]=Zd(B);x=ae(x,"Challenge")[0];g.body=Tc(Zd(x))}else g.headers["Content-Type"]="text/xml; charset=utf-8";
k=Date.now();xa(v,2);m=a.C.Xb.request(2,g,{isPreload:a.P()});a.T.push(m);return F(v,m.promise,4);case 4:l=v.h;Cd(a.T,m);Aa(v,3);break;case 2:n=Ba(v);if(a.l.g)return v.return();p=new U(2,6,6007,n);1==a.i.size?(a.u(p),d&&d.ub&&d.ub.reject(p)):(d&&d.ub&&d.ub.reject(p),a.i.delete(c),oi(a)&&(a.m.resolve(),a.L.da(.1)));return v.return();case 3:if(a.l.g)return v.return();a.H+=(Date.now()-k)/1E3;a.g.logLicenseExchange&&Sc(l.data);xa(v,5);return F(v,c.update(l.data),7);case 7:Aa(v,6);break;case 5:return q=
Ba(v),u=new U(2,6,6008,q.message),a.u(u),d&&d.ub&&d.ub.reject(u),v.return();case 6:if(a.l.g)return v.return();w=new V("drmsessionupdate");a.C.onEvent(w);d&&(d.ub&&d.ub.resolve(),vi(a,d));H(v)}})}
function xi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if($b(a.h.keySystem)&&16==g.byteLength&&(ic()||uc())){h=Vb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Vc(g).slice(0,32);a.Z.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ub&&(a.i.delete(b),zi(b));oi(a)&&(a.m.resolve(),
a.L.da(Ai))}function Th(a){var b=a.Z,c=a.fa;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.u(new U(2,6,6014));a.C.pe(Bh(c))}
function Bi(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N,P,O,R;return Q(function(S){if(1==S.g){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps 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 S.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"]};p=[null,"cenc","cbcs","cbcs-1-9"];q=new Map;u=function(pa,Z){var Fa,Ia,sa,ka,Ca,ra,ya,na,ta,Pa,ob,db,eb;return Q(function(jb){switch(jb.g){case 1:return xa(jb,2),F(jb,Z.createMediaKeys(),5);case 5:Fa=jb.h;case 4:Aa(jb,3);break;case 2:return Ba(jb),jb.return();case 3:sa=(Ia=Z.getConfiguration().sessionTypes)?Ia.includes("persistent-license"):!1;mc()&&(sa=!1);ka=Z.getConfiguration().videoCapabilities;Ca=Z.getConfiguration().audioCapabilities;
ra={persistentState:sa,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};q.has(pa)&&q.get(pa)?ra=q.get(pa):q.set(pa,ra);(ya=ka[0].encryptionScheme)&&!ra.encryptionSchemes.includes(ya)&&ra.encryptionSchemes.push(ya);(na=ka[0].robustness)&&!ra.videoRobustnessLevels.includes(na)&&ra.videoRobustnessLevels.push(na);(ta=Ca[0].robustness)&&!ra.audioRobustnessLevels.includes(ta)&&ra.audioRobustnessLevels.push(ta);if("getStatusForPolicy"in Fa){Pa=[];ob=t(f);db=ob.next();
for(eb={};!db.done;eb={td:void 0},db=ob.next())eb.td=db.value,ra.minHdcpVersions.includes(eb.td)||Pa.push(Fa.getStatusForPolicy({minHdcpVersion:eb.td}).then(function(ub){return function(ye){"usable"!=ye||ra.minHdcpVersions.includes(ub.td)||ra.minHdcpVersions.push(ub.td)}}(eb)));return F(jb,Promise.all(Pa),0)}jb.s(0)}})};w=function(pa,Z,Fa,Ia){var sa,ka,Ca,ra,ya,na,ta,Pa,ob,db;return Q(function(eb){switch(eb.g){case 1:xa(eb,2);sa=Nd(n);ka=t(sa.videoCapabilities);for(Ca=ka.next();!Ca.done;Ca=ka.next())ra=
Ca.value,ra.encryptionScheme=Z,ra.robustness=Fa;ya=t(sa.audioCapabilities);for(na=ya.next();!na.done;na=ya.next())ta=na.value,ta.encryptionScheme=Z,ta.robustness=Ia;Pa=Nd(sa);Pa.persistentState="required";Pa.sessionTypes=["persistent-license"];ob=[Pa,sa];return yc()?F(eb,Lf(5,navigator.requestMediaKeySystemAccess(pa,ob)),7):F(eb,navigator.requestMediaKeySystemAccess(pa,ob),6);case 6:db=eb.h;eb.s(5);break;case 7:db=eb.h;case 5:return F(eb,u(pa,db),8);case 8:Aa(eb,0);break;case 2:Ba(eb),H(eb)}})};v=
function(pa,Z,Fa,Ia){var sa,ka,Ca;return Q(function(ra){switch(ra.g){case 1:return xa(ra,2),sa={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:m[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:pa,video:{encryptionScheme:Z,robustness:Fa},audio:{encryptionScheme:Z,robustness:Ia}}},yc()?F(ra,Lf(5,navigator.mediaCapabilities.decodingInfo(sa)),7):F(ra,navigator.mediaCapabilities.decodingInfo(sa),
6);case 6:ka=ra.h;ra.s(5);break;case 7:ka=ra.h;case 5:return Ca=ka.keySystemAccess,F(ra,u(pa,Ca),8);case 8:Aa(ra,0);break;case 2:Ba(ra),H(ra)}})};x=t(a);for(z=x.next();!z.done;z=x.next())D=z.value,q.set(D,null);B=function(pa){return"org.w3.clearkey"===pa&&rc()?!1:!0};I=[];C=t(p);for(A=C.next();!A.done;A=C.next())for(E=A.value,G=t(a),M=G.next();!M.done;M=G.next())L=M.value,B(L)&&(I.push(w(L,E,"","")),I.push(v(L,E,"","")));J=t(a);for(K=J.next();!K.done;K=J.next())for(N=K.value,P=t(k[N]||[]),O=P.next();!O.done;O=
P.next())R=O.value,B(N)&&(I.push(w(N,null,R,"")),I.push(w(N,null,"",R)),I.push(v(N,null,R,"")),I.push(v(N,null,"",R)));return F(S,Promise.all(I),2)}return S.return(Bh(q))})}function zi(a){return Q(function(b){if(1==b.g)return xa(b,2),F(b,Lf(Ci,Promise.all([a.close().catch(function(){}),a.closed])),4);if(2!=b.g)return Aa(b,0);Ba(b);H(b)})}
function Wh(a){var b;return Q(function(c){b=Array.from(a.i.entries());a.i.clear();return F(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return Q(function(g){if(1==g.g)return xa(g,2),a.ka||a.B.has(e.sessionId)||"persistent-license"!==f.type||a.g.persistentSessionOnlinePlayback?F(g,zi(e),5):F(g,e.remove(),5);if(2!=g.g)return Aa(g,0);Ba(g);H(g)})})),0)})}function di(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function Uh(a){a.i.forEach(function(b,c){var d=b.Vf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Vf=e)})}function oi(a){a=a.i.values();return wh(a,function(b){return b.loaded})}function ni(a){for(var b=t(a.h&&a.h.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.Z.get(c.value))return!1;return!0}
function ci(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 ti(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={va:void 0},l=a.next()){m.va=l.value;b.includes(m.va.encryptionScheme)||b.push(m.va.encryptionScheme);"org.w3.clearkey"==m.va.keySystem&&m.va.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.va.licenseServerUri)||k.push(m.va.licenseServerUri):c.includes(m.va.licenseServerUri)||c.push(m.va.licenseServerUri);e.includes(m.va.serverCertificateUri)||e.push(m.va.serverCertificateUri);m.va.serverCertificate&&
(d.some(function(q){return function(u){return Pb(u,q.va.serverCertificate)}}(m))||d.push(m.va.serverCertificate));if(m.va.initData){l=t(m.va.initData);for(var n=l.next(),p={};!n.done;p={Mf:void 0},n=l.next())p.Mf=n.value,f.some(function(q){return function(u){var w=q.Mf;return u.keyId&&u.keyId==w.keyId?!0:u.initDataType==w.initDataType&&Pb(u.initData,w.initData)}}(p))||f.push(p.Mf)}if(m.va.keyIds)for(l=t(m.va.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.va.keySystemUris&&h)for(m=t(m.va.keySystemUris),
l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0<k.length){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 ei(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!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__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}function bi(a,b){a=Ah(a);if(0!=a.size){a=$c(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 Ci=1,wi=5,Ai=.5;function Di(a,b,c){c=void 0===c?!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)}
Di.prototype.add=function(a,b){var c=this.h;b=void 0===b?!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||2<d.channelsCount||2<e.channelsCount)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!Ei(d,e))&&Fi(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||Ei(c,d))&&Fi(c.roles,d.roles)));return d?!1:(this.g.add(a),
!0)};Di.prototype.values=function(){return this.g.values()};function Ei(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return uf(d)});b=b.codecs.split(",").map(function(d){return uf(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 Fi(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}T("shaka.media.AdaptationSet",Di);T("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Gi(){}Gi.prototype.create=function(){};Gi.prototype.configure=function(){};T("shaka.media.AdaptationSetCriteria",Gi);function Hi(){this.g=Ii;this.i=(new Map).set(Ii,2).set(Ji,1);this.h=0}var Ji=0,Ii=1;/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Ki(a,b,c){this.g=a;this.i=b;this.h=c}function Li(a,b){return Q(function(c){if(1==c.g)return F(c,gg(a.h,b,a.g.drm.preferredKeySystems,a.g.drm.keySystemsMapping),2);a.g.streaming.dontChooseCodecs||cg(b,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes,a.g.preferredTextFormats);if(!b.variants.some(Gg))throw new U(2,4,4032);return c.return(Mi(a,b))})}
function Ni(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=fg(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}function Mi(a,b){var c=Ni(a,b);if(b){var d=a.h?a.h.h:null;if(d&&a.h.A)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,Oi(a,d.keySystem,f.video),Oi(a,d.keySystem,f.audio);Pi(a,b)}return c}
function Oi(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,hi(a.h,e.initDataType,e.initData)}}}
function Pi(a,b){a=a.h?a.h.Yd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?Qi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a);}var Qi=["output-restricted","internal-error"];function Ri(){}function Si(a,b){Ti.set(a,b)}function Ui(){var a={};if(fc())for(var b=t(Ti.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]=fc()?Ti.has(c):gc(c);return a}function Vi(a,b){if(b){var c=Ti.get(b.toLowerCase());if(c)return c}throw new U(2,4,4E3,a,b);}T("shaka.media.ManifestParser",Ri);Ri.unregisterParserByMime=function(a){Ti.delete(a)};
Ri.registerParserByMime=Si;Ri.registerParserByExtension=function(){sb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Ri.AccessibilityPurpose={Nk:"visually impaired",dk:"hard of hearing"};var Ti=new Map;function Wi(a,b){var c=null,d=null,e=null,f=null,g=a.S();b&1&&(e=a.bd());b&2&&(f=a.S());b&8&&(c=a.S());b&16&&(d=a.S());return{trackId:g,ld:c,md:d,Wh:e,rh:f}}function Xi(a,b){return 1==b?(b=a.S(),a=a.S(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.S()}}function Yi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.S();a.skip(4);a=a.na();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function Zi(a,b,c){var d=a.S(),e=[],f=null;c&1&&(f=a.$f());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={gg:null,sampleSize:null,ye:null};c&256&&(h.gg=a.S());c&512&&(h.sampleSize=a.S());c&1024&&a.skip(4);c&2048&&(h.ye=0==b?a.S():a.$f());e.push(h)}return{Sk:d,fg:e,nf:f}}function $i(a){a.skip(6);a.skip(2);a.skip(8);var b=a.na();a.skip(2);a.skip(2);a.skip(2);a=a.na()+a.na()/65536;return{channelCount:b,sampleRate:a}}function aj(a){a=a.S();return{codec:Jh(a)}}
function bj(a){var b=null,c=null,d=a.Cb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.na()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.na();a.na();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,Nd:c}}
function cj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function dj(a){return(10>a?"0":"")+a};function ej(a){if(!fj){fj=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);gj=hj("ftyp",b,d,b,c);b=hj("dref",ij);jj=hj("dinf",b)}this.g=a}
function kj(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=hj;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(lj+1));m=Math.floor(m%(lj+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(mj(h,4)),[0,0,0,0],y(mj(n,4)),y(mj(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(mj(k,2)),[0,0],y(mj(l,
2)),[0,0]));h=hj("tkhd",h);k=hj;n=g.duration*g.timescale;l=Math.floor(n/(lj+1));n=Math.floor(n%(lj+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(mj(g.timescale,4)),y(mj(l,4)),y(mj(n,4)),y(mj(m,2)),[0,0]));l=hj("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=nj;break;case "audio":m=oj}n=hj("hdlr",m);a:{switch(g.type){case "video":g=hj("minf",hj("vmhd",pj),jj,qj(g));break a;
case "audio":g=hj("minf",hj("smhd",rj),jj,qj(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Wc.apply(Qc,y(b));f=a.g[0];c=hj;d=f.duration*f.timescale;e=Math.floor(d/(lj+1));d=Math.floor(d%(lj+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(mj(f.timescale,4)),y(mj(e,4)),y(mj(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
255]));e=hj("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(y(mj(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=hj("trex",k),h.call(g,k);a=Wc.apply(Qc,y(d));a=hj("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Wc.apply(Qc,y(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(gj.byteLength+
a.byteLength);b.set(gj);b.set(a,gj.byteLength);return b}
function qj(a){var b=hj,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=mc()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;d=a.stream.height||0;if(0<a.Ca.byteLength)var e=hj("avcC",a.Ca);else{e=hj;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.lb.length;n++){var p=sj(a.lb[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),
f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(mj(c,2)),y(mj(d,2)),[0,72,0,0,0,72,
0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=tj(a);g=new Uint8Array([]);a.encrypted&&(g=uj(0,a.stream,a.codecs),d="encv");d=hj(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.Ca.byteLength&&(c=hj("hvcC",a.Ca)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(mj(d,2)),y(mj(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,
105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=tj(a),g=new Uint8Array([]),a.encrypted&&(g=uj(0,a.stream,a.codecs),e="encv"),d=hj(e,d,c,h,g));break;case "audio":if("mp3"==c)a=hj(".mp3",vj(a));else if("ac-3"==c)c=hj("dac3",a.ra),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=uj(0,a.stream,a.codecs),d="enca"),a=hj(d,vj(a),c,e);else if("ec-3"==c)c=hj("dec3",a.ra),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=uj(0,a.stream,a.codecs),
d="enca"),a=hj(d,vj(a),c,e);else if("opus"==c)c=hj("dOps",a.ra),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=uj(0,a.stream,a.codecs),d="enca"),a=hj(d,vj(a),c,e);else{if(0<a.ra.byteLength)c=hj("esds",a.ra);else{c=hj;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=ad("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),
10);d=new Uint8Array([0,0,0,0,3,25].concat(y(mj(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=uj(0,a.stream,a.codecs),d="enca");a=hj(d,vj(a),c,e)}d=a}a=hj("stsd",wj,d);return b("stbl",a,hj("stts",xj),hj("stsc",yj),hj("stsz",zj),hj("stco",Aj))}function tj(a){if(!a.Ia&&!a.Ka)return new Uint8Array([]);var b=a.Ka;a=new Uint8Array([].concat(y(mj(a.Ia,4)),y(mj(b,4))));return hj("pasp",a)}
function vj(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(y(mj(a.stream.audioSamplingRate||44100,2)),[0,0]))}
function uj(a,b,c){a=hj;c=new Uint8Array([].concat(y(mj(Bj(c.split(".")[0]),4))));c=hj("frma",c);var d="cenc";var e=b.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(y(mj(Bj(d),4)),[0,1,0,0]));d=hj("schm",d);e=hj;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);b=t(b.drmInfos);for(var g=b.next();!g.done;g=b.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=sj(h.value)}b=new Uint8Array([0,0,0,0,0,
0,1,8]);b=hj("tenc",b,f);return a("sinf",c,d,e("schi",b))}
function Cj(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=hj;var g=new Uint8Array([0,0,0,0].concat(y(mj(c.data?c.data.Db:0,4))));g=hj("mfhd",g);var h;var k=c.data?c.data.jb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ya<<4|m.$a<<2|m.Za}k=hj("sdtp",l);var n=k.length+92;l=hj;h=new Uint8Array([0,0,0,58].concat(y(mj(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=hj("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
0;var p=Math.floor(m%(lj+1));m=new Uint8Array([1,0,0,0].concat(y(mj(Math.floor(m/(lj+1)),4)),y(mj(p,4))));m=hj("tfdt",m);var q=n;n=c.data?c.data.jb:[];p=n.length;var u=12+16*p,w=new Uint8Array(u);q+=8+u;w.set(["video"===c.type?1:0,0,15,1].concat(y(mj(p,4)),y(mj(q,4))),0);for(q=0;q<p;q++){var v=n[q];u=mj(v.duration,4);var x=mj(v.size,4),z=v.flags;v=mj(v.eb,4);w.set([].concat(y(u),y(x),[z.hb<<2|z.Ya,z.$a<<6|z.Za<<4|z.ib,z.Xa&61440,z.Xa&15],y(v)),12+16*q)}n=hj("trun",w);k=l("traf",h,m,n,k);f=f("moof",
g,k);e.call(d,b,[f,Dj(c)])}return Wc.apply(Qc,y(b))}function Dj(a){a=(a.data?a.data.jb:[]).map(function(b){return b.data});a=Wc.apply(Qc,y(a));return hj("mdat",a)}function mj(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function sj(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}function Bj(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<8*(a.length-c-1);return b}
function hj(a){var b=Na.apply(1,arguments),c=Ej.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Ej.set(a,c));for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
var fj=!1,lj=Math.pow(2,32)-1,Ej=new Map,nj=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),oj=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),xj=new Uint8Array([0,0,0,0,0,0,0,0]),yj=new Uint8Array([0,0,0,0,0,0,0,0]),Aj=new Uint8Array([0,0,0,0,0,0,0,0]),zj=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),pj=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),rj=new Uint8Array([0,
0,0,0,0,0,0,0]),wj=new Uint8Array([0,0,0,0,0,0,0,1]),gj=new Uint8Array([]),ij=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),jj=new Uint8Array([]);function Fj(a,b,c){function d(q){n.push({box:q,hh:1701733217})}function e(q){n.push({box:q,hh:1701733238})}function f(q){k=!0;q.parser.stop()}function g(q){m.push(q);Kh(q)}var h=b=Qb(b),k=!1,l,m=[],n=[];(new Fh).box("moov",g).box("trak",g).box("mdia",g).box("minf",g).box("stbl",g).R("stsd",function(q){l=q;m.push(q);Mh(q)}).R("encv",f).R("enca",f).R("dvav",e).R("dva1",e).R("dvh1",e).R("dvhe",e).R("dvc1",e).R("dvi1",e).R("hev1",e).R("hvc1",e).R("avc1",e).R("avc3",e).R("ac-3",d).R("ec-3",d).R("ac-4",
d).R("Opus",d).R("fLaC",d).R("mp4a",d).parse(b);if(k)return b;if(0==n.length||!l)throw ib(Vc(b)),new U(2,3,3019,c);n.reverse();c=t(n);for(var p=c.next();!p.done;p=c.next())p=p.value,h=Gj(a,h,l,p.box,m,p.hh);return ic()&&xc()&&!jc()?(a=new Uint8Array(b.byteLength+h.byteLength),a.set(h),a.set(b,h.byteLength),a):h}
function Hj(a){a=Qb(a);var b=[];(new Fh).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(Ij(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return Wc.apply(Qc,y(c))}
function Ij(a){function b(n){g.push(n);Kh(n)}var c,d,e,f,g=[];(new Fh).box("moof",b).box("traf",b).R("tfhd",function(n){c=n;e=Wi(n.reader,n.flags)}).R("trun",function(n){d=n;f=Zi(n.reader,n.version,n.flags)}).parse(a);if(e&&2!==e.rh){var h=c.start+Lh(c)+4+(null!==e.Wh?8:0),k=Vb(a);if(null!==e.rh)k.setUint32(h,2);else{Jj(a,c.start,c.size+4);var l=k.getUint32(c.start+8);k.setUint32(c.start+8,l|2);f&&null!==f.nf&&k.setInt32(d.start+Lh(d)+4,f.nf+4);l=a.subarray(0,h);k=a.subarray(h);a=new Uint8Array(a.byteLength+
4);a.set(l);l=[];for(var m=3;0<=m;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,Jj(a,k.start,k.size+4)}}return a}
function Gj(a,b,c,d,e,f){var g=uj(new ej([]),a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Vb(a).setUint32(4,f);a.set(g,d.size);Jj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=rc()||jc()||ic()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,Jj(f,e.start,e.size+a.byteLength);a=Vb(f,c.start);c=Lh(c);b=a.getUint32(c);a.setUint32(c,b+
1);return f}function Jj(a,b,c){a=Vb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}
function Kj(a){function b(e){d.push({start:e.start,size:e.size});Kh(e)}var c=Qb(a),d=[];(new Fh).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=Vb(c,e.start),g=0;g<e.size-3;g++){var h=f.getUint32(g);1633889587==h?f.setUint32(g,1700998451):1684103987==h&&f.setUint32(g,1684366131)}}).parse(c);return c};function Lj(a,b,c,d,e,f,g,h){this.N=a;this.Sa=b;this.wa=c;this.Wc=void 0===d?null:d;this.timescale=void 0===e?null:e;this.h=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=void 0===h?!1:h}Lj.prototype.uc=function(){return this.Sa};Lj.prototype.tc=function(){return this.wa};Lj.prototype.Kd=function(a){this.h=a};Lj.prototype.Ib=function(){return this.h};
function Mj(a,b){return a===b?!0:a&&b?a.uc()==b.uc()&&a.tc()==b.tc()&&Ed(a.N().sort(),b.N().sort())&&Pb(a.Ib(),b.Ib()):a==b}T("shaka.media.InitSegmentReference",Lj);Lj.prototype.getEndByte=Lj.prototype.tc;Lj.prototype.getStartByte=Lj.prototype.uc;
function Nj(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,w){l=void 0===l?[]:l;q=void 0===q?Oj:q;this.startTime=a;this.j=this.endTime=b;this.C=c;this.Sa=d;this.wa=e;this.Y=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=q;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.thumbnailSprite=null;this.i=-1;this.A=void 0===w?!1:w;this.F=this.o=!1;a=t(this.g);for(b=a.next();!b.done;b=
a.next())b.value.fh();this.A&&this.g.length&&this.g[this.g.length-1].eh();this.u=this.bandwidth=this.mimeType=this.codecs=null;this.G=!1}r=Nj.prototype;r.N=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.mi=function(){return this.endTime};r.uc=function(){return this.Sa};r.tc=function(){return this.wa};r.Ji=function(){return this.tilesLayout};r.Ii=function(){return this.B};r.dc=function(){return this.status};r.aj=function(){this.status=Pj};
r.Sf=function(){this.preload=!0};r.isPreload=function(){return this.preload};r.Vc=function(){this.l=!1};r.Ti=function(){return this.l};r.fh=function(){this.o=!0};r.Vi=function(){return this.o};r.eh=function(){this.F=!0};r.Ui=function(){return this.F};r.dh=function(){this.m=!0};r.Pi=function(){return this.m};r.De=function(a){this.thumbnailSprite=a};r.Gi=function(){return this.thumbnailSprite};
r.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};r.qg=function(a){null==this.h?ab("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.Kd=function(a,b){this.u=a;this.G=void 0===b?!1:b};r.Ib=function(a){var b=this.u;(void 0===a||a)&&this.G&&(this.u=null);return b};
function Qj(a,b){a.Y=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Qj(c.value,b)}T("shaka.media.SegmentReference",Nj);Nj.prototype.getSegmentData=Nj.prototype.Ib;Nj.prototype.setSegmentData=Nj.prototype.Kd;Nj.prototype.syncAgainst=Nj.prototype.qg;Nj.prototype.offset=Nj.prototype.offset;Nj.prototype.getThumbnailSprite=Nj.prototype.Gi;Nj.prototype.setThumbnailSprite=Nj.prototype.De;Nj.prototype.hasByterangeOptimization=Nj.prototype.Pi;Nj.prototype.markAsByterangeOptimization=Nj.prototype.dh;
Nj.prototype.isLastPartial=Nj.prototype.Ui;Nj.prototype.markAsLastPartial=Nj.prototype.eh;Nj.prototype.isPartial=Nj.prototype.Vi;Nj.prototype.markAsPartial=Nj.prototype.fh;Nj.prototype.isIndependent=Nj.prototype.Ti;Nj.prototype.markAsNonIndependent=Nj.prototype.Vc;Nj.prototype.isPreload=Nj.prototype.isPreload;Nj.prototype.markAsPreload=Nj.prototype.Sf;Nj.prototype.markAsUnavailable=Nj.prototype.aj;Nj.prototype.getStatus=Nj.prototype.dc;Nj.prototype.getTileDuration=Nj.prototype.Ii;
Nj.prototype.getTilesLayout=Nj.prototype.Ji;Nj.prototype.getEndByte=Nj.prototype.tc;Nj.prototype.getStartByte=Nj.prototype.uc;Nj.prototype.getEndTime=Nj.prototype.mi;Nj.prototype.getStartTime=Nj.prototype.getStartTime;Nj.prototype.getUris=Nj.prototype.N;var Oj=0,Pj=1;Nj.Status={Nj:Oj,Lk:Pj,lk:2};function Rj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Sj(a){return!a||Rj(a)?null:a.length?a.end(a.length-1):null}function Tj(a,b){return!a||!a.length||Rj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Uj(a,b){if(!a||!a.length||Rj(a))return 0;var c=0;a=t(Vj(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 Wj(a,b,c){if(!a||!a.length||Rj(a))return null;a=Vj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Vj(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 Xj(){}function Yj(a,b){var c=document.createElement("source");c.src=a;c.type=void 0===b?"":b;return c}function hk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}T("shaka.util.Dom",Xj);Xj.removeAllChildren=hk;/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function ik(){}function jk(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function kk(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function lk(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 mk(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Hc(Qb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Hc(Qb(a.data,3+c,f)),h;"--\x3e"===d?h=Hc(Qb(a.data,4+c+f)):h=Sb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Hc(Qb(a.data,1,d));a=Hc(Qb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Hc(Qb(a.data,1,d));a=Hc(Qb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Hc(Qb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Sb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Hc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Hc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Sb(a.data),b):null}
function nk(a){for(var b=0,c=[];jk(a,b);){var d=lk(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=lk(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=mk(e))&&c.push(f);b+=e.size+10}kk(a,b)&&(b+=10)}return c}function ok(a,b){for(var c=b=void 0===b?0:b,d=0;jk(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=lk(a,b+6),kk(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}T("shaka.util.Id3Utils",ik);ik.getID3Data=ok;
ik.getID3Frames=nk;/*

 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 pk(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Qb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function qk(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Ch(c,0)).S(),a.g=8*d,a.i-=d)}function rk(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;qk(a)}a.h<<=b;a.g-=b}
function sk(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&qk(a);c=b-c;return 0<c?d<<c|sk(a,c):d}function tk(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;qk(a);return b+tk(a)}function uk(a){rk(a,1+tk(a))}function W(a){var b=tk(a);return sk(a,b+1)-1}function vk(a){a=W(a);return 1&a?1+a>>>1:-1*(a>>>1)}function wk(a){return 1===sk(a,1)}function xk(a){return sk(a,8)}
function yk(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=vk(a),d=(c+d+256)%256),c=0===d?c:d}function zk(a){xk(a);W(a);return W(a)}T("shaka.util.ExpGolomb",pk);function Ak(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.u=null}r=Ak.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Bk(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,ce:-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(0<m)for(var n=h+5,p=m;2<p;){var q=f[n+1]+2;switch(f[n]){case 5:var u=Jc(f.subarray(n+2,n+q));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,Zh:u,sampleRate:48E3}))}n+=q;p-=q}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.ce&&(g.ce=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.I=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.ce&&(this.C=f.ce);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.I: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.B: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.C: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 Ck(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))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=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=Dk(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=Dk(d,
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.hj=function(a){sb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Xf(a,{Dd:null,state:null})};
r.Xf=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(1===f)f=n?0:2;else if(n)if(1==n){n=h-f-1;if(0<=l)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.Dd)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)),0<n&&(n=a.subarray(0,n),f.data=Wc(f.data,n),f.fullData=Wc(f.fullData,n),f.state=0);h<d?(m="hvc"==this.m?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}0<=l&&0<=f&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.Dd&&(c=k.length?k[k.length-1]:b.Dd)&&(c.data=Wc(c.data,a),c.fullData=Wc(c.fullData,a));b.state=f;return k};
r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Wc.apply(Qc,y(c.value)),(c=Ck(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:nk(c.data),dts:c.dts,pts:c.pts});return a};
r.fb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Wc.apply(Qc,y(c.value)),e=Ck(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Wc(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
r.wc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Wc.apply(Qc,y(d.value)),f=Ck(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Wc(d.data,e),this.g.push(d))}if(a){c={Dd:null,state:null};d=[];e=t(this.g);for(f=e.next();!f.done;f=e.next())f=f.value,
f.nalus=this.Xf(f,c),f.nalus.length&&(d.push(f),c.Dd=f.nalus[f.nalus.length-1]);this.g=d}b&&(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.fb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.wc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.od=function(){return{audio:this.A,video:this.m}};
r.be=function(){for(var a=[],b=t(this.wc()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value.nalus));return a};r.Mi=function(){sb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Kf();return{height:a.height,width:a.width}};r.Kf=function(){return"hvc"==this.m?Ek(this):Fk(this)};function Gk(a){var b=a.wc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null}
function Fk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.be();if(!c.length)return b;c=c.find(function(q){return 7==q.type});if(!c)return b;c=new pk(c.data);var d=xk(c),e=xk(c),f=xk(c);uk(c);if(Hk.includes(d)){var g=W(c);3===g&&rk(c,1);uk(c);uk(c);rk(c,1);if(wk(c)){g=3!==g?8:12;for(var h=0;h<g;h++)wk(c)&&(6>h?yk(c,16):yk(c,64))}}uk(c);g=W(c);if(0===g)W(c);else if(1===g)for(rk(c,1),uk(c),uk(c),g=W(c),h=0;h<g;h++)uk(c);uk(c);rk(c,1);g=W(c);h=W(c);var k=sk(c,1);0===k&&rk(c,1);rk(c,
1);var l=0,m=0,n=0,p=0;wk(c)&&(l=W(c),m=W(c),n=W(c),p=W(c));b.height=String((2-k)*(h+1)*16-2*n-2*p);b.width=String(16*(g+1)-2*l-2*m);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=Gk(a);return b}
function Ek(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.be();if(!c.length)return b;c=c.find(function(I){return 33==I.type});if(!c)return b;var d=new pk(c.fullData,!0);xk(d);xk(d);sk(d,4);var e=sk(d,3);wk(d);var f=sk(d,2),g=sk(d,1),h=sk(d,5),k=sk(d,32);c=xk(d);for(var l=xk(d),m=xk(d),n=xk(d),p=xk(d),q=xk(d),u=xk(d),w=[],v=[],x=0;x<e;x++)w.push(wk(d)),v.push(wk(d));if(0<e)for(x=e;8>x;x++)sk(d,2);for(x=0;x<e;x++)w[x]&&sk(d,88),v[x]&&xk(d);W(d);e=W(d);3==e&&sk(d,1);w=W(d);v=W(d);var z=
x=0,D=0,B=0;wk(d)&&(x+=W(d),z+=W(d),D+=W(d),B+=W(d));b.width=String(w-(x+z)*(1===e||2===e?2:1));b.height=String(v-(D+B)*(1===e?2:1));d=function(I){for(var C=0,A=0;32>A;A++)C|=(I>>A&1)<<31-A;return C>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;q&&(f+="."+q.toString(16).toUpperCase());p&&(f+="."+p.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Gk(a);return b}function Dk(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Ik(a){return 0>Bk(a)?!1:!0}function Bk(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}T("shaka.util.TsParser",Ak);Ak.syncOffset=Bk;Ak.probe=Ik;Ak.prototype.getVideoInfo=Ak.prototype.Kf;Ak.prototype.getVideoResolution=Ak.prototype.Mi;
Ak.prototype.getVideoNalus=Ak.prototype.be;Ak.prototype.getCodecs=Ak.prototype.od;Ak.prototype.getStartTime=Ak.prototype.getStartTime;Ak.prototype.getVideoData=Ak.prototype.wc;Ak.prototype.getAudioData=Ak.prototype.fb;Ak.prototype.getMetadata=Ak.prototype.getMetadata;Ak.prototype.parseNalus=Ak.prototype.Xf;Ak.prototype.parseAvcNalus=Ak.prototype.hj;Ak.prototype.parse=Ak.prototype.parse;Ak.prototype.clearData=Ak.prototype.clearData;Ak.Timescale=9E4;
var Hk=[100,110,122,244,44,83,86,118,128,138,139,134];function Jk(a,b,c,d){var e=this;this.g=a;this.K=c;this.A=null;this.ea=b;this.l=new Map;this.B=new Map;this.Aa=new Map;this.h=null;this.Ea=!1;this.I=d||null;this.u=new Map;this.o=new lb;this.j=new Map;this.L=null;this.G=new Ug;this.Ga="";this.Na=!1;this.sa=!0;this.$=!1;this.C=this.M=null;this.i=Kk(this,this.G);this.ya=this.H=!1;this.O=new th(function(){return Lk(e)});this.F=!1;this.P="UNKNOWN";this.La=this.Ma=!1;this.Fa=new Ug;this.m=!1;this.pa=null;this.Z=new Map;this.ka=this.T=this.oa=this.W=null;
this.fa=new Ug;this.g.remote&&(this.$="disconnected"!=this.g.remote.state,this.o.D(this.g.remote,"connect",function(){e.$="disconnected"!=e.g.remote.state}),this.o.D(this.g.remote,"connecting",function(){e.$="disconnected"!=e.g.remote.state}),this.o.D(this.g.remote,"disconnect",function(){e.$="disconnected"!=e.g.remote.state}))}
function Kk(a,b){a.sa=!0;if(window.ManagedMediaSource){a.C||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.sa=!0});a.o.D(c,"endstreaming",function(){a.sa=!1})}else c=new MediaSource;a.o.ma(c,"sourceopen",function(){URL.revokeObjectURL(a.Ga);b.resolve()});a.o.ma(a.g,"playing",function(){a.Na=!0});a.Ga=Mk(c);a.g.removeAttribute("src");a.M&&a.g.removeChild(a.M);a.C&&a.g.removeChild(a.C);a.M=Yj(a.Ga);a.g.appendChild(a.M);a.C&&a.g.appendChild(a.C);a.g.load();
return c}function Nk(a,b,c){a.g&&window.ManagedMediaSource&&a.i&&(a.C&&a.g.removeChild(a.C),a.C=Yj(b,c),a.g.appendChild(a.C),a.g.disableRemotePlayback=!1)}
function Ok(a,b){var c,d,e,f,g,h,k,l,m,n,p;return Q(function(q){if(1==q.g)return a.createSegmentIndex?F(q,a.createSegmentIndex(),2):q.s(2);if(!a.segmentIndex)return q.return(!1);if(0==a.segmentIndex.getNumReferences())return q.return(!0);c=fd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",h!=a.mimeType||k!=a.codecs)if(l=h+":"+k,!d.has(l))if(d.add(l),b==c.za){if(m=lf(h,k),!Cf(m))return q.return(!1)}else if(b==c.la?
k=tg(k):b==c.V&&(k=sg(k,h)),n=pf(a,h,k),p=nf(h,k),!md(n)&&!ef(p))return q.return(!1);return q.return(!0)})}
function Pk(){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="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.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(y(mf)),b=
{};a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;Cf(c)?b[c]=!0:b[c]=fc()?md(c)||(ef(c)?!0:!1):gc(c);var d=c.split(";")[0];b[d]=b[d]||b[c]}return b}r=Jk.prototype;r.destroy=function(){return this.O.destroy()};
function Lk(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,w;return Q(function(v){if(1==v.g){b=[];c=t(a.u);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.u.set(l,h.slice(0,1)),k&&b.push(k.p.catch(Jf)),m=t(h.slice(1)),n=m.next();!n.done;n=m.next())p=n.value,p.p.reject(new U(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return F(v,Promise.all(b),2)}q=t(a.j.values());for(u=q.next();!u.done;u=q.next())w=u.value,w.destroy();a.o&&(a.o.release(),a.o=null);a.g&&a.C&&
a.g.removeChild(a.C);a.g&&a.M&&(a.g.removeChild(a.M),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.M=null;a.C=null;a.A=null;a.i=null;a.h=null;a.ea=null;a.l.clear();a.Aa.clear();a.j.clear();a.L=null;a.u.clear();a.I=null;a.Z.clear();a.K=null;H(v)})}
r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return f=fd,F(n,e.G,2);case 2:if(!Qk(e)&&!Rk(e)){n.s(3);break}ab("Expected MediaSource to be open during init(); reopening the media source.");e.G=new Ug;e.i=Kk(e,e.G);return F(n,e.G,3);case 3:e.F=b,e.P=c,e.Ma=d,e.La=!e.F&&"HLS"==e.P&&!e.Ma,e.Z.clear(),e.W=null,e.oa=null,e.T=null,e.ka=null,e.fa=new Ug,g=t(a.keys()),h=g.next();case 5:if(h.done){n.s(7);
break}k=h.value;l=a.get(k);return F(n,Sk(e,k,l,l.codecs),8);case 8:e.m?(e.u.set(f.V,[]),e.u.set(f.la,[])):e.u.set(k,[]);h=g.next();n.s(5);break;case 7:(m=a.get(f.V))&&m.isAudioMuxedInVideo&&(e.m=!0),H(n)}})};
function Sk(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w;return Q(function(v){switch(v.g){case 1:return e=fd,f=Va,g=Wa,F(v,Ok(c,b),2);case 2:g.call(f,v.h,"Type negotiation should happen before MediaSourceEngine.init!");b==e.V&&d&&(d=sg(d,c.mimeType));h=lf(c.mimeType,d);if(b==e.za){Tk(a,h,a.F,c.external);v.s(0);break}k=a.A.forceTransmux;if(!md(h)||!a.F&&mf.includes(h))k=!0;l=nf(c.mimeType,d);if(!k){v.s(4);break}m=bd(e.V,(d||"").split(","));n=bd(e.la,(d||"").split(","));if(!m||!n){v.s(5);break}a.m=!0;return F(v,
Sk(a,e.V,c,m),6);case 6:return F(v,Sk(a,e.la,c,n),7);case 7:return v.return();case 5:if(p=ef(l))q=p(),a.j.set(b,q),h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);uh(a.O);try{w=a.i.addSourceBuffer(u)}catch(x){throw new U(2,3,3015,x,"The mediaSource_ status was "+a.i.readyState+" expected 'open'",null);}a.F&&(w.mode=Uk);a.o.D(w,"error",function(){var x=a.u.get(b)[0];x.p.reject(new U(2,3,3014,a.g.error?a.g.error.code:0,x.uri))});a.o.D(w,"updateend",function(){return Vk(a,b)});
a.l.set(b,w);a.B.set(b,h);a.Aa.set(b,!!c.drmInfos.length);H(v)}})}r.configure=function(a){this.A=a;this.h&&(this.h.A=a.modifyCueCallback)};function Wk(a){return a.sa&&!a.$&&!a.H}
function Tk(a,b,c,d){a.h||(a.h=new yf(a.ea),a.h&&(a.h.A=a.A.modifyCueCallback));var e=a.h;d=d||a.Ea;a=a.P;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=Af.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):sb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):sb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
function Qk(a){return a.H?!1:a.i?"ended"==a.i.readyState:!0}function Rk(a){return a.H?!1:a.i?"closed"==a.i.readyState:!0}function Xk(a,b){a.l.size?b==dd?a=a.h.g:(a=Yk(a,b),a=!a||Rj(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null):a=null;return a}function Zk(a,b){return a.l.size?b==dd?a.h.h:Sj(Yk(a,b)):null}function $k(a,b,c){if(b==dd)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Yk(a,b);return Uj(a,c)}
r.Fb=function(){var a={total:this.H?[]:Vj(this.g.buffered),audio:Vj(Yk(this,"audio")),video:Vj(Yk(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Yk(a,b){if(a.H||a.$)return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function al(a,b,c,d,e,f){var g=null,h=[],k=Qb(c);if(mf.includes(f))b=nk(k),b.length&&d&&((c=b.find(function(q){return"com.apple.streaming.transportStreamTimestamp"===q.description}))&&(g=Math.round(c.data)/1E3),a.K.onMetadata([{cueTime:d.startTime,data:k,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.Y&&d.Y.timescale){var l=d.Y.timescale;if(!isNaN(l)){var m=null!=e.emsgSchemeIdUris&&0<e.emsgSchemeIdUris.length||a.A.dispatchAllEmsgBoxes,n=0,p=!1;k=new Fh;
m&&k.R("emsg",function(q){var u=e.emsgSchemeIdUris;if(0===q.version){var w=q.reader.Cc();var v=q.reader.Cc();var x=q.reader.S();var z=q.reader.S();var D=q.reader.S();var B=q.reader.S();var I=d.startTime+z/x}else x=q.reader.S(),I=q.reader.bd()/x+d.timestampOffset,z=I-d.startTime,D=q.reader.S(),B=q.reader.S(),w=q.reader.Cc(),v=q.reader.Cc();q=q.reader.Cb(q.reader.getLength()-q.reader.Ba());if(u&&u.includes(w)||a.A.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==w)a.K.gj();else if(u=I+D/x,x={startTime:I,
endTime:u,schemeIdUri:w,value:v,timescale:x,presentationTimeDelta:z,eventDuration:D,id:B,messageData:q},B=(new Map).set("detail",x),(new V("emsg",B)).cancelable=!0,a.K.ej(x),"https://aomedia.org/emsg/ID3"==w||"https://developer.apple.com/streaming/emsg-id3"==w)if(w=nk(q),w.length)a.K.onMetadata([{cueTime:I,data:q,frames:w,dts:I,pts:I}],0,u)});k.R("prft",function(q){var u=q.reader,w=q.version;u.S();q=u.S();var v=u.S();q=1E3*q+v/Math.pow(2,32)*1E3;0===w?u=u.S():(w=u.S(),u=u.S(),u=w*Math.pow(2,32)+u);
q=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+q)).getTime();u=(new Map).set("detail",{wallClockTime:q,programStartDate:new Date(q-u/l*1E3)});u=new V("prft",u);a.K.onEvent(u)}).box("moof",Kh).box("traf",Kh).R("tfdt",function(q){p||(n=Xi(q.reader,q.version).baseMediaDecodeTime/l,p=!0,m||q.parser.stop())}).parse(c,!0);p&&0==d.timestampOffset&&(g=n)}}else f.includes("/mp4")||f.includes("/webm")||!Ik(k)||(a.Z.has(b)?a.Z.get(b).clearData():a.Z.set(b,new Ak),h=a.Z.get(b).parse(k),k=h.getStartTime(b),
null!=k&&(g=k),h=h.getMetadata());return{timestamp:g,metadata:h}}
function bl(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L;return Q(function(J){switch(J.g){case 1:m=fd;if(b!=m.za){J.s(2);break}if("HLS"!=a.P){J.s(3);break}return F(J,a.Fa,4);case 4:n=J.h,a.h.u=n;case 3:return F(J,Df(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.N()[0]:null),5);case 5:return J.return();case 2:if(l||!a.m){J.s(6);break}return F(J,bl(a,m.V,c,d,e,f,g,h,k,!0),7);case 7:return F(J,bl(a,m.la,c,d,e,f,g,
h,k,!0),8);case 8:return J.return();case 6:if(!a.l.has(b))return J.return();p=a.l.get(b).timestampOffset;q=a.B.get(b);a.j.has(b)&&(q=a.j.get(b).getOriginalMimeType());if(d&&(u=al(a,b,c,d,e,q),w=u.timestamp,v=u.metadata,null!=w&&(null==a.W&&b==m.la&&(a.W=w,a.oa=d.startTime,null!=a.T&&(x=0,a.oa==a.ka&&(x=a.W-a.T),a.fa.resolve(x))),null==a.T&&b==m.V&&(a.T=w,a.ka=d.startTime,null!=a.W&&(z=0,a.oa==a.ka&&(z=a.W-a.T),a.fa.resolve(z))),D=w,B=mf,!a.F&&B.includes(a.B.get(b))&&(D=0),I=d.startTime-D,C=Math.abs(p-
I),(.001<=C||g||h)&&(!k||0<I||!p)&&(p=I,a.La&&(cl(a,b,function(){return dl(a,b)},null),cl(a,b,function(){return el(a,b,p)},null))),(A=b==m.la||!a.l.has(m.la))&&a.Fa.resolve(p)),v.length))a.K.onMetadata(v,p,d?d.endTime:null);f&&b==m.la&&(a.h||Tk(a,"application/cea-608",a.F,!1),a.L||(E=q.split(";",1)[0],a.L=new td(E)),d?(G=a.L.i(c),G.length&&Hf(a.h,G,d.startTime,d.endTime,p)):a.L.init(c,h));if(!a.j.has(b)){J.s(9);break}return F(J,a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:c=J.h;case 9:c=
fl(a,e,c,d,b);if(!d||!a.F||b==m.za){J.s(11);break}if(!g&&!h){J.s(11);break}M=d.startTime;if("HLS"!=a.P||a.m||b!=m.V||!a.l.has(m.la)){J.s(13);break}return F(J,a.fa,14);case 14:L=J.h,.15<Math.abs(L)&&(M-=L);case 13:cl(a,b,function(){return dl(a,b)},null),cl(a,b,function(){return el(a,b,M)},null);case 11:return F(J,cl(a,b,function(){var K=c;a.I&&jd(a.I,K,p,e);a.l.get(b).appendBuffer(K)},d?d.N()[0]:null),15);case 15:H(J)}})}function gl(a,b){var c=Zk(a,"video")||0;Ff(a.h,b,c)}
function hl(a){a.h&&Ff(a.h,"",0)}r.remove=function(a,b,c){var d=this,e;return Q(function(f){return 1==f.g?(e=fd,a==e.za?F(f,d.h.remove(b,c),0):c>b?F(f,cl(d,a,function(){return il(d,a,b,c)},null),5):f.s(0)):d.m?F(f,cl(d,e.V,function(){return il(d,e.V,b,c)},null),0):f.s(0)})};
function jl(a,b){var c;return Q(function(d){return 1==d.g?(c=fd,b==c.za?a.h?F(d,a.h.remove(0,Infinity),0):d.return():F(d,cl(a,b,function(){return il(a,b,0,a.i.duration)},null),4)):a.m?F(d,cl(a,c.V,function(){return il(a,c.V,0,a.i.duration)},null),0):d.s(0)})}r.flush=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=fd,a==c.za?d.return():F(d,cl(b,a,function(){b.g.currentTime-=.001;Vk(b,a)},null),2)):b.m?F(d,cl(b,c.V,function(){var e=c.V;b.g.currentTime-=.001;Vk(b,e)},null),0):d.s(0)})};
function kl(a,b,c,d,e,f,g,h,k){var l,m,n;return Q(function(p){if(1==p.g){l=fd;if(b==l.za)return f||(a.h.u=c),Ef(a.h,d,e),p.return();m=[];return F(p,ll(a,b,g,h,k),2)}n=p.h;n||(m.push(cl(a,b,function(){return dl(a,b)},null)),a.m&&m.push(cl(a,l.V,function(){return dl(a,l.V)},null)));f||(m.push(cl(a,b,function(){return el(a,b,c)},null)),a.m&&m.push(cl(a,l.V,function(){return el(a,l.V,c)},null)));if(0!=d||Infinity!=e)m.push(cl(a,b,function(){var q=a.l.get(b);q.appendWindowStart=0;q.appendWindowEnd=e;q.appendWindowStart=
d;Vk(a,b)},null)),a.m&&m.push(cl(a,l.V,function(){var q=l.V,u=a.l.get(q);u.appendWindowStart=0;u.appendWindowEnd=e;u.appendWindowStart=d;Vk(a,q)},null));return m.length?F(p,Promise.all(m),0):p.s(0)})}
function ml(a,b,c){var d,e;return Q(function(f){if(1==f.g){d=fd;if(b==d.za)return f.return();b==d.la&&(a.Fa=new Ug);if(!a.F||(e=Zk(a,b))&&.1>Math.abs(e-c))return f.return();cl(a,b,function(){return dl(a,b)},null);a.m&&cl(a,d.V,function(){return dl(a,d.V)},null);return F(f,cl(a,b,function(){return el(a,b,c)},null),2)}return a.m?F(f,cl(a,d.V,function(){return el(a,d.V,c)},null),0):f.s(0)})}
r.endOfStream=function(a){var b=this;return Q(function(c){return F(c,nl(b,function(){Qk(b)||Rk(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};r.bb=function(a){var b=this;return Q(function(c){return F(c,nl(b,function(){if(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 Ug,uri:null};b.u.get(e).unshift(f)}b.i.duration=a;b.pa=a}),0)})};r.getDuration=function(){return this.i.duration};
function ol(a,b,c){Q(function(d){return Qk(a)||Rk(a)?d.return():F(d,nl(a,function(){Qk(a)||Rk(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function pl(a){Q(function(b){return Qk(a)||Rk(a)?b.return():F(b,nl(a,function(){Qk(a)||Rk(a)||a.i.clearLiveSeekableRange()}),0)})}function il(a,b,c,d){d<=c?Vk(a,b):a.l.get(b).remove(c,d)}function dl(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;Vk(a,b)}
function el(a,b,c){0>c&&(c+=.001);var d=!0;"HLS"==a.P&&(d=Zk(a,b),d=!d||.15<Math.abs(d-c)?!0:!1);d&&(a.l.get(b).timestampOffset=c);Vk(a,b)}function Vk(a,b){if(!a.H){var c=a.u.get(b)[0];c&&(c.p.resolve(),ql(a,b))}}function cl(a,b,c,d){uh(a.O);c={start:c,p:new Ug,uri:d};a.u.get(b).push(c);1==a.u.get(b).length&&rl(a,b);return c.p}
function nl(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u;return Q(function(w){switch(w.g){case 1:uh(a.O);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 Ug,k={start:function(v){return function(){return v.ready.resolve()}}(g),p:g.ready,uri:null},l=a.u.get(h),l.push(k),c.push(g.ready),1==l.length&&k.start();xa(w,2);return F(w,Promise.all(c),4);case 4:Aa(w,3);break;case 2:throw m=Ba(w),m;case 3:return xa(w,5,6),F(w,b(),6);case 6:Da(w);n=t(d);for(p=
n.next();!p.done;p=n.next())q=p.value,ql(a,q);Ea(w,0);break;case 5:throw u=Ba(w),new U(2,3,3015,u,a.g.error||"No error in the media element",null);}})}function ql(a,b){a.u.get(b).shift();rl(a,b)}function rl(a,b){var c=a.u.get(b)[0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new U(2,3,3017,b)):Wk(a)?c.p.reject(new U(2,3,3015,d,a.g.error||"No error in the media element",c.uri)):c.p.reject(new U(2,3,3024,b)),ql(a,b)}}
function fl(a,b,c,d,e){if("mp4"!=rf(a.B.get(e)))return c;var f=null===d,g=a.Aa.get(e),h=a.K.si(),k=!1;d&&d.Y&&(k=d.Y.encrypted);d=d?d.N()[0]:null;if(a=a.A.insertFakeEncryptionInInit&&g)h=$b(h),a=rc()&&"audio"===e||lc()||jc()||kc("SOPOpenBrowser")||ic()&&xc()&&h;if(a)if(f)c=Fj(b,c,d);else{if(b=!k)b=rc()&&"audio"===e;b&&(c=Hj(c))}f&&mc()&&(c=Kj(c));return c}
function sl(a,b,c,d){return cl(a,b,function(){if(b!==dd){a.B.get(b);if(od()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.A.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.B.set(b,c)}Vk(a,b)}},null)}
function tl(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I;return Q(function(C){switch(C.g){case 1:if(a.H)return C.return();c=fd;a.H=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.ya=!0);a.Na&&(a.g.autoplay=!1);za(C,2);a.o.Qa();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(A){}}a.j.clear();a.l.clear();n=a.i.duration;a.G=new Ug;a.i=Kk(a,a.G);return F(C,a.G,4);
case 4:!isNaN(n)&&n?a.i.duration=n:!isNaN(a.pa)&&a.pa&&(a.i.duration=a.pa),p=new Ug,q=a.i.sourceBuffers,u=b.size,w=0,v=function(){w++;w===u&&(p.resolve(),a.o.Ja(q,"addsourcebuffer",v))},a.o.D(q,"addsourcebuffer",v),x=t(b.keys()),z=x.next();case 5:if(z.done)return(I=b.get(c.V))&&I.isAudioMuxedInVideo&&(a.m=!0),a.m&&!a.u.has(c.V)&&a.u.set(c.V,[]),a.g.currentTime=d,F(C,p,2);D=z.value;B=b.get(D);return F(C,Sk(a,D,B,B.codecs),6);case 6:z=x.next();C.s(5);break;case 2:Da(C),a.H=!1,uh(a.O),a.o.ma(a.g,"canplaythrough",
function(){a.O.g||(a.g.autoplay=e,a.ya&&(a.ya=!1,a.g.play()))}),Ea(C,0)}})}function ul(a,b){return nl(a,function(){return tl(a,b)})}function vl(a,b,c,d){var e=!1,f=bd("audio",(d||"").split(",")),g=bd("video",(d||"").split(",")),h=g;"audio"==b&&(h=f);h||(h=d);d=lf(c,h);var k=a.A.forceTransmux;if(!md(d)||!a.F&&mf.includes(d))k=!0;if(k&&(a=nf(c,h),c=ef(a))){var l=c();f&&g&&(e=!0);d=l.convertCodecs(b,a)}b=sf(wf(d));return{ug:l,Fj:e,Eg:vf(d),codec:b,mimeType:d}}
function ll(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,w,v,x,z;return Q(function(D){if(1==D.g){f=fd;if(b==f.za)return D.return(!1);g=sf(wf(a.B.get(b)));h=vf(a.B.get(b));k=vl(a,b,c,d);l=k.ug;m=k.Fj;n=k.Eg;p=k.codec;q=k.mimeType;u=!0;m&&a.B.has(f.V)&&(w=vl(a,f.V,c,d),v=sf(wf(a.B.get(f.V))),x=vf(a.B.get(f.V)),u=v==w.codec&&x==w.Eg,w.ug&&w.ug.destroy());if(g===p&&h===n&&u)return a.j.has(b)&&!l?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&l?a.j.set(b,l):l&&(a.j.has(b)&&a.j.get(b).transmux!=l.transmux?(a.j.get(b).destroy(),
a.j.delete(b),a.j.set(b,l)):l.destroy()),D.return(!1);z=!0;if(a.m||m&&l&&!a.j.has(b))z=!1;if(z&&"smooth"===a.A.codecSwitchingStrategy&&od())return F(D,sl(a,b,q,l),3);l&&l.destroy();return F(D,ul(a,e),3)}return D.return(!0)})}
function wl(a,b,c,d){if(b==dd)var e=!1;else{e=sf(wf(a.B.get(b)));var f=vf(a.B.get(b)),g=lf(c,d),h=a.A.forceTransmux;if(!md(g)||!a.F&&mf.includes(g))h=!0;c=nf(c,d);h&&(h=ef(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=sf(wf(g));g=vf(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!od()||a.m:!1}var Mk=window.URL.createObjectURL,Uk="sequence";function xl(a,b,c){this.i=a;this.C=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.A=0;this.B=!0;this.I=!1;this.H=0;this.F=void 0===c?!0:c;this.G=0;this.u=!1;this.m=a}r=xl.prototype;r.getDuration=function(){return this.l};r.vi=function(){return this.h};r.yh=function(a){this.i=a};r.bb=function(a){this.l=a};r.Bi=function(){return this.i};r.wh=function(a){this.A=a};r.Gc=function(a){a&&!this.B&&(this.I=!0);this.B=a};r.Ce=function(a){this.o=a};r.ae=function(){return this.o};
r.jg=function(a){this.C=a};r.li=function(){return this.C};r.kh=function(a,b){if(0!=a.length){var c=(Date.now()+this.A)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.ne(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);null!=this.i&&this.F&&!this.u&&(this.i=c-this.g-this.h)}}};
r.Ed=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/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.ne(b);this.g=Math.max(this.g,c);null!=this.i&&this.F&&!this.u&&(this.i=d-this.g-this.h)}};r.jh=function(a,b){this.ne(a);Infinity==b||this.U()||(this.g=Math.max(this.g,b))};r.wi=function(){return this.g};r.ie=function(){this.u=!0};
r.Wi=function(){return this.u};r.xh=function(a){this.m=a};r.ri=function(){return this.m};r.ne=function(a){null==this.j?this.j=a:this.I||(this.j=Math.min(this.j,a))};r.Tf=function(a){this.h=Math.max(this.h,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};r.U=function(){return Infinity==this.l&&!this.B};r.yc=function(){return Infinity!=this.l&&!this.B};r.pb=function(){return Math.max(this.H,this.cc()-this.o)};r.Bh=function(a){this.H=a};
r.cc=function(){return this.U()||this.yc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l};r.qd=function(a){var b=Math.max(this.j,this.H);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.cc()-this.o+a,this.ob()))};r.Hb=function(){return this.qd(0)};r.ob=function(){return Math.max(0,this.cc()-(this.U()||this.yc()?this.C:0))};r.Kh=function(){return null==this.i||null!=this.g&&this.F?!1:!0};
r.vh=function(a){this.G=a};r.ii=function(){return this.G};T("shaka.media.PresentationTimeline",xl);xl.prototype.getAvailabilityTimeOffset=xl.prototype.ii;xl.prototype.setAvailabilityTimeOffset=xl.prototype.vh;xl.prototype.usingPresentationStartTime=xl.prototype.Kh;xl.prototype.getSeekRangeEnd=xl.prototype.ob;xl.prototype.getSeekRangeStart=xl.prototype.Hb;xl.prototype.getSafeSeekRangeStart=xl.prototype.qd;xl.prototype.getSegmentAvailabilityEnd=xl.prototype.cc;xl.prototype.setUserSeekStart=xl.prototype.Bh;
xl.prototype.getSegmentAvailabilityStart=xl.prototype.pb;xl.prototype.isInProgress=xl.prototype.yc;xl.prototype.isLive=xl.prototype.U;xl.prototype.offset=xl.prototype.offset;xl.prototype.notifyMaxSegmentDuration=xl.prototype.Tf;xl.prototype.notifyMinSegmentStartTime=xl.prototype.ne;xl.prototype.getInitialProgramDateTime=xl.prototype.ri;xl.prototype.setInitialProgramDateTime=xl.prototype.xh;xl.prototype.isStartTimeLocked=xl.prototype.Wi;xl.prototype.lockStartTime=xl.prototype.ie;
xl.prototype.getMaxSegmentEndTime=xl.prototype.wi;xl.prototype.notifyPeriodDuration=xl.prototype.jh;xl.prototype.notifySegments=xl.prototype.Ed;xl.prototype.notifyTimeRange=xl.prototype.kh;xl.prototype.getDelay=xl.prototype.li;xl.prototype.setDelay=xl.prototype.jg;xl.prototype.getSegmentAvailabilityDuration=xl.prototype.ae;xl.prototype.setSegmentAvailabilityDuration=xl.prototype.Ce;xl.prototype.setStatic=xl.prototype.Gc;xl.prototype.setClockOffset=xl.prototype.wh;
xl.prototype.getPresentationStartTime=xl.prototype.Bi;xl.prototype.setDuration=xl.prototype.bb;xl.prototype.setPresentationStartTime=xl.prototype.yh;xl.prototype.getMaxSegmentDuration=xl.prototype.vi;xl.prototype.getDuration=xl.prototype.getDuration;function yl(a,b,c,d){var e=this;this.u=d;this.g=a;this.B=b;this.h=c;this.o=new lb;this.l=!1;this.F=a.readyState;this.G=this.C=this.j=0;this.m=zl(this);this.A=!1;this.o.D(a,"waiting",function(){return Al(e)});this.i=(new ec(function(){Al(e)})).ua(this.h.gapJumpTimerTime)}yl.prototype.release=function(){this.o&&(this.o.release(),this.o=null);null!=this.i&&(this.i.stop(),this.i=null);this.m&&(this.m.release(),this.m=null);this.g=this.B=this.u=null};
yl.prototype.qe=function(){this.A=!0;this.i&&this.i.ua(this.h.gapJumpTimerTime);Al(this)};
function Al(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.l)return}else a.l=!1;if(!a.g.paused||a.g.currentTime==a.j&&(a.g.autoplay||a.g.currentTime!=a.j)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.m)){b=a.m;var c=b.j,d=Bl(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.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i&&b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Wj(c,b,a.h.gapDetectionThreshold),null==d||0==d&&!a.A||(e=c.start(d),
(f=a.h.gapPadding)&&(e=Math.ceil(100*(e+f))/100),e>=a.B.ob()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.j&&(a.j=e),a.C++,a.u(new V("gapjumped")))))}}}
function zl(a){if(!a.h.stallEnabled)return null;var b=a.h.stallSkip;return new Cl(new Dl(a.g),a.h.stallThreshold,function(){var c;return Q(function(d){if(1==d.g)return c=Vj(a.g.buffered),c.length?b?(a.g.currentTime+=b,d.s(2)):F(d,a.g.play(),3):d.return();if(2!=d.g){if(!a.g)return d.return();a.g.pause();a.g.play()}a.G++;a.u(new V("stalldetected"));H(d)})})}function Cl(a,b,c){this.j=a;this.m=Bl(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=c}
Cl.prototype.release=function(){this.i=this.j=null};function Dl(a){this.g=a}function Bl(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Vj(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function El(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Fl.value().get(b),c.ma(a,b,d))}var Fl=new Xb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Gl(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new lb;this.i=new Hl(a);El(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Il(e,e.j())})}Gl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Jl(a){return a.o?a.g.currentTime:a.j()}
function Kl(a,b){0<a.g.readyState?Ll(a.i,b):El(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Il(a,a.j())})}function Il(a,b){.001>Math.abs(a.g.currentTime-b)?Ml(a):(a.h.ma(a.g,"seeking",function(){Ml(a)}),Ll(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Ml(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
function Hl(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new ec(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Hl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Ll(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.ua(.1)};function Nl(a){this.h=a;this.j=!1;this.g=null;this.i=new lb}r=Nl.prototype;r.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.ma(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;El(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};r.af=function(a){this.g=this.j?this.g:a};
r.Od=function(){return(this.j?this.h.currentTime:this.g)||0};r.Ag=function(){return 0};r.zg=function(){return 0};r.ih=function(){};
function Ol(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.l=c;this.u=e;this.o=null;this.j=new yl(a,b.presentationTimeline,c,f);this.h=new Gl(a,function(){a:{var h=g.j;h.l=!0;h.A=!1;h.i&&h.i.ua(h.h.gapJumpTimerTime);Al(h);var k=Jl(g.h);h=Pl(g,k);if(!pd()&&.001<Math.abs(h-k)){k=!1;if(!qc()||qc()&&yc())k=!0;else{var l=Date.now()/1E3,m=qc()&&zc()?3:1;if(!g.o||g.o<l-m)g.o=l,k=!0}if(k){Kl(g.h,h);h=void 0;break a}}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.l&&(k.l=
!0,k.j=h);k.i&&k.i.ua(k.h.gapJumpTimerTime);Al(k)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Hb():g.g.ob():0>h&&(h=g.g.ob()+h);return Ql(g,Rl(g,h))});this.m=new ec(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Jl(g.h),k=g.g.Hb(),l=g.g.ob();3>l-k&&(k=l-3);h<k&&(h=Pl(g,h),g.i.currentTime=h)}})}r=Ol.prototype;r.ready=function(){this.m.ua(.25)};
r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};r.af=function(a){Kl(this.h,a)};r.Od=function(){var a=Jl(this.h);return 0<this.i.readyState&&!this.i.paused?Rl(this,a):a};r.Ag=function(){return this.j.G};r.zg=function(){return this.j.C};r.ih=function(){this.j.qe()};function Ql(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
function Pl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.Hb(),f=a.g.ob(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.qd(c),k=a.g.qd(d);c=a.g.qd(c+d);return b>=g?Ql(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?Tj(a.i.buffered,k)?k:c:b>=h||Tj(a.i.buffered,b)?b:c}function Rl(a,b){var c=a.g.Hb();if(b<c)return c;a=a.g.ob();return b>a?a:b};function Sl(a){this.g=a;this.m=null;this.i=0;this.o=!1}r=Sl.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.i};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.bj=function(){this.o=!0};r.Eb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Ag(a){return a.g[0]||null}
r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--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};r.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
r.ke=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,y(a))}};r.Bd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.ke(a);this.Oa(b)};r.Oa=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}};
r.Oc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Nj(a.startTime,b,a.C,a.Sa,a.wa,a.Y,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
r.Ie=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new ec(function(){var d=b();d?c.g.push.apply(c.g,y(d)):(c.m.stop(),c.m=null)}),this.m.ua(a))};Sl.prototype[Symbol.iterator]=function(){return this.Gb(0)};
Sl.prototype.Gb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return ab("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Tl(this,d,f,c)};function Ul(a,b,c){a=new Nj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Sl([a])}
T("shaka.media.SegmentIndex",Sl);Sl.forSingleSegment=Ul;Sl.prototype.getIteratorForTime=Sl.prototype.Gb;Sl.prototype.updateEvery=Sl.prototype.Ie;Sl.prototype.fit=Sl.prototype.Oc;Sl.prototype.evict=Sl.prototype.Oa;Sl.prototype.mergeAndEvict=Sl.prototype.Bd;Sl.prototype.offset=Sl.prototype.offset;Sl.prototype.get=Sl.prototype.get;Sl.prototype.find=Sl.prototype.find;Sl.prototype.markImmutable=Sl.prototype.bj;Sl.prototype.release=Sl.prototype.release;Sl.prototype.getNumEvicted=Sl.prototype.getNumEvicted;
Sl.prototype.getNumReferences=Sl.prototype.getNumReferences;function Tl(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}r=Tl.prototype;r.ed=function(a){this.reverse=a};r.di=function(){return this.h};r.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.A&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
r.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.A&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};r.dg=function(){var a=this.current();if(a.o&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]};
T("shaka.media.SegmentIterator",Tl);Tl.prototype.resetToLastIndependent=Tl.prototype.dg;Tl.prototype.next=Tl.prototype.next;Tl.prototype.current=Tl.prototype.current;Tl.prototype.currentPosition=Tl.prototype.di;Tl.prototype.setReverse=Tl.prototype.ed;function Vl(){Sl.call(this,[]);this.h=[]}qa(Vl,Sl);r=Vl.prototype;r.clone=function(){var a=new Vl;a.h=this.h.slice();a.i=this.i;return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};
r.Eb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Eb(a)};r.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};r.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};r.offset=function(){};r.ke=function(){};
r.Oa=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Oa(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};r.Bd=function(){};r.Oc=function(){};r.Ie=function(){};T("shaka.media.MetaSegmentIndex",Vl);Vl.prototype.updateEvery=Vl.prototype.Ie;Vl.prototype.fit=Vl.prototype.Oc;Vl.prototype.mergeAndEvict=Vl.prototype.Bd;Vl.prototype.evict=Vl.prototype.Oa;Vl.prototype.merge=Vl.prototype.ke;Vl.prototype.offset=Vl.prototype.offset;
Vl.prototype.get=Vl.prototype.get;Vl.prototype.find=Vl.prototype.find;Vl.prototype.forEachTopLevelReference=Vl.prototype.Eb;Vl.prototype.release=Vl.prototype.release;function Wl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.$d();this.h=new ec(function(){b.g.gh(.25*b.i)})}Wl.prototype.release=function(){this.set(this.sc());this.h&&(this.h.stop(),this.h=null);this.g=null};Wl.prototype.set=function(a){this.i=a;Xl(this)};Wl.prototype.sc=function(){return this.g.sc()};function Xl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.$d()!=b&&a.g.mg(b);return}catch(c){}a.h.ua(.25);0!=a.g.$d()&&a.g.mg(0)};function Yl(a){var b=this;this.j=a;this.h=new lb;this.g=new Set;this.i=(new ec(function(){Zl(b,!1)})).sb();a.paused||this.i.ua(.25);this.h.D(a,"playing",function(){b.i.sb().ua(.25)});this.h.D(a,"pause",function(){b.i.stop()})}Yl.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 Zl(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 $l(a){dh.call(this);this.g=new Map;this.h=a}qa($l,dh);$l.prototype.release=function(){this.g.clear();dh.prototype.release.call(this)};function am(a,b){var c=a.g.get(b);c||(c={Jd:[],mf:null,contentType:b},a.g.set(b,c));return c}function bm(a,b,c){var d=am(a,b.contentType);cm(a,d);a={Wc:b,position:c};d=d.Jd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
$l.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.mf;a:{var e=c.Jd;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.Wc;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&&!Ed(d.roles,e.roles);(g||h||d)&&dm(this,a,e.contentType)&&(c.mf=e,d=new V("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&dm(this,a,e.contentType)&&(c.mf=e,JSON.stringify(e),c=new V("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function dm(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function cm(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Jd;b.Jd=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.Jd=[]}
function em(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
a.language);return b};function fm(a){dh.call(this);this.h=new Map;this.i=a;this.g=null}qa(fm,dh);fm.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);dh.prototype.release.call(this)};function gm(a,b){var c=b.schemeIdUri+"_"+b.id+"_"+(b.startTime.toFixed(1)+"_"+b.endTime.toFixed(1));a.h.has(c)||(a.h.set(c,b),b=new V("regionadd",new Map([["region",b]])),a.dispatchEvent(b),hm(a))}
function hm(a){a.g||(a.g=(new ec(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 V("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).ua(2))};function im(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function jm(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
function km(a,b,c){c=void 0===c?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.g||(a.g=a.i.segmentIndex.Gb(b,!0,a.o));if(!a.g)return Promise.resolve();c&&a.g.next();for(b=[];a.h.size<a.m;){c=a.g.next().value;if(!c)break;var d=!0;c.isPreload()&&null!=c.wa&&(d=!1);2==c.dc()&&(d=!1);c.Ib(!1)&&(d=!1);d&&c.Y&&b.push(lm(a,c.Y));d&&!a.h.has(c)&&(d=new mm(a.l),b.push(nm(d,c,a.i)),a.h.set(c,d))}om(a);return Promise.all(b)}
function lm(a,b){if(!a.i.segmentIndex||b.Ib()||Array.from(a.j.keys()).some(function(e){return Mj(e,b)}))return Promise.resolve();var c=new mm(a.l),d=nm(c,b,a.i);a.j.set(b,c);return d}function pm(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&qm(a,c)}function rm(a){pm(a,a.h);pm(a,a.j);a.g=null}im.prototype.Oa=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&qm(this,d);b&&om(this)};
im.prototype.ed=function(a){this.o=a;this.g&&this.g.ed(a)};function om(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={Nf:void 0},d=c.next())e.Nf=d.value,b.some(function(f){return function(g){return Mj(g.Y,f.Nf)}}(e))||qm(a,e.Nf)}function sm(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&qm(a,d)}om(a)}function tm(a,b){b&&b!==a.i&&(rm(a),a.i=b)}function qm(a,b){var c=a.h;b instanceof Lj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}
function mm(a){this.g=a;this.Gd=this.pg=null}function nm(a,b,c){var d=new Uint8Array(0);a.Gd=a.g(b,c,function(e){return Q(function(f){if(1==f.g)return 0<d.byteLength?d=Wc(d,e):d=e,a.pg?F(f,a.pg(d),3):f.s(0);d=new Uint8Array(0);H(f)})});return a.Gd.promise.catch(function(e){return e instanceof U&&7001==e.code?Promise.resolve():Promise.reject(e)})}mm.prototype.abort=function(){this.Gd&&this.Gd.abort()};function um(a){var b=vf(a),c=b.split("/")[0];a=wf(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Nd:null,colorGamut:null,frameRate:null}}
function vm(a,b,c){function d(A){x=A.name;var E=A.reader;E.skip(24);var G=E.na(),M=E.na();E.skip(50);p=String(G);n=String(M);A.reader.ta()&&Kh(A)}function e(A){var E=$i(A.reader);q=E.channelCount;u=E.sampleRate;f(A.name)}function f(A){A=A.toLowerCase();switch(A){case "avc1":case "avc3":h.push(A+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(A+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(A+".05.04");l=!0;break;case "vp09":h.push(A+".00.10.08");l=!0;break;case "av01":h.push(A+".0.01M.08");
l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(A),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,p=null,q=null,u=null,w=null,v=null,x;(new Fh).box("moov",Kh).box("trak",Kh).box("mdia",Kh).R("mdhd",function(A){m=Yi(A.reader,A.version).language}).box("minf",Kh).box("stbl",Kh).R("stsd",Mh).box("mp4a",function(A){var E=$i(A.reader);q=E.channelCount;u=E.sampleRate;A.reader.ta()?Kh(A):f(A.name)}).box("esds",function(A){A=A.reader;for(var E=
"mp4a",G,M;A.ta();){G=A.X();for(var L=A.X();L&128;)L=A.X();if(3==G)A.na(),L=A.X(),L&128&&A.na(),L&64&&A.skip(A.X()),L&32&&A.na();else if(4==G)M=A.X(),A.skip(12);else if(5==G)break}M&&(E+="."+cj(M),5==G&&A.ta()&&(G=A.X(),M=(G&248)>>3,31===M&&A.ta()&&(M=32+((G&7)<<3)+((A.X()&224)>>5)),E+="."+M));g.push(E);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09",
d).box("av01",d).box("avcC",function(A){var E=x||"";switch(x){case "dvav":E="avc3";break;case "dva1":E="avc1"}A=A.reader;A.skip(1);A=E+"."+cj(A.X())+cj(A.X())+cj(A.X());h.push(A);l=!0}).box("hvcC",function(A){var E=x||"";switch(x){case "dvh1":E="hvc1";break;case "dvhe":E="hev1"}var G=A.reader;G.skip(1);A=G.X();var M=["","A","B","C"][A>>6],L=A&31,J=G.S(),K=(A&32)>>5?"H":"L";A=[G.X(),G.X(),G.X(),G.X(),G.X(),G.X()];G=G.X();for(var N=0,P=0;32>P;P++){N|=J&1;if(31==P)break;N<<=1;J>>=1}E=E+("."+M+L)+("."+
cj(N,!0));E+="."+K+G;M="";for(L=A.length;L--;)if((K=A[L])||M)M="."+K.toString(16).toUpperCase()+M;E+=M;h.push(E);l=!0}).box("dvcC",function(A){var E=x||"";switch(x){case "hvc1":E="dvh1";break;case "hev1":E="dvhe";break;case "avc1":E="dva1";break;case "avc3":E="dvav";break;case "av01":E="dav1"}var G=A.reader;G.skip(2);A=G.X();G=G.X();h.push(E+"."+dj(A>>1&127)+"."+dj(A<<5&32|G>>3&31));l=!0}).box("dvvC",function(A){var E=x||"";switch(x){case "hvc1":E="dvh1";break;case "hev1":E="dvhe";break;case "avc1":E=
"dva1";break;case "avc3":E="dvav";break;case "av01":E="dav1"}var G=A.reader;G.skip(2);A=G.X();G=G.X();h.push(E+"."+dj(A>>1&127)+"."+dj(A<<5&32|G>>3&31));l=!0}).R("vpcC",function(A){var E=x||"",G=A.reader;A=G.X();var M=G.X();G=G.X()>>4&15;h.push(E+"."+dj(A)+"."+dj(M)+"."+dj(G));l=!0}).box("av1C",function(A){var E=x||"";switch(x){case "dav1":E="av01"}var G=A.reader;G.skip(1);A=G.X();G=G.X();var M=A>>>5,L=(G&64)>>6;h.push(E+"."+M+"."+dj(A&31)+(G>>>7?"H":"M")+"."+dj(2===M&&L?(G&32)>>5?12:10:L?10:8)+"."+
((G&16)>>4)+"."+((G&8)>>3)+((G&4)>>2)+(G&3)+"."+dj(1)+"."+dj(1)+"."+dj(1)+".0");l=!0}).box("enca",Oh).box("encv",Nh).box("sinf",Kh).box("frma",function(A){A=aj(A.reader).codec;f(A)}).box("colr",function(A){h=h.map(function(M){if(M.startsWith("av01.")){var L=A.reader,J=L.Ba(),K=L.Cb(4);var N=String.fromCharCode(K[0]);N+=String.fromCharCode(K[1]);N+=String.fromCharCode(K[2]);N+=String.fromCharCode(K[3]);if("nclx"===N){K=L.na();N=L.na();var P=L.na(),O=L.X()>>7,R=M.split(".");10==R.length&&(R[6]=dj(K),
R[7]=dj(N),R[8]=dj(P),R[9]=String(O),M=R.join("."))}L.seek(J)}return M});var E=bj(A.reader),G=E.colorGamut;w=E.Nd;v=G}).parse(a||b,!0);if(!g.length&&!h.length)return null;var z=k&&!l,D=new Map;if(l&&!c){c=new td("video/mp4");a&&c.init(a);try{c.i(b);for(var B=t(c.j()),I=B.next();!I.done;I=B.next()){var C=I.value;D.set(C,C)}}catch(A){}c.g()}return{type:z?"audio":"video",mimeType:z?"audio/mp4":"video/mp4",codecs:wm(g.concat(h)).join(", "),language:m,height:n,width:p,channelCount:q,sampleRate:u,closedCaptions:D,
Nd:w,colorGamut:v,frameRate:null}}function wm(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=uf(d);b.has(e)||(c.push(d),b.add(e))}b=ed("audio",c);d=ed("video",c);a=ed(dd,c);d=xm(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function xm(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?md('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function ym(a){var b=null;(new Fh).box("moov",Kh).box("trak",Kh).box("mdia",Kh).box("minf",Kh).box("stbl",Kh).R("stsd",Mh).box("encv",Nh).box("enca",Oh).box("sinf",Kh).box("schi",Kh).R("tenc",function(c){c=c.reader;c.X();c.X();c.X();c.X();b=Vc(c.Cb(16))}).parse(a,!0);return b}
function zm(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=b,d.cryptoKey?k.s(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Qb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Am(a,b,c,d,e){a=lh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Bm(a,b){var c=this;this.g=b;this.j=a;this.h=null;this.K=new Map;this.C=1;this.u=this.l=null;this.O=0;this.i=new Map;this.I=!1;this.P=null;this.B=!1;this.m=new th(function(){return Cm(c)});this.L=Date.now()/1E3;this.o=new Map;this.M={projection:null,hfov:null};this.W=0;this.T=Infinity;this.F=null;this.A=new ec(function(){if(c.j&&c.g)if(c.j.presentationTimeline.U()){var d=c.j.presentationTimeline.Hb(),e=c.j.presentationTimeline.ob();1<e-d?ol(c.g.aa,d,e):pl(c.g.aa)}else pl(c.g.aa),c.A&&c.A.stop()});
this.G=null;this.H=new ec(function(){var d=c.g.video;!d.ended&&c.G&&(d.currentTime=c.G,c.G=null)})}r=Bm.prototype;r.destroy=function(){return this.m.destroy()};
function Cm(a){var b,c,d,e,f,g,h;return Q(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Dm(e),b.push(Em(e)),e.ba&&(rm(e.ba),e.ba=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,rm(h);return F(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.j=null;a.h=null;a.A&&a.A.stop();a.A=null;a.H&&a.H.stop();a.H=null;a.G=null;H(k)})}
r.configure=function(a){this.h=a;this.P=new Rg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.ba&&(rm(b.ba),b.ba=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,rm(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(dd))&&
b.ba&&(rm(b.ba),b.ba=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ba&&(rm(b.ba),b.ba=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.ba?(sm(c.ba,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(rm(c.ba),c.ba=null)):0<a.segmentPrefetchLimit&&(c.ba=Fm(this,c.stream));a.disableAudioPrefetch||Gm(this)};function Hm(a,b,c){a.j.presentationTimeline.U()||(a.W=b,a.T=c)}
r.start=function(a){var b=this;return Q(function(c){if(1==c.g)return F(c,Im(b,a||new Map),2);uh(b.m);b.I=!0;H(c)})};function Jm(a,b){var c,d,e,f,g,h,k;Q(function(l){switch(l.g){case 1:return c=fd,a.O++,d=a.O,xa(l,2),F(l,jl(a.g.aa,c.za),4);case 4:Aa(l,3);break;case 2:if(e=Ba(l),a.g)a.g.onError(e);case 3:f=lf(b.mimeType,b.codecs),Tk(a.g.aa,f,a.j.sequenceMode,b.external),g=a.g.aa.ea,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.O==d&&(k=Km(a,b),a.i.set(c.za,k),Lm(a,k,0)),H(l)}})}
function Mm(a){var b=a.i.get(dd);b&&(Dm(b),Em(b).catch(function(){}),a.F=a.i.get(dd),a.i.delete(dd));a.u=null}function Nm(a,b){for(var c=0>a.g.gb(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ja&&e.ja.ed(c),e.ba&&e.ba.ed(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.ed(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.fc&&(Om(a,b,!1,0,!1),c.fc=d);else if(b=c.fc)c.fc=null,Om(a,b,!0,0,!1)}
function Pm(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.I&&(b.video&&Om(a,b.video,c,d,e,f),b.audio&&Om(a,b.audio,c,d,e,f))}function Qm(a,b){Q(function(c){if(1==c.g)return a.F=null,a.u=b,a.I?b.segmentIndex?c.s(2):F(c,b.createSegmentIndex(),2):c.return();Om(a,b,!0,0,!1);H(c)})}function Rm(a,b){for(var c=t(a.K.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.K.delete(d))}}
function Om(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=dd?g&&(g.fc&&(b.trickModeVideo?(g.fc=b,b=b.trickModeVideo):g.fc=null),g.stream!=b||e)&&(a.o.has(b)?g.ba=a.o.get(b):g.ba&&tm(g.ba,b),b.type==dd&&(e=lf(b.mimeType,b.codecs),Tk(a.g.aa,e,a.j.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Da?(e="("+g.type+":"+g.stream.id+")",a.K.has(e)||a.K.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream=
b,g.ja=null,g.bf=!!f,b.dependencyStream?g.nd=Km(a,b.dependencyStream):g.nd=null,e?Sm(a,!0,!1):(c?g.nc?g.Re=!0:g.Da?(g.lc=!0,g.Vd=d,g.Re=!0):(Dm(g),Tm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Da||g.kb||Lm(a,g,0),Um(a,g).catch(function(h){if(a.g)a.g.onError(h)}))):Jm(a,b)}
function Um(a,b){var c,d;return Q(function(e){if(1==e.g){if(!b.rb)return e.return();c=b.stream;d=b.rb;return c.segmentIndex?e.s(2):F(e,c.createSegmentIndex(),2)}if(b.rb!=d||b.stream!=c)return e.return();var f=a.g.Rc();var g=Zk(a.g.aa,b.type),h=b.stream.segmentIndex.find(b.xa?b.xa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Sa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.Y)&&(h+=(k.wa?k.wa-k.Sa:null)||0),k=a.g.getBandwidthEstimate(),
f=8*h/k<(g||0)-f-a.h.rebufferingGoal||b.rb.h.g>h?!0:!1):f=!1;f&&b.rb.abort();H(e)})}
r.Fc=function(){if(this.g){for(var a=this.g.Rc(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.aa;d==dd?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Yk(e,d),e=Tj(e,a));if(!e){this.L=0;c.ba&&(c.ba.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.ja=null;(null!=Zk(this.g.aa,d)||c.Da)&&Vm(this,c);c.rb&&(c.rb.abort(),c.rb=null);d===dd&&(d=this.g.aa,d.L&&d.L.g());c.Fc=!0}}"keep"!==this.h.crossBoundaryStrategy&&
Wm(this)}};function Vm(a,b){b.nc||b.lc||(b.Da?(b.lc=!0,b.Vd=0):null==Xk(a.g.aa,b.type)?null==b.kb&&Lm(a,b,0):(Dm(b),Tm(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function Im(a,b){var c,d,e,f,g,h,k,l,m,n;return Q(function(p){if(1==p.g){c=fd;if(!a.l)throw new U(2,5,5006);d=new Map;e=new Set;a.l.audio&&(d.set(c.V,a.l.audio),e.add(a.l.audio));a.l.video&&(d.set(c.la,a.l.video),e.add(a.l.video));a.u&&(d.set(c.za,a.u),e.add(a.u));f=a.g.aa;return F(p,f.init(d,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}uh(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=Km(a,l),b.has(l.id)&&(n=
b.get(l.id),jm(n,function(q,u,w){return Xm(q,u,w||null,a.h.retryParameters,a.g.Xb)}),m.ba=n),a.i.set(k,m),Lm(a,m,0));H(p)})}function Km(a,b){var c={stream:b,type:b.type,ja:null,ba:Fm(a,b),xa:null,yb:null,he:null,Ac:null,zc:null,fe:null,ge:null,fc:null,endOfStream:!1,Da:!1,kb:null,lc:!1,Vd:0,Re:!1,nc:!1,Fc:!0,bf:!1,bg:!1,sd:!1,rb:null,nd:null};b.dependencyStream&&(c.nd=Km(a,b.dependencyStream));return c}
function Fm(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===dd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===dd&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.ba)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new im(a.h.segmentPrefetchLimit,b,function(d,e,f){return Xm(d,e,f||null,a.h.retryParameters,a.g.Xb)},0>a.g.gb()):null}
function Gm(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={wb:void 0},e=d.next())if(f.wb=e.value,f.wb.audio)if(a.o.has(f.wb.audio)){if(e=a.o.get(f.wb.audio),sm(e,b),!(0<b&&c.some(function(h){return function(k){return Nf(h.wb.audio.language,k)}}(f)))){var g=a.i.get(f.wb.audio.type);e!==(g&&g.ba)&&rm(e);a.o.delete(f.wb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Nf(h.wb.audio.language,k)}}(f))||!(e=Fm(a,f.wb.audio))||
(f.wb.audio.segmentIndex||f.wb.audio.createSegmentIndex(),a.o.set(f.wb.audio,e))}r.updateDuration=function(){var a=pd(),b=this.j.presentationTimeline.getDuration();Infinity>b?(a&&(this.A&&this.A.stop(),pl(this.g.aa)),this.g.aa.bb(b)):a?(this.A&&this.A.ua(.5),this.g.aa.bb(Infinity)):this.g.aa.bb(Math.pow(2,32))};
function Ym(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:uh(a.m);if(b.Da||null==b.kb||b.nc)return k.return();b.kb=null;if(!b.lc){k.s(2);break}return F(k,Tm(a,b,b.Re,b.Vd),3);case 3:return k.return();case 2:Rm(a,b);if(b.stream.segmentIndex){k.s(4);break}c=b.stream;xa(k,5);return F(k,b.stream.createSegmentIndex(),7);case 7:Aa(k,6);break;case 5:return d=Ba(k),F(k,Zm(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Da||b.kb||
Lm(a,b,0),k.return();case 4:xa(k,9);e=$m(a,b);null!=e&&(Lm(a,b,e),b.sd=!1);Aa(k,10);break;case 9:return f=Ba(k),F(k,Zm(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.I||!g.every(function(l){return l.endOfStream})){k.s(0);break}return F(k,a.g.aa.endOfStream(),13);case 13:uh(a.m),h=a.g.aa.getDuration(),0!=h&&h<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.bb(h),H(k)}})}
function $m(a,b){if(an(b))return gl(a.g.aa,b.stream.originalId||""),null;b.type==dd&&hl(a.g.aa);if(b.stream.isAudioMuxedInVideo)return null;var c=a.h.updateIntervalSeconds/Math.max(1,Math.abs(a.g.gb()));if(!Wk(a.g.aa)&&b.type!=dd)return c/2;var d=a.g.Rc();if("audio"===b.type)for(var e=t(a.o.keys()),f=e.next();!f.done;f=e.next())f=a.o.get(f.value),f.Oa(d,!0),km(f,d);e=b.xa?b.xa.endTime:d;var g=$k(a.g.aa,b.type,d),h=Math.max(1,Math.max(a.h.rebufferingGoal,a.h.bufferingGoal)*a.C),k=a.j.presentationTimeline.getDuration()-
e;f=Zk(a.g.aa,b.type);if(1E-6>k&&f)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(dd))&&an(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=h)return c/2;h=!b.ja;f=bn(a,b,d,f);if(!f)return c;g=!1;h&&b.bf&&(g=!0,b.bf=!1);h=Infinity;k=Array.from(a.i.values());k=t(k);for(var l=k.next();!l.done;l=k.next())l=l.value,an(l)||l.ja&&!l.ja.current()||(h=Math.min(h,l.xa?l.xa.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;if("keep"!==a.h.crossBoundaryStrategy&&cn(a,b,f))return null;b.ba&&b.ja&&
!a.o.has(b.stream)&&(b.ba.Oa(f.startTime+.001),km(b.ba,f.startTime).catch(function(){}));dn(a,b,d,f,g).catch(function(){});b.nd&&en(a,b.nd,d);return null}
function bn(a,b,c,d){if(b.ja)return(c=b.ja.current())&&b.xa&&.001>Math.abs(b.xa.startTime-c.startTime)&&(c=b.ja.next().value),c;if(b.xa||d)return c=b.xa?b.xa.endTime:d,a=0>a.g.gb(),b.stream.segmentIndex&&(b.ja=b.stream.segmentIndex.Gb(c,!1,a)),b.ja&&b.ja.next().value;d=a.j.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.gb();var f=null;d&&(b.stream.segmentIndex&&(b.ja=b.stream.segmentIndex.Gb(e,!1,a)),f=b.ja&&b.ja.next().value);f||(b.stream.segmentIndex&&(b.ja=b.stream.segmentIndex.Gb(c,
!1,a)),f=b.ja&&b.ja.next().value);return f}
function dn(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C;return Q(function(A){switch(A.g){case 1:f=fd;g=b.stream;h=b.ja;b.Da=!0;xa(A,2);if(2==d.dc())throw new U(1,1,1011);return F(A,fn(a,b,d,e),4);case 4:uh(a.m);if(a.B)return A.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&("HLS"!=a.j.type||d.m))return q=new Uint8Array(0),w=u=!1,x=function(E){var G,M,L,J;return Q(function(K){switch(K.g){case 1:if(u)return K.return();w=
!0;uh(a.m);if(a.B)return K.return();xa(K,2);q=gn(q,E);G=!1;M=0;(new Fh).box("mdat",function(N){M=N.size+N.start;G=!0}).parse(q,!1,!0);if(!G){K.s(4);break}L=q.subarray(0,M);q=q.subarray(M);return F(K,hn(a,b,c,g,d,L,!0,e),5);case 5:b.ba&&b.ja&&km(b.ba,d.startTime,!0);case 4:Aa(K,0);break;case 2:v=J=Ba(K),H(K)}})},F(A,jn(a,b,d,x),9);n=jn(a,b,d);return F(A,n,7);case 7:p=A.h;uh(a.m);if(a.B)return A.return();uh(a.m);return b.lc?(b.Da=!1,Lm(a,b,0),A.return()):F(A,hn(a,b,c,g,d,p,!1,e),6);case 9:z=A.h;if(v)throw v;
if(w){A.s(10);break}u=!0;uh(a.m);return a.B?A.return():b.lc?(b.Da=!1,Lm(a,b,0),A.return()):F(A,hn(a,b,c,g,d,z,!1,e),10);case 10:b.ba&&b.ja&&km(b.ba,d.startTime,!0);case 6:uh(a.m);if(a.B)return A.return();b.xa=d;h.next();b.Da=!1;b.bg=!1;D=a.g.aa.Fb();B=D[b.type];hb(JSON.stringify(B));b.lc||(I=null,b.type===f.la?I=a.i.get(f.V):b.type===f.V&&(I=a.i.get(f.la)),I&&I.type==f.V?a.g.qe(d,b.stream,I.stream.isAudioMuxedInVideo):a.g.qe(d,b.stream,b.stream.codecs.includes(",")));Lm(a,b,0);Aa(A,0);break;case 2:C=
Ba(A);uh(a.m,C);if(a.B)return A.return();b.Da=!1;if(7001==C.code)b.Da=!1,Dm(b),Lm(a,b,0),A.s(0);else if(b.type==f.za&&a.h.ignoreTextStreamFailures)a.i.delete(f.za),A.s(0);else{if(3017==C.code)return F(A,kn(a,b,C),0);b.sd=!0;1==C.category&&b.ba&&qm(b.ba,d);C.severity=2;return F(A,Zm(a,b,C),0)}}})}
function en(a,b,c){var d,e,f,g,h,k,l,m;Q(function(n){switch(n.g){case 1:d=b.stream;f=(e=d.segmentIndex.Gb(c))&&e.next().value;if(!f){n.s(0);break}g=f.Y;if(!g||Mj(g,b.yb)){n.s(3);break}b.yb=g;xa(n,4);return F(n,jn(a,b,g),6);case 6:h=n.h;var p=a.g.aa;p.I&&jd(p.I,h,0,d);Aa(n,3);break;case 4:throw k=Ba(n),b.yb=null,k;case 3:if(b.xa&&b.xa==f){n.s(0);break}b.xa=f;xa(n,8);return F(n,jn(a,b,f),10);case 10:l=n.h;p=a.g.aa;p.I&&jd(p.I,l,0,d);Aa(n,0);break;case 8:throw m=Ba(n),b.xa=null,m;}})}
function gn(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
function kn(a,b,c){var d,e,f,g,h,k;return Q(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.bg}))return l.s(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();if(a.h.avoidEvictionOnQuotaExceededError)return Lm(a,b,4),l.return();h=Math.round(100*a.C);if(20<h)a.C-=.2;else if(4<h)a.C-=.04;else return b.sd=!0,a.B=!0,a.g.onError(c),l.return();b.bg=!0;k=a.g.Rc();return F(l,ln(a,b,k),2)}Lm(a,b,4);
H(l)})}
function fn(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D;return Q(function(B){switch(B.g){case 1:e=fd;f=null==b.xa;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.W)-.1);k=Math.min(c.appendWindowEnd,a.T)+.01;l=c.codecs||b.stream.codecs;m=uf(l);n=vf(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.he&&h==b.Ac&&k==b.zc&&m==b.fe&&n==b.ge){B.s(2);break}q=b.fe&&b.ge&&wl(a.g.aa,b.type,n,l);if(!q){B.s(3);break}u=null;b.type===e.la?u=a.i.get(e.V):b.type===e.V&&(u=a.i.get(e.la));if(!u){B.s(3);break}return F(B,
Em(u).catch(function(){}),5);case 5:u.yb=null,u.Ac=null,u.zc=null,Vm(a,u);case 3:return F(B,mn(a,b,p,h,k,c,m,n),2);case 2:return Mj(c.Y,b.yb)||(b.yb=c.Y,c.l&&c.Y&&(w=jn(a,b,c.Y),v=function(){var I,C,A,E,G,M,L;return Q(function(J){switch(J.g){case 1:return xa(J,2),F(J,w,4);case 4:return I=J.h,uh(a.m),C=null,A=new Map,E={projection:null,hfov:null},G=new Fh,G.box("moov",Kh).box("trak",Kh).box("mdia",Kh).R("mdhd",function(K){C=Yi(K.reader,K.version).timescale}).box("hdlr",function(K){K=K.reader;K.skip(8);
switch(K.Cc()){case "soun":A.set(e.V,C);break;case "vide":A.set(e.la,C)}C=null}).box("minf",Kh).box("stbl",Kh).R("stsd",Mh).box("encv",Nh).box("avc1",Nh).box("avc3",Nh).box("hev1",Nh).box("hvc1",Nh).box("dvav",Nh).box("dva1",Nh).box("dvh1",Nh).box("dvhe",Nh).box("dvc1",Nh).box("dvi1",Nh).box("vexu",Kh).box("proj",Kh).R("prji",function(K){K=K.reader.Cc();E.projection=K}).box("hfov",function(K){K=K.reader.S()/1E3;E.hfov=K}).parse(I),b.type===e.la&&nn(a,E),A.has(b.type)?c.Y.timescale=A.get(b.type):null!=
C&&(c.Y.timescale=C),M=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,F(J,a.g.Fg(b.type,I),5);case 5:return F(J,bl(a.g.aa,b.type,I,null,b.stream,M,b.Fc,d),6);case 6:Aa(J,0);break;case 2:throw L=Ba(J),b.yb=null,L;}})},x=c.startTime,f&&(z=Zk(a.g.aa,b.type),null!=z&&(x=z)),a.g.fj(x,c.Y),g.push(v()))),D=b.xa?b.xa.i:null,c.i!=D&&g.push(ml(a.g.aa,b.type,c.startTime)),F(B,Promise.all(g),0)}})}
function mn(a,b,c,d,e,f,g,h){var k,l,m,n;return Q(function(p){if(1==p.g)return k=fd,l=new Map,a.l.audio&&l.set(k.V,a.l.audio),a.l.video&&l.set(k.la,a.l.video),xa(p,2),b.Ac=d,b.zc=e,g&&(b.fe=g),h&&(b.ge=h),b.he=c,m=a.j.sequenceMode||"HLS"==a.j.type,F(p,kl(a.g.aa,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return Aa(p,0);n=Ba(p);b.Ac=null;b.zc=null;b.fe=null;b.ge=null;b.he=null;throw n;})}
function hn(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,q;return Q(function(u){switch(u.g){case 1:return k=d.closedCaptions&&0<d.closedCaptions.size,a.h.shouldFixTimestampOffset&&(m="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType,n=null,e.Y&&(n=e.Y.timescale),(p=m&&n&&"video"===d.type&&"DASH"==a.j.type)&&(l=new Fh),p&&l.box("moof",Kh).box("traf",Kh).R("tfdt",function(w){var v,x,z,D,B,I;return Q(function(C){v=Xi(w.reader,w.version);x=v.baseMediaDecodeTime;if(!x)return C.return();
z=-x/n;D=Number(b.he)||0;if(!(D<z))return C.s(0);B=b.Ac;I=b.zc;return F(C,mn(a,b,z,B,I,e),0)})}),p&&l.parse(f,!1,g)),F(u,ln(a,b,c),2);case 2:return uh(a.m),q=b.Fc,b.Fc=!1,F(u,a.g.Fg(b.type,f),3);case 3:return F(u,bl(a.g.aa,b.type,f,e,d,k,q,h,g),4);case 4:uh(a.m),H(u)}})}
function ln(a,b,c){var d,e,f,g,h,k,l,m;return Q(function(n){if(1==n.g){d=b.stream.segmentIndex;d instanceof Vl&&d.Oa(a.j.presentationTimeline.pb());e=Math.max(a.h.bufferBehind*a.C,a.j.presentationTimeline.h);f=Xk(a.g.aa,b.type);if(null==f)return a.F==b&&(a.F=null),n.return();g=c-f;h=a.h.evictionGoal;k=a.j.presentationTimeline.Hb();l=a.j.presentationTimeline.ob();m=g-e;l-k>h&&(m=Math.max(g-e,k-h-f));return m<=h?n.return():F(n,a.g.aa.remove(b.type,f,f+m),2)}if(4!=n.g)return uh(a.m),a.F?F(n,ln(a,a.F,
c),4):n.s(0);uh(a.m);H(n)})}function an(a){return a&&a.type==dd&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
function jn(a,b,c,d){var e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(e=c.Ib())return l.return(e);f=null;if(b.ba){var m=b.ba,n=m.h;c instanceof Lj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.pg=d),f=m.Gd):f=null}f||(f=Xm(c,b.stream,d||null,a.h.retryParameters,a.g.Xb));g=0;b.ja&&(g=b.ja.h);b.rb=f;return F(l,f.promise,2);case 2:h=l.h;b.rb=null;k=h.data;if(!c.aesKey){l.s(3);break}return F(l,zm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
function Xm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof Nj?a:void 0,h=g?1:0;a=Am(a.N(),a.Sa,a.wa,d,c);a.contentType=b.type;return e.request(rh,a,{type:h,stream:b,segment:g,isPreload:f})}
function Tm(a,b,c,d){var e,f;return Q(function(g){if(1==g.g)return b.lc=!1,b.Re=!1,b.Vd=0,b.nc=!0,b.xa=null,b.ja=null,b.ba&&!a.o.has(b.stream)&&rm(b.ba),d?(e=a.g.Rc(),f=a.g.aa.getDuration(),F(g,a.g.aa.remove(b.type,e+d,f),3)):F(g,jl(a.g.aa,b.type),4);if(3!=g.g)return uh(a.m),c?F(g,a.g.aa.flush(b.type),3):g.s(3);uh(a.m);b.nc=!1;b.endOfStream=!1;b.Da||b.kb||Lm(a,b,0);H(g)})}
function Lm(a,b,c){var d=b.type;if(d!=dd||a.i.has(d))b.kb=(new dc(function(){var e;return Q(function(f){if(1==f.g)return xa(f,2),F(f,Ym(a,b),4);if(2!=f.g)return Aa(f,0);e=Ba(f);if(a.g)a.g.onError(e);H(f)})})).da(c)}function Dm(a){null!=a.kb&&(a.kb.stop(),a.kb=null)}function Em(a){return Q(function(b){return a.rb?F(b,a.rb.abort(),0):b.s(0)})}
function Zm(a,b,c){var d;return Q(function(e){if(1==e.g)return 3024==c.code?(b.Da=!1,Dm(b),Lm(a,b,0),e.return()):F(e,Tg(a.P),2);uh(a.m);if(1===c.category&&1003!=c.code){if(b.fc)return Nm(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
function Sm(a,b,c){b=void 0===b?!1:b;c=void 0===c?!0:c;var d,e,f,g,h,k;return Q(function(l){if(1==l.g){d=Date.now()/1E3;e=a.h.minTimeBetweenRecoveries;if(!b){if(!a.h.allowMediaSourceRecoveries||d-a.L<e)return l.return(!1);a.L=d}f=fd;if(g=a.i.get(f.V))g.yb=null,g.Ac=null,g.zc=null,c&&Vm(a,g),Em(g).catch(function(){}),g.ja&&g.ja.dg();if(h=a.i.get(f.la))h.yb=null,h.Ac=null,h.zc=null,c&&Vm(a,h),Em(h).catch(function(){}),h.ja&&h.ja.dg();k=new Map;a.l.audio&&k.set(f.V,a.l.audio);a.l.video&&k.set(f.la,a.l.video);
return F(l,ul(a.g.aa,k),2)}!h||h.nc||h.Da||h.kb||Lm(a,h,0);!g||g.nc||g.Da||g.kb||Lm(a,g,0);return l.return(!0)})}function nn(a,b){if(a.M.projection!=b.projection||a.M.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new V("spatialvideoinfo",c)}else c=new V("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.M=b}}
function Wm(a){if("keep"!==a.h.crossBoundaryStrategy){a.H.stop();var b=a.g.Rc(),c=a.i.get("video")||a.i.get("audio");c&&(c=c.yb)&&null!==c.g&&(b=c.g-b,0>b||1<b||(a.G=c.g+.01,a.H.da(b)))}}
function cn(a,b,c){if(b.type===dd)return!1;var d=b.yb;if(!d)return!1;c=c.Y;var e=d.g!==c.g;"reset_to_encrypted"===a.h.crossBoundaryStrategy&&(d.encrypted||c.encrypted||(e=!1),d.encrypted&&(a.h.crossBoundaryStrategy="keep"));"RESET_ON_ENCRYPTION_CHANGE"===a.h.crossBoundaryStrategy&&d.encrypted==c.encrypted&&(e=!1);if(e&&b.Fc){var f=a.g.video,g=f.paused;Sm(a,!0).then(function(){a.g.onEvent(new V("boundarycrossed"));g||f.play()})}return e};function on(){}
function pn(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Nd(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Nd(n)),m=pn(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(ab("Invalid config, wrong type for "+m),
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&bb("Unexpected number of arguments for "+m),a[l]=b[l]):(ab("Invalid config, unrecognized key "+m),k=!1)}return k}function qn(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function rn(a,b){return a&&b}
function sn(a,b){function c(f){for(var g=t(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&0===Object.keys(f[h]).length)delete f[h];else{var k=f[h];Array.isArray(k)&&0===k.length?delete f[h]:"function"==typeof f[h]?delete f[h]:e(f[h])&&(c(f[h]),0===Object.keys(f[h]).length&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])||
(h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),0<Object.keys(l).length||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?Dd(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&&"object"===typeof f&&!Array.isArray(f)}a=d(a,b);c(a);return a}T("shaka.util.ConfigUtils",on);on.getDifferenceFromConfigObjects=sn;on.convertToConfigObject=qn;on.mergeConfigObjects=pn;function tn(){}function un(a){a=Kc(a);return(new yb(a)).nb}function vn(a,b,c){function d(h){Vb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Qb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new U(2,6,6015);var e;"string"==typeof b?e=Mc(b,!0):e=b;a=Kc(a);a=Mc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function wn(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Kc(a).split("skd://").pop();return vn(a,c,b)}
function xn(a,b){2===a&&(a=b.drmInfo)&&ac(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}T("shaka.drm.FairPlay",tn);
tn.commonFairPlayResponse=function(a,b){if(2===a&&(a=b.originalRequest.drmInfo)&&ac(a.keySystem)){try{var c=Hc(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);if(!a)try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Sb(Tc(c)))}};tn.muxFairPlayRequest=function(a,b){xn(a,b)};
tn.expressplayFairPlayRequest=function(a,b){if(2===a){var c=b.drmInfo;c&&ac(c.keySystem)&&xn(a,b)}};tn.conaxFairPlayRequest=function(a,b){xn(a,b)};tn.ezdrmFairPlayRequest=function(a,b){xn(a,b)};tn.verimatrixFairPlayRequest=function(a,b){2===a&&(a=b.drmInfo)&&ac(a.keySystem)&&(a=Qb(b.body),a=Sc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Lc("spc="+a))};tn.muxInitDataTransform=function(a,b,c){return wn(a,b,c)};
tn.expressplayInitDataTransform=function(a,b,c){return wn(a,b,c)};tn.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Kc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Ub(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return vn(a,d,b)};tn.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Kc(a).split(";").pop();return vn(a,c,b)};
tn.verimatrixInitDataTransform=function(a,b,c){return wn(a,b,c)};tn.initDataTransform=vn;tn.defaultGetContentId=un;tn.isFairPlaySupported=function(){var a;return Q(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},xa(b,2),F(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);Ba(b);return b.return(!1)})};function yn(){this.g=null}yn.prototype.configure=function(a){this.g=a};
yn.prototype.create=function(a){var b;if(this.g.language){var c=zn(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(d){return d.primary}),b=b.length?b:a);a=An(b,this.g.role);a.length&&(b=a);this.g.videoLayout&&(a=Bn(b,this.g.videoLayout),a.length&&(b=a));this.g.Sc&&(a=Cn(b,this.g.Sc),a.length&&(b=a));this.g.channelCount&&(a=Dn(b,this.g.channelCount),a.length&&(b=a));this.g.Kc&&(a=En(b,this.g.Kc),a.length&&(b=a));this.g.fd&&(a=Fn(b,this.g.fd),a.length&&(b=a));a=Gn(b,this.g.spatialAudio);
a.length&&(b=a);this.g.audioCodec&&(a=Hn(b,this.g.audioCodec),a.length&&(b=a));return new Di(b[0],b,!("smooth"==this.g.codecSwitchingStrategy&&od()))};function zn(a,b){b=Of(b);var c=ag(b,a.map(function(d){return $f(d)}));return c?a.filter(function(d){return c==$f(d)}):[]}function An(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}
function En(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Fn(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function Dn(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 Cn(a,b){if("AUTO"==b){var c=a.some(function(d){return d.video&&d.video.hdr&&"HLG"==d.video.hdr?!0:!1});b=Fc(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function Bn(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Gn(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Hn(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function In(){}
function Jn(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Sg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){"apple"===window.shakaMediaKeysPolyfill&&"skd"==n&&(n=p.serverCertificate,p=un(m),m=vn(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:jc(),minHdcpVersion:"",
ignoreDuplicateInitData:!kc("Tizen 2"),defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"};(jc()||uc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!od()||lc()||uc()||tc()||nc()&&79===pc()||qc()&&!yc()&&!zc()||xc()&&ic()||(c="smooth",d=!0);d={retryParameters:Sg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,
raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Kn,manifestPreprocessorTXml:Ln,sequenceMode:!1,multiTypeVariantsAllowed:d,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:Dc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Kn,
manifestPreprocessorTXml:Ln,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Sg(),failureCallback:function(m){return rn([m])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,
safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3,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:uc()||tc(),dontChooseCodecs:!1,shouldFixTimestampOffset:nc()||lc(),avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep"};
if(nc()||lc()||qc()||vc())e.stallSkip=0;if(navigator.userAgent.match(/Edge\//)||jc())e.gapPadding=.01;lc()&&(e.gapPadding=2);oc()&&(e.crossBoundaryStrategy="reset");mc()&&(e.crossBoundaryStrategy="reset_to_encrypted");var f={trackSelectionCallback:function(m){return Q(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return Q(function(p){if(1==p.g)return navigator.storage&&navigator.storage.estimate?F(p,navigator.storage.estimate(),3):p.return(!0);n=p.h;return p.return(n.usage+
m<.95*n.quota)})},progressCallback:function(m,n){return rn([m,n])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,
minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:rc()?.5:0,preferNetworkInformationBandwidth:!1};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return rn([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return rn([m,n])},dispatchAllEmsgBoxes:!1};var g=!1,h=!1,k=!0;Ac()&&(h=g=!0,k=!1);var l=
{drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new Mg},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(yn,[null].concat(y(Na.apply(0,arguments)))))},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],
preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",
rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0},ignoreHardwareResolution:!1};f.trackSelectionCallback=function(m){return Q(function(n){return n.return(Mn(m,l.preferredAudioLanguage,
l.preferredVideoHdrLevel))})};return l}function Nn(){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 On(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 pn(a,b,c||Jn(),d,"")}
function Mn(a,b,c){var d=c;"AUTO"==d&&(c=a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1}),d=Fc(c));var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=ag(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Of(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=dd&&"image"!=c.type||b.push(c);return b}function Kn(a){return rn([a],a)}function Ln(a){return rn([a],a)}T("shaka.util.PlayerConfiguration",In);In.mergeConfigObjects=On;In.createDefaultForLL=Nn;In.createDefault=Jn;function Pn(){this.g=null;this.h=[]}function Qn(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 Rn(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 go(){this.i=this.h=null;this.g=[]}function ho(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 io(){this.mc=this.bh=this.u=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.P=this.T=this.L=this.M=this.O=this.l=this.m=NaN;this.K=0;this.F=this.G=NaN;this.g=new Pn;this.h=new go};function jo(a,b,c,d){dh.call(this);this.O=a;this.Z=b;this.Fa=d.networkingEngine;this.B=c;this.o=null;this.ya=0;this.Ma=d.Lc;this.F=d.Zi;this.Na=d.$i;this.g=d.config;this.l=this.G=this.h=null;this.pa=!1;this.H=d.kj;this.sa=!1;this.i=null;this.ka=!1;this.j=this.C=null;this.ea=!1;this.M=new Map;this.Aa=!1;this.Ga=d.jj;this.$=new io;this.oa=new Ug;this.m=new Ug;this.P=null;this.u=!1;this.fa=d.Uh;this.W=this.K=null;this.La=d.Th;this.T=!1;this.L=[];this.I=[];this.A=!0}qa(jo,dh);
function ko(a,b,c){(a=b?a.I:a.L)?a.push(c):c()}function lo(a){if(a.I)for(var b=t(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function mo(a,b){a.P=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}r=jo.prototype;r.getStartTime=function(){return this.B};r.Qc=function(){return this.O};r.Hf=function(){return this.h};function no(a){a.ea=!0;return a.j}function oo(a){a.sa=!0;return a.H}r.getStats=function(){return this.$};
function po(a){a.ka=!0;return a.i}r.Ai=function(){return this.K?xg(this.K):null};r.zi=function(){return this.W?yg(this.W):null};function qo(a){a.Aa=!0;return a.M}
r.start=function(){var a=this;(function(){var b;return Q(function(c){switch(c.g){case 1:return F(c,Promise.resolve(),2);case 2:return xa(c,3),F(c,ro(a),5);case 5:so(a);if("webkit"===window.shakaMediaKeysPolyfill){c.s(6);break}return F(c,to(a),7);case 7:so(a);case 6:return F(c,uo(a),8);case 8:so(a);if(!a.fa||!a.i){c.s(9);break}return F(c,yi(a.i),10);case 10:so(a);case 9:a.m.resolve();Aa(c,0);break;case 3:b=Ba(c),b instanceof U&&(7001==b.code||7003==b.code)||a.m.reject(b),H(c)}})})()};
r.dispatchEvent=function(a){return this.P?this.P.dispatchEvent(a):dh.prototype.dispatchEvent.call(this,a)};r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new V("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function so(a){if(a.u)throw new U(2,7,7003);}function vo(a,b){a.dispatchEvent(new V("onstatechange",(new Map).set("state",b)))}
function ro(a){var b,c,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:vo(a,"manifest-parser");a.l||(a.G=Vi(a.O,a.Z),a.l=a.G(),a.l.configure(a.g.manifest,function(){return a.A}));b=Date.now()/1E3;vo(a,"manifest");if(a.h){m.s(2);break}return F(m,a.l.start(a.O,a.Na),3);case 3:a.h=m.h;if(1!=a.h.variants.length){m.s(2);break}c=[];d=a.h.variants[0];e=t([d.video,d.audio]);for(f=e.next();!f.done;f=e.next())(g=f.value)&&!g.segmentIndex&&c.push(g.createSegmentIndex());if(!(0<c.length)){m.s(2);break}return F(m,
Promise.all(c),2);case 2:return a.oa.resolve(),h=new V("manifestparsed",void 0),F(m,Promise.resolve(),7);case 7:a.dispatchEvent(h);if(0==a.h.variants.length)throw new U(2,4,4036);wo(a.h);k=Date.now()/1E3;l=k-b;a.$.H=l;H(m)}})}
function to(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:if(!a.h||a.i)return k.return();vo(a,"drm-engine");a.ya=Date.now()/1E3;a.i=a.Ma();a.F.h=a.i;a.i.configure(a.g.drm,function(){return a.A});c=Ni(a.F,a.h);if(!c){k.s(2);break}d=new V("trackschanged",void 0);return F(k,Promise.resolve(),3);case 3:so(a),a.dispatchEvent(d);case 2:return e=Hg(a.h.variants),f=!0,a.h&&a.h.presentationTimeline&&"HLS"!=a.h.type&&(f=a.h.presentationTimeline.U()),F(k,Zh(a.i,e,a.h.offlineSessionIds,f),4);case 4:so(a);
if(!b){k.s(5);break}return F(k,a.i.Lb(b),6);case 6:so(a);case 5:return F(k,Li(a.F,a.h),7);case 7:g=k.h;if(!g){k.s(0);break}h=new V("trackschanged",void 0);return F(k,Promise.resolve(),9);case 9:a.dispatchEvent(h),H(k)}})}r.configure=function(a,b){a=qn(a,b);On(this.g,a)};r.getConfiguration=function(){return Nd(this.g)};
function uo(a){var b,c,d,e,f,g,h;return Q(function(k){a.o||(a.o=a.g.adaptationSetCriteriaFactory(),a.o.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredVariantRole,channelCount:a.g.preferredAudioChannelCount,Sc:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,Kc:a.g.preferredAudioLabel,fd:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:""}));a.La&&(b=a.g.abrFactory,a.C=b,a.j=b(),a.j.configure(a.g.abr));
if(!a.fa)return k.s(0);c=a.h.presentationTimeline.U();d=Hg(a.h.variants);e=a.o.create(d);a.j.configure(a.g.abr);a.j.setVariants(Array.from(e.values()));f=a.j.chooseVariant();if(!f)return k.s(0);g=[];a.K=f;f.video&&g.push(xo(a,f.video,c));f.audio&&g.push(xo(a,f.audio,c));(h=Ig(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&Lg(f.audio,h,a.g)&&(g.push(xo(a,h,c)),a.W=h);return F(k,Promise.all(g),0)})}
function xo(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new im(d,b,function(l,m,n){return Xm(l,m,n||null,a.g.streaming.retryParameters,a.Fa,a.A)},!1),a.M.set(b.id,e),b.segmentIndex?k.s(2):F(k,b.createSegmentIndex(),2);f=a.B||0;g=b.segmentIndex.Gb(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=Ag(b.segmentIndex));return h?c?h.Y?F(k,lm(e,h.Y),0):k.s(0):F(k,km(e,h.startTime),0):k.s(0)})}r.Lj=function(){return this.m};
r.destroy=function(){var a=this,b,c,d;return Q(function(e){switch(e.g){case 1:a.u=!0;if(!a.l||a.pa){e.s(2);break}return F(e,a.l.stop(),2);case 2:if(!a.j||a.ea){e.s(4);break}return F(e,a.j.stop(),4);case 4:a.H&&!a.sa&&a.H.release();if(!a.i||a.ka){e.s(6);break}return F(e,a.i.destroy(),6);case 6:if(0<a.M.size&&!a.Aa)for(b=t(a.M.values()),c=b.next();!c.done;c=b.next())d=c.value,rm(d);H(e)}})};
function wo(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))}T("shaka.media.PreloadManager",jo);jo.prototype.destroy=jo.prototype.destroy;jo.prototype.waitForFinish=jo.prototype.Lj;jo.prototype.getPrefetchedTextTrack=jo.prototype.zi;jo.prototype.getPrefetchedVariantTrack=jo.prototype.Ai;function yo(a,b){dh.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Jc:null,Ic:zo,xc:function(d,e){return Ao(c,"enter",d,e)}},{Jc:Bo,Ic:zo,xc:function(d,e){return Ao(c,"enter",d,e)}},{Jc:Co,Ic:zo,xc:function(d,e){return Ao(c,"enter",d,e)}},{Jc:zo,Ic:Bo,xc:function(d,e){return Ao(c,"exit",d,e)}},{Jc:zo,Ic:Co,xc:function(d,e){return Ao(c,"exit",d,e)}},{Jc:Bo,Ic:Co,xc:function(d,e){e?Ao(c,"skip",d,e):(Ao(c,"enter",d,e),Ao(c,"exit",d,e))}},{Jc:Co,Ic:Bo,xc:function(d,e){return Ao(c,"skip",
d,e)}}];this.h=new lb;this.h.D(this.i,"regionremove",function(d){c.g.delete(d.region)})}qa(yo,dh);yo.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;dh.prototype.release.call(this)};
yo.prototype.j=function(a,b){if(!this.l||0!=a){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?Bo:a>d.endTime?Co:zo;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Jc==e&&h.Ic==f&&h.xc(d,b)}}};function Ao(a,b,c,d){b=new V(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Bo=1,zo=2,Co=3;function Do(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:var n=(new yb(a)).ab.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Eo.get(d))return m.return(e);f=0;g=lh([a],c);xa(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];Aa(m,3);break;case 2:k=Ba(m);if(!k||1002!=k.code&&1001!=k.code){m.s(3);break}g.method="GET";return F(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
e.toLowerCase().split(";").shift():"")}})}
var Eo=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv",
"text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function Fo(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Fo(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=Ve,e=a.fontStyle==We,f=a.textDecoration.includes(Xe);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Go(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Go(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
function Go(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(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 Ho(a,b){var c=[];a=t(Io(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,y(Ho(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Fo(d,b);c.push(e)}return c}
function Io(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={jf:void 0},c=a.next())d.jf=c.value,b.some(function(e){return function(f){return Le(e.jf,f)}}(d))||b.push(d.jf);return b}
function Jo(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function Ko(a,b){this.h=a;this.i=b;this.g=null;a=t(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,"metadata"!==b.kind&&"chapters"!==b.kind&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}r=Ko.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;Lo(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
r.append=function(a){if(this.g){var b=Ho(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={Tc:void 0},d=b.next())e.Tc=d.value,!a.some(function(f){return function(g){return g.startTime==f.Tc.startTime&&g.endTime==f.Tc.endTime&&g.text==f.Tc.payload?!0:!1}}(e))&&e.Tc.payload&&(d=Jo(e.Tc))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-
c.indexOf(f):c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)}};r.destroy=function(){this.g&&(Lo(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};r.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};r.setTextVisibility=function(a){a&&!this.g&&Mo(this);this.g&&(this.g.mode=a?"showing":"hidden")};r.setTextLanguage=function(){};r.enableTextDisplayer=function(){Mo(this)};
function Mo(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}function Lo(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}T("shaka.text.SimpleTextDisplayer",Ko);Ko.prototype.enableTextDisplayer=Ko.prototype.enableTextDisplayer;Ko.prototype.setTextLanguage=Ko.prototype.setTextLanguage;Ko.prototype.setTextVisibility=Ko.prototype.setTextVisibility;
Ko.prototype.isTextVisible=Ko.prototype.isTextVisible;Ko.prototype.destroy=Ko.prototype.destroy;Ko.prototype.append=Ko.prototype.append;Ko.prototype.remove=Ko.prototype.remove;Ko.prototype.configure=Ko.prototype.configure;function No(){}r=No.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};r.setTextLanguage=function(){};r.enableTextDisplayer=function(){};T("shaka.text.StubTextDisplayer",No);No.prototype.enableTextDisplayer=No.prototype.enableTextDisplayer;No.prototype.setTextLanguage=No.prototype.setTextLanguage;No.prototype.setTextVisibility=No.prototype.setTextVisibility;
No.prototype.isTextVisible=No.prototype.isTextVisible;No.prototype.destroy=No.prototype.destroy;No.prototype.append=No.prototype.append;No.prototype.remove=No.prototype.remove;No.prototype.configure=No.prototype.configure;function Oo(a,b){var c=this;document.fullscreenEnabled||bb("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen");this.A=!1;this.h=[];this.j=a;this.C=b;this.u=this.m=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.C.appendChild(this.g);
this.o=new ec(function(){c.j.paused||Po(c)});Qo(this);this.l=new Map;this.i=new lb;this.i.D(document,"fullscreenchange",function(){Po(c,!0)});this.i.D(this.j,"seeking",function(){Po(c,!0)});this.i.D(this.j,"ratechange",function(){Qo(c)});this.i.D(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.m=e/d:c.m=null});this.B=null;"ResizeObserver"in window&&(this.B=new ResizeObserver(function(){Po(c,!0)}),this.B.observe(this.g));this.F=new Map}r=Oo.prototype;
r.configure=function(a){this.u=a;Qo(this);Po(this,!0)};r.append=function(a){var b=[].concat(y(this.h));a=t(Io(a));for(var c=a.next(),d={};!c.done;d={kf:void 0},c=a.next())d.kf=c.value,b.some(function(e){return function(f){return Le(f,e.kf)}}(d))||this.h.push(d.kf);this.h.length&&Qo(this);Po(this)};
r.destroy=function(){if(!this.g)return Promise.resolve();this.C.removeChild(this.g);this.g=null;this.A=!1;this.h=[];this.o&&(this.o.stop(),this.o=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.B&&(this.B.disconnect(),this.B=null);return Promise.resolve()};r.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});Po(this,c>this.h.length);this.h.length||Qo(this);return!0};r.isTextVisible=function(){return this.A};
r.setTextVisibility=function(a){this.A=a;Po(this,!0)};r.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};r.enableTextDisplayer=function(){};function Qo(a){a.o&&(a.h.length?a.o.ua((a.u?a.u.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.o.stop())}function Ro(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
function So(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.Nh:null;l&&(g.push(l.lf),l.Ec&&g.push(l.Ec),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?Ro(a,n)||(f=!0):(To(a,k,e),l=a.l.get(k),n=l.Nh,f=!0));0<k.nestedCues.length&&n&&So(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.l.get(d.value),d.Ec?(d.Ec.contains(c)&&d.Ec.removeChild(c),c.appendChild(d.Ec),d.Ec.appendChild(d.lf)):c.appendChild(d.lf)}}function Po(a,b){if(a.g){var c=a.j.currentTime;if(!a.A||(void 0===b?0:b)){b=t(a.F.values());for(var d=b.next();!d.done;d=b.next())hk(d.value);hk(a.g);a.l.clear();a.F.clear()}a.A&&So(a,a.h,a.g,c,[])}}
function To(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Uo(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.m===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==zd?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==zd?"%":"px");if(a.F.has(c))c=a.F.get(c);else{e=document.createElement("span");var k=g.heightUnits==zd?"%":"px",l=g.widthUnits==
zd?"%":"px",m=g.viewportAnchorUnits==zd?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,p=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(p=g.width*h,l="%");e.style.height=n+k;e.style.width=p+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.m===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*p/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*p/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"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,{lf:f,Nh:e,Ec:c})}
function Vo(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Be?c:"left"===a||"start"===a&&b===De||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===De?"line-right":"center"}
function Uo(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Wo(c.linePadding,c,a.C);f.paddingRight=Wo(c.linePadding,c,a.C);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=Xo(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}if(h&&!d[d.length-
1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;
f.fontSize=Wo(c.fontSize,c,a.C,a.u?a.u.fontScaleFactor:1);d=c.line;null!=d&&(g=c.lineInterpretation,g==Fe&&(g=1,h=16,a.m&&1>a.m&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Ee?(f.width="100%",c.lineAlign==Ge?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Ge?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Ge?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));
f.lineHeight=c.lineHeight;a=Vo(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Ee?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Ee?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Ee?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=
c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Ee?f.width=c.size+"%":f.height=c.size+"%")}
function Wo(a,b,c,d){d=void 0===d?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function Xo(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}T("shaka.text.UITextDisplayer",Oo);Oo.prototype.enableTextDisplayer=Oo.prototype.enableTextDisplayer;
Oo.prototype.setTextLanguage=Oo.prototype.setTextLanguage;Oo.prototype.setTextVisibility=Oo.prototype.setTextVisibility;Oo.prototype.isTextVisible=Oo.prototype.isTextVisible;Oo.prototype.remove=Oo.prototype.remove;Oo.prototype.destroy=Oo.prototype.destroy;Oo.prototype.append=Oo.prototype.append;Oo.prototype.configure=Oo.prototype.configure;function Yo(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(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Ho(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 Ce:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}T("shaka.text.WebVttGenerator",function(){});function Zo(a,b){this.h=a;this.g=b;this.i=void 0;this.u=!1;this.F=!0;this.l=this.B=!1;this.o=this.m=void 0;this.A=0;this.G=!1;this.C=new lb;this.j=null}Zo.prototype.setMediaElement=function(a){this.j=a;$o(this)};Zo.prototype.configure=function(a){this.g=a};function ap(a){a.u=!1;a.F=!0;a.B=!1;a.l=!1;a.m=0;a.o=0;a.A=0;a.G=!1;a.j=null;a.C.Qa()}function bp(a,b){a.l=b;a.l?a.i==cp?a.i=dp:a.i==ep&&(a.i=fp):a.i==dp?a.i=cp:a.i==fp&&(a.i=ep)}
function gp(a,b){if(a.g&&a.g.enabled&&a.g.version==hp&&a.j&&a.j.autoplay){var c=a.j.play();c&&c.then(function(){a.A=b}).catch(function(){a.A=0})}}
function ip(a,b,c){try{if(!a.g.enabled)return b;var d=jp(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=kp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=lp;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=mp;break a}e=void 0}d.ot=e;d.su=
!0;var f=np(d);return op(b,f)}catch(g){return cb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function $o(a){a.C.ma(a.j,"play",function(){a.m||(a.m=Date.now())});a.C.ma(a.j,"playing",function(){a.o||(a.o=Date.now())})}function jp(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
function pp(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,jp(a));c.pr=a.h.gb();var e=c.ot===qp||c.ot===lp;a.B&&e&&(c.bs=!0,c.su=!0,a.B=!1);null==c.su&&(c.su=a.F);c.v===hp&&(a.h.U()&&(c.ltc=a.h.Zd()),e=!a.G&&a.o&&a.m?a.o-(a.A||a.m):void 0,void 0!=e&&(c.msd=e,a.G=!0));a=rp(a,c);if(d)d=sp(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=np(a);f&&(b.uris=b.uris.map(function(g){return op(g,f)}))}}}
function rp(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}function tp(a){if(0===a.type)return up;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?lp:qp;if("audio"==b)return kp;if("text"==b)return"application/mp4"===a.mimeType?vp:wp}}
function xp(a,b){b=a.h.Fb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}function yp(a,b){b=a.h.Fb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}
function zp(a,b){var c=a.h.Rb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case qp:return a.videoBandwidth||NaN;case kp:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function np(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function sp(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=np(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function op(a,b){if(!b||a.includes("offline:"))return a;a=new yb(a);a.g.set("CMCD",b);return a.toString()}var mp="m",kp="a",qp="v",lp="av",up="i",wp="c",vp="tt",hp=2,cp="d",dp="ld",ep="h",fp="lh";T("shaka.util.CmcdManager.StreamingFormat",{DASH:cp,hk:dp,HLS:ep,ik:fp,wk:"s",OTHER:"o"});function Ap(a){this.h=a;this.g=null}r=Ap.prototype;r.configure=function(a){this.h=a};r.Ug=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Bp)?1E3*this.g.get(Bp):null};r.Sg=function(){return this.h.enabled&&this.g&&this.g.has(Cp)?1E3*this.g.get(Cp):null};r.Ci=function(){return this.h.enabled&&this.g&&this.g.has(Dp)?this.g.get(Dp):null};r.Di=function(){return this.h.enabled&&this.g&&this.g.has(Ep)?this.g.get(Ep):null};
r.getBandwidthEstimate=function(a){var b=this.Sg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Fp(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}T("shaka.util.CmsdManager",Ap);Ap.prototype.getBandwidthEstimate=Ap.prototype.getBandwidthEstimate;Ap.prototype.getRoundTripTime=Ap.prototype.Di;Ap.prototype.getResponseDelay=Ap.prototype.Ci;Ap.prototype.getEstimatedThroughput=Ap.prototype.Sg;
Ap.prototype.getMaxBitrate=Ap.prototype.Ug;var Cp="etp",Bp="mb",Dp="rd",Ep="rtt";function Gp(){this.g=null;this.h=[]}function Hp(a,b){return Q(function(c){if(1==c.g)return a.g?F(c,new Promise(function(d){return a.h.push(d)}),2):c.s(2);a.g=b;H(c)})}Gp.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b,c){b=void 0===b?null:b;dh.call(this);var d=this;this.m=Ip;this.h=null;this.ue=b;this.oa=!1;this.Qe=new lb;this.zd=new lb;this.l=new lb;this.Na=new lb;this.Sb=new lb;this.G=this.I=this.C=this.F=null;this.Te=0;this.$=new Gp;this.Z=this.Pb=this.T=this.i=this.Qb=this.H=this.j=this.xd=this.O=this.yg=this.fa=this.L=this.Ga=this.Aa=this.yd=this.M=this.pa=this.K=this.La=null;this.sa=!1;this.Fa=this.o=null;this.We=1E9;this.Oe=[];this.Ve=-1;this.g=Jp(this);this.Xe=Nn();this.P=null;this.Ue=-1;
this.Ma=null;this.ka={width:Infinity,height:Infinity};this.te=new Ki(this.g,this.ka,null);this.Ee=[];this.B=null;this.W=this.g.adaptationSetCriteriaFactory();this.W.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:this.g.preferredAudioChannelCount,Sc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Kc:this.g.preferredAudioLabel,fd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,
audioCodec:""});this.Tb=this.g.preferredTextLanguage;this.Hd=this.g.preferredTextRole;this.Fd=this.g.preferForcedSubs;this.Cd=[];c&&c(this);this.L=Kp(this);this.fa=new Ap(this.g.cmsd);this.F=Lp(this);this.F.kg(this.g.streaming.forceHTTP);this.F.lg(this.g.streaming.forceHTTPS);this.F.o=this.g.streaming.minBytesForProgressEvents;this.Ub=this.ea=this.A=null;this.Ze=!1;this.Ye=new ec(function(){return Q(function(e){if(1==e.g)return d.ea?F(e,d.Lb(d.Ub,!0),3):e.s(0);if(4!=e.g)return F(e,d.load(d.ea),4);
d.Ze?d.Ub.pause():d.Ub.play();d.ea=null;d.Ze=!1;H(e)})});Mp&&(this.A=Mp(),this.A.configure(this.g.ads),this.Sb.D(this.A,"ad-content-pause-requested",function(e){var f;return Q(function(g){if(1==g.g){d.Ye.stop();if(d.ea)return g.s(0);d.Ub=d.h;d.Ze=d.Uc();f=e.saveLivePosition||!1;return F(g,d.Lg(!0,f),3)}d.ea=g.h;H(g)})}),this.Sb.D(this.A,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.ea){var f=d.ea;f.B&&e&&(f.B+=e)}d.Ye.da(.1)}),this.Sb.D(this.A,"ad-content-attach-requested",function(){return Q(function(e){return d.h||
!d.Ub?e.s(0):F(e,d.Lb(d.Ub,!0),0)})}));this.Qe.D(window,"online",function(){Np(d);d.eg()});this.xe=new ec(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,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.xe.stop();f&&Op(d,!1,void 0,!1,!1)});this.ya=null;a&&(sb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Lb(a,
!0));this.u=null}qa(X,dh);function Pp(a){null!=a.O&&(kd(a.O),a.O.release(),a.O=null)}function Qp(a,b,c){c||b.lcevc.enabled?(Pp(a),null==a.O&&(a.O=new id(a.h,a.yg,b.lcevc,c),a.I&&(a.I.I=a.O))):Pp(a)}function Rp(a,b){return new V(a,b)}r=X.prototype;
r.destroy=function(){var a=this,b;return Q(function(c){switch(c.g){case 1:if(a.m==Sp)return c.return();Pp(a);b=a.detach();a.m=Sp;return F(c,b,2);case 2:return F(c,a.pf(),3);case 3:a.Qe&&(a.Qe.release(),a.Qe=null);a.zd&&(a.zd.release(),a.zd=null);a.l&&(a.l.release(),a.l=null);a.Na&&(a.Na.release(),a.Na=null);a.Sb&&(a.Sb.release(),a.Sb=null);a.Fa=null;a.g=null;a.B=null;a.ue=null;a.L=null;a.fa=null;if(!a.F){c.s(4);break}return F(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.o&&(a.o.release(),a.o=null),
dh.prototype.release.call(a),H(c)}})};function Tp(a,b){Up.set(a,b)}function Vp(a,b){a.dispatchEvent(Rp("onstatechange",(new Map).set("state",b)))}
r.Lb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return Q(function(g){switch(g.g){case 1:if(c.m==Sp)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.s(2);break}return F(g,c.detach(),2);case 2:return F(g,Wp(c,"attach"),4);case 4:if(g.h)return g.return();xa(g,5,6);d||(Vp(c,"attach"),e=function(){var h=Xp(c,!1);h&&Yp(c,h)},c.zd.D(a,"error",e),c.h=a,c.L&&c.L.setMediaElement(a));if(!b||!fc()||c.I){g.s(6);break}return F(g,Zp(c),6);case 6:Da(g);c.$.release();Ea(g,0);break;case 5:return f=Ba(g),
F(g,c.detach(),10);case 10:throw f;}})};r.Vh=function(a){this.yg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return Q(function(c){if(1==c.g){if(b.m==Sp)throw new U(2,7,7E3);return F(c,b.kc(!1,a),2)}if(3!=c.g)return F(c,Wp(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.zd.Qa(),b.h=null),Vp(b,"detach"),b.A&&!a&&b.A.release()}finally{b.$.release()}H(c)})};
function Wp(a,b){var c;return Q(function(d){return 1==d.g?(c=++a.Te,F(d,Hp(a.$,b),2)):c!=a.Te?(a.$.release(),d.return(!0)):d.return(!1)})}
r.kc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return Q(function(q){switch(q.g){case 1:return c.m!=Sp&&(c.m=Ip),F(q,Wp(c,"unload"),2);case 2:if(q.h)return q.return();za(q,3);c.sa=!1;Vp(c,"unload");Pp(c);d=c.Cd.map(function(u){return u()});c.Cd=[];return F(q,Promise.all(d),5);case 5:c.dispatchEvent(Rp("unloading"));c.yd&&(c.yd.release(),c.yd=null);c.Aa&&(c.Aa.release(),c.Aa=null);c.Ga&&(c.Ga.release(),c.Ga=null);c.h&&(c.l.Qa(),c.Na.Qa());c.xe.stop();c.La&&(c.La.release(),
c.La=null);c.pa&&(c.pa.stop(),c.pa=null);if(!c.H){q.s(6);break}return F(q,c.H.stop(),7);case 7:c.H=null,c.Qb=null;case 6:if(!c.o){q.s(8);break}return F(q,c.o.stop(),8);case 8:if(!c.j){q.s(10);break}return F(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.K&&(c.K.release(),c.K=null);c.G&&(c.G.release(),c.G=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.C){q.s(12);break}return F(q,c.C.destroy(),13);case 13:c.C=null;case 12:if(!c.I){q.s(14);break}return F(q,c.I.destroy(),15);case 15:c.I=null;case 14:if(c.A&&
!b)c.A.onAssetUnload();c.ea&&!b&&(c.ea.destroy(),c.ea=null);b||c.Ye.stop();c.L&&ap(c.L);c.fa&&(c.fa.g=null);if(!c.u){q.s(16);break}return F(q,c.u.destroy(),17);case 17:c.u=null;case 16:c.h&&(hk(c.h),c.h.src&&(c.h.removeAttribute("src"),c.h.load()));if(!c.C){q.s(18);break}return F(q,c.C.destroy(),19);case 19:c.C=null;case 18:c.ya&&c.T!=c.ya.Qc()&&(c.ya.u||c.ya.destroy(),c.ya=null);c.T=null;c.Pb=null;c.M=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),
k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(pg.clear(),cc.clear());c.i=null;c.B=new io;c.Se=null;c.Ma=null;c.P=null;c.Ue=-1;c.Oe=[];c.Ve=-1;c.F&&c.F.Hg();$p(c);case 3:Da(q);c.$.release();Ea(q,4);break;case 4:if(a&&fc()&&!c.I&&c.h)return F(q,Zp(c),0);q.s(0)}})};r.Kj=function(a){this.Z=a};
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,u,w,v;return Q(function(x){switch(x.g){case 1:if(d.m==Sp)throw new U(2,7,7E3);e=null;f="";if(a instanceof jo){if(a.u)throw new U(2,7,7006);e=a;f=e.Qc()||""}else f=a||"";return F(x,Hp(d.$,"load"),2);case 2:d.$.release();if(!d.h)throw new U(2,7,7002);if(!d.T){x.s(3);break}d.T=f;return F(x,d.kc(!1),3);case 3:g=++d.Te;h=function(){return Q(function(z){if(1==z.g)return d.Te==g?z.s(0):e?F(z,e.destroy(),3):z.s(3);throw new U(2,7,7E3);
})};k=function(z,D){return Q(function(B){switch(B.g){case 1:return za(B,2),F(B,Hp(d.$,D),4);case 4:return F(B,h(),5);case 5:return F(B,z(),6);case 6:return F(B,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Da(B),d.$.release(),Ea(B,0)}})};xa(x,5,6);null==b&&e&&(b=e.getStartTime());d.Z=b;d.sa=!1;d.dispatchEvent(Rp("loading"));if(e){c=e.Z;x.s(8);break}if(c){x.s(8);break}return F(x,k(function(){return Q(function(z){if(1==z.g)return F(z,aq(d,f),2);c=z.h;H(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){mo(e,d);
d.B=e.getStats();x.s(11);break}return F(x,bq(d,f,b,c,!0),12);case 12:(e=x.h)?(e.A=!1,mo(e,d),d.B=e.getStats(),e.start(),e.m.catch(function(){})):d.B=new io;case 11:m=!e;n=Date.now()/1E3;d.B=e?e.getStats():new io;d.T=f;d.Pb=c||null;d.Aa=new fm(function(){return d.Ra()});if(m)return F(x,k(function(){return Q(function(z){return F(z,cq(d,c),0)})},"initializeSrcEqualsDrmInner_"),23);d.Ga=new fm(function(){return d.Ra()});return F(x,k(function(){return Q(function(z){if(1==z.g)return F(z,Promise.race([e.oa,
e.m]),2);d.Qb=e.G;var D=e;D.pa=!0;d.H=D.l;d.i=e.Hf();H(z)})},"waitForFinish"),15);case 15:if(d.I){x.s(16);break}return F(x,k(function(){return Q(function(z){return F(z,Zp(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&&(d.u.enableTextDisplayer?d.u.enableTextDisplayer():sb("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),F(x,k(function(){return Q(function(z){return F(z,e.m,0)})},"waitForFinish"),18);
case 18:d.g=e.getConfiguration();d.te=e.F;d.H&&d.H.setMediaElement&&d.h&&d.H.setMediaElement(d.h);d.yd=oo(e);d.xd=e.Ga;if(p=e.o)d.W=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(dq(d),d.configure("manifest.disableVideo",!0));if(e.i){x.s(19);break}return F(x,k(function(){return Q(function(z){return F(z,to(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.C=po(e),F(x,k(function(){return Q(function(z){return F(z,d.C.Lb(d.h),0)})},"drmEngine_.attach"),21);case 21:return!(q=e.C)||d.Fa&&d.Fa==q||(d.o=no(e),d.Fa=
e.C,"function"!=typeof d.o.setMediaElement&&(sb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(sb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(sb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=
function(){})),u=qo(e),w=e.K,F(x,k(function(){return Q(function(z){return F(z,eq(d,n,w,u),0)})},"loadInner_"),22);case 22:lo(e);d.Pb&&rc()&&xf(d.Pb)&&Nk(d.I,d.T,d.Pb);x.s(14);break;case 23:return F(x,k(function(){return Q(function(z){return F(z,fq(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Rp("loaded"));case 6:Da(x);if(!e){x.s(25);break}return F(x,e.destroy(),25);case 25:d.ya=null;Ea(x,0);break;case 5:v=Ba(x);if(!v||7E3==v.code){x.s(27);break}return F(x,d.kc(!1),27);case 27:throw v;
}})};function dq(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})}r.Gj=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?F(e,gq(c),2):3!=e.g?(d=e.h,F(e,c.kc(a,b),3)):e.return(d)})};
r.Lg=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?F(e,gq(c,b),2):3!=e.g?(d=e.h,F(e,c.detach(a),3)):e.return(d)})};
function gq(a,b){b=void 0===b?!1:b;var c,d;return Q(function(e){if(1==e.g){c=null;if(!(a.i&&a.H&&a.Qb&&a.T))return e.s(2);d=a.h.currentTime;a.U()&&!b&&(d=null);return F(e,hq(a,a.T,d,a.Pb,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.Ee.push(c);a.H&&a.H.setMediaElement&&a.H.setMediaElement(null);var f=c,g=a.H,h=a.Qb;f.h=a.i;f.l=g;f.G=h;f=c;g=a.Fa;f.j=a.o;f.C=g;c.o=a.W;c.start();a.i=null;a.H=null;a.Qb=null;a.o=null;a.Fa=null}return e.return(c)})}
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return Q(function(f){if(1==f.g)return F(f,bq(d,a,b,c),2);(e=f.h)?e.start():Yp(d,new U(2,7,7005));return f.return(e)})};r.pf=function(){var a=this,b,c,d,e;return Q(function(f){b=[];c=t(a.Ee);for(d=c.next();!d.done;d=c.next())e=d.value,e.u||b.push(e.destroy());a.Ee=[];return F(f,Promise.all(b),0)})};
function bq(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return Q(function(l){if(1==l.g)return d?l.s(2):F(l,aq(a,b),3);2!=l.g&&(d=l.h);if(f=iq(a,d))return l.return(null);g=!1;h=!0;e&&(a.o&&a.Fa==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=hq(a,b,c,d||null,!e,g,h);k=e?k.then(function(m){m.A=!1;return m}):k.then(function(m){a.Ee.push(m);return m});return l.return(k)})}
function hq(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,q,u,w,v,x,z,D,B;return Q(function(I){if(1==I.g)return h=null,k=Nd(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.T&&h.u?null:h},m=function(){return l()?l().getConfiguration():a.g},Infinity!=a.ka.width||Infinity!=a.ka.height||a.g.ignoreHardwareResolution?I.s(2):F(I,Ec(),3);2!=I.g&&(n=I.h,a.ka.width=n.width,a.ka.height=n.height);p=new Ki(k,a.ka,null);q={networkingEngine:a.F,filter:function(C){var A,
E;return Q(function(G){if(1==G.g)return F(G,Li(p,C),2);if(4!=G.g){A=G.h;if(!A)return G.s(0);E=Rp("trackschanged");return F(G,Promise.resolve(),4)}h.dispatchEvent(E);H(G)})},makeTextStreamsForClosedCaptions:function(C){return jq(a,C)},onTimelineRegionAdded:function(C){gm(h.H,C)},onEvent:function(C){return h.dispatchEvent(C)},onError:function(C){return h.onError(C)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.j&&h.T&&a.j.updateDuration()},newDrmInfo:function(C){var A=
h.i,E=A?A.h:null;E&&A.A&&Oi(p,E.keySystem,C)},onManifestUpdated:function(){var C=(new Map).set("isLive",a.U());h.dispatchEvent(Rp("manifestupdated",C));ko(h,!1,function(){if(a.A)a.A.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(C,A,E,G){var M=C;if("com.apple.hls.interstitial"==C&&(M="com.apple.quicktime.HLS",C={startTime:A,endTime:E,values:G},a.A))a.A.onHLSInterstitialMetadata(a,a.h,C);G=t(G);C=G.next();for(var L={};!C.done;L={Zf:void 0},
C=G.next())L.Zf=C.value,"ID"!=L.Zf.name&&ko(h,!1,function(J){return function(){kq(a,A,E,M,J.Zf)}}(L))},disableStream:function(C){return a.disableStream(C,a.g.streaming.maxDisabledTime)},addFont:function(C,A){return a.addFont(C,A)}};u=new fm(function(){return a.Ra()});u.addEventListener("regionadd",function(C){var A=C.region;lq(a,"timelineregionadded",A,h);ko(h,!1,function(){a.A&&(a.A.onDashTimedMetadata(A),a.A.onDASHInterstitialMetadata(a,a.h,A))})});w=null;k.streaming.observeQualityChanges&&(w=new $l(function(){return a.Fb()}),
w.addEventListener("qualitychange",function(C){mq(a,C.quality,C.position)}),w.addEventListener("audiotrackchange",function(C){mq(a,C.quality,C.position,!0)}));v=!0;x={Xb:a.F,onError:function(C){return h.onError(C)},pe:function(C){ko(h,!0,function(){a:{var A=C,E=Rp("keystatuschanged");a.dispatchEvent(E);var G=Object.keys(A);1==G.length&&""==G[0]&&(G=["00"],A={"00":A[""]});E=1==G.length&&"00"==G[0];var M=!1;if(G.length){G=a.keySystem();for(var L=Ah(a.g.drm.clearKeys),J=t(a.i.variants),K=J.next();!K.done;K=
J.next()){K=K.value;var N=[];K.audio&&N.push(K.audio);K.video&&N.push(K.video);N=t(N);for(var P=N.next();!P.done;P=N.next()){var O=P.value;P=K.allowedByKeySystem;if(O.keyIds.size)if(O.drmInfos.length&&!L.size){O=t(O.drmInfos);for(var R=O.next();!R.done;R=O.next())if(R=R.value,R.keyIds.size&&R.keySystem==G){K.allowedByKeySystem=!0;R=t(R.keyIds);for(var S=R.next();!S.done;S=R.next())if(S=S.value,(S=A[E?"00":S])||a.C.F)K.allowedByKeySystem=K.allowedByKeySystem&&!!S&&!Qi.includes(S)}}else for(K.allowedByKeySystem=
!0,O=t(O.keyIds),R=O.next();!R.done;R=O.next())if(R=R.value,(R=A[E?"00":R])||a.C.F)K.allowedByKeySystem=K.allowedByKeySystem&&!!R&&!Qi.includes(R);P!=K.allowedByKeySystem&&(M=!0)}}}if(M&&(nq(a),!oq(a)))break a;(A=a.j.l)&&!A.allowedByKeySystem&&Op(a)}})},onExpirationUpdated:function(C,A){var E=Rp("expirationupdated");h.dispatchEvent(E);if((E=h.l)&&E.onExpirationUpdated)E.onExpirationUpdated(C,A)},onEvent:function(C){h.dispatchEvent(C);"drmsessionupdate"==C.type&&v&&(v=!1,C=Date.now()/1E3-h.ya,(a.B||
h.getStats()).j=C,a.O&&kd(a.O))}};z=Lp(a,l);kh(a.F,z);D=function(){return a.Lc(x)};B={config:k,$i:q,kj:u,jj:w,Lc:D,Zi:p,networkingEngine:z,Uh:e,Th:g};h=new jo(b,d,c,B);return I.return(h)})}function aq(a,b){var c,d;return Q(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,F(e,Do(b,a.F,c),2);d=e.h;"application/x-mpegurl"==d&&rc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
function iq(a,b){if(!fc())return!0;if(b){if(""==(a.h||hc()).canPlayType(b))return!1;if(!fc()||!Ti.has(b))return!0;if(xf(b))return rc()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if("application/dash+xml"===b||"video/vnd.mpeg.dash.mpd"===b)return a.g.streaming.preferNativeDash}return!1}
function pq(a){var b=a.g.textDisplayFactory;b!==a.Se&&(a.u=b(),a.u.configure?a.u.configure(a.g.textDisplayer):sb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Se=b,a.u.setTextVisibility(a.oa))}
function Zp(a){var b,c,d;return Q(function(e){if(1==e.g)return Vp(a,"media-source"),a.h.removeAttribute("src"),hk(a.h),pq(a),b=qq(a.h,a.u,{si:function(){return a.keySystem()},onMetadata:function(f,g,h){f=t(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&"number"==typeof k.cueTime&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=t(k.frames),p=n.next();!p.done;p=n.next())kq(a,l,m,"org.id3",p.value);if(a.A)a.A.onHlsTimedMetadata(k,l)}},ej:function(f){a.Ga&&gm(a.Ga,{schemeIdUri:f.schemeIdUri,
startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},gj:function(){a.H&&a.H.update&&a.H.update()}},a.O),b.configure(a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Ea=d,F(e,b.G,2);a.I=b;H(e)})}
function rq(a,b,c){function d(){return sq(a)}a.l.D(b,"playing",d);a.l.D(b,"pause",d);a.l.D(b,"ended",d);a.l.D(b,"ratechange",function(){var e=a.h.playbackRate;0!=e&&(a.K&&(a.K.set(e),a.m==tq&&a.o.playbackRateChanged(e),uq(a,e)),e=Rp("ratechange"),a.dispatchEvent(e))});b.remote&&(a.l.D(b.remote,"connect",function(){return nq(a)}),a.l.D(b.remote,"connecting",function(){return nq(a)}),a.l.D(b.remote,"disconnect",function(){return Q(function(e){if(1==e.g)return a.j&&"disconnected"==b.remote.state?F(e,
Sm(a.j),2):e.s(2);nq(a);H(e)})}));b.audioTracks&&(a.l.D(b.audioTracks,"addtrack",function(){return nq(a)}),a.l.D(b.audioTracks,"removetrack",function(){return nq(a)}),a.l.D(b.audioTracks,"change",function(){return nq(a)}));b.textTracks&&(a.l.D(b.textTracks,"addtrack",function(e){if(e.track)switch(e=e.track,e.kind){case "metadata":vq(a,e);break;case "chapters":wq(a,e);break;default:nq(a)}}),a.l.D(b.textTracks,"removetrack",function(){return nq(a)}),a.l.D(b.textTracks,"change",function(){return nq(a)}),
"keep"!==a.g.streaming.crossBoundaryStrategy&&(a.l.D(b,"waiting",function(){a.j&&Wm(a.j)}),a.l.D(b,"timeupdate",function(){a.j&&Wm(a.j)})));"none"!=b.preload&&a.l.ma(b,"loadedmetadata",function(){a.B.C=Date.now()/1E3-c})}
function eq(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K;return Q(function(N){switch(N.g){case 1:Vp(a,"load");e=a.h;a.K=new Wl({$d:function(){return e.playbackRate},sc:function(){return e.defaultPlaybackRate},mg:function(P){e.playbackRate=P},gh:function(P){e.currentTime+=P}});rq(a,e,b);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=ld(l));Qp(a,a.g,f);a.Tb=a.g.preferredTextLanguage;a.Hd=a.g.preferredTextRole;a.Fd=a.g.preferForcedSubs;
xq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(P,O,R){a.i&&a.j&&P!=a.j.l&&yq(a,P,!0,void 0===O?!1:O,void 0===R?0:R)});a.o.setMediaElement(e);a.o.setCmsdManager(a.fa);a.j=zq(a);a.j.configure(a.g.streaming);a.m=tq;a.dispatchEvent(Rp("streaming"));m=c;case 2:(p=a.j.l)||m||(m=oq(a)?a.o.chooseVariant():null);q=[];n=p||m;u=t([n.video,n.audio]);for(w=u.next();!w.done;w=u.next())(v=w.value)&&!v.segmentIndex&&(q.push(v.createSegmentIndex()),v.dependencyStream&&q.push(v.dependencyStream.createSegmentIndex()));
if(!(0<q.length)){N.s(4);break}return F(N,Promise.all(q),4);case 4:if(!n||0!=n.disabledUntilTime){N.s(2);break}if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?a.configure(a.Xe):bb("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.L&&(bp(a.L,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),
gp(a.L,1E3*b));xq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Hm(a.j,a.g.playRangeStart,a.g.playRangeEnd);x=function(P){a.G=Aq(a,P);a.La=Bq(a,P);Cq(a,e,!1)};a.g.streaming.startAtSegmentBoundary||(z=a.Z,null==z&&a.i.startTime&&(z=a.i.startTime),x(z));if(p){N.s(7);break}if(!a.g.streaming.startAtSegmentBoundary){N.s(8);break}D=a.i.presentationTimeline;B=a.Z||a.h.currentTime;null==a.Z&&a.i.startTime&&(B=a.i.startTime);I=D.Hb();C=D.ob();B<I?B=I:B>C&&(B=C);return F(N,Dq(m,B),9);case 9:A=
N.h,x(A);case 8:yq(a,m,!0,!1,0);case 7:return a.G.ready(),E=a.vc().find(function(P){return P.active}),E||((G=Ig(a.i.textStreams,a.Tb,a.Hd,a.Fd)[0]||null)&&ho(a.B.h,G,!0),m&&(G?(Lg(m.audio,G,a.g)&&(a.oa=!0),a.oa&&a.u.setTextVisibility(!0),Eq(a)):a.oa=!1),G&&(a.g.streaming.alwaysStreamText||a.Pf())&&(Qm(a.j,G),Fq(a))),F(N,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),Gq(a));nq(a);oq(a);a.i.variants.some(function(P){return P.primary});if((M=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 Hq(a)},a.l.D(e,"timeupdate",L);M||(J=function(){return Iq(a)},a.l.D(e,"timeupdate",J),Iq(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(K=function(){var P;return Q(function(O){if(1==O.g){P=a.Ra().end-a.h.currentTime;if(isNaN(P)||!(P<=a.g.streaming.preloadNextUrlWindow))return O.s(0);a.l.Ja(e,"timeupdate",K);return F(O,a.preload(a.i.nextUrl),4)}a.ya=O.h;H(O)})},a.l.D(e,"timeupdate",
K)),a.l.D(e,"ended",function(){a.load(a.ya||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(M);a.sa=!0;H(N)}})}
function cq(a,b){var c,d,e,f,g;return Q(function(h){return 1==h.g?(c=fd,d=Date.now()/1E3,e=!0,a.C=a.Lc({Xb:a.F,onError:function(k){Yp(a,k)},pe:function(){},onExpirationUpdated:function(){var k=Rp("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.B.j=Date.now()/1E3-d)}}),a.C.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?vf(b):"",codecs:b?wf(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.la,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},g.fullMimeTypes.add(lf(g.mimeType,g.codecs)),b.startsWith("audio/")?(g.type=c.V,f.audio=g):f.video=g,a.C.$=!0,F(h,Zh(a.C,[f],[]),2)):F(h,a.C.Lb(a.h),0)})}
function fq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u;return Q(function(w){switch(w.g){case 1:Vp(a,"src-equals");d=a.h;a.G=new Nl(d);e=!1;a.Cd.push(function(){e=!0});null!=a.Z&&a.G.af(a.Z);a.La=Jq(a,a.Z||0);a.K=new Wl({$d:function(){return d.playbackRate},sc:function(){return d.defaultPlaybackRate},mg:function(v){d.playbackRate=v},gh:function(v){d.currentTime+=v}});Cq(a,d,!0);d.textTracks&&(pq(a),f=function(){var v=Kq(a).find(function(x){return"disabled"!==x.mode});v&&(v.mode="showing");if(v=Lq(a))v.mode=
"hidden"},g=function(){var v=Kq(a).find(function(z){return"disabled"!==z.mode});v&&(v.mode="hidden");v=Lq(a);var x=a.u.isTextVisible();v&&x&&(v.mode="showing")},a.l.D(d,"enterpictureinpicture",function(){return f()}),a.l.D(d,"leavepictureinpicture",function(){return g()}),d.remote?(a.l.D(d.remote,"connect",function(){return g()}),a.l.D(d.remote,"connecting",function(){return g()}),a.l.D(d.remote,"disconnect",function(){return g()})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.l.D(d,"webkitcurrentplaybacktargetiswirelesschanged",
function(){return g()}),h=d,h.webkitSupportsFullscreen&&a.l.D(h,"webkitpresentationmodechanged",function(){"inline"!=h.webkitPresentationMode?f():g()}));rq(a,d,b);k=ip(a.L,a.T,c);!k.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(k+="#t=",0<a.g.playRangeStart&&(k+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(k+=","+a.g.playRangeEnd));if(!a.I){w.s(2);break}return F(w,a.I.destroy(),3);case 3:a.I=null;case 2:return hk(d),d.src=k,(lc()||nc())&&d.load(),"none"!=d.preload&&!d.autoplay&&
xf(c)&&rc()&&d.load(),a.m=Mq,a.dispatchEvent(Rp("streaming")),l=new Ug,El(d,HTMLMediaElement.HAVE_METADATA,a.l,function(){a.G.ready();l.resolve()}),m=function(){return new Promise(function(v){var x=new ec(v);a.l.D(d.textTracks,"change",function(){return x.da(.5)});x.da(.5)})},El(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var v,x,z,D,B;return Q(function(I){if(1==I.g)return F(I,m(),2);if(e)return I.return();Nq(a);v=Kq(a);v.some(function(C){return"showing"===C.mode})&&(a.oa=!0,a.u.setTextVisibility(!0));
v.length&&(a.u.enableTextDisplayer?a.u.enableTextDisplayer():sb("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!'));x=!1;z=t(v);for(D=z.next();!D.done;D=z.next())B=D.value,"disabled"!==B.mode&&(x?(B.mode="disabled",bb("Found more than one enabled text track, disabling it",B)):(Oq(a,B),x=!0));Pq(a);H(I)})}),d.error?l.reject(Xp(a)):"none"==d.preload&&(bb('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.l.ma(d,"error",function(){l.reject(Xp(a))}),F(w,Lf(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)p=function(){return Hq(a)},a.l.D(d,"timeupdate",p);n||(q=function(){return Iq(a)},a.l.D(d,"timeupdate",q),Iq(a));a.A&&(a.A.onManifestUpdated(n),n&&(u=a.Ra().end,a.l.D(d,"progress",function(){var v=a.Ra().end;u!=v&&(a.A.onManifestUpdated(a.U()),u=v)})));
a.sa=!0;H(w)}})}function Nq(a){var b=a.g.preferredAudioLanguage;""!=b&&a.sh(b,a.g.preferredVariantRole)}function Pq(a){var b=a.g.preferredTextLanguage;""!=b&&a.hg(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function vq(a,b){if("metadata"==b.kind){b.mode="hidden";a.l.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,kq(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={bc:void 0},f=e.next())g.bc=f.value,"com.apple.quicktime.HLS"==g.bc.type&&null!=g.bc.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.bc.startTime&&k.endTime==h.bc.endTime}}(g)),
f||(f={startTime:g.bc.startTime,endTime:g.bc.endTime,values:[]},d.push(f)),f.values.push(g.bc.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.A&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.A.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new ec(function(){var d=Qq(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).sb().da(.5);
a.Cd.push(function(){c.stop()})}}function Rq(a,b){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(Rp("metadata",b))}function kq(a,b,c,d,e){a.Aa&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),gm(a.Aa,b))}function wq(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new ec(function(){b.mode="hidden"})).sb().da(.5);a.Cd.push(function(){c.stop()})}}
r.oj=function(){for(var a=this.$;a.g;)a.release()};r.Lc=function(a){return new Sh(a)};
function Lp(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?ko(b(),!0,e):e()}b||(b=function(){return null});return new gh(function(e,f,g,h){var k=b()?b().j:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Rp("downloadheadersreceived",f));d(function(){if(a.fa){var h=a.fa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
Fp(n[1]))}}catch(v){}if(l=e["cmsd-dynamic"]){try{var p=new Map,q=l.split(";");for(l=1;l<q.length;l++){var u=q[l].split("=");p.set(u[0],Fp(u[1]))}var w=p}catch(v){w=null}w&&(h.g=w)}}}})},function(e,f){e=(new Map).set("request",e).set("response",f);c(Rp("downloadcompleted",e))},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Rp("downloadfailed",e))},function(e,f,g){d(function(){var h=a.L,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)pp(h,
f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=h.l?dp:cp;break a;case 3:case 2:l=h.l?fp:ep;break a;case 5:l="s";break a}l=void 0}h.i=l}pp(h,f,{ot:mp,su:!h.u})}}catch(N){cb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case rh:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=tp(k);var p=n.ot===qp||n.ot===kp||n.ot===lp||n.ot===vp,q=k.stream;if(q){var u=h.h.gb();if(p&&(n.bl=xp(h,
q.type),n.ot!==vp)){var w=yp(h,q.type);n.dl=u?w/Math.abs(u):w}q.bandwidth&&(n.br=q.bandwidth/1E3);if(q.segmentIndex&&m){var v=q.segmentIndex.Gb(m.endTime,!0,0>u);if(v){var x=v.next().value;if(x&&x!=m){if(!Ed(m.N(),x.N())){var z=x.N()[0],D=f.uris[0],B=new URL(z),I=new URL(D);if(B.origin!==I.origin)var C=z;else{for(var A=B.pathname.split("/").slice(1),E=I.pathname.split("/").slice(1,-1);A[0]===E[0];)A.shift(),E.shift();for(;E.length;)E.shift(),A.unshift("..");C=A.join("/")}n.nor=C}if((x.Sa||x.wa)&&
(m.Sa!=x.Sa||m.wa!=x.wa)){var G=x.Sa+"-";x.wa&&(G+=x.wa);n.nrr=G}}}var M=h.h.gb()||1,L=yp(h,q.type)||500,J=q.bandwidth;var K=J?J*(m.endTime-m.startTime)/1E3/(L/M/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(K)||(n.rtp=K)}}p&&n.ot!==vp&&(n.tb=zp(h,n.ot)/1E3);pp(h,f,n)}}catch(N){cb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:pp(h,f,{ot:"k"});break;case 4:pp(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().l:a.H)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=
f.data.byteLength;var g=b()?b().getStats():a.B;g&&(g.mc=isNaN(g.mc)?f:g.mc+f,0===e&&(g.bh=f))}})}function Aq(a,b){return new Ol(a.h,a.i,a.g.streaming,b,function(){a.La&&Zl(a.La,!0);a.j&&a.j.Fc();a.M&&Sq(a)},function(c){return a.dispatchEvent(c)})}
function Bq(a,b){var c=a.U()||0<b;b=new yo(a.yd,c);b.addEventListener("enter",function(f){lq(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){lq(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(lq(a,"timelineregionenter",g),lq(a,"timelineregionexit",g))});var d=new yo(a.Aa,c);d.addEventListener("enter",function(f){Rq(a,f.region)});c=new yo(a.Ga,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",f.region.emsg);
a.dispatchEvent(Rp("emsg",f))});var e=new Yl(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.xd&&e.g.add(a.xd);return e}function Jq(a,b){b=new yo(a.Aa,0<b);b.addEventListener("enter",function(d){Rq(a,d.region)});var c=new Yl(a.h);c.g.add(b);return c}
function Cq(a,b,c){a.M=new Hi;a.M.g=Ji;Tq(a);$p(a);a.pa=new ec(function(){Sq(a)});a.g.streaming.rebufferingGoal&&a.pa.ua(.25);a.l.D(b,"waiting",function(){return Sq(a)});a.l.D(b,"canplaythrough",function(){return Sq(a)});a.l.D(b,"playing",function(){return Sq(a)});a.l.D(b,"seeked",function(){return Sq(a)});c&&(a.l.D(b,"stalled",function(){return Sq(a)}),a.l.D(b,"progress",function(){return Sq(a)}),a.l.D(b,"timeupdate",function(){return Sq(a)}))}
function Tq(a){var b=a.g.streaming.rebufferingGoal;a.M.i.set(Ii,Math.min(.5,b/2)).set(Ji,b)}
function Sq(a){switch(a.m){case Mq:if(a.Uc())var b=!0;else{var c=Sj(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case tq:a:if(a.Uc()||Qk(a.I))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.cc();var d=Sj(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Uj(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f&&0<d?Ii:Ji;c.g=d;(b=b!=d)&&d===Ii&&(c.h=Date.now());b&&$p(a)}function qq(a,b,c,d){return new Jk(a,b,c,d)}
function Kp(a){return new Zo({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},Fb:function(){return a.Fb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},gb:function(){return a.gb()},xb:function(){return a.xb()},Rb:function(){return a.Rb()},U:function(){return a.U()},Zd:function(){return a.Zd()}},a.g.cmcd)}
function zq(a){return new Bm(a.i,{Rc:function(){return a.G?a.G.Od():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},gb:function(){return a.gb()},video:a.h,aa:a.I,Xb:a.F,onError:function(b){return Yp(a,b)},onEvent:function(b){return a.dispatchEvent(b)},qe:function(b,c,d){var e=b.startTime;b=b.endTime;c=c.type;if(c!=dd){if(a.G){a.G.ih();var f=Xk(a.I,c);!a.U()&&a.h.paused&&!a.h.seeking&&null!=f&&0<f&&a.G.Od()<f&&a.G.af(f)}Sq(a)}d=(new Map).set("start",e).set("end",b).set("contentType",
c).set("isMuxed",d);a.dispatchEvent(Rp("segmentappended",d))},fj:function(b,c){(c=c.Wc)&&a.xd&&bm(a.xd,c,b)},Fg:function(b,c){var d=a.C;if(d.g.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Qh(Qb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)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;hi(d,"cenc",c);d=d.m}}else d=Promise.resolve();return d},disableStream:function(b,
c){return a.disableStream(b,c)}})}
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=qn(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(sb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(sb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&(sb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&rc(),delete a.streaming.useNativeHlsOnSafari);if(a.streaming&&"boolean"==typeof a.streaming.liveSync){sb("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var c=a.streaming.liveSync;a.streaming.liveSync={};a.streaming.liveSync.enabled=
c}if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){c=a.streaming.liveSyncMinLatency||0;var d=Math.abs((a.streaming.liveSyncMaxLatency||1)-c)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=c+d;a.streaming.liveSync.targetLatencyTolerance=d}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(sb("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&&(sb("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&&(sb("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&&(sb("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&&(sb("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&&(sb("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&&(sb("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&&(sb("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){sb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var e=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return e};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(sb("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&&(sb("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(sb("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete a.manifest.dash.enableAudioGroups);a.streaming&&
"dispatchAllEmsgBoxes"in a.streaming&&(sb("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource.dispatchAllEmsgBoxes=a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in a.streaming&&(sb("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&&(sb("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&&(sb("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&&(sb("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&&(sb("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&&(sb("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){c=!1;for(var f in a.drm.advanced){var g=a.drm.advanced[f];d=g.videoRobustness;g=g.audioRobustness;"videoRobustness"in a.drm.advanced[f]&&!Array.isArray(a.drm.advanced[f].videoRobustness)&&
(a.drm.advanced[f].videoRobustness=[d],c=!0);"audioRobustness"in a.drm.advanced[f]&&!Array.isArray(a.drm.advanced[f].audioRobustness)&&(a.drm.advanced[f].audioRobustness=[g],c=!0)}c&&sb("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}a.streaming&&"crossBoundaryStrategy"in a.streaming&&"keep"!=a.streaming.crossBoundaryStrategy&&(a.streaming.inaccurateManifestTolerance=0);f=
On(this.g,a,Jp(this));Uq(this);return f};r.ci=function(a){this.Xe=a};
function Uq(a){a.te=new Ki(a.g,a.ka,a.C);if(a.H){var b=Nd(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.C&&a.C.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.m!=Sp&&Mi(a.te,a.i)&&nq(a)}catch(e){Yp(a,e)}a.o&&oq(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Op(a)}a.F&&(a.F.kg(a.g.streaming.forceHTTP),a.F.lg(a.g.streaming.forceHTTPS),a.F.o=a.g.streaming.minBytesForProgressEvents);a.I&&(a.I.configure(a.g.mediaSource),a.I.Ea=a.g.manifest.segmentRelativeVttTiming);
if(a.u)if(b=a.g.textDisplayFactory,a.Se!=b){var c=a.u;a.u=b();a.u.configure?a.u.configure(a.g.textDisplayer):sb("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.u.setTextLanguage||sb("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!');a.u.setTextVisibility(c.isTextVisible());c.destroy();if(a.I){c=a.I;var d=a.u;c.ea=d;c.h&&(c.h.j=d)}a.Se=b;a.j&&(b=a.j,(c=b.i.get(dd))&&Om(b,c.stream,!0,0,!0))}else a.u.configure&&a.u.configure(a.g.textDisplayer);
a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),Gq(a));a.M&&Tq(a);a.pa&&(a.g.streaming.rebufferingGoal?a.pa.ua(.25):a.pa.stop());a.i&&xq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.L&&a.L.configure(a.g.cmcd);a.fa&&a.fa.configure(a.g.cmsd)}r.getConfiguration=function(){var a=Jp(this);On(a,this.g,Jp(this));return a};r.ki=function(){return this.Xe};r.Vg=function(){var a=Jp(this);On(a,this.g,Jp(this));return sn(this.g,Jp(this))};
r.Qg=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.Ra().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};r.sj=function(){for(var a in this.g)delete this.g[a];On(this.g,Jp(this),Jp(this));Uq(this)};r.ti=function(){return this.m};r.Tg=function(){return this.i?this.i.type:null};r.xi=function(){return this.h};
r.xb=function(){return this.F};r.Qc=function(){return this.T};r.Pg=function(){return this.A?this.A:null};r.U=function(){return this.i&&!this.Pa()?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};r.yc=function(){return this.i?this.i.presentationTimeline.yc():!1};r.Qi=function(){if(this.i&&!this.Pa()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
r.Ra=function(){if(this.i&&!this.Pa()){if(!this.sa&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Hb(),end:a.ob()}}if(this.h&&this.h.src&&(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}};r.Ni=function(){this.U()&&(this.h.currentTime=this.Ra().end)};r.Ri=function(){return this.sa};
r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.C?this.C.h:null};r.pd=function(){return this.C?this.C.pd():Infinity};r.Gf=function(){return this.C?this.C.Gf():[]};r.Yd=function(){return this.C?this.C.Yd():{}};r.Of=function(){return this.M?this.M.g==Ji:!1};r.gb=function(){return this.h?this.K?this.K.i:1:0};
r.Md=function(a,b){b=void 0===b?!0:b;0==a?bb("A trick play rate of 0 is unsupported!"):(this.K.set(a),this.m==tq&&(this.o.playbackRateChanged(a),Nm(this.j,b&&1<Math.abs(a))),uq(this,a))};r.gd=function(){var a=this.K.sc();this.m==Mq&&this.K.set(a);this.m==tq&&(this.K.set(a),this.o.playbackRateChanged(a),Nm(this.j,!1));this.Na.Qa()};
r.Rb=function(){if(this.i&&!this.Pa()){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Gg(e)){var f=xg(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return Fg(g)}):[]};
r.vc=function(){if(this.i&&!this.Pa()){for(var a=this.j?this.j.u:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=yg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Kq(this).map(function(f){return Dg(f)}):[]};r.pi=function(){var a=this.Oe;this.i&&(a=this.i.imageStreams);return a.map(function(b){return zg(b)})};
r.fi=function(a){var b=this,c,d;return Q(function(e){if(1==e.g)return F(e,Vq(b,a),2);c=e.h;if(!c)return e.return(null);d=[];c.segmentIndex.Eb(function(f){var g=Wq(f.tilesLayout||c.tilesLayout);if(g){g=g.rows*g.oc;for(var h=f.j-f.startTime,k=0;k<g;k++){var l=Xq(c,f.startTime+h*k/g);l&&d.push(l)}}});c.closeSegmentIndex&&c.closeSegmentIndex();return e.return(d)})};function Wq(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{oc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
r.Hi=function(a,b){var c=this,d;return Q(function(e){return 1==e.g?F(e,Vq(c,a),2):(d=e.h)?e.return(Xq(d,b)):e.return(null)})};function Vq(a,b){var c,d;return Q(function(e){if(1==e.g){if(a.m!=tq&&a.m!=Mq)return e.return(null);c=a.Oe;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return e.return(null);null!=b&&(d=c.find(function(f){return f.id==b}));return d?d.segmentIndex?e.s(2):F(e,d.createSegmentIndex(),2):e.return(null)}return e.return(d)})}
function Xq(a,b){var c=a.segmentIndex.find(b);if(null==c)return null;c=a.segmentIndex.get(c);var d=Wq(c.tilesLayout||a.tilesLayout);if(!d)return null;var e=a.width||0,f=a.height||0,g=e/d.oc,h=f/d.rows,k=d.oc*d.rows,l=c.j-c.startTime;l=c.B||l/k;var m=c.startTime,n=0,p=0;1<k&&(b=Math.floor((b-c.startTime)/l),m=c.startTime+b*l,n=b%d.oc*g,p=Math.floor(b/d.oc)*h);b=!1;if(d=c.thumbnailSprite)b=!0,h=d.height,n=d.positionX,p=d.positionY,g=d.width;return{segment:c,imageHeight:f,imageWidth:e,height:h,positionX:n,
positionY:p,startTime:m,duration:l,uris:c.N(),width:g,sprite:b,mimeType:c.mimeType||a.mimeType,codecs:c.codecs||a.codecs}}
r.th=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.j.u&&(ho(c.B.h,d,!1),Qm(c.j,d),Yq(c),Fq(c),c.Tb=d.language)}var c=this;if(this.i&&this.G&&(b(),!this.Pa()))return;(function(){if(c.h&&c.h.textTracks){var d=Kq(c),e=d.find(function(f){return"disabled"!==f.mode});if(d=d.find(function(f){return Bg(f)===a.id}))e!==d&&(e&&(e.mode="disabled",c.l.Ja(e,"cuechange"),c.u.remove(0,Infinity)),d&&Oq(c,d)),Yq(c),Fq(c)}})()};
function Oq(a,b){a.l.D(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(Infinity===f.endTime||f.endTime<f.startTime)f=null;else{var g=new Ae(f.startTime,f.endTime,f.text);g.line="number"===typeof f.line?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
Fe:1;g.position="number"===typeof f.position?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;"lr"===f.vertical?g.writingMode="vertical-lr":"rl"===f.vertical&&(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=zd,g.region.width=f.region.width,g.region.widthUnits=zd);Me(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"}
r.Be=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&Gg(f)){var g=e.j.l;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)&&bb("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.Pa()?yq(e,f,!1,!1,0):yq(e,f,!1,b||!1,c||0);e.W.configure({language:f.language,
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,Sc: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:"",Kc:f.audio&&f.audio.label?f.audio.label:"",fd:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:""});oq(e)}}var e=this;b=void 0===b?!1:b;c=void 0===
c?0:c;if(this.i&&this.G&&(d(),!this.Pa()))return;(function(){if(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,Bg(g)==a.id){Zq(e,g);break}}})()};
r.xj=function(a,b){b=void 0===b?0:b;var c=this.Rb();if(c.length){var d=c.find(function(e){return e.active});d&&(c=c.find(function(e){return e.videoId===d.videoId&&e.language==a.language&&e.label==a.label&&e.audioMimeType==a.mimeType&&e.audioCodec==a.codecs&&e.primary==a.primary&&Ed(e.audioRoles,a.roles)&&e.accessibilityPurpose==a.accessibilityPurpose&&e.channelsCount==a.channelsCount&&e.audioSamplingRate==a.audioSamplingRate&&e.spatialAudio==a.spatialAudio}))&&!c.active&&this.Be(c,!0,b)}};
r.getAudioTracks=function(){var a=this.Rb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.m==tq&&(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&f.audioCodec}));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||null==d.audioId||(e=String(d.audioId));e&&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())};r.hi=function(){return $q(this.Rb())};r.Fi=function(){return $q(this.vc())};r.gi=function(){return Array.from(ar(this.Rb()))};r.Ei=function(){return Array.from(ar(this.vc()))};
r.sh=function(a,b,c,d,e,f,g){function h(){function l(u,w){return u.video||w.video?u.video&&w.video?Math.abs((u.video.height||0)-(w.video.height||0))+Math.abs((u.video.width||0)-(w.video.width||0)):Infinity:0}k.W=k.g.adaptationSetCriteriaFactory();k.W.configure({language:a,role:b||"",channelCount:c||0,Sc:"",spatialAudio:f||!1,videoLayout:"",Kc:g||"",fd:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,audioCodec:e||""});var m=k.j.l,n=k.W.create(k.i.variants),p=null;n=t(n.values());for(var q=
n.next();!q.done;q=n.next())q=q.value,Gg(q)&&(!p||l(p,m)>l(q,m))&&(p=q);p!=m&&(p?(m=xg(p),k.Be(m,!0,d||0)):Op(k))}var k=this;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;f=void 0===f?!1:f;g=void 0===g?"":g;if(this.i&&this.G&&(h(),!this.Pa()))return;(function(){if(k.h&&k.h.audioTracks){var l=Ig(k.Rb(),a,b||"",!1)[0];l&&k.Be(l)}})()};
r.hg=function(a,b,c){function d(){e.Tb=a;e.Hd=b||"";e.Fd=c||!1;var f=Ig(e.i.textStreams,e.Tb,e.Hd,e.Fd)[0]||null;f&&f!=e.j.u&&(ho(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.Pf())&&(Qm(e.j,f),Yq(e),Fq(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.G&&(d(),!this.Pa()))return;(function(){var f=Ig(e.vc(),a,b||"",c||!1)[0];f&&e.th(f)})()};
r.yj=function(a,b,c){function d(){for(var f=null,g=t(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}null!=f&&(e.W=e.g.adaptationSetCriteriaFactory(),e.W.configure({language:f.language,role:"",channelCount:0,Sc:"",spatialAudio:!1,videoLayout:"",fd:"",Kc:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),Op(e,b,c))}var e=this;b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.G&&(d(),!this.Pa()))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&&Zq(e,g)}})()};r.Pf=function(){var a=this.oa;return this.u?this.u.isTextVisible():a};r.Rg=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?br(this).map(function(a){return Dg(a)}):[]};
r.ji=function(a){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var b=Of(a),c=br(this).filter(function(h){return Of(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
function Kq(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Lq(a){return Array.from(a.h.textTracks).find(function(b){return"Shaka Player TextTrack"==b.label})}function Qq(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function br(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
r.zh=function(a){a=!!a;this.oa!=a&&(this.oa=a,this.m==tq?(this.u.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=Ig(this.i.textStreams,this.Tb,this.Hd,this.Fd),0<a.length&&(Qm(this.j,a[0]),Yq(this),Fq(this))):Mm(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(a),Eq(this))};
r.yi=function(){if(this.G)var a=this.G.Od();else{if(null==this.Z)return new Date;a=this.Z}if(this.i&&!this.Pa()){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.Wg=function(){if(this.i&&!this.Pa()){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
r.ae=function(){return this.U()?this.i?this.i.presentationTimeline.ae():null:null};r.Fb=function(){if(this.m==tq)return this.I.Fb();var a={total:[],audio:[],video:[],text:[]};this.m==Mq&&(a.total=Vj(this.h.buffered));return a};r.Zd=function(){if(!this.h||!this.h.currentTime)return null;var a=this.Wg().getTime()+1E3*this.h.currentTime;return Math.floor(Date.now()-a)};
r.getStats=function(){if(this.m!=tq&&this.m!=Mq)return{width:NaN,height:NaN,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:[]};sq(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.U()){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.B.P=this.G.zg(),this.B.T=this.G.Ag());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.O=Number(c.droppedVideoFrames);b.M=d;this.B.L=Number(c.corruptedVideoFrames)}this.C?(c=this.C,c=c.H?c.H:NaN):c=NaN;this.B.o=c;if(this.m==tq){c=this.j.l;b=this.j.u;if(c){d=this.K?this.K.i:1;
var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.B.A=e}c&&c.video&&(b=this.B,d=c.video.height||NaN,b.m=c.video.width||NaN,b.l=d);this.U()&&(c=this.Zd()||0,this.B.B=c/1E3);this.i&&(this.B.G=this.i.periodCount,this.B.F=this.i.gapCount,this.i.presentationTimeline&&(this.B.I=this.i.presentationTimeline.h));c=this.o.getBandwidthEstimate();this.B.u=c}this.m==Mq&&(c=this.B,c.mc=isNaN(c.mc)?NaN:c.mc+NaN,c=this.B,b=a.videoHeight||NaN,c.m=a.videoWidth||NaN,c.l=b);var f=this.B;a=f.m;c=f.l;b=f.A;d=
f.M;e=f.O;var g=f.L,h=f.T,k=f.P,l=f.u,m=f.i,n=f.C,p=f.H,q=f.j,u=Qn(f.g,"playing"),w=Qn(f.g,"paused"),v=Qn(f.g,"buffering"),x=f.o,z=f.B,D=f.I,B=f.bh,I=f.mc,C=f.K,A=f.G,E=f.F,G=Rn(f.g),M=[];f=t(f.h.g);for(var L=f.next();!L.done;L=f.next())L=L.value,M.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,
loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:u,pauseTime:w,bufferingTime:v,licenseTime:x,liveLatency:z,maxSegmentDuration:D,manifestSizeBytes:B,bytesDownloaded:I,nonFatalErrorCount:C,manifestPeriodCount:A,manifestGapCount:E,stateHistory:G,switchHistory:M}};
r.Rh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,u,w,v,x,z,D,B;return Q(function(I){switch(I.g){case 1:if(h.m!=tq&&h.m!=Mq)throw new U(1,7,7004);"subtitles"!=c&&"captions"!=c&&bb("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){I.s(2);break}return F(I,cr(h,a),3);case 3:d=I.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.m!=Mq){I.s(4);break}g&&(c="forced");return F(I,dr(h,a,b,c,d,f||"",k),5);case 5:l=Of(b);m=h.vc();if(n=m.find(function(C){return Of(C.language)==
l&&C.label==(f||"")&&C.kind==c}))return nq(h),I.return(n);throw new U(1,2,2012);case 4:p=fd;q=h.Ra();u=q.end-q.start;h.i&&(u=h.i.presentationTimeline.getDuration());if(Infinity==u)throw new U(1,4,4033);if(!k.length){I.s(6);break}return F(I,er(h,a,h.F,h.g.streaming.retryParameters),7);case 7:w=I.h,v=fr(h,w,d,k),x=new Blob([v],{type:"text/vtt"}),a=Mk(x),d="text/vtt";case 6:z={id:h.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ul(0,u,[a]),mimeType:d||
"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.za,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([lf(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};D=lf(z.mimeType,z.codecs);B=Cf(D);if(!B)throw new U(2,2,2014,d);h.i.textStreams.push(z);
nq(h);return I.return(yg(z))}})};
r.Sh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B;return Q(function(I){switch(I.g){case 1:if(c.m!=tq&&c.m!=Mq)throw new U(1,7,7004);if(b){I.s(2);break}return F(I,cr(c,a),3);case 3:b=I.h;case 2:if("text/vtt"!=b)throw new U(1,2,2017,a);d=fd;e=c.Ra();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(Infinity==f)throw new U(1,4,4045);return F(I,er(c,a,c.F,c.g.streaming.retryParameters),4);case 4:g=I.h;h=Bf(b);if(!h)throw new U(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,
segmentEnd:f,vttOffset:0};m=Qb(g);n=k.parseMedia(m,l,a,[]);p=[];q=t(n);u=q.next();for(w={};!u.done;w={Ne:void 0,Mc:void 0},u=q.next())w.Mc=u.value,w.Ne=null,v=function(C){return function(){null==C.Ne&&(C.Ne=Xc([a],[C.Mc.payload]));return C.Ne||[]}}(w),x=new Nj(w.Mc.startTime,w.Mc.endTime,v,0,null,null,0,0,Infinity),w.Mc.payload.includes("#xywh")&&(z=w.Mc.payload.split("#xywh=")[1].split(","),4===z.length&&x.De({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],
10)})),p.push(x);D=b;if(!p.length){I.s(5);break}return F(I,Do(p[0].N()[0],c.F,c.g.manifest.retryParameters),6);case 6:D=I.h;case 5:return B={id:c.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Sl(p),mimeType:D||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.$e,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([lf(D||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.m==Mq?c.Oe.push(B):c.i.imageStreams.push(B),nq(c),I.return(zg(B))}})};
r.Qh=function(a,b,c){var d=this,e,f,g,h;return Q(function(k){switch(k.g){case 1:if(d.m!=tq&&d.m!=Mq)throw new U(1,7,7004);if(c){k.s(2);break}return F(k,cr(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),F(k,dr(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Rg();h=g.find(function(l){return l.language==b});if(!h){k.s(5);break}return F(k,new Promise(function(l,m){d.l.ma(f,"load",l);d.l.ma(f,"error",function(){m(new U(1,2,2015))})}),6);case 6:return nq(d),k.return(h);case 5:throw new U(1,
2,2012);}})};function cr(a,b){var c;return Q(function(d){switch(d.g){case 1:return xa(d,2),F(d,Do(b,a.F,a.g.streaming.retryParameters),4);case 4:c=d.h;Aa(d,3);break;case 2:Ba(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}
function dr(a,b,c,d,e,f,g){var h,k,l,m;return Q(function(n){if(1==n.g)return"text/vtt"!=e||g.length?F(n,er(a,b,a.F,a.g.streaming.retryParameters),3):n.s(2);2!=n.g&&(h=n.h,k=fr(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Mk(l),e="text/vtt");m=document.createElement("track");var p=a.L,q=b;try{if(p.g.enabled){var u=jp(p);u.ot=wp;u.su=!0;var w=np(u);var v=op(q,w)}else v=q}catch(x){cb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),v=q}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function er(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){e=rh;f=lh([b],d);f.method="GET";var k=a.L;try{k.g.enabled&&pp(k,f,{ot:wp,su:!0})}catch(l){cb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return F(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
function fr(a,b,c,d){var e=Bf(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Qb(b),b=c.parseMedia(b,a,null,[]),Yo(b,d);throw new U(2,2,2014,c);}r.Dj=function(a,b){this.ka.width=a;this.ka.height=b};r.eg=function(a){if(this.m==tq){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.B)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.sd||d.Da||d.kb||(d.sd=!1,Lm(b,d,a));b=!0}}else b=!1;return b};
r.Hf=function(){bb("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};r.ui=function(){return this.Qb};
r.ni=function(){var a={video:null,audio:null,text:null};if(this.m!=tq)return a;var b=this.j.l,c=this.h.currentTime;b=t([b.video,b.audio,this.j.u]);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};"video"==d.type?(e.width=d.width,e.height=d.height,a.video=e):"audio"==d.type?a.audio=e:d.type==dd&&(a.text=e)}return a};
function Jp(a){var b=Jn();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.eg(d))}};b.textDisplayFactory=function(){return!a.ue||rc()&&!document.fullscreenEnabled?"addTextTrack"in a.h?new Ko(a.h,"Shaka Player TextTrack"):new No:new Oo(a.h,a.ue)};return b}r.Ch=function(a){this.ue=a};
function jq(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Vl,l=e.closedCaptions.get(g);h={id:a.We++,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:dd,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([lf(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
b.textStreams.push(h);c.add(g)}}
function Dq(a,b){var c,d,e,f,g;return Q(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return Q(function(q){if(1==q.g)return k?k.segmentIndex?q.s(2):F(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.Gb(l))?m.next().value:null;if(!n)return q.return(null);p=n.startTime;return q.return(p)})},F(h,e(c,b),2);if(3!=h.g)return f=h.h,F(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
function $p(a){var b=a.Of();if(a.B&&a.M&&a.G){if(0==a.g.streaming.rebufferingGoal){var c=a.K;c.j=!1;Xl(c)}else c=a.K,c.j=b,Xl(c);a.L&&(c=a.L,b||c.u||(c.u=!0),c.u&&b&&(c.B=!0),c.F=b);sq(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Ue<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.P&&(a.P=Math.min(a.P+
++a.Ue*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(Rp("buffering",b))}function uq(a,b){a.Na.Qa();a.Na.D(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.Ra(),e=a.U()?a.g.streaming.safeSeekOffset:0;0<b?Math.floor(c)>=Math.floor(d.end)&&a.gd():Math.floor(c)<=Math.floor(d.start+e)&&a.gd()})}
function sq(a){if(a.B&&a.M){var b=a.B.g,c="playing";a.M.g==Ji?c="buffering":a.Uc()?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Rp("statechanged",c)))}}
function Hq(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Qg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Md(d,!1):1==e&&b!==a.K.sc()&&a.gd()}if(c&&(c=a.Ra(),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,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?
k=Math.max(0,a.i.serviceDescription.targetLatency-d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.P||"number"!==typeof g||(a.P=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Ma&&null!==a.P&&"number"===typeof g&&a.Ue<n&&Date.now()-a.Ma>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
a.P=Math.max(a.P-(g-f)/2,f+d),a.Ma=Date.now());e&&null!==a.P&&(h=a.P+d,k=a.P-d);g=c.end-a.h.currentTime;d=0;a.m==Mq&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.M.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Md(m,!1):void 0!=h&&l&&g-d>h?(b!=l&&a.Md(l,!1),a.Ma=null):void 0!=k&&m&&g-d<k?(b!=m&&a.Md(m,!1),a.Ma=null):b!==a.K.sc()&&(a.gd(),a.Ma=Date.now())}}
function Iq(a){if(a.h){var b=function(e,f){var g=void 0===g?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.Ve<e?(a.Ve=e,!0):!1},c=a.Ra();c=c.end-c.start;c=0<c?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=Rp("started");else b(25,c)?d=Rp("firstquartile"):b(50,c)?d=Rp("midpoint"):b(75,c)?d=Rp("thirdquartile"):(b(100,c)&&(d=Rp("complete")),a.g&&Infinity!=a.g.playRangeEnd&&a.Uc()&&a.h.pause());d&&a.dispatchEvent(d)}}}
function oq(a){try{Pi(a.te,a.i)}catch(c){return Yp(a,c),!1}var b=Hg(a.i.variants);b=a.W.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Op(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=oq(a)?a.o.chooseVariant():null)&&yq(a,f,e,b,c,d)}
function yq(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.l;if(b==g)d&&Pm(a.j,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}));Pm(a.j,b,d,e,f,c);d=null;g&&(d=xg(g));g=xg(b);g.active=!0;if(a.O&&(e=a.O,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.Tg()){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=Rp("adaptation",c),gr(a,c)):hr(a,d,g);ir(a,d,g)}}function Zq(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=Fg(c),b=Fg(b),hr(a,c,b),ir(a,c,b))}function nq(a){var b=Rp("trackschanged");gr(a,b);jr(a)}function hr(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Rp("variantchanged",b);gr(a,b)}
function ir(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&jr(a)}function jr(a){var b=Rp("audiotrackschanged");gr(a,b)}function Yq(a){var b=Rp("textchanged");gr(a,b)}function Eq(a){var b=Rp("texttrackvisibility");gr(a,b)}function Gq(a){a.g.abr.enabled||Np(a);var b=(new Map).set("newStatus",a.g.abr.enabled);gr(a,Rp("abrstatuschanged",b))}function Fq(a){var b=a.vc().find(function(c){return c.active});b&&a.u&&a.u.setTextLanguage&&a.u.setTextLanguage(b.language)}
function Np(a,b){b=void 0===b?!0:b;if(a.m==tq){a.xe.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&oq(a)}}
r.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===Sp||!navigator.onLine||0==b||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?"audio"==a.type?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.xe.ua(1);b=this.Fb().video.reduce(function(h,
k){return h+k.end-k.start},0);Op(this,!1,b,!0,!1);return!0}return!1};
function Yp(a,b){var c,d,e,f;return Q(function(g){switch(g.g){case 1:if(a.m==Sp)return g.return();1===b.severity&&a.B.K++;c=!0;if(!(a.sa&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){g.s(2);break}if(rc()&&3016==b.code)return g.return();xa(g,3);return F(g,Sm(a.j),5);case 5:d=g.h;c=!d;d&&(e=Rp("mediasourcerecovered"),a.dispatchEvent(e));Aa(g,2);break;case 3:Ba(g),c=!0;case 2:if(!c)return g.return();2===b.severity&&Np(a,!1);f=Rp("error",(new Map).set("detail",b));a.dispatchEvent(f);
f.defaultPrevented&&(b.handled=!0);H(g)}})}
r.addFont=function(a,b){var c,d,e,f,g;return Q(function(h){if(1==h.g)return"fonts"in document&&"FontFace"in window?F(h,document.fonts.ready,3):h.s(0);if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();!1===m.done;)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&&"swap"==f.display)return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);H(h)})};
function lq(a,b,c,d){d=void 0===d?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(Rp(b,a))}
function mq(a,b,c,d){d=void 0===d?!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(Rp(d?"audiotrackchanged":"mediaqualitychanged",b))}
function Xp(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new U(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new U(2,3,3016,c,b,a.h.error.message)}function xq(a,b,c){0<b&&(a.U()||a.Bh(b));b=a.getDuration();c<b&&(a.U()||a.bb(c))}function gr(a,b){Q(function(c){if(1==c.g)return F(c,Promise.resolve(),2);a.m!=Sp&&a.dispatchEvent(b);H(c)})}
function ar(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(Of(c.language)):b.add("und");return b}
function $q(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Of(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
h.push({language:l,role:m,label:n})}});return h}r.Pa=function(){return this.h&&this.h.remote?"disconnected"!=this.h.remote.state:!1};r.Uc=function(){return!this.h||this.h.ended?!0:this.sa&&!this.U()&&this.h.currentTime>=this.Ra().end};T("shaka.Player",X);X.prototype.isEnded=X.prototype.Uc;X.prototype.isRemotePlayback=X.prototype.Pa;X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.Ch;X.prototype.getFetchedPlaybackInfo=X.prototype.ni;
X.prototype.getManifestParserFactory=X.prototype.ui;X.prototype.getManifest=X.prototype.Hf;X.prototype.retryStreaming=X.prototype.eg;X.prototype.setMaxHardwareResolution=X.prototype.Dj;X.prototype.addChaptersTrack=X.prototype.Qh;X.prototype.addThumbnailsTrack=X.prototype.Sh;X.prototype.addTextTrackAsync=X.prototype.Rh;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.Fb;X.prototype.getSegmentAvailabilityDuration=X.prototype.ae;
X.prototype.getPresentationStartTimeAsDate=X.prototype.Wg;X.prototype.getPlayheadTimeAsDate=X.prototype.yi;X.prototype.setTextTrackVisibility=X.prototype.zh;X.prototype.getChapters=X.prototype.ji;X.prototype.getChaptersTracks=X.prototype.Rg;X.prototype.isTextTrackVisible=X.prototype.Pf;X.prototype.selectVariantsByLabel=X.prototype.yj;X.prototype.selectTextLanguage=X.prototype.hg;X.prototype.selectAudioLanguage=X.prototype.sh;X.prototype.getTextLanguages=X.prototype.Ei;
X.prototype.getAudioLanguages=X.prototype.gi;X.prototype.getTextLanguagesAndRoles=X.prototype.Fi;X.prototype.getAudioLanguagesAndRoles=X.prototype.hi;X.prototype.getAudioTracks=X.prototype.getAudioTracks;X.prototype.selectAudioTrack=X.prototype.xj;X.prototype.selectVariantTrack=X.prototype.Be;X.prototype.selectTextTrack=X.prototype.th;X.prototype.getThumbnails=X.prototype.Hi;X.prototype.getAllThumbnails=X.prototype.fi;X.prototype.getImageTracks=X.prototype.pi;X.prototype.getTextTracks=X.prototype.vc;
X.prototype.getVariantTracks=X.prototype.Rb;X.prototype.cancelTrickPlay=X.prototype.gd;X.prototype.trickPlay=X.prototype.Md;X.prototype.getPlaybackRate=X.prototype.gb;X.prototype.isBuffering=X.prototype.Of;X.prototype.getKeyStatuses=X.prototype.Yd;X.prototype.getActiveSessionsMetadata=X.prototype.Gf;X.prototype.getExpiration=X.prototype.pd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.Ri;X.prototype.goToLive=X.prototype.Ni;
X.prototype.seekRange=X.prototype.Ra;X.prototype.isAudioOnly=X.prototype.Qi;X.prototype.isInProgress=X.prototype.yc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.Pg;X.prototype.getAssetUri=X.prototype.Qc;X.prototype.getNetworkingEngine=X.prototype.xb;X.prototype.getMediaElement=X.prototype.xi;X.prototype.getManifestType=X.prototype.Tg;X.prototype.getLoadMode=X.prototype.ti;X.prototype.resetConfiguration=X.prototype.sj;X.prototype.getBufferFullness=X.prototype.Qg;
X.prototype.getNonDefaultConfiguration=X.prototype.Vg;X.prototype.getConfigurationForLowLatency=X.prototype.ki;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configurationForLowLatency=X.prototype.ci;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.oj;X.prototype.destroyAllPreloads=X.prototype.pf;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Lg;X.prototype.unloadAndSavePreload=X.prototype.Gj;
X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Kj;X.prototype.unload=X.prototype.kc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Vh;X.prototype.attach=X.prototype.Lb;
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return Q(function(h){switch(h.g){case 1:b={};if(!a){h.s(2);break}return F(h,Bi(),3);case 3:b=h.h;case 2:return c=Ui(),d=Pk(),F(h,Ec(),4);case 4:return e=h.h,f={manifest:c,media:d,drm:b,hardwareResolution:e},g=Up,g.forEach(function(k,l){f[l]=k()}),h.return(f)}})};
X.isBrowserSupported=function(){window.Promise||bb("A Promise implementation or polyfill is required");return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&!kc("Trident/")?fc()?!0:gc("application/x-mpegurl"):!1};X.setAdManagerFactory=function(a){Mp=a};X.registerSupportPlugin=Tp;X.prototype.destroy=X.prototype.destroy;var Sp=0,Ip=1,tq=2,Mq=3;X.LoadMode={DESTROYED:Sp,NOT_LOADED:Ip,MEDIA_SOURCE:tq,SRC_EQUALS:Mq};X.version="v4.14.9";var kr=["4","14"];
tb=new function(a){this.g=a;this.i=vb;this.h=wb}(new rb(Number(kr[0]),Number(kr[1])));var Up=new Map,Mp=null;function lr(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function mr(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function nr(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new lb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=nr.prototype;r.needsSkipUI=function(){return!1};r.isClientRendering=function(){return!0};r.hasCustomClick=function(){return!0};r.isUsingAnotherMediaElement=function(){return!0};r.getDuration=function(){return this.g.getDuration()};
r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};
r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};
r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};
r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};
r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};T("shaka.ads.ClientSideAd",nr);nr.prototype.release=nr.prototype.release;nr.prototype.getPodIndex=nr.prototype.getPodIndex;nr.prototype.getTimeOffset=nr.prototype.getTimeOffset;nr.prototype.getMediaUrl=nr.prototype.getMediaUrl;nr.prototype.getAdvertiserName=nr.prototype.getAdvertiserName;nr.prototype.getCreativeAdId=nr.prototype.getCreativeAdId;nr.prototype.getAdId=nr.prototype.getAdId;
nr.prototype.getVastMediaWidth=nr.prototype.getVastMediaWidth;nr.prototype.getVastMediaHeight=nr.prototype.getVastMediaHeight;nr.prototype.getVastMediaBitrate=nr.prototype.getVastMediaBitrate;nr.prototype.getDescription=nr.prototype.getDescription;nr.prototype.getTitle=nr.prototype.getTitle;nr.prototype.getPositionInSequence=nr.prototype.getPositionInSequence;nr.prototype.getSequenceLength=nr.prototype.getSequenceLength;nr.prototype.setMuted=nr.prototype.setMuted;nr.prototype.resize=nr.prototype.resize;
nr.prototype.isLinear=nr.prototype.isLinear;nr.prototype.isMuted=nr.prototype.isMuted;nr.prototype.setVolume=nr.prototype.setVolume;nr.prototype.getVolume=nr.prototype.getVolume;nr.prototype.play=nr.prototype.play;nr.prototype.pause=nr.prototype.pause;nr.prototype.skip=nr.prototype.skip;nr.prototype.canSkipNow=nr.prototype.canSkipNow;nr.prototype.getTimeUntilSkippable=nr.prototype.getTimeUntilSkippable;nr.prototype.isSkippable=nr.prototype.isSkippable;nr.prototype.isPaused=nr.prototype.isPaused;
nr.prototype.getRemainingTime=nr.prototype.getRemainingTime;nr.prototype.getMinSuggestedDuration=nr.prototype.getMinSuggestedDuration;nr.prototype.getDuration=nr.prototype.getDuration;nr.prototype.isUsingAnotherMediaElement=nr.prototype.isUsingAnotherMediaElement;nr.prototype.hasCustomClick=nr.prototype.hasCustomClick;nr.prototype.isClientRendering=nr.prototype.isClientRendering;nr.prototype.needsSkipUI=nr.prototype.needsSkipUI;function or(){}
function pr(a,b){var c=[];a=t(Yd(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=be(d.value,"InLine"))if(d=be(d,"Creatives")){d=t(Yd(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=be(e,"Linear");f&&qr(c,b,f);if(e=be(e,"NonLinearAds")){e=Yd(e,"NonLinear");e=t(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=be(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=be(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=$d(l)){"text/html"===g&&(l="data:text/html;charset=UTF-8,"+
encodeURIComponent(l));var m=he(k,"width",ne)||he(k,"expandedWidth",ne),n=he(k,"height",ne)||he(k,"expandedHeight",ne);if(m||n){var p=null;(k=k.attributes.minSuggestedDuration)&&(p=Md(k));k=0;null!=h&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:p,once:!0,pre:null==h,post:Infinity==h,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}},displayOnBackground:!1,
currentVideo:null,background:null})}}}}}}return c}
function qr(a,b,c){var d=0;null!=b&&(d=b);var e=null;c.attributes.skipoffset&&(e=Md(c.attributes.skipoffset),isNaN(e)&&(e=null));if(c=be(c,"MediaFiles")){var f=Yd(c,"MediaFile");c=f;f=f.filter(function(h){return"streaming"==h.attributes.delivery});f.length&&(c=f);c=c.sort(function(h,k){return(parseInt(k.attributes.height,10)||0)-(parseInt(h.attributes.height,10)||0)});c=t(c);for(f=c.next();!f.done;f=c.next())if(f=f.value,!f.attributes.apiFramework){var g=$d(f);if(g){a.push({id:null,groupId:null,startTime:d,
endTime:null,uri:g,mimeType:f.attributes.type||null,isSkippable:null!=e,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}T("shaka.ads.Utils",or);or.ADS_LOADED="ads-loaded";or.AD_STARTED="ad-started";or.AD_FIRST_QUARTILE="ad-first-quartile";or.AD_MIDPOINT="ad-midpoint";or.AD_THIRD_QUARTILE="ad-third-quartile";or.AD_COMPLETE="ad-complete";
or.AD_STOPPED="ad-stopped";or.AD_SKIPPED="ad-skipped";or.AD_VOLUME_CHANGED="ad-volume-changed";or.AD_MUTED="ad-muted";or.AD_PAUSED="ad-paused";or.AD_RESUMED="ad-resumed";or.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";or.CUEPOINTS_CHANGED="ad-cue-points-changed";or.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";or.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";or.AD_CLICKED="ad-clicked";or.AD_PROGRESS="ad-progress";or.AD_BUFFERING="ad-buffering";or.AD_IMPRESSION="ad-impression";
or.AD_DURATION_CHANGED="ad-duration-changed";or.AD_CLOSED="ad-closed";or.AD_LOADED="ad-loaded";or.ALL_ADS_COMPLETED="all-ads-completed";or.AD_LINEAR_CHANGED="ad-linear-changed";or.AD_METADATA="ad-metadata";or.AD_RECOVERABLE_ERROR="ad-recoverable-error";or.AD_ERROR="ad-error";or.AD_BREAK_READY="ad-break-ready";or.AD_INTERACTION="ad-interaction";or.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";or.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";or.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function rr(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new lb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.u,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.14.9");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){sr(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){tr(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.ma(this.i,"play",function(){f.F=!0})}rr.prototype.configure=function(a){this.o=a};rr.prototype.stop=function(){this.g&&this.g.stop();this.u&&hk(this.u)};
rr.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function tr(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new V("ad-error",b));ur(a,null);a.l(new V("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
function sr(a,b){a.l(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.l(new V("ima-ad-manager-loaded",(new Map).set("imaAdManager",
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new V("ad-cue-points-changed",(new Map).set("cuepoints",b)))}vr(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,wr(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,wr(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
a.i.offsetHeight,wr(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,wr(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.ma(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){ur(a,null)}}
function wr(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
function vr(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new V(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){tr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){xr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){xr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){ur(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){ur(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
function xr(a,b){var c=b.getAd();c?(a.j=new nr(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.o.supportsMultipleMediaElements||a.l(new V("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new V("ad-started",b)),a.j.isLinear()&&(a.u.setAttribute("ad-active","true"),a.o.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):bb("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
function ur(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new V("ad-content-resume-requested"));a.l(new V("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function yr(a,b,c,d,e,f){this.g=a;this.i=b;this.j=(this.h=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.A=c;this.o=d;this.m=e;this.u=f;this.B=b.overlay}r=yr.prototype;r.needsSkipUI=function(){return!0};r.isClientRendering=function(){return!0};r.hasCustomClick=function(){return!1};r.isUsingAnotherMediaElement=function(){return this.u};r.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};r.getMinSuggestedDuration=function(){return this.getDuration()};
r.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h};r.getTimeUntilSkippable=function(){if(this.isSkippable()){var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)}return Math.max(this.getRemainingTime(),0)};r.canSkipNow=function(){return this.h&&0==this.getTimeUntilSkippable()};
r.skip=function(){this.canSkipNow()&&this.A()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return null==this.B};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.o};r.getPositionInSequence=function(){return this.m};r.getTitle=function(){return""};
r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.i.id||""};r.getCreativeAdId=function(){return""};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return this.i.uri};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.g=null};T("shaka.ads.InterstitialAd",yr);yr.prototype.release=yr.prototype.release;
yr.prototype.getPodIndex=yr.prototype.getPodIndex;yr.prototype.getTimeOffset=yr.prototype.getTimeOffset;yr.prototype.getMediaUrl=yr.prototype.getMediaUrl;yr.prototype.getAdvertiserName=yr.prototype.getAdvertiserName;yr.prototype.getCreativeAdId=yr.prototype.getCreativeAdId;yr.prototype.getAdId=yr.prototype.getAdId;yr.prototype.getVastMediaWidth=yr.prototype.getVastMediaWidth;yr.prototype.getVastMediaHeight=yr.prototype.getVastMediaHeight;yr.prototype.getVastMediaBitrate=yr.prototype.getVastMediaBitrate;
yr.prototype.getDescription=yr.prototype.getDescription;yr.prototype.getTitle=yr.prototype.getTitle;yr.prototype.getPositionInSequence=yr.prototype.getPositionInSequence;yr.prototype.getSequenceLength=yr.prototype.getSequenceLength;yr.prototype.setMuted=yr.prototype.setMuted;yr.prototype.resize=yr.prototype.resize;yr.prototype.isLinear=yr.prototype.isLinear;yr.prototype.isMuted=yr.prototype.isMuted;yr.prototype.setVolume=yr.prototype.setVolume;yr.prototype.getVolume=yr.prototype.getVolume;
yr.prototype.play=yr.prototype.play;yr.prototype.pause=yr.prototype.pause;yr.prototype.skip=yr.prototype.skip;yr.prototype.canSkipNow=yr.prototype.canSkipNow;yr.prototype.getTimeUntilSkippable=yr.prototype.getTimeUntilSkippable;yr.prototype.isSkippable=yr.prototype.isSkippable;yr.prototype.isPaused=yr.prototype.isPaused;yr.prototype.getRemainingTime=yr.prototype.getRemainingTime;yr.prototype.getMinSuggestedDuration=yr.prototype.getMinSuggestedDuration;yr.prototype.getDuration=yr.prototype.getDuration;
yr.prototype.isUsingAnotherMediaElement=yr.prototype.isUsingAnotherMediaElement;yr.prototype.hasCustomClick=yr.prototype.hasCustomClick;yr.prototype.isClientRendering=yr.prototype.isClientRendering;yr.prototype.needsSkipUI=yr.prototype.needsSkipUI;function zr(a,b,c){this.g=a;this.j=b;this.h=c;this.i=null==a.overlay}r=zr.prototype;r.needsSkipUI=function(){return!0};r.isClientRendering=function(){return!0};r.hasCustomClick=function(){return!1};r.isUsingAnotherMediaElement=function(){return!1};r.getDuration=function(){return-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return-1};r.isPaused=function(){return!1};r.isSkippable=function(){return!1};r.getTimeUntilSkippable=function(){return 0};
r.canSkipNow=function(){return!1};r.skip=function(){};r.pause=function(){};r.play=function(){};r.getVolume=function(){return 1};r.setVolume=function(){};r.isMuted=function(){return!1};r.isLinear=function(){return this.i};r.resize=function(){};r.setMuted=function(){};r.getSequenceLength=function(){return this.j};r.getPositionInSequence=function(){return this.h};r.getTitle=function(){return""};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};
r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.g.id||""};r.getCreativeAdId=function(){return""};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return this.g.uri};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){};T("shaka.ads.InterstitialStaticAd",zr);zr.prototype.release=zr.prototype.release;zr.prototype.getPodIndex=zr.prototype.getPodIndex;zr.prototype.getTimeOffset=zr.prototype.getTimeOffset;
zr.prototype.getMediaUrl=zr.prototype.getMediaUrl;zr.prototype.getAdvertiserName=zr.prototype.getAdvertiserName;zr.prototype.getCreativeAdId=zr.prototype.getCreativeAdId;zr.prototype.getAdId=zr.prototype.getAdId;zr.prototype.getVastMediaWidth=zr.prototype.getVastMediaWidth;zr.prototype.getVastMediaHeight=zr.prototype.getVastMediaHeight;zr.prototype.getVastMediaBitrate=zr.prototype.getVastMediaBitrate;zr.prototype.getDescription=zr.prototype.getDescription;zr.prototype.getTitle=zr.prototype.getTitle;
zr.prototype.getPositionInSequence=zr.prototype.getPositionInSequence;zr.prototype.getSequenceLength=zr.prototype.getSequenceLength;zr.prototype.setMuted=zr.prototype.setMuted;zr.prototype.resize=zr.prototype.resize;zr.prototype.isLinear=zr.prototype.isLinear;zr.prototype.isMuted=zr.prototype.isMuted;zr.prototype.setVolume=zr.prototype.setVolume;zr.prototype.getVolume=zr.prototype.getVolume;zr.prototype.play=zr.prototype.play;zr.prototype.pause=zr.prototype.pause;zr.prototype.skip=zr.prototype.skip;
zr.prototype.canSkipNow=zr.prototype.canSkipNow;zr.prototype.getTimeUntilSkippable=zr.prototype.getTimeUntilSkippable;zr.prototype.isSkippable=zr.prototype.isSkippable;zr.prototype.isPaused=zr.prototype.isPaused;zr.prototype.getRemainingTime=zr.prototype.getRemainingTime;zr.prototype.getMinSuggestedDuration=zr.prototype.getMinSuggestedDuration;zr.prototype.getDuration=zr.prototype.getDuration;zr.prototype.isUsingAnotherMediaElement=zr.prototype.isUsingAnotherMediaElement;
zr.prototype.hasCustomClick=zr.prototype.hasCustomClick;zr.prototype.isClientRendering=zr.prototype.isClientRendering;zr.prototype.needsSkipUI=zr.prototype.needsSkipUI;function Ar(a,b,c,d){var e=this;this.T=null;this.A=a;this.H=b;this.g=c;this.F=null;this.B=!0;this.h=this.g;this.i=d;this.W=new Set;this.G=new Set;this.C=new Map;this.L=new Map;this.j=new X;Br(this);this.I=new lb;this.l=new lb;this.K=!1;this.ea=this.m=this.u=this.o=null;this.fa=!1;this.O=-1;this.$=function(){if(!e.K&&e.o&&!e.H.Pa()){e.o=e.g.currentTime;e.u&&!e.u.pre&&!e.u.post&&e.o<e.u.startTime&&(e.u=null);var f=Cr(e);f&&Dr(e,f,1,1,Date.now())}};this.Z=function(){if(!(e.K||e.o||e.H.Pa())){e.o=e.g.currentTime;
var f=Cr(e,!0);f&&Dr(e,f,1,1,Date.now())}};this.P=new ec(this.$);this.M=new ec(function(){var f,g,h,k,l,m,n,p,q,u,w;return Q(function(v){switch(v.g){case 1:if(!e.G.size||null==e.o){v.s(0);break}f=e.H.m;if(f==Sp||f==Ip)return v.return();g=!1;h=Array.from(e.G);k=e.H.Ra();l=t(h);m=l.next();case 3:if(m.done){v.s(5);break}n=m.value;if(n==e.u){v.s(4);break}p=n.endTime||n.startTime;if(!(1<=k.start-p)){q=n.startTime-e.o;0<q&&10>=q&&(!e.C.has(n)&&Er(n)&&e.C.set(n,e.j.preload(n.uri,null,n.mimeType||void 0)),
Fr(e,n));v.s(4);break}if(!e.C.has(n)){v.s(7);break}return F(v,e.C.get(n),8);case 8:(u=v.h)&&u.destroy(),e.C.delete(n);case 7:Gr(e,n),w=JSON.stringify(n),e.W.has(w)&&e.W.delete(w),e.G.delete(n),Hr(e),n.overlay||(g=!0);case 4:m=l.next();v.s(3);break;case 5:g&&Ir(e),H(v)}})})}r=Ar.prototype;r.configure=function(a){this.T=a;Jr(this)};
function Kr(a){if(!a.fa&&a.G.size){a.I.D(a.g,"playing",a.Z);a.I.D(a.g,"timeupdate",a.Z);a.I.D(a.g,"ended",a.$);if("requestVideoFrameCallback"in a.g&&!Ac()){var b=a.g,c=function(){-1!=a.O&&(a.$(),-1!=a.O&&(a.O=b.requestVideoFrameCallback(c)))};a.O=b.requestVideoFrameCallback(c)}else a.P.ua(.025);a.M&&a.M.ua(1);a.fa=!0}}
function Hr(a){a.fa&&!a.G.size&&(a.I.Ja(a.g,"playing",a.Z),a.I.Ja(a.g,"timeupdate",a.Z),a.I.Ja(a.g,"ended",a.$),-1!=a.O&&(a.g.cancelVideoFrameCallback(a.O),a.O=-1),a.P&&a.P.stop(),a.M&&a.M.stop(),a.fa=!1)}
function Jr(a){if(a.A&&a.T&&!a.K){var b=a.T.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.B==b&&(a.B=!b,a.B?(a.h=a.g,a.F&&(a.F.parentElement&&a.A.removeChild(a.F),a.F=null)):(a.F||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.display="none",b.setAttribute("playsinline",""),a.F=b),a.h=a.F))}}
r.stop=function(){this.l&&this.l.Qa();this.W.clear();this.G.clear();this.j.pf();if(this.C.size){var a=Array.from(this.C.values());a=t(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&b.then(function(c){c&&c.destroy()})}this.C.clear();if(this.L.size)for(a=Array.from(this.L.keys()),a=t(a),b=a.next();!b.done;b=a.next())Gr(this,b.value);this.L.clear();this.j.detach();this.K=!1;this.u=this.o=null;this.B=!0;this.h=this.g;this.F=null;Lr(this);Hr(this);this.A&&hk(this.A);this.m&&(this.m.stop(),this.m=
null)};r.release=function(){this.stop();this.I&&this.I.release();this.l&&this.l.release();this.P&&(this.P.stop(),this.P=null);this.M&&(this.M.stop(),this.M=null);this.j.destroy()};r.If=function(){return this.j};function Mr(a,b){var c;Q(function(d){if(1==d.g)return Br(a),F(d,Nr(a,b),2);c=d.h;c.length?Or(a,c):bb("Unsupported HLS interstitial",b);H(d)})}
function Pr(a,b){var c=be(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f="true"==c.attributes.loop,g=he(c,"z",ne);if(d&&0!=g){var h={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},k=be(c,"Viewport"),l=be(c,"TopLeft"),m=be(c,"Size");if(k&&l&&m){h=he(k,"x",ne);if(null==h)return;k=he(k,"y",ne);if(null==k)return;var n=he(l,"x",ne);if(null==n)return;l=he(l,"y",ne);if(null==l)return;var p=he(m,"x",ne);if(null==p)return;m=he(m,"y",ne);if(null==m)return;h={viewport:{x:h,
y:k},topLeft:{x:n,y:l},size:{x:p,y:m}}}m=be(c,"SqueezeCurrent");c=null;m&&(m=he(m,"percentage",qe))&&(c={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*m,y:1080*m}});Or(a,[{id:b.id,groupId:null,startTime:b.startTime,endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:h,displayOnBackground:-1==g,currentVideo:c,background:null}])}}
r.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return c={type:12},F(n,Qr(b,a,c),2);case 2:d=n.h;e=Qd(d,"VAST,vmap:VMAP");if(!e)throw new U(2,10,10007);f=[];if("VAST"==e.tagName){f=pr(e,b.o);n.s(3);break}if("vmap:VMAP"!=e.tagName){n.s(3);break}for(var p=[],q=t(Yd(e,"vmap:AdBreak")),u=q.next();!u.done;u=q.next()){var w=u.value,v=w.attributes.timeOffset;v&&(u=null,"start"==v?u=0:"end"==v?u=Infinity:u=Md(v),(w=be(w,"vmap:AdSource"))&&(w=be(w,"vmap:AdTagURI"))&&
(w=Zd(w))&&p.push({time:u,uri:w}))}g=t(p);h=g.next();case 5:if(h.done){n.s(3);break}k=h.value;return F(n,Qr(b,k.uri,c),8);case 8:l=n.h;m=Qd(l,"VAST");if(!m)throw new U(2,10,10007);f.push.apply(f,y(pr(m,k.time)));h=g.next();n.s(5);break;case 3:Or(b,f),H(n)}})};
function Or(a,b){var c,d,e,f,g,h,k,l;Q(function(m){switch(m.g){case 1:c=!1,d=t(b),e=d.next();case 2:if(e.done){m.s(4);break}f=e.value;if(!f.uri){bb("Missing URL in interstitial",f);m.s(3);break}if(f.mimeType){m.s(5);break}xa(m,6);g=a.j.xb();return F(m,Do(f.uri,g,a.H.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;Aa(m,5);break;case 6:Ba(m);case 5:h=f.id||JSON.stringify(f);if(a.W.has(h)){m.s(3);break}f.loop&&!f.overlay&&bb("Loop is only supported in overlay interstitials",f);
f.overlay||(c=!0);a.W.add(h);a.G.add(f);k=!1;f.pre&&null==a.o?k=!0:0!=f.startTime||f.canJump?null!=a.o&&(l=f.startTime-a.o,0<l&&10>=l&&(k=!0)):k=!0;k&&(!a.C.has(f)&&Er(f)&&a.C.set(f,a.j.preload(f.uri,null,f.mimeType||void 0)),Fr(a,f));case 3:e=d.next();m.s(2);break;case 4:c&&Ir(a),Kr(a),H(m)}})}
function Cr(a,b,c){b=void 0===b?!1:b;c=void 0===c?null:c;var d=0,e=null;if(a.G.size&&null!=a.o){var f=a.g.ended,g=Array.from(a.G).sort(function(m,n){return n.startTime-m.startTime}),h=g;h=b?g.filter(function(m){return m.pre}):f?g.filter(function(m){return m.post}):g.filter(function(m){return!m.pre&&!m.post});g=t(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.o-Math.round(1E3*h.startTime)/1E3;0<l&&(1>=l||!h.canJump)&&(k=null==
c&&a.u&&!a.u.pre&&!a.u.post&&a.u.startTime>=h.startTime?!1:!0)}k&&(!a.u||h.startTime>=a.u.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001<Math.round(1E3*h.startTime)/1E3-Math.round(1E3*e.startTime)/1E3&&(e=h,d=0),d++)}}return e}
function Dr(a,b,c,d,e,f){f=void 0===f?0:f;a.u=b;Jr(a);!a.h.parentElement&&a.A&&a.A.appendChild(a.h);1==d&&1==c&&(c=Array.from(a.G).filter(function(g){return b.pre?g.pre==b.pre:b.post?g.post==b.post:.001>Math.abs(g.startTime-b.startTime)}).length);b.once&&(f++,a.G.delete(b),Hr(a),b.overlay||Ir(a));b.mimeType&&(b.mimeType.startsWith("image/")||"text/html"===b.mimeType)?b.overlay?Rr(a,b,c,d,f):bb("Unsupported interstitial",b):a.B&&b.overlay?bb("Unsupported interstitial",b):Sr(a,b,c,d,e,f)}
function Rr(a,b,c,d,e){function f(){a.m&&(a.m.stop(),a.m=null);a.A.removeChild(k);Lr(a,b);a.i(new V("ad-stopped"));var p=Cr(a,b.pre,d-e);p?(a.l.Qa(),Dr(a,p,c,++d,Date.now(),e)):a.K=!1}var g=b.overlay,h="text/html"==b.mimeType?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";Tr(a,b);a.i(new V("ad-started",(new Map).set("ad",new zr(b,c,d))));"iframe"==h?k.src=b.uri:(k.src=b.uri,k.onerror=function(p){a.i(new V("ad-error",(new Map).set("originalEvent",
p)));f()});var l=g.viewport,m=g.topLeft;g=g.size;0==l.x&&0==l.y?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||"iframe"!=h||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.A.appendChild(k);var n=Date.now();a.m&&a.m.stop();a.m=new ec(function(){b.playoutLimit&&(Date.now()-n)/1E3>b.playoutLimit?(a.i(new V("ad-complete")),
f()):b.endTime&&a.g.currentTime>b.endTime?(a.i(new V("ad-complete")),f()):a.g.currentTime<b.startTime&&(a.i(new V("ad-skipped")),f())});b.playoutLimit&&!b.endTime?a.m.da(b.playoutLimit):b.endTime&&a.m.ua(.025);a.l.D(a.g,"seeked",function(){var p=a.g.currentTime;if(p<b.startTime||b.endTime&&p>b.endTime)a.m&&a.m.stop(),a.i(new V("ad-skipped")),f()})}
function Sr(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C;Q(function(A){switch(A.g){case 1:g=Date.now();a.K=!0;if(!a.B||1!=d){A.s(2);break}a.i(new V("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new Ug;k=function(E){return Q(function(G){if(1==G.g)return"detach"!=E.state?G.s(0):Ac()?F(G,new Promise(function(M){return(new ec(M)).da(.1)}),3):G.s(3);h.resolve();a.l.Ja(a.H,"onstatechange",k);H(G)})};a.l.D(a.H,"onstatechange",k);return F(A,h,2);case 2:return Tr(a,b),a.B||(a.h.style.display=
"",b.overlay?(a.h.loop=b.loop,l=b.overlay.viewport,m=b.overlay.topLeft,n=b.overlay.size,a.h.style.height=n.y/l.y*100+"%",a.h.style.left=m.x/l.x*100+"%",a.h.style.top=m.y/l.y*100+"%",a.h.style.width=n.x/l.x*100+"%"):(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.g.currentTime+=b.resumeOffset),a.h.loop=!1,a.h.style.height="100%",a.h.style.left="0",a.h.style.top="0",a.h.style.width="100%")),p=!1,q=function(){if(!a.B&&!b.overlay&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&Infinity!=
b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var E=Date.now();a.g.currentTime+=(E-e)/1E3;e=E}},u=function(E){var G,M;return Q(function(L){if(1==L.g){q();G=Cr(a,b.pre,d-f);if(E&&b.groupId)for(;G&&G.groupId==b.groupId;)d++,G=Cr(a,b.pre,d-f);a.m&&(!b.groupId||G&&G.groupId!=b.groupId)&&(a.m.stop(),a.m=null);Lr(a,b);if(G&&!G.overlay)return L.s(2);b.post&&(a.o=null,a.u=null);return a.B?F(L,a.j.detach(),4):F(L,a.j.kc(),4)}2!=L.g&&(a.B&&(M=b.resumeOffset,null==M&&(M=b.timelineRange&&
b.endTime&&Infinity!=b.endTime?b.endTime-(a.o||0):(Date.now()-e)/1E3),a.i(new V("ad-content-resume-requested",(new Map).set("offset",M)))),a.i(new V("ad-stopped")),a.l.Qa(),a.K=!1,a.B?Ir(a):(a.h.style.display="none",q(),a.g.ended||a.g.play()));Jr(a);G&&(a.i(new V("ad-stopped")),a.l.Qa(),Dr(a,G,c,++d,e,f));H(L)})},w=function(E){return Q(function(G){if(p)return G.return();p=!0;a.i(new V("ad-error",(new Map).set("originalEvent",E)));return F(G,u(!1),0)})},v=function(){return Q(function(E){if(1==E.g){if(p)return E.return();
p=!0;return F(E,u(!1),2)}a.i(new V("ad-complete"));H(E)})},a.ea=function(){return Q(function(E){if(p)return E.return();p=!0;a.i(new V("ad-skipped"));return F(E,u(!0),0)})},x=new yr(a.h,b,a.ea,c,d,!a.B),a.B||(x.setMuted(a.g.muted),x.setVolume(a.g.volume)),a.i(new V("ad-started",(new Map).set("ad",x))),(z=x.canSkipNow())&&a.i(new V("ad-skip-state-changed")),a.l.ma(a.j,"error",w),a.l.D(a.h,"timeupdate",function(){if(a.h.duration){var E=x.canSkipNow();z!=E&&0<x.getRemainingTime()&&0<x.getDuration()&&
a.i(new V("ad-skip-state-changed"));z=E}}),a.l.ma(a.j,"firstquartile",function(){q();a.i(new V("ad-first-quartile"))}),a.l.ma(a.j,"midpoint",function(){q();a.i(new V("ad-midpoint"))}),a.l.ma(a.j,"thirdquartile",function(){q();a.i(new V("ad-third-quartile"))}),a.l.ma(a.j,"complete",v),a.l.D(a.h,"play",function(){a.i(new V("ad-resumed"))}),a.l.D(a.h,"pause",function(){var E=a.j.getConfiguration();a.h.currentTime>=E.playRangeEnd?v():a.i(new V("ad-paused"))}),a.l.D(a.h,"volumechange",function(){a.h.muted?
a.i(new V("ad-muted")):a.i(new V("ad-volume-changed"))}),xa(A,4),Br(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(D=b.endTime-b.startTime,0<D&&a.j.configure("playRangeEnd",D)),b.playoutLimit&&!a.m&&(a.m=(new ec(function(){a.ea()})).da(b.playoutLimit),a.j.configure("playRangeEnd",b.playoutLimit)),F(A,a.j.Lb(a.h),6);case 6:return a.C.has(b)?F(A,a.C.get(b),10):F(A,a.j.load(b.uri,null,b.mimeType||void 0),8);case 10:return B=A.h,a.C.delete(b),B?F(A,a.j.load(B),8):F(A,a.j.load(b.uri,
null,b.mimeType||void 0),8);case 8:a.h.play();I=(Date.now()-g)/1E3;a.i(new V("ads-loaded",(new Map).set("loadTime",I)));a.B&&a.g.play();b.overlay&&(a.l.D(a.g,"seeking",function(){var E=a.g.currentTime-b.startTime;.1<Math.abs(E-a.h.currentTime)&&(a.h.currentTime=E)}),a.l.D(a.g,"seeked",function(){var E=a.g.currentTime;(E<b.startTime||b.endTime&&E>b.endTime)&&a.ea()}));Aa(A,0);break;case 4:C=Ba(A);if(!a.K)return A.return();w(C);H(A)}})}
function Tr(a,b){b.displayOnBackground&&(a.g.style.zIndex="1");if(null!=b.currentVideo){var c=b.currentVideo;a.g.style.transformOrigin="top left";var d=!0,e=[],f=c.topLeft.x/c.viewport.x*100;0<f&&100>=f&&(e.push("translateX("+f+"%)"),d=!1);f=c.topLeft.y/c.viewport.y*100;0<f&&100>=f&&(e.push("translateY("+f+"%)"),d=!1);f=c.size.x/c.viewport.x;1>f&&e.push("scaleX("+f+")");c=c.size.y/c.viewport.y;1>f&&e.push("scaleY("+c+")");e.length&&(a.g.style.transform=e.join(" "));d&&(a.g.style.transition="transform 250ms")}a.A&&
(a.A.style.pointerEvents="none",b.background&&(a.A.style.background=b.background));a.F&&(a.F.style.background=b.overlay?"":"rgb(0, 0, 0)")}function Lr(a,b){if(!b||b.displayOnBackground)a.g.style.zIndex="";b&&null==b.currentVideo||(a.g.style.transformOrigin="",a.g.style.transition="",a.g.style.transform="");a.A&&(a.A.style.pointerEvents="",!b||b.background)&&(a.A.style.background="");a.F&&(a.F.style.background="")}
function Nr(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N,P,O,R,S,pa,Z,Fa,Ia,sa,ka,Ca,ra,ya;return Q(function(na){switch(na.g){case 1:c=[];if(!b)return na.return(c);d=b.values.find(function(ta){return"X-ASSET-URI"==ta.key});e=b.values.find(function(ta){return"X-ASSET-LIST"==ta.key});if(!d&&!e)return na.return(c);f=null;if(g=b.values.find(function(ta){return"ID"==ta.key}))f=g.data;h=null==f?Math.floor(10*b.startTime)/10:b.startTime;(k=b.endTime)&&Infinity!=b.endTime&&"number"==
typeof b.endTime&&(k=null==f?Math.floor(10*b.endTime)/10:b.endTime);l=b.values.find(function(ta){return"X-RESTRICT"==ta.key});n=m=!0;l&&l.data&&(p=l.data,m=!p.includes("SKIP"),n=!p.includes("JUMP"));q=m?0:null;if(u=b.values.find(function(ta){return"X-ENABLE-SKIP-AFTER"==ta.key}))w=u.data,q=parseFloat(w),isNaN(q)&&(q=m?0:null);v=null;if(x=b.values.find(function(ta){return"X-ENABLE-SKIP-FOR"==ta.key}))z=x.data,v=parseFloat(z),isNaN(q)&&(v=null);D=null;if(B=b.values.find(function(ta){return"X-RESUME-OFFSET"==
ta.key}))I=B.data,D=parseFloat(I),isNaN(D)&&(D=null);C=null;if(A=b.values.find(function(ta){return"X-PLAYOUT-LIMIT"==ta.key}))E=A.data,C=parseFloat(E),isNaN(C)&&(C=null);L=M=G=!1;if(J=b.values.find(function(ta){return"CUE"==ta.key}))K=J.data,G=K.includes("ONCE"),M=K.includes("PRE"),L=K.includes("POST");N=!1;(P=b.values.find(function(ta){return"X-TIMELINE-OCCUPIES"==ta.key}))?(O=P.data,N=O.includes("RANGE")):!B&&a.H.U()&&(N=!M&&!L);if(d){R=d.data;if(!R)return na.return(c);c.push({id:f,groupId:null,
startTime:h,endTime:k,uri:R,mimeType:null,isSkippable:m,skipOffset:q,skipFor:v,canJump:n,resumeOffset:D,playoutLimit:C,once:G,pre:M,post:L,timelineRange:N,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});na.s(2);break}if(!e){na.s(2);break}S=e.data;if(!S)return na.return(c);xa(na,4);pa={type:11};return F(na,Qr(a,S,pa),6);case 6:Z=na.h;Fa=Hc(Z);Ia=JSON.parse(Fa);if(sa=Ia["SKIP-CONTROL"])ka=sa["ENABLE-SKIP-AFTER"],"number"==typeof ka&&(q=parseFloat(ka),isNaN(ka)&&(q=m?
0:null)),Ca=sa["ENABLE-SKIP-FOR"],"number"==typeof Ca&&(v=parseFloat(Ca),isNaN(Ca)&&(v=null));for(ra=0;ra<Ia.ASSETS.length;ra++)ya=Ia.ASSETS[ra],ya.URI&&c.push({id:f+"_shaka_asset_"+ra,groupId:f,startTime:h,endTime:k,uri:ya.URI,mimeType:null,isSkippable:m,skipOffset:q,skipFor:v,canJump:n,resumeOffset:D,playoutLimit:C,once:G,pre:M,post:L,timelineRange:N,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});Aa(na,2);break;case 4:Ba(na);case 2:return na.return(c)}})}
function Ir(a){for(var b=[],c=t(a.G),d=c.next(),e={};!d.done;e={$b:void 0},d=c.next())d=d.value,d.overlay||(e.$b={start:d.startTime,end:null},d.pre?(e.$b.start=0,e.$b.end=null):d.post?(e.$b.start=-1,e.$b.end=null):d.timelineRange&&(e.$b.end=d.endTime),b.find(function(f){return function(g){return f.$b.start==g.start&&f.$b.end==g.end}}(e))||b.push(e.$b));a.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
function Br(a){a.j.configure(a.H.Vg());a.j.configure("ads.disableHLSInterstitial",!0);a.j.configure("ads.disableDASHInterstitial",!0);a.j.configure("playRangeEnd",Infinity);kh(a.H.xb(),a.j.xb())}function Qr(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=lh([b],Sg()),e=a.H.xb().request(7,d,c),F(g,e.promise,2);f=g.h;return g.return(f.data)})}function Er(a){return(a=a.mimeType)?!a.startsWith("image/")&&"text/html"!==a:!0}
function Fr(a,b){if(!(a.L.has(b)||a.T&&!a.T.allowPreloadOnDomElements)){var c=function(f){var g=document.createElement("link");g.rel="preload";g.href=f;g.as="image";document.head.appendChild(g);return g},d=[];if(b.background){var e=b.background.match(/url\(('|")?([^'"()]+)('|")\)?/);e&&d.push(c(e[2]))}b.mimeType.startsWith("image/")&&d.push(c(b.uri));a.L.set(b,d)}}
function Gr(a,b){if(a.L.has(b)){var c=a.L.get(b);c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.parentNode.removeChild(d);a.L.delete(b)}};function Ur(a,b,c,d,e){this.h=a;this.j=Md(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}r=Ur.prototype;r.needsSkipUI=function(){return!0};r.isClientRendering=function(){return!1};r.hasCustomClick=function(){return!1};r.isUsingAnotherMediaElement=function(){return!1};r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return"number"==typeof this.j?!0:!1};r.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};
r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return this.o};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.l?this.l:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};
r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.l=this.i=this.g=this.h=null};T("shaka.ads.MediaTailorAd",Ur);Ur.prototype.release=Ur.prototype.release;Ur.prototype.getPodIndex=Ur.prototype.getPodIndex;Ur.prototype.getTimeOffset=Ur.prototype.getTimeOffset;
Ur.prototype.getMediaUrl=Ur.prototype.getMediaUrl;Ur.prototype.getAdvertiserName=Ur.prototype.getAdvertiserName;Ur.prototype.getCreativeAdId=Ur.prototype.getCreativeAdId;Ur.prototype.getAdId=Ur.prototype.getAdId;Ur.prototype.getVastMediaWidth=Ur.prototype.getVastMediaWidth;Ur.prototype.getVastMediaHeight=Ur.prototype.getVastMediaHeight;Ur.prototype.getVastMediaBitrate=Ur.prototype.getVastMediaBitrate;Ur.prototype.getDescription=Ur.prototype.getDescription;Ur.prototype.getTitle=Ur.prototype.getTitle;
Ur.prototype.getPositionInSequence=Ur.prototype.getPositionInSequence;Ur.prototype.getSequenceLength=Ur.prototype.getSequenceLength;Ur.prototype.setMuted=Ur.prototype.setMuted;Ur.prototype.resize=Ur.prototype.resize;Ur.prototype.isLinear=Ur.prototype.isLinear;Ur.prototype.isMuted=Ur.prototype.isMuted;Ur.prototype.setVolume=Ur.prototype.setVolume;Ur.prototype.getVolume=Ur.prototype.getVolume;Ur.prototype.play=Ur.prototype.play;Ur.prototype.pause=Ur.prototype.pause;Ur.prototype.skip=Ur.prototype.skip;
Ur.prototype.canSkipNow=Ur.prototype.canSkipNow;Ur.prototype.getTimeUntilSkippable=Ur.prototype.getTimeUntilSkippable;Ur.prototype.isSkippable=Ur.prototype.isSkippable;Ur.prototype.isPaused=Ur.prototype.isPaused;Ur.prototype.getRemainingTime=Ur.prototype.getRemainingTime;Ur.prototype.getMinSuggestedDuration=Ur.prototype.getMinSuggestedDuration;Ur.prototype.getDuration=Ur.prototype.getDuration;Ur.prototype.isUsingAnotherMediaElement=Ur.prototype.isUsingAnotherMediaElement;
Ur.prototype.hasCustomClick=Ur.prototype.hasCustomClick;Ur.prototype.isClientRendering=Ur.prototype.isClientRendering;Ur.prototype.needsSkipUI=Ur.prototype.needsSkipUI;function Vr(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.P=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.M=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.u=[];this.G="";this.O=!0;this.H="";this.o=new lb}Vr.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Ja(b.target,b.type,b.listener);Wr(this);this.m=[];this.u=[];this.G="";this.O=!0;this.H="";this.A=null;this.j=[];this.M=[];this.F.clear()};
Vr.prototype.release=function(){this.stop();this.o&&this.o.release()};Vr.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(Xr(this,this.G,this.O),this.O=!1)};Vr.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
function Yr(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u;Q(function(w){if(1==w.g)return d={type:7},e=lh([b],Sg()),e.method="POST",c&&(f=JSON.stringify(c),e.body=Lc(f)),g=a.K.request(7,e,d),xa(w,2),F(w,g.promise,4);if(2!=w.g){h=w.h;k=Hc(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new yb(b),n=new yb(l.trackingUrl),a.G=m.resolve(n).toString(),p=Date.now()/1E3,q=p-a.P,a.i(new V("ads-loaded",(new Map).set("loadTime",q))),u=new yb(l.manifestUrl),a.l.resolve(m.resolve(u).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
return Aa(w,0)}Ba(w);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,w.return();a.l.resolve(a.H);a.l=null;H(w)})}
function Xr(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z;Q(function(D){if(1==D.g)return d={type:8},e=lh([b],Sg()),f=a.K.request(7,e,d),xa(D,2),F(D,f.promise,4);if(2!=D.g){g=D.h;h=[];k=Hc(g.data);l=JSON.parse(k);if(0<l.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=t(a.j);for(n=m.next();!n.done;n=m.next())for(p=n.value,q=t(p.nonLinearAdsList),u=q.next();!u.done;u=q.next())for(w=u.value,v=t(w.nonLinearAdList),x=v.next();!x.done;x=v.next())z=x.value,Zr(a,z);h=a.getCuePoints();
a.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",h))),Wr(a),a.j=[];c&&(a.I||0<h.length)&&$r(a);return Aa(D,0)}Ba(D);H(D)})}
function Zr(a,b){var c,d,e,f,g,h,k,l,m;Q(function(n){if(1==n.g){if(!b.staticResource)return n.return();c=as(b);if(d=a.F.get(c))return n.return();e={type:9};f=lh([b.staticResource],Sg());g=a.K.request(7,f,e);xa(n,2);a.F.set(c,[]);return F(n,g.promise,4)}if(2!=n.g)return h=n.h,k=Hc(h.data),l=JSON.parse(k),m=l.apps,a.F.set(c,m),Aa(n,0);Ba(n);a.F.delete(c);H(n)})}
function as(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function $r(a){bs(a);a.I||(cs(a),a.o.D(a.h,"seeked",function(){cs(a)}),a.o.D(a.h,"ended",function(){Wr(a)}));a.o.D(a.h,"timeupdate",function(){bs(a)})}
function cs(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.M.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
function bs(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),ds(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),ds(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),ds(a,"thirdQuartile"));d=a.g.getRemainingTime();
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&ds(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Wr(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.M.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Wr(a);a.L=e;a.g=new Ur(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&ds(a,"breakStart");es(a);break}}}if(!a.g)for(d=
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(as(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Wr(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.g=new Ur(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&ds(a,"breakStart");es(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
function Wr(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.M.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?ds(a,"skip"):ds(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Ja(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&ds(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
function es(a){var b=!1;a.h.paused?b=!0:(ds(a,"impression"),ds(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&ds(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||ds(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(ds(a,"impression"),ds(a,"start"),b=!1):ds(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){ds(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
d.type,d.listener)}
function ds(a,b){var c=a.C.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=t(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&""!=e&&(e=lh([e],Sg()),e.method="POST",a.K.request(7,e,d))}switch(b){case "impression":a.i(new V("ad-impression"));break;case "start":a.i(new V("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new V("ad-muted"));break;case "unmute":a.i(new V("ad-volume-changed"));break;
case "resume":a.i(new V("ad-resumed"));break;case "pause":a.i(new V("ad-paused"));break;case "firstQuartile":a.i(new V("ad-first-quartile"));break;case "midpoint":a.i(new V("ad-midpoint"));break;case "thirdQuartile":a.i(new V("ad-third-quartile"));break;case "complete":a.i(new V("ad-complete"));a.i(new V("ad-stopped"));break;case "skip":a.i(new V("ad-skipped"));a.i(new V("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
break;case "skipStateChanged":a.i(new V("ad-skip-state-changed"))}};function fs(a,b){this.g=a;this.i=null;this.h=b}r=fs.prototype;r.needsSkipUI=function(){return!0};r.isClientRendering=function(){return!1};r.hasCustomClick=function(){return!0};r.isUsingAnotherMediaElement=function(){return!1};r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};
r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};
r.setMuted=function(a){this.h.muted=a};r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};T("shaka.ads.ServerSideAd",fs);fs.prototype.release=fs.prototype.release;
fs.prototype.getPodIndex=fs.prototype.getPodIndex;fs.prototype.getTimeOffset=fs.prototype.getTimeOffset;fs.prototype.getMediaUrl=fs.prototype.getMediaUrl;fs.prototype.getAdvertiserName=fs.prototype.getAdvertiserName;fs.prototype.getCreativeAdId=fs.prototype.getCreativeAdId;fs.prototype.getAdId=fs.prototype.getAdId;fs.prototype.getVastMediaWidth=fs.prototype.getVastMediaWidth;fs.prototype.getVastMediaHeight=fs.prototype.getVastMediaHeight;fs.prototype.getVastMediaBitrate=fs.prototype.getVastMediaBitrate;
fs.prototype.getDescription=fs.prototype.getDescription;fs.prototype.getTitle=fs.prototype.getTitle;fs.prototype.getPositionInSequence=fs.prototype.getPositionInSequence;fs.prototype.getSequenceLength=fs.prototype.getSequenceLength;fs.prototype.setMuted=fs.prototype.setMuted;fs.prototype.resize=fs.prototype.resize;fs.prototype.isLinear=fs.prototype.isLinear;fs.prototype.isMuted=fs.prototype.isMuted;fs.prototype.setVolume=fs.prototype.setVolume;fs.prototype.getVolume=fs.prototype.getVolume;
fs.prototype.play=fs.prototype.play;fs.prototype.pause=fs.prototype.pause;fs.prototype.skip=fs.prototype.skip;fs.prototype.canSkipNow=fs.prototype.canSkipNow;fs.prototype.getTimeUntilSkippable=fs.prototype.getTimeUntilSkippable;fs.prototype.isSkippable=fs.prototype.isSkippable;fs.prototype.isPaused=fs.prototype.isPaused;fs.prototype.getRemainingTime=fs.prototype.getRemainingTime;fs.prototype.getMinSuggestedDuration=fs.prototype.getMinSuggestedDuration;fs.prototype.getDuration=fs.prototype.getDuration;
fs.prototype.isUsingAnotherMediaElement=fs.prototype.isUsingAnotherMediaElement;fs.prototype.hasCustomClick=fs.prototype.hasCustomClick;fs.prototype.isClientRendering=fs.prototype.isClientRendering;fs.prototype.needsSkipUI=fs.prototype.needsSkipUI;function gs(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new lb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new V("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){hs(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new fs(f,e.l);e.A&&(e.m.i=e.A);e.i(new V("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new V("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new V("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new V("ad-third-quartile"))});
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new V("ad-complete"));e.i(new V("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new V("ad-skipped"));e.i(new V("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
f;e.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=gs.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
function hs(a,b){a.i(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){dh.call(this);this.h=this.i=this.j=this.g=null;this.m=new lr;this.o=navigator.language;this.l=null}qa(Y,dh);r=Y.prototype;r.setLocale=function(a){this.o=a};r.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};r.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Ar(a,b,c,function(e){return is(d,e)});this.g.configure(this.l)};
r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new U(2,10,1E4);this.j&&this.j.release();this.j=new rr(a,b,this.o,c,function(e){return is(d,e)});this.j.configure(this.l)};r.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);dh.prototype.release.call(this)};
r.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new V("ad-stopped"));this.dispatchEvent(new V("ad-content-attach-requested"));this.m=new lr};r.requestClientSideAds=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
r.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Vr(a,b,c,function(e){return is(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new U(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new Ug,Yr(d,a,b),d.H=c||"",d.P=Date.now()/1E3,a=d.l);return a};
r.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new U(1,10,10005);var b=this.i;b.G=a;b.i(new V("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.h&&this.h.release();this.h=new gs(a,b,this.o,function(d){return is(c,d)});this.h.configure(this.l)};
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.h)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&bb('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.14.9";c=this.h;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
(c.G=!0),c.j=new Ug,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new U(1,10,10003);(a.mpt||a.mpv)&&bb('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.mpt="Shaka Player";a.mpv="v4.14.9";this.h.g.replaceAdTagParameters(a)};
r.getServerSideCuePoints=function(){sb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};r.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:mr(a),started:a.h,overlayAds:a.j,playedCompletely:a.l,skipped:a.m,errors:a.i}};r.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
r.onDashTimedMetadata=function(a){this.h&&"urn:google:dai:2018"==a.schemeIdUri&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};r.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&Mr(this.g,c))};
r.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==d||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==d){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b="urn:mpeg:dash:event:alternativeMPD:replace:2025"==c.schemeIdUri,d="urn:mpeg:dash:event:alternativeMPD:insert:2025"==c.schemeIdUri,b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=t(c.eventNode.children),m=l.next();!m.done;m=
l.next())if(m=m.value,"AlternativeMPD"==m.tagName){if(m=m.attributes.uri){k=m;break}}else if("InsertPresentation"==m.tagName||"ReplacePresentation"==m.tagName){var n=m.attributes.url;if(n){k=n;(l=he(m,"maxDuration",ne))&&(g=l/c.timescale);(l=he(m,"returnOffset",ne))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&Or(a,[{id:c.id,groupId:null,startTime:e,endTime:f,uri:k,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?h:null,playoutLimit:g,once:!1,pre:!1,post:!1,timelineRange:b&&
!d,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else("urn:mpeg:dash:event:2012"==d||"urn:scte:dash:scte214-events"==d)&&c.eventNode&&be(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&Pr(this.g,c))}};r.addCustomInterstitial=function(a){if(!this.g)throw new U(1,10,10006);Or(this.g,[a])};r.addAdUrlInterstitial=function(a){if(!this.g)throw new U(1,10,10006);return this.g.addAdUrlInterstitial(a)};
r.getInterstitialPlayer=function(){if(!this.g)throw new U(1,10,10006);return this.g.If()};function is(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;var c=b.ad;c&&!c.isLinear()&&a.m.j++;break;case "ad-complete":a.m.l++;break;case "ad-skipped":a.m.m++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}T("shaka.ads.AdManager",Y);Y.prototype.getInterstitialPlayer=Y.prototype.getInterstitialPlayer;Y.prototype.addAdUrlInterstitial=Y.prototype.addAdUrlInterstitial;
Y.prototype.addCustomInterstitial=Y.prototype.addCustomInterstitial;Y.prototype.onDASHInterstitialMetadata=Y.prototype.onDASHInterstitialMetadata;Y.prototype.onHLSInterstitialMetadata=Y.prototype.onHLSInterstitialMetadata;Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.initInterstitial=Y.prototype.initInterstitial;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;
Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";
Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";
Y.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Y.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Y.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Mp=function(){return new Y};function js(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof V){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Vj(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=ArrayBuffer.isView(c)&&1===c.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
function ks(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=ls(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
function ls(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
var ms="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ns="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),os=["loop","playbackRate"],ps=["pause","play"],qs=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",
4).set("getTextLanguagesAndRoles",4).set("getImageTracks",2).set("getThumbnails",2).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),rs=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getTextTracks",2).set("getVariantTracks",2),ss=(new Map).set("getPlayheadTimeAsDate",
1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),ts=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],us=[["isTextTrackVisible","setTextTrackVisibility"]],vs="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
ws=["attach","attachCanvas","detach","load","unload"];function xs(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new ec(b);this.L=c;this.u=!1;this.A=d;this.F=e;this.M=f;this.i=this.m=!1;this.I="";this.o=null;this.B=function(){return ys(h)};this.C=function(k,l){k=ks(l);switch(k.type){case "event":var m=k.targetName,n=bh(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.L(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.h.get(n),h.h.delete(n),k)if(p){n=new U(p.severity,p.category,
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.h=new Map;this.j=null;zs.add(this)}r=xs.prototype;r.destroy=function(){zs.delete(this);As(this);Bs&&Cs(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.i=this.m=!1;this.C=this.B=this.j=this.h=this.g=this.o=null;return Promise.resolve()};r.qb=function(){return this.i};r.ag=function(){return this.I};
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.sb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(zs),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Ug;d.u=!0;Ds(d,e)}},function(b){for(var c=t(zs),d=c.next();!d.done;d=c.next())d=d.value,Es="available"==b,d.l.sb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Es&&this.l.da(Fs);(a=Bs)&&
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Ug,this.u=!0,Ds(this,a)):Bs=null}else window.__onGCastApiAvailable!==Gs&&(Hs=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Gs)};r.ig=function(a){this.o=a;this.i&&Is(this,{type:"appData",appData:this.o})};
r.cast=function(){var a=this;return Q(function(b){if(!a.m)throw new U(1,8,8E3);if(!Es)throw new U(1,8,8001);if(a.i)throw new U(1,8,8002);a.j=new Ug;chrome.cast.requestSession(function(c){return Ds(a,c)},function(c){return Js(a,c)});return F(b,a.j,0)})};function Ks(a){a.i&&chrome.cast.requestSession(function(b){return Ds(a,b)},function(b){return Js(a,b)})}r.Pc=function(){if(this.i){As(this);if(Bs){Cs(this);try{Bs.stop(function(){},function(){})}catch(a){}Bs=null}ys(this)}};
r.get=function(a,b){var c=this;if("video"==a){if(ps.includes(b))return function(){return c.oh.apply(c,[a,b].concat(y(Na.apply(0,arguments))))}}else if("player"==a){if(ss.has(b)&&!this.get("player","isLive")())return function(){};if(vs.includes(b))return function(){return c.oh.apply(c,[a,b].concat(y(Na.apply(0,arguments))))};if(ws.includes(b))return function(){return c.pj.apply(c,[a,b].concat(y(Na.apply(0,arguments))))};if(qs.has(b)||rs.has(b))return function(){return c.g[a][b]}}return this.g[a][b]};
r.set=function(a,b,c){this.g[a][b]=c;Is(this,{type:"set",targetName:a,property:b,value:c})};function Ds(a,b){var c=a.M();Bs=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);ys(a);Is(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Js(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new U(2,8,c,b))}
r.oh=function(a,b){Is(this,{type:"call",targetName:a,methodName:b,args:Na.apply(2,arguments)})};r.pj=function(a,b){var c=Na.apply(2,arguments),d=new Ug,e=this.H.toString();this.H++;this.h.set(e,d);try{Is(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Cs(a){var b=Bs;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
function ys(a){var b=Bs?"connected"==Bs.status:!1;if(a.i&&!b){a.F();for(var c in a.g)a.g[c]={};As(a)}a.i=b;a.I=b?Bs.receiver.friendlyName:"";a.l.sb()}function As(a){if(a.h)for(var b=t(a.h.keys()),c=b.next();!c.done;c=b.next()){c=c.value;var d=a.h.get(c);a.h.delete(c);d.reject(new U(1,7,7E3))}}
function Is(a,b){b=js(b);var c=Bs;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},gb)}catch(d){throw b=new U(2,8,8005,d),c=new V("error",(new Map).set("detail",b)),a.A("player",c),a.Pc(),b;}}var Fs=.02,Es=!1,Bs=null,Hs=null,zs=new Set;function Gs(a){Hs?window.__onGCastApiAvailable=Hs:delete window.__onGCastApiAvailable;Hs=null;if(a)for(var b=t(zs),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Ls(a,b,c,d){d=void 0===d?!1:d;dh.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.l=this.u=this.j=null;this.C=c;this.B=d;this.A=new Map;this.g=null;window.chrome?(this.g=new xs(c,function(){return Ms(e)},function(){return Ns(e)},function(f,g){return Os(e,f,g)},function(){return Ps(e)},function(){return Qs(e)},d),Rs(this)):(this.j=this.i,this.u=this.h)}qa(Ls,dh);r=Ls.prototype;
r.destroy=function(a){this.g&&a&&this.g.Pc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.j=this.i=null;dh.prototype.release.call(this);return Promise.all(a)};r.Li=function(){return this.j};r.If=function(){return this.u};r.Xh=function(){return this.g?this.g.m&&Es:!1};r.qb=function(){return this.g?this.g.qb():!1};r.ag=function(){return this.g?this.g.ag():""};
r.cast=function(){var a=this;return Q(function(b){return 1==b.g?a.g?F(b,a.g.cast(),2):b.return():a.h?F(b,a.h.kc(),0):b.return()})};r.ig=function(a){this.g&&this.g.ig(a)};r.Ej=function(){this.g&&Ks(this.g)};r.Pc=function(){this.g&&this.g.Pc()};
r.Yh=function(a,b){b=void 0===b?!1:b;var c=this;return Q(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;if(!c.g)return d.return();c.g.Pc();return F(d,c.g.destroy(),2)}c.g=null;c.g=new xs(a,function(){return Ms(c)},function(){return Ns(c)},function(e,f){return Os(c,e,f)},function(){return Ps(c)},function(){return Qs(c)},b);c.g.init();H(d)})};
function Rs(a){a.g.init();a.m=new lb;for(var b=t(ms),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.qb()||(f=bh(f),a.l.dispatchEvent(f))});for(var d in ch)a.m.D(a.h,ch[d],function(f){a.g.qb()||a.o.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={wd:b.wd},b.wd=e,Object.defineProperty(a.j,b.wd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ss(a,f.wd)}}(b),set:function(f){return function(g){var h=f.wd;a.g.qb()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};Ts(a,
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Us(a,f)}})});Vs(a);a.l=new dh;a.l.Ge=a.j;a.o=new dh;a.o.Ge=a.u}function Vs(a){var b=new Map;Ts(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
function Ts(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
function Qs(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Qc(),startTime:null};a.i.pause();for(var c=t(os),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(ts);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(us);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Ms(a){var b=new V("caststatuschanged");a.dispatchEvent(b)}
function Ns(a){var b=new V(a.j.paused?"pause":"play");a.l.dispatchEvent(b)}
function Ps(a){for(var b=t(ts),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(os);for(d=c.next();!d.done;d=c.next())d=
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(os),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(us);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.zh(h);g&&a.h.hg(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new V("error",l);a.h.dispatchEvent(l)})}
function Ss(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.qb()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.qb()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
function Us(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.j};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.xb()};if("getDrmEngine"==b)return function(){return a.h.C};if("getAdManager"==b)return function(){return a.h.Pg()};
if("setVideoContainer"==b)return function(c){return a.h.Ch(c)};if(a.g.qb()){if("getManifest"==b||"drmInfo"==b)return function(){bb(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){bb(b+"() does not work while casting!");return Promise.resolve()}}return a.g.qb()&&0==Object.keys(a.g.g.video).length&&(qs.has(b)||rs.has(b))||!a.g.qb()?a.h[b].bind(a.h):a.g.get("player",b)}
function Os(a,b,c){a.g.qb()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}T("shaka.cast.CastProxy",Ls);Ls.prototype.changeReceiverId=Ls.prototype.Yh;Ls.prototype.forceDisconnect=Ls.prototype.Pc;Ls.prototype.suggestDisconnect=Ls.prototype.Ej;Ls.prototype.setAppData=Ls.prototype.ig;Ls.prototype.cast=Ls.prototype.cast;Ls.prototype.receiverName=Ls.prototype.ag;Ls.prototype.isCasting=Ls.prototype.qb;Ls.prototype.canCast=Ls.prototype.Xh;Ls.prototype.getPlayer=Ls.prototype.If;
Ls.prototype.getVideo=Ls.prototype.Li;Ls.prototype.destroy=Ls.prototype.destroy;function Ws(a,b,c,d){dh.call(this);var e=this;this.g=a;this.h=b;this.j=new lb;this.H={video:a,player:b};this.F=c||function(){};this.I=d||function(f){return f};this.i=null;this.G=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.u=this.l=null;this.C=new ec(function(){Xs(e)});Ys(this)}qa(Ws,dh);r=Ws.prototype;r.isConnected=function(){return this.G};r.Si=function(){return this.o};r.Bj=function(a){this.i=a};r.bi=function(){this.i=null};
r.Cj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Aj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.zj=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
r.destroy=function(){var a=this,b,c;return Q(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.C&&(a.C.stop(),a.C=null),a.g=null,a.H=null,a.F=null,a.G=!1,a.o=!0,a.l=null,a.u=null,dh.prototype.release.call(a),F(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
function Ys(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Zs(a)};b.onSenderDisconnected=function(){return Zs(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&$s(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);$s(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return at(a,
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return bt(a,e)};b.start();b=t(ms);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return ct(a,"video",e)});for(var d in ch)a.j.D(a.h,ch[d],function(e){return ct(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;dt(a)});a.j.D(a.g,"playing",function(){a.o=!1;dt(a)});a.j.D(a.g,"pause",function(){dt(a)});a.j.D(a.h,"unloading",function(){a.o=!0;dt(a)});
a.j.D(a.g,"ended",function(){(new ec(function(){a.g&&a.g.ended&&(a.o=!0,dt(a))})).da(et)})}function Zs(a){a.m=0;a.A=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;dt(a)}function dt(a){var b;Q(function(c){if(1==c.g)return F(c,Promise.resolve(),2);if(!a.h)return c.return();b=new V("caststatuschanged");a.dispatchEvent(b);ft(a)||gt(a);H(c)})}
function ht(a,b,c){var d,e,f,g,h,k,l,m,n,p;Q(function(q){switch(q.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.F(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,xa(q,5),F(q,a.h.load(b.manifest,b.startTime),7)):F(q,Promise.resolve(),3);case 7:Aa(q,3);break;case 5:return g=Ba(q),h=(new Map).set("detail",g),k=new V("error",h),a.h&&a.h.dispatchEvent(k),q.return();case 3:if(!a.h)return q.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
a.g.autoplay=f;b.manifest&&(a.g.play(),gt(a));H(q)}})}function ct(a,b,c){a.h&&(Xs(a),$s(a,{type:"event",targetName:b,event:c},a.l))}
function Xs(a){a.C.da(it);for(var b={video:{},player:{}},c=t(ns),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];a.h.U()&&ss.forEach(function(e,f){0==a.m%e&&(b.player[f]=a.h[f]())});qs.forEach(function(e,f){0==a.m%e&&(b.player[f]=a.h[f]())});if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;$s(a,{type:"update",update:b},a.l);rs.forEach(function(e,f){0==a.m%e&&(e={player:{}},e.player[f]=a.h[f](),$s(a,{type:"update",update:e},
a.l))});a.B&&(a.m+=1);ft(a)}function ft(a){return a.A&&(a.g.duration||a.h.U())?(jt(a),a.A=!1,!0):!1}function jt(a,b){var c={contentId:a.h.Qc(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);gt(a,void 0===b?0:b,c)}
function bt(a,b){var c=ks(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;ht(a,c.initState,c.appData);Xs(a);break;case "appData":a.F(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return kt(a,g,f,null)},function(h){return kt(a,g,f,h)})}}
function at(a,b){var c=ks(b.data);switch(c.type){case "PLAY":a.g.play();gt(a);break;case "PAUSE":a.g.pause();gt(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),gt(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),gt(a));break;case "STOP":a.h.kc().then(function(){a.h&&gt(a)});break;case "GET_STATUS":jt(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||gt(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.F(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&jt(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");$s(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:$s(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
function kt(a,b,c,d){a.h&&$s(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function $s(a,b,c,d){a.G&&(a=js(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function gt(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?lt:a.h.Of()?mt:a.g.paused?nt:ot,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);$s(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
T("shaka.cast.CastReceiver",Ws);Ws.prototype.destroy=Ws.prototype.destroy;Ws.prototype.setContentArtist=Ws.prototype.zj;Ws.prototype.setContentImage=Ws.prototype.Aj;Ws.prototype.setContentTitle=Ws.prototype.Cj;Ws.prototype.clearContentMetadata=Ws.prototype.bi;Ws.prototype.setContentMetadata=Ws.prototype.Bj;Ws.prototype.isIdle=Ws.prototype.Si;Ws.prototype.isConnected=Ws.prototype.isConnected;var it=.5,et=5,lt="IDLE",ot="PLAYING",mt="BUFFERING",nt="PAUSED";function pt(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(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=qt(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,u=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){q=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){u=w;break}if(-1===
q||-1===u)p=rt(d,e),a.nestedCues.push(p);else{for(;q<=u;q++)if(w=p[q]){var v=w.l,x=w.i,z=w.j,D=w.h;if(v!=h||x!=k||z!=l||D!=m)n.payload&&a.nestedCues.push(n),n=qt(d,e,v,x,z,D),h=v,k=x,l=z,m=D;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=rt(d,e),a.nestedCues.push(n));n=qt(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function qt(a,b,c,d,e,f){a=new Ae(a,b,"");c&&a.textDecoration.push(Xe);d&&(a.fontStyle=We);a.color=e;a.backgroundColor=f;return a}
function rt(a,b){a=new Ae(a,b,"");a.lineBreak=!0;return a}function st(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function tt(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.o="black";this.u=this.A=null;ut(this)}function vt(a,b,c){var d="CC"+((a.C<<1|a.B)+1),e=new Ae(b,c,"");e.lineInterpretation=1;var f=wt.get(a.g);f&&(e.line=f);null!=a.u&&null!=a.A&&(e.position=10+Math.min(70,10*a.u)+2.5*a.A);(b=pt(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=wt.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function ut(a){xt(a,0,15);a.g=1}
function yt(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=zt.has(c)?zt.get(c):String.fromCharCode(c);break;case 1:d=At.get(c);break;case 2:a.i[a.g].pop();d=Bt.get(c);break;case 3:a.i[a.g].pop(),d=Ct.get(c)}d&&a.i[a.g].push(new st(d,a.m,a.j,a.o,a.l))}}function Dt(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function xt(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
var zt=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"]]),At=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"]]),Bt=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"]]),Ct=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"]]),wt=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 Et(a,b){this.h=0;this.o=new tt(a,b);this.i=new tt(a,b);this.g=this.j=new tt(a,b);this.l=0;this.m=null}function Ft(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=vt(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,xt(c,0,15),c=a.j,c.g=0<c.h?c.h:0,xt(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Gt(a){a.h=1;a.g=a.j;a.g.h=0}function Ht(a){cb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var It="black green blue cyan red yellow magenta black".split(" "),Jt="white green blue cyan red yellow magenta white_italics".split(" ");function Kt(a,b){this.I=b;this.M=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.u="black";Lt(this)}function Lt(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Mt())}function Mt(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Nt(a,b){Ot(a)&&(a.i[a.h][a.g]=new st(b,a.C,a.A,a.u,a.B),a.g++)}function Ot(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}Kt.prototype.isVisible=function(){return this.l};
function Pt(a){for(var b=0,c=1;16>c;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=Mt()}
function Qt(a,b,c){var d=new Ae(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Ce;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.M;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?zd:2;switch(a.G){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=pt(d,"svc"+c,a.i,a.j,b))a.j=b;return c}Kt.prototype.display=function(){this.l=!0};function Rt(){this.i=[];this.h=null;this.g=0}function St(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Tt(a.h)),a.h=null,a.g=0))}function Tt(a){this.g=0;this.h=a}Tt.prototype.ta=function(){return this.g<this.h.length};Tt.prototype.Ba=function(){return this.g};function Ut(a){if(!a.ta())throw new U(2,2,3E3);return a.h[a.g++]}Tt.prototype.skip=function(a){if(this.g+a>this.h.length)throw new U(2,2,3E3);this.g+=a};
Tt.prototype.qh=function(a){if(0>this.g-a)throw new U(2,2,3E3);this.g-=a};function Vt(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
function Wt(a,b,c,d){if(!a.g)return[];if(24==c)return c=Ut(b).value,d=Ut(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),Nt(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!Ot(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=Qt(b,d,a.i));b.h+1>=b.o?Pt(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=Qt(b,d,a.i));b.i[b.h]=Mt();b.g=0;break;case 12:b.isVisible()&&
(e=Qt(b,d,a.i)),Lt(b),b.h=0,b.g=0}return e?[e]:[]}
function Xt(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Ut(b).value;b=[];c=t(Yt(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=Qt(e,d,a.i);f&&b.push(f)}Lt(e)}return b}if(137===c)for(b=Ut(b).value,b=t(Yt(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=Ut(b).value;b=null;c=t(Yt(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Qt(e,d,a.i)),e.l=!1;return b?
[b]:[]}if(139===c){c=Ut(b).value;b=null;c=t(Yt(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Qt(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(140===c)return b=Ut(b).value,Zt(a,b,d);if(143===c)return d=Zt(a,255,d),$t(a),d;if(144===c)b.skip(1),d=Ut(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Ut(b).value,c=Ut(b).value,b.skip(1),a.g&&(b=au((c&48)>>4,(c&12)>>2,c&3),a.g.B=au((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=Ut(b).value,b=Ut(b).value,a.g&&(a=
a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),b.skip(1),d=Ut(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];e||(f=new Kt(c,a.i),f.j=d,a.h[c]=f);d=Ut(b).value;f=Ut(b).value;var g=Ut(b).value,h=Ut(b).value,k=Ut(b).value;b=Ut(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
function Yt(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Zt(a,b,c){var d=[];b=t(Yt(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=Qt(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function $t(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function au(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return bu[a<<2|b<<1|c]}
var cu=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"]]),bu="black blue green cyan red magenta yellow white".split(" ");function du(){this.h=[];this.g=[];this.i=new Rt;this.l=0;this.m=new Map([["CC1",new Et(0,0)],["CC2",new Et(0,1)],["CC3",new Et(1,0)],["CC4",new Et(1,1)]]);this.u=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;eu(this)}du.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;eu(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())$t(b.value)};
function eu(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,ut(c.i),ut(c.j),ut(c.o);a.B=!0}
du.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Ch(a,0);if(!(8>a.getLength())&&181===a.X()&&49===a.na()&&1195456820===a.S()&&3===a.X()&&(c=a.X(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.X(),f=(e&4)>>2,g=a.X(),h=a.X();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,mb:g,Mb: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})))}};
du.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=fu(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())St(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=gu(this,d.value),b.push.apply(b,y(d));this.i.i=[];this.h=[];this.g=[];return b};
function fu(a,b){var c=b.type;if(16===(b.mb&112)){var d=b.mb>>3&1;0===c?a.o=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.o))+1);c=a.m.get(d);if(255===b.mb&&255===b.Mb||!b.mb&&!b.Mb||!hu(b.mb)||!hu(b.Mb))return 45<=++a.l&&eu(a),null;a.l=0;b.mb&=127;b.Mb&=127;var e=b.mb;if(1<=e&&15>=e||!b.mb&&!b.Mb)return null;e=null;if(16===(b.mb&112))a:{a.A.add(d),d=b.mb;a=b.Mb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
null;var g=95<a?a-96:a-64;13>=g?d=Jt[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,Dt(g,c,1+g.g-g.h,g.h),xt(g,0,c-1),xt(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(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",yt(c.g,0,32),d=!1,b=Jt[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=It[(a&
14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))yt(c.g,1,a);else if(18===(d&246)&&32===(a&224))yt(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Mb){case 32:Gt(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Ft(c,2,a);break;case 38:d=Ft(c,3,a);break;case 39:d=Ft(c,4,a);break;case 40:yt(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:ut(c.o);Ht(c);break;case 43:Ht(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=vt(b,c.l,a));xt(b,0,15);break;case 45:b=
c.g;3!==c.h?d=null:(d=vt(b,c.l,a),e=b.g-b.h+1,Dt(b,e-1,e,b.h),xt(b,0,e-1),xt(b,b.g,15-b.g),c.l=a);break;case 46:xt(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=vt(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Gt(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.A=a-32)}e=null}else a=b.Mb,yt(c.g,0,b.mb),yt(c.g,0,a);return e}
function gu(a,b){var c=[];try{for(;b.ta();){var d=Ut(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Ut(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Vt(e));for(var g=a.j.get(e),h=b.Ba();b.Ba()-h<f;){e=g;var k=b,l=Ut(k),m=l.value,n=l.pts;if(16===m){var p=Ut(k);m=m<<16|p.value}if(0<=m&&31>=m)var q=Wt(e,k,m,n);else if(128<=m&&159>=m)q=Xt(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&
255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&(127===k?Nt(e.g,"\u266a"):Nt(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&Nt(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(cu.has(k)){var u=cu.get(k);Nt(e.g,u)}else Nt(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?Nt(e.g,"_"):Nt(e.g,"[CC]"));q=[]}c.push.apply(c,y(q))}}}}catch(w){if(w instanceof U&&3E3===w.code)cb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
else throw w;}return c}function hu(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}du.prototype.getStreams=function(){return Array.from(this.A)};T("shaka.cea.CeaDecoder",du);vd=function(){return new du};function iu(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(y(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function ju(){this.j=new Map;this.i=this.h=0;this.g=ku}
ju.prototype.init=function(a){function b(f){f=f.name;lu.has(f)&&(c.g=lu.get(f))}var c=this,d=[],e=[];(new Fh).box("moov",Kh).box("mvex",Kh).R("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.S();g=g.S();c.h=f;c.i=g}).box("trak",Kh).R("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.S();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.na();g.na();g.na();g.na();d.push(h)}).box("mdia",Kh).R("mdhd",
function(f){f=Yi(f.reader,f.version);e.push(f.timescale)}).box("minf",Kh).box("stbl",Kh).R("stsd",Mh).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",Nh).box("sinf",Kh).box("frma",function(f){f=aj(f.reader).codec;lu.has(f)&&(c.g=lu.get(f))}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new U(2,2,2010);this.g==ku&&bb("Unable to determine bitstream format for CEA parsing!");
d.forEach(function(f,g){c.j.set(f,e[g])})};
ju.prototype.parse=function(a){var b=this;if(this.g==ku)return[];var c=[],d=0,e=[];(new Fh).box("moof",function(f){d=f.start;e=[];Kh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,ld:b.h,md:b.i,lh:[],timescale:9E4});Kh(f)}).R("trun",function(f){var g=e[e.length-1];f=Zi(f.reader,f.version,f.flags);g.lh.push(f)}).R("tfhd",function(f){var g=e[e.length-1];f=Wi(f.reader,f.flags);g.ld=f.ld||b.h;g.md=f.md||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).R("tfdt",function(f){var g=e[e.length-
1];f=Xi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Ba(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw bb("Unable to find base media decode time for CEA captions!"),new U(2,2,2010);f.reader.seek(h);mu(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.ld,l.md,g,l.lh,c)}}).parse(a,!1);return c};
function mu(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.fg});n=[].concat.apply([],y(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].nf);b.ta();){g=b.S();var p=b.X(),q=null;q=!1;h=1;switch(a.g){case nu:q=p&31;q=6==q;break;case ou:h=2;b.skip(1);q=p>>1&63;q=39==q||40==q;break;case pu:h=2;b.skip(1);q=p>>1&63;q=23==q||24==q;break;default:return}if(q)for(p=0,l<n.length&&(p=n[l].ye||0),p=(c+p)/d,h=t(iu(b.Cb(g-h))),q=h.next();!q.done;q=h.next())k.push({packet:q.value,pts:p});else try{b.skip(g-
h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].gg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}T("shaka.cea.Mp4CeaParser",ju);var ku=0,nu=1,ou=2,pu=3,lu=(new Map).set("avc1",nu).set("avc3",nu).set("dvav",nu).set("dva1",nu).set("hev1",ou).set("hvc1",ou).set("dvh1",ou).set("dvhe",ou).set("vvc1",pu).set("vvi1",pu).set("dvc1",pu).set("dvi1",pu);wd("video/mp4",function(){return new ju});function qu(){this.g=null}qu.prototype.init=function(){};qu.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Ak;var b=[];a=Qb(a);if(!Ik(a))return b;a=this.g.parse(a);var c=a.od(),d=a.be();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(iu(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
T("shaka.cea.TsCeaParser",qu);wd("video/mp2t",function(){return new qu});function ru(a){var b=0,c=Vb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Qb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function su(a){a=Tc(Zd(a));a=ru(a).filter(function(b){return b.type===tu})[0];if(!a)return null;a=Ic(a.value,!0);return(a=Rd(a,"WRMHEADER"))?a:null}
function uu(a){try{var b=su(a);if(b)a:{for(var c=t(ae(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=t(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if("LA_URL"==h.tagName){var k=Zd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var tu=1;function vu(a,b,c){var d=wu(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new U(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.cd});if(1<f.length)throw new U(2,4,4050);f.length&&(g=xu(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.cd}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.cd?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
l.cd});f.length&&(a=yu(e,k,f,c,h),0==a.length&&(a=[Yc("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Yc(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Jg:h,Pk:e,drmInfos:a,cf:g,Og:!0}}
function zu(a,b,c,d){var e=vu(a,c,d);if(b.Og){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Og=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new U(2,4,4008);return e.Jg||b.Jg}
function Au(a){var b=ce(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Zd(b)))return b;if((b=ce(a.node,"urn:microsoft:playready","pro"))&&Zd(b))return uu(b);if(a=ce(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=Zd(a)){b=Tc(a);a=8;b=Vb(b);var c=b.getUint8(a);a+=20;0<c&&(a+=4+16*b.getUint32(a));a=Qb(b,a+4);a=Rc(a);a=Rd("<pro>"+a+"</pro>");return uu(a)}return""}
function yu(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.cd];if(h){var k;if((k=ce(g.node,"urn:microsoft:playready","pro"))&&Zd(k)){k=Zd(k);k=Tc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Rh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.cd){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Rh(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Yc(h,b,g.init||a||k||l);if(h=Bu.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function wu(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Cu(c.value))&&b.push(c);return b}
function Cu(a){var b=a.attributes.schemeIdUri,c=ie(a,"urn:mpeg:cenc:2013","default_KID"),d=ee(a,"urn:mpeg:cenc:2013","pssh").map($d),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new U(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Tc(g),keyId:null}})}catch(g){throw new U(2,4,4007);}return{node:a,cd:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
function xu(a){if(!window.crypto||!window.crypto.subtle)throw bb("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var b=ce(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new U(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new U(2,4,4051);b=ce(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new U(2,4,4051);a=b.attributes.IV;b=Pc(b.attributes.keyUriTemplate);
if(!a||!b)throw new U(2,4,4051);a=Uc(a.substr(2));if(16!=a.byteLength)throw new U(2,4,4048);return{Xi:b,iv:a}}
var Bu=(new Map).set("com.apple.fps",function(a){if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4054);if(a=ce(a.node,"https://dashif.org/CPS","Laurl"))if(a=Zd(a))return a;return""}).set("com.widevine.alpha",function(a){var b=ce(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Zd(b))?b:(a=ce(a.node,"urn:microsoft","laurl"))?Pc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Au).set("com.microsoft.playready.recommendation",Au).set("com.microsoft.playready.software",
Au).set("com.microsoft.playready.hardware",Au).set("org.w3.clearkey",function(a){var b=ce(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Zd(b))?b:(a=ce(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Zd(a))?a:""});function Du(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(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&bb("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 Eu(a,b){var c=Fu(a,b,"timescale"),d=1;c&&(d=oe(c)||1);c=Fu(a,b,"duration");var e=(c=oe(c||""))?c/d:null,f=Fu(a,b,"startNumber"),g=Number(Fu(a,b,"presentationTimeOffset"))||0,h=pe(f||"");if(null==f||null==h)h=1;f=null;if(b=Gu(a,b,"SegmentTimeline")){b=Yd(b,"S");f=d;a=a.ha.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var p=b[n],q=b[n+1],u=he(p,"t",pe),w=he(p,"d",pe),v=he(p,"r",ne);p=he(p,"k",ne)||0;null!=u&&(u-=g);if(w){u=null!=u?u:m;v=v||0;if(0>v)if(q){q=he(q,"t",pe);if(null==
q)break;else if(u>=q)break;v=Math.ceil((q-u)/w)-1}else{if(Infinity==a)break;else if(u/f>=a)break;v=Math.ceil((a*f-u)/w)-1}0<l.length&&u!=m&&(l[l.length-1].end=u/f);for(q=0;q<=v;++q)m=u+w,l.push({start:u/f,end:m/f,xg:u,Jb:p,wj:l.length+k}),u=m}}f=l}return{timescale:d,He:c,Wa:e,Ld:h,hc:g/d||0,wg:g,timeline:f}}function Hu(a,b){return[b(a.J),b(a.ga),b(a.qa)].filter(Kf)}function Fu(a,b,c){b=Hu(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 Gu(a,b,c){b=Hu(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=be(d.value,c));d=b.next());return a}
function Iu(a,b,c,d,e,f){for(var g=ie(a,"http://www.w3.org/1999/xlink","href"),h=ie(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=Td("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Wg(new U(2,4,4028));if("onLoad"!=h)return Wg(new U(2,4,4027));var p=Xc([d],[g]);return e.request(0,lh(p,b)).Ha(function(q){q=Qd(q.data,a.tagName);if(!q)return Wg(new U(2,4,4001,g));for(a.children=
[];q.children.length;){var u=q.children.shift();a.children.push(u)}u=t(Object.keys(q.attributes));for(var w=u.next();!w.done;w=u.next())w=w.value,a.attributes[w]=q.attributes[w];return Ju(a,b,c,p[0],e,f+1)})}
function Ju(a,b,c,d,e,f){f=void 0===f?0:f;if(ie(a,"http://www.w3.org/1999/xlink","href")){var g=Iu(a,b,c,d,e,f);c&&(g=g.Ha(void 0,function(){return Ju(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Xd(a)),k=h.next(),l={};!k.done;l={hd:void 0},k=h.next())l.hd=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==ie(l.hd,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.hd}}(l)):"SegmentTimeline"!=l.hd.tagName&&g.push(Ju(l.hd,b,c,d,e,f));return $g(g).Ha(function(){return a})}
;function Ku(a,b,c,d,e,f,g){var h,k=(new Fh).R("sidx",function(l){h=Lu(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new U(2,3,3004);}
function Lu(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.S();if(0==k)throw new U(2,3,3005);if(0==g.version){var l=g.reader.S();var m=g.reader.S()}else l=g.reader.bd(),m=g.reader.bd();g.reader.skip(2);var n=g.reader.na();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.S(),q=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.S();g.reader.skip(4);if(1==q)throw new U(2,3,3006);h.push(new Nj(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function Mu(a){this.h=Vb(a);this.g=new Ch(this.h,0)}Mu.prototype.ta=function(){return this.g.ta()};
function Nu(a){var b=Ou(a);if(7<b.length)throw new U(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=Ou(a);a:{d=t(Pu);for(var e=d.next();!e.done;e=d.next())if(Pb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Ba();else{if(8==b.length&&b[1]&224)throw new U(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Ba()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Ba();d=Vb(a.h,a.g.Ba(),b);a.g.skip(b);return new Qu(c,
d)}function Ou(a){var b=a.g.Ba(),c=a.g.X();if(0==c)throw new U(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Qb(a.h,b,c)}var Pu=[[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 Qu(a,b){this.id=a;this.g=b}
function Ru(a){if(8<a.g.byteLength)throw new U(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new U(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 Su(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Mu(a.g);for(var n=null,p=null;a.ta();){var q=Nu(a);if(187==q.id){var u=Tu(q);u&&(q=c*u.Jj,u=b+u.nj,null!=n&&m.push(new Nj(n+g,q+g,l,p,u-1,f,g,h,k)),n=q,p=u)}}null!=n&&m.push(new Nj(n+g,d+g,l,p,null,f,g,h,k));return m}
function Tu(a){var b=new Mu(a.g);a=Nu(b);if(179!=a.id)throw new U(2,3,3013);a=Ru(a);b=Nu(b);if(183!=b.id)throw new U(2,3,3012);b=new Mu(b.g);for(var c=0;b.ta();){var d=Nu(b);if(241==d.id){c=Ru(d);break}}return{Jj:a,nj:c}};function Uu(a,b,c){b=Gu(a,b,"Initialization");if(!b)return null;var d=a.J.Ua(),e=b.attributes.sourceURL;e&&(d=Xc(d,[Pc(e)],a.vb()));e=0;var f=null;if(b=he(b,"range",me))e=b.start,f=b.end;c=new Lj(function(){return d},e,f,Vu(a),null,null,c,a.ga.encrypted);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;a.ha&&(c.g=a.ha.start+a.ha.duration);return c}
function Wu(a,b,c){var d=Number(Fu(a,Xu,"presentationTimeOffset"))||0,e=Fu(a,Xu,"timescale"),f=1;e&&(f=oe(e)||1);var g=d/f||0,h=Uu(a,Xu,c);Yu(a,h);var k=Od(a);return{rc:function(){var l=Gu(k,Xu,"RepresentationIndex");var m=k.J.Ua();l&&(l=Pc(l.attributes.sourceURL))&&(m=Xc(m,[l],k.vb()));l=Zu(k);return $u(k,b,h,m,l.start,l.end,g)}}}
function $u(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E;return Q(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Ob||!a.ha.$g,l=a.ha.start,m=a.ha.duration,n=a.J.mimeType.split("/")[1],p=b,q=null,u=[p(d,e,f,!1),"webm"==n?p(c.N(),c.Sa,c.wa,!0):null],p=null,F(G,Promise.all(u),2);w=G.h;v=w[0];x=w[1]||null;z=null;D=l-g;B=l;I=m?l+m:Infinity;if("mp4"==n)var M=Ku(v,e,d,c,D,B,I);else{M=v;var L=new Mu(x);if(440786851!=Nu(L).id)throw new U(2,3,3008);var J=Nu(L);if(408125543!=J.id)throw new U(2,
3,3009);L=J.g.byteOffset;J=new Mu(J.g);for(var K=null;J.ta();){var N=Nu(J);if(357149030==N.id){K=N;break}}if(!K)throw new U(2,3,3010);K=new Mu(K.g);N=1E6;for(J=null;K.ta();){var P=Nu(K);if(2807729==P.id)N=Ru(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new U(2,3,3003);}if(null==J)throw new U(2,3,3011);K=N/1E9;J*=K;M=Nu(new Mu(M));if(475249515!=M.id)throw new U(2,3,3007);M=Su(M,L,K,J,d,c,D,B,I)}z=M;C=t(z);for(A=C.next();!A.done;A=
C.next())E=A.value,E.codecs=a.J.codecs,E.mimeType=a.J.mimeType,E.bandwidth=a.bandwidth;h.Ed(z);q=new Sl(z);k&&q.Oc(B,I,!0);return G.return(q)})}function Xu(a){return a.dd}function Zu(a){var b=Gu(a,Xu,"RepresentationIndex");a=Fu(a,Xu,"indexRange");a=me(a||"");b&&(a=he(b,"range",me,a));return a}function Yu(a,b){av(a,b);if(!Zu(a))throw new U(2,4,4002);}
function av(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=dd&&"mp4"!=c&&"webm"!=c)throw new U(2,4,4006);if("webm"==c&&!b)throw new U(2,4,4005);}
function Vu(a){var b=a.J;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.oe,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ga.label||null,roles:a.roles||null,language:a.ga.language||null}};function bv(a,b,c){var d=Uu(a,cv,c),e=dv(a);if(!e.Wa&&!e.timeline&&1<e.Xc.length)throw new U(2,4,4002);if(!e.Wa&&!a.ha.duration&&!e.timeline&&1==e.Xc.length)throw new U(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new U(2,4,4002);var f=null,g=null;a.qa.id&&a.J.id&&(g=b.get(a.qa.id+","+a.J.id))&&(f=g.segmentIndex);var h=ev(a.ha.start,a.ha.duration,a.J.Ua,e,d,c,a.J.mimeType,a.J.codecs,a.bandwidth,a.vb);b=!f;f?f.Bd(h,a.presentationTimeline.pb()):f=new Sl(h);a.presentationTimeline.Ed(h);a.Ob&&
a.ha.$g||f.Oc(a.ha.start,a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{rc:function(){f&&0!=f.getNumReferences()||f.ke(h);return Promise.resolve(f)}}}function cv(a){return a.Zb}function dv(a){var b=fv(a);a=Eu(a,cv);var c=a.Ld;0==c&&(c=1);var d=0;a.Wa?d=a.Wa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Wa:a.Wa,startTime:d,Ld:c,hc:a.hc,timeline:a.timeline,Xc:b}}
function ev(a,b,c,d,e,f,g,h,k,l){var m=d.Xc.length;d.timeline&&d.timeline.length!=d.Xc.length&&(m=Math.min(d.timeline.length,d.Xc.length));for(var n=a-d.hc,p=b?a+b:Infinity,q=[],u=d.startTime,w={},v=0;v<m;w={Je:void 0,ze:void 0},v++){w.ze=d.Xc[v];var x=u;u=void 0;u=null!=d.Wa?x+d.Wa:d.timeline?d.timeline[v].end:x+b;w.Je=null;w=new Nj(a+x,a+u,function(z){return function(){null==z.Je&&(z.Je=Xc(c(),[z.ze.cj],l()));return z.Je}}(w),w.ze.start,w.ze.end,e,n,a,p,[],"",null,null,Oj,f);w.codecs=h;w.mimeType=
g;w.bandwidth=k;q.push(w)}return q}function fv(a){return[a.J.Zb,a.ga.Zb,a.qa.Zb].filter(Kf).map(function(b){return Yd(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Lf&&(a.Lf=!0);var c=Pc(b.attributes.media);b=he(b,"mediaRange",me,{start:0,end:null});return{cj:c,start:b.start,end:b.end}})};function gv(a,b,c,d,e,f,g,h,k){k||a.J.de||(a.J.de=Fu(a,hv,"initialization"));var l=a.J.de?iv(a,g):null,m=jv(a);kv(m);var n=Od(a);if(m.vd)return av(a,l),{rc:function(){var w=Du(m.vd,n.J.originalId,null,null,n.bandwidth||null,null);w=Xc(n.J.Ua(),[w]);return $u(n,b,l,w,0,null,m.hc)}};if(m.Wa)return d||"image"===a.ga.contentType||"text"===a.ga.contentType||(c=a.ha.start,d=a.qa.id,k=a.ha.duration,d=(d=null!=d&&f.get(d)||k)?c+d:Infinity,a.presentationTimeline.Tf(m.Wa),a.presentationTimeline.jh(c,d)),{rc:function(){return lv(n,
m,e,l,f,g,h,a.J.Ae)}};var p=null;d=d=null;a.qa.id&&a.J.id&&(d=a.qa.id+","+a.J.id,d=c.get(d))&&(p=d.segmentIndex);var q=a.ha.start,u=a.ha.duration?q+a.ha.duration:Infinity;p?(c=p,mv(c,m,q,u,l),c.Oa(a.presentationTimeline.pb())):p=new nv(m,a.J.originalId,a.bandwidth,a.J.Ua,a.vb,q,u,l,g,a.J.Ae);m.timeline&&"image"!==a.ga.contentType&&"text"!==a.ga.contentType&&a.presentationTimeline.kh(p.h?p.h.timeline:[],q);d&&a.Ob&&(d.segmentIndex=p);return{rc:function(){p instanceof nv&&0==p.getNumReferences()&&mv(p,
m,q,u,l);return Promise.resolve(p)}}}function hv(a){return a.ic}function jv(a){var b=Eu(a,hv),c=Fu(a,hv,"media"),d=Fu(a,hv,"index"),e=Fu(a,hv,"k"),f=0;e&&(f=parseInt(e,10));return{He:b.He,Wa:b.Wa,timescale:b.timescale,Ld:b.Ld,hc:b.hc,wg:b.wg,timeline:b.timeline,ec:c&&Pc(c),vd:d,mimeType:a.J.mimeType,codecs:a.J.codecs,bandwidth:a.bandwidth,dj:f}}
function kv(a){var b=a.vd?1:0;b+=a.timeline?1:0;b+=a.Wa?1:0;if(0==b)throw new U(2,4,4002);1!=b&&(a.vd&&(a.timeline=null),a.He=null,a.Wa=null);if(!a.vd&&!a.ec)throw new U(2,4,4002);}
function lv(a,b,c,d,e,f,g,h){function k(J){var K=J-v,N=K*w,P=b.He,O=K*P;"BigInt"in window&&O>Number.MAX_SAFE_INTEGER&&(O=BigInt(K)*BigInt(P));N+=p;K=N+w;P=Math.min(K,m());var R=[],S=b.dj;if(S)for(var pa=(P-N)/S,Z={},Fa=0;Fa<S;Z={Eh:void 0},Fa++){var Ia=N+pa*Fa,sa=Ia+pa;Z.Eh=Fa+1;Z=new Nj(Ia,sa,function(ka){return function(){var Ca=Du(x,D,J,ka.Eh,z,O);return Xc(B(),[Ca],I())}}(Z),0,null,d,C,p,m(),[],"",null,null,Oj,f);Z.codecs=a.J.codecs;Z.mimeType=a.J.mimeType;0==h?0<Fa&&Z.Vc():0!=Fa%h&&Z.Vc();R.push(Z)}N=
new Nj(N,P,function(){if(S)return[];var ka=Du(x,D,J,null,z,O);return Xc(B(),[ka],I())},0,null,d,C,p,m(),R,"",null,null,Oj,f,0<R.length);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.bandwidth=a.bandwidth;N.j=K;return N}function l(){var J=[Math.max(n.pb(),p),Math.min(n.cc(),m())].map(function(K){return K-p});J=[Math.ceil(J[0]/w),Math.ceil(J[1]/w)-1];a.J.cb&&J[1]++;return J.map(function(K){return K+v})}function m(){var J=null!=q&&e.get(q)||u;return J?p+J:Infinity}var n=a.presentationTimeline,p=a.ha.start,
q=a.qa.id,u=a.ha.duration,w=b.Wa,v=b.Ld,x=b.ec,z=a.bandwidth||null,D=a.J.id,B=a.J.Ua,I=a.vb,C=p-b.hc,A=l();c=a.Ob?Math.max(A[0],A[1]-c+1):A[0];g=g||A[1];A=[];for(var E=c;E<=g;++E){var G=k(E);A.push(G)}var M=new Sl(A);A=n.cc()<m();E=n.U();if(A||E){var L=Math.max(c,g+1);c=w;a.J.cb&&(c=.1);M.Ie(c,function(){var J=n.pb();M.Oa(J);var K=t(l());K.next();K=K.next().value;for(var N=[];L<=K;){var P=k(L);N.push(P);L++}return J>m()&&!N.length?null:N})}return Promise.resolve(M)}
function iv(a,b){var c=a.J.de;c||(c=Fu(a,hv,"initialization"));if(!c)return null;c=Pc(c);var d=a.J.originalId,e=a.bandwidth||null,f=a.J.Ua,g=a.vb;b=new Lj(function(){var h=Du(c,d,null,null,e,null);return Xc(f(),[h],g())},0,null,Vu(a),null,null,b,a.ga.encrypted);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;a.ha&&(b.g=a.ha.start+a.ha.duration);return b}
function nv(a,b,c,d,e,f,g,h,k,l){Sl.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.H=e;this.j=f;this.l=g;this.u=h;this.A=k;this.G=l;ov(this)}qa(nv,Sl);r=nv.prototype;r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Sl.prototype.release.call(this);this.h=null};
r.Oa=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;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
function mv(a,b,c,d,e){pv(a,e);if(a.h){c=a.h.timeline;a.h.ec!==b.ec&&(a.h.ec=b.ec);if(c.length){var f=c[c.length-1];b=b.timeline.filter(function(g){return g.end>f.end})}else b=b.timeline.slice();0<b.length&&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;ov(a)}function pv(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)&&Qj(c,b)}}
function ov(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||0>=d.end||b.push(d);a.h.timeline=b;a.Oa(a.j)}}
r.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:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
r.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.wj,f=d.xg+this.h.wg;c=this.j-this.h.hc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],p=(d.end-d.start)/d.Jb,q={},u=0;u<d.Jb;q={Ke:void 0,Fh:void 0},u++){var w=d.start+p*u,v=w+p;q.Fh=u+1;q.Ke=null;q=new Nj(this.j+w,this.j+v,function(x){return function(){if(!b.h)return[];
null==x.Ke&&(x.Ke=qv(b.h.ec,b.F,e,b.B,f,x.Fh,b.C,b.H));return x.Ke}}(q),0,null,this.u,c,this.j,this.l,[],"",null,null,Oj,this.A);q.codecs=k;q.mimeType=l;q.bandwidth=m;0==this.G?0<u&&q.Vc():0!=u%this.G&&q.Vc();n.push(q)}c=new Nj(this.j+d.start,h,function(){return 0<d.Jb||!b.h?[]:qv(b.h.ec,b.F,e,b.B,f,null,b.C,b.H)},0,null,this.u,c,this.j,this.l,n,"",null,null,Oj,this.A,0<d.Jb);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
r.Eb=function(a){ov(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function qv(a,b,c,d,e,f,g,h){a=Du(a,b,c,f,d||null,e);return Xc(g(),[a],h()).map(function(k){return k.toString()})};function rv(a){this.o=null;this.A=a;this.G=new eh;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}rv.prototype.configure=function(a){this.o=a};rv.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};rv.prototype.setManifestType=function(a){this.u=a};
function sv(a,b){var c,d,e,f,g,h,k;return Q(function(l){if(1==l.g)return c=Xc(a.i,[tv(a,b)]),d=lh(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),fh(a.G,e),xa(l,2),F(l,e.promise,4);if(2!=l.g)return f=l.h,g=Hc(f.data),h=JSON.parse(g),1==h.VERSION&&uv(a,h,f.uri),Aa(l,0);if((k=Ba(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new ec(function(){sv(a,b)});a.g.da(a.C);H(l)})}
function tv(a,b){if(!a.m.length)return b;b=new yb(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Nb(e)&&Cb(b,e);return b.toString()}function uv(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new ec(function(){sv(a,d)});if(c=b.TTL)a.C=c;a.g.da(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
function vv(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}rv.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
function wv(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Zc:void 0},f=e.next())if(g.Zc=f.value,f=b.get(g.Zc))d.push({Yf:g.Zc,location:f});else if(f=a.F.find(function(k){return function(l){return l.ek==k.Zc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].Oh?(h=new yb(h),Ab(h,f["URI-REPLACEMENT"].Oh),d.push({Yf:g.Zc,location:h.toString()})):d.push({Yf:g.Zc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new yb(k.location)).nb))return!1;return!0});d.length&&(a.B=d[0].Yf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Xc(a.i,d)};function xv(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.o=!1;this.m=new Set}r=xv.prototype;r.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=this.o=!1;this.m.clear()};r.Ki=function(){return this.l};r.Jf=function(){return this.j.slice()};r.oi=function(){return this.i};
r.Kg=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a})),d.dependencyStream&&(d.dependencyStream.matchedStreams=d.dependencyStream.matchedStreams.filter(function(e){return e!==
a}));else if(a.type==dd)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
function yv(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[zv(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Av(n),n]})),l=new Map(h.textStreams.map(function(n){return[Bv(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Cv(n),n]}));if(b){var m=Dv(dd);l.set(Bv(m),m);m=Dv("image");h.set(Cv(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Dg:c,Mh:d,Ih:e,Yg:f}}
r.gf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N,P,O,R,S,pa;return Q(function(Z){if(1==Z.g){e=fd;if(!b&&1==a.length)return f=yv(a,!1),g=f.Dg,h=f.Mh,k=f.Ih,l=f.Yg,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()),Z.s(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)q=a[p],d.m.has(q.id)||(d.m.add(q.id),-1==n&&(n=p));if(-1==n)return Z.return();u=yv(a,!0);w=u.Dg;v=u.Mh;x=u.Ih;z=u.Yg;
return F(Z,Promise.all([Ev(d,d.h,w,n,Fv,Gv,m),Ev(d,d.g,v,n,Fv,Gv,m),Ev(d,d.j,x,n,Fv,Gv,m),Ev(d,d.i,z,n,Fv,Gv,m)]),2)}D=0;B=[];if(d.g.length&&d.h.length)for(L=t(d.h),J=L.next();!J.done;J=L.next())for(K=J.value,N=t(d.g),P=N.next();!P.done;P=N.next())O=P.value,R=Zb(K.drmInfos,O.drmInfos),K.drmInfos.length&&O.drmInfos.length&&!R.length||(S=(K.bandwidth||0)+(O.bandwidth||0),K.dependencyStream&&(S+=K.dependencyStream.bandwidth||0),O.dependencyStream&&(S+=O.dependencyStream.bandwidth||0),pa=D++,B.push({id:pa,
language:K.language,disabledUntilTime:0,primary:K.primary,audio:K,video:O,bandwidth:S,drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(I=d.g.length?d.g:d.h,C=t(I),A=C.next();!A.done;A=C.next())E=A.value,G=D++,M=E.bandwidth||0,E.dependencyStream&&(M+=E.dependencyStream.bandwidth||0),B.push({id:G,language:E.language,disabledUntilTime:0,primary:E.primary,audio:E.type==e.V?E:null,video:E.type==e.la?E:null,bandwidth:M,drmInfos:E.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,
decodingInfos:[]});d.l=B;H(Z)})};
function Hv(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N;return Q(function(P){switch(P.g){case 1:b=fd;if(1==a.length)return P.return(a[0]);c=a.map(function(O){return new Map(O.filter(function(R){return R.type===b.V}).map(function(R){return[zv(R),R]}))});d=a.map(function(O){return new Map(O.filter(function(R){return R.type===b.la}).map(function(R){return[Av(R),R]}))});e=a.map(function(O){return new Map(O.filter(function(R){return R.type===b.za}).map(function(R){return[Bv(R),R]}))});
f=a.map(function(O){return new Map(O.filter(function(R){return R.type===b.$e}).map(function(R){return[Cv(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Iv(b.za),k.set(Bv(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,q=Iv(b.$e),p.set(Cv(q),q);u=new xv;return F(P,Ev(u,[],c,0,Jv,Kv,0),2);case 2:return w=P.h,F(P,Ev(u,[],d,0,Jv,Kv,0),3);case 3:return v=P.h,F(P,Ev(u,[],e,0,Jv,Kv,0),4);case 4:return x=P.h,F(P,Ev(u,[],f,0,Jv,Kv,0),5);case 5:z=P.h;D=0;if(v.length&&w.length)for(E=
t(w),G=E.next();!G.done;G=E.next())for(M=G.value,L=t(v),J=L.next();!J.done;J=L.next())K=J.value,N=D++,K.variantIds.push(N),M.variantIds.push(N);else for(B=v.concat(w),I=t(B),C=I.next();!C.done;C=I.next())A=C.value,A.variantIds=[D++];return P.return(v.concat(w).concat(x).concat(z))}})}
function Ev(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M;return Q(function(L){switch(L.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){L.s(4);break}n=m.value;return F(L,Lv(a,n,c,d,f,h,g),5);case 5:p=L.h;if(!p)throw new U(2,4,4037);m=l.next();L.s(2);break;case 4:q=t(h);for(u=q.next();!u.done;u=q.next())for(w=u.value,v=t(w),x=v.next();!x.done;x=v.next())z=x.value,(D=bw(a,z,c,e,f,h))&&b.push(D);B=t(h);for(I=B.next();!I.done;I=
B.next())for(C=I.value,A=t(C),E=A.next(),G={};!E.done;G={ng:void 0},E=A.next())if(G.ng=E.value,!cw(G.ng)&&(M=b.some(function(J){return function(K){return dw(a,J.ng,K)}}(G))))throw new U(2,4,4037);return L.return(b)}})}function Lv(a,b,c,d,e,f,g){return Q(function(h){if(1==h.g)return ew(a,c,b,0<g),b.matchedStreams?b.segmentIndex?F(h,fw(b,d+g),2):h.s(2):h.return(!1);gw(b,d,e,f,g);return h.return(!0)})}
function fw(a,b){var c,d,e,f,g,h;return Q(function(k){if(1==k.g){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 F(k,Promise.all(c),2)}if(a.segmentIndex instanceof Vl)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);H(k)})}
function bw(a,b,c,d,e,f){if(cw(b))return null;var g=d(b);ew(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return Q(function(h){if(g.segmentIndex)return h.s(0);g.segmentIndex=new Vl;return F(h,fw(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;gw(g,0,e,f,0);return g}
function gw(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;"audio"==a.type&&0==Uf(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function Fv(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};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 Jv(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set(a.keyIds);b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b}
function Gv(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);null==a.originalId?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Zb(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new U(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=Fv(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
for(var g=new Vl,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),Gv(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),Gv(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=Fv(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new Vl,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),Gv(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),Gv(a.dependencyStream,b))}
function Kv(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,y(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
function ew(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=hw(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function hw(a,b,c){var d={audio:zv,video:Av,text:Bv,image:Cv}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return dw(a,l,m)},video:function(l,m){return dw(a,l,m)},text:iw,image:jw}[c.type];for(var g={audio:kw,video:lw,text:mw,image:nw}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.u&&!cw(e)&&b.delete(d(e));return e}
function ow(a,b){return a.mimeType!=b.mimeType?!1:pw(a.codecs)===pw(b.codecs)}r.uh=function(a){this.o=a};r.Ah=function(a){this.u=a};function dw(a,b,c){return!ow(b,c)&&!a.o||b.drmInfos&&!Yb(b.drmInfos,c.drmInfos)?!1:!0}function iw(a,b){return b.language?a.forced!==b.forced||0==Uf(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function jw(){return!0}
function kw(a,b,c){var d=ow(a,b),e=ow(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Uf(a.language,b.language);e=Uf(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=qw(a.channelsCount,b.channelsCount,c.channelsCount);if(d==rw)return!0;if(d==sw)return!1;d=qw(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==rw?!0:d==sw?!1:a.bandwidth&&tw(a.bandwidth,b.bandwidth,c.bandwidth)==rw?!0:!1}
function lw(a,b,c){var d=ow(a,b),e=ow(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=qw(a.width*a.height,b.width*b.height,c.width*c.height);if(d==rw)return!0;if(d==sw)return!1;if(a.frameRate){d=qw(a.frameRate,b.frameRate,c.frameRate);if(d==rw)return!0;if(d==sw)return!1}return a.bandwidth&&tw(a.bandwidth,b.bandwidth,c.bandwidth)==rw?!0:!1}
function mw(a,b,c){var d=Uf(a.language,b.language),e=Uf(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 nw(a,b,c){return qw(a.width*a.height,b.width*b.height,c.width*c.height)==rw?!0:!1}
function Iv(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}
function Dv(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Sl([]),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 qw(a,b,c){if(b==a&&a!=c)return sw;if(c==a&&a!=b)return rw;if(b>a){if(c<=a||c-a<b-a)return rw;if(c-a>b-a)return sw}else{if(c>a)return sw;if(a-c<a-b)return rw;if(a-c>a-b)return sw}return uw}function tw(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?rw:b<a?sw:uw}function cw(a){switch(a.type){case dd:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
function Av(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,pw(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 zv(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,pw(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function Bv(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function Cv(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function pw(a){if(!vw.has(a)){var b=sf(a);vw.set(a,b)}return vw.get(a)}
T("shaka.util.PeriodCombiner",xv);xv.prototype.setUseStreamOnce=xv.prototype.Ah;xv.prototype.setAllowMultiTypeVariants=xv.prototype.uh;xv.prototype.combinePeriods=xv.prototype.gf;xv.prototype.deleteStream=xv.prototype.Kg;xv.prototype.getImageStreams=xv.prototype.oi;xv.prototype.getTextStreams=xv.prototype.Jf;xv.prototype.getVariants=xv.prototype.Ki;var rw=1,uw=0,sw=-1,vw=new Map;function ww(a,b){var c=new DOMParser,d=xw.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function yw(a,b){try{var c=Kc(a);return ww(c,b)}catch(d){return null}}
var xw=new Xb(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function zw(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.pa=1;this.F=[];this.l={me:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0};this.u=new Map;this.o=new Map;this.B=new Map;this.ka=new Map;this.m=new xv;this.I=0;this.oa=new Xa(5);this.K=new ec(function(){if(a.H&&!a.g.continueLoadingWhenPaused&&(a.G.Ja(a.H,"timeupdate"),a.H.paused)){a.G.ma(a.H,"timeupdate",function(){return Aw(a)});return}Aw(a)});this.O=new eh;this.M=null;this.C=[];this.$=Infinity;this.fa=!1;this.h=null;this.L=0;
this.P=!1;this.G=new lb;this.H=null;this.T=!1;this.Z="";this.ea=function(){return!1};this.W=[]}r=zw.prototype;r.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.ea=b);c&&this.i&&this.i.presentationTimeline.U()&&this.K.sb();this.h&&this.h.configure(this.g);this.m&&(this.m.uh(this.g.dash.multiTypeVariantsAllowed&&od()),this.m.Ah(this.g.dash.useStreamOnceInPeriodFlattening))};
r.start=function(a,b){var c=this,d;return Q(function(e){if(1==e.g)return c.fa=b.isLowLatencyMode(),c.A=[a],c.j=b,F(e,Bw(c),2);d=e.h;c.j&&Cw(c,d);if(!c.j)throw new U(2,7,7001);return e.return(c.i)})};
r.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.A=[];this.i=null;this.o.clear();this.B.clear();this.u.clear();this.l={me:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0};this.m=null;null!=this.K&&(this.K.stop(),this.K=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.O.destroy()};
r.update=function(){var a=this,b;return Q(function(c){if(1==c.g)return xa(c,2),F(c,Bw(a),4);if(2!=c.g)return Aa(c,0);b=Ba(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.cc();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.I=b.endTime-a,Cw(this,0))}}};
r.banLocation=function(a){this.h&&this.h.banLocation(a)};r.setMediaElement=function(a){this.H=a};
function Bw(a){var b,c,d,e,f,g,h,k,l,m,n;return Q(function(p){if(1==p.g)return b=4,c="MPD",d=Dw(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=wv(a.h,"Location",!0),f.length&&(e=f)),g=lh(e,a.g.retryParameters),h=Date.now(),F(p,Ew(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);l=new yb(k.uri);a.Z=l.g.toString();return F(p,Fw(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.oa.sample(1,n);return p.return(n)})}
function Fw(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u;return Q(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=Kn;if(f!=g){sb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=yw(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=Lc(h.outerHTML)}k=Qd(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Ln;l!=m&&l(k);if("Patch"===d)return w.return(Gw(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(Hw(a,k,c));
p=a.g.dash.xlinkFailGracefully;q=Ju(k,a.g.retryParameters,p,c,a.j.networkingEngine);fh(a.O,q);return F(w,q.promise,2)}u=w.h;return w.return(Hw(a,u,c))})}
function Hw(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N,P,O,R,S,pa,Z,Fa,Ia,sa,ka,Ca,ra,ya,na,ta,Pa,ob,db,eb,jb,ub,ye,Oc,de,Qf,Rf;return Q(function(Zc){switch(Zc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Yd(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=$d(l))p=Xc(d,[n])[0],m&&(a.h?vv(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(q=wv(a.h,"Location",!0),0<q.length&&(d=a.A=q)):e.length&&(d=a.A=e);a.l.me=b.attributes.id||
"";a.l.Id=he(b,"publishTime",ke)||0;a.F=Yd(b,"PatchLocation");u=Promise.resolve();if((w=be(b,"ContentSteering"))&&a.j){v=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=v;else if(a.h=new rv(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=v,x=$d(w))(z=he(w,"queryBeforeStart",re,!1))?u=sv(a.h,x):sv(a.h,x);D=t(f.keys());for(B=D.next();!B.done;B=D.next())I=B.value,C=f.get(I),vv(a.h,"Location",I,C)}A=Yd(b,"BaseURL");E=!1;if(a.h)for(G=t(A),M=G.next();!M.done;M=G.next())L=M.value,
J=L.attributes.serviceLocation,K=$d(L),J&&K&&(vv(a.h,"BaseURL",J,K),E=!0);a.W=null;E&&a.h||(N=A.map($d),a.W=Xc(d,N));P=function(){return a.h&&E?wv(a.h,"BaseURL"):a.W?a.W:[]};a.l.Ua=P;O=0;A&&A.length&&(O=he(A[0],"availabilityTimeOffset",qe)||0);a.l.cb=O;a.I=he(b,"minimumUpdatePeriod",le,-1);R=he(b,"availabilityStartTime",ke);S=he(b,"timeShiftBufferDepth",le);pa=a.g.dash.ignoreSuggestedPresentationDelay;Z=null;pa||(Z=he(b,"suggestedPresentationDelay",le));Fa=a.g.dash.ignoreMaxSegmentDuration;Ia=null;
Fa||(Ia=he(b,"maxSegmentDuration",le));sa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.T=a.i.presentationTimeline.U()&&"static"==sa);a.l.type=sa;if(a.i)for(ka=a.i.presentationTimeline,Ca=ka.pb(),ra=t(a.o.values()),ya=ra.next();!ya.done;ya=ra.next())na=ya.value,na.segmentIndex&&na.segmentIndex.Oa(Ca);else ta=a.g.dash.ignoreMinBufferTime,Pa=0,ta||(Pa=he(b,"minBufferTime",le)||0),ob=0,ob=null!=Z?Math.min(Z,S||Infinity):0<a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:Math.min(1.5*
Pa,S||Infinity),ka=new xl(R,ob,a.g.dash.autoCorrectDrift);ka.Gc("static"==sa);(db=ka.U())&&!isNaN(a.g.availabilityWindowOverride)&&(S=a.g.availabilityWindowOverride);null==S&&(S=Infinity);ka.Ce(S);eb=b.attributes.profiles||"";a.l.profiles=eb.split(",");jb={Ob:"static"!=sa,presentationTimeline:ka,qa:null,ha:null,ga:null,J:null,bandwidth:0,Lf:!1,cb:O,Wb:null,profiles:eb.split(","),roles:null,vb:function(){return""}};return F(Zc,u,2);case 2:a.L=0;ub=Iw(a,jb,P,b,!1);ye=ub.duration;Oc=ub.periods;("static"!=
sa||a.T)&&ub.Mg||ka.bb(ye||Infinity);a.P&&a.fa&&ka.vh(a.$);ka.Tf(Ia||1);a.P&&a.fa&&(de=null!=Z?Z:a.g.defaultPresentationDelay,ka.jg(de));if(!a.i)return F(Zc,a.m.gf(Oc,jb.Ob),6);a.i.periodCount=Oc.length;a.i.gapCount=a.L;return F(Zc,Jw(a,Oc,!1),4);case 6:a.i={presentationTimeline:ka,variants:a.m.l,textStreams:a.m.Jf(),imageStreams:a.m.i,offlineSessionIds:[],sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Kw(b),nextUrl:Lw(b),periodCount:Oc.length,
gapCount:a.L,isLowLatency:a.P,startTime:null};if(!ka.Kh()){Zc.s(7);break}Qf=Yd(b,"UTCTiming");return F(Zc,Mw(a,P,Qf),8);case 8:Rf=Zc.h;if(!a.j)return Zc.return();ka.wh(Rf);case 7:ka.ie(),a.m&&!a.i.presentationTimeline.U()&&a.m.release();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),Nw(a),H(Zc)}})}function Jw(a,b,c){var d;return Q(function(e){if(1==e.g)return F(e,a.m.gf(b,!0,c),2);a.i.variants=a.m.l;d=a.m.Jf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
function Gw(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J;return Q(function(K){if(1==K.g){c=b.attributes.mpdId;d=he(b,"originalPublishTime",ke);if(!c||c!==a.l.me||d!==a.l.Id)throw a.F=[],new U(1,4,4052);e=[];f=[];g=new Set;h=t(Xd(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=te(l.attributes.sel||""),n=m[m.length-1],p=$d(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.ac){q=$d(l)||"";var N=le(q);if(null!=N){a.l.Wb=N;for(var P=t(a.u.values()),O=P.next();!O.done;O=P.next())O.value.Wb=
N}}else if("type"===n.ac){a.i.presentationTimeline.Gc("static"==p);a.l.type=p;N=t(a.u.values());for(P=N.next();!P.done;P=N.next())P.value.Ob="dynamic"==p;"static"==p&&(a.I=-1)}else"publishTime"===n.ac?a.l.Id=ke(p)||0:null===n.ac&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)ue(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&Ow(a,n.id);else if("SegmentTemplate"===n.name){P=te(l.attributes.sel||"");N=P[P.length-1];if(N.ac){P=Pw(a,P);O=$d(l)||
"";for(var R=t(P),S=R.next();!S.done;S=R.next())S=a.u.get(S.value),we(S.J.ic,l.tagName,N.ac,O);N=P}else N=[];u=N;w=t(u);for(v=w.next();!v.done;v=w.next())x=v.value,g.add(x)}else if("SegmentTimeline"===n.name||"S"===n.name){N=te(l.attributes.sel||"");N=Pw(a,N);P=t(N);for(O=P.next();!O.done;O=P.next())O=a.u.get(O.value),O=Gu(O,hv,"SegmentTimeline"),R=Yd(O,"S"),ue(R,l),O.children=R;z=N;D=t(z);for(B=D.next();!B.done;B=D.next())I=B.value,g.add(I)}C=t(g);for(A=C.next();!A.done;A=C.next())E=A.value,Qw(a,
E);G=t(f);for(M=G.next();!M.done;M=G.next())L=M.value,e.push.apply(e,y(Rw(a,L)));if(!e.length)return K.s(2);a.i.periodCount+=e.length;a.i.gapCount=a.L;return F(K,Jw(a,e,!0),2)}"static"==a.l.type&&(J=a.l.Wb,a.i.presentationTimeline.bb(J||Infinity));H(K)})}
function Rw(a,b){return Iw(a,{Ob:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,qa:null,ha:null,ga:null,J:null,bandwidth:0,Lf:!1,cb:a.l.cb,profiles:a.l.profiles,Wb:a.l.Wb,roles:null,vb:function(){return""}},a.l.Ua,b,!0).periods}function Ow(a,b){a.i.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);Gu(e,hv,"SegmentTimeline").children=[];Qw(a,d);a.u.delete(d)}a.C=a.C.filter(function(f){return f!==b})}
function Pw(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(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.qa.id===c&&a.ga.id===d&&a.J.id&&b.push(c+","+a.J.id);else if(-1<e)for(d=t(a.u.values()),a=d.next();!a.done;a=d.next())a=a.value,a.qa.id===c&&a.ga.position===e&&a.J.id&&b.push(c+
","+a.J.id);return b}function Qw(a,b){var c=a.u.get(b),d=a.o.get(b);d.segmentIndex&&d.segmentIndex.Oa(a.i.presentationTimeline.pb());try{var e=gv(c,function(f,g,h,k){return Sw(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.ka,c.J.aesKey,null,!0);d.createSegmentIndex=function(){return Q(function(f){if(1==f.g)return d.segmentIndex?f.s(0):F(f,e.rc(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.J.contentType,b!=dd&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
function Kw(a){var b=be(a,"ServiceDescription");if(!b)return null;a=be(b,"Latency");b=be(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 Lw(a){a=Yd(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
function Iw(a,b,c,d,e){var f=b.Wb;f||(f=he(d,"mediaPresentationDuration",le),a.l.Wb=f);var g=0;a.i&&a.i.presentationTimeline&&a.T&&(g=a.i.presentationTimeline.Hb());var h=[],k=g;d=Yd(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=he(m,"start",le,k),q=m.attributes.id,u=he(m,"duration",le);p=0==l&&0==p&&a.T?g:p;var w=null;if(n){var v=he(n,"start",le);null!=v&&(w=v-p+g)}else null!=f&&(w=f-p+g);v=gd;w&&u&&Math.abs(w-u)>v&&w>u&&a.L++;null==w&&(w=u);if(!(null!==a.M&&null!==q&&null!==p&&p<
a.M)||a.C.includes(q)||l+1==d.length){null!==p&&(null===a.M||p>a.M)&&(a.M=p);k=Tw(a,b,c,{start:p,duration:w,node:m,$g:null==w||!n});h.push(k);b.qa.id&&w&&a.ka.set(b.qa.id,w);if(null==w){k=null;break}k=p+w}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(x){return x.id});return null!=f?{periods:h,duration:f+g,Mg:!1}:{periods:h,duration:k,Mg:!0}}
function Nw(a){var b=Array.from(a.B.keys()).filter(function(h){return!a.C.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.B.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.o.get(f);g&&(g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Kg(g,c),a.o.delete(f)))}d&&a.B.delete(c)}}
function Tw(a,b,c,d){b.qa=Uw(a,d.node,null,c);b.ha=d;b.qa.cb=b.cb;b.qa.id||(b.qa.id="__shaka_period_"+d.start);var e=Yd(d.node,"EventStream");c=b.presentationTimeline.pb();e=t(e);for(var f=e.next();!f.done;f=e.next())Vw(a,d.start,d.duration,f.value,c);c=Yd(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=Ww(a,e)))b.vb=e;c=Yd(d.node,"AdaptationSet").map(function(q,u){return Xw(a,b,u,q)}).filter(Kf);if(b.Ob){e=
[];f=t(c);for(var g=f.next();!g.done;g=f.next()){g=t(g.value.rj);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new U(2,4,4018);}e=new Map;f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.ei),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={og:void 0},m=l.next())if(n.og=m.value,e.has(n.og.originalId)){f||
(f=Yd(d.node,"AdaptationSet").map(function(q,u){return Xw(a,b,u,q)}).filter(Kf));m=t(f);for(var p=m.next();!p.done;p=m.next())if(p=p.value.streams.find(function(q){return function(u){return u.originalId==q.og.originalId}}(n)))p.dependencyStream=e.get(p.originalId),k.push(p)}k.length&&h.streams.push.apply(h.streams,y(k))}d=c.filter(function(q){return!q.vg});c=c.filter(function(q){return q.vg});if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next())for(e=e.value,f=e.vg.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())Kg(k.value,e.streams);c=Yw(a.g.disableAudio,d,"audio");e=Yw(a.g.disableVideo,d,"video");f=Yw(a.g.disableText,d,dd);d=Yw(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.qa.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}
function Yw(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 Xw(a,b,c,d){function e(J){var K=J.attributes["dvb:fontFamily"];J=J.attributes["dvb:url"];K&&J&&(J=Xc(b.ga.Ua(),[J],b.vb()),a.j.addFont(K,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.ga=Uw(a,d,b.qa,null);b.ga.position=c;var h=!1;c=Yd(d,"Role");var k=c.map(function(J){return J.attributes.value}).filter(Kf),
l=void 0,m=b.ga.contentType==dd;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var p=n.attributes.schemeIdUri;if(null==p||"urn:mpeg:dash:role:2011"==p)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var q=Yd(d,"EssentialProperty");c=null;var u=!1;n=null;p=!1;q=t(q);for(var w=q.next();!w.done;w=q.next()){w=w.value;var v=w.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==v)c=w.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==
v)var x=g(parseInt(w.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==v)var z=f(parseInt(w.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v&&a.g.dash.enableFastSwitching?u=!0:"urn:dvb:dash:fontdownload:2014"==v?e(w):"urn:mpeg:dash:urlparam:2014"==v?(n=Ww(a,w))||(p=!0):p=!0)}if(p)return null;var D=null;p=Yd(d,"SupplementalProperty");p=t(p);for(q=p.next();!q.done;q=p.next())q=q.value,w=q.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==
w?D=parseInt(q.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?x=g(parseInt(q.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?z=f(parseInt(q.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==w?e(q):"urn:mpeg:dash:urlparam:2014"==w&&(n=Ww(a,q));n&&(b.vb=n);n=Yd(d,"Accessibility");var B=new Map,I;n=t(n);for(p=n.next();!p.done;p=n.next())if(q=p.value,p=q.attributes.schemeIdUri,q=q.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=p||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=
p||a.g.disableText)"urn:mpeg:dash:role:2011"==p?null!=q&&(k.push(q),"captions"==q&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==q?I="visually impaired":"2"==q&&(I="hard of hearing"));else if(p=1,null!=q)for(q=t(q.split(";")),w=q.next();!w.done;w=q.next()){v=w.value;var C=w=void 0;v.includes("=")?(v=v.split("="),w="svc"+v[0],C=v[1].split(",")[0].split(":").pop()):(w="svc"+p,p++,C=v);B.set(w,Of(C))}else B.set("svc1","und");else if(p=1,null!=q)for(q=q.split(";"),w=t(q),v=w.next();!v.done;v=
w.next()){C=v.value;var A=v=void 0;C.includes("=")?(C=C.split("="),v=C[0].startsWith("CC")?C[0]:"CC"+C[0],A=C[1]||"und"):(v="CC"+p,2==q.length?p+=2:p++,A=C);B.set(v,Of(A))}else B.set("CC1","und");n=Yd(d,"ContentProtection");var E=vu(n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.ga.encrypted=0<n.length;var G=Of(b.ga.language||"und"),M=b.ga.label,L=new Map;d=Yd(d,"Representation");if(!a.g.ignoreSupplementalCodecs){n=[];p=t(d);for(q=p.next();!q.done;q=p.next())if(w=q.value,q=ie(w,"urn:scte:dash:scte214-extensions",
"supplementalCodecs"))w=Nd(w),w.attributes.codecs=q.split(" ").join(","),w.attributes.id&&(w.attributes.supplementalId=w.attributes.id+"_supplementalCodecs"),n.push(w);d.push.apply(d,y(n))}n=d.map(function(J){var K=Zw(a,b,E,l,G,M,h,k,B,J,I,D);return K&&(K.hdr=K.hdr||x,K.colorGamut=K.colorGamut||z,K.fastSwitching=u,J=J.attributes.dependencyId)?(K.baseOriginalId=J,L.set(J,K),null):K}).filter(function(J){return!!J});if(0==n.length&&0==L.size){c="image"==b.ga.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||
m||c)return null;throw new U(2,4,4003);}if(!b.ga.contentType||"application"==b.ga.contentType)for(b.ga.contentType=$w(n[0].mimeType,n[0].codecs),m=t(n),p=m.next();!p.done;p=m.next())p.value.type=b.ga.contentType;m=b.ga.id||"__fake__"+a.pa++;p=t(n);for(q=p.next();!q.done;q=p.next()){q=q.value;w=t(E.drmInfos);for(v=w.next();!v.done;v=w.next())v=v.value,v.keyIds=v.keyIds&&q.keyIds?new Set([].concat(y(v.keyIds),y(q.keyIds))):v.keyIds||q.keyIds;q.groupId=m}d=d.map(function(J){return J.attributes.supplementalId||
J.attributes.id}).filter(Kf);return{id:m,contentType:b.ga.contentType,language:G,Qk:h,streams:n,drmInfos:E.drmInfos,vg:c,rj:d,ei:L}}
function Ww(a,b){if((b=ce(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&he(b,"useMPDUrlQuery",re,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.Z:c.split("&").map(function(d){if("$querypart$"==d)return a.Z;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new Eb(a.Z)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
function Zw(a,b,c,d,e,f,g,h,k,l,m,n){b.J=Uw(a,l,b.ga,null);var p=b.J.id;a.$=Math.min(a.$,b.J.cb);a.P=0<a.$;if(!ax(b.J))return null;var q=b.ha.start;b.bandwidth=he(l,"bandwidth",oe)||0;b.roles=h;var u=Yd(l,"SupplementalProperty"),w=Yd(l,"EssentialProperty"),v=Yd(l,"ContentProtection");l=null;var x=w.find(function(P){return"urn:mpeg:dash:urlparam:2014"==P.attributes.schemeIdUri});x?l=Ww(a,x):(x=u.find(function(P){return"urn:mpeg:dash:urlparam:2014"==P.attributes.schemeIdUri}))&&(l=Ww(a,x));l&&(b.vb=
l);x=b.J.contentType;l=x==dd||"application"==x;x="image"==x;v.length&&(b.ga.encrypted=!0);try{var z=void 0;if(c.cf){var D=b.J.Ua,B=b.vb,I=Xc(D(),[c.cf.Xi],B()),C=lh(I,a.g.retryParameters);z={bitsKey:128,blockCipherMode:"CBC",iv:c.cf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var P,O,R;return Q(function(S){if(1==S.g)return F(S,Ew(a,C,6),2);if(3!=S.g){P=S.h;if(!P.data||16!=P.data.byteLength)throw new U(2,4,4049);O={name:"AES-CBC"};R=z;return F(S,window.crypto.subtle.importKey("raw",P.data,O,
!0,["decrypt"]),3)}R.cryptoKey=S.h;z.fetchKey=void 0;H(S)})}}}b.J.aesKey=z;D=function(P,O,R,S){return Sw(a,P,O,R,S)};if(b.J.dd)var A=Wu(b,D,z);else if(b.J.Zb)A=bv(b,a.o,z);else if(b.J.ic)A=gv(b,D,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.ka,z,n,!1);else{var E=b.ha.duration||0,G=b.J.Ua,M=b.J.mimeType,L=b.J.codecs;A={rc:function(){var P=Ul(q,E,G());P.Eb(function(O){O.mimeType=M;O.codecs=L});return Promise.resolve(P)}}}}catch(P){if((l||x)&&4002==P.code)return null;throw P;}n=zu(v,c,a.g.ignoreDrmInfo,
a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);v=!1;u.some(function(P){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==P.attributes.schemeIdUri&&"JOC"==P.attributes.value})&&(v=!0);u=!1;l&&(u=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var J;if(x&&((w=w.find(function(P){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(P.attributes.schemeIdUri)}))&&(J=w.attributes.value),!J))return null;var K;l=b.J.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"))&&(K="PQ");w=b.J.id?b.qa.id+","+b.J.id:"";a.F.length&&p&&a.u.set(b.qa.id+","+p,bx(b));var N=w&&a.o.has(w)?a.o.get(w):{id:a.pa++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){N.segmentIndex&&(N.segmentIndex.release(),N.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:l,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,
width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ga.language,label:f,type:b.ga.contentType,primary:g,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:u,channelsCount:b.J.oe,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:v,closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([lf(b.J.mimeType,
b.J.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};N.createSegmentIndex=function(){var P;return Q(function(O){if(1==O.g){if(N.segmentIndex)return O.s(0);P=N;return F(O,A.rc(),3)}P.segmentIndex=O.h;H(O)})};w&&b.Ob&&!a.o.has(w)&&(b=b.qa.id||"",a.B.has(b)||a.B.set(b,[]),a.o.set(w,N),a.B.get(b).push(w));return N}
function bx(a){function b(c){if(!c)return null;c=Od(c);c.dd=null;c.Zb=null;c.ic=ze(c.ic);return c}a=Od(a);a.qa=b(a.qa);a.ga=b(a.ga);a.J=b(a.J);a.ha&&(a.ha=Od(a.ha),a.ha.node=null);return a}
function Aw(a){var b,c;return Q(function(d){switch(d.g){case 1:return b=0,xa(d,2),F(d,Bw(a),4);case 4:b=d.h;Aa(d,3);break;case 2:if(c=Ba(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();Cw(a,b);H(d)}})}function Cw(a,b){if(!(0>a.I)){var c=a.I;0<=a.g.updatePeriod&&(c=a.g.updatePeriod);a.K.da(Math.max(c-b,Ya(a.oa)))}}
function Uw(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,oe:null,audioSamplingRate:null,cb:0,Ae:0,encrypted:!1};d=d||c.Ua;var e=b.attributes.id,f=b.attributes.supplementalId,g=Yd(b,"BaseURL"),h,k=!1;if(a.h)for(var l=t(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=$d(n);m&&n&&(vv(a.h,e,m,n),k=!0)}k&&a.h||(h=g.map($d));l=b.attributes.contentType||c.contentType;m=b.attributes.mimeType||c.mimeType;n=
wm([b.attributes.codecs||c.codecs]).join(",");var p=he(b,"frameRate",se)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,u=cx(Yd(b,"InbandEventStream"),c.emsgSchemeIdUris),w=Yd(b,"AudioChannelConfiguration");w=dx(w)||c.oe;var v=he(b,"audioSamplingRate",pe)||c.audioSamplingRate;l||(l=$w(m,n));var x=be(b,"SegmentBase"),z=be(b,"SegmentTemplate"),D=x?he(x,"availabilityTimeOffset",qe)||0:0,B=z?he(z,"availabilityTimeOffset",qe)||0:0,I=g&&g.length?he(g[0],"availabilityTimeOffset",qe)||0:0;D=c.cb+I+D+
B;B=null;(I=be(b,"SegmentSequenceProperties"))&&(I=be(I,"SAP"))&&(B=he(I,"cadence",ne));I=b.attributes.label;var C=Yd(b,"Label");C&&C.length&&(C=C[0],Zd(C)&&(I=Zd(C)));return{Ua:function(){return Xc(d(),g.length?a.h&&k?wv(a.h,e):h?h:[]:[])},dd:x||c.dd,Zb:be(b,"SegmentList")||c.Zb,ic:z||c.ic,width:he(b,"width",pe)||c.width,height:he(b,"height",pe)||c.height,contentType:l,mimeType:m,codecs:n,frameRate:p,pixelAspectRatio:q,emsgSchemeIdUris:u,id:f||e,originalId:e,language:b.attributes.lang,oe:w,audioSamplingRate:v,
cb:D,de:null,Ae:B||c.Ae,label:I||null,encrypted:!1}}function cx(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 dx(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))&&0<b&&b<c.length)return c[b]}}return null}
function ax(a){var b=a.dd?1:0;b+=a.Zb?1:0;b+=a.ic?1:0;if(0==b)return a.contentType==dd||"application"==a.contentType?!0:!1;1!=b&&(a.dd&&(a.Zb=null),a.ic=null);return!0}
function ex(a,b,c,d){var e,f,g,h,k,l,m;return Q(function(n){if(1==n.g)return e=[Pc(c)],f=Xc(b(),e),g=lh(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.ea()}),fh(a.O,h),F(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=Hc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
function Mw(a,b,c){var d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.s(4);break}h=g.value;xa(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.s(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.s(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":bb("NTP UTCTiming scheme is not supported");break;default:bb("Unrecognized scheme in UTCTiming element",k)}n.s(9);break;case 7:return F(n,ex(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return F(n,ex(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:Aa(n,
3);break;case 5:Ba(n);case 3:g=f.next();n.s(2);break;case 4:return bb("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
function Vw(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=he(d,"timescale",pe)||1,k=he(d,"presentationTimeOffset",pe)||0;d=t(Yd(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=he(l,"presentationTime",pe)||0,n=he(l,"duration",pe)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(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:xe(l),eventNode:ze(l)},a.j.onTimelineRegionAdded(l))}}
function Sw(a,b,c,d,e){var f,g,h,k;return Q(function(l){if(1==l.g)return f=rh,g=e?0:1,h=Am(b,c,d,a.g.retryParameters),F(l,Ew(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function $w(a,b){b=lf(a,b);return Cf(b)?dd:a.split("/")[0]}function Ew(a,b,c,d){d||(d={});d.isPreload=a.ea();b=a.j.networkingEngine.request(c,b,d);fh(a.O,b);return b.promise}
function Dw(a){var b=a.l.Id;if(!a.l.me||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=pe(e.attributes.ttl);return!e||b+e>c}).map($d).filter(Kf);return d.length?Xc(a.A,d):[]}T("shaka.dash.DashParser",zw);Si("application/dash+xml",function(){return new zw});Si("video/vnd.mpeg.dash.mpd",function(){return new zw});function fx(){}T("shaka.dependencies",fx);fx.has=function(a){return gx.has(a)};fx.add=function(a,b){if(!hx[a])throw Error(a+" is not supported");a==ix?sb("mux.js","mux.js is no longer used in Shaka Player."):gx.set(a,function(){return b})};var ix="muxjs",hx={Rk:ix,ISOBoxer:"ISOBoxer"};fx.Allowed=hx;var gx=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function jx(a,b,c){this.type=a;this.ca=b;this.segments=c||null}function kx(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}kx.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
function lx(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function mx(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function nx(a,b,c){return(a=mx(a,b))?a.value:c||null}function ox(a,b){a=mx(a,b);if(!a)throw new U(2,4,4023,b);return a.value}function px(a,b,c){c=void 0===c?[]:c;this.ca=b;this.g=a;this.Jb=c}function qx(a,b){this.name=a;this.value=b};function rx(a,b){return a.filter(function(c){return c.name==b})}function sx(a,b){return a.filter(function(c){return ox(c,"TYPE")==b})}function tx(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function ux(a,b,c){c=void 0===c?0:c;return(a=tx(a,b))?Number(a.value):c}function vx(a,b,c){return b?wx(a,[b],c):[]}function wx(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return xx(e,c)}));return Xc(a,d)}
function xx(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new U(2,4,4039,e);}}return a};function yx(){this.g=0}
function zx(a,b){b=Hc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new U(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Ax(a,f),--a.g,Bx.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Ax(a,g);if(Cx.includes(g.name)){if(1!=b)throw new U(2,4,4017);g=
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Ax(a,k),Bx.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==nx(k,"TYPE")?f.push(k):"MAP"==nx(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new px(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new px("",d,f)));return new jx(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
g.name&&(g.attributes.push(new qx("URI",h)),d=!0)}}return new jx(b,e)}function Ax(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new U(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Fd(d);var f;(f=Hd(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Hd(d,g);)c.push(new qx(f[1],f[2]||f[3])),Gd(d)}return new kx(a,b,c,e)}
var Bx="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),Cx="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function Dx(){}function Ex(a,b){try{var c=Fx(a);return Yg({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return Wg(d)}}
function Fx(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Tc(a):e=Lc(a);return{data:e,contentType:c}}T("shaka.net.DataUriPlugin",Dx);Dx.parse=Ex;hh("data",Ex);function Gx(){var a=this;this.g=this.h=null;this.F=1;this.A=new Map;this.I=new Map;this.M=new Map;this.M.set("video",new Map);this.M.set("audio",new Map);this.M.set(dd,new Map);this.M.set("image",new Map);this.Sb=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return Hx(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){var c=ox(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=ox(b,"URI");c=Fx(c.split("?")[0]);
c=Qb(c.data);d=Yc("com.widevine.alpha",d,[{initDataType:"cenc",initData:c}]);(b=nx(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b}).set("com.microsoft.playready",function(b){var c=ox(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");b=ox(b,"URI");b=Fx(b.split("?")[0]);b=Qb(b.data);c=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);c=Rh(b,c,new Set,0);d=Yc("com.microsoft.playready",
d,[{initDataType:"cenc",initData:c}]);if(b=Rd(["<PLAYREADY>",Sc(b),"</PLAYREADY>"].join("\n")))d.licenseServerUri=uu(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=ox(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=ox(b,"URI");c=Fx(c.split("?")[0]);c=Qb(c.data);d=Yc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:c}]);(b=nx(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));
b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.Na=new Set;this.i=new Map;this.l=null;this.C="";this.Ga=new yx;this.K=-1;this.ea=Infinity;this.$=this.Ub=this.Ma=!1;this.B=new ec(function(){if(a.W&&!a.g.continueLoadingWhenPaused&&(a.T.Ja(a.W,"timeupdate"),a.W.paused)){a.T.ma(a.W,"timeupdate",function(){return Ix(a)});return}Ix(a)});this.Ea=Jx;this.m=null;this.La=0;this.o=Infinity;this.Fa=this.Aa=this.P=0;this.Z=new eh;this.G=new Map;this.H=new Map;this.sa=new Map;this.ka=new Map;
this.L=new Map;this.oa=new Map;this.pa=new Map;this.Tb=this.fa=!1;this.Pb=new Xa(5);this.j=null;this.O=!0;this.ya=new Set;this.T=new lb;this.u=this.W=null;this.Qb=function(){return!1}}r=Gx.prototype;r.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.Qb=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.U()&&this.B.sb()};
r.start=function(a,b){var c=this,d;return Q(function(e){return 1==e.g?(c.h=b,c.fa=b.isLowLatencyMode(),F(e,Kx(c,[a]).promise,2)):3!=e.g?(d=e.h,c.C=d.uri,F(e,Lx(c,d.data),3)):e.return(c.m)})};
r.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.Z&&(a.push(this.Z.destroy()),this.Z=null);this.g=this.h=null;this.Na.clear();this.m=null;this.i.clear();this.I.clear();this.H.clear();this.A.clear();this.sa.clear();this.ka.clear();this.L.clear();this.oa.clear();this.pa.clear();this.ya.clear();this.j&&this.j.destroy();this.T&&(this.T.release(),this.T=null);return Promise.all(a)};
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return Q(function(q){if(1==q.g){if(!Mx(a))return q.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Nx(a,g));return F(q,Promise.all(b),2)}Ox(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.rd});d.length&&!h&&(k=Px,Qx(a,k.Ph),l=d.map(function(u){return u.Vb}),a.l.bb(Math.min.apply(Math,y(l))),
a.h.updateDuration());h&&Rx(a);m=t(d);for(n=m.next();!n.done;n=m.next())p=n.value,p.stream.isAudioMuxedInVideo||!p.stream.segmentIndex||Ag(p.stream.segmentIndex)||a.h.disableStream(p.stream);H(q)})};function Sx(a,b){return Mx(a)?a.M.get(b.type):b.je}
function Nx(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N,P,O,R,S,pa,Z,Fa,Ia;return Q(function(sa){switch(sa.g){case 1:if(b.stream.isAudioMuxedInVideo)return sa.return();c=[];d=t(b.N());for(e=d.next();!e.done;e=d.next())f=e.value,g=new yb(f),h=g.g,b.Td&&(0<=b.Ab&&h.add("_HLS_msn",String(b.Ab)),0<=b.Bb&&h.add("_HLS_part",String(b.Bb))),b.Ud&&h.add("_HLS_skip","YES"),Nb(h)&&Cb(g,Db(h.toString())),c.push(g.toString());xa(sa,2);return F(sa,Kx(a,c,!0).promise,4);case 4:k=sa.h;Aa(sa,
3);break;case 2:throw l=Ba(sa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return sa.return();m=zx(a.Ga,k.data);if(1!=m.type)throw new U(2,4,4017);n=k.uri;n==k.originalUri||b.N().includes(n)||b.ve.push(n);p=rx(m.ca,"EXT-X-DEFINE");q=Tx(a,p,n);u=b.stream;w=Sx(a,b);return F(sa,Ux(a,m,u.mimeType,b.N,q),5);case 5:v=sa.h;x=v.keyIds;z=v.drmInfos;D=v.encrypted;B=v.Bg;u.encrypted||!D||B||(u.encrypted=!0);I=function(ka,Ca){return ka.size===Ca.size&&[].concat(y(ka)).every(function(ra){return Ca.has(ra)})};
I(u.keyIds,x)||(u.keyIds=x,u.drmInfos=z,a.h.newDrmInfo(u));C=Vx(a,m,w,q,b.N,b.type);A=C.segments;if(E=C.bandwidth)u.bandwidth=E;G=em(u);M=t(A);for(L=M.next();!L.done;L=M.next())J=L.value,J.Y&&(J.Y.Wc=G);u.segmentIndex.Bd(A,a.l.pb());A.length&&(K=ux(m.ca,"EXT-X-MEDIA-SEQUENCE",0),P=(N=tx(m.ca,"EXT-X-SKIP"))?Number(nx(N,"SKIPPED-SEGMENTS")):0,O=Wx(K,A),R=O.Ab,S=O.Bb,b.Ab=R+P,b.Bb=S,pa=w.get(K),u.segmentIndex.Oa(pa));if(Z=Ag(u.segmentIndex))b.Bc=Z.startTime,Fa=A[A.length-1],b.Vb=Fa.endTime;if(Ia=tx(m.ca,
"EXT-X-ENDLIST"))b.rd=!0;Xx(a,m);Yx(a,m.ca,u.type,q,b.N);H(sa)}})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};r.setMediaElement=function(a){this.W=a};
function Zx(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.K,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=Sx(a,f);if(g=Ag(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.K=Math.max(a.K,l));f.qf=l;break}}}}if(!(0>a.K))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,$x(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.K-d.qf,0<f&&(e.g.splice(0,f),e=Ag(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
ay(a,d,e)}
function by(a,b){if(Infinity==a.ea){b=t(b);for(var c=b.next();!c.done;c=b.next())c=Ag(c.value.stream.segmentIndex),null!=c&&null!=c.h&&(a.ea=Math.min(a.ea,c.h))}b=a.ea;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!$x(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=Ag(e);if(f)if(null==f.h)ab("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.N(),"Expect AV sync issues!");else for(ay(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.qg(b)}}}}
function ay(a,b,c){if(!(.001>Math.abs(c))){b.Bc+=c;b.Vb+=c;a=Sx(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.N()}}
function Lx(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N,P,O,R,S,pa,Z,Fa,Ia,sa,ka,Ca,ra,ya;return Q(function(na){switch(na.g){case 1:c=fd;d=zx(a.Ga,b);e=rx(d.ca,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new xl(null,0);a.l.Gc(!0);k=function(){return[a.C]};l=null;m=new Map;if(1==d.type)return a.O=!1,R=rx(d.ca,"EXT-X-DEFINE"),m=Tx(a,R,a.C),l=c.la,S="",pa=new Map,F(na,cy(a,a.F++,m,d,k,"",l,S,!0,"Media Playlist",null,pa,null,!1,null,!1),7);dy(a,e);n=rx(d.ca,"EXT-X-MEDIA");p=rx(d.ca,"EXT-X-STREAM-INF");
q=rx(d.ca,"EXT-X-IMAGE-STREAM-INF");u=rx(d.ca,"EXT-X-I-FRAME-STREAM-INF");w=rx(d.ca,"EXT-X-SESSION-KEY");v=rx(d.ca,"EXT-X-SESSION-DATA");x=rx(d.ca,"EXT-X-CONTENT-STEERING");ey(a,v);return F(na,fy(a,x),4);case 4:if(!a.g.ignoreSupplementalCodecs){z=[];D=t(p);B=D.next();for(I={};!B.done;I={Gh:void 0},B=D.next())if(C=B.value,A=nx(C,"SUPPLEMENTAL-CODECS"))I.Gh=A.split(/\s*,\s*/).map(function(ta){return ta.split("/")[0]}),E=C.attributes.map(function(ta){return function(Pa){var ob=Pa.name,db=Pa.value;"CODECS"==
ob&&(db=ta.Gh.join(","),Pa=Pa.value.split(","),1<Pa.length&&(Pa=bd("audio",Pa))&&(db+=","+Pa));return new qx(ob,db)}}(I)),z.push(new kx(C.id,C.name,E,null));p.push.apply(p,y(z));G=[];M=t(u);L=M.next();for(J={};!L.done;J={Hh:void 0},L=M.next())if(K=L.value,N=nx(K,"SUPPLEMENTAL-CODECS"))J.Hh=N.split(/\s*,\s*/).map(function(ta){return ta.split("/")[0]}),P=K.attributes.map(function(ta){return function(Pa){var ob=Pa.name;Pa=Pa.value;"CODECS"==ob&&(Pa=ta.Hh.join(","));return new qx(ob,Pa)}}(J)),G.push(new kx(K.id,
K.name,P,null));u.push.apply(u,y(G))}gy(a,p);hy(a,n);O=iy(a,u);return F(na,jy(a,p,w,n,k,a.A,O),5);case 5:return f=na.h,g=ky(a,n),F(na,ly(a,q,u),6);case 6:h=na.h;na.s(3);break;case 7:Z=na.h,a.i.set(a.C,Z),Z.stream&&(Fa=em(Z.stream),Z.stream.segmentIndex.Eb(function(ta){ta.Y&&(ta.Y.Wc=Fa)})),l=Z.stream.type,f.push({id:0,language:Of(S||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==l?Z.stream:null,video:"video"==l?Z.stream:null,bandwidth:Z.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,
decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);my(a,d);1==d.type&&(Mx(a)&&(ny(a,d),Ia=a.o,a.B.da(Ia)),sa=Array.from(a.i.values()),oy(a,sa),Rx(a),Yx(a,d.ca,l,m,k));a.m={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.u};if(a.$||!a.g.hls.disableCodecGuessing){na.s(8);
break}ka=[];Ca=t(a.m.variants);for(ra=Ca.next();!ra.done;ra=Ca.next())ya=ra.value,ya.audio&&""===ya.audio.codecs&&ka.push(ya.audio.createSegmentIndex()),ya.video&&""===ya.video.codecs&&ka.push(ya.video.createSegmentIndex());return F(na,Promise.all(ka),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),H(na)}})}
function py(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z;return Q(function(D){if(1==D.g){c=um(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return D.return(c);d=qy(a,b);e=d.segment;f=d.segmentIndex;g=e.N();h=g[0];k=new yb(h);l=k.ab.split(".").pop();return(m=ry.get(l))?D.return(um(m)):F(D,Promise.all([sy(a,e.Y,0),sy(a,e,f)]),2)}n=D.h;p=n[1].mimeType;q=n[0].data;u=n[1].data;w="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");v=["audio/mp4","video/mp4","video/iso.segment"];if(Ik(Qb(u))){var B=
u,I=a.g.disableAudio,C=a.g.disableVideo,A=a.g.disableText;var E=Qb(B);var G=(new Ak).parse(E),M=G.od();E=G.Kf();var L=[],J=!1,K=!1;if(!I)switch(M.audio){case "aac":case "aac-loas":G.fb().length&&(L.push("mp4a.40.2"),J=!0);break;case "mp3":G.fb().length&&(L.push("mp4a.40.34"),J=!0);break;case "ac3":G.fb().length&&(L.push("ac-3"),J=!0);break;case "ec3":G.fb().length&&(L.push("ec-3"),J=!0);break;case "opus":G.fb().length&&(L.push("opus"),J=!0)}if(!C)switch(M.video){case "avc":E.codec?L.push(E.codec):
L.push("avc1.42E01E");K=!0;break;case "hvc":E.codec?L.push(E.codec):L.push("hvc1.1.6.L93.90");K=!0;break;case "av1":L.push("av01.0.01M.08"),K=!0}if(L.length){I=J&&!K;C=new Map;if(K&&!A){A=new td("video/mp2t");A.i(B);B=t(A.j());for(K=B.next();!K.done;K=B.next())K=K.value,C.set(K,K);A.g()}E={type:I?"audio":"video",mimeType:"video/mp2t",codecs:L.join(", "),language:null,height:E.height,width:E.width,channelCount:null,sampleRate:null,closedCaptions:C,Nd:null,colorGamut:null,frameRate:E.frameRate}}else E=
null;if(x=E)return D.return(x)}else if(e.Y||w.includes(l)||v.includes(p))if(z=vm(q,u,a.g.disableText))return D.return(z);return p?D.return(um(p)):D.return(c)})}
function sy(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b)return l.return({mimeType:null,data:null});d=rh;e=Am(b.N(),b.uc(),b.tc(),a.g.retryParameters);f=b instanceof Nj?1:0;return F(l,ty(a,e,d,{type:f}).promise,2);case 2:g=l.h;h=g.data;if(!b.aesKey){l.s(3);break}return F(l,zm(h,b.aesKey,c),4);case 4:h=l.h;case 3:return b instanceof Nj?b.Kd(h,!0):b.Kd(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
function Rx(a){if(Mx(a)){if(a.Ea==uy){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.Vb),c=Math.min(c,e.Bc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Ce(b)}}else a.l.bb(vy(a));if(!a.l.u)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=Ag(c.stream.segmentIndex))&&
c.h&&a.l.xh(c.h);a.l.ie()}function dy(a,b){var c=(new yb(a.C)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=nx(e,"NAME");var f=nx(e,"VALUE");e=nx(e,"QUERYPARAM");d&&f&&(a.A.has(d)||a.A.set(d,f));e&&(d=c.get(e)[0])&&!a.A.has(d)&&a.A.set(e,d)}}
function Tx(a,b,c){c=(new yb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=nx(f,"NAME"),h=nx(f,"VALUE");e=nx(f,"QUERYPARAM");f=nx(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.A.get(f))&&d.set(f,e)}return d}
function gy(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=nx(d,"AUDIO");c=nx(d,"VIDEO");var f=nx(d,"SUBTITLES");d=wy(a,d);if(f){var g=bd(dd,d);a.H.set(f,g);Cd(d,g)}e&&(f=bd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.H.set(e,f));c&&(e=bd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.H.set(c,e))}}
function ey(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=nx(d,"DATA-ID");c=nx(d,"URI");var f=nx(d,"LANGUAGE");d=nx(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",vx([a.C],c,a.A)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new V("sessiondata",e);if(a.h)a.h.onEvent(c)}}
function fy(a,b){var c,d,e,f,g,h;return Q(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=nx(f,"PATHWAY-ID"),h=nx(f,"SERVER-URI"),g&&h){a.j=new rv(a.h);a.j.configure(a.g);a.j.i=[a.C];a.j.setManifestType("HLS");a.j.h=g;c=sv(a.j,h);break}return F(k,c,0)})}
function ky(a,b){var c=sx(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return xy(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=ox(d.value,"GROUP-ID");if(d=a.H.get(e))if(e=a.I.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=yy(dd,d)||zy(dd),Ay(f.stream)}}return b.filter(function(g){return g})}
function Ay(a){var b=new Set([lf(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Eb(function(c){c.mimeType&&b.add(lf(c.mimeType,a.codecs))});a.fullMimeTypes=b}
function ly(a,b,c){var d,e;return Q(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return Q(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);xa(m,2);return F(m,By(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=Ba(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Cy(a,g);return"image"!==h.stream.type?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
throw k;}})),F(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function Dy(a,b,c){b=b.filter(function(h){var k=nx(h,"URI")||"";h=nx(h,"TYPE");return"SUBTITLES"!=h&&(""!=k||"AUDIO"==h)});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=lx(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)xy(a,d[g],c,!1)}function iy(a,b){return b.map(function(c){c=Cy(a,c);return"video"!==c.stream.type?null:c.stream}).filter(function(c){return c})}
function jy(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N,P,O,R,S,pa,Z,Fa,Ia,sa,ka,Ca,ra;return Q(function(ya){switch(ya.g){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(0<c.length)){ya.s(2);break}l=t(c);m=l.next();case 3:if(m.done){ya.s(2);break}n=m.value;p=ox(n,"METHOD");q=nx(n,"KEYFORMAT")||"identity";u=null;if("NONE"==p){ya.s(4);break}if(Ey(p)){w=vx(e(),ox(n,"URI"),f);v=w.sort().join("");a.L.has(v)||(x=lh(w,a.g.retryParameters),z=ty(a,x,6).promise,a.L.set(v,z));ya.s(4);break}if("identity"==
q)return F(ya,Fy(a,n,"",e,null,f),12);D=a.Sb.get(q);if(!D){B=null;ya.s(10);break}return F(ya,D(n,"",null),11);case 11:B=ya.h;case 10:u=B;ya.s(6);break;case 12:u=ya.h;case 6:if(u){if(u.keyIds)for(I=t(u.keyIds),C=I.next();!C.done;C=I.next())A=C.value,k.add(A);h.push(u)}case 4:m=l.next();ya.s(3);break;case 2:E={};G=t(b);for(M=G.next();!M.done;M=G.next())L=M.value,J=lx(L,!a.j),E[J]?E[J].push(L):E[J]=[L];K=[];for(N in E)P=E[N],O=P[0],R=nx(O,"FRAME-RATE"),S=Number(nx(O,"AVERAGE-BANDWIDTH"))||Number(ox(O,
"BANDWIDTH")),pa=nx(O,"RESOLUTION"),Z=t(pa?pa.split("x"):[null,null]),Fa=Z.next().value,Ia=Z.next().value,sa=nx(O,"VIDEO-RANGE"),(ka=nx(O,"REQ-VIDEO-LAYOUT"))&&ka.includes(",")&&(Ca=ka.split(",").filter(function(na){return"CH-STEREO"==na||"CH-MONO"==na}),ka=Ca[0]),ka=ka||"CH-MONO",ra=Gy(a,P,d),K.push.apply(K,y(Hy(a,ra.audio,ra.video,S,Fa,Ia,R,sa,ka,h,k,g)));return ya.return(K.filter(function(na){return null!=na}))}})}
function Gy(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=nx(m,"AUDIO");var n=nx(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=nx(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(c=c.filter(function(u){return f.includes(ox(u,"GROUP-ID"))}),Dy(a,c,e));c=(e=f.sort().join(","))&&a.I.has(e)?a.I.get(e):[];g?d.audio.push.apply(d.audio,y(c)):h&&d.video.push.apply(d.video,y(c));g=!1;var q=b.map(function(u){return ox(u,
"URI")});l=d.audio.find(function(u){return u&&u.N().find(function(w){return q.includes(w)})});h=wy(a,b[0]);c=bd("video",h);(k=bd("audio",h))&&!c?(l="audio",g=0<d.audio.length):!d.audio.length&&!d.video.length&&k&&c?(l="video",h=[[c,k].join()]):d.audio.length&&l?(l="audio",g=!0):l=d.video.length&&!d.audio.length?"audio":"video";g||(a=Iy(a,b,h,l),e&&(a.stream.groupId=e),d[a.stream.type]=[a]);return d}
function wy(a,b){b=nx(b,"CODECS")||"";a.$=0<b.length;a.$||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),b=b.join(","));return wm(b.split(/\s*,\s*/))}
function Hy(a,b,c,d,e,f,g,h,k,l,m,n){for(var p=t(c),q=p.next();!q.done;q=p.next())Jy(q.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var u=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=u?u.stream:null)k.drmInfos=l,k.keyIds=m,a.g.disableIFrames||Kg(k,n);k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);p=f?f.stream.drmInfos:
null;q=u?u.stream.drmInfos:null;u=u?u.N().sort().join(","):"";var w=f?f.N().sort().join(","):"",v=[];h&&h.codecs&&v.push(h.codecs);k&&k.codecs&&v.push(k.codecs);u=[u,w,v.sort()].join("-");h&&k&&!Yb(p,q)||a.Na.has(u)||(h={id:a.F++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Na.add(u))}return e}
function hy(a,b){b=sx(b,"CLOSED-CAPTIONS");a.O=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=nx(d,"LANGUAGE");c=Of(e||"und");e||(e=nx(d,"NAME"))&&(c=e);e=ox(d,"GROUP-ID");d=ox(d,"INSTREAM-ID").replace("SERVICE","svc");a.G.get(e)||a.G.set(e,new Map);a.G.get(e).set(d,c)}}
function xy(a,b,c,d){d=void 0===d?!0:d;for(var e=[],f=[],g=new Map,h=t(b),k=h.next();!k.done;k=h.next()){var l=k.value;k=d?ox(l,"URI"):nx(l,"URI")||"shaka://hls-muxed";l=ox(l,"GROUP-ID");e.push(k);f.push(l);g.set(l,k)}d=f.sort().join(",");k=b[0];b="";h=ox(k,"TYPE").toLowerCase();"subtitles"==h&&(h=dd);if(h==dd)b=nx(k,"CODECS")||"";else for(f=t(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.H.has(l)){b=a.H.get(l);break}f=e.sort().join(",");if(a.i.has(f))return a.i.get(f);l=a.F++;if(a.j){g=t(g);for(var m=
g.next();!m.done;m=g.next()){var n=t(m.value);m=n.next().value;n=n.next().value;(m=c.get(m))&&vv(a.j,l,m,n)}}c=nx(k,"LANGUAGE");g=nx(k,"NAME");m="YES"==nx(k,"DEFAULT");"audio"==h?n=(n=nx(k,"CHANNELS"))?parseInt(n.split("/")[0],10):null:n=null;var p;"audio"==h?(p=nx(k,"CHANNELS"))?(p=p.split("/"),p=2!=p.length?!1:"JOC"===p[1]||p[1].includes("ATMOS")):p=!1:p=!1;var q=nx(k,"CHARACTERISTICS"),u="YES"==nx(k,"FORCED");"audio"==h?k=(k=nx(k,"SAMPLE-RATE"))?parseInt(k,10):null:k=null;e=Ky(a,l,e,b,h,c,m,g,
n,null,q,u,k,p);e.stream&&(e.stream.groupId=d);a.I.has(d)?a.I.get(d).push(e):a.I.set(d,[e]);a.i.set(f,e);return e}
function By(a,b){var c,d,e,f,g,h,k,l,m,n;return Q(function(p){if(1==p.g){c=ox(b,"URI");d=nx(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=nx(b,"LANGUAGE");f=nx(b,"NAME");g=nx(b,"CHARACTERISTICS");h=Ky(a,a.F++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=nx(b,"RESOLUTION"))?F(p,h.stream.createSegmentIndex(),3):p.s(2)}2!=p.g&&(l=Ag(h.stream.segmentIndex),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
Number(m.split("x")[1]));if(n=nx(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
function Cy(a,b){var c="video",d=ox(b,"URI"),e=nx(b,"CODECS")||"";"mjpg"==e&&(c="image");if(a.i.has(d))return a.i.get(d);var f=nx(b,"LANGUAGE"),g=nx(b,"NAME"),h=nx(b,"CHARACTERISTICS");c=Ky(a,a.F++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=nx(b,"RESOLUTION");f=t(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=nx(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
function Iy(a,b,c,d){for(var e=a.F++,f=[],g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=ox(k,"URI");k=nx(k,"PATHWAY-ID");a.j&&k&&vv(a.j,e,k,h);f.push(h)}g=f.sort().join(",")+c.sort().join(",");if(a.i.has(g))return a.i.get(g);h=f.join(",");a:{b=nx(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.O=!1;b=null;break a}if(b){if("NONE"!=b){b=a.G.get(b);break a}a.O=!1}else if(!b&&a.G.size)for(b=t(a.G.keys()).next();!b.done;){b=a.G.get(b.value);break a}}b=null}c=ad(d,c);d=Ky(a,e,f,c,d,
null,!1,h,null,b,null,!1,null,!1);a.i.set(g,d);return d}
function Ky(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(B){var I,C,A,E,G,M,L,J,K,N,P,O,R,S,pa,Z,Fa,Ia,sa,ka,Ca,ra,ya;return Q(function(na){switch(na.g){case 1:return I=fd,xa(na,2),F(na,B.promise,4);case 4:C=na.h;if(B.aborted)return na.return();A=C.uri;A!=C.originalUri&&(E=x.N(),E.includes(A)||x.ve.push(A));G=zx(a.Ga,C.data);if(1!=G.type)throw new U(2,4,4017);M=rx(G.ca,"EXT-X-DEFINE");L=Tx(a,M,A);J=!1;(!a.$&&a.g.hls.disableCodecGuessing||a.O&&e==I.la&&!a.g.hls.disableClosedCaptionsDetection)&&0<G.segments.length&&
(a.O=!1,J=!0);K=!a.$&&a.g.hls.disableCodecGuessing;N=Mx(a);return F(na,cy(a,0,L,G,w,d,e,f,g,h,k,l,m,n,p,q,void 0,J,K),5);case 5:P=na.h;if(B.aborted)return na.return();O=P.stream;my(a,G);Mx(a)&&!N&&ny(a,G);x.Bc=P.Bc;x.Vb=P.Vb;x.Ud=P.Ud;x.Td=P.Td;x.rd=P.rd;x.je=P.je;x.Ab=P.Ab;x.Bb=P.Bb;x.Rf=!0;v.segmentIndex=O.segmentIndex;v.encrypted=O.encrypted;v.drmInfos=O.drmInfos;v.keyIds=O.keyIds;v.mimeType=O.mimeType;v.bandwidth=v.bandwidth||O.bandwidth;v.codecs=v.codecs||O.codecs;v.closedCaptions=v.closedCaptions||
O.closedCaptions;v.width=v.width||O.width;v.height=v.height||O.height;v.hdr=v.hdr||O.hdr;v.colorGamut=v.colorGamut||O.colorGamut;v.frameRate=v.frameRate||O.frameRate;"und"==v.language&&"und"!=O.language&&(v.language=O.language);v.language=v.language||O.language;v.channelsCount=v.channelsCount||O.channelsCount;v.audioSamplingRate=v.audioSamplingRate||O.audioSamplingRate;Ay(v);v.drmInfos.length&&a.h.newDrmInfo(v);R=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)R=!0;
a.m&&R&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==I.la||e==I.V)for(S=t(a.i.values()),pa=S.next();!pa.done;pa=S.next())Z=pa.value,Z.Rf||Z.type!=e||(Z.stream.mimeType=O.mimeType,Ay(Z.stream));e==I.za&&(Fa=Ag(O.segmentIndex))&&Fa.Y&&(v.mimeType="application/mp4",Ay(v));Ia=em(v);v.segmentIndex.Eb(function(ta){ta.Y&&(ta.Y.Wc=Ia)});Ly(a)&&(a.Ub?oy(a,[x]):(a.Ub=!0,sa=Array.from(a.i.values()),ka=sa.filter(function(ta){return ta.stream.segmentIndex}),oy(a,ka),Rx(a),Ca=a.o,0<Ca&&a.B.da(Ca)));Yx(a,G.ca,
v.type,L,w);a.m&&(a.m.startTime=a.u);Aa(na,0);break;case 2:ra=Ba(na);v.closeSegmentIndex();if(7001===ra.code)return na.return();ya=a.h.disableStream(v);if(!ya)throw ra;H(na)}})}function w(){return a.j&&1<c.length?wv(a.j,b):x.ve.concat(wx([a.C],c,a.A))}var v=My(a,d,e,f,g,h,k,l,m,n,p,q);c.includes("shaka://hls-muxed")&&(v.isAudioMuxedInVideo=!0,v.mimeType="video/mp2t",Ay(v));var x={stream:v,type:e,ve:[],Bc:0,Vb:0,je:new Map,Ud:!1,Td:!1,rd:!1,qf:-1,Ab:-1,Bb:-1,Rf:!1,N:w},z=null,D;v.createSegmentIndex=
function(){if(z)return z;if(v.isAudioMuxedInVideo)return v.segmentIndex=new Sl([]),Promise.resolve();D=Kx(a,x.N(),!0);return z=new Promise(function(B){B(u(D))})};v.closeSegmentIndex=function(){z&&!v.segmentIndex&&D.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);z=null};return x}
function vy(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.Vb));return b}function Ox(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Eb(function(e){c.push(e)});a.l.Ed(c)}
function oy(a,b){if(!Mx(a))for(var c=vy(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Oc(0,c);Ox(a,b.map(function(f){return f.stream}));d=Array.from(a.i.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return"audio"==f.stream.type});e=d.some(function(f){return"video"==f.stream.type});d=Mx(a)&&!a.Ma;c=!Mx(a)&&a.Ma&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?Zx(a,b,d):(by(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Zx(a,
b))}function $x(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Ly(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
function cy(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,x,z){x=void 0===x?!0:x;z=void 0===z?!0:z;var D,B,I,C,A,E,G,M,L,J,K,N,P,O,R,S,pa,Z,Fa,Ia,sa,ka,Ca,ra,ya,na,ta,Pa,ob;return Q(function(db){switch(db.g){case 1:D=d.segments||[];B=D.every(function(eb){return tx(eb.ca,"EXT-X-GAP")?!0:!1});if(!D.length||B)throw new U(2,4,4053);Ny(a,d);Mx(a)&&Xx(a,d);I=Mx(a)?a.M.get(g):new Map;C=Vx(a,d,I,c,e,g);A=C.segments;E=C.bandwidth;K=J=L=M=G=null;if(!(0<A.length&&x)){db.s(2);break}return F(db,py(a,A),3);case 3:N=db.h,g=
N.type,h=N.language,m=N.channelCount,u=N.sampleRate,a.g.disableText||(n=N.closedCaptions),M=N.height,G=N.width,L=N.Nd,J=N.colorGamut,K=N.frameRate,z&&(v=N.mimeType,f=N.codecs);case 2:if(v){db.s(4);break}return F(db,Oy(a,g,f,A),5);case 5:v=db.h,g!=dd||f||"application/mp4"!=v||!A[0]||A[0].Y||(v="text/vtt");case 4:return F(db,Ux(a,d,v,e,c),6);case 6:P=db.h;O=P.drmInfos;R=P.keyIds;S=P.encrypted;pa=P.Bg;if(S&&!O.length&&!pa)throw new U(2,4,4026);Z=My(a,f,g,h,k,l,m,n,p,q,u,w);Z.encrypted=S&&!pa;Z.drmInfos=
O;Z.keyIds=R;Z.mimeType=v;E&&(Z.bandwidth=E);Ay(Z);"video"==g&&(G||M||L||J)&&Jy(Z,G,M,K,L,null,J);Mx(a)&&Xx(a,d);Fa=A[0].startTime;Ia=A[A.length-1];sa=Ia.endTime;ka=new Sl(A);Z.segmentIndex=ka;ra=(Ca=tx(d.ca,"EXT-X-SERVER-CONTROL"))?null!=mx(Ca,"CAN-SKIP-UNTIL"):!1;ya=Ca?null!=mx(Ca,"CAN-BLOCK-RELOAD"):!1;na=ux(d.ca,"EXT-X-MEDIA-SEQUENCE",0);ta=Wx(na,A);Pa=ta.Ab;ob=ta.Bb;return db.return({stream:Z,type:g,ve:[],N:e,Bc:Fa,Vb:sa,Ud:ra,Td:ya,rd:!1,qf:-1,Ab:Pa,Bb:ob,je:I,Rf:!1})}})}
function Wx(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Ab:a,Bb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Ab:a,Bb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{Ab:a,Bb:c}}
function My(a,b,c,d,e,f,g,h,k,l,m,n){var p=yy(c,b)||zy(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==dd?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");a={id:a.F++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:p,codecs:b,kind:c==dd?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Of(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:q,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,
fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};Ay(a);return a}
function Ux(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N,P,O,R;return Q(function(S){switch(S.g){case 1:f=new Map;if(!a.g.ignoreDrmInfo&&b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=rx(k.ca,"EXT-X-KEY"),m=null,l.length)for(m=Py(a,b,k.ca,d,e),n=t(l),p=n.next();!p.done;p=n.next())q=p.value,f.set(q,m);w=u=!1;v=[];x=new Set;z=t(f);D=z.next();case 2:if(D.done){S.s(4);break}B=D.value;I=t(B);C=I.next().value;A=I.next().value;E=C;G=A;M=ox(E,"METHOD");if("NONE"==
M){S.s(3);break}u=!0;L=nx(E,"KEYFORMAT")||"identity";J=null;if(Ey(M)){w=!0;S.s(3);break}if("identity"==L)return F(S,Fy(a,E,c,d,G,e),11);K=a.Sb.get(L);if(!K){N=null;S.s(9);break}return F(S,K(E,c,G),10);case 10:N=S.h;case 9:J=N;S.s(6);break;case 11:J=S.h;case 6:if(J){if(J.keyIds)for(P=t(J.keyIds),O=P.next();!O.done;O=P.next())R=O.value,x.add(R);v.push(J)}case 3:D=z.next();S.s(2);break;case 4:return S.return({drmInfos:v,keyIds:x,encrypted:u,Bg:w})}})}
function Qy(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw bb("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var f=0,g=nx(b,"IV","");if(g){var h=Uc(g.substr(2));if(16!=h.byteLength)throw new U(2,4,4048);}else f=ux(c.ca,"EXT-X-MEDIA-SEQUENCE",0);var k=vx(d(),ox(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.ka.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(ox(b,
"METHOD")){case "AES-256":m.bitsKey=256;break;case "AES-256-CTR":m.bitsKey=256,m.blockCipherMode="CTR"}m.fetchKey=function(){var n,p,q,u;return Q(function(w){if(1==w.g)return a.L.has(l)||(n=lh(k,a.g.retryParameters),p=ty(a,n,6).promise,a.L.set(l,p)),F(w,a.L.get(l),2);if(3!=w.g){q=w.h;if(!q.data||q.data.byteLength!=m.bitsKey/8)throw new U(2,4,4049);u={name:"CTR"==m.blockCipherMode?"AES-CTR":"AES-CBC",length:m.bitsKey};return F(w,window.crypto.subtle.importKey("raw",q.data,u,!0,["decrypt"]),3)}m.cryptoKey=
w.h;m.fetchKey=void 0;H(w)})};a.ka.set(c,m)}return a.ka.get(c)}function my(a,b){null==a.u&&(b=tx(b.ca,"EXT-X-START"))&&(a.u=Number(ox(b,"TIME-OFFSET")))}function Ny(a,b){var c=tx(b.ca,"EXT-X-PLAYLIST-TYPE");b=tx(b.ca,"EXT-X-ENDLIST");b=c&&"VOD"==c.value||b;c=c&&"EVENT"==c.value&&!b;c=!b&&!c;b?Qx(a,Jx):c?Qx(a,uy):Qx(a,Ry)}
function Xx(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=tx(d[e].ca,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=tx(b.ca,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=tx(b.ca,"EXT-X-PART-INF"))a.P=Number(ox(e,"PART-TARGET"));b=tx(b.ca,"EXT-X-SERVER-CONTROL");a.fa&&a.P?(a.o=a.Tb?5*a.P<=c?Math.min(a.P,a.o):Math.min(c,a.o):Math.min(a.P,a.o),a.Fa=b?Number(ox(b,"PART-HOLD-BACK")):0):(a.o=Math.min(c,a.o),
c=b?mx(b,"HOLD-BACK"):null,a.Aa=c?Number(c.value):0);a.La=Math.max(d,a.La)}function ny(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Fa)c=a.Fa;else if(a.Aa)c=a.Aa;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=tx(b.segments[e].ca,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.La}}a.u&&0>a.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.yh(0);a.l.jg(c);a.l.Gc(!1)}
function Py(a,b,c,d,e){var f=tx(c,"EXT-X-MAP");if(!f)return null;var g=ox(f,"URI"),h=vx(d(),g,e);g=[h.toString(),nx(f,"BYTERANGE","")].join("-");if(!a.sa.has(g)){var k=void 0,l=null,m=!1;c=t(c);for(var n=c.next();!n.done;n=c.next())n=n.value,"EXT-X-KEY"==n.name?(m=ox(n,"METHOD"),Ey(m)&&n.id<f.id?(m=!1,k=Qy(a,n,b,d,e)):m="NONE"!=m):"EXT-X-BYTERANGE"==n.name&&n.id<f.id&&(l=n);b=Sy(h,f,l,k,m);a.sa.set(g,b)}return a.sa.get(g)}
function Sy(a,b,c,d,e){var f=0,g=null;b=nx(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(f=b.split("@"),g=Number(f[0]),f=Number(f[1]),g=f+g-1,d&&(c=g+1-f,c%16&&(g+=16-c%16)));return new Lj(function(){return a},f,g,null,null,null,d,e)}
function Ty(a,b,c,d,e,f,g,h,k){function l(S){S=(new yb(S)).ab.split(".").pop();var pa=Uy.get(g).get(S);pa||(pa=ry.get(S));return pa}var m=d.ca,n=tx(m,"EXTINF"),p=0,q=0,u=null;d.Jb.length&&(a.m.isLowLatency=!0);var w=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=tx(m,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(w=ke(v.value),a.Ma=!0)}var x=Oj;tx(m,"EXT-X-GAP")&&(a.m.gapCount++,x=2);if(!n){if(0==d.Jb.length)throw new U(2,4,4024,"EXTINF");if(!a.fa)return null}var z=[];v=!1;var D=null,B=!1,I=!1;if(a.fa&&
d.Jb.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=w,A={},E=0;E<d.Jb.length;A={Le:void 0,re:void 0},E++){var G=d.Jb[E],M=0==E?c:z[z.length-1],L=0==E?e:M.endTime,J=Number(nx(G,"DURATION"))||a.P;if(J){var K=L+J,N=0,P=null;"EXT-X-PRELOAD-HINT"==G.name?(N=(N=nx(G,"BYTERANGE-START"))?Number(N):0,(M=nx(G,"BYTERANGE-LENGTH"))?P=N+Number(M)-1:N&&(P=Number.MAX_SAFE_INTEGER)):(N=nx(G,"BYTERANGE"),P=t(Vy(M,N)),N=P.next().value,P=P.next().value);A.re=nx(G,"URI");if(A.re){M=
Oj;"YES"==nx(G,"GAP")&&(a.m.gapCount++,M=2,B=!0);A.Le=null;var O=function(S){return function(){null==S.Le&&(S.Le=vx(h(),S.re,f));return S.Le}}(A);p&&0<=N&&null!=P&&(D=O,v=!0);L=new Nj(L,K,O,N,P,b,0,0,Infinity,[],"",null,C,M,k);"EXT-X-PRELOAD-HINT"==G.name&&(L.Sf(),I=!0);"YES"!=nx(G,"INDEPENDENT")&&0<E&&L.Vc();if(A=l(A.re))L.mimeType=A,Wy.has(A)&&(L.Y=null);z.push(L);C&&(C+=J)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(z.length)p=z[z.length-1].endTime;else return null;
v&&(B||0!=z[0].Sa?(v=!1,D=null):z=[]);(n=tx(m,"EXT-X-BYTERANGE"))?(u=t(Vy(c,n.value)),q=u.next().value,u=u.next().value):z.length&&(q=z[0].Sa,u=z[z.length-1].wa);c="";n=null;"image"==g&&(c="1x1",m=tx(m,"EXT-X-TILES"))&&(c=ox(m,"LAYOUT"),(m=nx(m,"DURATION"))&&(n=Number(m)));var R=null;b=new Nj(e,p,function(){if(D)return D();null==R&&(R=vx(h(),d.g,f));return R||[]},q,u,b,0,0,Infinity,z,c,n,w,x,k,0<z.length&&!!d.g);if(e=l(d.g))b.mimeType=e,Wy.has(e)&&(b.Y=null);v&&(a.Tb=!0,b.dh(),I&&b.Sf());return b}
function Vy(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+b-1);return[c,d]}
function Yx(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!$x(a,c))for(b=rx(b,"EXT-X-DATERANGE"),b=b.filter(function(L){return null!=mx(L,"START-DATE")}).sort(function(L,J){L=ox(L,"START-DATE");J=ox(J,"START-DATE");return L<J?-1:L>J?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=ox(g,"ID");if(!a.ya.has(h)){var k=ox(g,"START-DATE"),l=ke(k);if(!isNaN(l)){var m=Math.max(0,l-f),n=null,p=nx(g,"END-DATE");if(p){var q=ke(p);if(!isNaN(q)&&(n=q-f,0>n))continue}if(null==n){var u=nx(g,"DURATION")||
nx(g,"PLANNED-DURATION");if(u){var w=parseFloat(u);isNaN(w)||(n=m+w);if(0>l-f+w)continue}}var v=nx(g,"CLASS")||"com.apple.quicktime.HLS",x="YES"==nx(g,"END-ON-NEXT");if(null==n&&x){for(var z=c+1;z<b.length;z++){var D=nx(b[z],"CLASS")||"com.apple.quicktime.HLS";if(v==D){var B=ox(b[z],"START-DATE"),I=ke(B);if(!isNaN(I)&&I&&I>l){n=Math.max(0,I-f);break}}}if(null==n)continue}z=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var C=[],A=t(g.attributes),E=A.next();!E.done;E=A.next()){var G=
E.value;if(!z.includes(G.name)){var M=xx(G.value,d);if("X-ASSET-URI"==G.name||"X-ASSET-LIST"==G.name)M=vx(e(),G.value,d)[0];C.push({key:G.name,description:"",data:M,mimeType:null,pictureType:null})}}if(1<C.length)a.h.onMetadata(v,m,n,C);a.ya.add(h)}}}catch(L){}}}}
function Vx(a,b,c,d,e,f){var g=b.segments,h=void 0,k=ux(b.ca,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=ux(b.ca,"EXT-X-MEDIA-SEQUENCE",0),m=tx(b.ca,"EXT-X-SKIP"),n=m?Number(nx(m,"SKIPPED-SEGMENTS")):0,p=l+n,q=0;Mx(a)&&c.has(p)&&(q=c.get(p));0===q&&a.Ea==uy&&0<c.size&&!c.has(p)&&null!=a.l.i&&(q=a.l.pb());var u=[],w=null;m=[];for(var v=0;v<g.length;v++){var x=g[v],z=0==v?q:w.endTime;p=l+n+v;tx(x.ca,"EXT-X-DISCONTINUITY")&&(k++,w&&w.Y&&(w.Y.g=z));var D=t(x.ca);for(var B=D.next();!B.done;B=D.next())B=B.value,
"EXT-X-KEY"==B.name&&(Ey(ox(B,"METHOD"))?h=Qy(a,B,b,e,d):h=void 0);c.set(p,z);D=Py(a,b,x.ca,e,d);if(z=Ty(a,D,w,x,z,d,f,e,h))(w=ux(x.ca,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:z.endTime-z.startTime}):m.length&&(w=m.pop(),w.duration+=z.endTime-z.startTime,m.push(w)),w=z,z.i=k,$x(a,f)&&null!=a.K&&p<a.K||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(I,C){return I+C.duration},0),b=Math.round(m.reduce(function(I,C){return I+C.bitrate*C.duration},0)/b*1E3));if(m=u.some(function(I){return null!=
I.h}))for(c={},d=0;d<u.length;c={Xd:void 0,Wd:void 0,Qd:void 0,Dc:void 0,Pd:void 0},d++)if(c.Dc=u[d],null==c.Dc.h)for(c.Wd=0,c.Xd=d,e=function(I){return function(){var C=u[I.Xd];if(C){if(null!=C.h)return C.h+I.Wd;I.Wd-=C.endTime-C.startTime;I.Xd+=1}return null}}(c),c.Pd=0,c.Qd=d,g=function(I){return function(){var C=u[I.Qd];if(C){C!=I.Dc&&(I.Pd+=C.endTime-C.startTime);if(null!=C.h)return C.h+I.Pd;--I.Qd}return null}}(c);null==c.Dc.h;)c.Dc.h=g(),null==c.Dc.h&&(c.Dc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=
c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ea;if(m&&Infinity!=c&&!$x(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.qg(c);return{segments:u,bandwidth:b}}function yy(a,b){if(a==dd){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
function zy(a){return a==dd?"text/vtt":Uy.get(a).get("mp4")}function qy(a,b){a=Mx(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.dc()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function Oy(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v;return Q(function(x){switch(x.g){case 1:e=rh;f=qy(a,d);g=f.segment;if(2==g.status)return x.return(zy(b));h=g.N();k=new yb(h[0]);l=k.ab.split(".").pop();m=Uy.get(b);if((n=m.get(l))||(n=ry.get(l))||(n=yy(b,c)))return x.return(n);q=1;u=lh(h,a.g.retryParameters);xa(x,2);u.method="HEAD";return F(x,ty(a,u,e,{type:q}).promise,4);case 4:w=x.h;p=w.headers["content-type"];Aa(x,3);break;case 2:v=Ba(x);if(!v||1002!=v.code&&1001!=v.code){x.s(3);break}u.method=
"GET";a.g.hls.allowRangeRequestsToGuessMimeType&&(u.headers.Range="bytes=0-0");return F(x,ty(a,u,e,{type:q}).promise,6);case 6:w=x.h,p=w.headers["content-type"];case 3:if(!p){x.s(7);break}n=p.toLowerCase().split(";")[0];if("application/octet-stream"!=n){x.s(8);break}if(w.data.byteLength){x.s(9);break}u.method="GET";return F(x,ty(a,u,e,{type:q}).promise,10);case 10:w=x.h;case 9:Ik(Qb(w.data))&&(n="video/mp2t");case 8:if("application/octet-stream"!=n)return x.return(n);case 7:return x.return(zy(b))}})}
function Jy(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Kx(a,b,c){return ty(a,lh(b,a.g.retryParameters),0,{type:c?2:3})}
function Ix(a){var b,c,d,e,f,g;return Q(function(h){switch(h.g){case 1:if(!a.h)return h.return();xa(h,2);b=Date.now();return F(h,a.update(),4);case 4:c=Date.now();Mx(a)&&(d=(c-b)/1E3,a.Pb.sample(1,d),e=0<a.g.updatePeriod?a.g.updatePeriod:a.o,f=Math.max(0,e-Ya(a.Pb)),a.B.da(f));Aa(h,3);break;case 2:g=Ba(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.B.da(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
H(h)}})}function Mx(a){return a.Ea!=Jx}function Qx(a,b){a.Ea=b;a.l&&a.l.Gc(!Mx(a));Mx(a)||a.B.stop()}function ty(a,b,c,d){if(!a.Z)throw new U(2,7,7001);d||(d={});d.isPreload=a.Qb();b=a.h.networkingEngine.request(c,b,d);fh(a.Z,b);return b}function Ey(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
function Hx(a,b,c,d){var e,f,g,h,k,l;return Q(function(m){if(1==m.g){if("video/mp2t"==c)throw new U(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4041);e=ox(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";"SAMPLE-AES"==e&&(g="cbcs");h=ox(b,"URI");k=Yc("com.apple.fps",g,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],h);var n=(new yb(h)).nb.replace(/-/g,"").toLowerCase();return(l=32===n.length&&/^[0-9a-f]+$/.test(n)?
n:null)||!d?m.s(2):F(m,Xy(a,d),3)}2!=m.g&&(l=m.h);l&&k.keyIds.add(l);return m.return(k)})}
function Fy(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v,x;return Q(function(z){switch(z.g){case 1:if("video/mp2t"==c)throw new U(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4041);g=ox(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return z.return(null);k=vx(d(),ox(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Vc(Tc(k[0].split("data:text/plain;base64,").pop()));z.s(2);break}m=k.sort().join("");a.oa.has(m)||(n=lh(k,a.g.retryParameters),p=ty(a,n,6).promise,
a.oa.set(m,p));return F(z,a.oa.get(m),3);case 3:q=z.h,l=Vc(q.data);case 2:u="00000000000000000000000000000000";if(!e){z.s(4);break}return F(z,Xy(a,e),5);case 5:(w=z.h)&&(u=w);case 4:return v=new Map,v.set(u,l),x="cenc","SAMPLE-AES"==g&&(x="cbcs"),z.return($c(v,x))}})}
function Xy(a,b){var c,d,e,f;return Q(function(g){if(1==g.g){c=null;if(a.pa.has(b))return c=a.pa.get(b),g.s(2);d=Am(b.N(),b.uc(),b.tc(),a.g.retryParameters);e=rh;return F(g,ty(a,d,e,{type:0}).promise,3)}2!=g.g&&(f=g.h,b.Kd(f.data),c=ym(f.data),a.pa.set(b,c));return g.return(c)})}T("shaka.hls.HlsParser",Gx);
var ry=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),Yy=(new Map).set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),Zy=(new Map).set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts",
"video/mp2t").set("tsv","video/mp2t"),$y=(new Map).set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),az=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),Uy=(new Map).set("audio",Yy).set("video",Zy).set("text",$y).set("image",az),Wy=new Set(["video/mp2t"].concat(y(mf))),
Jx="VOD",Ry="EVENT",uy="LIVE",Px={Ph:Jx,Zj:Ry,gk:uy};Si("application/x-mpegurl",function(){return new Gx});Si("application/vnd.apple.mpegurl",function(){return new Gx});function bz(a){return uu(a)}var cz=(new Map).set("com.microsoft.playready",bz).set("com.microsoft.playready.recommendation",bz).set("com.microsoft.playready.software",bz).set("com.microsoft.playready.hardware",bz);function dz(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.C=new Xa(5);this.o=new ec(function(){ez(a)});this.B=new eh;this.m=new Map;this.A=function(){return!1}}r=dz.prototype;r.configure=function(a,b){this.g=a;b&&(this.A=b)};r.start=function(a,b){var c=this;return Q(function(d){if(1==d.g)return c.l=[a],c.h=b,F(d,fz(c),2);if(!c.h)throw new U(2,7,7001);return d.return(c.j)})};
function ez(a){var b;Q(function(c){switch(c.g){case 1:return xa(c,2),F(c,fz(a),4);case 4:Aa(c,3);break;case 2:b=Ba(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.B.destroy()};
r.update=function(){var a=this,b;return Q(function(c){if(1==c.g)return xa(c,2),F(c,fz(a),4);if(2!=c.g)return Aa(c,0);b=Ba(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};r.setMediaElement=function(){};
function fz(a){var b,c,d,e,f,g,h;return Q(function(k){if(1==k.g)return b=lh(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.A()}),fh(a.B,e),F(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=Kn){sb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=yw(m,"SmoothStreamingMedia");if(!m)throw new U(2,
4,4046,l);n(m);m=Lc(m.outerHTML)}var p=Qd(m,"SmoothStreamingMedia");if(!p)throw new U(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=Ln&&l(p);a.i||(a.i=new xl(null,0));if(l=he(p,"IsLive",re,!1))throw new U(2,4,4047);a.i.Gc(!l);n=he(p,"TimeScale",pe,1E7);m=he(p,"DVRWindowLength",pe);l&&(0===m||isNaN(m))&&(m=Infinity);var q=he(p,"CanSeek",re,!1);0===m&&q&&(m=Infinity);q=null;m&&0<m&&(q=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(q=a.g.availabilityWindowOverride);null==q&&(q=Infinity);a.i.Ce(q);
m=he(p,"Duration",pe,Infinity);l||a.i.bb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;q=Yd(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];q=t(q);for(u=q.next();!u.done;u=q.next())m=m.concat(Yd(u.value,"ProtectionHeader"));if(m.length){q=[];for(u=0;u<m.length;u++){var w=m[u],v=w.attributes.SystemID.toLowerCase(),x=n[v];if(x){var z;a:{if(z=su(w)){z=t(ae(z,"DATA"));for(var D=z.next();!D.done;D=z.next())if(D=be(D.value,"KID")){z=Tc(Zd(D));z=new Uint8Array([z[3],z[2],z[1],z[0],
z[5],z[4],z[7],z[6]].concat(y(z.slice(8))));z=Vc(z);break a}}z=null}D=Tc(Zd(w));v=Uc(v.replace(/-/g,""));v=[{initData:Rh(D,v,new Set,0),initDataType:"cenc",keyId:z}];v=Yc(x,"cenc",v);z&&v.keyIds.add(z);if(x=cz.get(x))v.licenseServerUri=x(w);q.push(v)}}n=q}else n=[];u=n;q=[];n=[];m=[];p=Yd(p,"StreamIndex");p=t(p);for(w=p.next();!w.done;w=p.next()){w=w.value;x=Yd(w,"QualityLevel");v=l.timescale;z=l.duration;D=Yd(w,"c");for(var B=[],I=0,C=0;C<D.length;++C){var A=D[C],E=D[C+1],G=he(A,"t",pe),M=he(A,"d",
pe);A=he(A,"r",ne);if(!M)break;G=null!=G?G:I;(A=A||0)&&A--;if(0>A)if(E){E=he(E,"t",pe);if(null==E)break;else if(G>=E)break;A=Math.ceil((E-G)/M)-1}else{if(Infinity==z)break;else if(G/v>=z)break;A=Math.ceil((z*v-G)/M)-1}for(E=0;E<=A;++E)I=G+M,B.push({start:G/v,end:I/v,xg:G}),G=I}v=B;x=t(x);for(z=x.next();!z.done;z=x.next())(z=gz(a,w,z.value,v,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=dd||a.g.disableText||m.push(z):n.push(z):q.push(z))}p=[];q=t(0<q.length?q:
[null]);for(u=q.next();!u.done;u=q.next())for(u=u.value,w=t(0<n.length?n:[null]),B=w.next();!B.done;B=w.next())x=p,v=x.push,z=a,D=u,B=B.value,C=0,D&&D.bandwidth&&0<D.bandwidth&&(C+=D.bandwidth),B&&B.bandwidth&&0<B.bandwidth&&(C+=B.bandwidth),z={id:z.u++,language:D?D.language:"und",disabledUntilTime:0,primary:!!D&&D.primary||!!B&&B.primary,audio:D,video:B,bandwidth:C,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},v.call(x,z);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},a.i.ie());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.C.sample(1,h);H(k)})}
function gz(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return bb("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=he(c,"Bitrate",oe),m=he(c,"MaxWidth",oe),n=he(c,"MaxHeight",oe),p=he(c,"Channels",oe),q=he(c,"SamplingRate",oe),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.bb(Math.min(u,w));var v={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Of(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:q,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,
tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if(e=b.attributes.Subtype)(e=hz.get(e))&&v.roles.push(e),"main"===e&&(v.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return bb('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),
null;if(!iz.includes(e.toUpperCase()))return bb("Codec not supported:",e),null;c=jz(c,g,e,v);v.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return bb("Quality unsupported without CodecPrivateData",g),null;v.type="audio";v.mimeType="mss/audio/mp4";v.codecs=kz(e,c);break;case "video":if(!c)return bb("Quality unsupported without CodecPrivateData",g),null;v.type="video";v.mimeType="mss/video/mp4";v.codecs=lz(c);break;case "text":if(v.type=dd,v.mimeType="application/mp4","TTML"===e||
"DFXP"===e)v.codecs="stpp"}v.fullMimeTypes.add(lf(v.mimeType,v.codecs));v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(a.m.has(v.id))var x=a.m.get(v.id);else x=[],"video"==v.type&&(x=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),x={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,lb:x,ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:null,stream:v},x=kj(new ej([x])),
a.m.set(v.id,x);x=mz(a,new Lj(function(){return[]},0,null,em(v),v.mssPrivateData.timescale,x,null,v.encrypted),v,b,d);v.segmentIndex=new Sl(x);return Promise.resolve()};v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)};return v}
function jz(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function kz(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function lz(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
function mz(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={Fe:void 0},g=e.next())h.Fe=g.value,d.push(new Nj(h.Fe.start,h.Fe.end,function(k){return function(){return Xc(a.l,[f.replace("{start time}",String(k.Fe.xg))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}T("shaka.mss.MssParser",dz);
var iz="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),hz=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");Si("application/vnd.ms-sstr+xml",function(){return new dz});function nz(a,b,c,d,e,f,g){if(200<=c&&299>=c&&202!=c||304==c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=Kc(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,f,a,g,e||d);};function oz(){}
function pz(a,b,c,d,e,f){var g=new qz;Ah(b.headers).forEach(function(m,n){g.append(n,m)});var h=new rz,k={Gg:!1,Jh:!1};a=sz(a,b,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new Vg(a,function(){k.Gg=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new ec(function(){k.Jh=!0;h.abort()});l.da(b/1E3);a.finally(function(){l.stop()})}return a}
function sz(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,u,w,v,x,z,D,B,I,C;return Q(function(A){switch(A.g){case 1:return l=tz,m=uz,p=new ArrayBuffer(0),u=q=0,w=Date.now(),xa(A,2),F(A,l(a,d),4);case 4:n=A.h;g(vz(n.headers));if("HEAD"==d.method){A.s(5);break}x=(v=n.headers.get("Content-Length"))?parseInt(v,10):0;if(!n.body)return F(A,n.arrayBuffer(),9);z=n.clone().body.getReader();D=function(E){function G(){var M,L,J,K;return Q(function(N){switch(N.g){case 1:return xa(N,2),F(N,z.read(),4);case 4:M=N.h;Aa(N,3);
break;case 2:return Ba(N),N.return();case 3:if(M.done){N.s(5);break}q+=M.value.byteLength;if(!h){N.s(5);break}return F(N,h(M.value),5);case 5:L=Date.now();J=q-u;if(100<L-w&&J>=k||M.done)K=M.done?0:x-q,f(L-w,J,K),u=q,w=L;M.done?E.close():(E.enqueue(M.value),G());H(N)}})}G()};new m({start:D});return F(A,n.arrayBuffer(),8);case 8:p=A.h;A.s(5);break;case 9:p=A.h,B=Date.now(),f(B-w,p.byteLength,0);case 5:Aa(A,3);break;case 2:I=Ba(A);if(e.Gg)throw new U(1,1,7001,a,c);if(e.Jh)throw new U(1,1,1003,a,c);throw new U(1,
1,1002,a,I,c);case 3:return C=vz(n.headers),A.return(nz(C,p,n.status,a,n.url,b,c))}})}function vz(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function wz(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}T("shaka.net.HttpFetchPlugin",oz);oz.isSupported=wz;oz.parse=pz;
var tz=window.fetch,rz=window.AbortController,uz=window.ReadableStream,qz=window.Headers;wz()&&(hh("http",pz,2,!0),hh("https",pz,2,!0),hh("blob",pz,2,!0));function xz(){}
function yz(a,b,c,d,e,f){var g=new zz,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;g.onabort=function(){n(new U(1,1,7001,a,c))};var p=!1;g.onreadystatechange=function(){if(2==g.readyState&&!p){var u=Az(g);e(u);p=!0}};g.onload=function(u){var w=Az(g),v=g.response;try{d(Date.now()-h,u.loaded-k,0);var x=nz(w,v,g.status,a,g.responseURL,b,c);m(x)}catch(z){n(z)}};g.onerror=
function(u){n(new U(1,1,1002,a,u,c))};g.ontimeout=function(){n(new U(1,1,1003,a,c))};g.onprogress=function(u){var w=Date.now(),v=f.minBytesForProgressEvents||0,x=u.loaded-k;if(100<w-h&&x>=v||u.lengthComputable&&u.loaded==u.total)d(w-h,x,4==g.readyState?0:u.total-u.loaded),k=u.loaded,h=w};for(var q in b.headers)g.setRequestHeader(q.toLowerCase(),b.headers[q]);g.send(b.body)});return new Vg(l,function(){g.abort();return Promise.resolve()})}
function Az(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}T("shaka.net.HttpXHRPlugin",xz);xz.parse=yz;var zz=window.XMLHttpRequest;hh("http",yz,1,!0);hh("https",yz,1,!0);hh("blob",yz,1,!0);function Bz(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function Cz(a){var b=a.Ib(!1);return b?Sc(b):a.N().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.Sa+":"+a.wa}function Dz(a,b){return Am(a.g.N(),a.g.Sa,a.g.wa,b.streaming.retryParameters)};function Ez(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function Fz(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}Ez.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function Gz(a){return 0==a.i?0:a.j/a.i};function Hz(a){var b=this;this.u=a;this.i=new Map;this.h=new th(function(){return Iz(b).catch(function(){})});this.j=[];this.o=function(){};this.m=function(){};this.g=new Ez;this.l=!1}Hz.prototype.destroy=function(){return this.h.destroy()};function Jz(a,b,c){a.o=b;a.m=c}function Iz(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
function Kz(a,b,c,d,e,f){uh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return Q(function(u){if(1==u.g)return F(u,Lz(a,c),2);h=u.h;if(a.h.g)throw new U(2,9,7001);if(e)for(m in k=Qb(h),l=new Qh(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.m(p,q);a.g.close(d,h.byteLength);a.o(Gz(a.g),a.g.g);return u.return(f(h))})});a.i.set(b,g)}
function Mz(a,b,c,d,e,f){uh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new U(2,9,7001);if(e){var h=Qb(c);h=new Qh(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.o(Gz(a.g),a.g.g);return f(c)});a.i.set(b,g)}function Nz(a){return Q(function(b){return 1==b.g?F(b,Promise.all(a.i.values()),2):b.return(a.g.g)})}
function Lz(a,b){var c,d,e,f;return Q(function(g){if(1==g.g)return c=rh,d=a.u.request(c,b),e=function(){return d.abort()},a.j.push(e),F(g,d.promise,2);f=g.h;Cd(a.j,e);return g.return(f.data)})};function Oz(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Ug;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Oz.prototype.abort=function(){var a=this;return Q(function(b){if(1==b.g){try{a.i.abort()}catch(c){}xa(b,2);return F(b,a.g,4)}if(2!=b.g)return Aa(b,0);Ba(b);H(b)})};
function Pz(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return Q(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return F(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}Oz.prototype.store=function(){return this.h};Oz.prototype.promise=function(){return this.g};function Qz(a){this.h=a;this.g=[]}Qz.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Rz(a,b){return Sz(a,b,"readwrite")}function Sz(a,b,c){c=a.h.transaction([b],c);var d=new Oz(c,b);a.g.push(d);d.promise().then(function(){Cd(a.g,d)},function(){Cd(a.g,d)});return d};function Tz(a,b,c){this.h=new Qz(a);this.i=b;this.g=c}r=Tz.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Uz(this.i)};r.removeSegments=function(a,b){return Vz(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,Wz(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Ig(e)}))})};r.addManifests=function(){return Uz(this.g)};
r.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function Xz(a,b,c){a=Rz(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Rz(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Vz(this,this.g,a,b)};
r.getManifests=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,Wz(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.jd(e)})))})};r.getAllManifests=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=Sz(a.h,a.g,"readonly"),c=new Map,F(d,Pz(b,function(e,f){var g;return Q(function(h){if(1==h.g)return F(h,a.jd(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};r.Ig=function(a){return a};r.jd=function(a){return Promise.resolve(a)};
function Uz(a){return Promise.reject(new U(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=Rz(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={cg:void 0},h=g.next())l=h.value,k.cg=e.add(l),k.cg.onsuccess=function(n){return function(){f.push(n.cg.result)}}(k);return F(m,d.promise(),2)}return m.return(f)})};
function Vz(a,b,c,d){a=Rz(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={Qf:void 0},e=c.next())f.Qf=e.value,b.delete(f.Qf).onsuccess=function(g){return function(){return d(g.Qf)}}(f);return a.promise()}
function Wz(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=Sz(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={we:void 0,ee:void 0},k=h.next())l.ee=k.value,l.we=e.get(l.ee),l.we.onsuccess=function(n){return function(){void 0==n.we.result&&g.push(n.ee);f[n.ee]=n.we.result}}(l);return F(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Yz(a){this.g=new Qz(a)}Yz.prototype.destroy=function(){return this.g.destroy()};Yz.prototype.getAll=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=Sz(a.g,"session-ids","readonly"),c=[],F(d,Pz(b,function(e,f){c.push(f)}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};Yz.prototype.add=function(a){var b=Rz(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
Yz.prototype.remove=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=Rz(b.g,"session-ids"),F(d,Pz(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):F(d,c.promise(),0)})};function Zz(){this.g=new Map}Zz.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Zz.prototype.init=function(){var a=this;$z.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
function aA(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{zb:d,Ta:f},Ta:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function bA(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({zb:d,Ta:f},e)})})}
function cA(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function dA(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function eA(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
function fA(a){var b,c,d;return Q(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=$z,d.forEach(function(f){(f=f())&&b.push(f)})),F(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.s(0):F(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function gA(a,b){$z.set(a,b)}T("shaka.offline.StorageMuxer",Zz);Zz.unregister=function(a){$z.delete(a)};Zz.register=gA;Zz.prototype.destroy=Zz.prototype.destroy;var $z=new Map;function hA(){Tz.apply(this,arguments)}qa(hA,Tz);hA.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return Q(function(g){d=Rz(c.h,c.g);e=d.store();f=new Ug;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new U(2,9,9012,"Could not find values for "+a))};return F(g,Promise.all([d.promise(),f]),0)})};
hA.prototype.jd=function(a){var b,c,d,e,f,g;return Q(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=iA(a.periods[c],e),b.push(f);return F(h,Hv(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
function iA(a,b){jA(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return kA(e,a.startTime,b)})}
function kA(a,b,c){var d=a.initSegmentUri?lA(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
lA(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}hA.prototype.Ig=function(a){return{data:a.data}};
function lA(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new U(2,9,9004,"Could not parse uri "+a);}
function jA(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function mA(){Tz.apply(this,arguments)}qa(mA,Tz);
mA.prototype.jd=function(a){var b,c,d,e,f,g;return Q(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(nA(n,k.startTime,k.startTime+e));f=l;b.push(f)}return F(h,Hv(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
function nA(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}};function oA(){Tz.apply(this,arguments)}qa(oA,Tz);r=oA.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Xz(this,a,b)};r.jd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function pA(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=pA.prototype;
r.init=function(){var a=this,b=new Ug,c=!1,d=new ec(function(){c=!0;b.reject(new U(2,9,9017))});d.da(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new hA(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new mA(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
new mA(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new oA(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Yz(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new U(2,
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return Q(function(b){switch(b.g){case 1:if(!a.g){b.s(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.s(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.s(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.s(8);break}return F(b,a.j.destroy(),8);case 8:if(!a.m){b.s(10);break}return F(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(b)}})};
r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
r.erase=function(){var a=this;return Q(function(b){switch(b.g){case 1:if(!a.g){b.s(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.s(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.s(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.s(8);break}return F(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),F(b,qA(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,F(b,a.init(),0)}})};
function qA(){var a=new Ug,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new U(2,9,9001,b.error));c.preventDefault()};return a}gA("idb",function(){return(!qc()||qc()&&yc())&&!jc()&&window.indexedDB?new pA:null});function rA(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}rA.prototype.zb=function(){return this.i};rA.prototype.Ta=function(){return this.h};rA.prototype.key=function(){return this.l};rA.prototype.toString=function(){return this.j};
function sA(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new rA(b,c,d,Number(a[4])):null};function tA(a,b){this.h=a;this.g=b}
function uA(a,b){var c=new xl(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=vA(a,d,e,c);e=b.streams.filter(function(l){return l.type==dd}).map(function(l){return wA(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return wA(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}
function vA(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
b.next())for(g=e.value,e=wA(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=wA(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
function wA(a,b,c){var d=b.segments.map(function(e){return xA(a,e,b)});c.Ed(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Sl(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,mssPrivateData:b.mssPrivateData,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([lf(b.mimeType,b.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}
function xA(a,b,c){var d=new rA("segment",a.h,a.g,b.dataKey);a=new Nj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?yA(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";b.thumbnailSprite&&a.De(b.thumbnailSprite);return a}function yA(a,b){var c=new rA("segment",a.h,a.g,b);return new Lj(function(){return[c.toString()]},0,null)};function zA(){this.g=null}r=zA.prototype;r.configure=function(){};
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:d=sA(a);c.g=d;if(null==d||"manifest"!=d.g)throw new U(2,1,9004,a);e=new Zz;za(m,2);return F(m,e.init(),4);case 4:return F(m,cA(e,d.zb(),d.Ta()),5);case 5:return f=m.h,F(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new tA(d.zb(),d.Ta()),l=uA(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Da(m),F(m,e.destroy(),7);case 7:Ea(m,0)}})};r.stop=function(){return Promise.resolve()};
r.update=function(){};
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:return d=c.g,e=new Zz,xa(m,2,3),F(m,e.init(),5);case 5:return F(m,cA(e,d.zb(),d.Ta()),6);case 6:return f=m.h,F(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.s(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Da(m),F(m,e.destroy(),10);case 10:Ea(m,0);break;case 2:Ba(m),m.s(3)}})};
r.onInitialVariantChosen=function(){};r.banLocation=function(){};r.setMediaElement=function(){};Si("application/x-offline-manifest",function(){return new zA});function AA(){}function BA(a,b){var c=sA(a);c&&"manifest"==c.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=Yg(a)):a=c&&"segment"==c.g?CA(c.key(),c,b):Wg(new U(2,1,9004,a));return a}
function CA(a,b,c){var d=new Zz;return Yg(void 0).Ha(function(){return d.init()}).Ha(function(){return cA(d,b.zb(),b.Ta())}).Ha(function(e){return e.getSegments([b.key()])}).Ha(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}T("shaka.offline.OfflineScheme",AA);AA.plugin=BA;hh("offline",BA);function DA(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,EA(w.info,p)){w.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.s(4);break}g=f.value;h=FA(a,b,g);return F(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.s(2);break;case 4:return l.return(d)}})}
function FA(a,b,c){var d,e;return Q(function(f){switch(f.g){case 1:return d=new Sh({Xb:b,onError:function(){},pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),xa(f,2),d.configure(a),F(f,$h(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:Aa(f,3);break;case 2:return Ba(f),F(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],F(f,Promise.all(c.sessionIds.map(function(g){return Q(function(h){if(1==
h.g)return xa(h,2),F(h,li(d,g),4);if(2!=h.g)return e.push(g),Aa(h,0);Ba(h);H(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function EA(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Dd(a.audioCapabilities,b.audioCapabilities,c)&&Dd(a.videoCapabilities,b.videoCapabilities,c)};function GA(a,b,c){var d=b.presentationTimeline.getDuration();b=HA(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function IA(a,b){var c=uA(new tA(a.zb(),a.Ta()),b),d=b.appMetadata||{};c=HA(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
function HA(a){var b=[],c=Hg(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(xg(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(yg(c.value));return b};function JA(){this.g=new Map}function KA(a,b){var c=b.audio,d=b.video;c&&!d&&a.g.set(c.id,c.bandwidth||b.bandwidth);!c&&d&&a.g.set(d.id,d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g.set(c.id,e);a.g.set(d.id,f)}}function LA(a,b){a.g.set(b.id,b.bandwidth||2048)}function MA(a,b){a=a.g.get(b);null==a&&(a=0);return a};function NA(a){var b=this;if(a&&a.constructor!=X)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.xb()):(this.h=Jn(),this.g=new gh);this.i=[];this.l=[];var c=!a;this.j=new th(function(){var d,e,f,g,h;return Q(function(k){switch(k.g){case 1:return F(k,Promise.all(b.l.map(function(l){return Iz(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return F(k,Promise.all(e),3);case 3:if(!c){k.s(4);break}return F(k,b.g.destroy(),4);
case 4:b.h=null,b.g=null,H(k)}})});this.m=1E9}function OA(){if(fc())a:{var a=t($z.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=NA.prototype;r.destroy=function(){return this.j.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=qn(a,b));return On(this.h,a)};r.getConfiguration=function(){var a=Jn();On(a,this.h,Jn());return a};r.xb=function(){return this.g};
r.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new Hz(this.g);this.l.push(h);b=PA(this,a,b||{},d||[],e||[],function(){var k;return Q(function(l){if(1==l.g)return c?l.s(2):F(l,Do(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=Vi(a,c||null);return l.return(k())})},g,h);b=new Vg(b,function(){return Iz(h)});b.finally(function(){Cd(f.l,h)});return QA(this,b)};
function PA(a,b,c,d,e,f,g,h){var k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N,P;return Q(function(O){switch(O.g){case 1:return RA(),l=k=null,m=new Zz,q=p=n=null,xa(O,2,3),F(O,f(),5);case 5:return k=O.h,F(O,SA(a,b,k,g),6);case 6:u=O.h;TA(a);w=!u.presentationTimeline.U()&&!u.presentationTimeline.yc();if(!w)throw new U(2,9,9005,b);v=t(d);x=v.next();case 7:if(x.done){O.s(9);break}z=x.value;return F(O,UA(a,z,u),10);case 10:D=O.h;u.imageStreams.push(D);TA(a);x=v.next();O.s(7);break;case 9:B=t(e),I=B.next();
case 11:if(I.done)return bi(g.drm.clearKeys,u.variants),E=u.variants.some(function(R){if(R.audio)for(var S=t(R.audio.drmInfos),pa=S.next();!pa.done;pa=S.next())if(pa.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=t(R.video.drmInfos),S=R.next();!S.done;S=R.next())if(S.value.licenseServerUri.startsWith("data:"))return!0;return!1}),G=g.offline.usePersistentLicense,E&&(G=!1),F(O,a.Lc(u,function(R){q=q||R},g,G),15);C=I.value;return F(O,VA(a,u,C.uri,C.language,C.kind,C.mime,C.codecs),
14);case 14:A=O.h;u.textStreams.push(A);TA(a);I=B.next();O.s(11);break;case 15:l=O.h;TA(a);if(q)throw q;return F(O,WA(u,l,g,G),16);case 16:return F(O,m.init(),17);case 17:return TA(a),F(O,aA(m),18);case 18:return n=O.h,TA(a),M=XA(l,u,b,c,g,h,G),L=M.Yi,J=M.tg,F(O,n.Ta.addManifests([L]),19);case 19:K=O.h;TA(a);p=K[0];TA(a);if(q)throw q;return F(O,YA(a,J,p,L,h,g,n.Ta,u,l,G),20);case 20:return TA(a),ZA(u,L,l,G),F(O,n.Ta.updateManifest(p,L),21);case 21:return TA(a),N=new rA("manifest",n.path.zb,n.path.Ta,
p),O.return(IA(N,L));case 3:return Da(O),F(O,m.destroy(),22);case 22:if(!k){O.s(23);break}return F(O,k.stop(),23);case 23:if(!l){O.s(25);break}return F(O,l.destroy(),25);case 25:Ea(O,0);break;case 2:P=Ba(O);if(null==p){O.s(27);break}return F(O,$A(p),27);case 27:throw q||P;}})}
function YA(a,b,c,d,e,f,g,h,k,l){var m,n,p,q,u,w,v,x,z,D,B;return Q(function(I){switch(I.g){case 1:m={};n=0;p=function(){if(a.j.g||e.l)throw new U(2,9,7001);};q=function(C,A){var E,G,M,L,J,K,N,P,O;return Q(function(R){if(1==R.g){E=t(C);G=E.next();for(M={};!G.done;M={Nb:void 0},G=E.next())M.Nb=G.value,p(),L=Dz(M.Nb,f),J=M.Nb.i,K=M.Nb.h,N=function(S){return function(pa){var Z,Fa,Ia,sa;return Q(function(ka){switch(ka.g){case 1:Z=S.Nb.g;Fa=Z.Ib(!1);if(!Z.aesKey||Fa){ka.s(2);break}return F(ka,zm(pa,Z.aesKey,
S.Nb.j),3);case 3:pa=ka.h;case 2:return Ia=Cz(Z),F(ka,g.addSegments([{data:pa}]),4);case 4:sa=ka.h,p(),m[Ia]=sa[0],n+=pa.byteLength,H(ka)}})}}(M),P=M.Nb.g,(O=P.Ib(!1))?Mz(e,M.Nb.groupId,O,J,K,N):Kz(e,M.Nb.groupId,L,J,K,N);return F(R,Nz(e),2)}p();if(!A||e.l)return R.s(0);ZA(h,d,k,l);return F(R,g.updateManifest(c,d),0)})};u=!1;xa(I,2);if(!aB(h)||!u||bB(h)){I.s(4);break}return F(I,q(b.filter(function(C){return C.h}),!0),5);case 5:return p(),b=b.filter(function(C){return!C.h}),w=m,v=n,m={},n=0,F(I,cB(g,
c,d,w,v,function(){return TA(a)}),6);case 6:p();case 4:if(u){I.s(7);break}return F(I,q(b,!1),8);case 8:return p(),x=m,z=n,m={},n=0,F(I,cB(g,c,d,x,z,function(){return p()}),9);case 9:p();case 7:Aa(I,0);break;case 2:return D=Ba(I),B=Object.values(m),F(I,g.removeSegments(B,function(){}),10);case 10:throw D;}})}
function $A(a){var b,c,d,e;return Q(function(f){switch(f.g){case 1:return b=new Zz,F(f,b.init(),2);case 2:return F(f,aA(b),3);case 3:return c=f.h,d=new rA("manifest",c.path.zb,c.path.Ta,a),F(f,b.destroy(),4);case 4:return e=new NA,F(f,e.remove(d.toString()),0)}})}
function cB(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v;return Q(function(x){switch(x.g){case 1:g=!1;xa(x,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,u=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=u&&(q.dataKey=u,q.pendingSegmentRefId=void 0),u=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=u&&(q.initSegmentKey=u,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return F(x,a.updateManifest(b,c),4);case 4:g=!0;f();Aa(x,0);break;case 2:return w=Ba(x),F(x,$A(b),5);case 5:if(g){x.s(6);break}v=Object.values(d);return F(x,a.removeSegments(v,function(){}),6);case 6:throw w;}})}
function WA(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,x,z,D,B,I,C,A,E,G,M,L,J,K,N,P,O,R;return Q(function(S){switch(S.g){case 1:return e={width:Infinity,height:Infinity},eg(a,c.restrictions,e),F(S,hg(b,a,d,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:f=[];g=c.preferredDecodingAttributes;h=c.preferredVideoCodecs;k=c.preferredAudioCodecs;l=c.preferredTextFormats;cg(a,h,k,g,l);m=t(a.variants);for(n=m.next();!n.done;n=m.next())p=n.value,f.push(xg(p));q=t(a.textStreams);for(u=q.next();!u.done;u=
q.next())w=u.value,f.push(yg(w));v=t(a.imageStreams);for(x=v.next();!x.done;x=v.next())z=x.value,f.push(zg(z));return F(S,c.offline.trackSelectionCallback(f),3);case 3:D=S.h;B=a.presentationTimeline.getDuration();I=0;C=t(D);for(A=C.next();!A.done;A=C.next())E=A.value,G=E.bandwidth*B/8,I+=G;xa(S,4);return F(S,c.offline.downloadSizeCallback(I),6);case 6:M=S.h;if(!M)throw new U(2,9,9014);Aa(S,5);break;case 4:L=Ba(S);if(L instanceof U)throw L;throw new U(2,9,9015);case 5:J=new Set;K=new Set;N=new Set;
P=t(D);for(O=P.next();!O.done;O=P.next())R=O.value,"variant"==R.type&&J.add(R.id),"text"==R.type&&K.add(R.id),"image"==R.type&&N.add(R.id);a.variants=a.variants.filter(function(pa){return J.has(pa.id)});a.textStreams=a.textStreams.filter(function(pa){return K.has(pa.id)});a.imageStreams=a.imageStreams.filter(function(pa){return N.has(pa.id)});dB(a);H(S)}})}
function XA(a,b,c,d,e,f,g){var h=GA(c,b,d),k=e.offline.progressCallback;Jz(f,function(u,w){h.size=w;k(h,u)},function(u,w){l&&g&&m==w&&hi(a,"cenc",u)});var l=aB(b)&&!bB(b),m=null;l&&(m=eB.get(a.h.keySystem));for(var n=new JA,p=t(b.textStreams),q=p.next();!q.done;q=p.next())n.g.set(q.value.id,52);p=t(b.imageStreams);for(q=p.next();!q.done;q=p.next())LA(n,q.value);p=t(b.variants);for(q=p.next();!q.done;q=p.next())KA(n,q.value);f=fB(f,n,b,e);e=f.streams;f=f.tg;(n=a.h)&&g&&(n.initData=[]);return{Yi:{creationTime:Date.now(),
originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.pd(),streams:e,sessionIds:g?qi(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},tg:f}}function aB(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
function bB(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function ZA(a,b,c,d){b.expiration=c.pd();c=qi(c);b.sessionIds=d?c:[];if(aB(a)&&d&&!c.length)throw new U(2,9,9007);}r.remove=function(a){return gB(this,hB(this,a))};
function hB(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:RA();c=sA(b);if(null==c||"manifest"!=c.g)throw new U(2,9,9004,b);d=c;e=new Zz;za(k,2);return F(k,e.init(),4);case 4:return F(k,cA(e,d.zb(),d.Ta()),5);case 5:return f=k.h,F(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],F(k,Promise.all([iB(a,h,e),jB(f,d,h)]),2);case 2:return Da(k),F(k,e.destroy(),8);case 8:Ea(k,0)}})}
function kB(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:lf(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:lf(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function iB(a,b,c){return Q(function(d){return F(d,lB(a.g,a.h.drm,c,b),0)})}
function jB(a,b,c){function d(){}var e=mB(c);IA(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.qj=function(){return gB(this,nB(this))};
function nB(a){var b,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return RA(),b=a.g,c=a.h.drm,d=new Zz,e=!1,za(n,2),F(n,d.init(),4);case 4:f=[],dA(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.s(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,DA(c,b,l),9);case 9:return m=n.h,F(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.s(5);break;case 2:return Da(n),F(n,d.destroy(),11);case 11:Ea(n,3);break;case 3:return n.return(!e)}})}
r.list=function(){return gB(this,oB())};function oB(){var a,b,c;return Q(function(d){switch(d.g){case 1:return RA(),a=[],b=new Zz,za(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),bA(b,function(e,f){c=c.then(function(){var g;return Q(function(h){if(1==h.g)return F(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=IA(new rA("manifest",e.zb,e.Ta,l),k);a.push(k)});H(h)})})}),F(d,c,2);case 2:return Da(d),F(d,b.destroy(),6);case 6:Ea(d,3);break;case 3:return d.return(a)}})}
function SA(a,b,c,d){var e,f,g,h,k;return Q(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},
addFont:function(){}},c.configure(d.manifest),TA(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,TA(a),k=pB(h),F(l,Promise.all(vh(k,function(m){return m.createSegmentIndex()})),3);TA(a);if(e)throw e;return l.return(h)})}
function UA(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,x;return Q(function(z){switch(z.g){case 1:return F(z,qB(a,b),2);case 2:d=z.h;if("text/vtt"!=d)throw new U(1,2,2017,b);return F(z,rB(b,a.g,a.h.streaming.retryParameters),3);case 3:e=z.h;f=Bf(d);if(!f)throw new U(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Qb(e);l=g.parseMedia(k,h,b,[]);m=[];n=t(l);p=n.next();for(q={};!p.done;q={Me:void 0,Nc:void 0},p=n.next())q.Nc=p.value,q.Me=null,
u=function(D){return function(){null==D.Me&&(D.Me=Xc([b],[D.Nc.payload]));return D.Me||[]}}(q),w=new Nj(q.Nc.startTime,q.Nc.endTime,u,0,null,null,0,0,Infinity),q.Nc.payload.includes("#xywh")&&(v=q.Nc.payload.split("#xywh=")[1].split(","),4===v.length&&w.De({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),m.push(w);x=d;if(!m.length){z.s(4);break}return F(z,Do(m[0].N()[0],a.g,a.h.manifest.retryParameters),5);case 5:x=z.h;case 4:return z.return({id:a.m++,
originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Sl(m),mimeType:x||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([lf(x||
"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}
function VA(a,b,c,d,e,f,g){var h,k,l;return Q(function(m){if(1==m.g)return f?m.s(2):F(m,qB(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ul(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:dd,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([lf(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=lf(h.mimeType,h.codecs);l=Cf(k);if(!l)throw new U(2,2,2014,f);return m.return(h)})}
function qB(a,b){var c;return Q(function(d){switch(d.g){case 1:return xa(d,2),F(d,Do(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;Aa(d,3);break;case 2:Ba(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}function rB(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=rh,e=lh([a],c),e.method="GET",F(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})}
r.Lc=function(a,b,c,d){var e=this,f;return Q(function(g){return 1==g.g?(f=new Sh({Xb:e.g,onError:b,pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),F(g,Xh(f,a.variants,d),2)):3!=g.g?F(g,ji(f),3):g.return(f)})};
function fB(a,b,c,d){var e=new Map,f=pB(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=sB(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),tg:Array.from(e.values())}}
function sB(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;tB(d,c.presentationTimeline.pb(),function(l,m){var n=Cz(l),p=void 0;if(!f.has(n)){var q=l.endTime-l.startTime;q=MA(b,d.id)*q;q=Fz(a.g,q);f.set(n,new Bz(l,q,k,!1,m))}l.Y&&(p=Cz(l.Y),f.has(p)||(q=.5*MA(b,
d.id),q=Fz(a.g,q),f.set(p,new Bz(l.Y,q,k,!0,m))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});0!==h&&(k=(k+1)%h)});return g}
function tB(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function TA(a){if(a.j.g)throw new U(2,9,7001);}function RA(){if(!OA())throw new U(2,9,9E3);}function gB(a,b){return Q(function(c){if(1==c.g)return a.i.push(b),za(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);Da(c);Cd(a.i,b);return Ea(c,0)})}function QA(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Cd(a.i,c)})}
function mB(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
function lB(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=eA(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:kB(d,!1),videoCapabilities:kB(d,!0)}});return F(h,DA(b,a,f),2)}return 3!=h.g?(g=h.h,F(h,e.remove(g),3)):F(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
function pB(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
function dB(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}T("shaka.offline.Storage",NA);NA.deleteAll=function(){var a;return Q(function(b){return 1==b.g?(a=new Zz,za(b,2),F(b,fA(a),2)):5!=b.g?(Da(b),F(b,a.destroy(),5)):Ea(b,0)})};
NA.prototype.list=NA.prototype.list;NA.prototype.removeEmeSessions=NA.prototype.qj;NA.prototype.remove=NA.prototype.remove;NA.prototype.store=NA.prototype.store;NA.prototype.getNetworkingEngine=NA.prototype.xb;NA.prototype.getConfiguration=NA.prototype.getConfiguration;NA.prototype.configure=NA.prototype.configure;NA.prototype.destroy=NA.prototype.destroy;NA.support=OA;
var eB=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");
Tp("offline",OA);function uB(){}function vB(a,b){a={priority:b||0,callback:a};for(b=0;b<wB.length;b++)if(wB[b].priority<a.priority){wB.splice(b,0,a);return}wB.push(a)}T("shaka.polyfill",uB);uB.register=vB;uB.installAll=function(){for(var a=t(wB),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){bb("Error installing polyfill!",c)}}};var wB=[];function xB(){}function yB(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())zB(b.value)}function zB(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}uB.Aria=xB;xB.install=yB;vB(yB);function AB(){}function BB(){uc()||kc("Sky_STB")||CB()}uB.EncryptionScheme=AB;AB.install=BB;vB(BB,-2);function DB(){}
function EB(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",FB);document.addEventListener("webkitfullscreenerror",FB);document.addEventListener("mozfullscreenchange",FB);document.addEventListener("mozfullscreenerror",FB);document.addEventListener("MSFullscreenChange",FB);document.addEventListener("MSFullscreenError",FB)}}
function FB(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}uB.Fullscreen=DB;DB.install=EB;vB(EB);function GB(){}function HB(){var a=!0;if(qc()&&!yc()&&!zc()||rc()||tc()||uc()||nc()||lc()||vc()||sc()&&!rc())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),IB=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=JB)}
function JB(a){var b,c,d,e,f,g,h,k,l,m,n;return Q(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=gc(e),!f)||d&&(g=d.contentType,h=gc(g),!h))return p.return(b)}else return p.return(b);p.s(2);break}if(!fc())return p.return(b);if(!c){p.s(3);break}return F(p,KB(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var q=d.contentType;qc()&&d.spatialRendering&&
(q+="; spatialRendering=true");l=md(q);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return F(p,LB(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
function KB(a){var b,c;return Q(function(d){return 1==d.g?qc()?F(d,MB(a),3):lc()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(md(b))):d.s(2):2!=d.g?(c=d.h,d.return(c)):d.return(md(a.contentType))})}
function LB(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return Q(function(u){switch(u.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},lc()&&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=vf(k)+";"+uf(k);n=vf(l)+";"+uf(l);p=c.keySystem;q=null;xa(u,2);if(cc.has(m+"#"+n+"#"+p)){q=cc.get(m+"#"+n+"#"+p)||null;u.s(4);break}return F(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:q=u.h,cc.set(m+"#"+n+"#"+p,q);case 4:Aa(u,
3);break;case 2:Ba(u);case 3:return u.return(q)}})}
function MB(a){var b,c,d,e,f;return Q(function(g){if(1==g.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(md(a.contentType));b=a.contentType;a.width&&a.height&&1280<a.width&&720<a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),24>c||30<c)&&(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=NB;return f.has(b)?(e=f.get(b),g.s(2)):F(g,cast.__platform__.canDisplayType(b),3)}2!=g.g&&(e=g.h,f.set(b,e));return g.return(e)})}uB.MediaCapabilities=GB;GB.install=HB;var IB=null;GB.originalMcap=IB;var NB=new Map;vB(HB,-1);function OB(){}function PB(){var a=wc();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?12>=a?(QB(),RB()):15>=a&&QB():kc("DT_STB_BCM")?(QB(),RB()):(kc("Tizen 2")||mc()||kc("Tizen 4"))&&SB();(window.MediaSource||window.ManagedMediaSource)&&TB();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&UB()}
function QB(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Na.apply(0,arguments));b.abort=function(){};return b}}function RB(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function TB(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=rf(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=rf(c)&&b(c)}}}
function SB(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=uf(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=uf(c)&&b(c)}}}
function UB(){var a=MediaSource.isTypeSupported;nc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}uB.MediaSource=OB;OB.install=PB;vB(PB);function VB(){}function WB(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?XB():void 0!=window.orientation&&YB())}function XB(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
function YB(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new ZB;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new V("change");b.dispatchEvent(c)})}uB.Orientation=VB;VB.install=WB;function ZB(){dh.call(this);this.type="";this.angle=0}qa(ZB,dh);
ZB.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
ZB.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};vB(WB);function $B(){}var aC,bC,cC,dC,eC,fC;
function gC(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)aC=!0,bC=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),cC=HTMLMediaElement.prototype.setMediaKeys,dC=window.MediaKeys,eC=window.MediaKeySystemAccess,fC=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=hC;window.MediaKeys=iC;window.MediaKeySystemAccess=jC;navigator.requestMediaKeySystemAccess=
kC;window.shakaMediaKeysPolyfill=lC;pg.clear();cc.clear()}}function kC(a,b){try{var c=new jC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function hC(a){var b=this.mediaKeys;b&&b!=a&&mC(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?mC(a,this):Promise.resolve()}
function nC(a){a=Qb(a.initData);if(Vb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Ic(a.subarray(4),!0);a=Lc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Sb(a);this.dispatchEvent(b)}uB.PatchedMediaKeysApple=$B;
$B.uninstall=function(){aC&&(aC=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",bC),HTMLMediaElement.prototype.setMediaKeys=cC,window.MediaKeys=dC,window.MediaKeySystemAccess=eC,navigator.requestMediaKeySystemAccess=fC,bC=fC=cC=eC=dC=null,window.shakaMediaKeysPolyfill="",pg.clear(),cc.clear())};$B.install=gC;
function jC(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
jC.prototype.createMediaKeys=function(){var a=new iC(this.keySystem);return Promise.resolve(a)};jC.prototype.getConfiguration=function(){return this.g};function iC(a){this.h=new WebKitMediaKeys(a);this.g=new lb}iC.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new oC(this.h,a)};iC.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function mC(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",nC);try{return El(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}iC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function oC(a){dh.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new lb;this.sessionId="";this.expiration=NaN;this.closed=new Ug;this.keyStatuses=new pC}qa(oC,dh);r=oC.prototype;
r.generateRequest=function(a,b){var c=this;this.h=new Ug;try{var d=this.l.createSession("video/mp4",Qb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.dc()?"license-request":"license-renewal").set("message",Sb(e.message));e=new V("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(qC(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:qC(c,"output-not-allowed");break;default:qC(c,"internal-error")}});qC(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
r.update=function(a){this.g=new Ug;try{this.i.update(Qb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function qC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new V("keystatuseschange");a.dispatchEvent(b)}
function pC(){this.size=0;this.g=void 0}r=pC.prototype;r.dc=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,bc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=bc.value();return this.g&&Pb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var lC="apple";vB(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||gC())});function rC(){}function sC(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||mc()||kc("Tizen 4")||kc("Tizen 5.0")||oc())&&(MediaKeys.prototype.setServerCertificate=tC)}function tC(){return Promise.resolve(!1)}uB.PatchedMediaKeysCert=rC;rC.install=sC;vB(sC);function uC(){}
function vC(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)wC="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=xC;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=yC;window.MediaKeys=zC;window.MediaKeySystemAccess=AC;window.shakaMediaKeysPolyfill=BC}}
function CC(a){var b=wC;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function xC(a,b){try{var c=new AC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function yC(a){var b=this.mediaKeys;b&&b!=a&&DC(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&DC(a,this);return Promise.resolve()}uB.PatchedMediaKeysWebkit=uC;uC.install=vC;
function AC(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}AC.prototype.createMediaKeys=function(){var a=new zC(this.g);return Promise.resolve(a)};AC.prototype.getConfiguration=function(){return this.h};function zC(a){this.l=a;this.h=null;this.g=new lb;this.i=[];this.j=new Map}
function DC(a,b){a.h=b;a.g.Qa();var c=wC;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Sb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=EC(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.dc()?"licenserequest":"licenserenewal").set("message",d.message),d=new V("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=EC(a,d.sessionId))&&d.ready()}),
a.g.D(b,c+"keyerror",function(d){var e=EC(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?FC(e,"output-restricted"):1==f?FC(e,"expired"):FC(e,"internal-error"))}}))}
zC.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new GC(b,this.l,a);this.i.push(a);return a};zC.prototype.setServerCertificate=function(){return Promise.resolve(!1)};zC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function EC(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 GC(a,b,c){dh.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Ug;this.keyStatuses=new HC}qa(GC,dh);r=GC.prototype;r.ready=function(){FC(this,"usable");this.g&&this.g.resolve();this.g=null};
function IC(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Qb(Lc("LOAD_SESSION|"+c));else{var e=Lc("PERSISTENT|");d=Wc(e,b)}else d=Qb(b)}catch(g){return Promise.reject(g)}a.h=new Ug;var f=CC("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new ec(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).da(.01)}return a.h}
function JC(a,b,c){if(a.g)a.g.then(function(){return JC(a,b,c)}).catch(function(){return JC(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Hc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Tc(e.keys[0].k);e=Tc(e.keys[0].kid)}else d=Qb(c),e=null;var f=CC("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function FC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new V("keystatuseschange");a.dispatchEvent(b)}r.generateRequest=function(a,b){return IC(this,b,null)};r.load=function(a){return"persistent-license"==this.l?IC(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Ug;JC(this,b,a);return b};
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=CC("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function HC(){this.size=0;this.g=void 0}r=HC.prototype;r.dc=function(){return this.g};
r.forEach=function(a){this.g&&a(this.g,bc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=bc.value();return this.g&&Pb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var wC="",BC="webkit";vB(vC);function KC(){}function LC(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=MC,Object.defineProperty(a,"disablePictureInPicture",{get:NC,set:OC,enumerable:!0,configurable:!0}),document.exitPictureInPicture=PC,document.addEventListener("webkitpresentationmodechanged",QC,!0))}}
function QC(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
function MC(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function PC(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
function NC(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function OC(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}uB.PiPWebkit=KC;KC.install=LC;vB(LC);function RC(){}function SC(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=TC))}function TC(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}uB.RandomUUID=RC;RC.install=SC;vB(SC);function UC(){}function VC(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:WC})}function WC(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}uB.Symbol=UC;UC.install=VC;vB(VC);function XC(){}function YC(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}uB.VideoPlayPromise=XC;XC.install=YC;vB(YC);function ZC(){}function $C(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||oc())&&(a.getVideoPlaybackQuality=aD)}}function aD(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}uB.VideoPlaybackQuality=ZC;ZC.install=$C;vB($C);function bD(){}function cD(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=dD;else if(6==b)a=eD;else{try{var c=!!dD(1,2,"")}catch(d){c=!1}c&&(a=dD)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function dD(a,b,c){return new window.TextTrackCue(a,b,c)}function eD(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}uB.VTTCue=bD;bD.install=cD;vB(cD);function fD(){}fD.prototype.parseInit=function(){};fD.prototype.setSequenceMode=function(){};fD.prototype.setManifestType=function(){};fD.prototype.parseMedia=function(a,b){var c=null,d=[];a=Hc(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=gD.exec(e))){var f=hD.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Ae(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
T("shaka.text.LrcTextParser",fD);fD.prototype.parseMedia=fD.prototype.parseMedia;fD.prototype.setManifestType=fD.prototype.setManifestType;fD.prototype.setSequenceMode=fD.prototype.setSequenceMode;fD.prototype.parseInit=fD.prototype.parseInit;var gD=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,hD=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;zf("application/x-subtitle-lrc",function(){return new fD});function iD(){}iD.prototype.parseInit=function(){};iD.prototype.setSequenceMode=function(){};iD.prototype.setManifestType=function(){};
iD.prototype.parseMedia=function(a,b,c,d){var e=Hc(a);a=[];if(""==e)return a;var f=Rd(e,"tt",!0);if(!f)throw new U(2,2,2005,"Failed to parse TTML.");e=ae(f,"body")[0];if(!e)return[];var g=je(f,jD,"frameRate"),h=je(f,jD,"subFrameRate"),k=je(f,jD,"frameRateMultiplier"),l=je(f,jD,"tickRate"),m=je(f,jD,"cellResolution"),n=f.attributes["xml:space"]||"default",p=je(f,kD,"extent");if("default"!=n&&"preserve"!=n)throw new U(2,2,2005,"Invalid xml:space value: "+n);n="default"==n;g=new lD(g,h,k,l);m=mD(m);
h=ae(f,"metadata")[0];h=(h?h.children:[]).filter(function(w){return"\n"!=w});k=ae(f,"style");f=ae(f,"region");l=[];for(var q=t(f),u=q.next();!u.done;u=q.next())(u=nD(u.value,k,p))&&l.push(u);if(Yd(e,"p").length)throw new U(2,2,2001,"<p> can only be inside <div> in TTML");p=t(Yd(e,"div"));for(q=p.next();!q.done;q=p.next())if(Yd(q.value,"span").length)throw new U(2,2,2001,"<span> can only be inside <p> in TTML");if(b=oD(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"),
a.push(b);return a};
function oD(a,b,c,d,e,f,g,h,k,l,m,n,p){var q=l;if(Wd(a)){if(!m)return null;var u={tagName:"span",children:[Zd(a)],attributes:{},parent:null}}else u=a;for(var w=null,v=t(pD),x=v.next();!x.done&&!(w=qD(u,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=null;x=je(u,pD,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(x&&z.test(x)){v=parseInt(x.split(":").pop(),10)-1;if(v>=p.length)return null;v=p[v]}else n&&x&&!x.startsWith("#")&&(z=new yb(n),x=new yb(x),(x=z.resolve(x).toString())&&
(v=x));if("p"==a.tagName||w||v)m=!0;a=m;x="default"==(u.attributes["xml:space"]||(h?"default":"preserve"));z=u.children.every(Wd);h=[];if(!z)for(var D=t(u.children),B=D.next();!B.done;B=D.next())(B=oD(B.value,b,c,d,e,f,g,x,k,u,m,n,p))&&h.push(B);d=null!=l;n=Zd(u);n=u.children.length&&n&&/\S/.test(n);D=u.attributes.begin||u.attributes.end||u.attributes.dur;if(!(D||n||"br"==u.tagName||0!=h.length||d&&!x))return null;p=rD(u,c);n=p.start;for(p=p.end;q&&q.tagName&&"tt"!=q.tagName;)p=sD(q,c,n,p),n=p.start,
p=p.end,q=q.parent;null==n&&(n=0);n+=b.periodStart;p=null==p?Infinity:p+b.periodStart;n=Math.max(n,b.segmentStart);p=Math.min(p,b.segmentEnd);if(!D&&0<h.length)for(n=Infinity,p=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),p=Math.max(p,c.endTime);if("br"==u.tagName)return e=new Ae(n,p,""),e.lineBreak=!0,e;b="";z&&(b=Pc(Zd(u)||""),x&&(b=b.replace(/\s+/g," ")));b=new Ae(n,p,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=qD(u,"region",f,"")[0];if(u.attributes.region&&
k&&k.attributes["xml:id"]){var I=k.attributes["xml:id"];b.region=g.filter(function(C){return C.id==I})[0]}g=k;l&&d&&!u.attributes.region&&!u.attributes.style&&(g=qD(l,"region",f,"")[0]);tD(b,u,g,w,v,e,a,0==h.length);return b}
function nD(a,b,c){var d=new yd,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=uD.exec(c)||vD.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=wD(a,b,"extent");if(g){var h=(f=uD.exec(g))||vD.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?zd:0,d.heightUnits=f||null!=e?zd:0)}if(a=wD(a,b,"origin"))if(h=(f=uD.exec(a))||vD.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=zd,d.height=100-d.viewportAnchorY,d.heightUnits=zd):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?zd:0;return d}function xD(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
function tD(a,b,c,d,e,f,g,h){g=g||h;"rtl"==yD(b,c,f,"direction",g)&&(a.direction="rtl");h=yD(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=De);(h=yD(b,c,f,"textAlign",!0))?(a.positionAlign=zD.get(h),a.lineAlign=AD.get(h),a.textAlign=Ye[h.toUpperCase()]):a.textAlign=Ce;if(h=yD(b,c,f,"displayAlign",!0))a.displayAlign=Ze[h.toUpperCase()];if(h=yD(b,c,f,"color",g))a.color=xD(h);if(h=yD(b,
c,f,"backgroundColor",g))a.backgroundColor=xD(h);if(h=yD(b,c,f,"border",g))a.border=h;if(h=yD(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
k}).join(",")}(h=yD(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=Ve);h=yD(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=yD(b,c,f,"lineHeight",g))&&h.match(BD)&&(a.lineHeight=h);(h=yD(b,c,f,"fontSize",g))&&(h.match(BD)||h.match(CD))&&(a.fontSize=h);if(h=yD(b,c,f,"fontStyle",g))a.fontStyle=af[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=Zd(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
e);if(d=yD(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(BD)?a.textStrokeColor=a.color:(a.textStrokeColor=xD(d[0]),d.shift()),d[0]&&d[0].match(BD)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=yD(b,c,f,"letterSpacing",g))&&d.match(BD)&&(a.letterSpacing=d);(d=yD(b,c,f,"linePadding",g))&&d.match(BD)&&(a.linePadding=d);if(d=yD(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=wD(c,f,"textDecoration"))&&DD(a,d);(d=ED(b,f,"textDecoration"))&&DD(a,d);if(d=yD(b,c,f,"textCombine",g))a.textCombineUpright=
d;switch(yD(b,c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
function DD(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(Xe)||a.textDecoration.push(Xe);break;case "noUnderline":a.textDecoration.includes(Xe)&&Cd(a.textDecoration,Xe);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Cd(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Cd(a.textDecoration,"overline")}}function yD(a,b,c,d,e){e=void 0===e?!0:e;return(a=ED(a,c,d))?a:e?wD(b,c,d):null}function wD(a,b,c){if(!a)return null;var d=je(a,kD,c);return d?d:FD(a,b,c)}function ED(a,b,c){var d=je(a,kD,c);return d?d:FD(a,b,c)}
function FD(a,b,c){a=qD(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ie(a[e],"urn:ebu:tt:style",c);f||(f=je(a[e],kD,c));f||(f=ED(a[e],b,c));f&&(d=f)}return d}function qD(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?ie(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 sD(a,b,c,d){a=rD(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function rD(a,b){var c=GD(a.attributes.begin,b),d=GD(a.attributes.end,b);a=GD(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
function GD(a,b){var c=null;if(HD.test(a)){a=HD.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(ID.test(a))c=JD(ID,a);else if(KD.test(a))c=JD(KD,a);else if(LD.test(a))a=LD.exec(a),c=Number(a[1])/b.frameRate;else if(MD.test(a))a=MD.exec(a),c=Number(a[1])/b.g;else if(ND.test(a))c=JD(ND,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c}
function JD(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function mD(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{oc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}T("shaka.text.TtmlTextParser",iD);iD.prototype.parseMedia=iD.prototype.parseMedia;iD.prototype.setManifestType=iD.prototype.setManifestType;iD.prototype.setSequenceMode=iD.prototype.setSequenceMode;iD.prototype.parseInit=iD.prototype.parseInit;
function lD(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var uD=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,CD=/^(\d{1,4}(?:\.\d+)?|100)%$/,BD=/^(\d+px|\d+em|\d*\.?\d+c)$/,vD=/^(\d+)px (\d+)px$/,HD=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ID=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,KD=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,LD=/^(\d*(?:\.\d*)?)f$/,MD=/^(\d*(?:\.\d*)?)t$/,ND=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),AD=(new Map).set("left",Ge).set("center","center").set("right",
"end").set("start",Ge).set("end","end"),zD=(new Map).set("left","line-left").set("center","center").set("right","line-right"),jD=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],kD=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],pD=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];zf("application/ttml+xml",function(){return new iD});function OD(){this.g=new iD}OD.prototype.parseInit=function(a){var b=!1;(new Fh).box("moov",Kh).box("trak",Kh).box("mdia",Kh).box("minf",Kh).box("stbl",Kh).R("stsd",Mh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};OD.prototype.setSequenceMode=function(){};OD.prototype.setManifestType=function(){};
OD.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new Fh).box("moof",Kh).box("traf",Kh).R("tfhd",function(x){e=Wi(x.reader,x.flags).md}).R("trun",function(x){x=Zi(x.reader,x.version,x.flags);x=t(x.fg);for(var z=x.next();!z.done;z=x.next())h.push(z.value.sampleSize||e||0)}).R("subs",function(x){for(var z=x.reader,D=z.S(),B=-1,I=0;I<D;I++){var C=z.S();B+=C;C=z.na();for(var A=[],E=0;E<C;E++)1==x.version?A.push(z.S()):A.push(z.na()),z.X(),z.X(),z.S();g.set(B,A)}}).box("mdat",
Ph(function(x){f.push(x)})).parse(a,!1);if(0==f.length)throw new U(2,2,2007);for(var k=Wc.apply(Qc,y(f)),l=0,m=0;m<h.length;m++){var n=Qb(k,l,h[m]);l+=h[m];var p=g.get(m);if(p&&p.length){n=Qb(n,0,p[0]);for(var q=[],u=p[0],w=1;w<p.length;w++){var v=Qb(a,u,p[w]);v=Rc(v);q.push("data:image/png;base64,"+v);u+=p[w]}d=d.concat(this.g.parseMedia(n,b,c,q))}else d=d.concat(this.g.parseMedia(n,b,c,[]))}return d};T("shaka.text.Mp4TtmlParser",OD);OD.prototype.parseMedia=OD.prototype.parseMedia;
OD.prototype.setManifestType=OD.prototype.setManifestType;OD.prototype.setSequenceMode=OD.prototype.setSequenceMode;OD.prototype.parseInit=OD.prototype.parseInit;zf('application/mp4; codecs="stpp"',function(){return new OD});zf('application/mp4; codecs="stpp.ttml"',function(){return new OD});zf('application/mp4; codecs="stpp.ttml.im1i"',function(){return new OD});zf('application/mp4; codecs="stpp.ttml.im1t"',function(){return new OD});zf('application/mp4; codecs="stpp.ttml.im2i"',function(){return new OD});
zf('application/mp4; codecs="stpp.ttml.im2t"',function(){return new OD});zf('application/mp4; codecs="stpp.ttml.etd1"',function(){return new OD});zf('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new OD});zf('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new OD});zf('application/mp4; codecs="stpp.TTML.im1t"',function(){return new OD});function PD(){this.g="UNKNOWN"}PD.prototype.parseInit=function(){};PD.prototype.setSequenceMode=function(){};PD.prototype.setManifestType=function(a){this.g=a};
PD.prototype.parseMedia=function(a,b){a=Hc(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 U(2,2,2E3);a=b.vttOffset;if("HLS"==this.g)if(c[0].includes("X-TIMESTAMP-MAP")){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new U(2,2,2E3);a=Md(a[1]);if(null==a)throw new U(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,
d+=8589934592;a=b.periodStart+d/9E4-a}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 Fd(e);var f=new yd;Id(e);Gd(e);for(var g=Id(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");Gd(e);g=Id(e)}b.push(f)}d=new Map;Ne(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&
(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Ae(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var q=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=q;break;case "color":m=!0;l.color=q;break;case "font-family":m=!0;l.fontFamily=
q;break;case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==q)m=!0,l.fontWeight=Ve;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=Je;break;case "italic":m=!0;l.fontStyle=We;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(q);break;case "text-combine-upright":m=!0;l.textCombineUpright=q;break;case "text-shadow":m=!0;l.textShadow=q;break;case "white-space":m=!0,l.wrapLine="noWrap"!=q}}}m&&d.set(g,
l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Fd(l[0]),g=Kd(h),n=Hd(h,/[ \t]+--\x3e[ \t]+/g),k=Kd(h),null==g||null==n||null==k)bb("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 Ae(g,k,m);Gd(h);for(g=Id(h);g;)QD(l,g,b),Gd(h),g=Id(h);
Me(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
function QD(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Ce:a.textAlign=Ye[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Be);else if(d=/^region:(.*)$/.exec(b)){if(b=RD(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=$e[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Fe,a.line=Number(c[1]),c[2]&&(a.lineAlign=$e[c[2].toUpperCase()])}
function RD(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}T("shaka.text.VttTextParser",PD);PD.prototype.parseMedia=PD.prototype.parseMedia;PD.prototype.setManifestType=PD.prototype.setManifestType;PD.prototype.setSequenceMode=PD.prototype.setSequenceMode;PD.prototype.parseInit=PD.prototype.parseInit;zf("text/vtt",function(){return new PD});zf('text/vtt; codecs="vtt"',function(){return new PD});zf('text/vtt; codecs="wvtt"',function(){return new PD});function SD(){this.g=null}SD.prototype.parseInit=function(a){var b=this,c=!1;(new Fh).box("moov",Kh).box("trak",Kh).box("mdia",Kh).R("mdhd",function(d){d=Yi(d.reader,d.version);b.g=d.timescale}).box("minf",Kh).box("stbl",Kh).R("stsd",Mh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new U(2,2,2008);if(!c)throw new U(2,2,2008);};SD.prototype.setSequenceMode=function(){};SD.prototype.setManifestType=function(){};
SD.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new U(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Fh).box("moof",Kh).box("traf",Kh).R("tfdt",function(D){g=!0;c=Xi(D.reader,D.version).baseMediaDecodeTime}).R("tfhd",function(D){l=Wi(D.reader,D.flags).ld}).R("trun",function(D){h=!0;d=Zi(D.reader,D.version,D.flags).fg}).box("mdat",Ph(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new U(2,2,2008);a=c;for(var m=new Ch(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
p.value;var q=p.gg||l,u=p.ye?c+p.ye:a;a=u+(q||0);var w=0;do{var v=m.S();w+=v;var x=m.S(),z=null;"vttc"==Jh(x)?8<v&&(z=m.Cb(v-8)):m.skip(v-8);q&&z&&(v=TD(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(v))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(Kf)};function TD(a,b,c){var d,e,f;(new Fh).box("payl",Ph(function(g){d=Hc(g)})).box("iden",Ph(function(g){e=Hc(g)})).box("sttg",Ph(function(g){f=Hc(g)})).parse(a);return d?UD(d,e,f,b,c):null}
function UD(a,b,c,d,e){a=new Ae(d,e,a);Me(a);b&&(a.id=b);if(c)for(b=new Fd(c),c=Id(b);c;)QD(a,c,[]),Gd(b),c=Id(b);return a}T("shaka.text.Mp4VttParser",SD);SD.prototype.parseMedia=SD.prototype.parseMedia;SD.prototype.setManifestType=SD.prototype.setManifestType;SD.prototype.setSequenceMode=SD.prototype.setSequenceMode;SD.prototype.parseInit=SD.prototype.parseInit;zf('application/mp4; codecs="wvtt"',function(){return new SD});function VD(){}VD.prototype.parseInit=function(){};VD.prototype.setSequenceMode=function(){};VD.prototype.setManifestType=function(){};VD.prototype.parseMedia=function(a){var b=Hc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Fd(c[0]),e=Kd(d),f=Hd(d,/,/g);d=Kd(d);if(null==e||null==f||null==d)throw new U(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Ae(e,d,c.slice(1).join("\n").trim()))}return a};
T("shaka.text.SbvTextParser",VD);VD.prototype.parseMedia=VD.prototype.parseMedia;VD.prototype.setManifestType=VD.prototype.setManifestType;VD.prototype.setSequenceMode=VD.prototype.setSequenceMode;VD.prototype.parseInit=VD.prototype.parseInit;zf("text/x-subviewer",function(){return new VD});function WD(){this.g=new PD}WD.prototype.parseInit=function(){};WD.prototype.setSequenceMode=function(){};WD.prototype.setManifestType=function(){};WD.prototype.parseMedia=function(a,b,c){a=Hc(a);a=XD(a);a=Qb(Lc(a));return this.g.parseMedia(a,b,c,[])};
function XD(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}T("shaka.text.SrtTextParser",WD);WD.srt2webvtt=XD;WD.prototype.parseMedia=WD.prototype.parseMedia;
WD.prototype.setManifestType=WD.prototype.setManifestType;WD.prototype.setSequenceMode=WD.prototype.setSequenceMode;WD.prototype.parseInit=WD.prototype.parseInit;zf("text/srt",function(){return new WD});function YD(){}YD.prototype.parseInit=function(){};YD.prototype.setSequenceMode=function(){};YD.prototype.setManifestType=function(){};
YD.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Hc(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=ZD.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=$D.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(aE);else if("Style"==a){a=f.split(aE);f={};for(var g=0;g<e.length&&
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Dh:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=$D.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(aE);else if("Dialogue"==f){g=g.split(aE);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=bE(f.Start);var k=bE(f.End);g=new Ae(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Dh=f.Style;(a=d.find(function(l){return function(m){return m.Name==
l.Dh}}(a)))&&cE(g,a);e.push(g)}return e};
function cE(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=dE(c))a.color=c;if(c=b.BackColour)if(c=dE(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=Ve);b.Italic&&(a.fontStyle=We);b.Underline&&a.textDecoration.push(Xe);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=He;a.textAlign="start";break;case 2:a.displayAlign=He;a.textAlign=Ce;break;case 3:a.displayAlign=He;a.textAlign="end";break;case 5:a.displayAlign=
"before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Ce;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Ce;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function dE(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}
function bE(a){a=eE.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}T("shaka.text.SsaTextParser",YD);YD.prototype.parseMedia=YD.prototype.parseMedia;YD.prototype.setManifestType=YD.prototype.setManifestType;YD.prototype.setSequenceMode=YD.prototype.setSequenceMode;YD.prototype.parseInit=YD.prototype.parseInit;var ZD=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,$D=/^\s*([^:]+):\s*(.*)/,aE=/\s*,\s*/,eE=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
zf("text/x-ssa",function(){return new YD});function fE(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{ud:c,ia:a}:null}function gE(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
function hE(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
function iE(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function jE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}r=jE.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?md(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(wf(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.j};
r.transmux=function(a,b,c,d){for(var e=Qb(a),f=ok(e),g=f.length;g<e.length&&!hE(e,g);g++);a=1E3*c.endTime;f=nk(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=gE(e,g);if(!f)return Promise.reject(new U(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=fE(e,g);if(!k)return Promise.reject(new U(2,3,3018,c?c.N()[0]:null));var l=k.ud+k.ia;g+l<=e.length&&h.push({data:e.subarray(g+
k.ud,g+l),size:k.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:a,jb:h},stream:b};d=new ej([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=kj(d),this.g.set(c,b));c=this.i!==b;d=Cj(d);this.i=b;this.h++;return c?(b=Wc(b,d),Promise.resolve(b)):
Promise.resolve(d)};T("shaka.transmuxer.AacTransmuxer",jE);jE.prototype.transmux=jE.prototype.transmux;jE.prototype.getOriginalMimeType=jE.prototype.getOriginalMimeType;jE.prototype.convertCodecs=jE.prototype.convertCodecs;jE.prototype.isSupported=jE.prototype.isSupported;jE.prototype.destroy=jE.prototype.destroy;cf("audio/aac",function(){return new jE("audio/aac")},jf);function kE(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ra:a,ia:e}}
function lE(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function mE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}r=mE.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?md(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?mc()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.j};
r.transmux=function(a,b,c,d){a=Qb(a);for(var e=ok(a),f=e.length;f<a.length&&!lE(a,f);f++);var g=1E3*c.endTime;e=nk(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=kE(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ra;k.push({data:a.subarray(f,f+l.ia),size:l.ia,duration:1536,
eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}});f+=l.ia}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,lb:[],ra:h,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:a,jb:k},stream:b};d=new ej([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=kj(d),this.g.set(c,b));c=this.i!==b;d=Cj(d);this.i=b;this.h++;return c?(b=Wc(b,d),Promise.resolve(b)):Promise.resolve(d)};T("shaka.transmuxer.Ac3Transmuxer",mE);
mE.prototype.transmux=mE.prototype.transmux;mE.prototype.getOriginalMimeType=mE.prototype.getOriginalMimeType;mE.prototype.convertCodecs=mE.prototype.convertCodecs;mE.prototype.isSupported=mE.prototype.isSupported;mE.prototype.destroy=mE.prototype.destroy;cf("audio/ac3",function(){return new mE("audio/ac3")},jf);function nE(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new pk(a.subarray(b+2));rk(c,2);rk(c,3);var d=sk(c,11)+1<<1,e=sk(c,2);if(3==e){e=sk(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=sk(c,2);var g=sk(c,3),h=sk(c,1);c=sk(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ra:a,ia:d}};function oE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}r=oE.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?md(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.j};
r.transmux=function(a,b,c,d){a=Qb(a);for(var e=ok(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=nk(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=nE(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ra;k.push({data:a.subarray(f,f+l.ia),
size:l.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}});f+=l.ia}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,lb:[],ra:h,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:a,jb:k},stream:b};d=new ej([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=kj(d),this.g.set(c,b));c=this.i!==b;d=Cj(d);this.i=b;this.h++;return c?(b=Wc(b,d),Promise.resolve(b)):Promise.resolve(d)};
T("shaka.transmuxer.Ec3Transmuxer",oE);oE.prototype.transmux=oE.prototype.transmux;oE.prototype.getOriginalMimeType=oE.prototype.getOriginalMimeType;oE.prototype.convertCodecs=oE.prototype.convertCodecs;oE.prototype.isSupported=oE.prototype.isSupported;oE.prototype.destroy=oE.prototype.destroy;cf("audio/ec3",function(){return new oE("audio/ec3")},jf);function pE(a){if(!a.length)return null;var b=a.find(function(w){return 7==w.type});a=a.find(function(w){return 8==w.type});if(!b||!a)return null;var c=new pk(b.data),d=xk(c);xk(c);xk(c);uk(c);if(qE.includes(d)&&(d=W(c),3===d&&rk(c,1),uk(c),uk(c),rk(c,1),wk(c))){d=3!==d?8:12;for(var e=0;e<d;e++)wk(c)&&(6>e?yk(c,16):yk(c,64))}uk(c);d=W(c);if(0===d)W(c);else if(1===d)for(rk(c,1),uk(c),uk(c),d=W(c),e=0;e<d;e++)uk(c);uk(c);rk(c,1);var f=W(c),g=W(c),h=sk(c,1);0===h&&rk(c,1);rk(c,1);var k=0,l=0,m=0,n=0;
wk(c)&&(k=W(c),l=W(c),m=W(c),n=W(c));e=d=1;if(wk(c)&&wk(c)){var p=xk(c),q=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=q[p-1],e=u[p-1]):255===p&&(d=sk(c,16),e=sk(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,y(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,y(a));a=new Uint8Array([1,k[3],k[4],
k[5],255,225].concat(k,[1],b));return{height:c,width:f,Ca:a,Ia:d,Ka:e}}
function rE(a){function b(u){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:u.pts,dts:u.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var u=[],w=t(e.nalus),v=w.next();!v.done;v=w.next()){v=v.value;var x=v.fullData.byteLength,z=new Uint8Array(4);z[0]=x>>24&255;z[1]=x>>16&255;z[2]=x>>8&255;z[3]=x&255;u.push(z);u.push(v.fullData)}e.data=Wc.apply(Qc,y(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;g<a.length;g++){var h=a[g],k=h.nalus,l=!1;e&&k.length&&!f&&(c(),b(h));k=t(h.nalus);for(var m=
k.next();!m.done;m=k.next()){m=m.value;var n=!1;switch(m.type){case 1:var p=!1;n=!0;var q=m.data;l&&4<q.length&&(q=zk(new pk(q)),2===q||4===q||7===q||9===q)&&(p=!0);p&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=p;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
return d}var qE=[100,110,122,244,44,83,86,118,128,138,139,134];function sE(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=tE(b.fullData);a=uE(c.fullData);var f=vE(d.fullData);b=wE(b.fullData,c.fullData,d.fullData,{Uf:e.Uf,rg:e.rg,Ef:a.Ef,Ff:a.Ff,yf:a.yf,Df:a.Df,zf:a.zf,Af:a.Af,Bf:a.Bf,Cf:a.Cf,rf:a.rf,tf:a.tf,uf:a.uf,vf:a.vf,wf:a.wf,xf:a.xf,hf:a.hf,le:a.le,ff:a.ff,ef:a.ef,df:a.df,Wf:f.Wf});return{height:a.height,width:a.width,
Ca:b,Ia:a.vj,Ka:a.uj}}function tE(a){var b=new pk(a,!0);xk(b);xk(b);sk(b,4);sk(b,2);sk(b,6);a=sk(b,3);b=wk(b);return{Uf:a+1,rg:b}}
function uE(a){a=new pk(a,!0);xk(a);xk(a);var b=0,c=0,d=0,e=0;sk(a,4);var f=sk(a,3);wk(a);for(var g=sk(a,2),h=sk(a,1),k=sk(a,5),l=xk(a),m=xk(a),n=xk(a),p=xk(a),q=xk(a),u=xk(a),w=xk(a),v=xk(a),x=xk(a),z=xk(a),D=xk(a),B=[],I=[],C=0;C<f;C++)B.push(wk(a)),I.push(wk(a));if(0<f)for(C=f;8>C;C++)sk(a,2);for(C=0;C<f;C++)B[C]&&sk(a,88),I[C]&&xk(a);W(a);B=W(a);3==B&&sk(a,1);I=W(a);C=W(a);wk(a)&&(b+=W(a),c+=W(a),d+=W(a),e+=W(a));var A=W(a),E=W(a),G=W(a);if(wk(a))for(var M=0;M<=f;M++)W(a),W(a),W(a);else W(a),
W(a),W(a);W(a);W(a);W(a);W(a);W(a);W(a);if(wk(a)&&wk(a))for(M=0;4>M;M++)for(var L=0;L<(3===M?2:6);L++)if(wk(a)){var J=Math.min(64,1<<4+(M<<1));1<M&&vk(a);for(var K=0;K<J;K++)vk(a)}else W(a);wk(a);wk(a);wk(a)&&(xk(a),W(a),W(a),wk(a));M=W(a);for(J=L=0;J<M;J++)if(K=!1,0!==J&&(K=wk(a)),K){J===M&&W(a);wk(a);W(a);for(var N=K=0;N<=L;N++){var P=wk(a),O=!1;P||(O=wk(a));(P||O)&&K++}L=K}else{N=W(a);K=W(a);L=N+K;for(P=0;P<N;P++)W(a),wk(a);for(N=0;N<K;N++)W(a),wk(a)}if(wk(a))for(M=W(a),L=0;L<M;L++){for(J=0;J<
G+4;J++)sk(a,1);sk(a,1)}M=G=1;L=0;wk(a);wk(a);if(wk(a)){wk(a)&&(J=xk(a),K=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],N=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<J&&16>=J?(G=K[J-1],M=N[J-1]):255===J&&(G=sk(a,16),M=sk(a,16)));wk(a)&&wk(a);wk(a)&&(sk(a,3),wk(a),wk(a)&&(xk(a),xk(a),xk(a)));wk(a)&&(W(a),W(a));wk(a);wk(a);wk(a);if(J=wk(a))W(a),W(a),W(a),W(a);if(wk(a)&&(sk(a,32),sk(a,32),wk(a)&&W(a),wk(a))){N=!1;J=wk(a);K=wk(a);if(J||K){if(N=wk(a))xk(a),sk(a,5),wk(a),sk(a,5);sk(a,4);sk(a,4);N&&
sk(a,4);sk(a,5);sk(a,5);sk(a,5)}for(P=0;P<=f;P++){var R=!0;O=1;wk(a)||(R=wk(a));var S=!1;R?W(a):S=wk(a);S||(O=W(a)+1);if(J){for(R=0;R<O;R++)W(a),W(a),N&&(W(a),W(a));wk(a)}if(K){for(R=0;R<O;R++)W(a),W(a),N&&(W(a),W(a));wk(a)}}}wk(a)&&(wk(a),wk(a),wk(a),L=W(a),W(a),W(a),W(a),W(a))}return{yf:D,Ef:g,Ff:h,Df:k,zf:l,Af:m,Bf:n,Cf:p,rf:q,tf:u,uf:w,vf:v,wf:x,xf:z,le:L,hf:0,ff:B,ef:A,df:E,width:I-(b+c)*(1===B||2===B?2:1),height:C-(d+e)*(1===B?2:1),vj:G,uj:M}}
function vE(a){var b=new pk(a,!0);xk(b);xk(b);W(b);W(b);wk(b);wk(b);sk(b,3);wk(b);wk(b);W(b);W(b);vk(b);wk(b);wk(b);wk(b)&&W(b);vk(b);vk(b);wk(b);wk(b);wk(b);wk(b);a=wk(b);b=wk(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Wf:c}}
function wE(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Ef&3)<<6|(d.Ff?1:0)<<5|d.Df&31;e[2]=d.zf;e[3]=d.Af;e[4]=d.Bf;e[5]=d.Cf;e[6]=d.rf;e[7]=d.tf;e[8]=d.uf;e[9]=d.vf;e[10]=d.wf;e[11]=d.xf;e[12]=d.yf;e[13]=240|(d.le&3840)>>8;e[14]=d.le&255;e[15]=252|d.Wf&3;e[16]=252|d.ff&3;e[17]=248|d.ef&7;e[18]=248|d.df&7;e[19]=0;e[20]=0;e[21]=(d.hf&3)<<6|(d.Uf&7)<<3|(d.rg?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function xE(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*yE[14*(3===c?3-d:3===d?3:4)+e-1];f=zE[3*(3===c?0:2===c?1:2)+f];c=AE[c][d];var h=BE[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,ia:k,tj:8*c*h}}return null}
function CE(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function DE(a,b){if(b+1<a.length&&CE(a,b)){var c=xE(a,b),d=4;c&&c.ia&&(d=c.ia);b+=d;return b===a.length||b+1<a.length&&CE(a,b)}return!1}
var yE=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],zE=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],AE=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BE=[0,1,1,4];function EE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}r=EE.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?md(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.j};
r.transmux=function(a,b,c,d){for(var e=Qb(a),f=ok(e).length;f<e.length&&!DE(e,f);f++);var g;for(a=[];f<e.length;){var h=xE(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.N()[0]:null));g||(g=h);f+h.ia<=e.length&&a.push({data:e.subarray(f,f+h.ia),size:h.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}});f+=h.ia}if(!g)return Promise.reject(new U(2,3,3018,c?c.N()[0]:null));e=9E4*g.tj/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
duration:d,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:e,jb:a},stream:b};d=new ej([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=kj(d),this.g.set(c,b));c=this.i!==b;d=Cj(d);this.i=b;this.h++;return c?(b=Wc(b,d),Promise.resolve(b)):Promise.resolve(d)};T("shaka.transmuxer.Mp3Transmuxer",EE);EE.prototype.transmux=EE.prototype.transmux;EE.prototype.getOriginalMimeType=EE.prototype.getOriginalMimeType;EE.prototype.convertCodecs=EE.prototype.convertCodecs;
EE.prototype.isSupported=EE.prototype.isSupported;EE.prototype.destroy=EE.prototype.destroy;cf("audio/mpeg",function(){return new EE("audio/mpeg")},jf);function FE(a){this.h=a;this.g=null}r=FE.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=wf(a).split(","),c=bd("audio",b);b=bd("video",b);return!c||b||"mp3"!=sf(c)?!1:md(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Ak;a=Qb(a);a=this.g.parse(a);if("mp3"!=a.od().audio||"audio"!=e)return Promise.reject(new U(2,3,3018,c?c.N()[0]:null));c=new Uint8Array([]);e=t(a.fb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=xE(a,b))?(b+d.ia<=a.length&&(c=Wc(c,a.subarray(b,b+d.ia))),b+=d.ia):b++;return Promise.resolve(c)};T("shaka.transmuxer.MpegTsTransmuxer",FE);FE.prototype.transmux=FE.prototype.transmux;
FE.prototype.getOriginalMimeType=FE.prototype.getOriginalMimeType;FE.prototype.convertCodecs=FE.prototype.convertCodecs;FE.prototype.isSupported=FE.prototype.isSupported;FE.prototype.destroy=FE.prototype.destroy;cf("video/mp2t",function(){return new FE("video/mp2t")},hf);/*
 @license
 MSS Transmuxer
 Copyright 2015 Dash Industry Forum
 SPDX-License-Identifier: BSD-3-Clause
*/
function GE(a){this.h=a;(this.g=gx.get("ISOBoxer")())&&HE(this)}
function HE(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==IE[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=GE.prototype;r.destroy=function(){};
r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return md(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return md(b)||md(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
r.transmux=function(a,b,c){if(!c)return Promise.resolve(Qb(a));if(!b.mssPrivateData)return Promise.reject(new U(2,3,3020,c?c.N()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var q=this.g.createFullBox("saiz",h);q.version=0;q.flags=0;q.sample_count=n.sample_count;q.default_sample_info_size=0;q.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)q.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else q.default_sample_info_size=
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=JE(u,"traf")+JE(h,"senc")+16);var v=Qb(e.write());return Promise.resolve(v)}catch(x){return x instanceof U?Promise.reject(x):Promise.reject(new U(2,3,3022,c?c.N()[0]:null))}};function JE(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}T("shaka.transmuxer.MssTransmuxer",GE);GE.prototype.transmux=GE.prototype.transmux;
GE.prototype.getOriginalMimeType=GE.prototype.getOriginalMimeType;GE.prototype.convertCodecs=GE.prototype.convertCodecs;GE.prototype.isSupported=GE.prototype.isSupported;GE.prototype.destroy=GE.prototype.destroy;var IE=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);cf("mss/audio/mp4",function(){return new GE("mss/audio/mp4")},jf);cf("mss/video/mp4",function(){return new GE("mss/video/mp4")},jf);function KE(a){this.m=a;this.g=0;this.i=new Map;this.l=this.h=this.j=null}r=KE.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=wf(c).split(",");c=bd("audio",d);d=bd("video",d);if(c&&(c=sf(c),!LE.includes(c))||d&&(c=sf(d),!ME.includes(c)))return!1;if(b)return md(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return md(b)||md(a)};
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=wf(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return sg(c,"audio/mp4")}).map(tg).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.m};
r.transmux=function(a,b,c,d,e){var f=Qb(a);if("audio"==e&&!Ik(f)){for(var g=ok(f),h=g.length;h<f.length;h++)if(DE(f,h))return Promise.reject(new U(2,3,3018,c?c.N()[0]:null));for(h=g.length;h<f.length;h++)if(hE(f,h))return this.h||(this.h=new jE("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.N()[0]:null))}this.j?this.j.clearData():this.j=new Ak;var k=this.j.parse(f),l=[],m=k.od();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],q=null,u=k.wc(),w=
rE(u);if(!w.length)throw new U(2,3,3023,c?c.N()[0]:null);for(var v=0;v<w.length;v++){var x=w[v];null==q&&(q=x.dts);var z=void 0;z=v+1<w.length?(w[v+1].dts||0)-(x.dts||0):1<w.length?(x.dts||0)-(w[v-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:x.data,size:x.data.byteLength,duration:z,eb:Math.round((x.pts||0)-(x.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:x.isKeyframe?2:1,ib:x.isKeyframe?0:1}})}for(var D=[],B=t(u),I=B.next();!I.done;I=B.next())D.push.apply(D,y(I.value.nalus));var C=pE(D);if(!C||null==
q)throw new U(2,3,3018,c?c.N()[0]:null);b.height=C.height;b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,lb:[],ra:new Uint8Array([]),Ca:C.Ca,Ia:C.Ia,Ka:C.Ka,data:{Db:this.g,baseMediaDecodeTime:q,jb:p},stream:b};break;case "hvc":var A=[],E=null,G=[],M=k.wc();if(!M.length)throw new U(2,3,3023,c?c.N()[0]:null);for(var L=0;L<M.length;L++){var J=M[L],K=J.nalus;G.push.apply(G,y(K));for(var N=!1,P=[],O=!1,R=t(K),S=R.next();!S.done;S=
R.next()){var pa=S.value;switch(pa.type){case 1:case 0:var Z=O=!0;break;case 19:case 20:case 21:N=Z=O=!0;break;case 32:Z=!0;break;case 33:Z=!0;break;case 34:Z=!0;break;case 35:O=Z=!0;break;case 39:case 40:Z=!0;break;default:Z=!1}if(O&&Z){var Fa=pa.fullData.byteLength,Ia=new Uint8Array(4);Ia[0]=Fa>>24&255;Ia[1]=Fa>>16&255;Ia[2]=Fa>>8&255;Ia[3]=Fa&255;P.push(Ia);P.push(pa.fullData)}}var sa=P.length?{data:Wc.apply(Qc,y(P)),isKeyframe:N}:null;if(sa){null==E&&null!=J.dts&&(E=J.dts);var ka=void 0;ka=L+
1<M.length?(M[L+1].dts||0)-(J.dts||0):1<M.length?(J.dts||0)-(M[L-1].dts||0):9E4*(c.endTime-c.startTime);A.push({data:sa.data,size:sa.data.byteLength,duration:ka,eb:Math.round((J.pts||0)-(J.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:sa.isKeyframe?2:1,ib:sa.isKeyframe?0:1}})}}var Ca=sE(G);if(!Ca||null==E)throw new U(2,3,3018,c?c.N()[0]:null);b.height=Ca.height;b.width=Ca.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,lb:[],ra:new Uint8Array([]),
Ca:Ca.Ca,Ia:Ca.Ia,Ka:Ca.Ka,data:{Db:this.g,baseMediaDecodeTime:E,jb:A},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var ra=[],ya,na=null,ta=null,Pa=null,ob=t(k.fb()),db=ob.next();!db.done;db=ob.next()){var eb=db.value,jb=eb.data;if(jb){var ub=0;if(-1==ta&&Pa)jb=Wc(Pa,eb.data),ta=null;else if(null!=ta&&Pa){ub=Math.max(0,ta);var ye=Wc(Pa,jb.subarray(0,ub));ra.push({data:ye,size:ye.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}});ta=Pa=null}ya=gE(jb,
ub);if(!ya)throw new U(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=ya.sampleRate;b.channelsCount=ya.channelCount;null==na&&null!==eb.pts&&(na=eb.pts);for(;ub<jb.length;){var Oc=fE(jb,ub);if(!Oc){Pa=jb.subarray(ub,jb.length);ta=-1;break}var de=Oc.ud+Oc.ia;ta=Math.max(0,ub+de-jb.length);0!=ta?Pa=jb.subarray(ub+Oc.ud,ub+de):ub+de<=jb.length&&ra.push({data:jb.subarray(ub+Oc.ud,ub+de),size:Oc.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}});ub+=de}}}if(!ya||null==na){if(!k.wc().length)throw new U(2,
3,3018,c?c.N()[0]:null);na=9E4*c.startTime;var Qf=bd("audio",b.codecs.split(","));if(!Qf||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.N()[0]:null);ya={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Qf};var Rf=iE(Qf,b.channelsCount);if(!Rf)throw new U(2,3,3018,c?c.N()[0]:null);for(var Zc=na+9E4*(c.endTime-c.startTime),Mv=na;Mv<Zc;)ra.push({data:Rf,size:Rf.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Mv+=1024/ya.sampleRate*9E4}var Nv=ya.sampleRate,
fF=na/9E4*Nv;n={id:b.id,type:"audio",codecs:ya.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Nv,duration:d,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:fF,jb:ra},stream:b};break;case "ac3":for(var Ov=[],Zj=0,Sn=new Uint8Array([]),ak=null,Pv=t(k.fb()),Tn=Pv.next();!Tn.done;Tn=Pv.next()){var Un=Tn.value,Vn=Un.data;null==ak&&null!==Un.pts&&(ak=Un.pts);for(var Wf=0;Wf<Vn.length;){var fe=kE(Vn,Wf);fe?(b.audioSamplingRate=fe.sampleRate,b.channelsCount=
fe.channelCount,Zj=fe.sampleRate,Sn=fe.ra,Ov.push({data:Vn.subarray(Wf,Wf+fe.ia),size:fe.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Wf+=fe.ia):Wf++}}if(0==Zj||0==Sn.byteLength||null==ak)throw new U(2,3,3018,c?c.N()[0]:null);var gF=ak/9E4*Zj;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Zj,duration:d,lb:[],ra:Sn,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:gF,jb:Ov},stream:b};break;case "ec3":for(var Qv=[],bk=0,
Wn=new Uint8Array([]),ck=null,Rv=t(k.fb()),Xn=Rv.next();!Xn.done;Xn=Rv.next()){var Yn=Xn.value,Zn=Yn.data;null==ck&&null!==Yn.pts&&(ck=Yn.pts);for(var Xf=0;Xf<Zn.length;){var ge=nE(Zn,Xf);ge?(b.audioSamplingRate=ge.sampleRate,b.channelsCount=ge.channelCount,bk=ge.sampleRate,Wn=ge.ra,Qv.push({data:Zn.subarray(Xf,Xf+ge.ia),size:ge.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Xf+=ge.ia):Xf++}}if(0==bk||0==Wn.byteLength||null==ck)throw new U(2,3,3018,c?c.N()[0]:null);var hF=ck/9E4*bk;
n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:bk,duration:d,lb:[],ra:Wn,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:hF,jb:Qv},stream:b};break;case "mp3":for(var Sv=[],dk,ek=null,Tv=t(k.fb()),$n=Tv.next();!$n.done;$n=Tv.next()){var ao=$n.value,xh=ao.data;if(xh){null==ek&&null!==ao.pts&&(ek=ao.pts);for(var Oe=0;Oe<xh.length;){var Yf=xE(xh,Oe);Yf?(dk||(dk=Yf),Oe+Yf.ia<=xh.length&&Sv.push({data:xh.subarray(Oe,Oe+Yf.ia),size:Yf.ia,duration:1152,
eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Oe+=Yf.ia):Oe++}}}if(!dk||null==ek)throw new U(2,3,3018,c?c.N()[0]:null);var Uv=dk.sampleRate,iF=ek/9E4*Uv;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Uv,duration:d,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:iF,jb:Sv},stream:b};break;case "opus":var Vv=[],fk=null,hd=k.F;if(!hd)throw new U(2,3,3018,c?c.N()[0]:null);var Rb=[];switch(hd.Zh){case 1:case 2:Rb=
[0];break;case 0:Rb=[255,1,1,0,1];break;case 128:Rb=[255,2,0,0,1];break;case 3:Rb=[1,2,1,0,2,1];break;case 4:Rb=[1,2,2,0,1,2,3];break;case 5:Rb=[1,3,2,0,4,1,2,3];break;case 6:Rb=[1,4,2,0,4,1,2,3,5];break;case 7:Rb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Rb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Rb=[1,1,2,0,1];break;case 131:Rb=[1,1,3,0,1,2];break;case 132:Rb=[1,1,4,0,1,2,3];break;case 133:Rb=[1,1,5,0,1,2,3,4];break;case 134:Rb=[1,1,6,0,1,2,3,4,5];break;case 135:Rb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Rb=
[1,1,8,0,1,2,3,4,5,6,7]}var Wv=new Uint8Array([0,hd.channelCount,0,0,hd.sampleRate>>>24&255,hd.sampleRate>>>17&255,hd.sampleRate>>>8&255,hd.sampleRate>>>0&255,0,0].concat(y(Rb)));for(var Xv=hd.sampleRate,Yv=t(k.fb()),bo=Yv.next();!bo.done;bo=Yv.next()){var co=bo.value,Zf=co.data;null==fk&&null!==co.pts&&(fk=co.pts);for(var yh=0;yh<Zf.length;){for(var jF=0!==(Zf[yh+1]&16),kF=0!==(Zf[yh+1]&8),Jd=yh+2,gk=0;255===Zf[Jd];)gk+=255,Jd+=1;gk+=Zf[Jd];Jd+=1;Jd+=jF?2:0;Jd+=kF?2:0;var Zv=Zf.slice(Jd,Jd+gk);Vv.push({data:Zv,
size:Zv.byteLength,duration:960,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}});yh=Jd+gk}}if(0==Wv.byteLength||null==fk)throw new U(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=hd.sampleRate;b.channelsCount=hd.channelCount;var lF=fk/9E4*Xv;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Xv,duration:d,lb:[],ra:Wv,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:lF,jb:Vv},stream:b}}n&&(l.push(n),n=null)}}catch(eo){return eo&&3023==eo.code?
Promise.resolve(new Uint8Array([])):Promise.reject(eo)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.N()[0]:null));var $v=new ej(l),fo=b.id+"_"+c.i;if(this.i.has(fo))var zh=this.i.get(fo);else zh=kj($v),this.i.set(fo,zh);var mF=this.l!==zh,aw=Cj($v);this.l=zh;this.g++;if(mF){var nF=Wc(zh,aw);return Promise.resolve(nF)}return Promise.resolve(aw)};T("shaka.transmuxer.TsTransmuxer",KE);KE.prototype.transmux=KE.prototype.transmux;KE.prototype.getOriginalMimeType=KE.prototype.getOriginalMimeType;
KE.prototype.convertCodecs=KE.prototype.convertCodecs;KE.prototype.isSupported=KE.prototype.isSupported;KE.prototype.destroy=KE.prototype.destroy;var LE=["aac","ac-3","ec-3","mp3","opus"],ME=["avc","hevc"];cf("video/mp2t",function(){return new KE("video/mp2t")},gf);function NE(){}qa(NE,tn);T("shaka.util.FairPlayUtils",NE);/*
 @license
 EME Encryption Scheme Polyfill
 Copyright 2019 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function OE(){}var PE;
function QE(){PE||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(PE=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=RE,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
function RE(a,b){var c=this,d;return Q(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),F(e,PE.call(c,a,b),2);d=e.h;if(SE(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=PE,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=TE;return e.return(TE.call(c,
a,b))})}
function TE(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u;return Q(function(w){if(1==w.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=UE(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=VE(h.videoCapabilities,d),l=VE(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 F(w,PE.call(c,a,e),2)}p=w.h;u=q=null;e[0]&&(e[0].videoCapabilities&&(q=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return w.return(new WE(p,q,u))})}function VE(a,b){return a?a.filter(function(c){return XE(c.encryptionScheme,b)}):a}T("EmeEncryptionSchemePolyfill",OE);OE.install=QE;function YE(){}var ZE;
function $E(){ZE||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ZE=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=aF,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
function aF(a){var b=this,c,d;return Q(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),F(e,ZE.call(b,a),2);case 2:c=e.h;if(!c.supported||!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&SE(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ZE,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
navigator.mediaCapabilities.decodingInfo=bF;if(d){e.s(3);break}return F(e,cF(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(bF.call(b,a))}})}
function bF(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=UE(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},XE(d,g)&&XE(c,g))?F(l,ZE.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=
new WE(k.keySystemAccess,c,d);l.s(3);break}if(!a.keySystemConfiguration){l.s(3);break}return F(l,cF(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
function cF(a){var b,c;return Q(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return F(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}T("McEncryptionSchemePolyfill",YE);YE.install=$E;function WE(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
WE.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};WE.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
function UE(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";if(a.startsWith("com.huawei"))return"cenc";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}
function SE(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function XE(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(dF||eF||oF)return!0;return!1}function pF(){}function CB(){QE();$E()}T("EncryptionSchemePolyfills",pF);pF.install=CB;var oF=navigator.userAgent.includes("CrKey"),dF=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10),qF;
var rF=navigator.userAgent||"";if(rF.includes("Web0S")){var sF=rF.match(/Chrome\/(\d+)/);qF=sF?79<=parseInt(sF[1],10):!1}else qF=!1;var eF=qF;"undefined"!==typeof module&&module.exports&&(module.exports=pF);}).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.compiled.map