/*
 @license
 Shaka Player v4.10.6
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
 Source: https://github.com/shaka-project/shaka-player/releases/tag/v4.10.6
*/
(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 ca(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var da="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 ea(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 fa=ea(this);function ha(a,b){if(b)a:{var c=fa;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&&da(c,a,{configurable:!0,writable:!0,value:b})}}
ha("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;da(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});
ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&da(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ca(this))}})}return a});function ia(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];return b?b.call(a):{next:ca(a)}}function x(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 ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
function pa(a,b){a.prototype=ja(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.pk=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
function sa(a,b){a.i={Gg:b,Tg:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function G(a,b,c){a.g=c;return{value:b}}qa.prototype.u=function(a){this.g=a};function I(a){a.g=0}function ua(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function va(a,b){a.m=0;a.j=b||0}function wa(a,b,c){a.g=b;a.m=c||0}function xa(a,b){a.m=b||0;b=a.i.Gg;a.i=null;return b}function ya(a){a.A=[a.i];a.m=0;a.j=0}
function za(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Tg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function Aa(a){this.g=new qa;this.h=a}function Ba(a,b){ra(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Da(a)}
function Ca(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,sa(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(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,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Tg)throw b.Gg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function Ea(a){this.next=function(b){ra(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Da(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.s):(sa(a.g,b),b=Da(a));return b};this.return=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Fa(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 O(a){return Fa(new Ea(new Aa(a)))}function Ga(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
ha("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=fa.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.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=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=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
function(){if(this.o)return!1;var g=fa.CustomEvent,h=fa.Event,k=fa.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=fa.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.be(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.be(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.be=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).be(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).be(n(p.length-1),m),k=h.next();
while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
ha("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(!Ha(k,g)){var l=new c;da(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(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ha(k,
g)&&Ha(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ha(k,g)&&Ha(k[g],this.g)?delete k[g][this.g]:!1};return b});
ha("Map",function(a){function b(){var h={};return h.Nb=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.Nb;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.h[l];if(m&&Ha(h.h,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.h={};this.g=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.h[l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this.g,Nb:this.g.Nb,head:this.g,key:h,value:k},l.list.push(l.entry),this.g.Nb.next=l.entry,this.g.Nb=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.h[h.id],h.entry.Nb.next=h.entry.next,
h.entry.next.Nb=h.entry.Nb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Nb=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});
ha("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 Ia(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}ha("Array.prototype.keys",function(a){return a?a:function(){return Ia(this,function(b){return b})}});
function Ja(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{Rg:e,v:f}}return{Rg:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).Rg}});
ha("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}});ha("Array.prototype.values",function(a){return a?a:function(){return Ia(this,function(b,c){return c})}});
ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});ha("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 Ka(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+""}ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ka(this,b,"includes").indexOf(b,c||0)}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return Ja(this,b,c).v}});
ha("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ka(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}});
ha("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});
var La="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)Ha(d,e)&&(a[e]=d[e])}return a};ha("Object.assign",function(a){return a||La});ha("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;})})}});
ha("Array.prototype.entries",function(a){return a?a:function(){return Ia(this,function(b,c){return[b,c]})}});ha("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ha("String.prototype.repeat",function(a){return a?a:function(b){var c=Ka(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}});
ha("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push(b[d]);return c}});ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});ha("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
ha("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});var Na=this||self;
function S(a,b){a=a.split(".");var c=Na;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 Pa(){}function Qa(){};function Ra(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ra.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Wa(a){return a.h/(1-Math.pow(a.g,a.i))};function Xa(){this.h=new Ra(2);this.j=new Ra(5);this.g=0;this.i=128E3;this.l=16E3}Xa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Xa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Xa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Wa(this.h),Wa(this.j))};function Za(){}function $a(){}function ab(){}function bb(a){var b=Ga.apply(1,arguments);cb.has(a)||(cb.add(a),ab.apply(Za,x(b)))}function db(){}function eb(){}function fb(){}var cb=new Set;window.console&&(ab=function(){return console.warn.apply(console,x(Ga.apply(0,arguments)))},$a=function(){console.error.apply(console,x(Ga.apply(0,arguments)))});function hb(){this.g={}}r=hb.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function ib(){this.g=new hb}r=ib.prototype;r.release=function(){this.Qa();this.g=null};r.D=function(a,b,c,d){this.g&&(a=new jb(a,b,c,d),this.g.push(b,a))};r.ha=function(a,b,c,d){function e(g){f.lb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};r.lb=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.lb(),this.g.remove(b,e))}};
r.Qa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.lb();this.g.g={}}};S("shaka.util.EventManager",ib);ib.prototype.removeAll=ib.prototype.Qa;ib.prototype.unlisten=ib.prototype.lb;ib.prototype.listenOnce=ib.prototype.ha;ib.prototype.listen=ib.prototype.D;ib.prototype.release=ib.prototype.release;function jb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=kb(a,d);this.target.addEventListener(b,c,this.g)}
jb.prototype.lb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function kb(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 mb(a)?b:b.capture||!1}
function mb(a){var b=nb;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}nb=b}return b||!1}var nb=void 0;function ob(a){if(pb.has(a))return pb.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);pb.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),pb.set(a,b),b):!1}function qb(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var pb=new Map;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 ub(a,b,c,d){ab([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function vb(a,b,c,d){$a([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var tb=null;function wb(){}wb.prototype.extract=function(){};wb.prototype.decode=function(){return[]};wb.prototype.clear=function(){};wb.prototype.getStreams=function(){return[]};function xb(){}xb.prototype.init=function(){};xb.prototype.parse=function(){return[]};function yb(){}function zb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Ab(a)==Ab(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Cb(a);b=Cb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Ab(a){return a instanceof ArrayBuffer?a:a.buffer}function Db(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
function Cb(a,b,c){c=void 0===c?Infinity:c;return Eb(a,void 0===b?0:b,c,Uint8Array)}function Fb(a,b,c){c=void 0===c?Infinity:c;return Eb(a,void 0===b?0:b,c,Uint16Array)}function Gb(a,b,c){c=void 0===c?Infinity:c;return Eb(a,void 0===b?0:b,c,DataView)}function Eb(a,b,c,d){var e=Ab(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
S("shaka.util.BufferUtils",yb);yb.toDataView=Gb;yb.toUint16=Fb;yb.toUint8=Cb;yb.toArrayBuffer=Db;yb.equal=zb;function Hb(){}Hb.prototype.init=function(){};Hb.prototype.i=function(){};Hb.prototype.g=function(){};Hb.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Hb);function Ib(a){this.l=new xb;if(a=Jb[a.toLowerCase()])this.l=a();this.h=new wb;if(a=Kb)this.h=a()}Ib.prototype.init=function(a,b){void 0!==b&&b||(this.g(),this.l.init(a))};Ib.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=Cb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
Ib.prototype.g=function(){this.h.clear()};Ib.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Ib);Ib.findDecoder=function(){return Kb};Ib.unregisterDecoder=function(){Kb=null};Ib.registerDecoder=function(a){Kb=a};Ib.findParser=function(a){return Jb[a]};Ib.unregisterParser=function(a){delete Jb[a]};Ib.registerParser=function(a,b){Jb[a]=b};var Jb={},Kb=null;function Lb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Mb;this.scroll=Nb}S("shaka.text.CueRegion",Lb);var Mb=1;Lb.units={PX:0,PERCENTAGE:Mb,LINES:2};var Nb="";Lb.scrollMode={NONE:Nb,UP:"up"};function Ob(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Qb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Rb(a,b,c){c||(c=Ob);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Qe:d.Qe},e=a.next()){d.Qe=e.value;e=b.findIndex(function(f){return function(g){return c(f.Qe,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
function Sb(a,b,c){c||(c=Ob);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 Tb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Lb;this.position=null;this.positionAlign=Ub;this.size=0;this.textAlign=Vb;this.direction=Wb;this.writingMode=Xb;this.lineInterpretation=Yb;this.line=null;this.lineHeight="";this.lineAlign=Zb;this.displayAlign=$b;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=ac;this.fontStyle=bc;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={kc:32,rows:15}}function cc(a,b){a=new Tb(a,b,"");a.lineBreak=!0;return a}Tb.prototype.clone=function(){var a=new Tb(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 dc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Sb(a.nestedCues,b.nestedCues,dc))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(!Sb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}S("shaka.text.Cue",Tb);Tb.equal=dc;Tb.prototype.clone=Tb.prototype.clone;var Ub="auto";
Tb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ub};var Vb="center",ec={LEFT:"left",RIGHT:"right",CENTER:Vb,START:"start",END:"end"};Tb.textAlign=ec;var $b="after",fc={BEFORE:"before",CENTER:"center",AFTER:$b};Tb.displayAlign=fc;var Wb="ltr";Tb.direction={HORIZONTAL_LEFT_TO_RIGHT:Wb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Xb="horizontal-tb";Tb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Xb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Yb=0;
Tb.lineInterpretation={LINE_NUMBER:Yb,PERCENTAGE:1};var Zb="start",gc={CENTER:"center",START:Zb,END:"end"};Tb.lineAlign=gc;var hc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Tb.defaultTextColor=hc;var ic={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Tb.defaultTextBackgroundColor=ic;var ac=400;Tb.fontWeight={NORMAL:ac,BOLD:700};
var bc="normal",jc={NORMAL:bc,ITALIC:"italic",OBLIQUE:"oblique"};Tb.fontStyle=jc;Tb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function kc(){}kc.prototype.destroy=function(){};function lc(a,b,c){oc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,De:b}}function pc(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([qc,rc,sc,tc]),e=d.next();!e.done;e=d.next())if(e=oc[c+"-"+e.value]){var f=e.De(),g=f.isSupported(a,b);f.destroy();if(g)return e.De}return null}S("shaka.transmuxer.TransmuxerEngine",kc);kc.findTransmuxer=pc;kc.unregisterTransmuxer=function(a,b){delete oc[a.toLowerCase().split(";")[0]+"-"+b]};
kc.registerTransmuxer=lc;kc.prototype.destroy=kc.prototype.destroy;var oc={},tc=1,sc=2,rc=3,qc=4;kc.PluginPriority={FALLBACK:tc,PREFERRED_SECONDARY:sc,PREFERRED:rc,APPLICATION:qc};/*
 @license
 Copyright 2008 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
var uc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
function vc(a){var b;a instanceof vc?(wc(this,a.Cb),this.yc=a.yc,xc(this,a.Fb),yc(this,a.Pc),this.Ya=a.Ya,zc(this,a.g.clone()),this.lc=a.lc):a&&(b=String(a).match(uc))?(wc(this,b[1]||"",!0),this.yc=Ac(b[2]||""),xc(this,b[3]||"",!0),yc(this,b[4]),this.Ya=Ac(b[5]||"",!0),zc(this,b[6]||"",!0),this.lc=Ac(b[7]||"")):this.g=new Bc(null)}r=vc.prototype;r.Cb="";r.yc="";r.Fb="";r.Pc=null;r.Ya="";r.lc="";
r.toString=function(){var a=[],b=this.Cb;b&&a.push(Cc(b,Dc,!0),":");if(b=this.Fb){a.push("//");var c=this.yc;c&&a.push(Cc(c,Dc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Pc;null!=b&&a.push(":",String(b))}if(b=this.Ya)this.Fb&&"/"!=b.charAt(0)&&a.push("/"),a.push(Cc(b,"/"==b.charAt(0)?Ec:Fc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.lc)&&a.push("#",Cc(b,Gc));return a.join("")};
r.resolve=function(a){var b=this.clone();"data"===b.Cb&&(b=new vc);var c=!!a.Cb;c?wc(b,a.Cb):c=!!a.yc;c?b.yc=a.yc:c=!!a.Fb;c?xc(b,a.Fb):c=null!=a.Pc;var d=a.Ya;if(c)yc(b,a.Pc);else if(c=!!a.Ya){if("/"!=d.charAt(0))if(this.Fb&&!this.Ya)d="/"+d;else{var e=b.Ya.lastIndexOf("/");-1!=e&&(d=b.Ya.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.Ya=d:c=""!==a.g.toString();c?zc(b,a.g.clone()):c=!!a.lc;c&&(b.lc=a.lc);return b};r.clone=function(){return new vc(this)};function wc(a,b,c){a.Cb=c?Ac(b,!0):b;a.Cb&&(a.Cb=a.Cb.replace(/:$/,""))}function xc(a,b,c){a.Fb=c?Ac(b,!0):b}function yc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Pc=b}else a.Pc=null}
function zc(a,b,c){b instanceof Bc?a.g=b:(c||(b=Cc(b,Hc)),a.g=new Bc(b))}function Ac(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Cc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Ic),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ic(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Dc=/[#\/\?@]/g,Fc=/[#\?:]/g,Ec=/[#\?]/g,Hc=/[#\?@]/g,Gc=/#/g;function Bc(a){this.g=a||null}
function Jc(a){if(!a.Ka&&(a.Ka={},a.od=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=Bc.prototype;r.Ka=null;r.od=null;function Kc(a){Jc(a);return a.od}r.add=function(a,b){Jc(this);this.g=null;var c=this.Ka.hasOwnProperty(a)?this.Ka[a]:null;c||(this.Ka[a]=c=[]);c.push(b);this.od++;return this};
r.set=function(a,b){Jc(this);this.g=null;this.Ka.hasOwnProperty(a)?this.Ka[a]=[b]:this.add(a,b);return this};r.get=function(a){Jc(this);return this.Ka[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ka)return"";var a=[],b;for(b in this.Ka)for(var c=encodeURIComponent(b),d=this.Ka[b],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 Bc;a.g=this.g;if(this.Ka){var b={},c;for(c in this.Ka)b[c]=this.Ka[c].concat();a.Ka=b;a.od=this.od}return a};function T(a,b,c){var d=Ga.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(Lc)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}T.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};S("shaka.util.Error",T);var Lc=!0;T.Severity={RECOVERABLE:1,CRITICAL:2};T.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
T.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,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,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,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,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};function Mc(a){this.h=a;this.g=void 0}Mc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Oc(a,b){return a.length&&b.length&&a!==b?0<Pc(a,b).length:!0}
function Pc(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
function Qc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Rc=new Mc(function(){return Db(new Uint8Array([0]))}),Sc=new Map;function Tc(a){this.h=a;this.g=null}Tc.prototype.Y=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};Tc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Uc(a){this.h=a;this.g=null}Uc.prototype.xc=function(){this.stop();this.h();return this};Uc.prototype.Y=function(a){var b=this;this.stop();this.g=(new Tc(function(){b.h()})).Y(a);return this};Uc.prototype.Ra=function(a){var b=this;this.stop();this.g=(new Tc(function(){b.g.Y(a);b.h()})).Y(a);return this};Uc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Uc);Uc.prototype.stop=Uc.prototype.stop;Uc.prototype.tickEvery=Uc.prototype.Ra;
Uc.prototype.tickAfter=Uc.prototype.Y;Uc.prototype.tickNow=Uc.prototype.xc;function Vc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Wc(a){return""!=Yc().canPlayType(a)}function Zc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function $c(){return ad("Xbox One")}function bd(){return ad("Tizen")}function cd(){return ad("Tizen 3")}function dd(){return ad("Tizen 2")}function ed(){return ad("Web0S")}function fd(){return ed()&&38===gd()}function hd(){return ad("CrKey")}
function gd(){if(!ad("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function id(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!bd()&&!ad("PC=EOS")&&!ad("PC=APL")&&!ad("VirginMedia")&&!jd()&&!kd()&&!ad("AFT")&&!ad("WPE")&&!ad("DT_STB_BCM")}function ld(){return ad("PlayStation 5")}function kd(){return ad("PlayStation 4")}function md(){return ad("Hisense")||ad("VIDAA")}
function jd(){return ad("SOPOpenBrowser")}function nd(){if(!id())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 od(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("windows"):!1}function pd(){return ad("Android")}
function qd(){return bd()||ed()||$c()||kd()||ld()||ad("AFT")||ad("PC=EOS")||ad("PC=APL")||ad("VirginMedia")||jd()||ad("WPE")||hd()||md()||ad("DT_STB_BCM")?!0:!1}function ad(a){return(navigator.userAgent||"").includes(a)}function Yc(){if(rd)return rd;sd||(sd=new Uc(function(){rd=null}));(rd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(rd=document.createElement("video"));sd.Y(1);return rd}
function td(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
function ud(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q;return O(function(u){switch(u.g){case 1:a={width:Infinity,height:Infinity};if(hd()){m=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;ua(u,15);if(!(n=m)){u.u(17);break}return G(u,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(bd()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
a.width=b.width,a.height=b.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(w){ab("Tizen: Error detecting screen size, default screen size 1920x1080.")}u.u(3);break}if($c()){a.width=1920;a.height=1080;try{c=new Windows.Media.Protection.ProtectionCapabilities;d=Windows.Media.Protection.ProtectionCapabilityResult;e=
null;do e=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(e===d.maybe);e===d.probably&&(a.width=3840,a.height=2160)}catch(w){ab("Xbox: Error detecting screen size, default screen size 1920x1080.")}u.u(3);break}if(ed()){try{f=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,f.screenWidth),a.height=
Math.max(1080,f.screenHeight)}catch(w){ab("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}u.u(3);break}if(md()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);u.u(3);break}if(!kd()&&!ld()){u.u(3);break}g=!1;ua(u,9);return G(u,window.msdk.device.getDisplayInfo(),11);case 11:h=u.h;g="4K"===h.resolution;wa(u,10);break;case 9:return xa(u),ua(u,12),G(u,window.msdk.device.getDisplayInfoImmediate(),
14);case 14:k=u.h;g="4K"===k.resolution;wa(u,10);break;case 12:l=xa(u),ab("PlayStation: Failed to get the display info:",l);case 10:g?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);u.u(3);break;case 18:n=u.h;case 17:if(n){a.width=3840;a.height=2160;u.u(19);break}if(!(p=m)){u.u(20);break}return G(u,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),21);case 21:p=u.h;case 20:p&&(a.width=1920,a.height=1080);case 19:wa(u,3);break;case 15:q=xa(u),$a("Failed to check canDisplayType:",
q);case 3:return u.return(a)}})}var sd=null,rd=null;function vd(){}
function xd(a){if(!a)return"";a=Cb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!kd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&$a('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 yd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Gb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return zd(d)}
function Ad(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Cb(a);if(239==c[0]&&187==c[1]&&191==c[2])return xd(c);if(254==c[0]&&255==c[1])return yd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return yd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return yd(a,!1);if(0==c[1]&&0==c[3])return yd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return xd(a);throw new T(2,2,2003);}
function Bd(a){if(window.TextEncoder&&!kd()){var b=new TextEncoder;return Db(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 Db(b)}function Cd(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 zd(a){return Dd.value()(a)}
function Ed(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}S("shaka.util.StringUtils",vd);vd.resetFromCharCode=function(){Dd.g=void 0};vd.toUTF16=Cd;vd.toUTF8=Bd;vd.fromBytesAutoDetect=Ad;vd.fromUTF16=yd;vd.fromUTF8=xd;
var Dd=new Mc(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={Sb:65536};0<b.Sb;b={Sb:b.Sb},b.Sb/=2)if(a(b.Sb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Sb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Sb));return e}}(b);return null});function Fd(){}function Gd(a){a=zd(Cb(a));return btoa(a)}function Hd(a,b){b=void 0==b?!0:b;a=Gd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Id(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 Ld(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 Md(a){var b=Cb(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 Pd(){for(var a=Ga.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];e instanceof Uint8Array?b.set(e,c):b.set(Cb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Fd);Fd.concat=Pd;Fd.toHex=Md;Fd.fromHex=Ld;Fd.fromBase64=Id;Fd.toBase64=Hd;Fd.toStandardBase64=Gd;function Qd(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new vc(a[0]);b=new vc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new vc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new vc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
function Rd(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 Sd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Hd(Ld(h),!1));var l=g;22!=l.length&&(l=Hd(Ld(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:Cb(Bd(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 Td(a,b){if(1==b.length)return b[0];a=Ud(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Ud(a,b){for(var c=t(Vd[a]),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==Wd?"":null}
function Xd(a,b){var c=[];a=t(Vd[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 Wd="text",Yd={ga:"video",X:"audio",ta:Wd,Ze:"image",nj:"application"},Zd=1/15,Vd={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function $d(){}function ae(a,b){var c=a;b&&!be.includes(a)&&(c+='; codecs="'+b+'"');return c}function ce(a,b){b&&(a+='; codecs="'+b+'"');return a}function de(a,b,c){var d=ae(a,b);b=ce(a,b);pc(b)?(a=pc(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 ee(a,b,c){var d=[b];fe.forEach(function(e,f){var g=a[f];"codecs"==f?be.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function ge(a){return a.split(";")[0].split("/")[1]}
function he(a){var b=ie(a);a=b[0];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:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function ne(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=ie(c.value),b.push(c[0]);return b.sort().join(",")}function oe(a){return a.split(";")[0]}
function qe(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function re(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function ie(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",$d);$d.getFullTypeWithAllCodecs=ce;$d.getFullType=ae;
var fe=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),be=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function se(a){this.i=null;this.j=a;this.B=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function te(a){return ue[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Kb:!1}se.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
function ve(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return G(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Cb(b)),p.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Cb(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);I(p)})}
se.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return G(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));I(d)})};function we(a,b,c){a.l=b;a.m=c}function xe(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
function ye(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())ye(a,d.value,c)}
function ze(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);ye(a,k,e);k.startTime>=a.l&&k.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))}S("shaka.text.TextEngine",se);se.prototype.destroy=se.prototype.destroy;se.findParser=function(a){return ue[a]};se.unregisterParser=function(a){delete ue[a]};se.registerParser=function(a,b){ue[a]=b};var ue={};function Ae(a,b){return a.concat(b)}function Be(){}function Ce(a){return null!=a};function De(){}function Ee(a,b){a=Fe(a);b=Fe(b);return a.split("-")[0]==b.split("-")[0]}function Ge(a,b){a=Fe(a);b=Fe(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function He(a,b){a=Fe(a);b=Fe(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
function Fe(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=Ie.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function Je(a,b){a=Fe(a);b=Fe(b);return b==a?4:Ge(b,a)?3:He(b,a)?2:Ge(a,b)?1:0}function Ke(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Ie.get(a)||a}
function Le(a){return a.language?Fe(a.language):a.audio&&a.audio.language?Fe(a.audio.language):a.video&&a.video.language?Fe(a.video.language):"und"}
function Me(a,b){a=Fe(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(Fe(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Ge(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,He(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Ge(a,b))return b;return null}S("shaka.util.LanguageUtils",De);De.findClosestLocale=Me;De.getLocaleForVariant=Le;
De.getLocaleForText=function(a){return Fe(a.language||"und")};De.getBase=Ke;De.relatedness=Je;De.areSiblings=function(a,b){var c=Ke(a),d=Ke(b);return a!=c&&b!=d&&c==d};De.normalize=Fe;De.isSiblingOf=He;De.isParentOf=Ge;De.areLanguageCompatible=Ee;De.areLocaleCompatible=function(a,b){a=Fe(a);b=Fe(b);return a==b};
var Ie=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 Ne(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer instanceof ArrayBuffer)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 Oe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Pe(){}
function Qe(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Re(e,b,c);if(d.length){b=new hb;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,w){u=0;var v=[],A={};w=t(w);for(var y=w.next();!y.done;A={kd:A.kd},y=w.next())A.kd=y.value,y=d.filter(function(D){return function(z){return D.kd.decodingInfos[0][z]}}(A)).length,y>u?(u=y,v=[A.kd]):y==u&&v.push(A.kd);f.push.apply(f,x(v))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,w){return u.bandwidth-w.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=he(m.codecs),p=he(g.codecs);n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);
e.set(k,l)}c=Array.from(b).sort(function(u,w){return u.bandwidth&&w.bandwidth?u.bandwidth-w.bandwidth:u.width-w.width});b=qb();var q=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=he(m.codecs),p=he(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),q.push(g.id)):g.width==m.width&&g.height==m.height&&(n=he(m.codecs),p=he(g.codecs),n!=p||g.bandwidth&&
m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),q.push(g.id)))}else l.push(g),q.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var w=u.audio;u=u.video;return w&&!h.includes(w.id)||u&&!q.includes(u.id)?!1:!0})}
function Re(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Xe:d.Xe},e=b.next())if(d.Xe=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Xe)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Pe:d.Pe},b=c.next())if(d.Pe=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Pe)}}(d)),b.length){a=b;break}return a}function Se(a,b,c){a.variants=a.variants.filter(function(d){return Te(d,b,c)})}
function Te(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 Ue(a,b,c){var d=!1;a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Te(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Ve(a,b,c){c=void 0===c?[]:c;return O(function(d){if(1==d.g)return G(d,We(a,b,0<b.offlineSessionIds.length,c),2);Xe(b);return G(d,Ye(b),0)})}
function We(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return G(g,Ze(b.variants,c,!1,d),2);e=null;a&&(f=a.g)&&(e=f.keySystem);b.variants=b.variants.filter(function(h){var k=$e(h,e);if(!k){var l=[];h.audio&&l.push(af(h.audio));h.video&&l.push(af(h.video))}return k});I(g)})}
function $e(a,b){var c=$c(),d=ad("Firefox")&&pd(),e=a.video,f=e&&e.width||0,g=e&&e.height||0;if(c&&e&&(1920<f||1080<g)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return!1;if(e){c=bf(e.codecs);if(e.codecs.includes(",")){f=e.codecs.split(",");c=Td("video",f);c=bf(c);f=Td("audio",f);f=cf(f,e.mimeType);g=de(e.mimeType,f,"audio");if(!ob(g))return!1;c=[c,f].join()}f=de(e.mimeType,c,"video");if(!ob(f))return!1;e.codecs=c}e=a.audio;if(d&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus"))return!1;
if(e){d=cf(e.codecs,e.mimeType);c=de(e.mimeType,d,"audio");if(!ob(c))return!1;e.codecs=d}return a.decodingInfos.some(function(h){return!h.supported||b&&(h=h.keySystemAccess)&&h.keySystem!=b?!1:!0})}function df(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=df(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
function ef(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Oe(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={};g=t(b);for(h=g.next();!h.done;f={Wc:f.Wc,Xc:f.Xc},h=g.next())k=h.value,f.Xc=df(k),f.Wc=ff,f.Wc[f.Xc]?d=c(d,f.Wc[f.Xc]):e.push(gf(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.Wc[m.Xc]=p,d=c(d,p))}}(f)));return G(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);I(l)})}
function gf(a){var b=[""];a.video&&(b=qe(a.video.contentType).split(","));var c=[""];a.audio&&(c=qe(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={},g=t(c),h=g.next();!h.done;f={fc:f.fc},h=g.next())h=h.value,f.fc=Ne(a),a.video&&(f.fc.video.contentType=ae(oe(f.fc.video.contentType),e)),a.audio&&(f.fc.audio.contentType=ae(oe(f.fc.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.fc).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
return null})}
function Ze(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z;return O(function(B){switch(B.g){case 1:if(e=a.some(function(C){return C.decodingInfos.length}))return B.return();f={};g=t(d);h=g.next();case 2:if(h.done){B.u(4);break}f.Se=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){B.u(7);break}n=m.value;p=hf(n,b,c).filter(function(C){return function(F){F=F[0];return(F.keySystemConfiguration&&F.keySystemConfiguration.keySystem)===C.Se}}(f));q=t(p);u=q.next();case 8:if(u.done){B.u(10);break}w=u.value;
return G(B,ef(n,w),9);case 9:u=q.next();B.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();B.u(5);break;case 7:if(k)return B.return();f={Se:f.Se};h=g.next();B.u(2);break;case 4:v=t(a),m=v.next();case 12:if(m.done){B.u(0);break}A=m.value;y=hf(A,b,c).filter(function(C){C=C[0];C=C.keySystemConfiguration&&C.keySystemConfiguration.keySystem;return!C||!d.includes(C)});D=t(y);u=D.next();case 15:if(u.done){m=v.next();B.u(12);break}z=u.value;return G(B,ef(A,z),16);case 16:u=D.next(),B.u(15)}})}
function hf(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=qe(k);if(l.includes(",")&&!d){var m=l.split(","),n=oe(k);l=Td("video",m);m=Td("audio",m);m=cf(m,n);n=de(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=bf(l);k={contentType:de(oe(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=oe(l),l=cf(qe(l),k),k=de(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(var p=g.next();!p.done;p=g.next())f=p.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;l=[];n=t(h);for(m=
n.next();!m.done;m=n.next()){m=Object.assign({},m.value);var q=c.get(k),u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};q=t(q);for(p=q.next();!p.done;p=q.next()){p=p.value;if(p.initData&&p.initData.length){for(var w=new Set,v=t(p.initData),A=v.next();!A.done;A=v.next())w.add(A.value.initDataType);u.initDataType=p.initData[0].initDataType}p.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");p.persistentStateRequired&&(u.persistentState=
"required");p.sessionType&&(u.sessionTypes=[p.sessionType]);d&&(u.audio?(u.audio.encryptionScheme=u.audio.encryptionScheme||p.encryptionScheme,u.audio.robustness=u.audio.robustness||p.audioRobustness):u.audio={encryptionScheme:p.encryptionScheme,robustness:p.audioRobustness},""==u.audio.robustness&&delete u.audio.robustness);e&&(u.video?(u.video.encryptionScheme=u.video.encryptionScheme||p.encryptionScheme,u.video.robustness=u.video.robustness||p.videoRobustness):u.video={encryptionScheme:p.encryptionScheme,
robustness:p.videoRobustness},""==u.video.robustness&&delete u.video.robustness)}m.keySystemConfiguration=u;l.push(m)}a.push(l)}return a}function cf(a,b){return"flac"==a.toLowerCase()?nd()?"fLaC":"flac":"opus"===a.toLowerCase()?nd()?"mp4"==ge(b)?"Opus":"opus":"opus":a}
function bf(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 Xe(a){a.textStreams=a.textStreams.filter(function(b){b=ae(b.mimeType,b.codecs);return te(b)})}
function Ye(a){var b,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.u(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(jf.has(f)){l.u(5);break}g=kf.get(f);if(!g){jf.set(f,!1);l.u(5);break}return G(l,lf(g),7);case 7:h=l.h,jf.set(f,h);case 5:(k=jf.get(f))&&b.push(e);d=c.next();l.u(2);break;case 4:a.imageStreams=b,I(l)}})}
function lf(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 mf(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=[];g&&h.push(g);f&&h.push(f);var 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:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,
originalLanguage:null};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);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);return a}
function nf(a){return{id:a.id,active:!1,type:Wd,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,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 of(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));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,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 pf(a){a.__shaka_id||(a.__shaka_id=qf++);return a.__shaka_id}
function rf(a){var b=sf(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 tf(a){var b=sf(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 sf(a){var b=a.language;return{id:pf(a),active:!1,type:"",bandwidth:0,language:Fe(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,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 uf(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function zf(a){return a.filter(function(b){return uf(b)})}
function Af(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=Me(Fe(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Fe(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Bf(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(Ae,[]);return a.length?
Bf(e,a[0]):e}function Bf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function af(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"}S("shaka.util.StreamUtils",Pe);Pe.meetsRestrictions=Te;
var ff={},qf=0,jf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),kf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Cf(){var a=this;this.A=null;this.s=!1;this.i=new Xa;this.F=new ib;navigator.connection&&navigator.connection.addEventListener&&this.F.D(navigator.connection,"change",function(){if(a.s&&a.g.useNetworkInformation){a.i=new Xa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.o=[];this.B=1;this.G=!1;this.h=this.m=this.g=this.j=null;this.C=new Uc(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.l=null}r=Cf.prototype;r.stop=function(){this.A=null;this.s=!1;this.o=[];this.B=1;this.m=this.j=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.l=null};r.release=function(){this.F.release();this.C=null};r.init=function(a){this.A=a};
r.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.m.clientHeight*d);c=Math.min(c,this.m.clientWidth*d)}var e=this.o.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||
(e=this.o);d=e;a&&e.length!=this.o.length&&(d=this.o.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=Df(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=Ef(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=Df(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Df(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=
0;d<a.length;d++){e=a[d];for(var f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.j=Date.now();return c};r.enable=function(){this.s=!0};r.disable=function(){this.s=!1};
r.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.j&&this.s&&Ff(this))};r.trySuggestStreams=function(){null!=this.j&&this.s&&Ff(this)};r.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.l?this.l.getBandwidthEstimate(a):a};r.setVariants=function(a){this.o=a};
r.playbackRateChanged=function(a){this.B=a};r.setMediaElement=function(a){var b=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.Y(Gf)}),this.h.observe(this.m))};r.setCmsdManager=function(a){this.l=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
function Ff(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0;a.j-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.j<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Df(a,b,c,d,e){if(a.l){var f=a.l.Ng();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Te(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
function Ef(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",Cf);Cf.prototype.configure=Cf.prototype.configure;Cf.prototype.setCmsdManager=Cf.prototype.setCmsdManager;Cf.prototype.setMediaElement=Cf.prototype.setMediaElement;Cf.prototype.playbackRateChanged=Cf.prototype.playbackRateChanged;Cf.prototype.setVariants=Cf.prototype.setVariants;
Cf.prototype.getBandwidthEstimate=Cf.prototype.getBandwidthEstimate;Cf.prototype.trySuggestStreams=Cf.prototype.trySuggestStreams;Cf.prototype.segmentDownloaded=Cf.prototype.segmentDownloaded;Cf.prototype.disable=Cf.prototype.disable;Cf.prototype.enable=Cf.prototype.enable;Cf.prototype.chooseVariant=Cf.prototype.chooseVariant;Cf.prototype.init=Cf.prototype.init;Cf.prototype.release=Cf.prototype.release;Cf.prototype.stop=Cf.prototype.stop;var Gf=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{Qj:"reload",yh:"smooth"});function Hf(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Hf.prototype.add=function(a,b,c){return If(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
function If(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!Jf(e,f)||!Kf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Jf(a,b))&&Kf(a.roles,b.roles)));return d?!1:!0}Hf.prototype.values=function(){return this.g.values()};
function Jf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ne(d)});b=b.codecs.split(",").map(function(d){return ne(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 Kf(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};function Lf(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Mf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Lf.prototype.create=function(a){var b=this,c="smooth"==this.h&&qb(),d=a.filter(function(e){return If(b.i,e,!c,b.g)});return d.length?new Hf(d[0],d,!c,this.g):this.j.create(a)};
function Mf(a,b,c,d,e,f,g,h,k,l,m){this.A=a;this.B=b;this.i=c;this.j=d;this.C=e;this.m=f;this.h=void 0===g?"":g;this.l=void 0===h?"":h;this.o=void 0===k?"reload":k;this.s=void 0===l?!1:l;this.g=void 0===m?"":m}
Mf.prototype.create=function(a){var b=[];b=Nf(a,this.A);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Of(b,this.B);a.length&&(b=a);this.m&&(a=Pf(b,this.m),a.length&&(b=a));this.j&&(a=Qf(b,this.j),a.length&&(b=a));this.i&&(a=Rf(b,this.i),a.length&&(b=a));this.h&&(a=Sf(b,this.h),a.length&&(b=a));this.l&&(a=Tf(b,this.l),a.length&&(b=a));a=Uf(b,this.C);a.length&&(b=a);this.g&&(a=Vf(b,this.g),a.length&&(b=a));return new Hf(b[0],b,!("smooth"==this.o&&qb()),this.s)};
function Nf(a,b){b=Fe(b);var c=Me(b,a.map(function(d){return Le(d)}));return c?a.filter(function(d){return c==Le(d)}):[]}function Of(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Sf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Tf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
function Rf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Qf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Pf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Uf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}
function Vf(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Wf(){this.g=Xf;this.i=(new Map).set(Xf,2).set(Yf,1);this.h=0}function Zf(a,b,c){a.i.set(Xf,c).set(Yf,b)}var Yf=0,Xf=1;function $f(a,b){var c=ag();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 bg(a){var b,c;return O(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return G(d,new Promise(function(e){(new Uc(e)).Y(c/1E3)}),2)}a.h*=a.m;I(d)})}function ag(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function cg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}cg.prototype.resolve=function(){};cg.prototype.reject=function(){};function dg(a,b){this.promise=a;this.i=b;this.g=!1}function eg(a){return new dg(Promise.reject(a),function(){return Promise.resolve()})}function fg(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new dg(a,function(){return Promise.resolve()})}function gg(a){return new dg(Promise.resolve(a),function(){return Promise.resolve()})}function hg(a){return new dg(a,function(){return a.catch(function(){})})}dg.prototype.abort=function(){this.g=!0;return this.i()};
function ig(a){return new dg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}dg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
dg.prototype.Aa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=jg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new cg,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new dg(f,function(){return d()})};
function jg(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()}}}S("shaka.util.AbortableOperation",dg);dg.prototype.chain=dg.prototype.Aa;dg.prototype["finally"]=dg.prototype.finally;dg.all=ig;dg.prototype.abort=dg.prototype.abort;dg.notAbortable=hg;dg.completed=gg;dg.aborted=fg;dg.failed=eg;function U(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
function kg(a){var b=new U(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}U.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};U.prototype.stopImmediatePropagation=function(){this.g=!0};U.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",U);
var lg={pj:"abrstatuschanged",qj:"adaptation",rj:"audiotrackchanged",sj:"buffering",tj:"complete",uj:"downloadfailed",vj:"downloadheadersreceived",wj:"drmsessionupdate",yj:"emsg",Pj:"prft",Error:"error",zj:"expirationupdated",Aj:"firstquartile",Bj:"gapjumped",Ej:"keystatuschanged",Gj:"loaded",Hj:"loading",Jj:"manifestparsed",Kj:"manifestupdated",Lj:"mediaqualitychanged",Metadata:"metadata",Mj:"midpoint",Nj:"nospatialvideoinfo",Oj:"onstatechange",Rj:"ratechange",Sj:"segmentappended",Tj:"sessiondata",
Uj:"spatialvideoinfo",Vj:"stalldetected",Wj:"started",Xj:"statechanged",Yj:"streaming",Zj:"textchanged",$j:"texttrackvisibility",ak:"thirdquartile",bk:"timelineregionadded",ck:"timelineregionenter",dk:"timelineregionexit",ek:"trackschanged",gk:"unloading",ik:"variantchanged"};function mg(){this.ya=new hb;this.Ge=this}mg.prototype.addEventListener=function(a,b){this.ya&&this.ya.push(a,b)};mg.prototype.removeEventListener=function(a,b){this.ya&&this.ya.remove(a,b)};mg.prototype.dispatchEvent=function(a){if(!this.ya)return!0;var b=this.ya.get(a.type)||[],c=this.ya.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Ge;a.currentTarget=this.Ge;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
mg.prototype.release=function(){this.ya=null};function ng(){this.g=[]}function og(a,b){a.g.push(b.finally(function(){Qb(a.g,b)}))}ng.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 pg(a,b,c,d,e,f){mg.call(this);this.i=!1;this.m=new ng;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.B=d||null;this.F=e||null;this.C=f||null;this.o=this.s=!1}pa(pg,mg);r=pg.prototype;r.fg=function(a){this.s=a};r.gg=function(a){this.o=a};function qg(a,b,c,d){c=c||rg;var e=sg[a];if(!e||c>=e.priority)sg[a]={priority:c,De:b,Ki:void 0===d?!1:d}}
function tg(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(d=a.next();!d.done;d=a.next())b.h.add(d.value)}r.Ni=function(a){this.g.add(a)};r.ij=function(a){this.g.delete(a)};r.Ag=function(){this.g.clear()};r.Oi=function(a){this.h.add(a)};r.jj=function(a){this.h.delete(a)};r.Bg=function(){this.h.clear()};
function ug(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();mg.prototype.release.call(this);return this.m.destroy()};
r.request=function(a,b,c){var d=this,e=new vg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new wg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ne(b.retryParameters):ag();b.uris=Ne(b.uris);f=xg(this,a,b,c);var g=f.Aa(function(){return yg(d,a,b,c,new $f(b.retryParameters,!1),0,null,e)}),h=g.Aa(function(p){return zg(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.Aa(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.pi||!d.l||u.fromCache||"HEAD"==b.method||a!=Ag||d.l(u.timeMs,u.data.byteLength,Bg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new wg(n.promise,function(){return n.abort()},e);og(this.m,f);return f};
function xg(a,b,c,d){function e(h){f=f.Aa(function(){c.body&&(c.body=Db(c.body));return h(b,c,d)})}var f=gg(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Aa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
function yg(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new vc(c.uris[f]),l=k.Cb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),wc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=sg[l])?l.De:null;if(!n)return eg(new T(2,1,1E3,k));var p=l.Ki,q=null,u=null,w=!1,v=!1,A;return hg(bg(e)).Aa(function(){if(a.i)return fg();A=Date.now();var y=0;c.requestStartTime=Date.now();
var D=n(c.uris[f],c,b,function(C,F,H){q&&q.stop();u&&u.Y(B/1E3);a.l&&b==Ag&&(y++,c.packetNumber=y,a.l(C,F,Bg(d),c),m=!0,h.g=H)},function(C){a.j&&a.j(C,c,b);v=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return D;var z=c.retryParameters.connectionTimeout;z&&(q=new Uc(function(){w=!0;D.abort()}),q.Y(z/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Uc(function(){w=!0;D.abort()}));return D}).Aa(function(y){q&&q.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var D={response:y,
pi:m};!v&&a.j&&a.j(y.headers,c,b);return D},function(y){q&&q.stop();u&&u.stop();if(a.A){var D=null,z=0;y instanceof T&&(D=y,1001==y.code&&(z=y.data[1]));a.A(c,D,z,w)}if(a.i)return fg();w&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return D=(new Map).set("error",y),D=new U("retry",D),a.dispatchEvent(D),f=(f+1)%c.uris.length,yg(a,b,c,d,e,f,y,h)}throw y;})}
function zg(a,b,c,d){var e=gg(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Ue:f.Ue},g=a.next())f.Ue=g.value,e=e.Aa(function(h){return function(){var k=c.response;k.data&&(k.data=Db(k.data));return h.Ue(b,k,d)}}(f));return e.Aa(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function Bg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Jd)return!1}return!0}S("shaka.net.NetworkingEngine",pg);
pg.prototype.request=pg.prototype.request;pg.prototype.destroy=pg.prototype.destroy;pg.makeRequest=ug;pg.defaultRetryParameters=function(){return ag()};pg.prototype.clearAllResponseFilters=pg.prototype.Bg;pg.prototype.unregisterResponseFilter=pg.prototype.jj;pg.prototype.registerResponseFilter=pg.prototype.Oi;pg.prototype.clearAllRequestFilters=pg.prototype.Ag;pg.prototype.unregisterRequestFilter=pg.prototype.ij;pg.prototype.registerRequestFilter=pg.prototype.Ni;pg.unregisterScheme=function(a){delete sg[a]};
pg.registerScheme=qg;pg.prototype.setForceHTTPS=pg.prototype.gg;pg.prototype.setForceHTTP=pg.prototype.fg;function vg(){this.g=0}pg.NumBytesRemainingClass=vg;function wg(a,b,c){dg.call(this,a,b);this.h=c}pa(wg,dg);pg.PendingRequest=wg;var Ag=1;pg.RequestType={MANIFEST:0,SEGMENT:Ag,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};pg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6};var rg=3;
pg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:rg};var sg={};function Cg(a){this.g=!1;this.h=new cg;this.i=a}Cg.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 Dg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Fg(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 Gg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Hg(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 Ig(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Jg(a,b){this.h=Gb(a);this.i=b==Kg;this.g=0}r=Jg.prototype;r.oa=function(){return this.g<this.h.byteLength};r.ua=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.T=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Lg();}};r.ka=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Lg();}};r.P=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Lg();}};
r.bh=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Lg();}};r.Qc=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 Lg();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.rb=function(a){if(this.g+a>this.h.byteLength)throw Lg();var b=Cb(this.h,this.g,a);this.g+=a;return b};
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Lg();this.g+=a};r.Vi=function(a){if(this.g<a)throw Lg();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Lg();this.g=a};r.tc=function(){for(var a=this.g;this.oa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Cb(this.h,a,this.g-a);this.g+=1;return xd(a)};function Lg(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Jg);Jg.prototype.readTerminatedString=Jg.prototype.tc;Jg.prototype.seek=Jg.prototype.seek;Jg.prototype.rewind=Jg.prototype.Vi;
Jg.prototype.skip=Jg.prototype.skip;Jg.prototype.readBytes=Jg.prototype.rb;Jg.prototype.readUint64=Jg.prototype.Qc;Jg.prototype.readInt32=Jg.prototype.bh;Jg.prototype.readUint32=Jg.prototype.P;Jg.prototype.readUint16=Jg.prototype.ka;Jg.prototype.readUint8=Jg.prototype.T;Jg.prototype.getLength=Jg.prototype.getLength;Jg.prototype.getPosition=Jg.prototype.ua;Jg.prototype.hasMoreData=Jg.prototype.oa;var Kg=1;Jg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Kg};function Mg(){this.i=[];this.h=[];this.g=!1}r=Mg.prototype;r.box=function(a,b){a=Ng(a);this.i[a]=Og;this.h[a]=b;return this};r.S=function(a,b){a=Ng(a);this.i[a]=Pg;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Jg(a,0);for(this.g=!1;a.oa()&&!this.g;)this.Oc(0,a,b,c)};
r.Oc=function(a,b,c,d){var e=b.ua();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.P(),g=b.P(),h=Qg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.ua()+8>b.getLength()){this.g=!0;return}f=b.Qc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Pg){if(d&&b.ua()+4>b.getLength()){this.g=!0;return}n=b.P();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.ua(),b=0<d?b.rb(d):new Uint8Array(0),b=new Jg(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.ua(),b.getLength()-b.ua()))}};function Rg(a){for(var b=Ug(a);a.reader.oa()&&!a.parser.g;)a.parser.Oc(a.start+b,a.reader,a.partialOkay)}function Vg(a){for(var b=Ug(a),c=a.reader.P(),d=0;d<c&&(a.parser.Oc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Wg(a){var b=Ug(a);for(a.reader.skip(78);a.reader.oa()&&!a.parser.g;)a.parser.Oc(a.start+b,a.reader,a.partialOkay)}
function Xg(a){var b=Ug(a);a.reader.skip(8);var c=a.reader.ka();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.oa()&&!a.parser.g;)a.parser.Oc(a.start+b,a.reader,a.partialOkay)}function Yg(a){return function(b){a(b.reader.rb(b.reader.getLength()-b.reader.ua()))}}function Ng(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 Qg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
function Ug(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Mg);Mg.headerSize=Ug;Mg.typeToString=Qg;Mg.allData=Yg;Mg.audioSampleEntry=Xg;Mg.visualSampleEntry=Wg;Mg.sampleDescription=Vg;Mg.children=Rg;Mg.prototype.parseNext=Mg.prototype.Oc;Mg.prototype.parse=Mg.prototype.parse;Mg.prototype.stop=Mg.prototype.stop;Mg.prototype.fullBox=Mg.prototype.S;Mg.prototype.box=Mg.prototype.box;var Og=0,Pg=1;function Zg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Mg).box("moov",Rg).box("moof",Rg).S("pssh",function(c){if(!(1<c.version)){var d=Cb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Md(c.reader.rb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=Md(c.reader.rb(16));b.h.push(f)}}}}).parse(a)}
function $g(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=Gb(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=Ld(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function ah(a,b){a=Ad(a);return bh(a,b)}function bh(a,b){a=ch(a);return!b&&a.length?a[0]:(a=a.find(function(c){return c.tagName===b}))?a:null}function dh(a){return eh.has(a)?eh.get(a):""}
function ch(a){function b(e,f){f=void 0===f?!1:f;for(var g=[];a[d];)if(60==a.charCodeAt(d)){if(47===a.charCodeAt(d+1)){f=d+2;d=a.indexOf(">",d);f=a.substring(f,d);var h=f.indexOf(e);if(-1==h){var k=e.indexOf(".");0<k&&(h=f.indexOf(e.substring(0,k)))}if(-1==h)throw e=a.substring(0,d).split("\n"),Error("Unexpected close tag\nLine: "+(e.length-1)+"\nColumn: "+(e[e.length-1].length+1)+"\nChar: "+a[d]);d+1&&(d+=1);break}else if(33===a.charCodeAt(d+1)){if(45==a.charCodeAt(d+2)){for(;-1!==d&&(62!==a.charCodeAt(d)||
45!=a.charCodeAt(d-1)||45!=a.charCodeAt(d-2)||-1==d);)d=a.indexOf(">",d+1);-1===d&&(d=a.length)}else if(91===a.charCodeAt(d+2)&&91===a.charCodeAt(d+8)&&"cdata"===a.substr(d+3,5).toLowerCase()){h=a.indexOf("]]\x3e",d);-1==h?(g.push(a.substr(d+9)),d=a.length):(g.push(a.substring(d+9,h)),d=h+3);continue}d++;continue}a:{k=f;d++;var l=c(),m={};for(h=[];62!==a.charCodeAt(d)&&a[d];){var n=a.charCodeAt(d);if(64<n&&91>n||96<n&&123>n){n=c();for(var p=a.charCodeAt(d);p&&39!==p&&34!==p&&!(64<p&&91>p||96<p&&123>
p)&&62!==p;)d++,p=a.charCodeAt(d);var q=d+1;d=a.indexOf(a[d],q);q=a.slice(q,d);if(39===p||34===p){if(-1===d){k={tagName:l,attributes:m,children:h,parent:null};for(l=0;l<h.length;l++)"string"!==typeof h[l]&&(h[l].parent=k);h=k;break a}}else q=null,d--;n.startsWith("xmlns:")&&eh.set(q,n.split(":")[1]);"tt"===l&&"xml:space"===n&&"preserve"===q&&(k=!0);m[n]=q}d++}47!==a.charCodeAt(d-1)?(d++,h=b(l,k)):d++;k={tagName:l,attributes:m,children:h,parent:null};l=h.length;for(m=0;m<l;m++)n=h[m],"string"!==typeof n?
n.parent=k:m==l-1&&"\n"==n&&h.pop();h=k}g.push(h);if("string"===typeof h)break;"?"===h.tagName[0]&&h.children&&(g.push.apply(g,x(h.children)),h.children=[])}else h=d,d=a.indexOf("<",d)-1,-2===d&&(d=a.length),h=a.slice(h,d+1),f?0<h.length&&g.push(h):g.length&&1==h.length&&"\n"==h[0]?g.push(h):0<h.trim().length&&g.push(h),d++;return g}function c(){for(var e=d;-1==="\r\n\t>/= ".indexOf(a[d])&&a[d];)d++;return a.slice(e,d)}var d=0;return b("")}function fh(a){return"string"===typeof a}
function gh(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 hh(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 ih(a){if("string"===typeof a)return Ed(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Ed(a)}
function jh(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=ih(a))&&(a=a.trim());return a}function kh(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())kh(d.value,b,c)}return c}function lh(a,b){a=hh(a,b);return 1!=a.length?null:a[0]}function mh(a,b,c){a=nh(a,b,c);return 1!=a.length?null:a[0]}
function oh(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 ph(a,b,c){b=dh(b);return a.attributes[b+":"+c]||null}function nh(a,b,c){b=dh(b);var d=[];if(a.children){a=t(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function qh(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=ph(a,d.value,c))return d;return null}
function rh(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 sh(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
function th(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 uh(a){a=Number(a);return 0===a%1?a:null}function vh(a){a=Number(a);return 0===a%1&&0<a?a:null}function wh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function xh(a){a=Number(a);return isNaN(a)?null:a}function yh(a){return a?"true"===a.toLowerCase():!1}
function zh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
function Ah(a){var b=[];a=Ed(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(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,position:f?Number(f[1])-1:null,Ub:c.split("/@")[1]||null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Ub=c.slice(1))}return b}
function Bh(a,b){var c=Ah(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Ub)?Ch(a[c],e,d,jh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}function Ch(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
function Dh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&Dh(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=Dh(b,!1,!0),d.appendChild(c);return d}var eh=new Map([]);function Eh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.fa=this.da=!1;this.I=0;this.g=null;this.B=new ib;this.i=new Map;this.A=new Map;this.l=new cg;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.Z=new Map;this.ea=new Map;this.L=new Uc(function(){return Fh(b)});this.R=!1;this.N=[];this.U=!1;this.K=new Uc(function(){Gh(b)});this.l.catch(function(){});this.j=new Cg(function(){return Hh(b)});this.aa=!1;this.F=this.G=null}r=Eh.prototype;r.destroy=function(){return this.j.destroy()};
function Hh(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,G(b,Ih(a),2);case 2:if(!a.m){b.u(3);break}ua(b,4);return G(b,a.m.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:xa(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.aa=!1,a.G=null,I(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Ra(this.h.updateExpirationTime)};
function Jh(a,b,c){a.fa=!0;a.A=new Map;a.R=c;return Kh(a,b)}function Lh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.R=0<a.A.size;return Kh(a,b)}
function Mh(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 Nh(a,g,[])}
function Kh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y;return O(function(D){if(1==D.g){if(c=Oh(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(z){return z.video&&z.video.drmInfos.length||z.audio&&z.audio.drmInfos.length?!0:!1});g||(h=Hg(a.h.servers),Ph(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Qh(m),p=t(n),q=p.next();!q.done;q=p.next())u=q.value,k.add(u);w=t(k);for(q=w.next();!q.done;q=
w.next())v=q.value,Rh(v,Hg(a.h.servers),Hg(a.h.advanced||{}),a.h.keySystemsMapping);return G(D,Ze(b,a.R,a.aa,a.h.preferredKeySystems),2)}Dg(a.j);A=g||Object.keys(a.h.servers).length;if(!A)return a.da=!0,D.return(Promise.resolve());y=Nh(a,void 0,b);return D.return(g?y:y.catch(function(){}))})}
function Sh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return G(c,a.G,3);case 3:return Dg(a.j),c.return();case 2:return ua(c,4),a.G=a.m.setMediaKeys(a.s),G(c,a.G,6);case 6:wa(c,5);break;case 4:b=xa(c),a.o(new T(2,6,6003,b.message));case 5:Dg(a.j),I(c)}})}function Th(a,b){return O(function(c){if(1==c.g)return G(c,Sh(a),2);Uh(a,b.initDataType,Cb(b.initData));I(c)})}
r.Tb=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.ha(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.ha(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Vh(b,e.value);b.U=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ih(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
b.A.size?G(c,Sh(b),2):c.u(2)}Wh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Th(b,d)});I(c)})};
function Xh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=ug([a.g.serverCertificateUri],a.h.retryParameters);ua(g,3);c=a.C.Lb.request(5,b);return G(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Cb(d.data);wa(g,4);break;case 3:throw e=xa(g),new T(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
ua(g,6);return G(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=xa(g),new T(2,6,6004,f.message);}})}function Yh(a,b){var c,d,e;return O(function(f){if(1==f.g)return G(f,Zh(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.mb=new cg,d.push(e.mb);d.push(c.remove());return G(f,Promise.all(d),3)}a.i.delete(c);I(f)})}
function Wh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.u(2);a.A.forEach(function(h,k){Zh(a,k,h)});return G(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&$h(a))return g.return(a.l);a.l=new cg;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Uh(a,f.initDataType,f.initData);ai(a)&&a.l.resolve();return g.return(a.l)})}
function Uh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(zb(c,e.value.initData))return}0<a.i.size&&ai(a)&&(a.l.resolve(),a.l=new cg,a.l.catch(function(){}));bi(a,b,c,a.g.sessionType)}}function ci(a){a=a.i.keys();a=Fg(a,function(b){return b.sessionId});return Array.from(a)}
r.Df=function(){var a=this,b=this.i.keys();b=Fg(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.sd=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.ge=function(){return Ig(this.ea)};
function Nh(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A;return O(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=di(a,c,d);y.u(2);break}return G(y,ei(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new T(2,6,6001);Dg(a.j);ua(y,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.H.add(q.contentType.toLowerCase());if(c.length){var D=
f.keySystem;var z=d.get(f.keySystem);var B=[],C=[],F=[],H=[],K=[],J=new Set,E=new Set;fi(z,B,C,H,F,K,J,E);var L=a.R?"persistent-license":"temporary";D={keySystem:D,encryptionScheme:B[0],licenseServerUri:C[0],distinctiveIdentifierRequired:z[0].distinctiveIdentifierRequired,persistentStateRequired:z[0].persistentStateRequired,sessionType:z[0].sessionType||L,audioRobustness:z[0].audioRobustness||"",videoRobustness:z[0].videoRobustness||"",serverCertificate:H[0],serverCertificateUri:F[0],initData:K,keyIds:J};
0<E.size&&(D.keySystemUris=E);z=t(z);for(E=z.next();!E.done;E=z.next())E=E.value,E.distinctiveIdentifierRequired&&(D.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(D.persistentStateRequired=E.persistentStateRequired);z=D}else z=f.keySystem,E=b.get(f.keySystem),D=[],B=[],C=[],F=[],H=[],K=new Set,fi(E.drmInfos,D,B,F,C,H,K),z={keySystem:z,encryptionScheme:D[0],licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==E.distinctiveIdentifier,persistentStateRequired:"required"==
E.persistentState,sessionType:E.sessionTypes[0]||"temporary",audioRobustness:(E.audioCapabilities?E.audioCapabilities[0].robustness:"")||"",videoRobustness:(E.videoCapabilities?E.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:C[0],initData:H,keyIds:K};a.g=z;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return G(y,f.createMediaKeys(),6);case 6:u=y.h;Dg(a.j);a.s=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){y.u(7);break}ua(y,8);return G(y,
a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:w=y.h;if("usable"!=w)throw new T(2,6,6018);Dg(a.j);wa(y,7,4);break;case 8:v=xa(y,4);if(v instanceof T)throw v;throw new T(2,6,6019,v.message);case 7:return a.da=!0,G(y,Xh(a),11);case 11:Dg(a.j);wa(y,0);break;case 4:A=xa(y);Dg(a.j,A);a.g=null;a.H.clear();if(A instanceof T)throw A;throw new T(2,6,6002,A.message);}})}
function di(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Qh(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new T(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Te:d.Te},e=a.next())for(d.Te=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
l.Te}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
function ei(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v;return O(function(A){switch(A.g){case 1:if(1==b.size&&b.has(""))throw new T(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.h.preferredKeySystems);h=g.next();case 2:if(h.done){A.u(4);break}k=h.value;if(!b.has(k)){A.u(3);break}l=b.get(k);ua(A,6);return G(A,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
A.h,A.return(c);case 6:xa(A);case 7:Dg(a.j);case 3:h=g.next();A.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){A.u(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();A.u(9);break}u=h.value;w=b.get(u);v=w.drmInfos.some(function(y){return!!y.licenseServerUri});if(v!=p){A.u(13);break}ua(A,15);return G(A,navigator.requestMediaKeySystemAccess(u,[w]),17);case 17:return c=A.h,A.return(c);case 15:xa(A);case 16:Dg(a.j);case 13:h=q.next();A.u(12);break;case 11:return A.return(c)}})}
function Oh(a){a=Hg(a.h.clearKeys);return 0==a.size?null:Sd(a)}function gi(a){ai(a)&&a.l.resolve()}function hi(a,b){(new Uc(function(){b.loaded=!0;gi(a)})).Y(ii)}
function Zh(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.U?a.N.push(n):Vh(a,n)});a.B.D(d,"keystatuseschange",function(n){return ji(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Rf:Infinity,mb:null,type:"persistent-license"};a.i.set(d,f);ua(m,2);return G(m,
d.load(b),4);case 4:return g=m.h,Dg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(h,6,6013)),f.loaded=!0),hi(a,f),gi(a),m.return(d);case 2:k=xa(m),Dg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(l,6,6005,k.message)),f.loaded=!0,gi(a);case 3:return m.return(Promise.resolve())}})}
function bi(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.U?a.N.push(f):Vh(a,f)});a.B.D(e,"keystatuseschange",function(f){return ji(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Rf:Infinity,mb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&Hd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.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.o(new T(2,6,6006,f.message,f,h))}})}
function Vh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w;O(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&Hd(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=ug([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
f.headers[h];if(Qc(a.g.keySystem)){var A=yd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=bh(A,"PlayReadyKeyMessage");var y=kh(A,"HttpHeader");y=t(y);for(var D=y.next();!D.done;D=y.next()){var z=D.value;D=kh(z,"name")[0];z=kh(z,"value")[0];g.headers[ih(D)]=ih(z)}A=kh(A,"Challenge")[0];g.body=Id(ih(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();ua(v,2);m=a.C.Lb.request(2,g);return G(v,m.promise,4);case 4:l=v.h;wa(v,3);break;case 2:n=xa(v);if(a.j.g)return v.return();
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.mb&&d.mb.reject(p)):(d&&d.mb&&d.mb.reject(p),a.i.delete(c),ai(a)&&(a.l.resolve(),a.L.Y(.1)));return v.return();case 3:if(a.j.g)return v.return();a.I+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Hd(l.data);ua(v,5);return G(v,c.update(l.data),7);case 7:wa(v,6);break;case 5:return q=xa(v),u=new T(2,6,6008,q.message),a.o(u),d&&d.mb&&d.mb.reject(u),v.return();case 6:if(a.j.g)return v.return();w=new U("drmsessionupdate");a.C.onEvent(w);d&&(d.mb&&d.mb.resolve(),
hi(a,d));I(v)}})}
function ji(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(Qc(a.g.keySystem)&&16==g.byteLength&&(Zc()||kd())){h=Gb(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=Md(g).slice(0,32);a.Z.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.mb&&(a.i.delete(b),b.close().catch(function(){}));ai(a)&&
(a.l.resolve(),a.L.Y(ki))}function Fh(a){var b=a.Z,c=a.ea;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.o(new T(2,6,6014));a.C.Ae(Ig(c))}
function li(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K;return O(function(J){if(1==J.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(E,L){var M,N,Q,R,P,aa,ba,Sa;return O(function(ta){switch(ta.g){case 1:return ua(ta,2),G(ta,L.createMediaKeys(),4);case 4:wa(ta,3);break;case 2:return xa(ta),ta.return();case 3:N=(M=L.getConfiguration().sessionTypes)?M.includes("persistent-license"):
!1,cd()&&(N=!1),Q=L.getConfiguration().videoCapabilities,R=L.getConfiguration().audioCapabilities,P={persistentState:N,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(E)&&k.get(E)?P=k.get(E):k.set(E,P),(aa=Q[0].encryptionScheme)&&!P.encryptionSchemes.includes(aa)&&P.encryptionSchemes.push(aa),(ba=Q[0].robustness)&&!P.videoRobustnessLevels.includes(ba)&&P.videoRobustnessLevels.push(ba),(Sa=R[0].robustness)&&!P.audioRobustnessLevels.includes(Sa)&&P.audioRobustnessLevels.push(Sa),
I(ta)}})};m=function(E,L,M,N){var Q,R,P,aa,ba,Sa,ta,Ma,Ya;return O(function(Ta){switch(Ta.g){case 1:ua(Ta,2);Q=Ne(g);R=t(Q.videoCapabilities);for(P=R.next();!P.done;P=R.next())aa=P.value,aa.encryptionScheme=L,aa.robustness=M;ba=t(Q.audioCapabilities);for(P=ba.next();!P.done;P=ba.next())Sa=P.value,Sa.encryptionScheme=L,Sa.robustness=N;ta=Ne(Q);ta.persistentState="required";ta.sessionTypes=["persistent-license"];Ma=[ta,Q];return G(Ta,navigator.requestMediaKeySystemAccess(E,Ma),4);case 4:return Ya=Ta.h,
G(Ta,l(E,Ya),5);case 5:wa(Ta,0);break;case 2:xa(Ta),I(Ta)}})};n=function(E,L,M,N){var Q,R,P;return O(function(aa){switch(aa.g){case 1:return ua(aa,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:E,video:{encryptionScheme:L,robustness:M},audio:{encryptionScheme:L,robustness:N}}},G(aa,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return R=
aa.h,P=R.keySystemAccess,G(aa,l(E,P),5);case 5:wa(aa,0);break;case 2:xa(aa),I(aa)}})};p=t(a);for(q=p.next();!q.done;q=p.next())u=q.value,k.set(u,null);w=[];v=t(h);for(A=v.next();!A.done;A=v.next())for(y=A.value,D=t(a),q=D.next();!q.done;q=D.next())z=q.value,"org.w3.clearkey"===z&&nd()||(w.push(m(z,y,"","")),w.push(n(z,y,"","")));B=t(a);for(q=B.next();!q.done;q=B.next())for(C=q.value,F=t(d[C]||[]),H=F.next();!H.done;H=F.next())K=H.value,w.push(m(C,null,K,"")),w.push(m(C,null,"",K)),w.push(n(C,null,
K,"")),w.push(n(C,null,"",K));return G(J,Promise.all(w),2)}return J.return(Ig(k))})}function mi(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Uc(e)).Y(ni)}),ua(c,2),G(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);xa(c);I(c)})}
function Ih(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return G(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return ua(g,2),a.fa||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?G(g,mi(e),5):G(g,e.remove(),5);if(2!=g.g)return wa(g,0);xa(g);I(g)})})),0)})}function Qh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function Gh(a){a.i.forEach(function(b,c){var d=b.Rf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Rf=e)})}function ai(a){a=a.i.values();return Gg(a,function(b){return b.loaded})}function $h(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.Z.get(c.value))return!1;return!0}
function Ph(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 fi(a,b,c,d,e,f,g,h){var k=[],l={};a=t(a);for(var m=a.next();!m.done;l={na:l.na},m=a.next()){l.na=m.value;b.includes(l.na.encryptionScheme)||b.push(l.na.encryptionScheme);"org.w3.clearkey"==l.na.keySystem&&l.na.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(l.na.licenseServerUri)||k.push(l.na.licenseServerUri):c.includes(l.na.licenseServerUri)||c.push(l.na.licenseServerUri);e.includes(l.na.serverCertificateUri)||e.push(l.na.serverCertificateUri);l.na.serverCertificate&&
(d.some(function(q){return function(u){return zb(u,q.na.serverCertificate)}}(l))||d.push(l.na.serverCertificate));if(l.na.initData){m={};for(var n=t(l.na.initData),p=n.next();!p.done;m={Td:m.Td},p=n.next())m.Td=p.value,f.some(function(q){return function(u){var w=q.Td;return u.keyId&&u.keyId==w.keyId?!0:u.initDataType==w.initDataType&&zb(u.initData,w.initData)}}(m))||f.push(m.Td)}if(l.na.keyIds)for(m=t(l.na.keyIds),n=m.next();!n.done;n=m.next())g.add(n.value);if(l.na.keySystemUris&&h)for(m=t(l.na.keySystemUris),
n=m.next();!n.done;n=m.next())h.add(n.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,x(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
function Rh(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(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.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),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")}}var ni=1,ii=5,ki=.5;/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function oi(a,b,c){this.h=a;this.i=b;this.g=c}function pi(a,b){return O(function(c){if(1==c.g)return G(c,Ve(a.g,b,a.h.drm.preferredKeySystems),2);a.h.streaming.dontChooseCodecs||Qe(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(uf))throw new T(2,4,4032);return c.return(qi(a,b))})}
function qi(a,b){var c=Ue(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,ri(a,d.keySystem,f.video),ri(a,d.keySystem,f.audio);si(a,b)}return c}function ri(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,Uh(a.g,e.initDataType,e.initData)}}}
function si(a,b){a=a.g?a.g.ge():{};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?ti.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 T(2,4,4012,a);}var ti=["output-restricted","internal-error"];function ui(){}function vi(a,b){if(b){var c=wi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",ui);ui.unregisterParserByMime=function(a){delete wi[a]};ui.registerParserByMime=function(a,b){wi[a]=b};ui.registerParserByExtension=function(){sb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ui.AccessibilityPurpose={hk:"visually impaired",Cj:"hard of hearing"};var wi={};function xi(a,b){function c(){f=!0}function d(m){h.push(m);Rg(m)}var e=a=Cb(a),f=!1,g,h=[],k=[];(new Mg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).S("stsd",function(m){g=m;h.push(m);Vg(m)}).S("encv",c).S("enca",c).S("dvav",function(m){k.push({box:m,jb:1701733238})}).S("dva1",function(m){k.push({box:m,jb:1701733238})}).S("dvh1",function(m){k.push({box:m,jb:1701733238})}).S("dvhe",function(m){k.push({box:m,jb:1701733238})}).S("hev1",function(m){k.push({box:m,jb:1701733238})}).S("hvc1",
function(m){k.push({box:m,jb:1701733238})}).S("avc1",function(m){k.push({box:m,jb:1701733238})}).S("avc3",function(m){k.push({box:m,jb:1701733238})}).S("ac-3",function(m){k.push({box:m,jb:1701733217})}).S("ec-3",function(m){k.push({box:m,jb:1701733217})}).S("ac-4",function(m){k.push({box:m,jb:1701733217})}).S("mp4a",function(m){k.push({box:m,jb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw fb(Md(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
e=yi(e,g,l.box,h,l.jb);return Zc()&&od()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
function yi(a,b,c,d,e){var f=zi.value(),g=a.subarray(c.start,c.start+c.size),h=Gb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Gb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ai(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=$c()||Zc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Ai(e,d.start,d.size+k.byteLength);k=Gb(e,b.start);b=Ug(b);
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ai(a,b,c){a=Gb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var zi=new Mc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Bi(a,b,c,d,e,f,g){this.M=a;this.Ha=b;this.sa=c;this.Lc=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Bi.prototype.$b=function(){return this.Ha};Bi.prototype.Xb=function(){return this.sa};Bi.prototype.ud=function(){return this.g};function Ci(a,b){return a===b?!0:a&&b?a.$b()==b.$b()&&a.Xb()==b.Xb()&&Sb(a.M().sort(),b.M().sort())&&zb(a.ud(),b.ud()):a==b}S("shaka.media.InitSegmentReference",Bi);
Bi.prototype.getEndByte=Bi.prototype.Xb;Bi.prototype.getStartByte=Bi.prototype.$b;
function Di(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?Ei:q;this.startTime=a;this.i=this.endTime=b;this.C=c;this.Ha=d;this.sa=e;this.$=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=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.s=null;this.j=0;this.o=void 0===w?!1:w;this.pe=this.Jd=!1;a=t(this.g);for(b=a.next();!b.done;b=
a.next())b.value.Xg();this.o&&this.g.length&&this.g[this.g.length-1].Wg();this.B=this.mimeType=this.codecs=null}r=Di.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.Th=function(){return this.endTime};r.$b=function(){return this.Ha};r.Xb=function(){return this.sa};r.ki=function(){return this.tilesLayout};r.ji=function(){return this.A};r.ac=function(){return this.status};r.Ei=function(){this.status=Fi};r.Of=function(){this.preload=!0};r.yi=function(){return this.preload};
r.se=function(){this.l=!1};r.vi=function(){return this.l};r.Xg=function(){this.Jd=!0};r.xi=function(){return this.Jd};r.Wg=function(){this.pe=!0};r.wi=function(){return this.pe};r.Vg=function(){this.m=!0};r.ri=function(){return this.m};r.oh=function(a){this.s=a};r.ii=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=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.i+=a};
r.jg=function(a){null==this.h?$a("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.fj=function(a){this.B=a};r.ud=function(){return this.B};function Gi(a,b){a.$=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Gi(c.value,b)}S("shaka.media.SegmentReference",Di);Di.prototype.getSegmentData=Di.prototype.ud;Di.prototype.setSegmentData=Di.prototype.fj;Di.prototype.syncAgainst=Di.prototype.jg;Di.prototype.offset=Di.prototype.offset;
Di.prototype.getThumbnailSprite=Di.prototype.ii;Di.prototype.setThumbnailSprite=Di.prototype.oh;Di.prototype.hasByterangeOptimization=Di.prototype.ri;Di.prototype.markAsByterangeOptimization=Di.prototype.Vg;Di.prototype.isLastPartial=Di.prototype.wi;Di.prototype.markAsLastPartial=Di.prototype.Wg;Di.prototype.isPartial=Di.prototype.xi;Di.prototype.markAsPartial=Di.prototype.Xg;Di.prototype.isIndependent=Di.prototype.vi;Di.prototype.markAsNonIndependent=Di.prototype.se;Di.prototype.isPreload=Di.prototype.yi;
Di.prototype.markAsPreload=Di.prototype.Of;Di.prototype.markAsUnavailable=Di.prototype.Ei;Di.prototype.getStatus=Di.prototype.ac;Di.prototype.getTileDuration=Di.prototype.ji;Di.prototype.getTilesLayout=Di.prototype.ki;Di.prototype.getEndByte=Di.prototype.Xb;Di.prototype.getStartByte=Di.prototype.$b;Di.prototype.getEndTime=Di.prototype.Th;Di.prototype.getStartTime=Di.prototype.getStartTime;Di.prototype.getUris=Di.prototype.M;var Ei=0,Fi=1;Di.Status={oj:Ei,fk:Fi,Ij:2};function Hi(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ii(a){return!a||Hi(a)?null:a.length?a.end(a.length-1):null}function Ji(a,b){return!a||!a.length||Hi(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ki(a,b){if(!a||!a.length||Hi(a))return 0;var c=0;a=t(Oi(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 Pi(a,b,c){if(!a||!a.length||Hi(a))return null;a=Oi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Oi(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};/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Qi(){}function Ri(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 Si(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 Ti(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 Ui(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=xd(Cb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=xd(Cb(a.data,3+c,f)),h;"--\x3e"===d?h=xd(Cb(a.data,4+c+f)):h=Db(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=xd(Cb(a.data,1,d));a=xd(Cb(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=xd(Cb(a.data,1,d));a=xd(Cb(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=xd(Cb(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=Db(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=xd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=xd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Db(a.data),b):null}
function Vi(a){for(var b=0,c=[];Ri(a,b);){var d=Ti(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=Ti(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ui(e))&&c.push(f);b+=e.size+10}Si(a,b)&&(b+=10)}return c}function Wi(a,b){for(var c=b=void 0===b?0:b,d=0;Ri(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Ti(a,b+6),Si(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Qi);Qi.getID3Data=Wi;
Qi.getID3Frames=Vi;function Xi(a,b){var c=null,d=null,e=null,f=a.P();b&1&&(e=a.Qc());b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:f,pd:c,fe:d,jk:e}}function Yi(a,b){return 1==b?(b=a.P(),a=a.P(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.P()}}function Zi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.P();a.skip(4);a=a.ka();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function $i(a,b,c){var d=a.P(),e=[],f=null;c&1&&(f=a.P());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={$f:null,sampleSize:null,He:null};c&256&&(h.$f=a.P());c&512&&(h.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(h.He=0==b?a.P():a.bh());e.push(h)}return{nk:d,fh:e,Mh:f}}function aj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ka();a.skip(2);a.skip(2);a.skip(2);a=a.ka()+a.ka()/65536;return{channelCount:b,sampleRate:a}}function bj(a){a=a.P();return{Na:Qg(a)}}
function cj(a){var b=null,c=null,d=a.rb(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.ka()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ka();a.ka();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,Pd:c}}
function dj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function ej(a){return(10>a?"0":"")+a};/*

 Copyright Brightcove, Inc.

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

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

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/
function fj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Cb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function gj(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 Jg(c,0)).P(),a.g=8*d,a.i-=d)}function hj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;gj(a)}a.h<<=b;a.g-=b}
function ij(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&&gj(a);c=b-c;return 0<c?d<<c|ij(a,c):d}function jj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;gj(a);return b+jj(a)}function kj(a){hj(a,1+jj(a))}function V(a){var b=jj(a);return ij(a,b+1)-1}function lj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===ij(a,1)}function mj(a){return ij(a,8)}
function nj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=lj(a),d=(c+d+256)%256),c=0===d?c:d}function oj(a){mj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",fj);function pj(){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.s=null}r=pj.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,qj(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,me:-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=zd(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,Jh: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.me&&(g.me=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.me&&(this.C=f.me);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 rj(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.s&&(a.s=e);c.pts=sj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=sj(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.Ji=function(a){sb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Uf(a)};
r.Uf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Pd(b.data,p),b.fullData=Pd(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Pd(b.data,k),b.fullData=Pd(b.fullData,k)));if(n>=e-f)return h;
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Pd(b.data,a),b.fullData=Pd(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Pd.apply(Fd,x(c.value)),(c=rj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Vi(c.data),dts:c.dts,pts:c.pts});return a};
r.Wb=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=Pd.apply(Fd,x(c.value)),e=rj(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=Pd(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.Ic=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=Pd.apply(Fd,x(d.value)),f=rj(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=Pd(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.Uf(e,
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Wb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Ic(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.rd=function(){return{audio:this.A,video:this.m}};
r.ke=function(){for(var a=[],b=t(this.Ic()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};r.ni=function(){sb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Hf();return{height:a.height,width:a.width}};r.Hf=function(){return"hvc"==this.m?tj(this):uj(this)};
function uj(a){var b={height:null,width:null,Na:null};a=a.ke();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new fj(a.data);var c=mj(a),d=mj(a),e=mj(a);kj(a);if(Cj.includes(c)){var f=V(a);3===f&&hj(a,1);kj(a);kj(a);hj(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?nj(a,16):nj(a,64))}}kj(a);f=V(a);if(0===f)V(a);else if(1===f)for(hj(a,1),kj(a),kj(a),f=V(a),g=0;g<f;g++)kj(a);kj(a);hj(a,1);f=V(a);g=V(a);var h=ij(a,1);0===h&&hj(a,1);hj(a,1);var k=0,l=0,m=0,n=
0;W(a)&&(k=V(a),l=V(a),m=V(a),n=V(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.Na="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
function tj(a){var b={height:null,width:null,Na:null};a=a.ke();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new fj(a.fullData,!0);mj(c);mj(c);ij(c,4);var d=ij(c,3);W(c);var e=ij(c,2),f=ij(c,1),g=ij(c,5),h=ij(c,32);a=mj(c);for(var k=mj(c),l=mj(c),m=mj(c),n=mj(c),p=mj(c),q=mj(c),u=[],w=[],v=0;v<d;v++)u.push(W(c)),w.push(W(c));if(0<d)for(v=d;8>v;v++)ij(c,2);for(v=0;v<d;v++)u[v]&&ij(c,88),w[v]&&mj(c);V(c);d=V(c);3==d&&ij(c,1);u=V(c);w=V(c);var A=v=0,y=0,D=0;W(c)&&
(v+=V(c),A+=V(c),y+=V(c),D+=V(c));b.width=String(u-(v+A)*(1===d||2===d?2:1));b.height=String(w-(y+D)*(1===d?2:1));c=function(z){for(var B=0,C=0;32>C;C++)B|=(z>>C&1)<<31-C;return B>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+q;p&&(e+="."+p.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
a.toString(16).toUpperCase());b.Na=e;return b}function sj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Dj(a){return 0>qj(a)?!1:!0}function qj(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}S("shaka.util.TsParser",pj);pj.syncOffset=qj;pj.probe=Dj;pj.prototype.getVideoInfo=pj.prototype.Hf;pj.prototype.getVideoResolution=pj.prototype.ni;pj.prototype.getVideoNalus=pj.prototype.ke;
pj.prototype.getCodecs=pj.prototype.rd;pj.prototype.getStartTime=pj.prototype.getStartTime;pj.prototype.getVideoData=pj.prototype.Ic;pj.prototype.getAudioData=pj.prototype.Wb;pj.prototype.getMetadata=pj.prototype.getMetadata;pj.prototype.parseNalus=pj.prototype.Uf;pj.prototype.parseAvcNalus=pj.prototype.Ji;pj.prototype.parse=pj.prototype.parse;pj.prototype.clearData=pj.prototype.clearData;pj.Timescale=9E4;var Cj=[100,110,122,244,44,83,86,118,128,138,139,134];function Ej(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&ab("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{ab("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(ab("Could not find LCEVC Library on this page"),
a=!1):(this.h.SupportObject.SupportStatus||ab(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 Fj(a){a.g&&a.i.classList.add("shaka-hidden")}
Ej.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Gj(a,b,c){var d=Hj,e=Ij;switch(b.mimeType){case "video/webm":d=Jj;break;case "video/mp4":d=Kj}switch(c){case "DASH":e=Lj;break;case "HLS":e=Mj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Ej);Ej.prototype.release=Ej.prototype.release;var Hj=0,Jj=1,Kj=2,Mj=0,Lj=1,Ij=-1;function Nj(a,b,c,d){var e=this;this.i=a;this.da=c;this.A=null;this.F=b;this.h={};this.G={};this.Da={};this.g=null;this.fa=!1;this.Z=d||null;this.j={};this.s=new ib;this.o={};this.H=null;this.L=new cg;this.N="";this.ra=!1;this.l=Oj(this,this.L);this.C=!1;this.I=new Cg(function(){return Pj(e)});this.B=!1;this.aa="UNKNOWN";this.Ea=this.Fa=!1;this.za=new cg;this.m=!1;this.xa=!0;this.qa=this.R=this.ya=this.U=this.K=this.ea=null;this.pa=new cg}
function Oj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.xa=!0});a.s.D(c,"endstreaming",function(){a.xa=!1});a.s.ha(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.ha(a.i,"playing",function(){a.ra=!0});a.N=Qj(c);a.i.src=a.N;return c}c=new MediaSource;a.s.ha(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.ha(a.i,"playing",function(){a.ra=!0});a.N=Qj(c);a.i.src=a.N;return c}
function Rj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(q){if(1==q.g)return a.createSegmentIndex?G(q,a.createSegmentIndex(),2):q.u(2);if(!a.segmentIndex)return q.return(!1);if(0==a.segmentIndex.getNumReferences())return q.return(!0);c=Yd;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||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ta){if(m=ae(h,k),!te(m))return q.return(!1)}else if(b==c.ga?k=bf(k):b==c.X&&(k=cf(k,h)),n=
ee(a,h,k),p=ce(h,k),!ob(n)&&!pc(p))return q.return(!1);return q.return(!0)})}r=Nj.prototype;r.destroy=function(){return this.I.destroy()};
function Pj(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(Be)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.o)b.push(a.o[k].destroy());return G(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.F=null;a.h={};a.o={};a.H=null;
a.j={};a.Z=null;a.K=null;a.da=null;I(l)})}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;return O(function(m){switch(m.g){case 1:return f=Yd,G(m,e.L,2);case 2:e.B=b,e.aa=c,e.Fa=d,e.Ea=!e.B&&"HLS"==e.aa&&!e.Fa,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return G(m,Sj(e,k,l,l.codecs),6);case 6:e.m?(e.j[f.X]=[],e.j[f.ga]=[]):e.j[k]=[],h=g.next(),m.u(3)}})};
function Sj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w;return O(function(v){switch(v.g){case 1:return e=Yd,f=Pa,g=Qa,G(v,Rj(c,b),2);case 2:g.call(f,v.h,"Type negotiation should happen before MediaSourceEngine.init!");h=ae(c.mimeType,d);if(b==e.ta){Tj(a,h,a.B,c.external);v.u(0);break}k=a.A.forceTransmux;if(!ob(h)||!a.B&&be.includes(h))k=!0;l=ce(c.mimeType,d);if(!k){v.u(4);break}m=Ud(e.X,(d||"").split(","));n=Ud(e.ga,(d||"").split(","));if(!m||!n){v.u(5);break}a.m=!0;return G(v,Sj(a,e.X,c,m),6);case 6:return G(v,
Sj(a,e.ga,c,n),7);case 7:return v.return();case 5:if(p=pc(l))q=p(),a.o[b]=q,h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Dg(a.I);try{w=a.l.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.l.readyState+" expected 'open'",null);}a.B&&(w.mode=Uj);a.s.D(w,"error",function(){var A=a.j[b][0];A.p.reject(new T(2,3,3014,a.i.error?a.i.error.code:0,A.uri))});a.s.D(w,"updateend",function(){return Vj(a,b)});a.h[b]=w;a.G[b]=h;a.Da[b]=!!c.drmInfos.length;
I(v)}})}r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
function Tj(a,b,c,d){a.g||(a.g=new se(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.fa;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,ue[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 Wj(a){return a.C?!1:a.l?"ended"==a.l.readyState:!0}function Xj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Wd?a=a.g.g:(a=Yj(a,b),a=!a||Hi(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Zj(a,b){return a.C?null:b==Wd?a.g.h:Ii(Yj(a,b))}function ak(a,b,c){if(a.C)return 0;if(b==Wd)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Yj(a,b);return Ki(a,c)}
r.yb=function(){var a={total:this.C?[]:Oi(this.i.buffered),audio:this.C?[]:Oi(Yj(this,"audio")),video:this.C?[]:Oi(Yj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Yj(a,b){try{return a.h[b].buffered}catch(c){return null}}
function bk(a,b,c,d,e,f){var g=null,h=Cb(c);if(be.includes(e))f=Vi(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.da.onMetadata([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.$&&d.$.timescale){var k=d.$.timescale;if(!isNaN(k)){var l=0,m=!1;(new Mg).box("moof",Rg).box("traf",Rg).S("tfdt",function(n){l=Yi(n.reader,
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else if(!e.includes("/mp4")&&!e.includes("/webm")&&Dj(h)&&(a.K?a.K.clearData():a.K=new pj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length))a.da.onMetadata(h,f,d?d.endTime:null);return g}
function ck(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,A,y,D,z,B,C,F;return O(function(H){switch(H.g){case 1:m=Yd;if(b!=m.ta){H.u(2);break}if(!a.B){H.u(3);break}return G(H,a.za,4);case 4:n=H.h,a.g.s=n;case 3:return G(H,ve(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return H.return();case 2:if(l||!a.m){H.u(6);break}return G(H,ck(a,m.X,c,d,e,f,g,h,k,!0),7);case 7:return G(H,ck(a,m.ga,c,d,e,f,g,h,k,!0),8);case 8:return H.return();
case 6:if(!a.h[b])return H.return();p=a.h[b].timestampOffset;q=a.G[b];a.o[b]&&(q=a.o[b].getOriginalMimeType());d&&(u=bk(a,b,c,d,q,p),null!=u&&(null==a.U&&b==m.ga&&(a.U=u,a.ya=d.startTime,null!=a.R&&(w=0,a.ya==a.qa&&(w=a.U-a.R),a.pa.resolve(w))),null==a.R&&b==m.X&&(a.R=u,a.qa=d.startTime,null!=a.U&&(v=0,a.ya==a.qa&&(v=a.U-a.R),a.pa.resolve(v))),A=d.startTime-u,y=Math.abs(p-A),(.001<=y||g||h)&&(!k||0<A||!p)&&(p=A,a.Ea&&(dk(a,b,function(){return ek(a,b)},null),dk(a,b,function(){return fk(a,b,p)},null))),
D=b==m.ga||!(m.ga in a.h),a.B&&D&&a.za.resolve(p)));f&&b==m.ga&&(a.g||Tj(a,"application/cea-608",a.B,!1),a.H||(z=q.split(";",1)[0],a.H=new Ib(z)),d?(B=a.H.i(c),B.length&&ze(a.g,B,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.o[b]){H.u(9);break}return G(H,a.o[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=H.h;case 9:c=gk(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.ta){H.u(11);break}if(!g&&!h){H.u(11);break}C=d.startTime;if("HLS"!=a.aa||a.m||b!=m.X||!a.h[m.ga]){H.u(13);break}return G(H,
a.pa,14);case 14:F=H.h,.1<Math.abs(F)&&(C-=F);case 13:dk(a,b,function(){return ek(a,b)},null),dk(a,b,function(){return fk(a,b,C)},null);case 11:return G(H,dk(a,b,function(){var K=c;if("video"==b&&a.Z){var J=a.Z;J.g&&J.g.appendBuffer(K,"video",J.o,-p)}a.h[b].appendBuffer(K)},d?d.M()[0]:null),15);case 15:I(H)}})}function hk(a,b){var c=Zj(a,"video")||0;xe(a.g,b,c)}function ik(a){a.g&&xe(a.g,"",0)}
r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Yd,a==e.ta?G(f,d.g.remove(b,c),0):G(f,dk(d,a,function(){return jk(d,a,b,c)},null),4)):d.m?G(f,dk(d,e.X,function(){return jk(d,e.X,b,c)},null),0):f.u(0)})};function kk(a,b){var c;return O(function(d){return 1==d.g?(c=Yd,b==c.ta?a.g?G(d,a.g.remove(0,Infinity),0):d.return():G(d,dk(a,b,function(){return jk(a,b,0,a.l.duration)},null),4)):a.m?G(d,dk(a,c.X,function(){return jk(a,c.X,0,a.l.duration)},null),0):d.u(0)})}
r.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Yd,a==c.ta?d.return():G(d,dk(b,a,function(){b.i.currentTime-=.001;Vj(b,a)},null),2)):b.m?G(d,dk(b,c.X,function(){var e=c.X;b.i.currentTime-=.001;Vj(b,e)},null),0):d.u(0)})};
function lk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Yd;if(b==l.ta)return f||(a.g.s=c),we(a.g,d,e),p.return();m=[];return G(p,mk(a,b,g,h,k),2)}n=p.h;n||(m.push(dk(a,b,function(){return ek(a,b)},null)),a.m&&m.push(dk(a,l.X,function(){return ek(a,l.X)},null)));f||(m.push(dk(a,b,function(){return fk(a,b,c)},null)),a.m&&m.push(dk(a,l.X,function(){return fk(a,l.X,c)},null)));m.push(dk(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Vj(a,
b)},null));a.m&&m.push(dk(a,l.X,function(){var q=l.X;a.h[q].appendWindowStart=0;a.h[q].appendWindowEnd=e;a.h[q].appendWindowStart=d;Vj(a,q)},null));return G(p,Promise.all(m),0)})}
function nk(a,b,c){var d;return O(function(e){if(1==e.g){d=Yd;if(b==d.ta)return e.return();b==d.ga&&(a.za=new cg);dk(a,b,function(){return ek(a,b)},null);a.m&&dk(a,d.X,function(){return ek(a,d.X)},null);return G(e,dk(a,b,function(){return fk(a,b,c)},null),2)}return a.m?G(e,dk(a,d.X,function(){return fk(a,d.X,c)},null),0):e.u(0)})}r.endOfStream=function(a){var b=this;return O(function(c){return G(c,ok(b,function(){Wj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};
r.$a=function(a){var b=this;return O(function(c){return G(c,ok(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new cg,uri:null};b.j[d].unshift(e)}b.l.duration=a;b.ea=a}),0)})};r.getDuration=function(){return this.l.duration};function jk(a,b,c,d){d<=c?Vj(a,b):a.h[b].remove(c,d)}function ek(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Vj(a,b)}
function fk(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Vj(a,b)}function Vj(a,b){if(!a.C){var c=a.j[b][0];c&&(c.p.resolve(),pk(a,b))}}function dk(a,b,c,d){Dg(a.I);c={start:c,p:new cg,uri:d};a.j[b].push(c);1==a.j[b].length&&qk(a,b);return c.p}
function ok(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Dg(a.I);c=[];d={};for(e in a.h)d.bd=new cg,f={start:function(m){return function(){return m.bd.resolve()}}(d),p:d.bd,uri:null},a.j[e].push(f),c.push(d.bd),1==a.j[e].length&&f.start(),d={bd:d.bd};ua(l,2);return G(l,Promise.all(c),4);case 4:wa(l,3);break;case 2:throw g=xa(l),g;case 3:return ua(l,5,6),G(l,b(),6);case 6:ya(l);for(h in a.h)pk(a,h);za(l,0);break;case 5:throw k=xa(l),new T(2,3,3015,k,a.i.error||"No error in the media element",
null);}})}function pk(a,b){a.j[b].shift();qk(a,b)}function qk(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.i.error||"No error in the media element",c.uri)),pk(a,b)}}function gk(a,b,c,d,e){var f=null==c,g=a.Da[d];c=a.da.Xh();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Qc(c),f=bd()||$c()||jd()||Zc()&&od()&&c;f&&"mp4"==ge(a.G[d])&&(b=xi(b,e));return b}
function rk(a,b,c,d){return dk(a,b,function(){b!==Wd&&(qb()&&(a.o[b]&&(a.o[b].destroy(),delete a.o[b]),d&&(a.o[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Vj(a,b))},null)}
function sk(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K;return O(function(J){switch(J.g){case 1:c=Yd;a.C=!0;a.m=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.ra&&(a.i.autoplay=!1);va(J,2);a.s.Qa();g=[];for(h in a.o)g.push(a.o[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(Be)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())q=p.value,q.p.reject(new T(2,7,7003,void 0));for(u in a.h){w=a.h[u];try{a.l.removeSourceBuffer(w)}catch(E){}}return G(J,
Promise.all(g),4);case 4:return a.o={},a.h={},v=a.l.duration,a.L=new cg,a.l=Oj(a,a.L),G(J,a.L,5);case 5:!isNaN(v)&&v?a.l.duration=v:!isNaN(a.ea)&&a.ea&&(a.l.duration=a.ea),A=new cg,y=a.l.sourceBuffers,D=b.size,z=0,B=function(){z++;z===D&&(A.resolve(),a.s.lb(y,"addsourcebuffer",B))},a.s.D(y,"addsourcebuffer",B),C=t(b.keys()),F=C.next();case 6:if(F.done)return a.i.currentTime=d,G(J,A,2);H=F.value;K=b.get(H);return G(J,Sj(a,H,K,K.codecs),9);case 9:a.m?(a.j[c.X]=[],a.j[c.ga]=[]):a.j[H]=[];F=C.next();
J.u(6);break;case 2:ya(J),a.C=!1,Dg(a.I),a.s.ha(a.i,"canplaythrough",function(){a.I.g||(a.i.autoplay=e,f||a.i.play())}),za(J,0)}})}function tk(a,b){return ok(a,function(){return sk(a,b)})}
function mk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,w,v,A,y,D;return O(function(z){if(1==z.g){f=Yd;if(b==f.ta)return z.return(!1);g=ne(qe(a.G[b]));h=oe(a.G[b]);l=!1;m=ae(c,d);n=a.A.forceTransmux;if(!ob(m)||!a.B&&be.includes(m))n=!0;n&&(p=ce(c,d),q=pc(p))&&(k=q(),u=Ud(f.X,(d||"").split(",")),w=Ud(f.ga,(d||"").split(",")),u&&w?(l=!0,v=w,b==f.X&&(v=u),m=k.convertCodecs(b,ce(c,v))):m=k.convertCodecs(b,p));A=ne(qe(m));y=oe(m);if(g===A&&h===y)return z.return(!1);D=!0;if(a.m||l&&k&&!a.o[b])D=!1;if(D&&"smooth"===
a.A.codecSwitchingStrategy&&qb())return G(z,rk(a,b,m,k),3);k&&k.destroy();return G(z,tk(a,e),3)}return z.return(!0)})}function uk(a,b,c,d){if(b==Wd)var e=!1;else{e=ne(qe(a.G[b]));var f=oe(a.G[b]),g=ae(c,d),h=a.A.forceTransmux;if(!ob(g)||!a.B&&be.includes(g))h=!0;c=ce(c,d);h&&(h=pc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ne(qe(g));g=oe(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!qb()||a.m:!1}var Qj=window.URL.createObjectURL,Uj="sequence";function vk(a,b,c){this.i=a;this.A=b;this.o=this.j=Infinity;this.g=1;this.h=this.l=null;this.B=0;this.G=!0;this.H=0;this.C=void 0===c?!0:c;this.F=0;this.s=!1;this.m=a}r=vk.prototype;r.getDuration=function(){return this.j};r.Zh=function(){return this.g};r.mh=function(a){this.i=a};r.$a=function(a){this.j=a};r.di=function(){return this.i};r.kh=function(a){this.B=a};r.wc=function(a){this.G=a};r.Ie=function(a){this.o=a};r.je=function(){return this.o};r.eg=function(a){this.A=a};r.Sh=function(){return this.A};
r.$g=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.ye(a[0].start+b);this.g=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.g);this.h=Math.max(this.h,d);null!=this.i&&this.C&&!this.s&&(this.i=c-this.h-this.g)}}};
r.Id=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.ye(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.s&&(this.i=d-this.h-this.g)}};r.$h=function(){return this.h};r.re=function(){this.s=!0};r.zi=function(){return this.s};r.lh=function(a){this.m=a};r.Wh=function(){return this.m};
r.ye=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.Pf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.V=function(){return Infinity==this.j&&!this.G};r.qc=function(){return Infinity!=this.j&&!this.G};r.nb=function(){return Math.max(this.H,this.Zb()-this.o)};r.qh=function(a){this.H=a};
r.Zb=function(){return this.V()||this.qc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.g-this.i)+this.F,this.j):this.h?Math.min(this.h,this.j):this.j};r.td=function(a){var b=Math.max(this.l,this.H);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Zb()-this.o+a,this.Ab()))};r.Yb=function(){return this.td(0)};r.Ab=function(){return Math.max(0,this.Zb()-(this.V()||this.qc()?this.A:0))};r.uh=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
r.jh=function(a){this.F=a};r.Qh=function(){return this.F};S("shaka.media.PresentationTimeline",vk);vk.prototype.getAvailabilityTimeOffset=vk.prototype.Qh;vk.prototype.setAvailabilityTimeOffset=vk.prototype.jh;vk.prototype.usingPresentationStartTime=vk.prototype.uh;vk.prototype.getSeekRangeEnd=vk.prototype.Ab;vk.prototype.getSeekRangeStart=vk.prototype.Yb;vk.prototype.getSafeSeekRangeStart=vk.prototype.td;vk.prototype.getSegmentAvailabilityEnd=vk.prototype.Zb;vk.prototype.setUserSeekStart=vk.prototype.qh;
vk.prototype.getSegmentAvailabilityStart=vk.prototype.nb;vk.prototype.isInProgress=vk.prototype.qc;vk.prototype.isLive=vk.prototype.V;vk.prototype.offset=vk.prototype.offset;vk.prototype.notifyMaxSegmentDuration=vk.prototype.Pf;vk.prototype.notifyMinSegmentStartTime=vk.prototype.ye;vk.prototype.getInitialProgramDateTime=vk.prototype.Wh;vk.prototype.setInitialProgramDateTime=vk.prototype.lh;vk.prototype.isStartTimeLocked=vk.prototype.zi;vk.prototype.lockStartTime=vk.prototype.re;
vk.prototype.getMaxSegmentEndTime=vk.prototype.$h;vk.prototype.notifySegments=vk.prototype.Id;vk.prototype.notifyTimeRange=vk.prototype.$g;vk.prototype.getDelay=vk.prototype.Sh;vk.prototype.setDelay=vk.prototype.eg;vk.prototype.getSegmentAvailabilityDuration=vk.prototype.je;vk.prototype.setSegmentAvailabilityDuration=vk.prototype.Ie;vk.prototype.setStatic=vk.prototype.wc;vk.prototype.setClockOffset=vk.prototype.kh;vk.prototype.getPresentationStartTime=vk.prototype.di;vk.prototype.setDuration=vk.prototype.$a;
vk.prototype.setPresentationStartTime=vk.prototype.mh;vk.prototype.getMaxSegmentDuration=vk.prototype.Zh;vk.prototype.getDuration=vk.prototype.getDuration;function wk(a,b,c){this.j=c;this.l=a;this.s=xk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}wk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function yk(a,b){a.i=b}function zk(a){this.g=a}function xk(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(Oi(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 Ak(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new ib;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return Bk(f)});this.m=(new Uc(function(){Bk(f)})).Ra(this.s.gapJumpTimerTime)}Ak.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};Ak.prototype.Sf=function(){this.o=!0;Bk(this)};
function Bk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=xk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new U("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Pi(c,b,a.s.gapDetectionThreshold),
null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||$c())e=Math.ceil(100*(e+.01))/100;e>=a.B.Ab()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function Ck(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Dk.value().get(b),c.ha(a,b,d))}var Dk=new Mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ek(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new ib;this.i=new Fk(a);Ck(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Gk(e,e.j())})}Ek.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 Hk(a){return a.o?a.g.currentTime:a.j()}
function Ik(a,b){0<a.g.readyState?Jk(a.i,b):Ck(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Gk(a,a.j())})}function Gk(a,b){.001>Math.abs(a.g.currentTime-b)?Kk(a):(a.h.ha(a.g,"seeking",function(){Kk(a)}),Jk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Kk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
function Fk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Uc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Fk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Jk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ra(.1)};function Lk(a){this.h=a;this.j=!1;this.g=null;this.i=new ib}r=Lk.prototype;r.$e=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.ha(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;Ck(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.$d=function(){return(this.j?this.h.currentTime:this.g)||0};r.vg=function(){return 0};r.ug=function(){return 0};r.Zg=function(){};
function Mk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Nk(a,c,f);this.j=new Ak(a,b.presentationTimeline,c,this.o,f);this.h=new Ek(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Hk(g.h);h=Ok(g,k);if(.001<Math.abs(h-k)){k=!1;if(!hd()||hd()&&pd())k=!0;else{var l=Date.now()/1E3;if(!g.s||g.s<l-1)g.s=l,k=!0}if(k){Ik(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Yb():g.g.Ab():0>h&&(h=g.g.Ab()+h);return Pk(g,Qk(g,h))});this.m=new Uc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Hk(g.h),k=g.g.Yb(),l=g.g.Ab();3>l-k&&(k=l-3);h<k&&(h=Ok(g,h),g.i.currentTime=h)}})}r=Mk.prototype;r.$e=function(){this.m.Ra(.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.A=function(){}};
r.af=function(a){Ik(this.h,a)};r.$d=function(){var a=Hk(this.h);return 0<this.i.readyState&&!this.i.paused?Qk(this,a):a};r.vg=function(){return this.o?this.o.o:0};r.ug=function(){return this.j.C};r.Zg=function(){this.j.Sf()};function Pk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
function Ok(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Yb(),f=a.g.Ab(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.td(c),k=a.g.td(d);c=a.g.td(c+d);return b>=g?Pk(a,b):b>f?f:b<e?Ji(a.i.buffered,k)?k:c:b>=h||Ji(a.i.buffered,b)?b:c}function Qk(a,b){var c=a.g.Yb();if(b<c)return c;a=a.g.Ab();return b>a?a:b}
function Nk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new wk(new zk(a),b.stallThreshold,c);yk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Rk(a){this.O=a;this.l=null;this.i=0;this.m=!1}r=Rk.prototype;r.getNumReferences=function(){return this.O.length};r.getNumEvicted=function(){return this.i};r.release=function(){this.m||(this.O=[],this.l&&this.l.stop(),this.l=null)};r.Fi=function(){this.m=!0};r.Vb=function(a){for(var b=t(this.O),c=b.next();!c.done;c=b.next())a(c.value)};
r.find=function(a){for(var b=this.O.length-1,c=b;0<=c;--c){var d=this.O[c],e=c<b?this.O[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.O.length&&a<this.O[0].startTime?this.i:null};r.get=function(a){if(0==this.O.length)return null;a-=this.i;return 0>a||a>=this.O.length?null:this.O[a]};r.offset=function(a){if(!this.m)for(var b=t(this.O),c=b.next();!c.done;c=b.next())c.value.offset(a)};
r.ue=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.O=this.O.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.O.push.apply(this.O,x(a))}};r.Hd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.O.length||d.endTime>c.O[0].startTime)});this.ue(a);this.Oa(b)};r.Oa=function(a){if(!this.m){var b=this.O.length;this.O=this.O.filter(function(c){return c.endTime>a});this.i+=b-this.O.length}};
r.Ec=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.i++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],b=new Di(a.startTime,b,a.C,a.Ha,a.sa,a.$,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.j=a.j,this.O[this.O.length-1]=b)}};
r.Me=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Uc(function(){var d=b();d?c.O.push.apply(c.O,x(d)):(c.l.stop(),c.l=null)}),this.l.Ra(a))};Rk.prototype[Symbol.iterator]=function(){return this.Ib(0)};
Rk.prototype.Ib=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 $a("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Sk(this,d,f,c)};function Tk(a,b,c){a=new Di(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Rk([a])}
S("shaka.media.SegmentIndex",Rk);Rk.forSingleSegment=Tk;Rk.prototype.getIteratorForTime=Rk.prototype.Ib;Rk.prototype.updateEvery=Rk.prototype.Me;Rk.prototype.fit=Rk.prototype.Ec;Rk.prototype.evict=Rk.prototype.Oa;Rk.prototype.mergeAndEvict=Rk.prototype.Hd;Rk.prototype.offset=Rk.prototype.offset;Rk.prototype.get=Rk.prototype.get;Rk.prototype.find=Rk.prototype.find;Rk.prototype.markImmutable=Rk.prototype.Fi;Rk.prototype.release=Rk.prototype.release;Rk.prototype.getNumEvicted=Rk.prototype.getNumEvicted;
Rk.prototype.getNumReferences=Rk.prototype.getNumReferences;function Sk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Sk.prototype.Uc=function(a){this.reverse=a};Sk.prototype.Lh=function(){return this.h};Sk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&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};
Sk.prototype.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.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Sk);Sk.prototype.next=Sk.prototype.next;Sk.prototype.current=Sk.prototype.current;Sk.prototype.currentPosition=Sk.prototype.Lh;
Sk.prototype.setReverse=Sk.prototype.Uc;function Uk(){Rk.call(this,[]);this.g=[]}pa(Uk,Rk);r=Uk.prototype;r.clone=function(){var a=new Uk;a.g=this.g.slice();return a};r.release=function(){for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};r.Vb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.Vb(a)};r.find=function(a){for(var b=0,c=t(this.g),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=0,c=t(this.g),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.ue=function(){};r.Oa=function(){};r.Hd=function(){};r.Ec=function(){};r.Me=function(){};S("shaka.media.MetaSegmentIndex",Uk);Uk.prototype.updateEvery=Uk.prototype.Me;Uk.prototype.fit=Uk.prototype.Ec;Uk.prototype.mergeAndEvict=Uk.prototype.Hd;Uk.prototype.evict=Uk.prototype.Oa;Uk.prototype.merge=Uk.prototype.ue;
Uk.prototype.offset=Uk.prototype.offset;Uk.prototype.get=Uk.prototype.get;Uk.prototype.find=Uk.prototype.find;Uk.prototype.forEachTopLevelReference=Uk.prototype.Vb;Uk.prototype.release=Uk.prototype.release;function Vk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ie();this.h=new Uc(function(){b.g.Yg(.25*b.i)})}Vk.prototype.release=function(){this.set(this.nc());this.h&&(this.h.stop(),this.h=null);this.g=null};Vk.prototype.set=function(a){this.i=a;Wk(this)};Vk.prototype.nc=function(){return this.g.nc()};function Wk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ie()!=b&&a.g.hg(b);return}catch(c){}a.h.Ra(.25);0!=a.g.ie()&&a.g.hg(0)};function Xk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Uc(function(){Yk(b,!1)})).Ra(.25)}Xk.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Yk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Zk(){this.g=null;this.h=[]}function $k(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 al(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 bl(){this.i=this.h=null;this.g=[]}function cl(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 dl(){this.ae=this.Ug=this.A=this.B=this.I=this.C=this.s=this.j=this.H=this.m=this.i=this.U=this.Z=this.L=this.N=this.R=this.l=this.o=NaN;this.K=0;this.F=this.G=NaN;this.g=new Zk;this.h=new bl};function el(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 fl(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 gl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ib(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.sa&&(c=!1);2==b.ac()&&(c=!1);c&&b.$&&hl(a,b.$);c&&!a.h.has(b)&&(c=new il(a.l),jl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.Jd&&b.pe)break}kl(a)}}function hl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Ci(d,b)})){var c=new il(a.l);jl(c,b,a.i);a.j.set(b,c)}}
function ll(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&ml(a,c)}function nl(a){ll(a,a.h);ll(a,a.j);a.g=null}el.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&&ml(this,d);b&&kl(this)};el.prototype.Uc=function(a){this.o=a;this.g&&this.g.Uc(a)};
function kl(a){for(var b=Array.from(a.h.keys()),c={},d=t(a.j.keys()),e=d.next();!e.done;c={Ud:c.Ud},e=d.next())c.Ud=e.value,b.some(function(f){return function(g){return Ci(g.$,f.Ud)}}(c))||ml(a,c.Ud)}function ol(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&ml(a,d)}kl(a)}function pl(a,b){b&&b!==a.i&&(nl(a),a.i=b)}function ml(a,b){var c=a.h;b instanceof Bi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function il(a){this.g=a;this.Be=this.ig=null}
function jl(a,b,c){var d=new Uint8Array(0);a.Be=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Pd(d,e):d=e,a.ig?G(f,a.ig(d),3):f.u(0);d=new Uint8Array(0);I(f)})})}il.prototype.abort=function(){this.Be&&this.Be.abort()};function ql(a){mg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Uc(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ra(2)}pa(ql,mg);ql.prototype.release=function(){this.g.clear();this.h.stop();mg.prototype.release.call(this)};function rl(a){mg.call(this);this.g=new Map;this.h=a}pa(rl,mg);rl.prototype.release=function(){this.g.clear();mg.prototype.release.call(this)};function sl(a,b){var c=a.g.get(b);c||(c={Ld:[],kf:null,contentType:b},a.g.set(b,c));return c}function tl(a,b,c){var d=sl(a,b.contentType);ul(a,d);a={Lc:b,position:c};d=d.Ld;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
rl.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.kf;a:{var e=c.Ld;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.Lc;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&&!Sb(d.roles,e.roles);(g||h||d)&&vl(this,a,e.contentType)&&(c.kf=e,d=new U("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&vl(this,a,e.contentType)&&(c.kf=e,JSON.stringify(e),c=new U("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function vl(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 ul(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Ld;b.Ld=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.Ld=[]}
function wl(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 xl(a){var b=oe(a),c=b.split("/")[0];a=qe(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Pd:null,colorGamut:null}}
function yl(a,b){function c(z){v=z.name;var B=z.reader;B.skip(24);var C=B.ka(),F=B.ka();B.skip(50);n=String(C);m=String(F);z.reader.oa()&&Rg(z)}function d(z){var B=aj(z.reader);p=B.channelCount;q=B.sampleRate;e(z.name)}function e(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":g.push(z+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(z+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(z+".05.04");k=!0;break;case "vp09":g.push(z+".00.10.08");k=!0;break;case "av01":g.push(z+".0.01M.08");
k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,q=null,u=null,w=null,v;(new Mg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).S("mdhd",function(z){l=Zi(z.reader,z.version).language}).box("minf",Rg).box("stbl",Rg).S("stsd",Vg).box("mp4a",function(z){var B=aj(z.reader);p=B.channelCount;q=B.sampleRate;z.reader.oa()?Rg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
"mp4a",C,F;z.oa();){C=z.T();for(var H=z.T();H&128;)H=z.T();if(3==C)z.ka(),H=z.T(),H&128&&z.ka(),H&64&&z.skip(z.T()),H&32&&z.ka();else if(4==C)F=z.T(),z.skip(12);else if(5==C)break}F&&(B+="."+dj(F),5==C&&z.oa()&&(C=z.T(),F=(C&248)>>3,31===F&&z.oa()&&(F=32+((C&7)<<3)+((z.T()&224)>>5)),B+="."+F));f.push(B);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",
c).box("av01",c).box("avcC",function(z){var B=v||"";switch(v){case "dvav":B="avc3";break;case "dva1":B="avc1"}z=z.reader;z.skip(1);z=B+"."+dj(z.T())+dj(z.T())+dj(z.T());g.push(z);k=!0}).box("hvcC",function(z){var B=v||"";switch(v){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var C=z.reader;C.skip(1);z=C.T();var F=["","A","B","C"][z>>6],H=z&31,K=C.P(),J=(z&32)>>5?"H":"L";z=[C.T(),C.T(),C.T(),C.T(),C.T(),C.T()];C=C.T();for(var E=0,L=0;32>L;L++){E|=K&1;if(31==L)break;E<<=1;K>>=1}B=B+("."+F+H)+("."+
dj(E,!0));B+="."+J+C;F="";for(H=z.length;H--;)if((J=z[H])||F)F="."+J.toString(16).toUpperCase()+F;B+=F;g.push(B);k=!0}).box("dvcC",function(z){var B=v||"";switch(v){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var C=z.reader;C.skip(2);z=C.T();C=C.T();g.push(B+"."+ej(z>>1&127)+"."+ej(z<<5&32|C>>3&31));k=!0}).box("dvvC",function(z){var B=v||"";switch(v){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B=
"dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var C=z.reader;C.skip(2);z=C.T();C=C.T();g.push(B+"."+ej(z>>1&127)+"."+ej(z<<5&32|C>>3&31));k=!0}).S("vpcC",function(z){var B=v||"",C=z.reader;z=C.T();var F=C.T();C=C.T()>>4&15;g.push(B+"."+ej(z)+"."+ej(F)+"."+ej(C));k=!0}).box("av1C",function(z){var B=v||"";switch(v){case "dav1":B="av01"}var C=z.reader;C.skip(1);z=C.T();C=C.T();var F=z>>>5,H=(C&64)>>6;g.push(B+"."+F+"."+ej(z&31)+(C>>>7?"H":"M")+"."+ej(2===F&&H?(C&32)>>5?12:10:H?10:8)+"."+
((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+ej(1)+"."+ej(1)+"."+ej(1)+".0");k=!0}).box("enca",Xg).box("encv",Wg).box("sinf",Rg).box("frma",function(z){z=bj(z.reader).Na;e(z)}).box("colr",function(z){g=g.map(function(F){if(F.startsWith("av01.")){var H=z.reader,K=H.ua(),J=H.rb(4);var E=String.fromCharCode(J[0]);E+=String.fromCharCode(J[1]);E+=String.fromCharCode(J[2]);E+=String.fromCharCode(J[3]);if("nclx"===E){J=H.ka();E=H.ka();var L=H.ka(),M=H.T()>>7,N=F.split(".");10==N.length&&(N[6]=ej(J),N[7]=
ej(E),N[8]=ej(L),N[9]=String(M),F=N.join("."))}H.seek(K)}return F});var B=cj(z.reader),C=B.colorGamut;u=B.Pd;w=C}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var D=new Ib("video/mp4");a&&D.init(a);D.i(b);a=t(D.j());for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);D.g()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:zl(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:q,closedCaptions:y,Pd:u,colorGamut:w}}
function zl(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ne(d);b.has(e)||(c.push(d),b.add(e))}b=Xd("audio",c);d=Xd("video",c);a=Xd(Wd,c);d=Al(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}function Al(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?ob('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function Bl(a){var b=null;(new Mg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).S("stsd",Vg).box("encv",Wg).box("enca",Xg).box("sinf",Rg).box("schi",Rg).S("tenc",function(c){c=c.reader;c.T();c.T();c.T();c.T();b=Md(c.rb(16))}).parse(a,!0);return b}
function Cl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):G(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Cb(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 Dl(a,b,c,d,e){a=ug(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function El(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.I=null;this.A=!1;this.m=new Cg(function(){return Fl(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null};this.N=0;this.L=Infinity}r=El.prototype;r.destroy=function(){return this.m.destroy()};
function Fl(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Gl(e),b.push(Hl(e)),e.W&&(nl(e.W),e.W=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,nl(h);return G(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;I(k)})}
r.configure=function(a){this.h=a;this.I=new $f({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.W&&(nl(b.W),b.W=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,nl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Wd))&&
b.W&&(nl(b.W),b.W=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.W&&(nl(b.W),b.W=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.W?(ol(c.W,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(nl(c.W),c.W=null)):0<a.segmentPrefetchLimit&&(c.W=Il(this,c.stream));a.disableAudioPrefetch||Jl(this)};function Kl(a,b,c){a.l.presentationTimeline.V()||(a.N=b,a.L=c)}
r.start=function(a){var b=this;return O(function(c){if(1==c.g)return G(c,Ll(b,a||new Map),2);Dg(b.m);b.C=!0;I(c)})};function Ml(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Yd,a.H++,d=a.H,ua(l,2),G(l,kk(a.g.ca,c.ta),4);case 4:wa(l,3);break;case 2:if(e=xa(l),a.g)a.g.onError(e);case 3:f=ae(b.mimeType,b.codecs),Tj(a.g.ca,f,a.l.sequenceMode,b.external),g=a.g.ca.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=Nl(a,b),a.i.set(c.ta,k),Ol(a,k,0)),I(l)}})}
function Pl(a){var b=a.i.get(Wd);b&&(Gl(b),Hl(b).catch(function(){}),a.i.delete(Wd));a.s=null}function Ql(a,b){for(var c=0>a.g.fb(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ia&&e.ia.Uc(c),e.W&&e.W.Uc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Uc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.vc&&(Rl(a,b,!1,0,!1),c.vc=d);else if(b=c.vc)c.vc=null,Rl(a,b,!0,0,!1)}
function Sl(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.C&&(b.video&&Rl(a,b.video,c,d,e,f),b.audio&&Rl(a,b.audio,c,d,e,f))}function Tl(a,b){O(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):G(c,b.createSegmentIndex(),2):c.return();Rl(a,b,!0,0,!1);I(c)})}
function Rl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Wd?g&&(g.vc&&(b.trickModeVideo?(g.vc=b,b=b.trickModeVideo):g.vc=null),g.stream!=b||e)&&(a.o.has(b)?g.W=a.o.get(b):g.W&&pl(g.W,b),b.type==Wd&&(e=ae(b.mimeType,b.codecs),Tj(a.g.ca,e,a.l.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ia=null,g.wg=!!f,c?g.md?g.Oe=!0:g.Pa?(g.ec=!0,g.ee=d,g.Oe=!0):(Gl(g),Ul(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Pa||g.ub||Ol(a,g,
0),Vl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Ml(a,b)}
function Vl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.kb)return e.return();c=b.stream;d=b.kb;return c.segmentIndex?e.u(2):G(e,c.createSegmentIndex(),2)}if(b.kb!=d||b.stream!=c)return e.return();var f=a.g.he();var g=Zj(a.g.ca,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.sa?k.sa-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.$)&&(h+=(k.sa?k.sa-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.kb.h.g>h?!0:!1):f=!1;f&&b.kb.abort();I(e)})}
r.Md=function(){if(this.g)for(var a=this.g.he(),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.ca;e.C?e=!1:d==Wd?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Yj(e,d),e=Ji(e,a));if(!e){c.W&&(c.W.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.ia=null;(null!=Zj(this.g.ca,d)||c.Pa)&&Wl(this,c);c.kb&&(c.kb.abort(),c.kb=null);d===Wd&&(d=this.g.ca,d.H&&d.H.g());c.Md=!0}}};
function Wl(a,b){b.md||b.ec||(b.Pa?(b.ec=!0,b.ee=0):null==Xj(a.g.ca,b.type)?null==b.ub&&Ol(a,b,0):(Gl(b),Ul(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function Ll(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Yd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.X,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ga,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ta,a.s),e.add(a.s));f=a.g.ca;return G(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Dg(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=Nl(a,l),b.has(l.id)&&(n=
b.get(l.id),fl(n,function(q,u,w){return Xl(q,u,w||null,a.h.retryParameters,a.g.Lb)}),m.W=n),a.i.set(k,m),Ol(a,m,0));I(p)})}function Nl(a,b){return{stream:b,type:b.type,ia:null,W:Il(a,b),Xa:null,Kc:null,qe:null,oe:null,ne:null,vc:null,endOfStream:!1,Pa:!1,ub:null,ec:!1,ee:0,Oe:!1,md:!1,Md:!0,Yf:!1,xd:!1,kb:null}}
function Il(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Wd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Wd&&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.W)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new el(a.h.segmentPrefetchLimit,b,function(d,e,f){return Xl(d,e,f||null,a.h.retryParameters,a.g.Lb)},0>a.g.fb()):null}
function Jl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.l.variants),f=e.next();!f.done;d={Sa:d.Sa},f=e.next())if(d.Sa=f.value,d.Sa.audio)if(a.o.has(d.Sa.audio)){if(f=a.o.get(d.Sa.audio),ol(f,b),!(0<b&&c.some(function(h){return function(k){return Ee(h.Sa.audio.language,k)}}(d)))){var g=a.i.get(d.Sa.audio.type);f!==(g&&g.W)&&nl(f);a.o.delete(d.Sa.audio)}}else 0>=b||!c.some(function(h){return function(k){return Ee(h.Sa.audio.language,k)}}(d))||!(f=Il(a,d.Sa.audio))||
(d.Sa.audio.segmentIndex||d.Sa.audio.createSegmentIndex(),a.o.set(d.Sa.audio,f))}r.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.ca.$a(a):this.g.ca.$a(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
function Yl(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Dg(a.m);if(b.Pa||null==b.ub||b.md)return k.return();b.ub=null;if(!b.ec){k.u(2);break}return G(k,Ul(a,b,b.Oe,b.ee),3);case 3:return k.return();case 2:if(b.stream.segmentIndex){k.u(4);break}c=b.stream;ua(k,5);return G(k,b.stream.createSegmentIndex(),7);case 7:wa(k,6);break;case 5:return d=xa(k),G(k,Zl(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Pa||b.ub||Ol(a,b,0),
k.return();case 4:ua(k,9);e=$l(a,b);null!=e&&(Ol(a,b,e),b.xd=!1);wa(k,10);break;case 9:return f=xa(k),G(k,Zl(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.C||!g.every(function(l){return l.endOfStream})){k.u(0);break}return G(k,a.g.ca.endOfStream(),13);case 13:Dg(a.m),h=a.g.ca.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.$a(h),I(k)}})}
function $l(a,b){if(am(b))return hk(a.g.ca,b.stream.originalId||""),null;b.type==Wd&&ik(a.g.ca);if(!a.g.ca.xa&&b.type!=Wd)return a.h.updateIntervalSeconds/2;var c=a.g.he();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Oa(c,!0),gl(e,c);d=b.Xa?b.Xa.endTime:c;e=ak(a.g.ca,b.type,c);var f=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.l.presentationTimeline.getDuration()-d,h=Zj(a.g.ca,b.type);if(1E-6>g&&h)return b.endOfStream=
!0,"video"==b.type&&(a=a.i.get(Wd))&&am(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=bm(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,am(h)||h.ia&&!h.ia.current()||(f=Math.min(f,h.Xa?h.Xa.endTime:c));if(d>=f+a.l.presentationTimeline.g)return a.h.updateIntervalSeconds;b.W&&b.ia&&!a.o.has(b.stream)&&(b.W.Oa(e.startTime),gl(b.W,e.startTime));cm(a,b,c,e).catch(function(){});
return null}function bm(a,b,c,d){if(b.ia)return b.ia.current();if(b.Xa||d)return b.ia=b.stream.segmentIndex.Ib(b.Xa?b.Xa.endTime:d,!1,0>a.g.fb()),b.ia&&b.ia.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.fb();var f=null;d&&(b.ia=b.stream.segmentIndex.Ib(e,!1,a),f=b.ia&&b.ia.next().value);f||(b.ia=b.stream.segmentIndex.Ib(c,!1,a),f=b.ia&&b.ia.next().value);return f}
function cm(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z;return O(function(B){switch(B.g){case 1:e=Yd;f=b.stream;g=b.ia;b.Pa=!0;ua(B,2);if(2==d.ac())throw new T(1,1,1011);return G(B,dm(a,b,d),4);case 4:Dg(a.m);if(a.A)return B.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if((l=a.h.lowLatencyMode&&a.l.isLowLatency)&&k&&h&&("HLS"!=a.l.type||d.m))return p=new Uint8Array(0),u=q=!1,v=function(C){var F,H,K,J;return O(function(E){switch(E.g){case 1:if(q)return E.return();
u=!0;Dg(a.m);if(a.A)return E.return();ua(E,2);p=em(p,C);F=!1;H=0;(new Mg).box("mdat",function(L){H=L.size+L.start;F=!0}).parse(p,!1,!0);if(!F){E.u(4);break}K=p.subarray(0,H);p=p.subarray(H);return G(E,fm(a,b,c,f,d,K,!0),5);case 5:b.W&&b.ia&&gl(b.W,d.startTime,!0);case 4:wa(E,0);break;case 2:w=J=xa(E),I(E)}})},G(B,gm(a,b,d,v),9);m=gm(a,b,d);return G(B,m,7);case 7:n=B.h;Dg(a.m);if(a.A)return B.return();Dg(a.m);return b.ec?(b.Pa=!1,Ol(a,b,0),B.return()):G(B,fm(a,b,c,f,d,n),6);case 9:A=B.h;if(w)throw w;
if(u){B.u(10);break}q=!0;Dg(a.m);return a.A?B.return():b.ec?(b.Pa=!1,Ol(a,b,0),B.return()):G(B,fm(a,b,c,f,d,A),10);case 10:b.W&&b.ia&&gl(b.W,d.startTime,!0);case 6:Dg(a.m);if(a.A)return B.return();b.Xa=d;g.next();b.Pa=!1;b.Yf=!1;y=a.g.ca.yb();D=y[b.type];eb(JSON.stringify(D));b.ec||a.g.Sf(d,b.stream);Ol(a,b,0);wa(B,0);break;case 2:z=xa(B);Dg(a.m,z);if(a.A)return B.return();b.Pa=!1;if(7001==z.code)b.Pa=!1,Gl(b),Ol(a,b,0),B.u(0);else if(b.type==e.ta&&a.h.ignoreTextStreamFailures)a.i.delete(e.ta),B.u(0);
else if(3017==z.code)hm(a,b,z),B.u(0);else return b.xd=!0,1==z.category&&b.W&&ml(b.W,d),z.severity=2,G(B,Zl(a,b,z),0)}})}function em(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
function hm(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Yf})){if(0<a.h.maxDisabledTime&&a.g.disableStream(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.xd=!0;a.A=!0;a.g.onError(c);return}b.Yf=!0}Ol(a,b,4)}
function dm(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u;return O(function(w){switch(w.g){case 1:d=Yd;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.N)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=ne(b.stream.codecs);k=oe(b.stream.mimeType);l=c.timestampOffset;if(l==b.qe&&f==b.oe&&g==b.ne&&h==b.Lf&&k==b.Mf){w.u(2);break}m=b.Lf&&b.Mf&&uk(a.g.ca,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.ga?n=a.i.get(d.X):b.type===d.X&&(n=a.i.get(d.ga));if(!n){w.u(3);break}return G(w,Hl(n).catch(function(){}),5);case 5:n.Kc=
null,Wl(a,n);case 3:return G(w,im(a,b,l,f,g,c,h,k),2);case 2:return Ci(c.$,b.Kc)||(b.Kc=c.$,c.l&&c.$&&(p=gm(a,b,c.$),q=function(){var v,A,y,D,z,B,C;return O(function(F){switch(F.g){case 1:return ua(F,2),G(F,p,4);case 4:return v=F.h,Dg(a.m),A=null,y=new Map,D={projection:null,hfov:null},z=new Mg,z.box("moov",Rg).box("trak",Rg).box("mdia",Rg).S("mdhd",function(H){A=Zi(H.reader,H.version).timescale}).box("hdlr",function(H){H=H.reader;H.skip(8);switch(H.tc()){case "soun":y.set(d.X,A);break;case "vide":y.set(d.ga,
A)}A=null}).box("minf",Rg).box("stbl",Rg).S("stsd",Vg).box("encv",Wg).box("avc1",Wg).box("avc3",Wg).box("hev1",Wg).box("hvc1",Wg).box("dvav",Wg).box("dva1",Wg).box("dvh1",Wg).box("dvhe",Wg).box("vexu",Rg).box("proj",Rg).S("prji",function(H){H=H.reader.tc();D.projection=H}).box("hfov",function(H){H=H.reader.P()/1E3;D.hfov=H}).parse(v),jm(a,D),y.has(b.type)?c.$.timescale=y.get(b.type):null!=A&&(c.$.timescale=A),B=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,G(F,a.g.yg(b.type,v),5);case 5:return G(F,
ck(a.g.ca,b.type,v,null,b.stream,B),6);case 6:wa(F,0);break;case 2:throw C=xa(F),b.Kc=null,C;}})},a.g.Hi(c.startTime,c.$),e.push(q()))),a.l.sequenceMode&&(u=b.Xa?b.Xa.j:null,c.j!=u&&e.push(nk(a.g.ca,b.type,c.startTime))),G(w,Promise.all(e),0)}})}
function im(a,b,c,d,e,f,g,h){var k,l,m,n;return O(function(p){if(1==p.g)return k=Yd,l=new Map,a.j.audio&&l.set(k.X,a.j.audio),a.j.video&&l.set(k.ga,a.j.video),ua(p,2),b.oe=d,b.ne=e,g&&(b.Lf=g),h&&(b.Mf=h),b.qe=c,m=a.l.sequenceMode||"HLS"==a.l.type,G(p,lk(a.g.ca,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return wa(p,0);n=xa(p);b.oe=null;b.ne=null;b.Lf=null;b.Mf=null;b.qe=null;throw n;})}
function fm(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p,q,u,w;return O(function(v){switch(v.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.F;n="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;p=null;e.$&&(p=e.$.timescale);q=n&&p&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(l||m||q)k=new Mg;l&&k.S("emsg",function(A){var y=d.emsgSchemeIdUris;if(0===A.version){var D=
A.reader.tc();var z=A.reader.tc();var B=A.reader.P();var C=A.reader.P();var F=A.reader.P();var H=A.reader.P();var K=e.startTime+C/B}else B=A.reader.P(),K=A.reader.Qc()/B+e.timestampOffset,C=K-e.startTime,F=A.reader.P(),H=A.reader.P(),D=A.reader.tc(),z=A.reader.tc();A=A.reader.rb(A.reader.getLength()-A.reader.ua());if(y&&y.includes(D)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==D)a.g.Ii();else if(y=(new Map).set("detail",{startTime:K,endTime:K+F/B,schemeIdUri:D,value:z,timescale:B,presentationTimeDelta:C,
eventDuration:F,id:H,messageData:A}),y=new U("emsg",y),y.cancelable=!0,a.g.onEvent(y),!y.defaultPrevented&&("https://aomedia.org/emsg/ID3"==D||"https://developer.apple.com/streaming/emsg-id3"==D)&&(D=Vi(A),D.length&&e))a.g.onMetadata([{cueTime:e.startTime,data:A,frames:D,dts:e.startTime,pts:e.startTime}],0,e.endTime)});m&&k.S("prft",function(A){if(!a.F&&e.$.timescale){var y=A.reader,D=A.version;y.P();A=y.P();var z=y.P();A=1E3*A+z/Math.pow(2,32)*1E3;0===D?y=y.P():(D=y.P(),y=y.P(),y=D*Math.pow(2,32)+
y);A=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+A)).getTime();y=(new Map).set("detail",{wallClockTime:A,programStartDate:new Date(A-y/e.$.timescale*1E3)});y=new U("prft",y);a.g.onEvent(y);a.F=!0}});q&&k.box("moof",Rg).box("traf",Rg).S("tfdt",function(A){var y,D,z,B,C,F;return O(function(H){y=Yi(A.reader,A.version);D=y.baseMediaDecodeTime;if(!D)return H.return();z=-D/p;B=Number(b.qe)||0;if(!(B<z))return H.u(0);C=b.oe;F=b.ne;return G(H,im(a,b,z,C,F,e),0)})});(l||m||q)&&k.parse(f,!1,g);
return G(v,km(a,b,c),2);case 2:return Dg(a.m),u=b.Md,b.Md=!1,w=b.wg,b.wg=!1,G(v,a.g.yg(b.type,f),3);case 3:return G(v,ck(a.g.ca,b.type,f,e,d,h,u,w,g),4);case 4:Dg(a.m),I(v)}})}function km(a,b,c){var d,e,f,g;return O(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.l.presentationTimeline.g);e=Xj(a.g.ca,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():G(h,a.g.ca.remove(b.type,e,e+g),2)}Dg(a.m);I(h)})}
function am(a){return a&&a.type==Wd&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
function gm(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.ud())return l.return(e);f=null;if(b.W){var m=b.W,n=m.h;c instanceof Bi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.ig=d),f=m.Be):f=null}f||(f=Xl(c,b.stream,d||null,a.h.retryParameters,a.g.Lb));g=0;b.ia&&(g=b.ia.h);b.kb=f;return G(l,f.promise,2);case 2:h=l.h;b.kb=null;k=h.data;if(!c.aesKey){l.u(3);break}return G(l,Cl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
function Xl(a,b,c,d,e){var f=a instanceof Di?a:void 0,g=f?1:0;a=Dl(a.M(),a.Ha,a.sa,d,c);a.contentType=b.type;return e.request(Ag,a,{type:g,stream:b,segment:f})}
function Ul(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.ec=!1,b.Oe=!1,b.ee=0,b.md=!0,b.Xa=null,b.ia=null,b.W&&!a.o.has(b.stream)&&nl(b.W),d?(e=a.g.he(),f=a.g.ca.getDuration(),G(g,a.g.ca.remove(b.type,e+d,f),3)):G(g,kk(a.g.ca,b.type),4);if(3!=g.g)return Dg(a.m),c?G(g,a.g.ca.flush(b.type),3):g.u(3);Dg(a.m);b.md=!1;b.endOfStream=!1;b.Pa||b.ub||Ol(a,b,0);I(g)})}
function Ol(a,b,c){var d=b.type;if(d!=Wd||a.i.has(d))b.ub=(new Tc(function(){var e;return O(function(f){if(1==f.g)return ua(f,2),G(f,Yl(a,b),4);if(2!=f.g)return wa(f,0);e=xa(f);if(a.g)a.g.onError(e);I(f)})})).Y(c)}function Gl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function Hl(a){return O(function(b){return a.kb?G(b,a.kb.abort(),0):b.u(0)})}
function Zl(a,b,c){var d;return O(function(e){if(1==e.g)return G(e,bg(a.I),2);Dg(a.m);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(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);I(e)})}
function lm(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Yd;if(e=a.i.get(d.X))e.Kc=null,Wl(a,e),Hl(e).catch(function(){});if(f=a.i.get(d.ga))f.Kc=null,Wl(a,f),Hl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.X,a.j.audio);a.j.video&&g.set(d.ga,a.j.video);return G(h,tk(a.g.ca,g),2)}return h.return(!0)})}
function jm(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function mm(){}
function nm(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]=Ne(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Ne(n)),m=nm(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?($a("Invalid config, wrong type for "+m),
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&ab("Unexpected number of arguments for "+m),a[l]=b[l]):($a("Invalid config, unrecognized key "+m),k=!1)}return k}function om(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 pm(a,b){return a&&b}
function qm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||Number.isNaN(m)&&Number.isNaN(h[l])||m!==h[l]&&(k[l]=
m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",mm);mm.getDifferenceFromConfigObjects=qm;mm.convertToConfigObject=om;mm.mergeConfigObjects=nm;function rm(){}function sm(a){a=Ad(a);return(new vc(a)).Fb}function tm(a,b,c){function d(h){Gb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Cb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Cd(b,!0):e=b;a=Ad(a);a=Cd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function um(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ad(a).split("skd://").pop();return tm(a,c,b)}
function vm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",rm);rm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=xd(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);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=Db(Id(c)))}};rm.expressplayFairPlayRequest=function(a,b){vm(a,b)};
rm.conaxFairPlayRequest=function(a,b){vm(a,b)};rm.ezdrmFairPlayRequest=function(a,b){vm(a,b)};rm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Cb(b.body),a=Hd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Bd("spc="+a))};rm.expressplayInitDataTransform=function(a,b,c){return um(a,b,c)};
rm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ad(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Fb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return tm(a,d,b)};rm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ad(a).split(";").pop();return tm(a,c,b)};rm.verimatrixInitDataTransform=function(a,b,c){return um(a,b,c)};rm.initDataTransform=tm;
rm.defaultGetContentId=sm;rm.isFairPlaySupported=function(){var a;return O(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ua(b,2),G(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);xa(b);return b.return(!1)})};function wm(){}
function xm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:ag(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){td()&&"skd"==n&&(n=p.serverCertificate,p=sm(m),m=tm(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:$c(),minHdcpVersion:"",ignoreDuplicateInitData:!dd()};
($c()||kd())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;dd()||cd()||ad("Tizen 4")||ad("Tizen 5")||ad("Tizen 6")||fd()||ed()&&53===gd()||ed()&&68===gd()||!(!hd()||hd()&&pd()||hd()&&ad("Fuchsia"))||od()&&Zc()||(c="smooth",d=!0);d={retryParameters:ag(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,
dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,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"},manifestPreprocessor:ym,manifestPreprocessorTXml:zm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-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"',
useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:cd()||dd()||fd()||kd()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:ym,manifestPreprocessorTXml:zm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:ag(),failureCallback:function(m){return pm([m])},
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,
parsePrftBox:!1,segmentPrefetchLimit:0,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,infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:kd()||ld(),dontChooseCodecs:!1,shouldFixTimestampOffset:ed()||bd()};if(ed()||bd()||hd()||md())e.stallSkip=0;var f={trackSelectionCallback:function(m){return O(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return O(function(p){if(1==p.g)return navigator.storage&&navigator.storage.estimate?G(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 pm([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:id()?.5:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return pm([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return pm([m,n])}};var g=!1,h=!1,k=!0;qd()&&(h=g=!0,k=!1);var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new Cf},
abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],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},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,
supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(Am(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
function Bm(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 nm(a,b,c||xm(),d,"")}
function Am(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Me(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Fe(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!=Wd&&"image"!=c.type||b.push(c);return b}function ym(a){return pm([a],a)}function zm(a){return pm([a],a)}S("shaka.util.PlayerConfiguration",wm);wm.mergeConfigObjects=Bm;wm.createDefault=xm;function Cm(a,b,c,d){mg.call(this);this.L=a;this.U=b;this.xa=d.networkingEngine;this.A=c;this.o=null;this.ra=0;this.Fa=d.Dc;this.C=d.Ci;this.bb=d.Di;this.g=d.config;this.j=this.F=this.h=null;this.ea=!1;this.G=d.Mi;this.pa=!1;this.l=null;this.da=!1;this.i=this.B=null;this.aa=!1;this.K=new Map;this.qa=!1;this.za=d.Li;this.Z=new dl;this.m=new cg;this.N=null;this.s=!1;this.Da=d.Fh;this.fa=null;this.Ea=d.Eh;this.R=!1;this.I=[];this.H=[]}pa(Cm,mg);function Dm(a,b,c){(a=b?a.H:a.I)?a.push(c):c()}
function Em(a){if(a.H)for(var b=t(a.H),c=b.next();!c.done;c=b.next())c=c.value,c();a.H=null}function Fm(a,b){a.N=b;a.R=!0;if(a.I){b=t(a.I);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.I=null}r=Cm.prototype;r.getStartTime=function(){return this.A};r.Gc=function(){return this.L};r.Ef=function(){return this.h};function Gm(a){a.aa=!0;return a.i}function Hm(a){a.ea=!0;return a.j}function Im(a){a.pa=!0;return a.G}r.getStats=function(){return this.Z};function Jm(a){a.da=!0;return a.l}
function Km(a){a.qa=!0;return a.K}
r.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return G(c,Promise.resolve(),2);case 2:return ua(c,3),G(c,Lm(a),5);case 5:return Mm(a),G(c,Nm(a),6);case 6:Mm(a);a.o||(a.o=new Mf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));if(a.Ea){var d=
a.g.abrFactory;a.B=d;a.i=d();a.i.configure(a.g.abr)}if(a.Da){d=a.h.presentationTimeline.V();var e=zf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.fa=e,e.video&&Om(a,e.video,d),e.audio&&Om(a,e.audio,d)}return G(c,void 0,7);case 7:Mm(a);a.m.resolve();wa(c,0);break;case 3:b=xa(c),a.m.reject(b),I(c)}})})()};r.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):mg.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 U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Mm(a){if(a.s)throw new T(2,7,7003);}function Pm(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
function Lm(a){var b,c,d,e,f;return O(function(g){if(1==g.g){Pm(a,"manifest-parser");a.j||(a.F=vi(a.L,a.U),a.j=a.F(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Pm(a,"manifest");if(a.h)return g.u(2);c=a;return G(g,a.j.start(a.L,a.bb),3)}2!=g.g&&(c.h=g.h);d=new U("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new T(2,4,4036);Qm(a.h);e=Date.now()/1E3;f=e-b;a.Z.H=f;I(g)})}
function Nm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Pm(a,"drm-engine");a.ra=Date.now()/1E3;a.l=a.Fa();a.C.g=a.l;a.l.configure(a.g.drm);var h=a.C;b=Ue(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return G(g,Promise.resolve(),3);case 3:Mm(a),a.dispatchEvent(c);case 2:return d=zf(a.h.variants),G(g,Lh(a.l,d,a.h.offlineSessionIds),4);case 4:return Mm(a),G(g,pi(a.C,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return G(g,
Promise.resolve(),7);case 7:a.dispatchEvent(f),I(g)}})}r.configure=function(a,b){a=om(a,b);Bm(this.g,a)};r.getConfiguration=function(){return Ne(this.g)};
function Om(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new el(d,b,function(l,m,n){return Xl(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.K.set(b.id,e),G(k,b.createSegmentIndex(),2);f=a.A||0;(h=(g=b.segmentIndex.Ib(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.$&&hl(e,h.$):gl(e,h.startTime));I(k)})}r.mj=function(){return this.m};
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.ea){e.u(2);break}return G(e,a.j.stop(),2);case 2:if(!a.i||a.aa){e.u(4);break}return G(e,a.i.stop(),4);case 4:a.G&&!a.pa&&a.G.release();if(!a.l||a.da){e.u(6);break}return G(e,a.l.destroy(),6);case 6:if(0<a.K.size&&!a.qa)for(b=t(a.K.values()),c=b.next();!c.done;c=b.next())d=c.value,nl(d);I(e)}})};
function Qm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",Cm);Cm.prototype.destroy=Cm.prototype.destroy;Cm.prototype.waitForFinish=Cm.prototype.mj;function Rm(a,b){mg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Ac:null,zc:Sm,pc:function(d,e){return Tm(c,"enter",d,e)}},{Ac:gn,zc:Sm,pc:function(d,e){return Tm(c,"enter",d,e)}},{Ac:hn,zc:Sm,pc:function(d,e){return Tm(c,"enter",d,e)}},{Ac:Sm,zc:gn,pc:function(d,e){return Tm(c,"exit",d,e)}},{Ac:Sm,zc:hn,pc:function(d,e){return Tm(c,"exit",d,e)}},{Ac:gn,zc:hn,pc:function(d,e){return Tm(c,"skip",d,e)}},{Ac:hn,zc:gn,pc:function(d,e){return Tm(c,"skip",d,e)}}];this.h=new ib;this.h.D(this.i,
"regionremove",function(d){c.g.delete(d.region)})}pa(Rm,mg);Rm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;mg.prototype.release.call(this)};Rm.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?gn:a>d.endTime?hn:Sm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Ac==e&&h.zc==f&&h.pc(d,b)}}};
function Tm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var gn=1,Sm=2,hn=3;function jn(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new vc(a)).Ya.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=kn[d])return m.return(e);f=0;g=ug([a],c);ua(m,2);g.method="HEAD";return G(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];wa(m,3);break;case 2:k=xa(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return G(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 kn={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function ln(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return ln(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=mn(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=mn(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 mn(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 nn(a,b){var c=[];a=t(on(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(nn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=ln(d,b);c.push(e)}return c}
function on(a){var b=[],c={};a=t(a);for(var d=a.next();!d.done;c={Rd:c.Rd},d=a.next())c.Rd=d.value,b.some(function(e){return function(f){return dc(e.Rd,f)}}(c))||b.push(c.Rd);return b}
function pn(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 qn(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=qn.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;rn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
r.append=function(a){var b=nn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={Cc:d.Cc},e=b.next())d.Cc=e.value,a.some(function(f){return function(g){return g.startTime==f.Cc.startTime&&g.endTime==f.Cc.endTime&&g.text==f.Cc.payload?!0:!1}}(d))||(e=pn(d.Cc))&&c.push(e);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(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(rn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
function rn(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}S("shaka.text.SimpleTextDisplayer",qn);qn.prototype.setTextVisibility=qn.prototype.setTextVisibility;qn.prototype.isTextVisible=qn.prototype.isTextVisible;qn.prototype.destroy=qn.prototype.destroy;qn.prototype.append=qn.prototype.append;qn.prototype.remove=qn.prototype.remove;qn.prototype.configure=qn.prototype.configure;function sn(){}r=sn.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",sn);sn.prototype.setTextVisibility=sn.prototype.setTextVisibility;sn.prototype.isTextVisible=sn.prototype.isTextVisible;sn.prototype.destroy=sn.prototype.destroy;sn.prototype.append=sn.prototype.append;sn.prototype.remove=sn.prototype.remove;sn.prototype.configure=sn.prototype.configure;function tn(){}function un(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",tn);tn.removeAllChildren=un;function vn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=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.s.appendChild(this.g);c&&c.captionsUpdatePeriod||sb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Uc(function(){d.A.paused||
wn(d)})).Ra(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new ib;this.j.D(document,"fullscreenchange",function(){wn(d,!0)});this.j.D(this.A,"seeking",function(){wn(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){wn(d,!0)}),this.o.observe(this.g));this.B=new Map}r=vn.prototype;r.configure=function(a){this.C&&this.C.Ra(a.captionsUpdatePeriod)};
r.append=function(a){var b=[].concat(x(this.h)),c={};a=t(on(a));for(var d=a.next();!d.done;c={Sd:c.Sd},d=a.next())c.Sd=d.value,b.some(function(e){return function(f){return dc(f,e.Sd)}}(c))||this.h.push(c.Sd);wn(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=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});wn(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function xn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
function yn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.wh:null;l&&(g.push(l.jf),l.uc&&g.push(l.uc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?xn(a,n)||(f=!0):(zn(a,k,e),l=a.i.get(k),n=l.wh,f=!0));0<k.nestedCues.length&&n&&yn(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(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.uc?(d.uc.contains(c)&&d.uc.removeChild(c),c.appendChild(d.uc),d.uc.appendChild(d.jf)):c.appendChild(d.jf)}}function wn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())un(d.value);un(a.g);a.i.clear();a.B.clear()}a.m&&yn(a,a.h,a.g,c,[])}}
function zn(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&&An(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Mb?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Mb?"%":"px");if(a.B.has(c))c=a.B.get(c);else{e=document.createElement("span");var k=g.heightUnits==Mb?"%":"px",l=g.widthUnits==
Mb?"%":"px",m=g.viewportAnchorUnits==Mb?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";e.style.height=2===g.heightUnits?5.33*g.height+"%":g.height+k;e.style.width=2===g.widthUnits?g.width*h+"%":g.width+l;2===g.viewportAnchorUnits?(k=g.viewportAnchorY/75*100,l=g.viewportAnchorX/(a.l===4/3?160:210)*100,k-=g.regionAnchorY*g.height*5.33/100,l-=g.regionAnchorX*g.width*h/100,e.style.top=k+"%",e.style.left=l+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*
g.height/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*g.width/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.B.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.i.set(b,{jf:f,wh:e,uc:c})}
function Bn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Ub?c:"left"===a||"start"===a&&b===Wb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Wb?"line-right":"center"}
function An(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=Cn(c.linePadding,c,a.s);f.paddingRight=Cn(c.linePadding,c,a.s);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=Dn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=Dn(d,function(m){return m.fontFamily}))&&
(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",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=Cn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Yb&&(g=1,h=16,a.l&&1>a.l&&(h=
32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Xb?(f.width="100%",c.lineAlign==Zb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Zb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Zb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Xb?f.paddingLeft=c.position:f.paddingTop=c.position);a=Bn(c);"line-left"==
a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");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==Xb?f.width=c.size+"%":f.height=c.size+"%")}
function Cn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Dn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",vn);vn.prototype.setTextVisibility=vn.prototype.setTextVisibility;
vn.prototype.isTextVisible=vn.prototype.isTextVisible;vn.prototype.remove=vn.prototype.remove;vn.prototype.destroy=vn.prototype.destroy;vn.prototype.append=vn.prototype.append;vn.prototype.configure=vn.prototype.configure;function En(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=nn(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 Vb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Fn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}Fn.prototype.configure=function(a){this.g=a};function Gn(a){a.i=!1;a.l=!0;a.j=!1}
function Hn(a,b,c){try{if(!a.g.enabled)return b;var d=In(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=Jn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=Kn;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=Ln;break a}e=void 0}d.ot=e;d.su=
!0;var f=Mn(d);return Nn(b,f)}catch(g){return bb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function In(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
function On(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,In(a));c.pr=a.h.fb();var e=c.ot===Pn||c.ot===Kn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=Qn(a,c);if(d)d=Rn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=Mn(a);f&&(b.uris=b.uris.map(function(g){return Nn(g,f)}))}}}function Qn(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 Sn(a){if(0===a.type)return Tn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?Kn:Pn;if("audio"==b)return Jn;if("text"==b)return"application/mp4"===a.mimeType?Un:Vn}}function Wn(a,b){b=a.h.yb()[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 Xn(a,b){b=a.h.yb()[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 Yn(a,b){var c=a.h.oc();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 Pn:return a.videoBandwidth||NaN;case Jn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function Mn(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 Rn(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Mn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function Nn(a,b){if(!b||a.includes("offline:"))return a;a=new vc(a);a.g.set("CMCD",b);return a.toString()}var Ln="m",Jn="a",Pn="v",Kn="av",Tn="i",Vn="c",Un="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",yh:"s",OTHER:"o"});function Zn(a){this.h=a;this.g=null}r=Zn.prototype;r.configure=function(a){this.h=a};r.Ng=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has($n)?1E3*this.g.get($n):null};r.Lg=function(){return this.h.enabled&&this.g&&this.g.has(ao)?1E3*this.g.get(ao):null};r.ei=function(){return this.h.enabled&&this.g&&this.g.has(bo)?this.g.get(bo):null};r.fi=function(){return this.h.enabled&&this.g&&this.g.has(co)?this.g.get(co):null};
r.getBandwidthEstimate=function(a){var b=this.Lg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function eo(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Zn);Zn.prototype.getBandwidthEstimate=Zn.prototype.getBandwidthEstimate;Zn.prototype.getRoundTripTime=Zn.prototype.fi;Zn.prototype.getResponseDelay=Zn.prototype.ei;Zn.prototype.getEstimatedThroughput=Zn.prototype.Lg;
Zn.prototype.getMaxBitrate=Zn.prototype.Ng;var ao="etp",$n="mb",bo="rd",co="rtt";function fo(){this.g=null;this.h=[]}function go(a,b){return O(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;I(c)})}fo.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){mg.call(this);var c=this;this.l=ho;this.ze=this.h=null;this.pa=!1;this.Je=new ib;this.yd=new ib;this.m=new ib;this.Fa=new ib;this.wb=new ib;this.C=this.G=this.B=this.H=null;this.Le=0;this.Z=new fo;this.qa=this.pg=this.da=this.i=this.bb=this.F=this.j=this.qd=this.K=this.tg=this.ea=this.N=this.vd=this.L=this.Ce=this.I=this.Gb=null;this.Ea=!1;this.xa=this.o=null;this.rg=1E9;this.Gd=[];this.U=NaN;this.g=io(this);this.R=null;this.Ne=-1;this.Da=null;this.fa={width:Infinity,height:Infinity};
this.xe=new oi(this.g,this.fa,null);this.Fe=[];this.s=null;this.za=new Mf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Eb=this.g.preferredTextLanguage;this.Fd=this.g.preferredTextRole;this.Ed=this.g.preferForcedSubs;this.Dd=[];b&&
b(this);this.N=jo(this);this.ea=new Zn(this.g.cmsd);this.H=ko(this);this.H.fg(this.g.streaming.forceHTTP);this.H.gg(this.g.streaming.forceHTTPS);this.Hb=this.aa=this.A=null;this.Ye=!1;this.sg=new Uc(function(){return O(function(d){if(1==d.g)return c.aa?G(d,c.Tb(c.Hb,!0),3):d.u(0);if(4!=d.g)return G(d,c.load(c.aa),4);c.Ye?c.Hb.pause():c.Hb.play();c.aa=null;c.Ye=!1;I(d)})});lo&&(this.A=lo(),this.A.configure(this.g.ads),this.wb.D(this.A,"ad-content-pause-requested",function(d){var e,f;return O(function(g){if(1==
g.g){c.sg.stop();if(c.aa)return g.u(0);c.Hb=c.h;c.Ye=c.h.ended;e=d.saveLivePosition||!1;f=c;return G(g,c.Eg(!0,e),3)}f.aa=g.h;I(g)})}),this.wb.D(this.A,"ad-content-resume-requested",function(d){d=d.offset||0;if(c.aa){var e=c.aa;e.A&&d&&(e.A+=d)}c.sg.Y(.1)}),this.wb.D(this.A,"ad-content-attach-requested",function(){return O(function(d){return c.h||!c.Hb?d.u(0):G(d,c.Tb(c.Hb,!0),0)})}));this.Je.D(window,"online",function(){mo(c);c.Zf()});this.Ee=new Uc(function(){for(var d=Date.now()/1E3,e=!1,f=!0,
g=t(c.i.variants),h=g.next();!h.done;h=g.next())h=h.value,0<h.disabledUntilTime&&h.disabledUntilTime<=d&&(h.disabledUntilTime=0,e=!0),0<h.disabledUntilTime&&(f=!1);f&&c.Ee.stop();e&&no(c,!1,void 0,!1,!1)});this.ra=null;a&&(sb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Tb(a,!0))}pa(X,mg);function oo(a){null!=a.K&&(Fj(a.K),a.K.release(),a.K=null)}
function po(a,b){b.lcevc.enabled?(oo(a),null==a.K&&(a.K=new Ej(a.h,a.tg,b.lcevc),a.G&&(a.G.Z=a.K))):oo(a)}function qo(a,b){return new U(a,b)}r=X.prototype;
r.destroy=function(){var a=this,b;return O(function(c){switch(c.g){case 1:if(a.l==ro)return c.return();oo(a);b=a.detach();a.l=ro;return G(c,b,2);case 2:return G(c,a.lf(),3);case 3:a.Je&&(a.Je.release(),a.Je=null);a.yd&&(a.yd.release(),a.yd=null);a.m&&(a.m.release(),a.m=null);a.Fa&&(a.Fa.release(),a.Fa=null);a.wb&&(a.wb.release(),a.wb=null);a.xa=null;a.g=null;a.s=null;a.ze=null;a.N=null;a.ea=null;if(!a.H){c.u(4);break}return G(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.o&&(a.o.release(),a.o=null),
mg.prototype.release.call(a),I(c)}})};function so(a,b){a.dispatchEvent(qo("onstatechange",(new Map).set("state",b)))}
r.Tb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==ro)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return G(g,c.detach(),2);case 2:return G(g,to(c,"attach"),4);case 4:if(g.h)return g.return();ua(g,5,6);d||(so(c,"attach"),e=function(){var h=uo(c);h&&vo(c,h)},c.yd.D(a,"error",e),c.h=a);if(!b||!Vc()||c.G){g.u(6);break}return G(g,wo(c),6);case 6:ya(g);c.Z.release();za(g,0);break;case 5:return f=xa(g),G(g,c.detach(),10);case 10:throw f;
}})};r.Gh=function(a){this.tg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==ro)throw new T(2,7,7E3);return G(c,b.dc(!1,a),2)}if(3!=c.g)return G(c,to(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.yd.Qa(),b.h=null),so(b,"detach"),b.A&&!a&&b.A.release()}finally{b.Z.release()}I(c)})};function to(a,b){var c;return O(function(d){return 1==d.g?(c=++a.Le,G(d,go(a.Z,b),2)):c!=a.Le?(a.Z.release(),d.return(!0)):d.return(!1)})}
r.dc=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;return O(function(p){switch(p.g){case 1:return c.l!=ro&&(c.l=ho),G(p,to(c,"unload"),2);case 2:if(p.h)return p.return();va(p,3);c.Ea=!1;so(c,"unload");a&&!Vc()&&(a=!1);oo(c);d=c.Dd.map(function(q){return q()});c.Dd=[];return G(p,Promise.all(d),5);case 5:c.dispatchEvent(qo("unloading"));c.vd&&(c.vd.release(),c.vd=null);c.h&&(c.m.Qa(),c.Fa.Qa());c.Ee.stop();c.Gb&&(c.Gb.release(),c.Gb=null);c.Ce&&(c.Ce.stop(),c.Ce=null);
if(!c.F){p.u(6);break}return G(p,c.F.stop(),7);case 7:c.F=null,c.bb=null;case 6:if(!c.o){p.u(8);break}return G(p,c.o.stop(),8);case 8:if(!c.j){p.u(10);break}return G(p,c.j.destroy(),11);case 11:c.j=null;case 10:c.I&&(c.I.release(),c.I=null);c.C&&(c.C.release(),c.C=null);if(!td("webkit")||!c.B){p.u(12);break}return G(p,c.B.destroy(),13);case 13:c.B=null;case 12:if(!c.G){p.u(14);break}return G(p,c.G.destroy(),15);case 15:c.G=null;case 14:if(c.A&&!b)c.A.onAssetUnload();c.aa&&!b&&(c.aa.destroy(),c.aa=
null);b||c.sg.stop();c.N&&Gn(c.N);c.ea&&(c.ea.g=null);c.h&&un(c.h);if(!c.h||!c.h.src){p.u(16);break}return G(p,new Promise(function(q){return(new Uc(q)).Y(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.B){p.u(18);break}return G(p,c.B.destroy(),19);case 19:c.B=null;case 18:c.ra&&c.da!=c.ra.Gc()&&(c.ra.s||c.ra.destroy(),c.ra=null);c.da=null;c.pg=null;c.L=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(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(ff={},Sc.clear());c.i=null;c.s=new dl;c.qg=null;c.Da=null;c.R=null;c.Ne=-1;c.Gd=[];c.U=NaN;xo(c);case 3:ya(p);c.Z.release();za(p,4);break;case 4:if(a&&Vc()&&!c.G&&c.h)return G(p,wo(c),0);p.u(0)}})};r.lj=function(a){this.qa=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 O(function(A){switch(A.g){case 1:if(d.l==ro)throw new T(2,7,7E3);e=null;f="";a instanceof Cm?(e=a,f=e.Gc()||""):f=a||"";return G(A,go(d.Z,"load"),2);case 2:d.Z.release();if(!d.h)throw new T(2,7,7002);if(!d.da){A.u(3);break}d.da=f;return G(A,d.dc(!1),3);case 3:g=++d.Le;h=function(){return O(function(y){if(1==y.g)return d.Le==g?y.u(0):e?G(y,e.destroy(),3):y.u(3);throw new T(2,7,7E3);})};k=function(y,D){return O(function(z){switch(z.g){case 1:return va(z,
2),G(z,go(d.Z,D),4);case 4:return G(z,h(),5);case 5:return G(z,y(),6);case 6:return G(z,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:ya(z),d.Z.release(),za(z,0)}})};ua(A,5,6);null==b&&e&&(b=e.getStartTime());d.qa=b;d.Ea=!1;d.dispatchEvent(qo("loading"));if(e){c=e.U;A.u(8);break}if(c){A.u(8);break}return G(A,k(function(){return O(function(y){if(1==y.g)return G(y,yo(d,f),2);c=y.h;I(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Fm(e,d);d.s=e.getStats();A.u(11);break}return G(A,zo(d,f,b,c,!0),12);case 12:(e=
A.h)?(Fm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new dl;case 11:m=!e;n=Date.now()/1E3;d.s=e?e.getStats():new dl;d.da=f;d.pg=c||null;if(m)return G(A,k(function(){return O(function(y){return G(y,Ao(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.G){A.u(15);break}return G(A,k(function(){return O(function(y){return G(y,wo(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return G(A,k(function(){return O(function(y){return G(y,e.m,0)})},"waitForFinish"),17);case 17:d.g=
e.getConfiguration();d.xe=e.C;d.bb=e.F;d.F=Hm(e);d.F&&d.F.setMediaElement&&d.h&&d.F.setMediaElement(d.h);d.vd=Im(e);d.qd=e.za;d.i=e.Ef();if(p=e.o)d.za=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(Bo(d),d.configure("manifest.disableVideo",!0));d.B=Jm(e);return G(A,k(function(){return O(function(y){return G(y,d.B.Tb(d.h),0)})},"drmEngine_.attach"),18);case 18:return!(q=e.B)||d.xa&&d.xa==q||(d.o=Gm(e),d.xa=e.B,"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=Km(e),w=e.fa,G(A,k(function(){return O(function(y){return G(y,Co(d,n,w,u),0)})},"loadInner_"),19);case 19:Em(e);A.u(14);
break;case 20:return G(A,k(function(){return O(function(y){return G(y,Do(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(qo("loaded"));case 6:ya(A);if(!e){A.u(22);break}return G(A,e.destroy(),22);case 22:d.ra=null;za(A,0);break;case 5:v=xa(A);if(7E3==v.code){A.u(24);break}return G(A,d.dc(!1),24);case 24:throw v;}})};
function Bo(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.hj=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?G(e,Eo(c),2):3!=e.g?(d=e.h,G(e,c.dc(a,b),3)):e.return(d)})};
r.Eg=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?G(e,Eo(c,b),2):3!=e.g?(d=e.h,G(e,c.detach(a),3)):e.return(d)})};
function Eo(a,b){b=void 0===b?!1:b;var c,d;return O(function(e){if(1==e.g){c=null;if(!(a.i&&a.F&&a.bb&&a.da))return e.u(2);d=a.h.currentTime;a.V()&&!b&&(d=null);return G(e,Fo(a,a.da,d,a.pg,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.Fe.push(c);a.F&&a.F.setMediaElement&&a.F.setMediaElement(null);var f=c,g=a.F,h=a.bb;f.h=a.i;f.j=g;f.F=h;f=c;g=a.xa;f.i=a.o;f.B=g;c.o=a.za;c.start();a.i=null;a.F=null;a.bb=null;a.o=null;a.xa=null}return e.return(c)})}
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return G(f,zo(d,a,b,c),2);(e=f.h)?e.start():vo(d,new T(2,7,7005));return f.return(e)})};r.lf=function(){var a=this,b,c,d,e;return O(function(f){b=[];c=t(a.Fe);for(d=c.next();!d.done;d=c.next())e=d.value,e.s||b.push(e.destroy());a.Fe=[];return G(f,Promise.all(b),0)})};
function zo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return d?l.u(2):G(l,yo(a,b),3);2!=l.g&&(d=l.h);if(f=Go(a,d))return l.return(null);g=!1;h=!0;e&&(a.o&&a.xa==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=Fo(a,b,c,d||null,!e,g,h);e||(k=k.then(function(m){a.Fe.push(m);return m}));return l.return(k)})}
function Fo(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,A,y,D,z,B;return O(function(C){if(1==C.g)return h=null,k=Ne(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.R&&h.s?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(F,H){l()?h.configure(F,H):a.configure(F,H)},Infinity!=a.fa.width||Infinity!=a.fa.height?C.u(2):G(C,ud(),3);2!=C.g&&(p=C.h,a.fa.width=p.width,a.fa.height=p.height);q=new oi(k,a.fa,null);u={networkingEngine:a.H,
filter:function(F){var H,K;return O(function(J){if(1==J.g)return G(J,pi(q,F),2);if(4!=J.g){H=J.h;if(!H)return J.u(0);K=qo("trackschanged");return G(J,Promise.resolve(),4)}h.dispatchEvent(K);I(J)})},makeTextStreamsForClosedCaptions:function(F){return Ho(a,F)},onTimelineRegionAdded:function(F){var H=h.G;a:{var K=t(H.g);for(var J=K.next();!J.done;J=K.next())if(J=J.value,J.schemeIdUri==F.schemeIdUri&&J.id==F.id&&J.startTime==F.startTime&&J.endTime==F.endTime){K=J;break a}K=null}null==K&&(H.g.add(F),F=
new U("regionadd",new Map([["region",F]])),H.dispatchEvent(F))},onEvent:function(F){return h.dispatchEvent(F)},onError:function(F){return h.onError(F)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.R&&a.j.updateDuration()},newDrmInfo:function(F){var H=h.l,K=H?H.g:null;K&&H.s&&ri(q,K.keySystem,F)},onManifestUpdated:function(){var F=
(new Map).set("isLive",a.V());h.dispatchEvent(qo("manifestupdated",F));Dm(h,!1,function(){if(a.A)a.A.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(F,H,K,J){var E=F;if("com.apple.hls.interstitial"==F&&(E="com.apple.quicktime.HLS",F={startTime:H,endTime:K,values:J},a.A))a.A.onInterstitialMetadata(a,a.h,F);F={};J=t(J);for(var L=J.next();!L.done;F={Re:F.Re},L=J.next())F.Re=L.value,Dm(h,!1,function(M){return function(){Io(a,H,K,E,M.Re)}}(F))},
disableStream:function(F){return a.disableStream(F,a.g.streaming.maxDisabledTime)}};w=new ql(function(){return a.Pb()});w.addEventListener("regionadd",function(F){var H=F.region;Jo(a,"timelineregionadded",H,h);Dm(h,!1,function(){if(a.A)a.A.onDashTimedMetadata(H)})});v=null;k.streaming.observeQualityChanges&&(v=new rl(function(){return a.yb()}),v.addEventListener("qualitychange",function(F){Ko(a,F.quality,F.position)}),v.addEventListener("audiotrackchange",function(F){Ko(a,F.quality,F.position,!0)}));
A=!0;y={Lb:a.H,onError:function(F){return h.onError(F)},Ae:function(F){Dm(h,!0,function(){a:{var H=F,K=qo("keystatuschanged");a.dispatchEvent(K);var J=Object.keys(H);1==J.length&&""==J[0]&&(J=["00"],H={"00":H[""]});K=1==J.length&&"00"==J[0];var E=!1;if(J.length){J=t(a.i.variants);for(var L=J.next();!L.done;L=J.next()){L=L.value;var M=[];L.audio&&M.push(L.audio);L.video&&M.push(L.video);M=t(M);for(var N=M.next();!N.done;N=M.next()){var Q=N.value;N=L.allowedByKeySystem;if(Q.keyIds.size){L.allowedByKeySystem=
!0;Q=t(Q.keyIds);for(var R=Q.next();!R.done;R=Q.next())if(R=R.value,(R=H[K?"00":R])||a.B.F)L.allowedByKeySystem=L.allowedByKeySystem&&!!R&&!ti.includes(R)}N!=L.allowedByKeySystem&&(E=!0)}}}if(E&&(Lo(a),!Mo(a)))break a;(H=a.j.j)&&!H.allowedByKeySystem&&no(a)}})},onExpirationUpdated:function(F,H){var K=qo("expirationupdated");h.dispatchEvent(K);if((K=h.j)&&K.onExpirationUpdated)K.onExpirationUpdated(F,H)},onEvent:function(F){h.dispatchEvent(F);"drmsessionupdate"==F.type&&A&&(A=!1,F=Date.now()/1E3-h.ra,
(a.s||h.getStats()).j=F,a.K&&Fj(a.K))}};D=ko(a,l);tg(a.H,D);z=function(){return a.Dc(y)};B={config:k,Di:u,Mi:w,Li:v,Dc:z,Ci:q,networkingEngine:D,Fh:e,Eh:g};h=new Cm(b,d,c,B);return C.return(h)})}function yo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,G(e,jn(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&id()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
function Go(a,b){if(!Vc())return!0;if(b){if(""==(a.h||Yc()).canPlayType(b))return!1;if(!(Vc()&&b in wi))return!0;if(re(b))return id()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls}return!1}
function wo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return so(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):sb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.qg=b,d=No(a.h,c,{Xh:function(){return a.keySystem()},onMetadata:function(h,k,l){Oo(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.fa=f,G(g,d.L,2);a.G=d;I(g)})}
function Co(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K;return O(function(J){switch(J.g){case 1:so(a,"load"),e=a.h,a.I=new Vk({ie:function(){return e.playbackRate},nc:function(){return e.defaultPlaybackRate},hg:function(E){e.playbackRate=E},Yg:function(E){e.currentTime+=E}}),f=function(){return Po(a)},g=function(){return Qo(a)},a.m.D(e,"playing",f),a.m.D(e,"pause",f),a.m.D(e,"ended",f),a.m.D(e,"ratechange",g),po(a,a.g),a.Eb=a.g.preferredTextLanguage,a.Fd=a.g.preferredTextRole,a.Ed=a.g.preferForcedSubs,
Ro(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.o.init(function(E,L,M){a.i&&a.j&&E!=a.j.j&&So(a,E,!0,void 0===L?!1:L,void 0===M?0:M)}),a.o.setMediaElement(e),a.o.setCmsdManager(a.ea),a.j=To(a),a.j.configure(a.g.streaming),a.l=Uo,e.textTracks&&a.m.D(e.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Vo(a,E)}}),a.dispatchEvent(qo("streaming")),h=c;case 2:(l=a.j.j)||h||(h=Wo(a,!0));m=[];k=l||h;n=t([k.video,k.audio]);for(p=n.next();!p.done;p=n.next())(q=
p.value)&&!q.segmentIndex&&m.push(q.createSegmentIndex());if(!(0<m.length)){J.u(4);break}return G(J,Promise.all(m),4);case 4:if(!k||0!=k.disabledUntilTime){J.u(2);break}if(a.F&&a.F.onInitialVariantChosen)a.F.onInitialVariantChosen(k);a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&ab("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.");Ro(a.i.presentationTimeline,
a.g.playRangeStart,a.g.playRangeEnd);Kl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(E){a.C=Xo(a,E);a.Gb=Yo(a,E);Zo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.qa);if(l){J.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){J.u(8);break}w=a.i.presentationTimeline;v=a.qa||a.h.currentTime;A=w.Yb();y=w.Ab();v<A?v=A:v>y&&(v=y);return G(J,$o(h,v),9);case 9:D=J.h,u(D);case 8:So(a,h,!0,!1,0);case 7:return a.C.$e(),z=a.Hc().find(function(E){return E.active}),
z||((B=Af(a.i.textStreams,a.Eb,a.Fd,a.Ed)[0]||null)&&cl(a.s.h,B,!0),h&&(B?(ap(a,h.audio,B)&&(a.pa=!0),a.pa&&a.G.F.setTextVisibility(!0),bp(a)):a.pa=!1),B&&(a.g.streaming.alwaysStreamText||a.Kf())&&Tl(a.j,B)),G(J,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),cp(a));Lo(a);Mo(a);a.i.variants.some(function(E){return E.primary});if((C=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)F=
function(){return dp(a)},a.m.D(e,"timeupdate",F);C||(H=function(){return ep(a)},a.m.D(e,"timeupdate",H),ep(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(K=function(){var E,L;return O(function(M){if(1==M.g){E=a.h.duration-a.h.currentTime;if(isNaN(E)||!(E<=a.g.streaming.preloadNextUrlWindow))return M.u(0);a.m.lb(e,"timeupdate",K);L=a;return G(M,a.preload(a.i.nextUrl),4)}L.ra=M.h;I(M)})},a.m.D(e,"timeupdate",K)),a.m.D(e,"ended",function(){a.load(a.ra||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(C);
a.Ea=!0;a.m.ha(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});I(J)}})}
function Ao(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Yd,d=Date.now()/1E3,e=!0,a.B=a.Dc({Lb:a.H,onError:function(k){vo(a,k)},Ae:function(){},onExpirationUpdated:function(){var k=qo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.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?oe(b):"",codecs:b?qe(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ga,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(ae(g.mimeType,
g.codecs)),b.startsWith("audio/")?(g.type=c.X,f.audio=g):f.video=g,a.B.aa=!0,G(h,Lh(a.B,[f],[]),2)):G(h,a.B.Tb(a.h),0)})}
function Do(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return so(a,"src-equals"),d=a.h,a.C=new Lk(d),e=!1,a.Dd.push(function(){e=!0}),null!=a.qa&&a.C.af(a.qa),a.I=new Vk({ie:function(){return d.playbackRate},nc:function(){return d.defaultPlaybackRate},hg:function(w){d.playbackRate=w},Yg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,Zo(a,d,f),g=function(){return Po(a)},h=function(){return Qo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
"ratechange",h),"none"!=d.preload&&a.m.ha(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return Lo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return Lo(a)}),a.m.D(d.audioTracks,"change",function(){return Lo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":fp(a,w);break;case "chapters":Vo(a,w);break;default:Lo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return Lo(a)}),
a.m.D(d.textTracks,"change",function(){return Lo(a)})),d.src=Hn(a.N,a.da,c),(bd()||ed())&&d.load(),"none"!=d.preload&&!d.autoplay&&re(c)&&nd()&&d.load(),a.l=gp,a.dispatchEvent(qo("streaming")),k=new cg,Ck(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.$e();k.resolve()}),Ck(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(v){if(1==v.g)return hp(a),w=ip(a),w.find(function(A){return"disabled"!=A.mode})?(0<w.length&&(a.pa=!0),v.u(2)):G(v,new Promise(function(A){a.m.ha(d.textTracks,
"change",A);(new Uc(A)).Y(1)}),2);if(e)return v.return();jp(a);I(v)})}),d.error?k.reject(uo(a)):"none"==d.preload&&(ab('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.'),k.resolve()),a.m.ha(d,"error",function(){k.reject(uo(a))}),l=new Promise(function(w,v){(new Uc(v)).Y(a.g.streaming.loadTimeout)}),G(u,Promise.race([k,
l]),2);if((m=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return dp(a)},a.m.D(d,"timeupdate",n);m||(p=function(){return ep(a)},a.m.D(d,"timeupdate",p),ep(a));a.A&&(a.A.onManifestUpdated(m),m&&(q=a.Pb().end,a.m.D(d,"progress",function(){var w=a.Pb().end;q!=w&&(a.A.onManifestUpdated(a.V()),q=w)})));a.Ea=!0;I(u)})}
function hp(a){var b=a.g.preferredAudioLanguage;""!=b&&a.gh(b,a.g.preferredVariantRole)}function jp(a){var b=a.g.preferredTextLanguage;""!=b&&a.bg(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function fp(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues){for(var d=[],e={},f=t(b.activeCues),g=f.next();!g.done;e={Ma:e.Ma},g=f.next()){e.Ma=g.value;Io(a,e.Ma.startTime,e.Ma.endTime,e.Ma.type,e.Ma.value);if(a.A)a.A.onCueMetadataChange(e.Ma.value);"com.apple.quicktime.HLS"==e.Ma.type&&null!=e.Ma.startTime&&(g=d.find(function(h){return function(k){return k.startTime==h.Ma.startTime&&k.endTime==h.Ma.endTime}}(e)),g||(g={startTime:e.Ma.startTime,endTime:e.Ma.endTime,
values:[]},d.push(g)),g.values.push(e.Ma.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:"ONCE",mimeType:null,pictureType:null}),a.A.onInterstitialMetadata(a,a.h,e))}});var c=(new Uc(function(){var d=kp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).xc().Y(.5);a.Dd.push(function(){c.stop()})}}
function Oo(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Io(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Io(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(qo("metadata",b))}
function Vo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Uc(function(){b.mode="hidden"})).xc().Y(.5);a.Dd.push(function(){c.stop()})}}r.Qi=function(){for(var a=this.Z;a.g;)a.release()};r.Dc=function(a){return new Eh(a)};
function ko(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?Dm(b(),!0,e):e()}b||(b=function(){return null});return new pg(function(e,f,g,h){var k=b()?b().i: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(qo("downloadheadersreceived",f));d(function(){if(a.ea){var h=a.ea;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],
eo(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],eo(u[1]))}var w=p}catch(v){w=null}w&&(h.g=w)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(qo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)On(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}On(h,f,{ot:Ln,su:!h.i})}}catch(N){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case Ag: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.V()?"l":"v"};n.ot=Sn(k);var p=n.ot===Pn||n.ot===Jn||n.ot===Kn||n.ot===Un,q=k.stream;if(q){var u=h.h.fb();if(p&&(n.bl=Wn(h,q.type),n.ot!==Un)){var w=Xn(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.Ib(m.endTime,!0,0>u);if(v){var A=v.next().value;if(A&&A!=m){if(!Sb(m.M(),A.M())){var y=A.M()[0],D=f.uris[0],z=new URL(y),B=new URL(D);if(z.origin!==B.origin)var C=y;else{for(var F=z.pathname.split("/").slice(1),H=B.pathname.split("/").slice(1,-1);F[0]===H[0];)F.shift(),H.shift();for(;H.length;)H.shift(),F.unshift("..");C=F.join("/")}n.nor=C}if((A.Ha||A.sa)&&(m.Ha!=A.Ha||m.sa!=A.sa)){var K=A.Ha+"-";A.sa&&(K+=A.sa);n.nrr=K}}}var J=h.h.fb()||1,E=Xn(h,q.type)||
500,L=q.bandwidth;var M=L?L*(m.endTime-m.startTime)/1E3/(E/J/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(M)||(n.rtp=M)}}p&&n.ot!==Un&&(n.tb=Yn(h,n.ot)/1E3);On(h,f,n)}}catch(N){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:On(h,f,{ot:"k"});break;case 4:On(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.F)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.s;g&&(g.ae=isNaN(g.ae)?f:g.ae+f,0===e&&(g.Ug=f))}})}
function Xo(a,b){return new Mk(a.h,a.i,a.g.streaming,b,function(){a.Gb&&Yk(a.Gb,!0);a.j&&a.j.Md();a.L&&lp(a)},function(c){return a.dispatchEvent(c)})}
function Yo(a,b){b=new Rm(a.vd,a.V()||0<b);b.addEventListener("enter",function(d){Jo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Jo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Jo(a,"timelineregionenter",e),Jo(a,"timelineregionexit",e))});var c=new Xk(a.h);c.g.add(b);a.qd&&c.g.add(a.qd);return c}
function Zo(a,b,c){a.L=new Wf;a.L.g=Yf;Zf(a.L,c,Math.min(.5,c/2));xo(a);a.Ce=(new Uc(function(){lp(a)})).Ra(.25);a.m.D(b,"waiting",function(){return lp(a)});a.m.D(b,"stalled",function(){return lp(a)});a.m.D(b,"canplaythrough",function(){return lp(a)});a.m.D(b,"progress",function(){return lp(a)})}
function lp(a){switch(a.l){case gp:if(a.h.ended)var b=!0;else{var c=Ii(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Uo:a:if(a.h.ended||Wj(a.G))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.Zb();var d=Ii(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ki(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Xf:Yf;c.g=d;(b=b!=d)&&d===Xf&&(c.h=Date.now());b&&xo(a)}function No(a,b,c,d){return new Nj(a,b,c,d)}
function jo(a){return new Fn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},yb:function(){return a.yb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},fb:function(){return a.fb()},zb:function(){return a.zb()},oc:function(){return a.oc()},V:function(){return a.V()}},a.g.cmcd)}
function To(a){return new El(a.i,{he:function(){return a.C?a.C.$d():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},fb:function(){return a.fb()},ca:a.G,Lb:a.H,onError:function(b){return vo(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ii:function(){a.F&&a.F.update&&a.F.update()},Sf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(a.C){a.C.Zg();var h=Xj(a.G,f);!a.V()&&a.h.paused&&null!=h&&0<h&&a.C.$d()<h&&a.C.af(h)}lp(a);d=(new Map).set("start",
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(qo("segmentappended",d));a.o&&c.fastSwitching&&b.Jd&&b.pe&&a.o.trySuggestStreams()},Hi:function(b,c){(c=c.Lc)&&a.qd&&tl(a.qd,c,b)},yg:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Zg(Cb(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,
f),f+=b.length;Uh(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){Oo(a,b,c,d)},disableStream:function(b,c){return a.disableStream(b,c)}})}
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=om(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&&id(),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.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&
(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=
100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));c=Bm(this.g,a,
io(this));mp(this);return c};
function mp(a){a.xe=new oi(a.g,a.fa,a.B);if(a.F){var b=Ne(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.F.configure(b)}a.B&&a.B.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=ro&&qi(a.xe,a.i)&&Lo(a)}catch(f){vo(a,f)}a.o&&Mo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||no(a)}a.H&&(a.H.fg(a.g.streaming.forceHTTP),a.H.gg(a.g.streaming.forceHTTPS));if(a.G)if(a.G.configure(a.g.mediaSource),a.G.fa=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
a.qg!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):sb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.G,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.qg=b;a.j&&(b=a.j,(c=b.i.get(Wd))&&Rl(b,c.stream,!0,0,!0))}else b=a.G.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),cp(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
Zf(a.L,b,Math.min(.5,b/2)));a.i&&Ro(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.ea&&a.ea.configure(a.g.cmsd)}r.getConfiguration=function(){var a=io(this);Bm(a,this.g,io(this));return a};r.Og=function(){var a=io(this);Bm(a,this.g,io(this));return qm(this.g,io(this))};
r.Jg=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.Pb().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.Ui=function(){for(var a in this.g)delete this.g[a];Bm(this.g,io(this),io(this));mp(this)};r.Mg=function(){return this.l};r.Ff=function(){return this.i?this.i.type:null};r.ai=function(){return this.h};
r.zb=function(){return this.H};r.Gc=function(){return this.da};r.Ig=function(){return this.A?this.A:null};r.V=function(){return this.i?this.i.presentationTimeline.V():this.h&&this.h.src?Infinity==this.h.duration:!1};r.qc=function(){return this.i?this.i.presentationTimeline.qc():!1};r.si=function(){if(this.i){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.Pb=function(){if(this.i){if(!this.Ea&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Yb(),end:a.Ab()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.oi=function(){this.V()&&(this.h.currentTime=this.Pb().end)};r.ti=function(){return this.Ea};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.B?this.B.g:null};
r.sd=function(){return this.B?this.B.sd():Infinity};r.Df=function(){return this.B?this.B.Df():[]};r.ge=function(){return this.B?this.B.ge():{}};r.Jf=function(){return this.L?this.L.g==Yf:!1};r.fb=function(){return this.h?this.I?this.I.i:1:0};
r.Od=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.Fa.Qa(),this.h.paused&&this.h.play(),this.I.set(a),this.l==Uo&&(this.o.playbackRateChanged(a),Ql(this.j,1<Math.abs(a))),this.V()&&this.Fa.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Pb(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.ld():Math.floor(c)<=Math.floor(d.start+e)&&b.ld()}))};
r.ld=function(){var a=this.I.nc();this.l==gp&&this.I.set(a);this.l==Uo&&(this.I.set(a),this.o.playbackRateChanged(a),Ql(this.j,!1));this.Fa.Qa()};
r.oc=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,uf(e)){var f=mf(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 tf(g)}):[]};
r.Hc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=nf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?ip(this).map(function(f){return rf(f)}):[]};r.Vh=function(){var a=this.Gd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return of(b)})};
r.Nh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Uo&&b.l!=gp)return g.return(null);c=b.Gd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Vb(function(h){var k=np(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.kc;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.Qg(a,h.startTime+l*m/k))}}),G(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
function np(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{kc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
r.Qg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z;return O(function(B){if(1==B.g){if(c.l!=Uo&&c.l!=gp)return B.return(null);d=c.Gd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(C){return C.id==a}))?e.segmentIndex?B.u(2):G(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=np(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.kc;n=l/h.rows;p=h.kc*h.rows;q=g.i-g.startTime;
u=g.A||q/p;w=g.startTime;A=v=0;1<p&&(y=Math.floor((b-g.startTime)/u),w=g.startTime+y*u,v=y%h.kc*m,A=Math.floor(y/h.kc)*n);D=!1;if(z=g.s)D=!0,n=z.height,v=z.positionX,A=z.positionY,m=z.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:v,positionY:A,startTime:w,duration:u,uris:g.M(),width:m,sprite:D})})};
r.hh=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(cl(this.s.h,b,!1),Tl(this.j,b),op(this),this.Eb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=ip(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,pf(c)==a.id?c.mode=this.pa?"showing":"hidden":c.mode="disabled";op(this)}};
r.cg=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&uf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&ab("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");So(this,d,!1,b,c);this.za=new Lf(d,
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);Mo(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,pf(c)==a.id){pp(this,c);break}};r.Ph=function(){return qp(this.oc())};r.hi=function(){return qp(this.Hc())};r.Oh=function(){return Array.from(rp(this.oc()))};r.gi=function(){return Array.from(rp(this.Hc()))};
r.gh=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.C){this.za=new Mf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,e);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;e=this.za.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())f=f.value,
uf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=mf(c),this.cg(a,!0,d)):no(this))}else this.h&&this.h.audioTracks&&(d=Af(this.oc(),a,b||"",!1)[0])&&this.cg(d)};r.bg=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Eb=a,this.Fd=b||"",this.Ed=c,(a=Af(this.i.textStreams,this.Eb,this.Fd,this.Ed)[0]||null)&&a!=this.j.s&&(cl(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.Kf()))Tl(this.j,a),op(this)}else(a=Af(this.Hc(),a,b||"",c)[0])&&this.hh(a)};
r.$i=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.za=new Mf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),no(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&pp(this,b)}};
r.Kf=function(){var a=this.pa;return this.G&&this.l==Uo?this.G.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?ip(this).some(function(b){return"showing"==b.mode}):a};r.Kg=function(){return this.h&&this.h.src&&this.h.textTracks?sp(this).map(function(a){return rf(a)}):[]};
r.Rh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Fe(a),c=sp(this).filter(function(h){return Fe(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 ip(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function kp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function sp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
r.nh=function(a){a=!!a;if(this.pa!=a){this.pa=a;if(this.l==Uo)this.G.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=Af(this.i.textStreams,this.Eb,this.Fd,this.Ed),0<a.length&&(Tl(this.j,a[0]),op(this))):Pl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=ip(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}bp(this)}};
r.ci=function(){if(this.C)var a=this.C.$d();else{if(null==this.qa)return new Date;a=this.qa}if(this.i){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.Pg=function(){if(this.i){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.je=function(){return this.V()?this.i?this.i.presentationTimeline.je():null:null};r.yb=function(){if(this.l==Uo)return this.G.yb();var a={total:[],audio:[],video:[],text:[]};this.l==gp&&(a.total=Oi(this.h.buffered));return a};
r.getStats=function(){if(this.l!=Uo&&this.l!=gp)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:[]};Po(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.V()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.U=this.C.ug(),this.s.Z=this.C.vg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.R=Number(c.droppedVideoFrames);b.N=d;this.s.L=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.I?c.I:NaN):c=NaN;this.s.s=c;if(this.l==Uo){c=this.j.j;b=this.j.s;if(c){d=this.I?this.I.i:1;
var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.Pg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&(this.s.G=this.i.periodCount,this.s.F=this.i.gapCount,this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.g));c=this.o.getBandwidthEstimate();this.s.A=c}this.l==gp&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=
f.N;e=f.R;var g=f.L,h=f.Z,k=f.U,l=f.A,m=f.i,n=f.m,p=f.H,q=f.j,u=$k(f.g,"playing"),w=$k(f.g,"paused"),v=$k(f.g,"buffering"),A=f.s,y=f.C,D=f.I,z=f.Ug,B=f.ae,C=f.K,F=f.G,H=f.F,K=al(f.g),J=[];f=t(f.h.g);for(var E=f.next();!E.done;E=f.next())E=E.value,J.push({timestamp:E.timestamp,id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.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:A,liveLatency:y,maxSegmentDuration:D,manifestSizeBytes:z,bytesDownloaded:B,nonFatalErrorCount:C,manifestPeriodCount:F,manifestGapCount:H,stateHistory:K,switchHistory:J}};
r.Bh=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,A,y,D;return O(function(z){switch(z.g){case 1:if(h.l!=Uo&&h.l!=gp)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&ab("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.u(2);break}return G(z,tp(h,a),3);case 3:d=z.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=gp){z.u(4);break}g&&(c="forced");return G(z,up(h,a,b,c,d,f||"",k),5);case 5:l=Fe(b);m=h.Hc();if(n=m.find(function(B){return Fe(B.language)==
l&&B.label==(f||"")&&B.kind==c}))return Lo(h),z.return(n);throw new T(1,2,2012);case 4:p=Yd;q=h.h.duration;h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new T(1,4,4033);if(!k.length){z.u(6);break}return G(z,vp(h,a,h.H,h.g.streaming.retryParameters),7);case 7:u=z.h,w=wp(h,u,d,k),v=new Blob([w],{type:"text/vtt"}),a=Qj(v),d="text/vtt";case 6:A={id:h.rg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Tk(0,q,[a]),mimeType:d||"",
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.ta,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ae(d||"",e||"")])};y=ae(A.mimeType,A.codecs);D=te(y);if(!D)throw new T(2,2,2014,d);h.i.textStreams.push(A);Lo(h);return z.return(nf(A))}})};
r.Ch=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y;return O(function(D){switch(D.g){case 1:if(c.l!=Uo&&c.l!=gp)throw new T(1,7,7004);if(b){D.u(2);break}return G(D,tp(c,a),3);case 3:b=D.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Yd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return G(D,vp(c,a,c.H,c.g.streaming.retryParameters),4);case 4:f=D.h;g=ue[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
vttOffset:0};l=Cb(f);m=h.parseMedia(l,k,a);n=[];p={};q=t(m);for(u=q.next();!u.done;p={gd:p.gd,hc:p.hc},u=q.next())p.hc=u.value,p.gd=null,w=function(z){return function(){null==z.gd&&(z.gd=Qd([a],[z.hc.payload]));return z.gd||[]}}(p),v=new Di(p.hc.startTime,p.hc.endTime,w,0,null,null,0,0,Infinity),p.hc.payload.includes("#xywh")&&(A=p.hc.payload.split("#xywh=")[1].split(","),4===A.length&&v.oh({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
n.push(v);y={id:c.rg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Rk(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Ze,primary:!1,trickModeVideo: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([ae(b||
"","")])};c.l==gp?c.Gd.push(y):c.i.imageStreams.push(y);Lo(c);return D.return(of(y))}})};
r.Ah=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Uo&&d.l!=gp)throw new T(1,7,7004);if(c){k.u(2);break}return G(k,tp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),G(k,up(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Kg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return G(k,new Promise(function(l,m){d.m.ha(f,"load",l);d.m.ha(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return Lo(d),k.return(h);case 5:throw new T(1,
2,2012);}})};function tp(a,b){var c;return O(function(d){switch(d.g){case 1:return ua(d,2),G(d,jn(b,a.H,a.g.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:xa(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
function up(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?G(n,vp(a,b,a.H,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=wp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Qj(l),e="text/vtt");m=document.createElement("track");var p=a.N,q=b;try{if(p.g.enabled){var u=In(p);u.ot=Vn;u.su=!0;var w=Mn(u);var v=Nn(q,w)}else v=q}catch(A){bb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),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 vp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=Ag;f=ug([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&On(k,f,{ot:Vn,su:!0})}catch(l){bb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return G(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
function wp(a,b,c,d){var e=ue[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Cb(b),b=c.parseMedia(b,a,null),En(b,d);throw new T(2,2,2014,c);}r.ej=function(a,b){this.fa.width=a;this.fa.height=b};r.Zf=function(a){if(this.l==Uo){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.xd||d.Pa||d.ub||(d.xd=!1,Ol(b,d,a));b=!0}}else b=!1;return b};
r.Ef=function(){ab("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.Yh=function(){return this.bb};
function io(a){var b=xm();b.streaming.failureCallback=function(c){if(a.V()){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.Zf(d))}};b.textDisplayFactory=function(){if(a.ze){var c=a.getConfiguration();return new vn(a.h,a.ze,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new qn(a.h,"Shaka Player TextTrack"):new sn};return b}r.rh=function(a){this.ze=a};
function Ho(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 Uk,l=e.closedCaptions.get(g);h={id:a.rg++,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:Wd,primary:!1,trickModeVideo: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([ae(h,"")])};b.textStreams.push(h);c.add(g)}}
function $o(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(q){if(1==q.g)return k?G(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.Ib(l))?m.next().value:null;if(!n)return q.return(null);p=n.startTime;return q.return(p)})},G(h,e(c,b),2);if(3!=h.g)return f=h.h,G(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 xo(a){var b=a.Jf();if(a.s&&a.L&&a.C){var c=a.I;c.j=b;Wk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Po(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Ne<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.R&&(a.R=Math.min(a.R+ ++a.Ne*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(qo("buffering",
b))}function Qo(a){var b=a.h.playbackRate;0!=b&&(a.I&&a.I.set(b),b=qo("ratechange"),a.dispatchEvent(b))}
function Po(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Yf?c="buffering":a.h.paused?c="paused":a.h.ended&&(c="ended");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(qo("statechanged",c)))}}
function dp(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Jg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Od(d):1==e&&b!==a.I.nc()&&a.ld()}if(c&&(c=a.Pb(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start))){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.R||"number"!==typeof g||(a.R=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Da&&null!==a.R&&"number"===typeof g&&a.Ne<n&&Date.now()-a.Da>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,a.R=Math.max(a.R-(g-f)/2,f+d),
a.Da=Date.now());e&&null!==a.R&&(h=a.R+d,k=a.R-d);g=c.end-a.h.currentTime;d=0;a.l==gp&&(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.L.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Od(m):h&&l&&g-d>h?(b!=l&&a.Od(l),a.Da=null):k&&m&&g-d<k?(b!=m&&a.Od(m),a.Da=null):b!==a.I.nc()&&(a.ld(),a.Da=Date.now())}}
function ep(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.U)?(a.U=c,b=!0):(c=Math.max(a.U,c),a.U!=c&&(a.U=c,b=!0)));if(b){var d;0==a.U?d=qo("started"):25==a.U?d=qo("firstquartile"):50==a.U?d=qo("midpoint"):75==a.U?d=qo("thirdquartile"):100==a.U&&(d=qo("complete"));d&&a.dispatchEvent(d)}}}function Mo(a){try{si(a.xe,a.i)}catch(c){return vo(a,c),!1}var b=zf(a.i.variants);b=a.za.create(b);a.o.setVariants(Array.from(b.values()));return!0}
function Wo(a,b){b=void 0===b?!1:b;return Mo(a)?a.o.chooseVariant(b):null}function no(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=Wo(a);f&&So(a,f,e,b,c,d)}
function So(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Sl(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Sl(a.j,b,d,e,f,c);d=null;g&&(d=mf(g));b=mf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Gj(a.K,b,a.Ff()),c=qo("adaptation",c),xp(a,c)):yp(a,d,b)}}
function pp(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=tf(c),b=tf(b),yp(a,c,b))}function ap(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Fe(a.g.preferredTextLanguage);c=Fe(c.language);if(2==a.g.autoShowText)return Ee(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Fe(b.language);return Ee(c,d)&&!Ee(a,c)}ab("Invalid autoShowText setting!");return!1}
function Lo(a){var b=qo("trackschanged");xp(a,b)}function yp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Gj(a.K,c,a.Ff());c=qo("variantchanged",b);xp(a,c)}function op(a){var b=qo("textchanged");xp(a,b)}function bp(a){var b=qo("texttrackvisibility");xp(a,b)}function cp(a){a.g.abr.enabled||mo(a);var b=(new Map).set("newStatus",a.g.abr.enabled);xp(a,qo("abrstatuschanged",b))}
function mo(a,b){b=void 0===b?!0:b;if(a.l==Uo){a.Ee.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Mo(a)}}
r.disableStream=function(a,b){if(!this.g.abr.enabled||this.l===ro||!navigator.onLine)return!1;if(this.i.variants.some(function(f){var g=f[a.type];return g&&g.id!==a.id&&!f.disabledUntilTime?"audio"==a.type?a.language===g.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.Ee.Ra(1);b=this.yb().video.reduce(function(f,g){return f+g.end-g.start},0);no(this,!1,b,!0,!1);return!0}return!1};
function vo(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==ro)return f.return();1===b.severity&&a.s.K++;c=!0;if(!(a.Ea&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ua(f,3);return G(f,lm(a.j),5);case 5:d=f.h;c=!d;wa(f,2);break;case 3:xa(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&mo(a,!1);e=qo("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);I(f)}})}
function Jo(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,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(qo(b,a))}
function Ko(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(qo(d?"audiotrackchanged":"mediaqualitychanged",b))}
function uo(a){if(!a.h.error)return null;var b=a.h.error.code;if(1==b)return null;var c=a.h.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new T(2,3,3016,b,c,a.h.error.message)}function Ro(a,b,c){0<b&&(a.V()||a.qh(b));b=a.getDuration();c<b&&(a.V()||a.$a(c))}function xp(a,b){O(function(c){if(1==c.g)return G(c,Promise.resolve(),2);a.l!=ro&&a.dispatchEvent(b);I(c)})}
function rp(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(Fe(c.language)):b.add("und");return b}
function qp(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=Fe(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}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.rh;X.prototype.getManifestParserFactory=X.prototype.Yh;X.prototype.getManifest=X.prototype.Ef;X.prototype.retryStreaming=X.prototype.Zf;X.prototype.setMaxHardwareResolution=X.prototype.ej;X.prototype.addChaptersTrack=X.prototype.Ah;X.prototype.addThumbnailsTrack=X.prototype.Ch;X.prototype.addTextTrackAsync=X.prototype.Bh;X.prototype.getStats=X.prototype.getStats;
X.prototype.getBufferedInfo=X.prototype.yb;X.prototype.getSegmentAvailabilityDuration=X.prototype.je;X.prototype.getPresentationStartTimeAsDate=X.prototype.Pg;X.prototype.getPlayheadTimeAsDate=X.prototype.ci;X.prototype.setTextTrackVisibility=X.prototype.nh;X.prototype.getChapters=X.prototype.Rh;X.prototype.getChaptersTracks=X.prototype.Kg;X.prototype.isTextTrackVisible=X.prototype.Kf;X.prototype.selectVariantsByLabel=X.prototype.$i;X.prototype.selectTextLanguage=X.prototype.bg;
X.prototype.selectAudioLanguage=X.prototype.gh;X.prototype.getTextLanguages=X.prototype.gi;X.prototype.getAudioLanguages=X.prototype.Oh;X.prototype.getTextLanguagesAndRoles=X.prototype.hi;X.prototype.getAudioLanguagesAndRoles=X.prototype.Ph;X.prototype.selectVariantTrack=X.prototype.cg;X.prototype.selectTextTrack=X.prototype.hh;X.prototype.getThumbnails=X.prototype.Qg;X.prototype.getAllThumbnails=X.prototype.Nh;X.prototype.getImageTracks=X.prototype.Vh;X.prototype.getTextTracks=X.prototype.Hc;
X.prototype.getVariantTracks=X.prototype.oc;X.prototype.cancelTrickPlay=X.prototype.ld;X.prototype.trickPlay=X.prototype.Od;X.prototype.getPlaybackRate=X.prototype.fb;X.prototype.isBuffering=X.prototype.Jf;X.prototype.getKeyStatuses=X.prototype.ge;X.prototype.getActiveSessionsMetadata=X.prototype.Df;X.prototype.getExpiration=X.prototype.sd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.ti;X.prototype.goToLive=X.prototype.oi;
X.prototype.seekRange=X.prototype.Pb;X.prototype.isAudioOnly=X.prototype.si;X.prototype.isInProgress=X.prototype.qc;X.prototype.isLive=X.prototype.V;X.prototype.getAdManager=X.prototype.Ig;X.prototype.getAssetUri=X.prototype.Gc;X.prototype.getNetworkingEngine=X.prototype.zb;X.prototype.getMediaElement=X.prototype.ai;X.prototype.getManifestType=X.prototype.Ff;X.prototype.getLoadMode=X.prototype.Mg;X.prototype.resetConfiguration=X.prototype.Ui;X.prototype.getBufferFullness=X.prototype.Jg;
X.prototype.getNonDefaultConfiguration=X.prototype.Og;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.Qi;X.prototype.destroyAllPreloads=X.prototype.lf;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Eg;X.prototype.unloadAndSavePreload=X.prototype.hj;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.lj;X.prototype.unload=X.prototype.dc;
X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Gh;X.prototype.attach=X.prototype.Tb;
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return G(k,li(),3);case 3:b=k.h;case 2:var l={};if(Vc())for(var m in wi)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Vc()?!!wi[n]:Wc(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(be));
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=te(n)?!0:Vc()?ob(n)||(pc(n)?!0:!1):Wc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return G(k,ud(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=zp;for(h in g)f[h]=g[h]();return k.return(f)}})};
X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||ad("Trident/"))return!1;var a=nd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Vc()?!0:Wc("application/x-mpegurl")};X.setAdManagerFactory=function(a){lo=a};
X.registerSupportPlugin=function(a,b){zp[a]=b};X.prototype.destroy=X.prototype.destroy;var ro=0,ho=1,Uo=2,gp=3;X.LoadMode={DESTROYED:ro,NOT_LOADED:ho,MEDIA_SOURCE:Uo,SRC_EQUALS:gp};X.version="v4.10.6";var Ap=["4","10"];tb=new function(a){this.g=a;this.i=ub;this.h=vb}(new rb(Number(Ap[0]),Number(Ap[1])));var zp={},lo=null;function Bp(){this.g=[];this.i=this.l=this.j=this.h=0}function Cp(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Dp(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 ib;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=Dp.prototype;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};S("shaka.ads.ClientSideAd",Dp);Dp.prototype.release=Dp.prototype.release;
Dp.prototype.getPodIndex=Dp.prototype.getPodIndex;Dp.prototype.getTimeOffset=Dp.prototype.getTimeOffset;Dp.prototype.getMediaUrl=Dp.prototype.getMediaUrl;Dp.prototype.getAdvertiserName=Dp.prototype.getAdvertiserName;Dp.prototype.getCreativeAdId=Dp.prototype.getCreativeAdId;Dp.prototype.getAdId=Dp.prototype.getAdId;Dp.prototype.getVastMediaWidth=Dp.prototype.getVastMediaWidth;Dp.prototype.getVastMediaHeight=Dp.prototype.getVastMediaHeight;Dp.prototype.getVastMediaBitrate=Dp.prototype.getVastMediaBitrate;
Dp.prototype.getDescription=Dp.prototype.getDescription;Dp.prototype.getTitle=Dp.prototype.getTitle;Dp.prototype.getPositionInSequence=Dp.prototype.getPositionInSequence;Dp.prototype.getSequenceLength=Dp.prototype.getSequenceLength;Dp.prototype.setMuted=Dp.prototype.setMuted;Dp.prototype.resize=Dp.prototype.resize;Dp.prototype.isLinear=Dp.prototype.isLinear;Dp.prototype.isMuted=Dp.prototype.isMuted;Dp.prototype.setVolume=Dp.prototype.setVolume;Dp.prototype.getVolume=Dp.prototype.getVolume;
Dp.prototype.play=Dp.prototype.play;Dp.prototype.pause=Dp.prototype.pause;Dp.prototype.skip=Dp.prototype.skip;Dp.prototype.canSkipNow=Dp.prototype.canSkipNow;Dp.prototype.getTimeUntilSkippable=Dp.prototype.getTimeUntilSkippable;Dp.prototype.isSkippable=Dp.prototype.isSkippable;Dp.prototype.isPaused=Dp.prototype.isPaused;Dp.prototype.getRemainingTime=Dp.prototype.getRemainingTime;Dp.prototype.getMinSuggestedDuration=Dp.prototype.getMinSuggestedDuration;Dp.prototype.getDuration=Dp.prototype.getDuration;function Ep(){}S("shaka.ads.Utils",Ep);Ep.ADS_LOADED="ads-loaded";Ep.AD_STARTED="ad-started";Ep.AD_FIRST_QUARTILE="ad-first-quartile";Ep.AD_MIDPOINT="ad-midpoint";Ep.AD_THIRD_QUARTILE="ad-third-quartile";Ep.AD_COMPLETE="ad-complete";Ep.AD_STOPPED="ad-stopped";Ep.AD_SKIPPED="ad-skipped";Ep.AD_VOLUME_CHANGED="ad-volume-changed";Ep.AD_MUTED="ad-muted";Ep.AD_PAUSED="ad-paused";Ep.AD_RESUMED="ad-resumed";Ep.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Ep.CUEPOINTS_CHANGED="ad-cue-points-changed";
Ep.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Ep.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Ep.AD_CLICKED="ad-clicked";Ep.AD_PROGRESS="ad-progress";Ep.AD_BUFFERING="ad-buffering";Ep.AD_IMPRESSION="ad-impression";Ep.AD_DURATION_CHANGED="ad-duration-changed";Ep.AD_CLOSED="ad-closed";Ep.AD_LOADED="ad-loaded";Ep.ALL_ADS_COMPLETED="all-ads-completed";Ep.AD_LINEAR_CHANGED="ad-linear-changed";Ep.AD_METADATA="ad-metadata";Ep.AD_RECOVERABLE_ERROR="ad-recoverable-error";Ep.AD_ERROR="ad-error";
Ep.AD_BREAK_READY="ad-break-ready";Ep.AD_INTERACTION="ad-interaction";Ep.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Ep.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Ep.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Fp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new ib;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.10.6");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Gp(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Hp(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.ha(this.i,"play",function(){f.F=!0})}Fp.prototype.configure=function(a){this.o=a};Fp.prototype.stop=function(){this.g&&this.g.stop();this.s&&un(this.s)};
Fp.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 Hp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new U("ad-error",b));Ip(a,null);a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
function Gp(a,b){a.l(new U("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 U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Jp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Kp(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,Kp(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,Kp(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,Kp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.ha(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){Ip(a,null)}}
function Kp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
function Jp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new U(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Hp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Lp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){Lp(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){Ip(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Ip(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 Lp(a,b){var c=b.getAd();c?(a.j=new Dp(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.o.supportsMultipleMediaElements||a.l(new U("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new U("ad-started",b)),a.j.isLinear()&&(a.s.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))):ab("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
function Ip(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new U("ad-content-resume-requested"));a.l(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function Mp(a,b,c,d,e){this.g=a;this.h=b;this.j=c;this.l=d;this.i=e}r=Mp.prototype;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};r.getTimeUntilSkippable=function(){return this.h?0:Math.max(this.getRemainingTime(),0)};
r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.j()};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!0};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.l};r.getPositionInSequence=function(){return this.i};
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""};r.getCreativeAdId=function(){return""};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.g=null};S("shaka.ads.InterstitialAd",Mp);
Mp.prototype.release=Mp.prototype.release;Mp.prototype.getPodIndex=Mp.prototype.getPodIndex;Mp.prototype.getTimeOffset=Mp.prototype.getTimeOffset;Mp.prototype.getMediaUrl=Mp.prototype.getMediaUrl;Mp.prototype.getAdvertiserName=Mp.prototype.getAdvertiserName;Mp.prototype.getCreativeAdId=Mp.prototype.getCreativeAdId;Mp.prototype.getAdId=Mp.prototype.getAdId;Mp.prototype.getVastMediaWidth=Mp.prototype.getVastMediaWidth;Mp.prototype.getVastMediaHeight=Mp.prototype.getVastMediaHeight;
Mp.prototype.getVastMediaBitrate=Mp.prototype.getVastMediaBitrate;Mp.prototype.getDescription=Mp.prototype.getDescription;Mp.prototype.getTitle=Mp.prototype.getTitle;Mp.prototype.getPositionInSequence=Mp.prototype.getPositionInSequence;Mp.prototype.getSequenceLength=Mp.prototype.getSequenceLength;Mp.prototype.setMuted=Mp.prototype.setMuted;Mp.prototype.resize=Mp.prototype.resize;Mp.prototype.isLinear=Mp.prototype.isLinear;Mp.prototype.isMuted=Mp.prototype.isMuted;Mp.prototype.setVolume=Mp.prototype.setVolume;
Mp.prototype.getVolume=Mp.prototype.getVolume;Mp.prototype.play=Mp.prototype.play;Mp.prototype.pause=Mp.prototype.pause;Mp.prototype.skip=Mp.prototype.skip;Mp.prototype.canSkipNow=Mp.prototype.canSkipNow;Mp.prototype.getTimeUntilSkippable=Mp.prototype.getTimeUntilSkippable;Mp.prototype.isSkippable=Mp.prototype.isSkippable;Mp.prototype.isPaused=Mp.prototype.isPaused;Mp.prototype.getRemainingTime=Mp.prototype.getRemainingTime;Mp.prototype.getMinSuggestedDuration=Mp.prototype.getMinSuggestedDuration;
Mp.prototype.getDuration=Mp.prototype.getDuration;function Np(a,b,c,d){var e=this;this.F=a;this.B=b;this.i=c;this.C=null;this.l=!0;this.s=this.i;this.g=d;this.G=new Set;this.A=new Set;this.o=new Map;this.h=new X;Op(this);this.I=new ib;this.j=new ib;this.H=!1;this.m=null;this.I.D(this.i,"timeupdate",function(){if(!e.H){var f=null==e.m;e.m=e.i.currentTime;(f=Pp(e,f))&&Qp(e,f,1,1,Date.now())}});(new Uc(function(){var f,g,h,k,l,m,n,p,q,u;return O(function(w){switch(w.g){case 1:if(!e.A.size||e.H||null==e.m){w.u(0);break}f=!1;g=Array.from(e.A);h=e.B.Pb();
k=t(g);l=k.next();case 3:if(l.done){w.u(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.m;0<p&&10>=p&&(e.o.has(m)||e.o.set(m,e.h.preload(m.uri)));w.u(4);break}if(!e.o.has(m)){w.u(7);break}return G(w,e.o.get(m),8);case 8:(q=w.h)&&q.destroy(),e.o.delete(m);case 7:u=JSON.stringify(m),e.G.has(u)&&e.G.delete(u),e.A.delete(m),f=!0;case 4:l=k.next();w.u(3);break;case 5:f&&Rp(e),I(w)}})})).Ra(1)}
Np.prototype.configure=function(a){this.F&&this.l==a.supportsMultipleMediaElements&&((this.l=!a.supportsMultipleMediaElements)?(this.s=this.i,this.C&&(this.C.parentElement&&this.F.removeChild(this.C),this.C=null)):(this.C||(a=document.createElement(this.i.tagName),a.autoplay=!0,a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",a.style.backgroundColor="rgb(0, 0, 0)",a.setAttribute("playsinline",""),this.C=a),this.s=this.C))};
Np.prototype.stop=function(){this.j&&this.j.Qa();this.G.clear();this.A.clear();this.h.lf();this.o.clear();this.h.detach();this.H=!1;this.m=null};Np.prototype.release=function(){this.stop();this.I&&this.I.release();this.j&&this.j.release();this.F&&un(this.F);this.h.destroy()};
function Sp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.B.Mg()==gp&&a.l)return ab("Unsupported interstitial when using single media element",b),m.return();Op(a);c=!1;return G(m,Tp(a,b),2)}d=m.h;if(d.length)for(e=t(d),f=e.next();!f.done;f=e.next())(g=f.value,h=JSON.stringify(g),a.G.has(h))||(c=!0,a.G.add(h),a.A.add(g),k=!1,b.Mb&&null==a.m?k=!0:0!=g.startTime||g.ef?null!=a.m&&(l=b.startTime-a.m,0<l&&10>=l&&(k=!0)):k=!0,k&&(a.o.has(g)||a.o.set(g,a.h.preload(g.uri))));else ab("Unsupported interstitial",
b);c&&Rp(a);I(m)})}function Pp(a,b,c){c=void 0===c?0:c;var d=0,e=null;if(a.A.size&&null!=a.m){var f=a.i.ended,g=Array.from(a.A).sort(function(l,m){return m.startTime-l.startTime});g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;b?k=h.Mb:f?k=h.sc:h.Mb||h.sc||(k=a.m-Math.round(1E3*h.startTime)/1E3,k=0<k&&(1>=k||!h.ef));if(k){if(d==c){e=h;break}d++}}}return e}
function Qp(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,q,u,w,v,A,y,D;O(function(z){switch(z.g){case 1:g=Date.now();!a.s.parentElement&&a.F&&a.F.appendChild(a.s);1==d&&1==c&&(c=Array.from(a.A).filter(function(B){return b.Mb?B.Mb==b.Mb:b.sc?B.sc==b.sc:.001>Math.abs(B.startTime-b.startTime)}).length);b.once&&(f++,a.A.delete(b),Rp(a));a.H=!0;if(!a.l||1!=d){z.u(2);break}a.g(new U("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new cg;k=function(B){return O(function(C){if(1==
C.g)return"detach"!=B.state?C.u(0):qd()?G(C,new Promise(function(F){return(new Uc(F)).Y(.1)}),3):C.u(3);h.resolve();a.j.lb(a.B,"onstatechange",k);I(C)})};a.j.D(a.B,"onstatechange",k);return G(z,h,2);case 2:return a.l||(a.i.pause(),null!=b.Rc&&0!=b.Rc&&(a.i.currentTime+=b.Rc)),l=!1,m=null,n=function(){if(!a.l&&null==b.Rc)if(b.Ke&&b.endTime)a.i.currentTime!=b.endTime&&(a.i.currentTime=b.endTime);else{var B=Date.now();a.i.currentTime+=(B-e)/1E3;e=B}},p=function(){var B,C;return O(function(F){if(1==F.g)return n(),
m&&m.stop(),(B=Pp(a,b.Mb,d-f))?(a.g(new U("ad-stopped")),a.j.Qa(),Qp(a,B,c,++d,e,f),F.u(0)):a.l?G(F,a.h.detach(),4):G(F,a.h.dc(),4);a.l&&(C=b.Rc,null==C&&(C=b.Ke&&b.endTime?b.endTime-(a.m||0):(Date.now()-e)/1E3),a.g(new U("ad-content-resume-requested",(new Map).set("offset",C))));a.g(new U("ad-stopped"));a.j.Qa();a.H=!1;a.l||(n(),a.i.ended||a.i.play());I(F)})},q=function(B){return O(function(C){if(l)return C.return();l=!0;a.g(new U("ad-error",(new Map).set("originalEvent",B)));return G(C,p(),0)})},
u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return G(B,p(),2)}a.g(new U("ad-complete"));I(B)})},w=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new U("ad-skipped"));return G(B,p(),0)})},v=new Mp(a.s,b.isSkippable,w,c,d),a.l||(v.setMuted(a.i.muted),v.setVolume(a.i.volume)),a.g(new U("ad-started",(new Map).set("ad",v))),v.canSkipNow()&&a.g(new U("ad-skip-state-changed")),a.j.ha(a.h,"error",q),a.j.ha(a.h,"firstquartile",function(){n();a.g(new U("ad-first-quartile"))}),
a.j.ha(a.h,"midpoint",function(){n();a.g(new U("ad-midpoint"))}),a.j.ha(a.h,"thirdquartile",function(){n();a.g(new U("ad-third-quartile"))}),a.j.ha(a.h,"complete",u),a.j.D(a.s,"play",function(){a.g(new U("ad-resumed"))}),a.j.D(a.s,"pause",function(){a.g(new U("ad-paused"))}),a.j.D(a.s,"volumechange",function(){a.s.muted?a.g(new U("ad-muted")):a.g(new U("ad-volume-changed"))}),ua(z,4),b.Wf&&(m=(new Uc(function(){v.skip()})).Y(b.Wf)),Op(a),G(z,a.h.Tb(a.s),6);case 6:return a.o.has(b)?G(z,a.o.get(b),
10):G(z,a.h.load(b.uri),8);case 10:return A=z.h,a.o.delete(b),A?G(z,a.h.load(A),8):G(z,a.h.load(b.uri),8);case 8:y=(Date.now()-g)/1E3;a.g(new U("ads-loaded",(new Map).set("loadTime",y)));a.l&&a.i.play();wa(z,0);break;case 4:D=xa(z),q(D),I(z)}})}
function Tp(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K,J,E,L,M,N,Q,R;return O(function(P){switch(P.g){case 1:c=[];if(!b)return P.return(c);d=b.values.find(function(aa){return"X-ASSET-URI"==aa.key});e=b.values.find(function(aa){return"X-ASSET-LIST"==aa.key});if(!d&&!e)return P.return(c);f=b.values.find(function(aa){return"X-RESTRICT"==aa.key});h=g=!0;f&&f.data&&(k=f.data,g=!k.includes("SKIP"),h=!k.includes("JUMP"));l=null;if(m=b.values.find(function(aa){return"X-RESUME-OFFSET"==aa.key}))n=
m.data,l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(q=b.values.find(function(aa){return"X-PLAYOUT-LIMIT"==aa.key}))u=q.data,p=parseFloat(u),isNaN(p)&&(p=null);A=v=w=!1;if(y=b.values.find(function(aa){return"CUE"==aa.key}))D=y.data,w=D.includes("ONCE"),v=D.includes("PRE"),A=D.includes("POST");z=!0;(B=b.values.find(function(aa){return"X-TIMELINE-OCCUPIES"==aa.key}))?(C=B.data,z=C.includes("RANGE")):!m&&a.B.V()&&(z=!0);if(d){F=d.data;if(!F)return P.return(c);c.push({startTime:b.startTime,endTime:b.endTime,
uri:F,isSkippable:g,ef:h,Rc:l,Wf:p,once:w,Mb:v,sc:A,Ke:z});P.u(2);break}if(!e){P.u(2);break}H=e.data;if(!H)return P.return(c);K=ug([H],ag());J=a.B.zb().request(7,K);ua(P,4);return G(P,J.promise,6);case 6:E=P.h;L=xd(E.data);M=JSON.parse(L);N=t(M.ASSETS);for(Q=N.next();!Q.done;Q=N.next())R=Q.value,R.URI&&c.push({startTime:b.startTime,endTime:b.endTime,uri:R.URI,isSkippable:g,ef:h,Rc:l,Wf:p,once:w,Mb:v,sc:A,Ke:z});wa(P,2);break;case 4:xa(P);case 2:return P.return(c)}})}
function Rp(a){for(var b=[],c={},d=t(a.A),e=d.next();!e.done;c={vb:c.vb},e=d.next())e=e.value,c.vb={start:e.startTime,end:null},e.Mb?(c.vb.start=0,c.vb.end=null):e.sc?(c.vb.start=-1,c.vb.end=null):e.Ke&&(c.vb.end=e.endTime),b.find(function(f){return function(g){return f.vb.start==g.start&&f.vb.end==g.end}}(c))||b.push(c.vb);a.g(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}function Op(a){a.h.configure(a.B.Og());var b=a.h.zb();b.Ag();b.Bg();tg(a.B.zb(),b)};function Up(a){this.h=a||"";this.g=0}function Vp(a){Wp(a,/[ \t]+/gm)}function Wp(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 Xp(a){return a.g==a.h.length?null:(a=Wp(a,/[^ \t\n]*/gm))?a[0]:null};function Yp(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Wp(new Up(a),Zp),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}r=Yp.prototype;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};S("shaka.ads.MediaTailorAd",Yp);Yp.prototype.release=Yp.prototype.release;Yp.prototype.getPodIndex=Yp.prototype.getPodIndex;Yp.prototype.getTimeOffset=Yp.prototype.getTimeOffset;
Yp.prototype.getMediaUrl=Yp.prototype.getMediaUrl;Yp.prototype.getAdvertiserName=Yp.prototype.getAdvertiserName;Yp.prototype.getCreativeAdId=Yp.prototype.getCreativeAdId;Yp.prototype.getAdId=Yp.prototype.getAdId;Yp.prototype.getVastMediaWidth=Yp.prototype.getVastMediaWidth;Yp.prototype.getVastMediaHeight=Yp.prototype.getVastMediaHeight;Yp.prototype.getVastMediaBitrate=Yp.prototype.getVastMediaBitrate;Yp.prototype.getDescription=Yp.prototype.getDescription;Yp.prototype.getTitle=Yp.prototype.getTitle;
Yp.prototype.getPositionInSequence=Yp.prototype.getPositionInSequence;Yp.prototype.getSequenceLength=Yp.prototype.getSequenceLength;Yp.prototype.setMuted=Yp.prototype.setMuted;Yp.prototype.resize=Yp.prototype.resize;Yp.prototype.isLinear=Yp.prototype.isLinear;Yp.prototype.isMuted=Yp.prototype.isMuted;Yp.prototype.setVolume=Yp.prototype.setVolume;Yp.prototype.getVolume=Yp.prototype.getVolume;Yp.prototype.play=Yp.prototype.play;Yp.prototype.pause=Yp.prototype.pause;Yp.prototype.skip=Yp.prototype.skip;
Yp.prototype.canSkipNow=Yp.prototype.canSkipNow;Yp.prototype.getTimeUntilSkippable=Yp.prototype.getTimeUntilSkippable;Yp.prototype.isSkippable=Yp.prototype.isSkippable;Yp.prototype.isPaused=Yp.prototype.isPaused;Yp.prototype.getRemainingTime=Yp.prototype.getRemainingTime;Yp.prototype.getMinSuggestedDuration=Yp.prototype.getMinSuggestedDuration;Yp.prototype.getDuration=Yp.prototype.getDuration;var Zp=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function $p(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.U=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.R=!0;this.H="";this.o=new ib}$p.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.lb(b.target,b.type,b.listener);aq(this);this.m=[];this.s=[];this.G="";this.R=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
$p.prototype.release=function(){this.stop();this.o&&this.o.release()};$p.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(bq(this,this.G,this.R),this.R=!1)};$p.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 cq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;O(function(u){if(1==u.g)return d=ug([b],ag()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Bd(e)),f=a.K.request(7,d),ua(u,2),G(u,f.promise,4);if(2!=u.g){g=u.h;h=xd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new vc(b),m=new vc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.U,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),q=new vc(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
return wa(u,0)}xa(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;I(u)})}
function bq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A;O(function(y){if(1==y.g)return d=ug([b],ag()),e=a.K.request(7,d),ua(y,2),G(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=xd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t(n.nonLinearAdsList),q=p.next();!q.done;q=p.next())for(u=q.value,w=t(u.nonLinearAdList),v=w.next();!v.done;v=w.next())A=v.value,dq(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),aq(a),a.j=[];c&&(a.I||0<g.length)&&eq(a);return wa(y,0)}xa(y);I(y)})}
function dq(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=fq(b);if(d=a.F.get(c))return m.return();e=ug([b.staticResource],ag());f=a.K.request(7,e);ua(m,2);a.F.set(c,[]);return G(m,f.promise,4)}if(2!=m.g)return g=m.h,h=xd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),wa(m,0);xa(m);a.F.delete(c);I(m)})}
function fq(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function eq(a){gq(a);a.I||(hq(a),a.o.D(a.h,"seeked",function(){hq(a)}),a.o.D(a.h,"ended",function(){aq(a)}));a.o.D(a.h,"timeupdate",function(){gq(a)})}
function hq(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.N.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
function gq(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),iq(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),iq(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),iq(a,"thirdQuartile"));d=a.g.getRemainingTime();
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&iq(a,"skipStateChanged");0<e&&(0>=d||d>e)&&aq(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.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}aq(a);a.L=e;a.g=new Yp(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&iq(a,"breakStart");jq(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(fq(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){aq(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 Yp(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&iq(a,"breakStart");jq(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
function aq(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?iq(a,"skip"):iq(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.lb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&iq(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
function jq(a){var b=!1;a.h.paused?b=!0:(iq(a,"impression"),iq(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&iq(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||iq(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(iq(a,"impression"),iq(a,"start"),b=!1):iq(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){iq(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 iq(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=ug([d],ag()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function kq(a,b){this.g=a;this.i=null;this.h=b}r=kq.prototype;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};S("shaka.ads.ServerSideAd",kq);kq.prototype.release=kq.prototype.release;kq.prototype.getPodIndex=kq.prototype.getPodIndex;
kq.prototype.getTimeOffset=kq.prototype.getTimeOffset;kq.prototype.getMediaUrl=kq.prototype.getMediaUrl;kq.prototype.getAdvertiserName=kq.prototype.getAdvertiserName;kq.prototype.getCreativeAdId=kq.prototype.getCreativeAdId;kq.prototype.getAdId=kq.prototype.getAdId;kq.prototype.getVastMediaWidth=kq.prototype.getVastMediaWidth;kq.prototype.getVastMediaHeight=kq.prototype.getVastMediaHeight;kq.prototype.getVastMediaBitrate=kq.prototype.getVastMediaBitrate;kq.prototype.getDescription=kq.prototype.getDescription;
kq.prototype.getTitle=kq.prototype.getTitle;kq.prototype.getPositionInSequence=kq.prototype.getPositionInSequence;kq.prototype.getSequenceLength=kq.prototype.getSequenceLength;kq.prototype.setMuted=kq.prototype.setMuted;kq.prototype.resize=kq.prototype.resize;kq.prototype.isLinear=kq.prototype.isLinear;kq.prototype.isMuted=kq.prototype.isMuted;kq.prototype.setVolume=kq.prototype.setVolume;kq.prototype.getVolume=kq.prototype.getVolume;kq.prototype.play=kq.prototype.play;kq.prototype.pause=kq.prototype.pause;
kq.prototype.skip=kq.prototype.skip;kq.prototype.canSkipNow=kq.prototype.canSkipNow;kq.prototype.getTimeUntilSkippable=kq.prototype.getTimeUntilSkippable;kq.prototype.isSkippable=kq.prototype.isSkippable;kq.prototype.isPaused=kq.prototype.isPaused;kq.prototype.getRemainingTime=kq.prototype.getRemainingTime;kq.prototype.getMinSuggestedDuration=kq.prototype.getMinSuggestedDuration;kq.prototype.getDuration=kq.prototype.getDuration;function lq(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new ib;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){mq(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 kq(f,e.l);e.A&&(e.m.i=e.A);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("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 U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=lq.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 mq(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.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(){mg.call(this);this.g=this.h=this.i=this.j=null;this.m=new Bp;this.o=navigator.language;this.l=null}pa(Y,mg);r=Y.prototype;r.setLocale=function(a){this.o=a};r.configure=function(a){this.l=a;this.j&&this.j.configure(this.l);this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initInterstitial=function(a,b,c){var d=this;this.j&&this.j.release();this.j=new Np(a,b,c,function(e){return nq(d,e)});this.j.configure(this.l)};
r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new Fp(a,b,this.o,c,function(e){return nq(d,e)});this.i.configure(this.l)};r.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);mg.prototype.release.call(this)};
r.onAssetUnload=function(){this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new Bp};r.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;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.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new $p(a,b,c,function(e){return nq(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new cg,cq(d,a,b),d.H=c||"",d.U=Date.now()/1E3,a=d.l);return a};
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("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 T(2,10,10002);this.g&&this.g.release();this.g=new lq(a,b,this.o,function(d){return nq(c,d)});this.g.configure(this.l)};
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.10.6";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
(c.G=!0),c.j=new cg,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.10.6";this.g.g.replaceAdTagParameters(a)};
r.getServerSideCuePoints=function(){sb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:Cp(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};r.onInterstitialMetadata=function(a,b,c){this.j||this.initInterstitial(null,a,b);this.j&&Sp(this.j,c)};
function nq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Y);Y.prototype.onInterstitialMetadata=Y.prototype.onInterstitialMetadata;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";lo=function(){return new Y};function oq(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof U){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Oi(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=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
function pq(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=qq(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 qq(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
var rq="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),sq="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),tq=["loop","playbackRate"],uq=["pause","play"],vq={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1},wq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},xq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},yq=[["getConfiguration","configure"]],zq=[["isTextTrackVisible","setTextTrackVisibility"]],Aq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
Bq=["attach","attachCanvas","detach","load","unload"];function Cq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Uc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Dq(h)};this.C=function(k,l){k=pq(l);switch(k.type){case "event":var m=k.targetName,n=kg(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.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Eq.add(this)}r=Cq.prototype;r.destroy=function(){Eq.delete(this);Fq(this);Gq&&Hq(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.gb=function(){return this.h};r.Xf=function(){return this.I};
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.xc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Eq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new cg;d.s=!0;Iq(d,e)}},function(b){for(var c=t(Eq),d=c.next();!d.done;d=c.next())d=d.value,Jq="available"==b,d.l.xc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Jq&&this.l.Y(Kq);(a=Gq)&&
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new cg,this.s=!0,Iq(this,a)):Gq=null}else window.__onGCastApiAvailable!==Lq&&(Mq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Lq)};r.dg=function(a){this.o=a;this.h&&Nq(this,{type:"appData",appData:this.o})};
r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!Jq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new cg;chrome.cast.requestSession(function(c){return Iq(a,c)},function(c){return Oq(a,c)});return G(b,a.j,0)})};function Pq(a){a.h&&chrome.cast.requestSession(function(b){return Iq(a,b)},function(b){return Oq(a,b)})}r.Fc=function(){if(this.h){Fq(this);if(Gq){Hq(this);try{Gq.stop(function(){},function(){})}catch(a){}Gq=null}Dq(this)}};
r.get=function(a,b){var c=this;if("video"==a){if(uq.includes(b))return function(){return c.eh.apply(c,[a,b].concat(x(Ga.apply(0,arguments))))}}else if("player"==a){if(xq[b]&&!this.get("player","isLive")())return function(){};if(Aq.includes(b))return function(){return c.eh.apply(c,[a,b].concat(x(Ga.apply(0,arguments))))};if(Bq.includes(b))return function(){return c.Ri.apply(c,[a,b].concat(x(Ga.apply(0,arguments))))};if(vq[b]||wq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
r.set=function(a,b,c){this.g[a][b]=c;Nq(this,{type:"set",targetName:a,property:b,value:c})};function Iq(a,b){var c=a.N();Gq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Dq(a);Nq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Oq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
r.eh=function(a,b){Nq(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};r.Ri=function(a,b){var c=Ga.apply(2,arguments),d=new cg,e=this.H.toString();this.H++;this.i[e]=d;try{Nq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Hq(a){var b=Gq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
function Dq(a){var b=Gq?"connected"==Gq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Fq(a)}a.h=b;a.I=b?Gq.receiver.friendlyName:"";a.l.xc()}function Fq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function Nq(a,b){b=oq(b);var c=Gq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.Fc(),b;}}var Kq=.02,Jq=!1,Gq=null,Mq=null,Eq=new Set;
function Lq(a){Mq?window.__onGCastApiAvailable=Mq:delete window.__onGCastApiAvailable;Mq=null;if(a)for(var b=t(Eq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Qq(a,b,c,d){d=void 0===d?!1:d;mg.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Cq(c,function(){return Rq(e)},function(){return Sq(e)},function(f,g){return Tq(e,f,g)},function(){return Uq(e)},function(){return Vq(e)},d);Wq(this)}pa(Qq,mg);r=Qq.prototype;
r.destroy=function(a){a&&this.g.Fc();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.s=this.l=this.i=null;mg.prototype.release.call(this);return Promise.all(a)};r.mi=function(){return this.l};r.bi=function(){return this.s};r.Hh=function(){return this.g.m&&Jq};r.gb=function(){return this.g.gb()};r.Xf=function(){return this.g.Xf()};
r.cast=function(){var a=this;return O(function(b){return 1==b.g?G(b,a.g.cast(),2):a.h?G(b,a.h.dc(),0):b.return()})};r.dg=function(a){this.g.dg(a)};r.gj=function(){Pq(this.g)};r.Fc=function(){this.g.Fc()};
r.Ih=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.Fc();return G(d,c.g.destroy(),2)}c.g=null;c.g=new Cq(a,function(){return Rq(c)},function(){return Sq(c)},function(e,f){return Tq(c,e,f)},function(){return Uq(c)},function(){return Vq(c)},b);c.g.init();I(d)})};
function Wq(a){a.g.init();a.m=new ib;for(var b=t(rq),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.gb()||(f=kg(f),a.j.dispatchEvent(f))});for(var d in lg)a.m.D(a.h,lg[d],function(f){a.g.gb()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.$c=e,Object.defineProperty(a.l,b.$c,{configurable:!1,enumerable:!0,get:function(f){return function(){return Xq(a,f.$c)}}(b),set:function(f){return function(g){var h=f.$c;a.g.gb()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={$c:b.$c};a.s={};Yq(a,
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Zq(a,f)}})});$q(a);a.j=new mg;a.j.Ge=a.l;a.o=new mg;a.o.Ge=a.s}function $q(a){var b=new Map;Yq(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 Yq(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 Vq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Gc(),startTime:null};a.i.pause();for(var c=t(tq),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(yq);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(zq);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 Rq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
function Sq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
function Uq(a){for(var b=t(yq),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(tq);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(tq),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(zq);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.nh(h);g&&a.h.bg(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new U("error",l);a.h.dispatchEvent(l)})}
function Xq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.gb()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.gb()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
function Zq(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.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.zb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.Ig()};
if("setVideoContainer"==b)return function(c){return a.h.rh(c)};if(a.g.gb()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()}}return a.g.gb()&&0==Object.keys(a.g.g.video).length&&(vq[b]||wq[b])||!a.g.gb()?a.h[b].bind(a.h):a.g.get("player",b)}
function Tq(a,b,c){a.g.gb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",Qq);Qq.prototype.changeReceiverId=Qq.prototype.Ih;Qq.prototype.forceDisconnect=Qq.prototype.Fc;Qq.prototype.suggestDisconnect=Qq.prototype.gj;Qq.prototype.setAppData=Qq.prototype.dg;Qq.prototype.cast=Qq.prototype.cast;Qq.prototype.receiverName=Qq.prototype.Xf;Qq.prototype.isCasting=Qq.prototype.gb;Qq.prototype.canCast=Qq.prototype.Hh;Qq.prototype.getPlayer=Qq.prototype.bi;
Qq.prototype.getVideo=Qq.prototype.mi;Qq.prototype.destroy=Qq.prototype.destroy;function ar(a,b,c,d){mg.call(this);var e=this;this.g=a;this.h=b;this.j=new ib;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.s=this.l=null;this.C=new Uc(function(){br(e)});cr(this)}pa(ar,mg);r=ar.prototype;r.isConnected=function(){return this.G};r.ui=function(){return this.o};r.cj=function(a){this.i=a};r.Kh=function(){this.i=null};
r.dj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.bj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.aj=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 O(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.s=null,mg.prototype.release.call(a),G(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();I(d)})};
function cr(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return dr(a)};b.onSenderDisconnected=function(){return dr(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&er(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);er(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return fr(a,
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return gr(a,e)};b.start();b=t(rq);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return hr(a,"video",e)});for(var d in lg)a.j.D(a.h,lg[d],function(e){return hr(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;ir(a)});a.j.D(a.g,"playing",function(){a.o=!1;ir(a)});a.j.D(a.g,"pause",function(){ir(a)});a.j.D(a.h,"unloading",function(){a.o=!0;ir(a)});
a.j.D(a.g,"ended",function(){(new Uc(function(){a.g&&a.g.ended&&(a.o=!0,ir(a))})).Y(jr)})}function dr(a){a.m=0;a.A=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ir(a)}function ir(a){var b;O(function(c){if(1==c.g)return G(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);kr(a)||lr(a);I(c)})}
function mr(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(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,ua(q,5),G(q,a.h.load(b.manifest,b.startTime),7)):G(q,Promise.resolve(),3);case 7:wa(q,3);break;case 5:return g=xa(q),h=(new Map).set("detail",g),k=new U("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(),lr(a));I(q)}})}function hr(a,b,c){a.h&&(br(a),er(a,{type:"event",targetName:b,event:c},a.l))}
function br(a){a.C.Y(nr);for(var b={video:{},player:{}},c=t(sq),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in xq)0==a.m%xq[e]&&(b.player[e]=a.h[e]());for(var f in vq)0==a.m%vq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;er(a,{type:"update",update:b},a.l);for(var g in wq)0==a.m%wq[g]&&(b={player:{}},b.player[g]=a.h[g](),er(a,{type:"update",update:b},a.l));a.B&&(a.m+=
1);kr(a)}function kr(a){return a.A&&(a.g.duration||a.h.V())?(or(a),a.A=!1,!0):!1}function or(a,b){var c={contentId:a.h.Gc(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);lr(a,void 0===b?0:b,c)}
function gr(a,b){var c=pq(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;mr(a,c.initState,c.appData);br(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 pr(a,g,f,null)},function(h){return pr(a,g,f,h)})}}
function fr(a,b){var c=pq(b.data);switch(c.type){case "PLAY":a.g.play();lr(a);break;case "PAUSE":a.g.pause();lr(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(),lr(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),lr(a));break;case "STOP":a.h.dc().then(function(){a.h&&lr(a)});break;case "GET_STATUS":or(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||lr(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&&or(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");er(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:er(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
function pr(a,b,c,d){a.h&&er(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function er(a,b,c,d){a.G&&(a=oq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function lr(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?qr:a.h.Jf()?rr:a.g.paused?sr:tr,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);er(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
S("shaka.cast.CastReceiver",ar);ar.prototype.destroy=ar.prototype.destroy;ar.prototype.setContentArtist=ar.prototype.aj;ar.prototype.setContentImage=ar.prototype.bj;ar.prototype.setContentTitle=ar.prototype.dj;ar.prototype.clearContentMetadata=ar.prototype.Kh;ar.prototype.setContentMetadata=ar.prototype.cj;ar.prototype.isIdle=ar.prototype.ui;ar.prototype.isConnected=ar.prototype.isConnected;var nr=.5,jr=5,qr="IDLE",tr="PLAYING",rr="BUFFERING",sr="PAUSED";function ur(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(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=vr(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=wr(d,e),a.nestedCues.push(p);else{for(;q<=u;q++)if(w=p[q]){var v=w.l,A=w.i,y=w.j,D=w.h;if(v!=h||A!=k||y!=l||D!=m)n.payload&&a.nestedCues.push(n),n=vr(d,e,v,A,y,D),h=v,k=A,l=y,m=D;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=wr(d,e),a.nestedCues.push(n));n=vr(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
function vr(a,b,c,d,e,f){a=new Tb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function wr(a,b){a=new Tb(a,b,"");a.lineBreak=!0;return a}function xr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function yr(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";zr(this)}function Ar(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Tb(b,c,"");e.lineInterpretation=1;var f=Br.get(a.g);f&&(e.line=f);(b=ur(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=Br.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function zr(a){Cr(a,0,15);a.g=1}
function Dr(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Er:d=Fr.has(c)?Fr.get(c):String.fromCharCode(c);break;case Gr:d=Hr.get(c);break;case Ir:a.i[a.g].pop();d=Jr.get(c);break;case Kr:a.i[a.g].pop(),d=Lr.get(c)}d&&a.i[a.g].push(new xr(d,a.m,a.j,a.o,a.l))}}function Mr(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 Cr(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
var Er=0,Gr=1,Ir=2,Kr=3,Fr=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"]]),Hr=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"]]),Jr=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"]]),Lr=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"]]),Br=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 Nr(a,b){this.h=Or;this.o=new yr(a,b);this.i=new yr(a,b);this.g=this.j=new yr(a,b);this.l=0;this.m=null}function Pr(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Qr&&a.h!==Rr&&(e=Ar(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Cr(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Cr(c,0,15),d.g=15);a.h=Qr;d.h=b;return e}function Sr(a){a.h=Tr;a.g=a.j;a.g.h=0}function Ur(a){bb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Rr}
var Or=0,Tr=1,Qr=3,Rr=4,Vr="black green blue cyan red yellow magenta black".split(" "),Wr="white green blue cyan red yellow magenta white_italics".split(" ");function Xr(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=Yr;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";Zr(this)}function Zr(a){a.i=[];for(var b=0;16>b;b++)a.i.push($r())}function $r(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function as(a,b){bs(a)&&(a.i[a.h][a.g]=new xr(b,a.C,a.A,a.s,a.B),a.g++)}function bs(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}Xr.prototype.isVisible=function(){return this.l};
function cs(a,b,c){var d=new Tb(a.j,b,"");d.textAlign=a.F===ds?"left":a.F===es?"right":Vb;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.N;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?Mb:2;switch(a.G){case fs:e.regionAnchorX=0;e.regionAnchorY=0;break;case gs:e.regionAnchorX=50;e.regionAnchorY=0;break;case hs:e.regionAnchorX=100;e.regionAnchorY=0;break;case is:e.regionAnchorX=0;e.regionAnchorY=50;break;case js:e.regionAnchorX=
50;e.regionAnchorY=50;break;case ks:e.regionAnchorX=100;e.regionAnchorY=50;break;case ls:e.regionAnchorX=0;e.regionAnchorY=100;break;case ms:e.regionAnchorX=50;e.regionAnchorY=100;break;case ns:e.regionAnchorX=100,e.regionAnchorY=100}if(c=ur(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var ds=0,es=1,Yr=2,fs=0,gs=1,hs=2,is=3,js=4,ks=5,ls=6,ms=7,ns=8;function os(){this.i=[];this.h=null;this.g=0}function ps(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 qs(a.h)),a.h=null,a.g=0))}function qs(a){this.g=0;this.h=a}qs.prototype.oa=function(){return this.g<this.h.length};qs.prototype.ua=function(){return this.g};function rs(a){if(!a.oa())throw new T(2,2,3E3);return a.h[a.g++]}qs.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function ss(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
function ts(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=rs(b).value;b=null;c=t(us(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=cs(e,d,a.i)),Zr(e);return b}if(137===c)for(b=rs(b).value,b=t(us(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=rs(b).value;b=null;c=t(us(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=cs(e,d,a.i)),e.l=!1;return b}if(139===c){c=rs(b).value;
b=null;c=t(us(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=cs(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=rs(b).value,vs(a,b,d);if(143===c)return d=vs(a,255,d),ws(a),d;if(144===c)b.skip(1),d=rs(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=rs(b).value,c=rs(b).value,b.skip(1),a.g&&(b=xs((c&48)>>4,(c&12)>>2,c&3),a.g.B=xs((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=rs(b).value,b=rs(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=rs(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];if(!e){var f=new Xr(c,a.i);f.j=d;a.h[c]=f}d=rs(b).value;f=rs(b).value;var g=rs(b).value,h=rs(b).value,k=rs(b).value;b=rs(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
function us(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function vs(a,b,c){var d=null;b=t(us(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=cs(f,c,a.i));a.h[e]=null}return d}function ws(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function xs(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return ys[a<<2|b<<1|c]}
var zs=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"]]),ys="black blue green cyan red magenta yellow white".split(" ");function As(){this.h=[];this.g=[];this.i=new os;this.l=0;this.m=new Map([["CC1",new Nr(0,0)],["CC2",new Nr(0,1)],["CC3",new Nr(1,0)],["CC4",new Nr(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Bs(this)}As.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Bs(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())ws(b.value)};
function Bs(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Or,c.g=c.j,c.m=null,zr(c.i),zr(c.j),zr(c.o);a.B=!0}
As.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 Jg(a,0);if(!(8>a.getLength())&&181===a.T()&&49===a.ka()&&1195456820===a.P()&&3===a.T()&&(c=a.T(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.T(),f=(e&4)>>2,g=a.T(),h=a.T();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,cb:g,Db: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})))}};
As.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=Cs(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())ps(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Ds(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
function Cs(a,b){var c=b.type;if(16===(b.cb&112)){var d=b.cb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.cb&&255===b.Db||!b.cb&&!b.Db||!Es(b.cb)||!Es(b.Db))return 45<=++a.l&&Bs(a),null;a.l=0;b.cb&=127;b.Db&=127;var e=b.cb;if(1<=e&&15>=e||!b.cb&&!b.Db)return null;e=null;if(16===(b.cb&112))a:{a.A.add(d),d=b.cb;a=b.Db;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];var f=(a&30)>>1;d=
"white";e=!1;7>f?d=Wr[f]:7===f&&(e=!0);a=1===(a&1);c.h!==Rr&&(f=c.g,c.h===Qr&&b!==f.g&&(c=1+b-f.h,Mr(f,c,1+f.g-f.h,f.h),Cr(f,0,c-1),Cr(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Dr(c.g,Er,32),d=!1,b=Wr[(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=Vr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Dr(c.g,
Gr,a);else if(18===(d&246)&&32===(a&224))Dr(c.g,d&1?Kr:Ir,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Db){case 32:Sr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Pr(c,2,a);break;case 38:d=Pr(c,3,a);break;case 39:d=Pr(c,4,a);break;case 40:Dr(c.g,Er,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:zr(c.o);Ur(c);break;case 43:Ur(c);break;case 44:b=c.i;d=null;c.h!==Rr&&(d=Ar(b,c.l,a));Cr(b,0,15);break;case 45:b=c.g;c.h!==Qr?d=null:(d=Ar(b,c.l,a),e=b.g-b.h+1,Mr(b,
e-1,e,b.h),Cr(b,0,e-1),Cr(b,b.g,15-b.g),c.l=a);break;case 46:Cr(c.j,0,15);break;case 47:b=null,c.h!==Rr&&(b=Ar(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Sr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.Db,Dr(c.g,Er,b.cb),Dr(c.g,Er,a);return e}
function Ds(a,b){var c=[];try{for(;b.oa();){var d=rs(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=rs(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new ss(e));for(var g=a.j.get(e),h=b.ua();b.ua()-h<f;){e=b;var k=rs(e),l=k.value,m=k.pts;if(16===l){var n=rs(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!bs(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.m-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=cs(q,p,g.i));if(q.h+1>=q.o){p=q;for(var u=
0,w=1;16>w;w++,u++)p.i[u]=p.i[w];for(w=0;1>w;w++,u++)p.i[u]=$r()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=cs(q,p,g.i));q.i[q.h]=$r();q.g=0;break;case 12:q.isVisible()&&(e=cs(q,p,g.i)),Zr(q),p=q,p.h=0,p.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=ts(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?as(g.g,
"\u266a"):as(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&as(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(zs.has(e)){var A=zs.get(e);as(g.g,A)}else as(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?as(g.g,"_"):as(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(y){if(y instanceof T&&3E3===y.code)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}function Es(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
As.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",As);Kb=function(){return new As};function Fs(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(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 Gs(){this.j=new Map;this.i=this.h=0;this.g=Hs}
Gs.prototype.init=function(a){function b(f){f=f.name;f in Is&&(c.g=Is[f])}var c=this,d=[],e=[];(new Mg).box("moov",Rg).box("mvex",Rg).S("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.P();g=g.P();c.h=f;c.i=g}).box("trak",Rg).S("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.P();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.ka();g.ka();g.ka();g.ka();d.push(h)}).box("mdia",Rg).S("mdhd",
function(f){f=Zi(f.reader,f.version);e.push(f.timescale)}).box("minf",Rg).box("stbl",Rg).S("stsd",Vg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("encv",Wg).box("sinf",Rg).box("frma",function(f){f=bj(f.reader).Na;f in Is&&(c.g=Is[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==Hs&&ab("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,
g){c.j.set(f,e[g])})};
Gs.prototype.parse=function(a){var b=this;if(this.g==Hs)return[];var c=[],d=0,e=[];(new Mg).box("moof",function(f){d=f.start;e=[];Rg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,pd:b.h,fe:b.i,ah:[],timescale:9E4});Rg(f)}).S("trun",function(f){var g=e[e.length-1];f=$i(f.reader,f.version,f.flags);g.ah.push(f)}).S("tfhd",function(f){var g=e[e.length-1];f=Xi(f.reader,f.flags);g.pd=f.pd||b.h;g.fe=f.fe||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).S("tfdt",function(f){var g=e[e.length-
1];f=Yi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ua(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw ab("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Js(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.pd,l.fe,g,l.ah,c)}}).parse(a,!1);return c};
function Js(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.fh});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Mh);b.oa();){g=b.P();var p=b.T(),q=null;q=!1;h=1;switch(a.g){case Ks:q=p&31;q=6==q;break;case Ls:h=2;b.skip(1);q=p>>1&63;q=39==q||40==q;break;case Ms: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].He||0),p=(c+p)/d,h=t(Fs(b.rb(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].$f||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Gs);var Hs=0,Ks=1,Ls=2,Ms=3,Is={avc1:Ks,avc3:Ks,hev1:Ls,hvc1:Ls,dvav:Ks,dva1:Ks,dvh1:Ls,dvhe:Ls,vvc1:Ms,vvi1:Ms};Jb["video/mp4"]=function(){return new Gs};function Ns(){this.g=null}Ns.prototype.init=function(){};Ns.prototype.parse=function(a){this.g?this.g.clearData():this.g=new pj;var b=[];a=Cb(a);if(!Dj(a))return b;a=this.g.parse(a);var c=a.rd(),d=a.ke();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(Fs(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
S("shaka.cea.TsCeaParser",Ns);Jb["video/mp2t"]=function(){return new Ns};function Os(a,b,c){var d=Ps(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 T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Sc});if(1<f.length)throw new T(2,4,4050);f.length&&(g=Qs(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Sc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Sc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
l.Sc});f.length&&(a=Rs(e,k,f,c,h),0==a.length&&(a=[Rd("",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(Rd(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{Dg:h,kk:e,drmInfos:a,bf:g,Hg:!0}}
function Ss(a,b,c,d){var e=Os(a,c,d);if(b.Hg){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.Hg=!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 T(2,4,4008);return e.Dg||b.Dg}
function Ts(a){var b=0,c=Gb(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=Cb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Us(a){a=t(kh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return ih(c)}return""}
function Vs(a){var b=mh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=ih(b)))return b;a=mh(a.node,"urn:microsoft:playready","pro");if(!a||!ih(a))return"";a=ih(a);a=Id(a);a=Ts(a).filter(function(c){return c.type===Ws})[0];if(!a)return"";a=yd(a.value,!0);return(a=bh(a,"WRMHEADER"))?Us(a):""}
function Rs(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.Sc];if(h){var k;if((k=mh(g.node,"urn:microsoft:playready","pro"))&&ih(k)){k=ih(k);k=Id(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:$g(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Sc)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:$g(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Rd(h,b,g.init||a||k||l);if(h=Xs.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Ps(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Ys(c.value))&&b.push(c);return b}
function Ys(a){var b=a.attributes.schemeIdUri,c=ph(a,"urn:mpeg:cenc:2013","default_KID"),d=nh(a,"urn:mpeg:cenc:2013","pssh").map(jh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Id(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Sc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
function Qs(a){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=mh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=mh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Ed(b.attributes.keyUriTemplate);
if(!a||!b)throw new T(2,4,4051);a=Ld(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{Ai:b,iv:a}}
var Ws=1,Xs=(new Map).set("com.widevine.alpha",function(a){var b=mh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ih(b))?b:(a=mh(a.node,"urn:microsoft","laurl"))?Ed(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Vs).set("com.microsoft.playready.recommendation",Vs).set("com.microsoft.playready.software",Vs).set("com.microsoft.playready.hardware",Vs).set("org.w3.clearkey",function(a){var b=mh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ih(b))?b:(a=mh(a.node,"http://dashif.org/guidelines/clearKey",
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=ih(a))?a:""});function Zs(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,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[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&ab("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 $s(a,b){var c=at(a,b,"timescale"),d=1;c&&(d=vh(c)||1);c=at(a,b,"duration");(c=vh(c||""))&&(c/=d);var e=at(a,b,"startNumber"),f=Number(at(a,b,"presentationTimeOffset"))||0,g=wh(e||"");if(null==e||null==g)g=1;e=null;if(b=bt(a,b,"SegmentTimeline")){b=hh(b,"S");e=d;a=a.ja.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],q=oh(n,"t",wh),u=oh(n,"d",wh),w=oh(n,"r",uh);n=oh(n,"k",uh)||0;null!=q&&(q-=f);if(u){q=null!=q?q:l;w=w||0;if(0>w)if(p){p=oh(p,"t",wh);if(null==
p)break;else if(q>=p)break;w=Math.ceil((p-q)/u)-1}else{if(Infinity==a)break;else if(q/e>=a)break;w=Math.ceil((a*e-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/e);for(p=0;p<=w;++p)l=q+u,k.push({start:q/e,end:l/e,og:q,Bb:n,Zi:k.length+h}),q=l}}e=k}return{timescale:d,La:c,Nd:g,Ob:f/d||0,ng:f,timeline:e}}function ct(a,b){return[b(a.J),b(a.la),b(a.va)].filter(Ce)}function at(a,b,c){b=ct(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 bt(a,b,c){b=ct(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=lh(d.value,c));d=b.next());return a}
function dt(a,b,c,d,e,f){for(var g=ph(a,"http://www.w3.org/1999/xlink","href"),h=ph(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=dh("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return eg(new T(2,4,4028));if("onLoad"!=h)return eg(new T(2,4,4027));var p=Qd([d],[g]);return e.request(0,ug(p,b)).Aa(function(q){q=ah(q.data,a.tagName);if(!q)return eg(new T(2,4,4001,g));for(a.children=
[];q.children.length;){var u=q.children.shift();u.tagName&&(u.parent=a);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 et(a,b,c,p[0],e,f+1)})}
function et(a,b,c,d,e,f){f=void 0===f?0:f;if(ph(a,"http://www.w3.org/1999/xlink","href")){var g=dt(a,b,c,d,e,f);c&&(g=g.Aa(void 0,function(){return et(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(gh(a)),l=k.next();!l.done;h={Bc:h.Bc},l=k.next())h.Bc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==ph(h.Bc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Bc}}(h)):"SegmentTimeline"!=h.Bc.tagName&&g.push(et(h.Bc,b,c,d,e,f));return ig(g).Aa(function(){return a})}
;function ft(a,b,c,d,e,f,g){var h,k=(new Mg).S("sidx",function(l){h=gt(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
function gt(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.Qc(),m=g.reader.Qc();g.reader.skip(2);var n=g.reader.ka();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),q=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.P();g.reader.skip(4);if(1==q)throw new T(2,3,3006);h.push(new Di(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 ht(a){this.h=Gb(a);this.g=new Jg(this.h,0)}ht.prototype.oa=function(){return this.g.oa()};
function it(a){var b=jt(a);if(7<b.length)throw new T(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=jt(a);a:{d=t(kt);for(var e=d.next();!e.done;e=d.next())if(zb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ua();else{if(8==b.length&&b[1]&224)throw new T(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.ua()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ua();d=Gb(a.h,a.g.ua(),b);a.g.skip(b);return new lt(c,
d)}function jt(a){var b=a.g.ua(),c=a.g.T();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Cb(a.h,b,c)}var kt=[[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 lt(a,b){this.id=a;this.g=b}
function mt(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(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 nt(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ht(a.g);for(var n=null,p=null;a.oa();){var q=it(a);if(187==q.id){var u=ot(q);u&&(q=c*u.kj,u=b+u.Pi,null!=n&&m.push(new Di(n+g,q+g,l,p,u-1,f,g,h,k)),n=q,p=u)}}null!=n&&m.push(new Di(n+g,d+g,l,p,null,f,g,h,k));return m}
function ot(a){var b=new ht(a.g);a=it(b);if(179!=a.id)throw new T(2,3,3013);a=mt(a);b=it(b);if(183!=b.id)throw new T(2,3,3012);b=new ht(b.g);for(var c=0;b.oa();){var d=it(b);if(241==d.id){c=mt(d);break}}return{kj:a,Pi:c}};function pt(a,b,c){b=bt(a,b,"Initialization");if(!b)return null;var d=a.J.Ga(),e=b.attributes.sourceURL;e&&(d=Qd(d,[Ed(e)]));e=0;var f=null;if(b=oh(b,"range",th))e=b.start,f=b.end;c=new Bi(function(){return d},e,f,qt(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
function rt(a,b,c){var d=Number(at(a,st,"presentationTimeOffset"))||0,e=at(a,st,"timescale"),f=1;e&&(f=vh(e)||1);var g=d/f||0,h=pt(a,st,c);tt(a,h);var k=Oe(a);return{mc:function(){var l=bt(k,st,"RepresentationIndex");var m=k.J.Ga();l&&(l=Ed(l.attributes.sourceURL))&&(m=Qd(m,[l]));l=ut(k);return vt(k,b,h,m,l.start,l.end,g)}}}
function vt(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H;return O(function(K){if(1==K.g)return h=a.presentationTimeline,k=!a.xb||!a.ja.Cd,l=a.ja.start,m=a.ja.duration,n=a.J.mimeType.split("/")[1],p=b,q=null,u=[p(d,e,f,!1),"webm"==n?p(c.M(),c.Ha,c.sa,!0):null],p=null,G(K,Promise.all(u),2);w=K.h;v=w[0];A=w[1]||null;y=null;D=l-g;z=l;B=m?l+m:Infinity;if("mp4"==n)var J=ft(v,e,d,c,D,z,B);else{J=new ht(A);if(440786851!=it(J).id)throw new T(2,3,3008);var E=it(J);if(408125543!=E.id)throw new T(2,
3,3009);J=E.g.byteOffset;E=new ht(E.g);for(var L=null;E.oa();){var M=it(E);if(357149030==M.id){L=M;break}}if(!L)throw new T(2,3,3010);L=new ht(L.g);M=1E6;for(E=null;L.oa();){var N=it(L);if(2807729==N.id)M=mt(N);else if(17545==N.id)if(4==N.g.byteLength)E=N.g.getFloat32(0);else if(8==N.g.byteLength)E=N.g.getFloat64(0);else throw new T(2,3,3003);}if(null==E)throw new T(2,3,3011);L=M/1E9;E*=L;M=it(new ht(v));if(475249515!=M.id)throw new T(2,3,3007);J=nt(M,J,L,E,d,c,D,z,B)}y=J;C=t(y);for(F=C.next();!F.done;F=
C.next())H=F.value,H.codecs=a.J.codecs,H.mimeType=a.J.mimeType;h.Id(y);q=new Rk(y);k&&q.Ec(z,B,!0);return K.return(q)})}function st(a){return a.Tc}function ut(a){var b=bt(a,st,"RepresentationIndex");a=at(a,st,"indexRange");a=th(a||"");b&&(a=oh(b,"range",th,a));return a}function tt(a,b){wt(a,b);if(!ut(a))throw new T(2,4,4002);}function wt(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Wd&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
function qt(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.Nc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.la.label||null,roles:a.roles||null,language:a.la.language||null}};function xt(a,b,c){var d=pt(a,yt,c),e=zt(a);if(!e.La&&!e.timeline&&1<e.Mc.length)throw new T(2,4,4002);if(!e.La&&!a.ja.duration&&!e.timeline&&1==e.Mc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.va.id&&a.J.id&&(g=b[a.va.id+","+a.J.id])&&(f=g.segmentIndex);var h=At(a.ja.start,a.ja.duration,a.J.Ga,e,d,c,a.J.mimeType,a.J.codecs);b=!f;f?f.Hd(h,a.presentationTimeline.nb()):f=new Rk(h);a.presentationTimeline.Id(h);a.xb&&a.ja.Cd||f.Ec(a.ja.start,
a.ja.duration?a.ja.start+a.ja.duration:Infinity,b);g&&(g.segmentIndex=f);return{mc:function(){f&&0!=f.getNumReferences()||f.ue(h);return Promise.resolve(f)}}}function yt(a){return a.Qb}function zt(a){var b=Bt(a);a=$s(a,yt);var c=a.Nd;0==c&&(c=1);var d=0;a.La?d=a.La*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{La:a.La,startTime:d,Nd:c,Ob:a.Ob,timeline:a.timeline,Mc:b}}
function At(a,b,c,d,e,f,g,h){var k=d.Mc.length;d.timeline&&d.timeline.length!=d.Mc.length&&(k=Math.min(d.timeline.length,d.Mc.length));for(var l=a-d.Ob,m=b?a+b:Infinity,n=[],p=d.startTime,q={},u=0;u<k;q={hd:q.hd,dd:q.dd},u++){q.dd=d.Mc[u];var w=p;p=void 0;p=null!=d.La?w+d.La:d.timeline?d.timeline[u].end:w+b;q.hd=null;w=new Di(a+w,a+p,function(v){return function(){null==v.hd&&(v.hd=Qd(c(),[v.dd.Gi]));return v.hd}}(q),q.dd.start,q.dd.end,e,l,a,m,[],"",null,null,Ei,f);w.codecs=h;w.mimeType=g;n.push(w)}return n}
function Bt(a){return[a.J.Qb,a.la.Qb,a.va.Qb].filter(Ce).map(function(b){return hh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.If&&(a.If=!0);var c=Ed(b.attributes.media);b=oh(b,"mediaRange",th,{start:0,end:null});return{Gi:c,start:b.start,end:b.end}})};function Ct(a,b,c,d,e,f,g,h,k){k||a.J.Jc||(a.J.Jc=at(a,Dt,"initialization"));var l=a.J.Jc?Et(a,g):null,m=Ft(a);Gt(m);var n=Oe(a);if(m.zd)return wt(a,l),{mc:function(){var v=Zs(m.zd,n.J.id,null,null,n.bandwidth||null,null);v=Qd(n.J.Ga(),[v]);return vt(n,b,l,v,0,null,m.Ob)}};if(m.La)return d||"image"===a.la.contentType||(a.presentationTimeline.Pf(m.La),a.presentationTimeline.ye(a.ja.start)),{mc:function(){return Ht(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.va.id&&a.J.id&&(d=a.va.id+","+a.J.id,d=c[d])&&
(p=d.segmentIndex);var q=a.ja.start,u=a.ja.duration?q+a.ja.duration:Infinity,w=!(a.xb&&a.ja.Cd);p?(c=p,It(c,m,q,u,w,l),c.Oa(a.presentationTimeline.nb())):p=new Jt(m,a.J.id,a.bandwidth,a.J.Ga,q,u,l,w,g,a.J.ag);m.timeline&&"image"!==a.la.contentType&&a.presentationTimeline.$g(m.timeline,q);d&&a.xb&&(d.segmentIndex=p);return{mc:function(){p instanceof Jt&&0==p.getNumReferences()&&It(p,m,q,u,w,l);return Promise.resolve(p)}}}function Dt(a){return a.cc}
function Ft(a){var b=$s(a,Dt),c=at(a,Dt,"media"),d=at(a,Dt,"index");return{La:b.La,timescale:b.timescale,Nd:b.Nd,Ob:b.Ob,ng:b.ng,timeline:b.timeline,bc:c&&Ed(c),zd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function Gt(a){var b=a.zd?1:0;b+=a.timeline?1:0;b+=a.La?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.zd&&(a.timeline=null),a.La=null);if(!a.zd&&!a.bc)throw new T(2,4,4002);}
function Ht(a,b,c,d,e,f,g){function h(E){var L=(E-w)*u,M=L+b.Ob,N=L+n;L=N+u;var Q=Math.min(L,l());N=new Di(N,Q,function(){var R=M*v;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(M)*BigInt(v));R=Zs(A,D,E,null,y,R);return Qd(z(),[R])},0,null,d,B,n,l(),[],"",null,null,Ei,f);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.i=L;return N}function k(){var E=[Math.max(m.nb(),n),Math.min(m.Zb(),l())].map(function(L){return L-n});E=[Math.ceil(E[0]/u),Math.ceil(E[1]/u)-1];a.J.Ia&&E[1]++;return E.map(function(L){return L+
w})}function l(){var E=null!=p&&e[p]||q;return E?n+E:Infinity}var m=a.presentationTimeline,n=a.ja.start,p=a.va.id,q=a.ja.duration,u=b.La,w=b.Nd,v=b.timescale,A=b.bc,y=a.bandwidth||null,D=a.J.id,z=a.J.Ga,B=n-b.Ob,C=k();c=a.xb?Math.max(C[0],C[1]-c+1):C[0];g=g||C[1];C=[];for(var F=c;F<=g;++F){var H=h(F);C.push(H)}var K=new Rk(C);C=m.Zb()<l();F=m.V();if(C||F){var J=Math.max(c,g+1);c=u;a.J.Ia&&(c=.1);K.Me(c,function(){var E=m.nb();K.Oa(E);var L=t(k());L.next();L=L.next().value;for(var M=[];J<=L;){var N=
h(J);M.push(N);J++}return E>l()&&!M.length?null:M})}return Promise.resolve(K)}function Et(a,b){var c=a.J.Jc;c||(c=at(a,Dt,"initialization"));if(!c)return null;c=Ed(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.Ga;b=new Bi(function(){var g=Zs(c,d,null,null,e,null);return Qd(f(),[g])},0,null,qt(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}
function Jt(a,b,c,d,e,f,g,h,k,l){Rk.call(this,[]);this.g=a;this.C=b;this.A=c;this.B=d;this.h=e;this.j=f;this.o=g;this.s=k;this.F=l;h&&Kt(this)}pa(Jt,Rk);r=Jt.prototype;r.getNumReferences=function(){return this.g?this.g.timeline.length:0};r.release=function(){Rk.prototype.release.call(this);this.g=null};
r.Oa=function(a){if(this.g){for(var b=0,c=this.g.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.h<=a)b+=1;else break;0<b&&(this.g.timeline=c.slice(b),this.O.length>=b&&(this.O=this.O.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
function It(a,b,c,d,e,f){Lt(a,f);if(a.g){c=a.g.timeline;a.g.bc!==b.bc&&(a.g.bc=b.bc);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.g.timeline.push.apply(a.g.timeline,x(b));a.j!==d&&(a.j=d)}else a.g=b,a.h=c,a.j=d;e&&Kt(a)}function Lt(a,b){if(a.o!==b){a.o=b;a=t(a.O);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Gi(c,b)}}
function Kt(a){if(!a.m){for(var b=a.g.timeline;b.length;)if(b[b.length-1].start>=a.j)b.pop();else break;a.Oa(a.h)}}r.find=function(a){if(this.g&&this.g.timeline&&this.g.timeline.length&&a<this.g.timeline[0].start+this.h)return this.i;if(!this.g)return null;var b=this.g.timeline;if(a<this.h||a>=this.j)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.h;e=d<c?b[d+1].start+this.h:Infinity===this.j?e.end+this.h:this.j;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.g)return null;var c=this.O[a];if(!c){var d=this.g.timeline[a],e=d.Zi,f=this.g.ng+d.og;c=this.h-this.g.Ob;var g=this.h+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.j&&(h=this.j);for(var k=this.g.codecs,l=this.g.mimeType,m=[],n=(d.end-d.start)/d.Bb,p={},q=0;q<d.Bb;p={jd:p.jd,We:p.We},q++){var u=d.start+n*q,w=u+n;p.We=q+1;p.jd=null;u=new Di(this.h+u,this.h+w,function(v){return function(){if(!b.g)return[];null==
v.jd&&(v.jd=Mt(b.g.bc,b.C,e,b.A,f,v.We,b.B));return v.jd}}(p),0,null,this.o,c,this.h,this.j,[],"",null,null,Ei,this.s);u.codecs=k;u.mimeType=l;0==this.F?0<q&&u.se():0!=q%this.F&&u.se();m.push(u)}c=new Di(this.h+d.start,h,function(){return 0<d.Bb||!b.g?[]:Mt(b.g.bc,b.C,e,b.A,f,null,b.B)},0,null,this.o,c,this.h,this.j,m,"",null,null,Ei,this.s,0<d.Bb);c.codecs=k;c.mimeType=l;c.i=g;this.O[a]=c}return c};
function Mt(a,b,c,d,e,f,g){a=Zs(a,b,c,f,d||null,e);return Qd(g(),[a]).map(function(h){return h.toString()})};function Nt(a){this.o=null;this.A=a;this.G=new ng;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.s="UNKNOWN"}Nt.prototype.configure=function(a){this.o=a};Nt.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()};Nt.prototype.setManifestType=function(a){this.s=a};
function Ot(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Qd(a.i,[Pt(a,b)]),d=ug(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),og(a.G,e),ua(l,2),G(l,e.promise,4);if(2!=l.g)return f=l.h,g=xd(f.data),h=JSON.parse(g),1==h.VERSION&&Qt(a,h,f.uri),wa(l,0);if((k=xa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Uc(function(){Ot(a,b)});a.g.Y(a.C);I(l)})}
function Pt(a,b){if(!a.m.length)return b;b=new vc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Kc(e)&&zc(b,e);return b.toString()}function Qt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Uc(function(){Ot(a,d)});if(c=b.TTL)a.C=c;a.g.Y(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
function Rt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Nt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
function St(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={jc:e.jc},g=f.next())if(e.jc=g.value,g=b.get(e.jc))d.push({Vf:e.jc,location:g});else if(g=a.F.find(function(k){return function(l){return l.Dj==k.jc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].xh?(h=new vc(h),xc(h,g["URI-REPLACEMENT"].xh),d.push({Vf:e.jc,location:h.toString()})):d.push({Vf:e.jc,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
h=a.j.get(g),e>h&&a.j.delete(g);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 vc(k.location)).Fb))return!1;return!0});d.length&&(a.B=d[0].Vf);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(f=b.get(g.value))a.B=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Qd(a.i,d)};function Tt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=Tt.prototype;r.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};r.li=function(){return this.j};r.Gf=function(){return this.l.slice()};r.Uh=function(){return this.i};
function Ut(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[Vt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Wt(n),n]})),l=new Map(h.textStreams.map(function(n){return[Xt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Yt(n),n]}));if(b){var m=Zt(Wd);l.set(Xt(m),m);m=Zt("image");h.set(Yt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{xg:c,vh:d,sh:e,Sg: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,A,y,D,z,B,C,F,H,K,J,E,L,M,N,Q,R,P;return O(function(aa){if(1==aa.g){e=Yd;if(!b&&1==a.length)return f=Ut(a,!1),g=f.xg,h=f.vh,k=f.sh,l=f.Sg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.l=Array.from(k[0].values()),d.i=Array.from(l[0].values()),aa.u(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 aa.return();u=Ut(a,!0);w=u.xg;v=u.vh;A=u.sh;y=u.Sg;
return G(aa,Promise.all([$t(d,d.h,w,n,au,bu,m),$t(d,d.g,v,n,au,bu,m),$t(d,d.l,A,n,au,bu,m),$t(d,d.i,y,n,au,bu,m)]),2)}D=0;z=[];if(d.g.length&&d.h.length)for(J=t(d.h),E=J.next();!E.done;E=J.next())for(L=E.value,M=t(d.g),N=M.next();!N.done;N=M.next())Q=N.value,R=Pc(L.drmInfos,Q.drmInfos),L.drmInfos.length&&Q.drmInfos.length&&!R.length||(P=D++,z.push({id:P,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L,video:Q,bandwidth:(L.bandwidth||0)+(Q.bandwidth||0),drmInfos:R,allowedByApplication:!0,
allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,C=t(B),F=C.next();!F.done;F=C.next())H=F.value,K=D++,z.push({id:K,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H.type==e.X?H:null,video:H.type==e.ga?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=z;I(aa)})};
function cu(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K,J,E,L,M,N;return O(function(Q){switch(Q.g){case 1:b=Yd;if(1==a.length)return Q.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(P){return P.type===b.X}).map(function(P){return[Vt(P),P]}))});d=a.map(function(R){return new Map(R.filter(function(P){return P.type===b.ga}).map(function(P){return[Wt(P),P]}))});e=a.map(function(R){return new Map(R.filter(function(P){return P.type===b.ta}).map(function(P){return[Xt(P),P]}))});
f=a.map(function(R){return new Map(R.filter(function(P){return P.type===b.Ze}).map(function(P){return[Yt(P),P]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=du(b.ta),k.set(Xt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,q=du(b.Ze),p.set(Yt(q),q);u=new Tt;return G(Q,$t(u,[],c,0,eu,fu,0),2);case 2:return w=Q.h,G(Q,$t(u,[],d,0,eu,fu,0),3);case 3:return v=Q.h,G(Q,$t(u,[],e,0,eu,fu,0),4);case 4:return A=Q.h,G(Q,$t(u,[],f,0,eu,fu,0),5);case 5:y=Q.h;D=0;if(v.length&&w.length)for(H=
t(w),K=H.next();!K.done;K=H.next())for(J=K.value,E=t(v),L=E.next();!L.done;L=E.next())M=L.value,N=D++,M.variantIds.push(N),J.variantIds.push(N);else for(z=v.concat(w),B=t(z),C=B.next();!C.done;C=B.next())F=C.value,F.variantIds=[D++];return Q.return(v.concat(w).concat(A).concat(y))}})}
function $t(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H;return O(function(K){switch(K.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){K.u(4);break}n=m.value;return G(K,gu(a,n,c,d,f,h,g),5);case 5:p=K.h;if(!p)throw new T(2,4,4037);m=l.next();K.u(2);break;case 4:q=t(h);for(u=q.next();!u.done;u=q.next())for(w=u.value,v=t(w),A=v.next();!A.done;A=v.next())y=A.value,(D=hu(a,y,c,e,f,h))&&b.push(D);z=t(h);for(u=z.next();!u.done;u=
z.next())for(B=u.value,C={},F=t(B),A=F.next();!A.done;C={Yd:C.Yd},A=F.next())if(C.Yd=A.value,!iu(C.Yd)&&(H=b.some(function(J){return function(E){return ju(a,J.Yd,E)}}(C))))throw new T(2,4,4037);return K.return(b)}})}function gu(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return ku(a,c,b,0<g),b.matchedStreams?b.segmentIndex?G(h,lu(b,d+g),2):h.u(2):h.return(!1);mu(b,d,e,f,g);return h.return(!0)})}
function lu(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return G(l,Promise.all(c),2)}if(a.segmentIndex instanceof Uk)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.g.push(k.segmentIndex);I(l)})}
function hu(a,b,c,d,e,f){if(iu(b))return null;var g=d(b);ku(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Uk;return G(h,lu(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;mu(g,0,e,f,0);return g}
function mu(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==Je(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 au(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;b.closedCaptions=null;b.trickModeVideo=null;return b}
function eu(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
function bu(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:a.originalId+=","+(b.originalId||"");d=Pc(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(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)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=au(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),bu(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&bu(a.trickModeVideo,
b)}function fu(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,x(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 ku(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=nu(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function nu(a,b,c){var d={audio:Vt,video:Wt,text:Xt,image:Yt}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return ju(a,l,m)},video:function(l,m){return ju(a,l,m)},text:ou,image:pu}[c.type];for(var g={audio:qu,video:ru,text:su,image:tu}[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.s&&!iu(e)&&b.delete(d(e));return e}
function uu(a,b){return a.mimeType!=b.mimeType?!1:vu(a.codecs)===vu(b.codecs)}r.ih=function(a){this.o=a};r.ph=function(a){this.s=a};function ju(a,b,c){return!uu(b,c)&&!a.o||b.drmInfos&&!Oc(b.drmInfos,c.drmInfos)?!1:!0}function ou(a,b){return b.language?a.forced!==b.forced||0==Je(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function pu(){return!0}
function qu(a,b,c){var d=uu(a,b),e=uu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Je(a.language,b.language);e=Je(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)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;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=wu(a.channelsCount,b.channelsCount,c.channelsCount);if(d==xu)return!0;if(d==yu)return!1;d=wu(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==xu?!0:d==yu?!1:a.bandwidth&&zu(a.bandwidth,b.bandwidth,c.bandwidth)==xu?!0:!1}
function ru(a,b,c){var d=uu(a,b),e=uu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=wu(a.width*a.height,b.width*b.height,c.width*c.height);if(d==xu)return!0;if(d==yu)return!1;if(a.frameRate){d=wu(a.frameRate,b.frameRate,c.frameRate);if(d==xu)return!0;if(d==yu)return!1}return a.bandwidth&&zu(a.bandwidth,b.bandwidth,c.bandwidth)==xu?!0:!1}
function su(a,b,c){var d=Je(a.language,b.language),e=Je(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 tu(a,b,c){return wu(a.width*a.height,b.width*b.height,c.width*c.height)==xu?!0:!1}
function du(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}}
function Zt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Rk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
function wu(a,b,c){if(b==a&&a!=c)return yu;if(c==a&&a!=b)return xu;if(b>a){if(c<=a||c-a<b-a)return xu;if(c-a>b-a)return yu}else{if(c>a)return yu;if(a-c<a-b)return xu;if(a-c>a-b)return yu}return Au}function zu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?xu:b<a?yu:Au}function iu(a){switch(a.type){case Wd:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
function Wt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,vu(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Vt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,vu(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Xt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
function Yt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function vu(a){if(!Bu.has(a)){var b=he(a);Bu.set(a,b)}return Bu.get(a)}S("shaka.util.PeriodCombiner",Tt);Tt.prototype.setUseStreamOnce=Tt.prototype.ph;Tt.prototype.setAllowMultiTypeVariants=Tt.prototype.ih;Tt.prototype.combinePeriods=Tt.prototype.gf;Tt.prototype.getImageStreams=Tt.prototype.Uh;Tt.prototype.getTextStreams=Tt.prototype.Gf;Tt.prototype.getVariants=Tt.prototype.li;var xu=1,Au=0,yu=-1,Bu=new Map;function Cu(a,b){var c=new DOMParser,d=Du.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 Eu(a,b){try{var c=Ad(a);return Cu(c,b)}catch(d){return null}}
var Du=new Mc(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 Fu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.ea=1;this.B=[];this.l={we:"",type:"",profiles:[],Kb:null,Ia:0,Ga:null,Kd:0};this.o=new Map;this.s={};this.aa={};this.m=new Tt;this.H=0;this.da=new Ra(5);this.I=new Uc(function(){if(a.G&&!a.g.continueLoadingWhenPaused&&(a.C.lb(a.G,"timeupdate"),a.G.paused)){a.C.ha(a.G,"timeupdate",function(){return Gu(a)});return}Gu(a)});this.N=new ng;this.L=null;this.fa=[];this.R=Infinity;this.F=!1;this.h=null;this.K=0;this.U=!1;this.C=new ib;
this.G=null;this.Z=!1}r=Fu.prototype;r.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.V()&&this.I.xc();this.h&&this.h.configure(this.g);this.m&&(this.m.ih(this.g.dash.multiTypeVariantsAllowed&&qb()),this.m.ph(this.g.dash.useStreamOnceInPeriodFlattening))};
r.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.A=[a],c.j=b,G(e,Hu(c),2);d=e.h;c.j&&Iu(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
r.stop=function(){for(var a=t(Object.values(this.s)),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.s={};this.o.clear();this.l={we:"",type:"",profiles:[],Kb:null,Ia:0,Ga:null,Kd:0};this.m=null;null!=this.I&&(this.I.stop(),this.I=null);this.h&&this.h.destroy();this.C&&(this.C.release(),this.C=null);return this.N.destroy()};
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ua(c,2),G(c,Hu(a),4);if(2!=c.g)return wa(c,0);b=xa(c);if(!a.j||!b)return c.return();a.j.onError(b);I(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.V()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Zb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Iu(this,0))}}};
r.banLocation=function(a){this.h&&this.h.banLocation(a)};r.setMediaElement=function(a){this.G=a};
function Hu(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return b=4,c="MPD",d=Ju(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=St(a.h,"Location",!0),f.length&&(e=f)),g=ug(e,a.g.retryParameters),h=Date.now(),G(n,Ku(a,g,0,{type:b}),2);if(3!=n.g){k=n.h;if(!a.j)return n.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);return G(n,Lu(a,k.data,k.uri,c),3)}l=Date.now();m=(l-h)/1E3;a.da.sample(1,m);return n.return(m)})}
function Lu(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u;return O(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=ym;if(f!=g){sb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Eu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Bd(h.outerHTML)}k=ah(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=zm;l!=m&&l(k);if("Patch"===d)return w.return(Mu(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(Nu(a,k,c));
p=a.g.dash.xlinkFailGracefully;q=et(k,a.g.retryParameters,p,c,a.j.networkingEngine);og(a.N,q);return G(w,q.promise,2)}u=w.h;return w.return(Nu(a,u,c))})}
function Nu(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K,J,E,L,M,N,Q,R,P,aa,ba,Sa,ta,Ma,Ya,Ta,gb,Va,Ua,mc,Oa,lb,Pb,Nc,je,ke,le,Jd,Li,Kd,Mi,Ni,Eg,me;return O(function(nc){switch(nc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=hh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=jh(l))p=Qd(d,[n])[0],m&&(a.h?Rt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(q=St(a.h,"Location",!0),0<q.length&&(d=a.A=q)):e.length&&(d=a.A=e);a.l.we=
b.attributes.id||"";a.l.Kd=oh(b,"publishTime",rh)||0;a.B=hh(b,"PatchLocation");u=Promise.resolve();if((w=lh(b,"ContentSteering"))&&a.j){v=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=v;else if(a.h=new Nt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=v,A=jh(w))(y=oh(w,"queryBeforeStart",yh,!1))?u=Ot(a.h,A):Ot(a.h,A);D=t(f.keys());for(z=D.next();!z.done;z=D.next())B=z.value,C=f.get(B),Rt(a.h,"Location",B,C)}F=hh(b,"BaseURL");K=!1;if(a.h)for(J=t(F),E=J.next();!E.done;E=
J.next())L=E.value,M=L.attributes.serviceLocation,N=jh(L),M&&N&&(Rt(a.h,"BaseURL",M,N),K=!0);K&&a.h||(Q=F.map(jh),H=Qd(d,Q));R=function(){return a.h&&K?St(a.h,"BaseURL"):H?H:[]};a.l.Ga=R;P=0;F&&F.length&&(P=oh(F[0],"availabilityTimeOffset",xh)||0);a.l.Ia=P;aa=a.g.dash.ignoreMinBufferTime;ba=0;aa||(ba=oh(b,"minBufferTime",sh)||0);a.H=oh(b,"minimumUpdatePeriod",sh,-1);Sa=oh(b,"availabilityStartTime",rh);ta=oh(b,"timeShiftBufferDepth",sh);Ma=a.g.dash.ignoreSuggestedPresentationDelay;Ya=null;Ma||(Ya=
oh(b,"suggestedPresentationDelay",sh));Ta=a.g.dash.ignoreMaxSegmentDuration;gb=null;Ta||(gb=oh(b,"maxSegmentDuration",sh));Va=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.Z=a.i.presentationTimeline.V()&&"static"==Va);a.l.type=Va;if(a.i)for(Ua=a.i.presentationTimeline,mc=t(Object.values(a.s)),Oa=mc.next();!Oa.done;Oa=mc.next())lb=Oa.value,lb.segmentIndex&&lb.segmentIndex.Oa(Ua.nb());else Pb=a.g.defaultPresentationDelay||1.5*ba,Nc=null!=Ya?Ya:Pb,Ua=new vk(Sa,Nc,a.g.dash.autoCorrectDrift);
Ua.wc("static"==Va);(je=Ua.V())&&!isNaN(a.g.availabilityWindowOverride)&&(ta=a.g.availabilityWindowOverride);null==ta&&(ta=Infinity);Ua.Ie(ta);ke=b.attributes.profiles||"";a.l.profiles=ke.split(",");le={xb:"static"!=Va,presentationTimeline:Ua,va:null,ja:null,la:null,J:null,bandwidth:0,If:!1,Ia:P,Kb:null,profiles:ke.split(","),roles:null};a.K=0;Jd=Ou(a,le,R,b);Li=Jd.duration;Kd=Jd.periods;("static"!=Va||a.Z)&&Jd.Fg||Ua.$a(Li||Infinity);a.U&&!a.F&&(Mi=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),
a.F=a.j.isLowLatencyMode());a.F&&Ua.jh(a.R);Ua.Pf(gb||1);return G(nc,u,2);case 2:a.F&&(ba=0,Ni=null!=Ya?Ya:a.g.defaultPresentationDelay,Ua.eg(Ni));if(!a.i)return G(nc,a.m.gf(Kd,le.xb),6);a.i.periodCount=Kd.length;a.i.gapCount=a.K;return G(nc,Pu(a,Kd,!1),4);case 6:a.i={presentationTimeline:Ua,variants:a.m.j,textStreams:a.m.Gf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:ba||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:bv(b),
nextUrl:cv(b),periodCount:Kd.length,gapCount:a.K,isLowLatency:a.U};if(!Ua.uh()){nc.u(7);break}Eg=hh(b,"UTCTiming");return G(nc,dv(a,R,Eg),8);case 8:me=nc.h;if(!a.j)return nc.return();Ua.kh(me);case 7:Ua.re();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),I(nc)}})}function Pu(a,b,c){var d;return O(function(e){if(1==e.g)return G(e,a.m.gf(b,!0,c),2);a.i.variants=a.m.j;d=a.m.Gf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);I(e)})}
function Mu(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K,J;return O(function(E){if(1==E.g){c=b.attributes.mpdId;d=oh(b,"originalPublishTime",rh);if(!c||c!==a.l.we||d!==a.l.Kd)throw a.B=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(gh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Ah(l.attributes.sel||""),n=m[m.length-1],p=jh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Ub){q=jh(l)||"";var L=sh(q);if(null!=L){a.l.Kb=L;for(var M=t(a.o.values()),N=M.next();!N.done;N=M.next())N.value.Kb=
L}}else if("type"===n.Ub){a.i.presentationTimeline.wc("static"==p);a.l.type=p;L=t(a.o.values());for(M=L.next();!M.done;M=L.next())M.value.xb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.Ub?a.l.Kd=rh(p)||0:null===n.Ub&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Bh(a.B,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(L=n.id,a.i.periodCount--,M=t(a.o.keys()),N=M.next();!N.done;N=M.next())if(N=N.value,N.startsWith(L)){var Q=
a.o.get(N);bt(Q,Dt,"SegmentTimeline").children=[];ev(a,N);a.o.delete(N)}}else if("SegmentTemplate"===n.name){M=Ah(l.attributes.sel||"");L=M[M.length-1];if(L.Ub){M=fv(a,M);N=jh(l)||"";Q=t(M);for(var R=Q.next();!R.done;R=Q.next())R=a.o.get(R.value),Ch(R.J.cc,l.tagName,L.Ub,N);L=M}else L=[];u=L;w=t(u);for(v=w.next();!v.done;v=w.next())A=v.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){L=Ah(l.attributes.sel||"");L=fv(a,L);M=t(L);for(N=M.next();!N.done;N=M.next())N=a.o.get(N.value),N=
bt(N,Dt,"SegmentTimeline"),Q=hh(N,"S"),Bh(Q,l),N.children=Q;y=L;D=t(y);for(v=D.next();!v.done;v=D.next())z=v.value,g.add(z)}B=t(g);for(v=B.next();!v.done;v=B.next())C=v.value,ev(a,C);F=t(f);for(H=F.next();!H.done;H=F.next())K=H.value,e.push.apply(e,x(Ou(a,{xb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,va:null,ja:null,la:null,J:null,bandwidth:0,If:!1,Ia:a.l.Ia,profiles:a.l.profiles,Kb:a.l.Kb,roles:null},a.l.Ga,K).periods));if(!e.length)return E.u(2);a.i.periodCount+=e.length;
a.i.gapCount=a.K;return G(E,Pu(a,e,!0),2)}"static"==a.l.type&&(J=a.l.Kb,a.i.presentationTimeline.$a(J||Infinity));I(E)})}function fv(a,b){var c="",d="",e="";b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,"Period"===f.name?c=f.id:"AdaptationSet"===f.name?d=f.id:"Representation"===f.name&&(e=f.id);b=[];if(e)b.push(c+","+e);else for(a=t(a.o.values()),e=a.next();!e.done;e=a.next())e=e.value,e.va.id===c&&e.la.id===d&&e.J.id&&b.push(c+","+e.J.id);return b}
function ev(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Oa(a.i.presentationTimeline.nb());try{var e=Ct(c,function(f,g,h,k){return gv(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.aa,c.J.aesKey,null,!0);d.createSegmentIndex=function(){var f;return O(function(g){if(1==g.g){if(d.segmentIndex)return g.u(0);f=d;return G(g,e.mc(),3)}f.segmentIndex=g.h;I(g)})}}catch(f){if(b=c.J.contentType,b!=Wd&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
function bv(a){var b=lh(a,"ServiceDescription");if(!b)return null;a=lh(b,"Latency");b=lh(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 cv(a){a=hh(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 Ou(a,b,c,d){var e=b.Kb;e||(e=oh(d,"mediaPresentationDuration",sh),a.l.Kb=e);var f=0;a.i&&a.i.presentationTimeline&&a.Z&&(f=a.i.presentationTimeline.Yb());var g=[],h=f;d=hh(d,"Period");for(var k=0;k<d.length;k++){var l=d[k],m=d[k+1],n=oh(l,"start",sh,h),p=l.attributes.id,q=oh(l,"duration",sh),u=null;if(m){var w=oh(m,"start",sh);null!=w&&(u=w-n)}else null!=e&&(u=e-n+f);w=Zd;u&&q&&Math.abs(u-q)>w&&u>q&&a.K++;null==u&&(u=q);if(!(null!==a.L&&null!==p&&null!==n&&n<a.L)||a.fa.includes(p)||k+1==
d.length){null!==n&&(null===a.L||n>a.L)&&(a.L=n);h=hv(a,b,c,{start:n,duration:u,node:l,Cd:null==u||!m});g.push(h);b.va.id&&u&&(a.aa[b.va.id]=u);if(null==u){h=null;break}h=n+u}}a.fa=g.map(function(v){return v.id});return null!=e?{periods:g,duration:e+f,Fg:!1}:{periods:g,duration:h,Fg:!0}}
function hv(a,b,c,d){b.va=iv(a,d.node,null,c);b.ja=d;b.va.Ia=b.Ia;b.va.id||(b.va.id="__shaka_period_"+d.start);var e=hh(d.node,"EventStream");c=b.presentationTimeline.nb();e=t(e);for(var f=e.next();!f.done;f=e.next())jv(a,d.start,d.duration,f.value,c);c=hh(d.node,"AdaptationSet").map(function(m){return kv(a,b,m)}).filter(Ce);if(b.xb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Ti);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);
}d=c.filter(function(m){return!m.mg});c=c.filter(function(m){return m.mg});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.mg.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Zd:h.Zd},l=k.next())h.Zd=l.value,h.Zd.trickModeVideo=e.streams.find(function(m){return function(n){return he(m.Zd.codecs)==he(n.codecs)}}(h))}}}c=lv(a.g.disableAudio,d,"audio");e=lv(a.g.disableVideo,d,"video");f=lv(a.g.disableText,
d,Wd);d=lv(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.va.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function lv(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
function kv(a,b,c){function d(E){switch(E){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.la=iv(a,c,b.va,null);var f=!1,g=hh(c,"Role"),h=g.map(function(E){return E.attributes.value}).filter(Ce),k=void 0,l=b.la.contentType==Wd;l&&(k="subtitle");g=t(g);for(var m=g.next();!m.done;m=g.next()){m=m.value;var n=m.attributes.schemeIdUri;if(null==
n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":f=!0;break;case "caption":case "subtitle":k=m}}var p,q;n=hh(c,"EssentialProperty");g=null;var u=!1;m=!1;n=t(n);for(var w=n.next();!w.done;w=n.next()){w=w.value;var v=w.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==v?g=w.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?p=e(parseInt(w.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v?q=d(parseInt(w.attributes.value,10)):"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=
v&&("urn:mpeg:dash:ssr:2023"==v&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=hh(c,"SupplementalProperty");n=t(n);for(w=n.next();!w.done;w=n.next())w=w.value,v=w.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==v?A=parseInt(w.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?p=e(parseInt(w.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v&&(q=d(parseInt(w.attributes.value,10)));n=hh(c,"Accessibility");var y=new Map,D;n=t(n);for(w=
n.next();!w.done;w=n.next())if(v=w.value,w=v.attributes.schemeIdUri,v=v.attributes.value,"urn:scte:dash:cc:cea-608:2015"==w)if(w=1,null!=v){v=v.split(";");for(var z=t(v),B=z.next();!B.done;B=z.next()){var C=B.value,F=B=void 0;C.includes("=")?(C=C.split("="),B=C[0].startsWith("CC")?C[0]:"CC"+C[0],F=C[1]||"und"):(B="CC"+w,2==v.length?w+=2:w++,F=C);y.set(B,Fe(F))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==w)if(w=1,null!=v)for(v=t(v.split(";")),B=v.next();!B.done;B=v.next())B=B.value,
C=z=void 0,B.includes("=")?(B=B.split("="),z="svc"+B[0],C=B[1].split(",")[0].split(":").pop()):(z="svc"+w,w++,C=B),y.set(z,Fe(C));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==w?null!=v&&(h.push(v),"captions"==v&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==w&&("1"==v?D="visually impaired":"2"==v&&(D="hard of hearing"));if(m)return null;m=hh(c,"ContentProtection");var H=Os(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),K=Fe(b.la.language||"und"),J=b.la.label;m=hh(c,"Representation");
c=m.map(function(E){if(E=mv(a,b,H,k,K,J,f,h,y,E,D,A))E.hdr=E.hdr||p,E.colorGamut=E.colorGamut||q,E.fastSwitching=u;return E}).filter(function(E){return!!E});if(0==c.length){g="image"==b.la.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new T(2,4,4003);}if(!b.la.contentType||"application"==b.la.contentType)for(b.la.contentType=nv(c[0].mimeType,c[0].codecs),l=t(c),w=l.next();!w.done;w=l.next())w.value.type=b.la.contentType;l=b.la.id||"__fake__"+a.ea++;n=t(c);for(w=n.next();!w.done;w=
n.next()){w=w.value;v=t(H.drmInfos);for(z=v.next();!z.done;z=v.next())z=z.value,z.keyIds=z.keyIds&&w.keyIds?new Set([].concat(x(z.keyIds),x(w.keyIds))):z.keyIds||w.keyIds;a.g.dash.enableAudioGroups&&(w.groupId=l)}m=m.map(function(E){return E.attributes.id}).filter(Ce);return{id:l,contentType:b.la.contentType,language:K,lk:f,streams:c,drmInfos:H.drmInfos,mg:g,Ti:m}}
function mv(a,b,c,d,e,f,g,h,k,l,m,n){b.J=iv(a,l,b.la,null);var p=b.J.id;a.R=Math.min(a.R,b.J.Ia);a.U=0<a.R;if(!ov(b.J))return null;var q=b.ja.start;b.bandwidth=oh(l,"bandwidth",vh)||0;b.roles=h;var u=b.J.contentType,w=u==Wd||"application"==u;u="image"==u;try{var v=void 0;if(c.bf){var A=b.J.Ga,y=Qd(A(),[c.bf.Ai]),D=ug(y,a.g.retryParameters);v={bitsKey:128,blockCipherMode:"CBC",iv:c.bf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var J,E,L;return O(function(M){if(1==M.g)return G(M,Ku(a,D,6),2);
if(3!=M.g){J=M.h;if(!J.data||16!=J.data.byteLength)throw new T(2,4,4049);E={name:"AES-CBC"};L=v;return G(M,window.crypto.subtle.importKey("raw",J.data,E,!0,["decrypt"]),3)}L.cryptoKey=M.h;v.fetchKey=void 0;I(M)})}}}b.J.aesKey=v;A=function(J,E,L,M){return gv(a,J,E,L,M)};if(b.J.Tc)var z=rt(b,A,v);else if(b.J.Qb)z=xt(b,a.s,v);else if(b.J.cc)z=Ct(b,A,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.aa,v,n,!1);else{var B=b.ja.duration||0,C=b.J.Ga;z={mc:function(){var J=Tk(q,B,C());J.Vb(function(E){E.mimeType=
b.J.mimeType;E.codecs=b.J.codecs});return Promise.resolve(J)}}}}catch(J){if((w||u)&&4002==J.code)return null;throw J;}n=hh(l,"ContentProtection");n=Ss(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;hh(l,"SupplementalProperty").some(function(J){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==J.attributes.schemeIdUri&&"JOC"==J.attributes.value})&&(A=!0);y=!1;w&&(y=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var F;if(u&&((l=hh(l,"EssentialProperty").find(function(J){return["http://dashif.org/thumbnail_tile",
"http://dashif.org/guidelines/thumbnail_tile"].includes(J.attributes.schemeIdUri)}))&&(F=l.attributes.value),!F))return null;var H;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"))&&(H="PQ");w=b.J.id?b.va.id+","+b.J.id:"";a.B.length&&p&&a.o.set(b.va.id+","+p,pv(b));var K=w&&a.s[w]?a.s[w]:{id:a.ea++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){K.segmentIndex&&
(K.segmentIndex.release(),K.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.la.language,label:f,type:b.la.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.J.Nc,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:A,
closedCaptions:k,hdr:H,colorGamut:void 0,videoLayout:void 0,tilesLayout:F,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([ae(b.J.mimeType,b.J.codecs)])};K.createSegmentIndex=function(){var J;return O(function(E){if(1==E.g){if(K.segmentIndex)return E.u(0);J=K;return G(E,z.mc(),3)}J.segmentIndex=E.h;I(E)})};w&&b.xb&&!a.s[w]&&(a.s[w]=K);return K}
function pv(a){for(var b={},c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,["period","adaptationSet","representation"].includes(d)){var e=a[d];b[d]={Tc:null,Qb:null,cc:e.cc,Ga:e.Ga,width:e.width,height:e.height,contentType:e.contentType,mimeType:e.mimeType,language:e.language,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,emsgSchemeIdUris:e.emsgSchemeIdUris,id:e.id,Nc:e.Nc,audioSamplingRate:e.audioSamplingRate,Ia:e.Ia,Jc:e.Jc}}else"periodInfo"==d?(e=a[d],
b[d]={start:e.start,duration:e.duration,node:null,Cd:e.Cd}):b[d]=a[d];return b}function Gu(a){var b,c;return O(function(d){switch(d.g){case 1:return b=0,ua(d,2),G(d,Hu(a),4);case 4:b=d.h;wa(d,3);break;case 2:if(c=xa(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();Iu(a,b);I(d)}})}
function Iu(a,b){if(!(0>a.H)){var c=a.H;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.I.Y(Math.max(c-b,Wa(a.da)))}}
function iv(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Nc:null,audioSamplingRate:null,Ia:0,ag:0};d=d||c.Ga;var e=b.attributes.id,f=hh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=jh(m);l&&m&&(Rt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(jh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=ph(b,
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=zl(m).join(",");n=oh(b,"frameRate",zh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,q=qv(hh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=hh(b,"AudioChannelConfiguration");u=rv(u)||c.Nc;var w=oh(b,"audioSamplingRate",wh)||c.audioSamplingRate;k||(k=nv(l,m));var v=lh(b,"SegmentBase"),A=lh(b,"SegmentTemplate"),y=v?oh(v,"availabilityTimeOffset",xh)||0:0,D=A?oh(A,"availabilityTimeOffset",xh)||0:0,z=f&&f.length?oh(f[0],"availabilityTimeOffset",
xh)||0:0;y=c.Ia+z+y+D;D=null;(z=lh(b,"SegmentSequenceProperties"))&&(z=lh(z,"SAP"))&&(D=oh(z,"cadence",uh));z=b.attributes.label;var B=hh(b,"Label");B&&B.length&&(B=B[0],ih(B)&&(z=ih(B)));return{Ga:function(){return Qd(d(),f.length?a.h&&h?St(a.h,e):g?g:[]:[])},Tc:v||c.Tc,Qb:lh(b,"SegmentList")||c.Qb,cc:A||c.cc,width:oh(b,"width",wh)||c.width,height:oh(b,"height",wh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:q,id:e,language:b.attributes.lang,Nc:u,audioSamplingRate:w,
Ia:y,Jc:null,ag:D||c.ag,label:z||null}}function qv(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 rv(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function ov(a){var b=a.Tc?1:0;b+=a.Qb?1:0;b+=a.cc?1:0;if(0==b)return a.contentType==Wd||"application"==a.contentType?!0:!1;1!=b&&(a.Tc&&(a.Qb=null),a.cc=null);return!0}
function sv(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Ed(c)],f=Qd(b(),e),g=ug(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),og(a.N,h),G(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=xd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
function dv(a,b,c){var d,e,f,g,h,k,l,m;return O(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.u(4);break}h=g.value;ua(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.u(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.u(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":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return G(n,sv(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return G(n,sv(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:wa(n,
3);break;case 5:xa(n);case 3:g=f.next();n.u(2);break;case 4:return ab("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
function jv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=oh(d,"timescale",wh)||1;d=t(hh(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=oh(k,"presentationTime",wh)||0,m=oh(k,"duration",wh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:Dh(k),eventNode:k},a.j.onTimelineRegionAdded(k))}}
function gv(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=Ag,g=e?0:1,h=Dl(b,c,d,a.g.retryParameters),G(l,Ku(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function nv(a,b){b=ae(a,b);return te(b)?Wd:a.split("/")[0]}function Ku(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);og(a.N,b);return b.promise}
function Ju(a){var b=a.l.Kd;if(!a.l.we||!b||!a.B.length)return[];var c=Date.now()/1E3,d=a.B.filter(function(e){e=wh(e.attributes.ttl);return!e||b+e>c}).map(jh).filter(Ce);return d.length?Qd(a.A,d):[]}S("shaka.dash.DashParser",Fu);wi["application/dash+xml"]=function(){return new Fu};wi["video/vnd.mpeg.dash.mpd"]=function(){return new Fu};function tv(){}S("shaka.dependencies",tv);tv.has=function(a){return uv.has(a)};tv.add=function(a,b){if(!vv[a])throw Error(a+" is not supported");a==wv?sb("mux.js","mux.js is no longer used in Shaka Player."):uv.set(a,function(){return b})};var wv="muxjs",vv={mk:wv,ISOBoxer:"ISOBoxer"};tv.Allowed=vv;var uv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function xv(a,b,c){this.type=a;this.g=b;this.segments=c||null}function yv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}yv.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 zv(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Av(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Av(a,b))?a.value:c||null}function Bv(a,b){a=Av(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Cv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Bb=c}function Dv(a,b){this.name=a;this.value=b};function Ev(a,b){return a.filter(function(c){return c.name==b})}function Fv(a,b){return a.filter(function(c){return Bv(c,"TYPE")==b})}function Gv(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 Hv(a,b,c){c=void 0===c?0:c;return(a=Gv(a,b))?Number(a.value):c}function Iv(a,b,c){return b?Jv(a,[b],c):[]}function Jv(a,b,c){if(!b.length)return[];b=Qd(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(Kv(d.value,c));return a}
function Kv(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 T(2,4,4039,e);}}return a};function Lv(){this.g=0}
function Mv(a,b){b=xd(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 T(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=Nv(a,f),--a.g,Ov.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=Nv(a,g);if(Pv.includes(g.name)){if(1!=b)throw new T(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=Nv(a,k),Ov.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"==Z(k,"TYPE")?f.push(k):"MAP"==Z(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 Cv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Cv("",d,f)));return new xv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
g.name&&(g.attributes.push(new Dv("URI",h)),d=!0)}}return new xv(b,e)}function Nv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Up(d);var f;(f=Wp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Wp(d,g);)c.push(new Dv(f[1],f[2]||f[3])),Vp(d)}return new yv(a,b,c,e)}
var Ov="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(" "),Pv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function Qv(){}function Rv(a){try{var b=Sv(a);return gg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return eg(c)}}
function Sv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Id(a):e=Bd(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",Qv);Qv.parse=Rv;qg("data",Rv);function Tv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.G=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Wd,new Map);this.N.set("image",new Map);this.wb=new Set;this.i=new Map;this.j=null;this.L="";this.Fa=new Lv;this.H=-1;this.ea=Infinity;this.da=this.Hb=!1;this.A=new Uc(function(){if(a.Z&&!a.g.continueLoadingWhenPaused&&(a.U.lb(a.Z,"timeupdate"),a.Z.paused)){a.U.ha(a.Z,"timeupdate",function(){return Uv(a)});return}Uv(a)});this.xa=Vv;this.m=
null;this.bb=0;this.o=Infinity;this.Da=this.za=this.R=0;this.aa=new ng;this.C=new Map;this.F=new Map;this.ra=new Map;this.pa=new Map;this.K=new Map;this.qa=new Map;this.ya=new Map;this.Gb=this.I=!1;this.Eb=new Ra(5);this.l=null;this.fa=!0;this.Ea=new Set;this.U=new ib;this.Z=null}r=Tv.prototype;r.configure=function(a){this.g=a;this.l&&this.l.configure(this.g)};
r.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.I=b.isLowLatencyMode(),G(e,Wv(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,G(e,Xv(c,d.data,a),3)):e.return(c.m)})};
r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.aa&&(a.push(this.aa.destroy()),this.aa=null);this.g=this.h=null;this.wb.clear();this.m=null;this.i.clear();this.G.clear();this.F.clear();this.s.clear();this.ra.clear();this.pa.clear();this.K.clear();this.qa.clear();this.ya.clear();this.Ea.clear();this.l&&this.l.destroy();this.U&&(this.U.release(),this.U=null);return Promise.all(a)};
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){if(!Yv(a))return p.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(q){return q.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Zv(a,g));return G(p,Promise.all(b),2)}$v(a,d.map(function(q){return q.stream}));h=d.some(function(q){return 0==q.wd});d.length&&!h&&(k=aw,bw(a,k.zh),l=d.map(function(q){return q.Jb}),a.j.$a(Math.min.apply(Math,x(l))),
a.h.updateDuration());h&&cw(a);m=t(d);for(f=m.next();!f.done;f=m.next())n=f.value,n.stream.segmentIndex&&!n.stream.segmentIndex.O[0]&&a.h.disableStream(n.stream);I(p)})};function dw(a,b){return Yv(a)?a.N.get(b.type):b.te}
function Zv(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K,J,E,L,M,N,Q,R,P,aa,ba,Sa;return O(function(ta){switch(ta.g){case 1:c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new vc(f),h=g.g,b.ce&&(0<=b.pb&&h.add("_HLS_msn",String(b.pb)),0<=b.qb&&h.add("_HLS_part",String(b.qb))),b.de&&h.add("_HLS_skip","YES"),Kc(h)&&zc(g,h),c.push(g.toString());ua(ta,2);return G(ta,Wv(a,c,!0),4);case 4:k=ta.h;wa(ta,3);break;case 2:throw l=xa(ta),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return ta.return();
m=Mv(a.Fa,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.M().includes(n)||b.dh.push(n);p=Ev(m.g,"EXT-X-DEFINE");q=ew(a,p,n);u=b.stream;w=dw(a,b);return G(ta,fw(a,m,u.mimeType,b.M,q),5);case 5:v=ta.h;A=v.keyIds;y=v.drmInfos;D=function(Ma,Ya){return Ma.size===Ya.size&&[].concat(x(Ma)).every(function(Ta){return Ya.has(Ta)})};D(u.keyIds,A)||(u.keyIds=A,u.drmInfos=y,a.h.newDrmInfo(u));z=gw(a,m,w,q,b.M,b.type);B=z.segments;if(C=z.bandwidth)u.bandwidth=C;F=wl(u);H=t(B);for(K=H.next();!K.done;K=
H.next())J=K.value,J.$&&(J.$.Lc=F);u.segmentIndex.Hd(B,a.j.nb());B.length&&(E=Hv(m.g,"EXT-X-MEDIA-SEQUENCE",0),M=(L=Gv(m.g,"EXT-X-SKIP"))?Number(Z(L,"SKIPPED-SEGMENTS")):0,N=hw(E,B),Q=N.pb,R=N.qb,b.pb=Q+M,b.qb=R,P=w.get(E),u.segmentIndex.Oa(P));if(aa=u.segmentIndex.O[0]||null)b.rc=aa.startTime,ba=B[B.length-1],b.Jb=ba.endTime;if(Sa=Gv(m.g,"EXT-X-ENDLIST"))b.wd=!0;iw(a,m);jw(a,m.g,u.type,q,b.M);I(ta)}})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};
r.banLocation=function(a){this.l&&this.l.banLocation(a)};r.setMediaElement=function(a){this.Z=a};
function kw(a,b){for(var c=-1==a.H,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=dw(a,e);if(f=f.O[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.H=Math.max(a.H,k));e.mf=k;break}}}}if(!(0>a.H))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,lw(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.H-c.mf,0<e&&(d.O.splice(0,e),d=d.O[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),mw(a,
c,d)}
function nw(a,b){if(Infinity==a.ea){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.O[0]||null;null!=d&&null!=d.h&&(a.ea=Math.min(a.ea,d.h))}}b=a.ea;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!lw(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.O[0]||null;if(null==f.h)$a("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.M(),"Expect AV sync issues!");else for(mw(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.jg(b)}}}
function mw(a,b,c){b.rc+=c;b.Jb+=c;a=dw(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.M()}
function Xv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K,J,E,L,M,N,Q,R,P,aa;return O(function(ba){switch(ba.g){case 1:d=Yd;e=Mv(a.Fa,b);f=Ev(e.g,"EXT-X-DEFINE");g=[];h=[];k=[];a.j=new vk(null,0);a.j.wc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.fa=!1,D=Ev(e.g,"EXT-X-DEFINE"),n=ew(a,D,a.L),m=d.ga,z="",B=new Map,G(ba,ow(a,a.B++,n,e,l,"",m,z,!0,"Media Playlist",null,B,null,!1,null,!1),7);pw(a,f);p=Ev(e.g,"EXT-X-MEDIA");q=Ev(e.g,"EXT-X-STREAM-INF");u=Ev(e.g,"EXT-X-IMAGE-STREAM-INF");
w=Ev(e.g,"EXT-X-I-FRAME-STREAM-INF");v=Ev(e.g,"EXT-X-SESSION-KEY");A=Ev(e.g,"EXT-X-SESSION-DATA");y=Ev(e.g,"EXT-X-CONTENT-STEERING");qw(a,A);return G(ba,rw(a,y),4);case 4:return sw(a,q),tw(a,p),G(ba,uw(a,q,v,p,l,a.s),5);case 5:return g=ba.h,h=vw(a,p),G(ba,ww(a,u,w),6);case 6:k=ba.h;ba.u(3);break;case 7:C=ba.h,a.i.set(c,C),C.stream&&(F=wl(C.stream),C.stream.segmentIndex.Vb(function(Sa){Sa.$&&(Sa.$.Lc=F)})),m=C.stream.type,g.push({id:0,language:Fe(z||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
m?C.stream:null,video:"video"==m?C.stream:null,bandwidth:C.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==e.type&&(Yv(a)&&(xw(a,e),H=a.o,a.A.Y(H)),K=Array.from(a.i.values()),yw(a,K),cw(a),jw(a,e.g,m,n,l));a.m={presentationTimeline:a.j,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1};if(a.da||!a.g.hls.disableCodecGuessing){ba.u(8);break}J=[];E=t(a.m.variants);for(L=E.next();!L.done;L=E.next())M=L.value,M.audio&&""===M.audio.codecs&&J.push(M.audio.createSegmentIndex()),M.video&&""===M.video.codecs&&J.push(M.video.createSegmentIndex());return G(ba,Promise.all(J),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){N=[];Q=g[0];R=t([Q.video,Q.audio]);for(P=R.next();!P.done;P=R.next())(aa=
P.value)&&!aa.segmentIndex&&N.push(aa.createSegmentIndex());if(0<N.length)return G(ba,Promise.all(N),0)}ba.u(0)}})}
function zw(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H;return O(function(K){switch(K.g){case 1:c=xl(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return K.return(c);d=Aw(a,b);e=d.segment;f=d.segmentIndex;g=e.M();h=g[0];k=new vc(h);l=k.Ya.split(".").pop();if(m=Bw[l])return K.return(xl(m));n=Ag;q=p=null;u=e.$;if(!u){K.u(2);break}w=Dl(u.M(),u.$b(),u.Xb(),a.g.retryParameters);return G(K,Cw(a,w,n,{type:0}),3);case 3:v=K.h;p=v.data;if(!u.aesKey){K.u(4);break}return G(K,Cl(p,u.aesKey,0),5);
case 5:p=K.h;case 4:(q=v.headers["content-type"])&&(q=q.split(";")[0].toLowerCase());case 2:return A=Dl(e.M(),e.$b(),e.Xb(),a.g.retryParameters),G(K,Cw(a,A,n,{type:1}),6);case 6:y=K.h;D=y.data;if(!e.aesKey){K.u(7);break}return G(K,Cl(D,e.aesKey,f),8);case 8:D=K.h;case 7:(z=y.headers["content-type"])&&(z=z.split(";")[0].toLowerCase());B="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");C=["audio/mp4","video/mp4","video/iso.segment"];if(Dj(Cb(D))){var J=D;var E=Cb(J);E=(new pj).parse(E);
var L=E.rd();E=E.Hf();var M=[],N=!1,Q=!1;switch(L.audio){case "aac":case "aac-loas":M.push("mp4a.40.2");N=!0;break;case "mp3":M.push("mp4a.40.34");N=!0;break;case "ac3":M.push("ac-3");N=!0;break;case "ec3":M.push("ec-3");N=!0;break;case "opus":M.push("opus"),N=!0}switch(L.video){case "avc":E.Na?M.push(E.Na):M.push("avc1.42E01E");Q=!0;break;case "hvc":E.Na?M.push(E.Na):M.push("hvc1.1.6.L93.90");Q=!0;break;case "av1":M.push("av01.0.01M.08"),Q=!0}if(M.length){L=N&&!Q;N=new Map;if(Q){Q=new Ib("video/mp2t");
Q.i(J);J=t(Q.j());for(var R=J.next();!R.done;R=J.next())R=R.value,N.set(R,R);Q.g()}E={type:L?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:E.height,width:E.width,channelCount:null,sampleRate:null,closedCaptions:N,Pd:null,colorGamut:null}}else E=null;if(F=E)return K.return(F)}else if(B.includes(l)||C.includes(z)||q&&C.includes(q))if(H=yl(p,D))return K.return(H);return z?K.return(xl(z)):q?K.return(xl(q)):K.return(c)}})}
function cw(a){if(Yv(a)){if(a.xa==Dw){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Jb),c=Math.min(c,e.rc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.A);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Ie(b)}}else a.j.$a(Ew(a));if(!a.j.s)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=c.stream.segmentIndex.get(0))&&
c.h&&a.j.lh(c.h);a.j.re()}function pw(a,b){var c=(new vc(a.L)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
function ew(a,b,c){c=(new vc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(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.s.get(f))&&d.set(f,e)}return d}
function sw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Fw(a,d);if(f){var g=Ud(Wd,d);a.F.set(f,g);Qb(d,g)}e&&(f=Ud("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.F.set(e,f));c&&(e=Ud("video",d),e||(e=a.g.hls.defaultVideoCodec),a.F.set(c,e))}}
function qw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Iv([a.L],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
function rw(a,b){var c,d,e,f,g,h;return O(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=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.l=new Nt(a.h);a.l.configure(a.g);a.l.i=[a.L];a.l.setManifestType("HLS");a.l.h=g;c=Ot(a.l,h);break}return G(k,c,0)})}
function vw(a,b){var c=Fv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Gw(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=Bv(d.value,"GROUP-ID");if(d=a.F.get(e))if(e=a.G.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=Hw(Wd,d)||Iw(Wd),Jw(f.stream)}}return b.filter(function(g){return g})}
function Jw(a){a.fullMimeTypes=new Set([ae(a.mimeType,a.codecs)])}
function ww(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ua(m,2);return G(m,Kw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=xa(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=Bv(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
p=Z(g,"CHARACTERISTICS"),q=Lw(a,a.B++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Z(g,"RESOLUTION"),w=t(u?u.split("x"):[null,null]),v=w.next().value,A=w.next().value;q.stream.width=Number(v)||void 0;q.stream.height=Number(A)||void 0;var y=Z(g,"BANDWIDTH");y&&(q.stream.bandwidth=Number(y));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(D){if(a.g.hls.ignoreImageStreamFailures)return null;throw D;}})),G(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
function Mw(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=zv(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Gw(a,d[g],c)}
function uw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K,J,E,L,M,N,Q,R,P,aa,ba,Sa,ta,Ma,Ya,Ta;return O(function(gb){switch(gb.g){case 1:g=[];h=new Set;if(!(0<c.length)){gb.u(2);break}k=t(c);l=k.next();case 3:if(l.done){gb.u(2);break}m=l.value;n=Bv(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";q=null;if("NONE"==n){gb.u(4);break}if(Nw(n)){u=Iv(e(),Bv(m,"URI"),f);w=u.sort().join("");a.K.has(w)||(v=ug(u,a.g.retryParameters),A=Cw(a,v,6),a.K.set(w,A));gb.u(4);break}if("identity"!=p){q=(y=Ow[p])?
y(m,""):null;gb.u(6);break}return G(gb,Pw(a,m,"",e,null,f),9);case 9:q=gb.h;case 6:if(q){if(q.keyIds)for(D=t(q.keyIds),z=D.next();!z.done;z=D.next())B=z.value,h.add(B);g.push(q)}case 4:l=k.next();gb.u(3);break;case 2:C={};F=t(b);for(H=F.next();!H.done;H=F.next())K=H.value,J=zv(K),C[J]?C[J].push(K):C[J]=[K];E=[];for(L in C)M=C[L],N=M[0],Q=Z(N,"FRAME-RATE"),R=Number(Z(N,"AVERAGE-BANDWIDTH"))||Number(Bv(N,"BANDWIDTH")),P=Z(N,"RESOLUTION"),aa=t(P?P.split("x"):[null,null]),ba=aa.next().value,Sa=aa.next().value,
ta=Z(N,"VIDEO-RANGE"),(Ma=Z(N,"REQ-VIDEO-LAYOUT"))&&Ma.includes(",")&&(Ya=Ma.split(",").filter(function(Va){return"CH-STEREO"==Va||"CH-MONO"==Va}),Ma=Ya[0]),Ma=Ma||"CH-MONO",Ta=Qw(a,M,d),E.push.apply(E,x(Rw(a,Ta.audio,Ta.video,R,ba,Sa,Q,ta,Ma,g,h)));return gb.return(E.filter(function(Va){return null!=Va}))}})}
function Qw(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=Z(m,"AUDIO");var n=Z(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Z(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(w){return f.includes(Bv(w,"GROUP-ID"))}),Mw(a,k,e));k=(e=f.sort().join(","))&&a.G.has(e)?a.G.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var q=b.map(function(w){return Bv(w,
"URI")});h=d.audio.find(function(w){return w&&w.M().find(function(v){return q.includes(v)})});g=Fw(a,b[0]);n=Ud("video",g);(p=Ud("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(w){var v=Z(w,"URI")||"",A=Z(w,"TYPE");w=Bv(w,"GROUP-ID");return"SUBTITLES"!=A&&""==v&&f.includes(w)}))&&(l=Z(c,"LANGUAGE"),
n=Z(c,"NAME"),p=Sw(c),Tw(c),m=Z(c,"CHARACTERISTICS"),u=Uw(c));a=Vw(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
function Fw(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.da=0<c.length;a.da||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return zl(a)}function Sw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
function Uw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function Tw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
function Rw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Ww(p.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 q=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=q?q.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=q?q.stream.drmInfos:null;
q=q?q.M().sort().join(","):"";var u=f?f.M().sort().join(","):"";q=q+" - "+u;h&&k&&!Oc(n,p)||a.wb.has(q)||(h={id:a.B++,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.wb.add(q))}return e}
function tw(a,b){b=Fv(b,"CLOSED-CAPTIONS");a.fa=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=Fe(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Bv(d,"GROUP-ID");d=Bv(d,"INSTREAM-ID").replace("SERVICE","svc");a.C.get(e)||a.C.set(e,new Map);a.C.get(e).set(d,c)}}
function Gw(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Bv(k,"URI");k=Bv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Bv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Wd);if(k==Wd)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.F.has(l)){b=a.F.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.l){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
m=n.next().value;n=n.next().value;(m=c.get(m))&&Rt(a.l,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?Sw(h):null;var p="audio"==k?Tw(h):!1,q=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?Uw(h):null;d=Lw(a,l,d,b,k,c,m,f,n,null,q,u,h,p);d.stream&&(d.stream.groupId=g);a.G.has(g)?a.G.get(g).push(d):a.G.set(g,[d]);a.i.set(e,d);return d}
function Kw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Bv(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Lw(a,a.B++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?G(p,h.stream.createSegmentIndex(),3):p.u(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),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=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
function Vw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var q=p.value;p=Bv(q,"URI");q=Z(q,"PATHWAY-ID");a.l&&q&&Rt(a.l,l,q,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.C.get(b);break a}a.fa=!1}else if(!b&&a.C.size)for(b=t(a.C.keys()).next();!b.done;){b=a.C.get(b.value);break a}b=null}c=Td(d,c);d=Lw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
function Lw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(B){var C,F,H,K,J,E,L,M,N,Q,R,P,aa,ba,Sa,ta,Ma,Ya,Ta,gb,Va,Ua,mc;return O(function(Oa){switch(Oa.g){case 1:return C=Yd,F=y.M(),ua(Oa,2),G(Oa,Wv(a,y.M(),!0),4);case 4:H=Oa.h;wa(Oa,3);break;case 2:K=xa(Oa);v.closeSegmentIndex();if(J=a.h.disableStream(v))return Oa.return();throw K;case 3:if(B.aborted)return Oa.return();E=H.uri;E==H.originalUri||F.includes(E)||A.push(E);L=Mv(a.Fa,H.data);if(1!=L.type)throw new T(2,4,4017);M=Ev(L.g,"EXT-X-DEFINE");N=ew(a,
M,E);Q=!1;(!a.da&&a.g.hls.disableCodecGuessing||a.fa&&e==C.ga&&!a.g.hls.disableClosedCaptionsDetection)&&0<L.segments.length&&(a.fa=!1,Q=!0);R=!a.da&&a.g.hls.disableCodecGuessing;P=Yv(a);return G(Oa,ow(a,0,N,L,w,d,e,f,g,h,k,l,m,n,p,q,void 0,Q,R),5);case 5:aa=Oa.h;if(B.aborted)return Oa.return();ba=aa.stream;Yv(a)&&!P&&xw(a,L);y.rc=aa.rc;y.Jb=aa.Jb;y.de=aa.de;y.ce=aa.ce;y.wd=aa.wd;y.te=aa.te;y.pb=aa.pb;y.qb=aa.qb;y.Nf=!0;v.segmentIndex=ba.segmentIndex;v.encrypted=ba.encrypted;v.drmInfos=ba.drmInfos;
v.keyIds=ba.keyIds;v.mimeType=ba.mimeType;v.bandwidth=v.bandwidth||ba.bandwidth;v.codecs=v.codecs||ba.codecs;v.closedCaptions=v.closedCaptions||ba.closedCaptions;v.width=v.width||ba.width;v.height=v.height||ba.height;v.hdr=v.hdr||ba.hdr;v.colorGamut=v.colorGamut||ba.colorGamut;"und"==v.language&&"und"!=ba.language&&(v.language=ba.language);v.language=v.language||ba.language;v.channelsCount=v.channelsCount||ba.channelsCount;v.audioSamplingRate=v.audioSamplingRate||ba.audioSamplingRate;Jw(v);v.drmInfos.length&&
a.h.newDrmInfo(v);Sa=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)Sa=!0;a.m&&Sa&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==C.ga||e==C.X)for(ta=t(a.i.values()),Ma=ta.next();!Ma.done;Ma=ta.next())Ya=Ma.value,Ya.Nf||Ya.type!=e||(Ya.stream.mimeType=ba.mimeType,Jw(Ya.stream));e==C.ta&&(Ta=ba.segmentIndex.get(0))&&Ta.$&&(v.mimeType="application/mp4",Jw(v));gb=wl(v);v.segmentIndex.Vb(function(lb){lb.$&&(lb.$.Lc=gb)});Xw(a)&&(a.Hb?yw(a,[y]):(a.Hb=!0,Va=Array.from(a.i.values()),
Ua=Va.filter(function(lb){return lb.stream.segmentIndex}),yw(a,Ua),cw(a),mc=a.o,0<mc&&a.A.Y(mc)));jw(a,L.g,v.type,N,w);I(Oa)}})}function w(){return a.l&&1<c.length?St(a.l,b):A.concat(Jv([a.L],c,a.s))}var v=Yw(a,d,e,f,g,h,k,l,m,n,p,q),A=[],y={stream:v,type:e,dh:A,M:w,rc:0,Jb:0,te:new Map,de:!1,ce:!1,wd:!1,mf:-1,pb:-1,qb:-1,Nf:!1},D=null,z=new AbortController;v.createSegmentIndex=function(){if(D)return D;z=new AbortController;return D=new Promise(function(B){B(u(z.signal))})};v.closeSegmentIndex=function(){D&&
!v.segmentIndex&&z.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);D=null};return y}function Ew(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&&(b=Math.min(b,c.Jb));return b}function $v(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Vb(function(e){c.push(e)});a.j.Id(c)}
function yw(a,b){if(!Yv(a))for(var c=Ew(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Ec(0,c);$v(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?kw(a,b):(nw(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&kw(a,b))}function lw(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
function Xw(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 ow(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y){A=void 0===A?!0:A;y=void 0===y?!0:y;var D,z,B,C,F,H,K,J,E,L,M,N,Q,R,P,aa,ba,Sa,ta,Ma,Ya,Ta,gb,Va,Ua,mc;return O(function(Oa){switch(Oa.g){case 1:var lb=Gv(d.g,"EXT-X-PLAYLIST-TYPE"),Pb=Gv(d.g,"EXT-X-ENDLIST");Pb=lb&&"VOD"==lb.value||Pb;lb=lb&&"EVENT"==lb.value&&!Pb;lb=!Pb&&!lb;Pb?bw(a,Vv):lb?bw(a,Dw):bw(a,Zw);Yv(a)&&iw(a,d);D=Yv(a)?a.N.get(g):new Map;z=gw(a,d,D,c,e,g);B=z.segments;C=z.bandwidth;J=K=H=F=null;if(!(0<B.length&&A)){Oa.u(2);break}return G(Oa,
zw(a,B),3);case 3:E=Oa.h,g=E.type,h=E.language,m=E.channelCount,u=E.sampleRate,n=E.closedCaptions,H=E.height,F=E.width,K=E.Pd,J=E.colorGamut,y&&(v=E.mimeType,f=E.codecs);case 2:if(v){Oa.u(4);break}return G(Oa,$w(a,g,f,B),5);case 5:v=Oa.h;case 4:return G(Oa,fw(a,d,v,e,c),6);case 6:L=Oa.h;M=L.drmInfos;N=L.keyIds;Q=L.encrypted;R=L.Dh;if(Q&&!M.length&&!R)throw new T(2,4,4026);P=Yw(a,f,g,h,k,l,m,n,p,q,u,w);P.encrypted=Q;P.drmInfos=M;P.keyIds=N;P.mimeType=v;C&&(P.bandwidth=C);Jw(P);"video"==g&&(F||H||K||
J)&&Ww(P,F,H,null,K,null,J);Yv(a)&&iw(a,d);aa=B[0].startTime;ba=B[B.length-1];Sa=ba.endTime;ta=new Rk(B);P.segmentIndex=ta;Ya=(Ma=Gv(d.g,"EXT-X-SERVER-CONTROL"))?null!=Av(Ma,"CAN-SKIP-UNTIL"):!1;Ta=Ma?null!=Av(Ma,"CAN-BLOCK-RELOAD"):!1;gb=Hv(d.g,"EXT-X-MEDIA-SEQUENCE",0);Va=hw(gb,B);Ua=Va.pb;mc=Va.qb;return Oa.return({stream:P,type:g,dh:[],M:e,rc:aa,Jb:Sa,de:Ya,ce:Ta,wd:!1,mf:-1,pb:Ua,qb:mc,te:D,Nf:!1})}})}
function hw(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{pb:a,qb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{pb:a,qb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{pb:a,qb:c}}
function Yw(a,b,c,d,e,f,g,h,k,l,m,n){var p=Hw(c,b)||Iw(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==Wd?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.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:p,codecs:b,kind:c==Wd?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Fe(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo: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};Jw(a);return a}
function fw(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K,J,E,L,M,N,Q,R;return O(function(P){switch(P.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Ev(k.g,"EXT-X-KEY"),m=null,l.length)for(m=ax(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())q=p.value,f.set(q,m);w=u=!1;v=[];A=new Set;y=t(f);D=y.next();case 2:if(D.done){P.u(4);break}z=D.value;B=t(z);C=B.next().value;F=B.next().value;H=C;K=F;J=Bv(H,"METHOD");if("NONE"==J){P.u(3);break}u=
!0;E=Z(H,"KEYFORMAT")||"identity";L=null;if(Nw(J)){w=!0;P.u(3);break}if("identity"!=E){L=(M=Ow[E])?M(H,c):null;P.u(6);break}return G(P,Pw(a,H,c,d,K,e),8);case 8:L=P.h;case 6:if(L){if(L.keyIds)for(N=t(L.keyIds),Q=N.next();!Q.done;Q=N.next())R=Q.value,A.add(R);v.push(L)}case 3:D=y.next();P.u(2);break;case 4:return P.return({drmInfos:v,keyIds:A,encrypted:u,Dh:w})}})}
function bx(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Ld(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Hv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.pa.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Bv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,q,u,w;return O(function(v){if(1==v.g)return l=Iv(d(),Bv(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=ug(l,a.g.retryParameters),p=Cw(a,n,6),a.K.set(m,p)),G(v,a.K.get(m),2);if(3!=v.g){q=v.h;if(!q.data||q.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};w=k;return G(v,window.crypto.subtle.importKey("raw",q.data,u,!0,["decrypt"]),3)}w.cryptoKey=v.h;k.fetchKey=void 0;
I(v)})};a.pa.set(c,k)}return a.pa.get(c)}
function iw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Gv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Gv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Gv(b.g,"EXT-X-PART-INF"))a.R=Number(Bv(e,"PART-TARGET"));b=Gv(b.g,"EXT-X-SERVER-CONTROL");a.I&&a.R?(a.o=a.Gb?5*a.R<=c?Math.min(a.R,a.o):Math.min(c,a.o):Math.min(a.R,a.o),a.Da=b?Number(Bv(b,"PART-HOLD-BACK")):0):(a.o=Math.min(c,a.o),c=b?
Av(b,"HOLD-BACK"):null,a.za=c?Number(c.value):0);a.bb=Math.max(d,a.bb)}function xw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Da)b=a.Da;else if(a.za)b=a.za;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.bb*c}a.j.mh(0);a.j.eg(b);a.j.wc(!1)}
function ax(a,b,c,d,e){var f=Gv(c,"EXT-X-MAP");if(!f)return null;var g=Bv(f,"URI"),h=Iv(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ra.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Nw(Bv(m,"METHOD"))&&m.id<f.id&&(k=bx(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=cx(h,f,l,k);a.ra.set(g,b)}return a.ra.get(g)}
function cx(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Bi(function(){return a},e,f,null,null,null,d)}
function dx(a,b,c,d,e,f,g,h,k){var l=d.g,m=Gv(l,"EXTINF"),n=0,p=0,q=null;d.Bb.length&&(a.m.isLowLatency=!0);var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Gv(l,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(u=rh(w.value))}var v=Ei;Gv(l,"EXT-X-GAP")&&(a.m.gapCount++,v=2);if(!m){if(0==d.Bb.length)throw new T(2,4,4024,"EXTINF");if(!a.I)return null}var A=[];w=!1;var y=null,D=!1,z=!1;if(a.I&&d.Bb.length){n=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var B=u,C={},F=
0;F<d.Bb.length;C={fd:C.fd,Wd:C.Wd},F++){var H=d.Bb[F],K=0==F?c:A[A.length-1],J=0==F?e:K.endTime,E=Number(Z(H,"DURATION"))||a.R;if(E){var L=J+E,M=0,N=null;"EXT-X-PRELOAD-HINT"==H.name?(M=(M=Z(H,"BYTERANGE-START"))?Number(M):0,(K=Z(H,"BYTERANGE-LENGTH"))?N=M+Number(K)-1:M&&(N=Number.MAX_SAFE_INTEGER)):(M=Z(H,"BYTERANGE"),N=t(ex(K,M)),M=N.next().value,N=N.next().value);C.Wd=Z(H,"URI");if(C.Wd){K=Ei;"YES"==Z(H,"GAP")&&(a.m.gapCount++,K=2,D=!0);C.fd=null;var Q=function(P){return function(){null==P.fd&&
(P.fd=Iv(h(),P.Wd,f));return P.fd}}(C);n&&0<=M&&null!=N&&(y=Q,w=!0);J=new Di(J,L,Q,M,N,b,0,0,Infinity,[],"",null,B,K,k);"EXT-X-PRELOAD-HINT"==H.name&&(J.Of(),z=!0);"YES"!=Z(H,"INDEPENDENT")&&0<F&&J.se();A.push(J);B&&(B+=E)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(A.length)n=A[A.length-1].endTime;else return null;w&&(D||0!=A[0].Ha?(w=!1,y=null):A=[]);(m=Gv(l,"EXT-X-BYTERANGE"))?(q=t(ex(c,m.value)),p=q.next().value,q=q.next().value):A.length&&(p=A[0].Ha,q=A[A.length-
1].sa);c="";m=null;"image"==g&&(c="1x1",g=Gv(l,"EXT-X-TILES"))&&(c=Bv(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var R=null;b=new Di(e,n,function(){if(y)return y();null==R&&(R=Iv(h(),d.h,f));return R||[]},p,q,b,0,0,Infinity,A,c,m,u,v,k,0<A.length&&!!d.h);w&&(a.Gb=!0,b.Vg(),z&&b.Of());return b}function ex(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.sa+1,d=c+b-1);return[c,d]}
function jw(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.j.m;if(f&&!lw(a,c))for(b=Ev(b,"EXT-X-DATERANGE"),b=b.sort(function(w,v){w=Bv(w,"START-DATE");v=Bv(v,"START-DATE");return w<v?-1:w>v?1:0}),c=0;c<b.length;c++){var g=b[c],h=Bv(g,"ID");if(!a.Ea.has(h)){var k=Bv(g,"START-DATE"),l=rh(k);if(!isNaN(l)){k=Math.max(0,l-f);var m=null,n=Z(g,"END-DATE");if(n&&(n=rh(n),!isNaN(n)&&(m=n-f,0>m)))continue;if(null==m&&(n=Z(g,"DURATION")||Z(g,"PLANNED-DURATION"))&&(n=parseFloat(n),isNaN(n)||(m=k+n),0>l-f+n))continue;
n=Z(g,"CLASS")||"com.apple.quicktime.HLS";var p="YES"==Z(g,"END-ON-NEXT");if(null==m&&p){for(p=c+1;p<b.length;p++){var q=Z(b[p],"CLASS")||"com.apple.quicktime.HLS";if(n==q&&(q=Bv(b[p],"START-DATE"),q=rh(q),!isNaN(q)&&q&&q>l)){m=Math.max(0,q-f);break}}if(null==m)continue}l="ID CLASS START-DATE END-DATE DURATION END-ON-NEXT".split(" ");p=[];g=t(g.attributes);for(q=g.next();!q.done;q=g.next())if(q=q.value,!l.includes(q.name)){var u=Kv(q.value,d);if("X-ASSET-URI"==q.name||"X-ASSET-LIST"==q.name)u=Iv(e(),
q.value,d)[0];p.push({key:q.name,description:"",data:u,mimeType:null,pictureType:null})}if(p.length)a.h.onMetadata(n,k,m,p);a.Ea.add(h)}}}}}
function gw(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Hv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Hv(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Gv(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,q=0;Yv(a)&&c.has(p)&&(q=c.get(p));0===q&&a.xa==Dw&&0<c.size&&!c.has(p)&&(q=a.j.nb());var u=[],w=null;m=[];for(var v=0;v<g.length;v++){var A=g[v],y=0==v?q:w.endTime;p=l+n+v;Gv(A.g,"EXT-X-DISCONTINUITY")&&k++;var D=t(A.g);for(var z=D.next();!z.done;z=D.next())z=z.value,"EXT-X-KEY"==z.name&&(Nw(Bv(z,"METHOD"))?
h=bx(a,z,b,e,d):h=void 0);c.set(p,y);D=ax(a,b,A.g,e,d);!a.I&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.I=a.h.isLowLatencyMode());if(y=dx(a,D,w,A,y,d,f,e,h))(w=Hv(A.g,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:y.endTime-y.startTime}):m.length&&(w=m.pop(),w.duration+=y.endTime-y.startTime,m.push(w)),w=y,y.j=k,lw(a,f)&&null!=a.H&&p<a.H||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(B,C){return B+C.duration},0),b=Math.round(m.reduce(function(B,C){return B+C.bitrate*C.duration},0)/
b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={Zc:c.Zc,Yc:c.Yc,Qd:c.Qd,Rb:c.Rb,Vc:c.Vc},d++)if(c.Rb=u[d],null==c.Rb.h)for(c.Yc=0,c.Zc=d,e=function(B){return function(){var C=u[B.Zc];if(C){if(null!=C.h)return C.h+B.Yc;B.Yc-=C.endTime-C.startTime;B.Zc+=1}return null}}(c),c.Vc=0,c.Qd=d,g=function(B){return function(){var C=u[B.Qd];if(C){C!=B.Rb&&(B.Vc+=C.endTime-C.startTime);if(null!=C.h)return C.h+B.Vc;--B.Qd}return null}}(c);null==c.Rb.h;)c.Rb.h=g(),null==c.Rb.h&&(c.Rb.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&&!lw(a,f))for(a=t(u),d=a.next();!d.done;d=a.next())d.value.jg(c);return{segments:u,bandwidth:b}}function Hw(a,b){if(a==Wd){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 Iw(a){return a==Wd?"text/vtt":fx[a].mp4}function Aw(a,b){a=Yv(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.ac()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function $w(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A;return O(function(y){switch(y.g){case 1:e=Ag;f=Aw(a,d);g=f.segment;if(2==g.status)return y.return(Iw(b));h=g.M();k=new vc(h[0]);l=k.Ya.split(".").pop();m=fx[b];if((n=m[l])||(n=Bw[l])||(n=Hw(b,c)))return y.return(n);q=1;u=ug(h,a.g.retryParameters);ua(y,2);u.method="HEAD";return G(y,Cw(a,u,e,{type:q}),4);case 4:w=y.h;p=w.headers["content-type"];wa(y,3);break;case 2:v=xa(y);if(!v||1002!=v.code&&1001!=v.code){y.u(3);break}u.method="GET";return G(y,
Cw(a,u,e,{type:q}),6);case 6:A=y.h,p=A.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return(Iw(b))}})}function Ww(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 Wv(a,b,c){return Cw(a,ug(b,a.g.retryParameters),0,{type:c?2:3})}
function Uv(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ua(h,2);b=Date.now();return G(h,a.update(),4);case 4:c=Date.now();Yv(a)&&(d=(c-b)/1E3,a.Eb.sample(1,d),e=a.o,f=Math.max(0,e-Wa(a.Eb)),a.A.Y(f));wa(h,3);break;case 2:g=xa(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.A.Y(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();I(h)}})}
function Yv(a){return a.xa!=Vv}function bw(a,b){a.xa=b;a.j&&a.j.wc(!Yv(a));Yv(a)||a.A.stop()}function Cw(a,b,c,d){if(!a.aa)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);og(a.aa,b);return b.promise}function Nw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
function Pw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v,A,y,D,z;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(td())throw new T(2,4,4041);g=Bv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=Iv(d(),Bv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Md(Id(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.qa.has(m)||(n=ug(k,a.g.retryParameters),p=Cw(a,n,6),a.qa.set(m,p));return G(B,a.qa.get(m),
3);case 3:q=B.h,l=Md(q.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.ya.has(e)){w=a.ya.get(e);B.u(5);break}v=Dl(e.M(),e.$b(),e.Xb(),a.g.retryParameters);A=Ag;return G(B,Cw(a,v,A,{type:0}),6);case 6:y=B.h,w=Bl(y.data),a.ya.set(e,w);case 5:w&&(u=w);case 4:return D=new Map,D.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),B.return(Sd(D,z))}})}S("shaka.hls.HlsParser",Tv);
var Bw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},fx={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Ow={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(td())throw new T(2,4,4041);b=Bv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");return Rd("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],Bv(a,"URI"))},
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Bv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Bv(a,"URI");b=Sv(b.split("?")[0]);b=Cb(b.data);c=Rd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Bv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";
"SAMPLE-AES"==b&&(c="cbcs");a=Bv(a,"URI");a=Sv(a.split("?")[0]);a=Cb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=$g(a,b,new Set,0);return Rd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},Vv="VOD",Zw="EVENT",Dw="LIVE",aw={zh:Vv,xj:Zw,Fj:Dw};wi["application/x-mpegurl"]=function(){return new Tv};wi["application/vnd.apple.mpegurl"]=function(){return new Tv};function gx(a){var b=0,c=Gb(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=Cb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function hx(a){if(a=ix(a))a:{a=t(kh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=lh(b.value,"LA_URL")){a=ih(b);break a}a=""}else a="";return a}
function ix(a){a=Id(ih(a));a=gx(a).filter(function(b){return b.type===jx})[0];if(!a)return null;a=yd(a.value,!0);return(a=bh(a,"WRMHEADER"))?a:null}var jx=1,kx=(new Map).set("com.microsoft.playready",hx).set("com.microsoft.playready.recommendation",hx).set("com.microsoft.playready.software",hx).set("com.microsoft.playready.hardware",hx);function lx(a){if(!mx){mx=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);nx=ox("ftyp",b,d,b,c);b=ox("dref",px);qx=ox("dinf",b)}this.g=a}
function rx(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=ox;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/(sx+1));m=Math.floor(m%(sx+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(tx(h,4)),[0,0,0,0],x(tx(n,4)),x(tx(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(tx(k,2)),[0,0],x(tx(l,
2)),[0,0]));h=ox("tkhd",h);k=ox;n=g.duration*g.timescale;l=Math.floor(n/(sx+1));n=Math.floor(n%(sx+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(tx(g.timescale,4)),x(tx(l,4)),x(tx(n,4)),x(tx(m,2)),[0,0]));l=ox("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=ux;break;case "audio":m=vx}n=ox("hdlr",m);a:{switch(g.type){case "video":g=ox("minf",ox("vmhd",wx),qx,xx(g));break a;
case "audio":g=ox("minf",ox("smhd",yx),qx,xx(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Pd.apply(Fd,x(b));f=a.g[0];c=ox;d=f.duration*f.timescale;e=Math.floor(d/(sx+1));d=Math.floor(d%(sx+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(tx(f.timescale,4)),x(tx(e,4)),x(tx(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=ox("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(tx(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=ox("trex",k),h.call(g,k);a=Pd.apply(Fd,x(d));a=ox("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=Pd.apply(Fd,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(nx.byteLength+
a.byteLength);b.set(nx);b.set(a,nx.byteLength);return b}
function xx(a){var b=ox,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.wa.byteLength)var e=ox("avcC",a.wa);else{e=ox;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.ab.length;n++){var p=zx(a.ab[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(x(tx(c,2)),x(tx(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=Ax(a);g=new Uint8Array([]);
a.encrypted&&(g=Bx(a),d="encv");c=ox(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.wa.byteLength&&(c=ox("hvcC",a.wa)),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(x(tx(d,2)),x(tx(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=Ax(a),g=new Uint8Array([]),a.encrypted&&(g=Bx(a),e="encv"),c=ox(e,d,
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=ox(".mp3",Cx(a));else if(a.codecs.includes("ac-3"))c=ox("dac3",a.ma),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Bx(a),d="enca"),a=ox(d,Cx(a),c,e);else if(a.codecs.includes("ec-3"))c=ox("dec3",a.ma),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Bx(a),d="enca"),a=ox(d,Cx(a),c,e);else if(a.codecs.includes("opus"))c=ox("dOps",a.ma),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Bx(a),d="enca"),a=ox(d,Cx(a),c,e);else{if(0<a.ma.byteLength)c=ox("esds",
a.ma);else{c=ox;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Td("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(x(tx(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=Bx(a),d="enca");
a=ox(d,Cx(a),c,e)}c=a}a=ox("stsd",Dx,c);return b("stbl",a,ox("stts",Ex),ox("stsc",Fx),ox("stsz",Gx),ox("stco",Hx))}function Ax(a){if(!a.Ba&&!a.Ca)return new Uint8Array([]);var b=a.Ca;a=new Uint8Array([].concat(x(tx(a.Ba,4)),x(tx(b,4))));return ox("pasp",a)}function Cx(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(tx(a.stream.audioSamplingRate||44100,2)),[0,0]))}
function Bx(a){var b=ox;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(tx(d,4))));c=ox("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=ox("schm",d);e=ox;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.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=zx(h.value)}a=new Uint8Array([0,
0,0,0,0,0,1,8]);f=ox("tenc",a,f);return b("sinf",c,d,e("schi",f))}
function Ix(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=ox;var g=new Uint8Array([0,0,0,0].concat(x(tx(c.data?c.data.sb:0,4))));g=ox("mfhd",g);var h;var k=c.data?c.data.Za:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ua<<4|m.Wa<<2|m.Va}k=ox("sdtp",l);var n=k.length+92;l=ox;h=new Uint8Array([0,0,0,58].concat(x(tx(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=ox("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
0;var p=Math.floor(m%(sx+1));m=new Uint8Array([1,0,0,0].concat(x(tx(Math.floor(m/(sx+1)),4)),x(tx(p,4))));m=ox("tfdt",m);var q=n;n=c.data?c.data.Za:[];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(x(tx(p,4)),x(tx(q,4))),0);for(q=0;q<p;q++){var v=n[q];u=tx(v.duration,4);var A=tx(v.size,4),y=v.flags;v=tx(v.eb,4);w.set([].concat(x(u),x(A),[y.hb<<2|y.Ua,y.Wa<<6|y.Va<<4|y.ib,y.Ta&61440,y.Ta&15],x(v)),12+16*q)}n=ox("trun",w);k=l("traf",h,m,n,k);f=f("moof",
g,k);e.call(d,b,[f,Jx(c)])}return Pd.apply(Fd,x(b))}function Jx(a){a=(a.data?a.data.Za:[]).map(function(b){return b.data});a=Pd.apply(Fd,x(a));return ox("mdat",a)}function tx(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function zx(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 ox(a){var b=Ga.apply(1,arguments),c=Kx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Kx[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 mx=!1,sx=Math.pow(2,32)-1,Kx={},ux=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]),vx=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]),Ex=new Uint8Array([0,0,0,0,0,0,0,0]),Fx=new Uint8Array([0,0,0,0,0,0,0,0]),Hx=new Uint8Array([0,0,0,0,0,0,0,0]),Gx=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),wx=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),yx=new Uint8Array([0,
0,0,0,0,0,0,0]),Dx=new Uint8Array([0,0,0,0,0,0,0,1]),nx=new Uint8Array([]),px=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),qx=new Uint8Array([]);function Lx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Ra(5);this.o=new Uc(function(){Mx(a)});this.A=new ng;this.m=new Map}r=Lx.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,G(d,Nx(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
function Mx(a){var b;O(function(c){switch(c.g){case 1:return ua(c,2),G(c,Nx(a),4);case 4:wa(c,3);break;case 2:b=xa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();I(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.A.destroy()};
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ua(c,2),G(c,Nx(a),4);if(2!=c.g)return wa(c,0);b=xa(c);if(!a.h||!b)return c.return();a.h.onError(b);I(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};r.setMediaElement=function(){};
function Nx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=ug(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),og(a.A,e),G(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!=ym){sb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Eu(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
l);n(m);m=Bd(m.outerHTML)}var p=ah(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=zm&&l(p);a.i||(a.i=new vk(null,0));if(l=oh(p,"IsLive",yh,!1))throw new T(2,4,4047);a.i.wc(!l);n=oh(p,"TimeScale",wh,1E7);m=oh(p,"DVRWindowLength",wh);l&&(0===m||isNaN(m))&&(m=Infinity);var q=oh(p,"CanSeek",yh,!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.Ie(q);m=oh(p,
"Duration",wh,Infinity);l||a.i.$a(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};q=hh(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];q=t(q);for(u=q.next();!u.done;u=q.next())m=m.concat(hh(u.value,"ProtectionHeader"));if(m.length){q=[];for(u=0;u<m.length;u++){var w=m[u],v=w.attributes.SystemID.toLowerCase(),A=n[v];if(A){var y=ix(w);if(y)a:{y=t(kh(y,"DATA"));for(var D=y.next();!D.done;D=y.next())if(D=lh(D.value,"KID")){y=Id(ih(D));y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],
y[4],y[7],y[6]].concat(x(y.slice(8))));y=Md(y);break a}y=null}else y=null;D=Id(ih(w));v=Ld(v.replace(/-/g,""));v=[{initData:$g(D,v,new Set,0),initDataType:"cenc",keyId:y}];v=Rd(A,"cenc",v);y&&v.keyIds.add(y);if(A=kx.get(A))v.licenseServerUri=A(w);q.push(v)}}n=q}else n=[];u=n;q=[];n=[];m=[];p=hh(p,"StreamIndex");p=t(p);for(w=p.next();!w.done;w=p.next()){w=w.value;A=hh(w,"QualityLevel");v=l.timescale;y=l.duration;D=hh(w,"c");for(var z=[],B=0,C=0;C<D.length;++C){var F=D[C],H=D[C+1],K=oh(F,"t",wh),J=
oh(F,"d",wh);F=oh(F,"r",uh);if(!J)break;K=null!=K?K:B;F=F||0;if(0>F)if(H){H=oh(H,"t",wh);if(null==H)break;else if(K>=H)break;F=Math.ceil((H-K)/J)-1}else{if(Infinity==y)break;else if(K/v>=y)break;F=Math.ceil((y*v-K)/J)-1}for(H=0;H<=F;++H)B=K+J,z.push({start:K/v,end:B/v,og:K}),K=B}v=z;A=t(A);for(y=A.next();!y.done;y=A.next())(y=Ox(a,w,y.value,v,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Wd||a.g.disableText||m.push(y):n.push(y):q.push(y))}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]),y=w.next();!y.done;y=w.next())A=p,v=A.push,y=y.value,D=0,u&&u.bandwidth&&0<u.bandwidth&&(D+=u.bandwidth),y&&y.bandwidth&&0<y.bandwidth&&(D+=y.bandwidth),y={id:a.s++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!y&&y.primary,audio:u,video:y,bandwidth:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},v.call(A,y);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:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1},a.i.re());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);I(k)})}
function Ox(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return ab("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=oh(c,"Bitrate",vh),m=oh(c,"MaxWidth",vh),n=oh(c,"MaxHeight",vh),p=oh(c,"Channels",vh),q=oh(c,"SamplingRate",vh),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.$a(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:Fe(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo: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};if(e=b.attributes.Subtype)(e=Px[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 ab('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!Qx.includes(e.toUpperCase()))return ab("Codec not supported:",
e),null;c=Rx(c,g,e,v);v.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;v.type="audio";v.mimeType="mss/audio/mp4";v.codecs=Sx(e,c);break;case "video":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;v.type="video";v.mimeType="mss/video/mp4";v.codecs=Tx(c);break;case "text":if(v.type=Wd,v.mimeType="application/mp4","TTML"===e||"DFXP"===e)v.codecs="stpp"}v.fullMimeTypes.add(ae(v.mimeType,v.codecs));
v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(a.m.has(v.id))var A=a.m.get(v.id);else A=[],"video"==v.type&&(A=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,ab:A,ma:new Uint8Array([]),wa:new Uint8Array([]),Ba:0,Ca:0,data:null,stream:v},A=rx(new lx([A])),a.m.set(v.id,A);A=Ux(a,new Bi(function(){return[]},0,null,wl(v),v.mssPrivateData.timescale,
A),v,b,d);v.segmentIndex=new Rk(A);return Promise.resolve()};v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)};return v}
function Rx(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 Sx(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 Tx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
function Ux(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={ed:g.ed},h=e.next())g.ed=h.value,d.push(new Di(g.ed.start,g.ed.end,function(k){return function(){return Qd(a.l,[f.replace("{start time}",String(k.ed.og))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",Lx);var Qx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Px={CAPT:"main",SUBT:"alternate",DESC:"main"};
wi["application/vnd.ms-sstr+xml"]=function(){return new Lx};function Vx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=Ad(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function Wx(){}function Xx(a,b,c,d,e){var f=new Yx;Hg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Zx,h={zg:!1,th:!1};a=$x(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new dg(a,function(){h.zg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Uc(function(){h.th=!0;g.abort()});k.Y(b/1E3);a.finally(function(){k.stop()})}return a}
function $x(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,w,v,A,y,D;return O(function(z){switch(z.g){case 1:return h=ay,k=by,p=n=0,q=Date.now(),ua(z,2),G(z,h(a,c),4);case 4:l=z.h;f(cy(l.headers));if("HEAD"==c.method){z.u(5);break}u=l.clone().body.getReader();v=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;A=function(B){function C(){var F,H,K;return O(function(J){switch(J.g){case 1:return ua(J,2),G(J,u.read(),4);case 4:F=J.h;wa(J,3);break;case 2:return xa(J),J.return();case 3:if(F.done){J.u(5);break}n+=
F.value.byteLength;if(!g){J.u(5);break}return G(J,g(F.value),5);case 5:H=Date.now();if(100<H-q||F.done)K=F.done?0:v-n,e(H-q,n-p,K),p=n,q=H;F.done?B.close():(B.enqueue(F.value),C());I(J)}})}C()};new k({start:A});return G(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:wa(z,3);break;case 2:y=xa(z);if(d.zg)throw new T(1,1,7001,a,b);if(d.th)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,y,b);case 3:return D=cy(l.headers),z.return(Vx(D,m,l.status,a,l.url,b))}})}
function cy(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function dy(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",Wx);Wx.isSupported=dy;Wx.parse=Xx;var ay=window.fetch,Zx=window.AbortController,by=window.ReadableStream,Yx=window.Headers;
dy()&&(qg("http",Xx,2,!0),qg("https",Xx,2,!0),qg("blob",Xx,2,!0));function ey(){}
function fy(a,b,c,d,e){var f=new gy,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=hy(f);e(q);n=!0}};f.onload=function(q){var u=hy(f),w=f.response;try{d(Date.now()-g,q.loaded-h,0);var v=Vx(u,w,f.status,a,f.responseURL,c);l(v)}catch(A){m(A)}};f.onerror=function(q){m(new T(1,
1,1002,a,q,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(q){var u=Date.now();if(100<u-g||q.lengthComputable&&q.loaded==q.total)d(u-g,q.loaded-h,4==f.readyState?0:q.total-q.loaded),h=q.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new dg(k,function(){f.abort();return Promise.resolve()})}
function hy(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}S("shaka.net.HttpXHRPlugin",ey);ey.parse=fy;var gy=window.XMLHttpRequest;qg("http",fy,1,!0);qg("https",fy,1,!0);qg("blob",fy,1,!0);function iy(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function jy(a){return a.M().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.sa}function ky(a,b){return Dl(a.g.M(),a.g.Ha,a.g.sa,b.streaming.retryParameters)};function ly(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function my(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}ly.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function ny(a){var b=this;this.o=a;this.j=new Map;this.i=new Cg(function(){return oy(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new ly}ny.prototype.destroy=function(){return this.i.destroy()};function py(a,b,c){a.m=b;a.l=c}function oy(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
function qy(a,b,c,d,e,f){Dg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return G(u,ry(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Cb(h),l=new Zg(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function sy(a){return O(function(b){return 1==b.g?G(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
function ry(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=Ag,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),G(g,d.promise,2);f=g.h;Qb(a.h,e);return g.return(f.data)})};function ty(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new cg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ty.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ua(b,2);return G(b,a.g,4)}if(2!=b.g)return wa(b,0);xa(b);I(b)})};
function uy(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return G(g,b(f.key,f.value,f),2)}f.continue();I(g)})}})}ty.prototype.store=function(){return this.h};ty.prototype.promise=function(){return this.g};function vy(a){this.h=a;this.g=[]}vy.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function wy(a,b){return xy(a,b,"readwrite")}function xy(a,b,c){c=a.h.transaction([b],c);var d=new ty(c,b);a.g.push(d);d.promise().then(function(){Qb(a.g,d)},function(){Qb(a.g,d)});return d};function yy(a,b,c){this.h=new vy(a);this.i=b;this.g=c}r=yy.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return zy(this.i)};r.removeSegments=function(a,b){return Ay(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return G(d,By(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Cg(e)}))})};r.addManifests=function(){return zy(this.g)};
r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function Cy(a,b,c){a=wy(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=wy(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 Ay(this,this.g,a,b)};
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return G(d,By(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.nd(e)})))})};r.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=xy(a.h,a.g,"readonly"),c=new Map,G(d,uy(b,function(e,f){var g;return O(function(h){if(1==h.g)return G(h,a.nd(f),2);g=h.h;c.set(e,g);I(h)})}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};r.Cg=function(a){return a};r.nd=function(a){return Promise.resolve(a)};
function zy(a){return Promise.reject(new T(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 O(function(m){if(1==m.g){d=wy(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Xd:g.Xd},k=h.next())l=k.value,g.Xd=e.add(l),g.Xd.onsuccess=function(n){return function(){f.push(n.Xd.result)}}(g);return G(m,d.promise(),2)}return m.return(f)})};
function Ay(a,b,c,d){a=wy(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Vd:e.Vd},f=c.next())e.Vd=f.value,b.delete(e.Vd).onsuccess=function(g){return function(){return d(g.Vd)}}(e);return a.promise()}
function By(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=xy(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={cd:h.cd,ad:h.ad},l=k.next())h.ad=l.value,h.cd=e.get(h.ad),h.cd.onsuccess=function(n){return function(){void 0==n.cd.result&&g.push(n.ad);f[n.ad]=n.cd.result}}(h);return G(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Dy(a){this.g=new vy(a)}Dy.prototype.destroy=function(){return this.g.destroy()};Dy.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=xy(a.g,"session-ids","readonly"),c=[],G(d,uy(b,function(e,f){c.push(f)}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};Dy.prototype.add=function(a){var b=wy(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()};
Dy.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=wy(b.g,"session-ids"),G(d,uy(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):G(d,c.promise(),0)})};function Ey(){this.g=new Map}Ey.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)};Ey.prototype.init=function(){var a=this;Fy.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 Gy(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{ob:d,Ja:f},Ja:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function Hy(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({ob:d,Ja:f},e)})})}
function Iy(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function Jy(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Ky(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
function Ly(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Fy,d.forEach(function(f){(f=f())&&b.push(f)})),G(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):G(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function My(a,b){Fy.set(a,b)}S("shaka.offline.StorageMuxer",Ey);Ey.unregister=function(a){Fy.delete(a)};Ey.register=My;Ey.prototype.destroy=Ey.prototype.destroy;var Fy=new Map;function Ny(){yy.apply(this,arguments)}pa(Ny,yy);Ny.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=wy(c.h,c.g);e=d.store();f=new cg;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return G(g,Promise.all([d.promise(),f]),0)})};
Ny.prototype.nd=function(a){var b,c,d,e,f,g;return O(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=Oy(a.periods[c],e),b.push(f);return G(h,cu(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 Oy(a,b){Py(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Qy(e,a.startTime,b)})}
function Qy(a,b,c){var d=a.initSegmentUri?Ry(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=
Ry(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}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Ny.prototype.Cg=function(a){return{data:a.data}};
function Ry(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 T(2,9,9004,"Could not parse uri "+a);}
function Py(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){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);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 Sy(){yy.apply(this,arguments)}pa(Sy,yy);
Sy.prototype.nd=function(a){var b,c,d,e,f,g;return O(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(Ty(n,k.startTime,k.startTime+e));f=l;b.push(f)}return G(h,cu(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 Ty(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}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function Uy(){yy.apply(this,arguments)}pa(Uy,yy);r=Uy.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 Cy(this,a,b)};r.nd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Vy(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=Vy.prototype;
r.init=function(){var a=this,b=new cg,c=!1,d=new Uc(function(){c=!0;b.reject(new T(2,9,9017))});d.Y(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 Ny(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Sy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
new Sy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Uy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Dy(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 T(2,
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return G(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return G(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return G(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return G(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return G(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),I(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 O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return G(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return G(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return G(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return G(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),G(b,Wy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,G(b,a.init(),0)}})};
function Wy(){var a=new cg,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}My("idb",function(){return hd()||$c()||!window.indexedDB?null:new Vy});function Xy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Xy.prototype.ob=function(){return this.i};Xy.prototype.Ja=function(){return this.h};Xy.prototype.key=function(){return this.l};Xy.prototype.toString=function(){return this.j};
function Yy(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 Xy(b,c,d,Number(a[4])):null};function Zy(a,b){this.h=a;this.g=b}
function $y(a,b){var c=new vk(null,0);c.$a(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=az(a,d,e,c);e=b.streams.filter(function(l){return l.type==Wd}).map(function(l){return bz(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return bz(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,minBufferTime:2,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}}
function az(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.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(e=e.value,g=bz(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=bz(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
function bz(a,b,c){var d=b.segments.map(function(e){return cz(a,e,b)});c.Id(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Rk(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,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([ae(b.mimeType,b.codecs)])}}
function cz(a,b,c){var d=new Xy("segment",a.h,a.g,b.dataKey);a=new Di(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?dz(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function dz(a,b){var c=new Xy("segment",a.h,a.g,b);return new Bi(function(){return[c.toString()]},0,null)};function ez(){this.g=null}r=ez.prototype;r.configure=function(){};
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=Yy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Ey;va(m,2);return G(m,e.init(),4);case 4:return G(m,Iy(e,d.ob(),d.Ja()),5);case 5:return f=m.h,G(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Zy(d.ob(),d.Ja()),l=$y(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return ya(m),G(m,e.destroy(),7);case 7:za(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 O(function(m){switch(m.g){case 1:return d=c.g,e=new Ey,ua(m,2,3),G(m,e.init(),5);case 5:return G(m,Iy(e,d.ob(),d.Ja()),6);case 6:return f=m.h,G(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.u(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ya(m),G(m,e.destroy(),10);case 10:za(m,0);break;case 2:xa(m),m.u(3)}})};
r.onInitialVariantChosen=function(){};r.banLocation=function(){};r.setMediaElement=function(){};wi["application/x-offline-manifest"]=function(){return new ez};function fz(){}function gz(a){var b=Yy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=gg(a)):a=b&&"segment"==b.g?hz(b.key(),b):eg(new T(2,1,9004,a));return a}
function hz(a,b){var c=new Ey;return gg(void 0).Aa(function(){return c.init()}).Aa(function(){return Iy(c,b.ob(),b.Ja())}).Aa(function(d){return d.getSegments([b.key()])}).Aa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",fz);fz.plugin=gz;qg("offline",gz);function iz(a,b,c){var d,e,f,g,h,k;return O(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,jz(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.u(4);break}g=f.value;h=kz(a,b,g);return G(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
function kz(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Eh({Lb:b,onError:function(){},Ae:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ua(f,2),d.configure(a),G(f,Mh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return xa(f),G(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],G(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
h.g)return ua(h,2),G(h,Yh(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);xa(h);I(h)})})),6);case 6:return G(f,d.destroy(),7);case 7:return f.return(e)}})}function jz(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Rb(a.audioCapabilities,b.audioCapabilities,c)&&Rb(a.videoCapabilities,b.videoCapabilities,c)};function lz(a,b,c){var d=b.presentationTimeline.getDuration();b=mz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function nz(a,b){var c=$y(new Zy(a.ob(),a.Ja()),b),d=b.appMetadata||{};c=mz(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 mz(a){var b=[],c=zf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(mf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(nf(c.value));return b};function oz(){this.g={}}function pz(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function qz(a,b){a.g[b.id]=b.bandwidth||2048}function rz(a,b){a=a.g[b];null==a&&(a=0);return a};function sz(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.zb()):(this.h=xm(),this.g=new pg);this.i=[];this.j=[];var c=!a;this.l=new Cg(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return G(k,Promise.all(b.j.map(function(l){return oy(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 G(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return G(k,b.g.destroy(),4);
case 4:b.h=null,b.g=null,I(k)}})})}function tz(){if(Vc())a:{var a=t(Fy.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=sz.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=om(a,b));return Bm(this.h,a)};r.getConfiguration=function(){var a=xm();Bm(a,this.h,xm());return a};r.zb=function(){return this.g};
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ny(this.g);this.j.push(f);b=uz(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):G(h,jn(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=vi(a,c||null);return h.return(g())})},e,f);b=new dg(b,function(){return oy(f)});b.finally(function(){Qb(d.j,f)});return vz(this,b)};
function uz(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v,A,y,D;return O(function(z){switch(z.g){case 1:return wz(),h=g=null,k=new Ey,n=m=l=null,ua(z,2,3),G(z,d(),5);case 5:return g=z.h,G(z,xz(a,b,g,e),6);case 6:p=z.h;yz(a);q=!p.presentationTimeline.V()&&!p.presentationTimeline.qc();if(!q)throw new T(2,9,9005,b);return G(z,a.Dc(p,function(B){n=n||B},e),7);case 7:h=z.h;yz(a);if(n)throw n;return G(z,zz(p,h,e),8);case 8:return G(z,k.init(),9);case 9:return yz(a),G(z,Gy(k),10);case 10:return l=z.h,yz(a),u=Az(h,
p,b,c,e,f),w=u.Bi,v=u.lg,G(z,l.Ja.addManifests([w]),11);case 11:A=z.h;yz(a);m=A[0];yz(a);if(n)throw n;return G(z,Bz(a,v,m,w,f,e,l.Ja,p,h),12);case 12:return yz(a),Cz(p,w,h,e),G(z,l.Ja.updateManifest(m,w),13);case 13:return yz(a),y=new Xy("manifest",l.path.ob,l.path.Ja,m),z.return(nz(y,w));case 3:return ya(z),G(z,k.destroy(),14);case 14:if(!g){z.u(15);break}return G(z,g.stop(),15);case 15:if(!h){z.u(17);break}return G(z,h.destroy(),17);case 17:za(z,0);break;case 2:D=xa(z);if(null==m){z.u(19);break}return G(z,
Dz(m),19);case 19:throw n||D;}})}
function Bz(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,u,w,v,A,y;return O(function(D){switch(D.g){case 1:l={};m=0;n=function(z,B){var C,F,H,K,J,E,L;return O(function(M){if(1==M.g){C={};F=t(z);for(H=F.next();!H.done;C={ic:C.ic},H=F.next())C.ic=H.value,K=ky(C.ic,f),J=C.ic.i,E=C.ic.h,L=function(N){return function(Q){var R,P,aa;return O(function(ba){if(1==ba.g)return G(ba,g.addSegments([{data:Q}]),2);R=ba.h;yz(a);P=N.ic.g;aa=jy(P);l[aa]=R[0];m+=Q.byteLength;I(ba)})}}(C),qy(e,C.ic.groupId,K,J,E,L);return G(M,sy(e),
2)}if(!B)return M.u(0);yz(a);Cz(h,d,k,f);return G(M,g.updateManifest(c,d),0)})};p=!1;ua(D,2);if(!Ez(h)||!p||Fz(h)){D.u(4);break}return G(D,n(b.filter(function(z){return z.h}),!0),5);case 5:return yz(a),b=b.filter(function(z){return!z.h}),q=l,u=m,l={},m=0,G(D,Gz(g,c,d,q,u,function(){return yz(a)}),6);case 6:yz(a);case 4:if(p){D.u(7);break}return G(D,n(b,!1),8);case 8:return yz(a),w=l,v=m,l={},m=0,G(D,Gz(g,c,d,w,v,function(){return yz(a)}),9);case 9:yz(a);case 7:wa(D,0);break;case 2:return A=xa(D),
y=Object.values(l),G(D,g.removeSegments(y,function(){}),10);case 10:throw A;}})}function Dz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new Ey,G(f,b.init(),2);case 2:return G(f,Gy(b),3);case 3:return c=f.h,d=new Xy("manifest",c.path.ob,c.path.Ja,a),G(f,b.destroy(),4);case 4:return e=new sz,G(f,e.remove(d.toString()),0)}})}
function Gz(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v;return O(function(A){switch(A.g){case 1:g=!1;ua(A,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 G(A,a.updateManifest(b,c),4);case 4:g=!0;f();wa(A,0);break;case 2:return w=xa(A),G(A,Dz(b),5);case 5:if(g){A.u(6);break}v=Object.values(d);return G(A,a.removeSegments(v,function(){}),6);case 6:throw w;}})}
function zz(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,H,K,J,E,L,M,N;return O(function(Q){switch(Q.g){case 1:return d={width:Infinity,height:Infinity},Se(a,c.restrictions,d),G(Q,We(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Qe(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(mf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,e.push(nf(q));
u=t(a.imageStreams);for(w=u.next();!w.done;w=u.next())v=w.value,e.push(of(v));return G(Q,c.offline.trackSelectionCallback(e),3);case 3:A=Q.h;y=a.presentationTimeline.getDuration();D=0;z=t(A);for(B=z.next();!B.done;B=z.next())C=B.value,F=C.bandwidth*y/8,D+=F;ua(Q,4);return G(Q,c.offline.downloadSizeCallback(D),6);case 6:H=Q.h;if(!H)throw new T(2,9,9014);wa(Q,5);break;case 4:K=xa(Q);if(K instanceof T)throw K;throw new T(2,9,9015);case 5:J=new Set;E=new Set;L=new Set;M=t(A);for(B=M.next();!B.done;B=
M.next())N=B.value,"variant"==N.type&&J.add(N.id),"text"==N.type&&E.add(N.id),"image"==N.type&&L.add(N.id);a.variants=a.variants.filter(function(R){return J.has(R.id)});a.textStreams=a.textStreams.filter(function(R){return E.has(R.id)});a.imageStreams=a.imageStreams.filter(function(R){return L.has(R.id)});Hz(a);I(Q)}})}
function Az(a,b,c,d,e,f){var g=lz(c,b,d),h=e.offline.progressCallback;py(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u&&Uh(a,"cenc",q)});var k=Ez(b)&&!Fz(b),l=null;k&&(l=Iz.get(a.g.keySystem));for(var m=new oz,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())qz(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())pz(m,n.value);m=Jz(f,m,b,e);f=m.streams;m=m.lg;p=a.g;n=e.offline.usePersistentLicense;
p&&n&&(p.initData=[]);return{Bi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.sd(),streams:f,sessionIds:n?ci(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},lg:m}}function Ez(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
function Fz(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 Cz(a,b,c,d){b.expiration=c.sd();c=ci(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Ez(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}r.remove=function(a){return Kz(this,Lz(this,a))};
function Lz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:wz();c=Yy(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new Ey;va(k,2);return G(k,e.init(),4);case 4:return G(k,Iy(e,d.ob(),d.Ja()),5);case 5:return f=k.h,G(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],G(k,Promise.all([Mz(a,h,e),Nz(f,d,h)]),2);case 2:return ya(k),G(k,e.destroy(),8);case 8:za(k,0)}})}
function Oz(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:ae(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ae(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Mz(a,b,c){return O(function(d){return G(d,Pz(a.g,a.h.drm,c,b),0)})}
function Nz(a,b,c){function d(){}var e=Qz(c);nz(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Si=function(){return Kz(this,Rz(this))};
function Rz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return wz(),b=a.g,c=a.h.drm,d=new Ey,e=!1,va(n,2),G(n,d.init(),4);case 4:f=[],Jy(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return G(n,k.getAll(),8);case 8:return l=n.h,G(n,iz(c,b,l),9);case 9:return m=n.h,G(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return ya(n),G(n,d.destroy(),11);case 11:za(n,3);break;case 3:return n.return(!e)}})}
r.list=function(){return Kz(this,Sz())};function Sz(){var a,b,c;return O(function(d){switch(d.g){case 1:return wz(),a=[],b=new Ey,va(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),Hy(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return G(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=nz(new Xy("manifest",e.ob,e.Ja,l),k);a.push(k)});I(h)})})}),G(d,c,2);case 2:return ya(d),G(d,b.destroy(),6);case 6:za(d,3);break;case 3:return d.return(a)}})}
function xz(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},
onMetadata:function(){},disableStream:function(){}},c.configure(d.manifest),yz(a),G(l,c.start(b,g),2);if(3!=l.g)return h=l.h,yz(a),k=Tz(h),G(l,Promise.all(Fg(k,function(m){return m.createSegmentIndex()})),3);yz(a);if(e)throw e;return l.return(h)})}
r.Dc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Eh({Lb:d.g,onError:b,Ae:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),G(f,Jh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?G(f,Wh(e),3):f.return(e)})};
function Jz(a,b,c,d){var e=new Map,f=Tz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Uz(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()),lg:Array.from(e.values())}}
function Uz(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,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;Vz(d,c.presentationTimeline.nb(),function(l){var m=jy(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=rz(b,d.id)*p;p=my(a.g,p);f.set(m,new iy(l,p,k,!1))}l.$&&(n=jy(l.$),f.has(n)||(p=.5*rz(b,d.id),p=my(a.g,p),f.set(n,new iy(l.$,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function Vz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function yz(a){if(a.l.g)throw new T(2,9,7001);}function wz(){if(!tz())throw new T(2,9,9E3);}
function Kz(a,b){return O(function(c){if(1==c.g)return a.i.push(b),va(c,2),G(c,b,4);if(2!=c.g)return c.return(c.h);ya(c);Qb(a.i,b);return za(c,0)})}function vz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Qb(a.i,c)})}function Qz(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 Pz(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Ky(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Oz(d,!1),videoCapabilities:Oz(d,!0)}});return G(h,iz(b,a,f),2)}return 3!=h.g?(g=h.h,G(h,e.remove(g),3)):G(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
function Tz(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
function Hz(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",sz);sz.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new Ey,va(b,2),G(b,Ly(a),2)):5!=b.g?(ya(b),G(b,a.destroy(),5)):za(b,0)})};
sz.prototype.list=sz.prototype.list;sz.prototype.removeEmeSessions=sz.prototype.Si;sz.prototype.remove=sz.prototype.remove;sz.prototype.store=sz.prototype.store;sz.prototype.getNetworkingEngine=sz.prototype.zb;sz.prototype.getConfiguration=sz.prototype.getConfiguration;sz.prototype.configure=sz.prototype.configure;sz.prototype.destroy=sz.prototype.destroy;sz.support=tz;
var Iz=(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");zp.offline=tz;function Wz(){}function Xz(a,b){a={priority:b||0,callback:a};for(b=0;b<Yz.length;b++)if(Yz[b].priority<a.priority){Yz.splice(b,0,a);return}Yz.push(a)}S("shaka.polyfill",Wz);Wz.register=Xz;Wz.installAll=function(){for(var a=t(Yz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){ab("Error installing polyfill!",c)}}};var Yz=[];function Zz(){this.g=new $z}function aA(){window.AbortController||(window.AbortController=Zz,window.AbortSignal=$z)}Zz.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new U("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(Zz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Wz.AbortController=Zz;Zz.install=aA;
function $z(){mg.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa($z,mg);fa.Object.defineProperties($z.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Xz(aA);function bA(){}function cA(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())dA(b.value)}function dA(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)}})}Wz.Aria=bA;bA.install=cA;Xz(cA);function eA(){}function fA(){gA()}Wz.EncryptionScheme=eA;eA.install=fA;Xz(fA,-2);function hA(){}
function iA(){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",jA);document.addEventListener("webkitfullscreenerror",jA);document.addEventListener("mozfullscreenchange",jA);document.addEventListener("mozfullscreenerror",jA);document.addEventListener("MSFullscreenChange",jA);document.addEventListener("MSFullscreenError",jA)}}
function jA(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)}Wz.Fullscreen=hA;hA.install=iA;Xz(iA);function kA(){}function lA(){var a=!0;!hd()||hd()&&pd()||hd()&&ad("Fuchsia")||(a=!1);if(id()||ld()||kd()||ed()||bd()||ad("PC=EOS")||md())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),mA=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=nA)}
function nA(a){var b,c,d,e,f,g,h,k,l,m,n;return O(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=Wc(e),!f)||d&&(g=d.contentType,h=Wc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Vc())return p.return(b);if(!c){p.u(3);break}return G(p,oA(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var q=d.contentType;hd()&&d.spatialRendering&&
(q+="; spatialRendering=true");l=ob(q);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return G(p,pA(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
function oA(a){var b,c;return O(function(d){return 1==d.g?hd()?G(d,qA(a),3):bd()?(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(ob(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(ob(a.contentType))})}
function pA(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},bd()&&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=c.keySystem;n=null;ua(p,2);if(Sc.has(k+"#"+l+"#"+m)){n=Sc.get(k+"#"+l+"#"+m)||null;p.u(4);break}return G(p,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:n=p.h,Sc.set(k+"#"+l+"#"+m,n);case 4:wa(p,3);break;case 2:xa(p);case 3:return p.return(n)}})}
function qA(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(ob(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in rA?(c=rA[b],d.u(2)):G(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,rA[b]=c);return d.return(c)})}Wz.MediaCapabilities=kA;kA.install=lA;
var mA=null;kA.originalMcap=mA;var rA={};kA.memoizedCanDisplayTypeRequests_=rA;Xz(lA,-1);function sA(){}function tA(){var a=nd();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(uA(),vA()):15>=a&&uA():ad("DT_STB_BCM")?(uA(),vA()):(dd()||cd()||ad("Tizen 4"))&&wA();(window.MediaSource||window.ManagedMediaSource)&&xA();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&yA()}
function uA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function vA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function xA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ge(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ge(c)&&b(c)}}}
function wA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=ne(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=ne(c)&&b(c)}}}
function yA(){var a=MediaSource.isTypeSupported;ed()||(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)})}Wz.MediaSource=sA;sA.install=tA;Xz(tA);function zA(){}function AA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?BA():void 0!=window.orientation&&CA())}function BA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
function CA(){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 DA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}Wz.Orientation=zA;zA.install=AA;function DA(){mg.call(this);this.type="";this.angle=0}pa(DA,mg);
DA.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)};
DA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Xz(AA);function EA(){}var FA,GA,HA,IA,JA,KA;function LA(a,b){try{var c=new MA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function NA(a){var b=this.mediaKeys;b&&b!=a&&OA(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?OA(a,this):Promise.resolve()}
function PA(a){a=Cb(a.initData);if(Gb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=yd(a.subarray(4),!0);a=Bd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Db(a);this.dispatchEvent(b)}Wz.PatchedMediaKeysApple=EA;
EA.uninstall=function(){FA&&(FA=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",GA),HTMLMediaElement.prototype.setMediaKeys=HA,window.MediaKeys=IA,window.MediaKeySystemAccess=JA,navigator.requestMediaKeySystemAccess=KA,GA=KA=HA=JA=IA=null,window.shakaMediaKeysPolyfill="")};
EA.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)FA=!0,GA=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),HA=HTMLMediaElement.prototype.setMediaKeys,IA=window.MediaKeys,JA=window.MediaKeySystemAccess,KA=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=NA;window.MediaKeys=QA;window.MediaKeySystemAccess=MA;navigator.requestMediaKeySystemAccess=
LA;window.shakaMediaKeysPolyfill=RA}};
function MA(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),g=c.next();!g.done;g=c.next())f=g.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;}
MA.prototype.createMediaKeys=function(){var a=new QA(this.keySystem);return Promise.resolve(a)};MA.prototype.getConfiguration=function(){return this.g};function QA(a){this.h=new WebKitMediaKeys(a);this.g=new ib}QA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new SA(this.h,a)};QA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function OA(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",PA);try{return Ck(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}QA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function SA(a){mg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new ib;this.sessionId="";this.expiration=NaN;this.closed=new cg;this.keyStatuses=new TA}pa(SA,mg);r=SA.prototype;
r.generateRequest=function(a,b){var c=this;this.h=new cg;try{var d=this.l.createSession("video/mp4",Cb(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.ac()?"license-request":"license-renewal").set("message",Db(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(UA(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:UA(c,"output-not-allowed");break;default:UA(c,"internal-error")}});UA(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 cg;try{this.i.update(Cb(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 UA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
function TA(){this.size=0;this.g=void 0}r=TA.prototype;r.ac=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Rc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Rc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var RA="apple";function VA(){}function WA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||cd()||ad("Tizen 4")||ad("Tizen 5.0")||fd())&&(MediaKeys.prototype.setServerCertificate=XA)}function XA(){return Promise.resolve(!1)}Wz.PatchedMediaKeysCert=VA;VA.install=WA;Xz(WA);function YA(){}function ZA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=$A,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=aB,window.MediaKeys=bB,window.MediaKeySystemAccess=cB,window.shakaMediaKeysPolyfill=dB)}function $A(){return Promise.reject(Error("The key system specified is not supported."))}
function aB(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Wz.PatchedMediaKeysNop=YA;YA.install=ZA;function bB(){throw new TypeError("Illegal constructor.");}bB.prototype.createSession=function(){};bB.prototype.setServerCertificate=function(){};bB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function cB(){this.keySystem="";throw new TypeError("Illegal constructor.");}cB.prototype.getConfiguration=function(){};
cB.prototype.createMediaKeys=function(){};var dB="nop";Xz(ZA,-10);function eB(){}
function fB(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)gB="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=hB;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=iB;window.MediaKeys=jB;window.MediaKeySystemAccess=kB;window.shakaMediaKeysPolyfill=lB}}
function mB(a){var b=gB;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function hB(a,b){try{var c=new kB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function iB(a){var b=this.mediaKeys;b&&b!=a&&nB(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&nB(a,this);return Promise.resolve()}Wz.PatchedMediaKeysWebkit=eB;eB.install=fB;
function kB(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;}kB.prototype.createMediaKeys=function(){var a=new jB(this.g);return Promise.resolve(a)};kB.prototype.getConfiguration=function(){return this.h};function jB(a){this.l=a;this.h=null;this.g=new ib;this.i=[];this.j=new Map}
function nB(a,b){a.h=b;a.g.Qa();var c=gB;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Db(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=oB(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.ac()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=oB(a,d.sessionId))pB(d,"usable"),
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=oB(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?pB(e,"output-restricted"):1==f?pB(e,"expired"):pB(e,"internal-error"))}}))}
jB.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 qB(b,this.l,a);this.i.push(a);return a};jB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};jB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function oB(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 qB(a,b,c){mg.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 cg;this.keyStatuses=new rB}pa(qB,mg);
function sB(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=Cb(Bd("LOAD_SESSION|"+c));else{var e=Bd("PERSISTENT|");d=Pd(e,b)}else d=Cb(b)}catch(g){return Promise.reject(g)}a.h=new cg;var f=mB("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Uc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).Y(.01)}return a.h}
function tB(a,b,c){if(a.g)a.g.then(function(){return tB(a,b,c)}).catch(function(){return tB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=xd(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=Id(e.keys[0].k);e=Id(e.keys[0].kid)}else d=Cb(c),e=null;var f=mB("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function pB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}r=qB.prototype;r.generateRequest=function(a,b){return sB(this,b,null)};r.load=function(a){return"persistent-license"==this.l?sB(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new cg;tB(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=mB("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 rB(){this.size=0;this.g=void 0}r=rB.prototype;r.ac=function(){return this.g};
r.forEach=function(a){this.g&&a(this.g,Rc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Rc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var gB="",lB="webkit";Xz(fB);function uB(){}function vB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=wB,Object.defineProperty(a,"disablePictureInPicture",{get:xB,set:yB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=zB,document.addEventListener("webkitpresentationmodechanged",AB,!0))}}
function AB(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 wB(){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 zB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
function xB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function yB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Wz.PiPWebkit=uB;uB.install=vB;Xz(vB);function BB(){}function CB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=DB))}function DB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Wz.RandomUUID=BB;BB.install=CB;Xz(CB);function EB(){}function FB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:GB})}function GB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Wz.Symbol=EB;EB.install=FB;Xz(FB);function HB(){}function IB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Wz.VideoPlayPromise=HB;HB.install=IB;Xz(IB);function JB(){}function KB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||fd())&&(a.getVideoPlaybackQuality=LB)}}function LB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Wz.VideoPlaybackQuality=JB;JB.install=KB;Xz(KB);function MB(){}function NB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=OB;else if(6==b)a=PB;else{try{var c=!!OB(1,2,"")}catch(d){c=!1}c&&(a=OB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function OB(a,b,c){return new window.TextTrackCue(a,b,c)}function PB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Wz.VTTCue=MB;MB.install=NB;Xz(NB);function QB(){}QB.prototype.parseInit=function(){};QB.prototype.setSequenceMode=function(){};QB.prototype.setManifestType=function(){};QB.prototype.parseMedia=function(a,b){var c=null,d=[];a=xd(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=RB.exec(e))){var f=SB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Tb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
S("shaka.text.LrcTextParser",QB);QB.prototype.parseMedia=QB.prototype.parseMedia;QB.prototype.setManifestType=QB.prototype.setManifestType;QB.prototype.setSequenceMode=QB.prototype.setSequenceMode;QB.prototype.parseInit=QB.prototype.parseInit;var RB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,SB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;ue["application/x-subtitle-lrc"]=function(){return new QB};function TB(){}TB.prototype.parseInit=function(){};TB.prototype.setSequenceMode=function(){};TB.prototype.setManifestType=function(){};
TB.prototype.parseMedia=function(a,b,c){var d=xd(a);a=[];if(""==d)return a;var e=bh(d,"tt");if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=kh(e,"body")[0];if(!d)return[];var f=qh(e,UB,"frameRate"),g=qh(e,UB,"subFrameRate"),h=qh(e,UB,"frameRateMultiplier"),k=qh(e,UB,"tickRate"),l=qh(e,UB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=qh(e,VB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new WB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
{kc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=kh(e,"metadata")[0])?g.children:[];h=kh(e,"style");e=kh(e,"region");k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var u=q.value;q=new Lb;var w=u.attributes["xml:id"];if(w){q.id=w;var v=null;n&&(v=XB.exec(n)||YB.exec(n));w=v?Number(v[1]):null;v=v?Number(v[2]):null;var A,y=ZB(u,h,"extent");if(y){var D=(A=XB.exec(y))||YB.exec(y);null!=D&&(q.width=Number(D[1]),q.height=Number(D[2]),A||(null!=w&&(q.width=100*q.width/w),null!=v&&(q.height=
100*q.height/v)),q.widthUnits=A||null!=w?Mb:0,q.heightUnits=A||null!=v?Mb:0)}if(u=ZB(u,h,"origin"))if(D=(A=XB.exec(u))||YB.exec(u),null!=D)q.viewportAnchorX=Number(D[1]),q.viewportAnchorY=Number(D[2]),A?y||(q.width=100-q.viewportAnchorX,q.widthUnits=Mb,q.height=100-q.viewportAnchorY,q.heightUnits=Mb):(null!=v&&(q.viewportAnchorY=100*q.viewportAnchorY/v),null!=w&&(q.viewportAnchorX=100*q.viewportAnchorX/w)),q.viewportAnchorUnits=A||null!=w?Mb:0}else q=null;q&&k.push(q)}if(hh(d,"p").length)throw new T(2,
2,2001,"<p> can only be inside <div> in TTML");n=t(hh(d,"div"));for(p=n.next();!p.done;p=n.next())if(hh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=$B(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
function $B(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(fh(a)){if(!m)return null;var q={tagName:"span",children:[ih(a)],attributes:{},parent:null}}else q=a;for(var u=null,w=t(aC),v=w.next();!v.done&&!(u=bC(q,"backgroundImage",d,"#",v.value)[0]);v=w.next());w=null;var A=qh(q,aC,"backgroundImage");n&&A&&!A.startsWith("#")&&(v=new vc(n),A=new vc(A),(v=v.resolve(A).toString())&&(w=v));if("p"==a.tagName||u||w)m=!0;a=m;v="default"==(q.attributes["xml:space"]||(h?"default":"preserve"));A=q.children.every(fh);h=
[];if(!A)for(var y=t(q.children),D=y.next();!D.done;D=y.next())(D=$B(D.value,b,c,d,e,f,g,v,k,q,m,n))&&h.push(D);d=null!=l;n=ih(q);n=q.children.length&&n&&/\S/.test(n);D=q.attributes.begin||q.attributes.end||q.attributes.dur;if(!(D||n||"br"==q.tagName||0!=h.length||d&&!v))return null;y=cC(q,c);n=y.start;for(y=y.end;p&&p.tagName&&"tt"!=p.tagName;)y=dC(p,c,n,y),n=y.start,y=y.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);
if(!D&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==q.tagName)return e=new Tb(n,y,""),e.lineBreak=!0,e;b="";A&&(b=Ed(ih(q)||""),v&&(b=b.replace(/\s+/g," ")));b=new Tb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=bC(q,"region",f,"")[0];if(q.attributes.region&&k&&k.attributes["xml:id"]){var z=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!q.attributes.region&&
!q.attributes.style&&(g=bC(l,"region",f,"")[0]);eC(b,q,g,u,w,e,a,0==h.length);return b}
function eC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==fC(b,c,f,"direction",g)&&(a.direction="rtl");h=fC(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=Wb);(h=fC(b,c,f,"textAlign",!0))?(a.positionAlign=gC[h],a.lineAlign=hC[h],a.textAlign=ec[h.toUpperCase()]):a.textAlign=Vb;if(h=fC(b,c,f,"displayAlign",!0))a.displayAlign=fc[h.toUpperCase()];if(h=fC(b,c,f,"color",g))a.color=h;if(h=fC(b,c,f,"backgroundColor",
g))a.backgroundColor=h;if(h=fC(b,c,f,"border",g))a.border=h;if(h=fC(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=fC(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=fC(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=fC(b,c,f,"lineHeight",g))&&h.match(iC)&&(a.lineHeight=h);(h=fC(b,c,f,"fontSize",g))&&(h.match(iC)||h.match(jC))&&(a.fontSize=h);if(h=fC(b,c,f,"fontStyle",g))a.fontStyle=jc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=ih(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
e);if(d=fC(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(iC)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(iC)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=fC(b,c,f,"letterSpacing",g))&&d.match(iC)&&(a.letterSpacing=d);(d=fC(b,c,f,"linePadding",g))&&d.match(iC)&&(a.linePadding=d);if(d=fC(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=ZB(c,f,"textDecoration"))&&kC(a,d);(d=lC(b,f,"textDecoration"))&&kC(a,d);if(d=fC(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(fC(b,
c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
function kC(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Qb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Qb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Qb(a.textDecoration,"overline")}}function fC(a,b,c,d,e){e=void 0===e?!0:e;return(a=lC(a,c,d))?a:e?ZB(b,c,d):null}function ZB(a,b,c){if(!a)return null;var d=qh(a,VB,c);return d?d:mC(a,b,c)}function lC(a,b,c){var d=qh(a,VB,c);return d?d:mC(a,b,c)}
function mC(a,b,c){a=bC(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ph(a[e],"urn:ebu:tt:style",c);f||(f=qh(a[e],VB,c));f||(f=lC(a[e],b,c));f&&(d=f)}return d}function bC(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?ph(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 dC(a,b,c,d){a=cC(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 cC(a,b){var c=nC(a.attributes.begin,b),d=nC(a.attributes.end,b);a=nC(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
function nC(a,b){var c=null;if(oC.test(a)){a=oC.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(pC.test(a))c=qC(pC,a);else if(rC.test(a))c=qC(rC,a);else if(sC.test(a))a=sC.exec(a),c=Number(a[1])/b.frameRate;else if(tC.test(a))a=tC.exec(a),c=Number(a[1])/b.g;else if(uC.test(a))c=qC(uC,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
function qC(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)}S("shaka.text.TtmlTextParser",TB);TB.prototype.parseMedia=TB.prototype.parseMedia;TB.prototype.setManifestType=TB.prototype.setManifestType;TB.prototype.setSequenceMode=TB.prototype.setSequenceMode;TB.prototype.parseInit=TB.prototype.parseInit;
function WB(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 XB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,jC=/^(\d{1,4}(?:\.\d+)?|100)%$/,iC=/^(\d+px|\d+em|\d*\.?\d+c)$/,YB=/^(\d+)px (\d+)px$/,oC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,pC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,rC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,sC=/^(\d*(?:\.\d*)?)f$/,tC=/^(\d*(?:\.\d*)?)t$/,uC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),hC={left:Zb,center:"center",right:"end",start:Zb,
end:"end"},gC={left:"line-left",center:"center",right:"line-right"},UB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],VB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],aC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];ue["application/ttml+xml"]=function(){return new TB};function vC(){this.g=new TB}vC.prototype.parseInit=function(a){var b=!1;(new Mg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).S("stsd",Vg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};vC.prototype.setSequenceMode=function(){};vC.prototype.setManifestType=function(){};
vC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Mg).box("mdat",Yg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",vC);vC.prototype.parseMedia=vC.prototype.parseMedia;vC.prototype.setManifestType=vC.prototype.setManifestType;vC.prototype.setSequenceMode=vC.prototype.setSequenceMode;vC.prototype.parseInit=vC.prototype.parseInit;ue['application/mp4; codecs="stpp"']=function(){return new vC};
ue['application/mp4; codecs="stpp.ttml"']=function(){return new vC};ue['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new vC};ue['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new vC};ue['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new vC};ue['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new vC};ue['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new vC};ue['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new vC};function wC(){this.h=!1;this.g="UNKNOWN"}wC.prototype.parseInit=function(){};wC.prototype.setSequenceMode=function(a){this.h=a};wC.prototype.setManifestType=function(a){this.g=a};
wC.prototype.parseMedia=function(a,b){a=xd(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 T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){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 T(2,2,2E3);a=xC(new Up(a[1]));if(null==a)throw new T(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Up(e);var f=new Lb;Xp(e);Vp(e);for(var g=Xp(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");Vp(e);g=Xp(e)}b.push(f)}d=new Map;yC(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 Tb(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=
700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=bc;break;case "italic":m=!0;l.fontStyle="italic";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)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Up(f[0]),k=xC(g),n=Wp(g,/[ \t]+--\x3e[ \t]+/g),l=xC(g),null==k||null==n||null==l)ab("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Tb(k,l,"");Vp(g);for(k=Xp(g);k;)zC(m,k,b),Vp(g),k=Xp(g);AC(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
function yC(a){for(var b=t(Object.entries(hc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Tb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(ic));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Tb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function AC(a,b,c){if(a.includes("<")){0===c.size&&yC(c);var d=a;a=[];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(BC)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=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)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=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),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=CC(a);try{var m=bh("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
m.next())DC(a.value,b,c);else b.payload=Ed(a);else b.payload=Ed(a)}else b.payload=Ed(a)}function CC(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 EC(a,b){return a&&0<a.length?a:b}
function DC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Lb;d.position=null;d.size=0;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)&&(g=c.get(g))&&(d.backgroundColor=EC(g.backgroundColor,d.backgroundColor),d.color=EC(g.color,d.color),d.fontFamily=EC(g.fontFamily,d.fontFamily),d.fontSize=
EC(g.fontSize,d.fontSize),d.textShadow=EC(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=cc(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
if(!f)break;if(f=xC(new Up(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(fh(a)||1==e.length&&fh(e[0]))for(c=ih(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=cc(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Ed(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())DC(a.value,d,c)}
function zC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Vb:a.textAlign=ec[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":Ub);else if(d=/^region:(.*)$/.exec(b)){if(b=FC(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=gc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Yb,a.line=Number(c[1]),c[2]&&(a.lineAlign=gc[c[2].toUpperCase()])}
function FC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function xC(a){a=Wp(a,BC);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}S("shaka.text.VttTextParser",wC);wC.prototype.parseMedia=wC.prototype.parseMedia;wC.prototype.setManifestType=wC.prototype.setManifestType;wC.prototype.setSequenceMode=wC.prototype.setSequenceMode;wC.prototype.parseInit=wC.prototype.parseInit;var BC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
ue["text/vtt"]=function(){return new wC};ue['text/vtt; codecs="vtt"']=function(){return new wC};ue['text/vtt; codecs="wvtt"']=function(){return new wC};function GC(){this.g=null}GC.prototype.parseInit=function(a){var b=this,c=!1;(new Mg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).S("mdhd",function(d){d=Zi(d.reader,d.version);b.g=d.timescale}).box("minf",Rg).box("stbl",Rg).S("stsd",Vg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};GC.prototype.setSequenceMode=function(){};GC.prototype.setManifestType=function(){};
GC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Mg).box("moof",Rg).box("traf",Rg).S("tfdt",function(D){g=!0;c=Yi(D.reader,D.version).baseMediaDecodeTime}).S("tfhd",function(D){l=Xi(D.reader,D.flags).pd}).S("trun",function(D){h=!0;d=$i(D.reader,D.version,D.flags).fh}).box("mdat",Yg(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Jg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
p.value;var q=p.$f||l,u=p.He?c+p.He:a;a=u+(q||0);var w=0;do{var v=m.P();w+=v;var A=m.P(),y=null;"vttc"==Qg(A)?8<v&&(y=m.rb(v-8)):m.skip(v-8);q&&y&&(v=HC(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(v))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(Ce)};function HC(a,b,c){var d,e,f;(new Mg).box("payl",Yg(function(g){d=xd(g)})).box("iden",Yg(function(g){e=xd(g)})).box("sttg",Yg(function(g){f=xd(g)})).parse(a);return d?IC(d,e,f,b,c):null}
function IC(a,b,c,d,e){d=new Tb(d,e,"");AC(a,d,new Map);b&&(d.id=b);if(c)for(a=new Up(c),b=Xp(a);b;)zC(d,b,[]),Vp(a),b=Xp(a);return d}S("shaka.text.Mp4VttParser",GC);GC.prototype.parseMedia=GC.prototype.parseMedia;GC.prototype.setManifestType=GC.prototype.setManifestType;GC.prototype.setSequenceMode=GC.prototype.setSequenceMode;GC.prototype.parseInit=GC.prototype.parseInit;ue['application/mp4; codecs="wvtt"']=function(){return new GC};function JC(){}JC.prototype.parseInit=function(){};JC.prototype.setSequenceMode=function(){};JC.prototype.setManifestType=function(){};JC.prototype.parseMedia=function(a){var b=xd(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 Up(c[0]),e=KC(d),f=Wp(d,/,/g);d=KC(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Tb(e,d,c.slice(1).join("\n").trim()))}return a};
function KC(a){a=Wp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}S("shaka.text.SbvTextParser",JC);JC.prototype.parseMedia=JC.prototype.parseMedia;JC.prototype.setManifestType=JC.prototype.setManifestType;JC.prototype.setSequenceMode=JC.prototype.setSequenceMode;JC.prototype.parseInit=JC.prototype.parseInit;ue["text/x-subviewer"]=function(){return new JC};function LC(){this.g=new wC}LC.prototype.parseInit=function(){};LC.prototype.setSequenceMode=function(){};LC.prototype.setManifestType=function(){};LC.prototype.parseMedia=function(a,b,c){a=xd(a);a=MC(a);a=Cb(Bd(a));return this.g.parseMedia(a,b,c)};
function MC(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}S("shaka.text.SrtTextParser",LC);LC.srt2webvtt=MC;LC.prototype.parseMedia=LC.prototype.parseMedia;
LC.prototype.setManifestType=LC.prototype.setManifestType;LC.prototype.setSequenceMode=LC.prototype.setSequenceMode;LC.prototype.parseInit=LC.prototype.parseInit;ue["text/srt"]=function(){return new LC};function NC(){}NC.prototype.parseInit=function(){};NC.prototype.setSequenceMode=function(){};NC.prototype.setManifestType=function(){};
NC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=xd(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=OC.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(f=b.next();!f.done;f=b.next())if(a=f.value,!/^\s*;/.test(a)&&(f=PC.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(QC);else if("Style"==a){a=f.split(QC);f={};for(var g=0;g<e.length&&
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;a={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;a={Ve:a.Ve},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=PC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(QC);else if("Dialogue"==f){g=g.split(QC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=RC(f.Start);var k=RC(f.End);g=new Tb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Ve=f.Style;(f=d.find(function(l){return function(m){return m.Name==
l.Ve}}(a)))&&SC(g,f);e.push(g)}return e};
function SC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=TC(c))a.color=c;if(c=b.BackColour)if(c=TC(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=$b;a.textAlign="start";break;case 2:a.displayAlign=$b;a.textAlign=Vb;break;case 3:a.displayAlign=$b;a.textAlign="end";
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Vb;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=Vb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
function TC(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 RC(a){a=UC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",NC);NC.prototype.parseMedia=NC.prototype.parseMedia;NC.prototype.setManifestType=NC.prototype.setManifestType;NC.prototype.setSequenceMode=NC.prototype.setSequenceMode;NC.prototype.parseInit=NC.prototype.parseInit;
var OC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,PC=/^\s*([^:]+):\s*(.*)/,QC=/\s*,\s*/,UC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ue["text/x-ssa"]=function(){return new NC};function VC(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)?{le:c,ba:a}:null}function WC(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,Na:"mp4a.40."+e}}
function XC(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 YC(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 ZC(a){this.i=a;this.h=0;this.g=new Map}r=ZC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?ob(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(qe(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
r.transmux=function(a,b,c,d){for(var e=Cb(a),f=Wi(e),g=f.length;g<e.length&&!XC(e,g);g++);a=1E3*c.endTime;f=Vi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=WC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=VC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.le+k.ba;g+l<=e.length&&h.push({data:e.subarray(g+
k.le,g+l),size:k.ba,duration:1024,eb:0,flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:2,ib:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.Na,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,ab:[],ma:new Uint8Array([]),wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:a,Za:h},stream:b};c=new lx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=rx(c),this.g.set(b.id,d));b=Ix(c);this.h++;b=Pd(d,b);return Promise.resolve(b)};
S("shaka.transmuxer.AacTransmuxer",ZC);ZC.prototype.transmux=ZC.prototype.transmux;ZC.prototype.getOriginalMimeType=ZC.prototype.getOriginalMimeType;ZC.prototype.convertCodecs=ZC.prototype.convertCodecs;ZC.prototype.isSupported=ZC.prototype.isSupported;ZC.prototype.destroy=ZC.prototype.destroy;lc("audio/aac",function(){return new ZC("audio/aac")},tc);function $C(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,ma:a,ba:e}}
function aD(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 bD(a){this.i=a;this.h=0;this.g=new Map}r=bD.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?ob(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
r.transmux=function(a,b,c,d){a=Cb(a);for(var e=Wi(a),f=e.length;f<a.length&&!aD(a,f);f++);var g=1E3*c.endTime;e=Vi(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=$C(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ma;k.push({data:a.subarray(f,f+l.ba),size:l.ba,duration:1536,
eb:0,flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:2,ib:0}});f+=l.ba}c=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,ab:[],ma:h,wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:c,Za:k},stream:b};c=new lx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=rx(c),this.g.set(b.id,d));b=Ix(c);this.h++;b=Pd(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",bD);bD.prototype.transmux=bD.prototype.transmux;
bD.prototype.getOriginalMimeType=bD.prototype.getOriginalMimeType;bD.prototype.convertCodecs=bD.prototype.convertCodecs;bD.prototype.isSupported=bD.prototype.isSupported;bD.prototype.destroy=bD.prototype.destroy;lc("audio/ac3",function(){return new bD("audio/ac3")},tc);function cD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new fj(a.subarray(b+2));hj(c,2);hj(c,3);var d=ij(c,11)+1<<1,e=ij(c,2);if(3==e){e=ij(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=ij(c,2);var g=ij(c,3),h=ij(c,1);c=ij(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ma:a,ba:d}};function dD(a){this.i=a;this.h=0;this.g=new Map}r=dD.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?ob(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.i};
r.transmux=function(a,b,c,d){a=Cb(a);for(var e=Wi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Vi(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=cD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ma;k.push({data:a.subarray(f,f+l.ba),
size:l.ba,duration:1536,eb:0,flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:2,ib:0}});f+=l.ba}c=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,ab:[],ma:h,wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:c,Za:k},stream:b};c=new lx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=rx(c),this.g.set(b.id,d));b=Ix(c);this.h++;b=Pd(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",dD);dD.prototype.transmux=dD.prototype.transmux;
dD.prototype.getOriginalMimeType=dD.prototype.getOriginalMimeType;dD.prototype.convertCodecs=dD.prototype.convertCodecs;dD.prototype.isSupported=dD.prototype.isSupported;dD.prototype.destroy=dD.prototype.destroy;lc("audio/ec3",function(){return new dD("audio/ec3")},tc);function eD(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 fj(b.data),d=mj(c);mj(c);mj(c);kj(c);if(fD.includes(d)&&(d=V(c),3===d&&hj(c,1),kj(c),kj(c),hj(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?nj(c,16):nj(c,64))}kj(c);d=V(c);if(0===d)V(c);else if(1===d)for(hj(c,1),kj(c),kj(c),d=V(c),e=0;e<d;e++)kj(c);kj(c);hj(c,1);var f=V(c),g=V(c),h=ij(c,1);0===h&&hj(c,1);hj(c,1);var k=0,l=0,m=0,n=0;W(c)&&
(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=mj(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=ij(c,16),e=ij(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
225].concat(k,[1],b));return{height:c,width:f,wa:a,Ba:d,Ca:e}}
function gD(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=oj(new fj(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
{data:Pd.apply(Fd,x(c)),Bd:b}:null}var fD=[100,110,122,244,44,83,86,118,128,138,139,134];function hD(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=iD(b.fullData);a=jD(c.fullData);var f=kD(d.fullData);b=lD(b.fullData,c.fullData,d.fullData,{Qf:e.Qf,kg:e.kg,Bf:a.Bf,Cf:a.Cf,vf:a.vf,Af:a.Af,wf:a.wf,xf:a.xf,yf:a.yf,zf:a.zf,nf:a.nf,pf:a.pf,qf:a.qf,rf:a.rf,tf:a.tf,uf:a.uf,hf:a.hf,ve:a.ve,ff:a.ff,df:a.df,cf:a.cf,Tf:f.Tf});return{height:a.height,width:a.width,
wa:b,Ba:a.Yi,Ca:a.Xi}}function iD(a){var b=new fj(a,!0);mj(b);mj(b);ij(b,4);ij(b,2);ij(b,6);a=ij(b,3);b=W(b);return{Qf:a+1,kg:b}}
function jD(a){a=new fj(a,!0);mj(a);mj(a);var b=0,c=0,d=0,e=0;ij(a,4);var f=ij(a,3);W(a);for(var g=ij(a,2),h=ij(a,1),k=ij(a,5),l=mj(a),m=mj(a),n=mj(a),p=mj(a),q=mj(a),u=mj(a),w=mj(a),v=mj(a),A=mj(a),y=mj(a),D=mj(a),z=[],B=[],C=0;C<f;C++)z.push(W(a)),B.push(W(a));if(0<f)for(C=f;8>C;C++)ij(a,2);for(C=0;C<f;C++)z[C]&&ij(a,88),B[C]&&mj(a);V(a);z=V(a);3==z&&ij(a,1);B=V(a);C=V(a);W(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var F=V(a),H=V(a),K=V(a);if(W(a))for(var J=0;J<=f;J++)V(a),V(a),V(a);else V(a),V(a),
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(J=0;4>J;J++)for(var E=0;E<(3===J?2:6);E++)if(W(a)){var L=Math.min(64,1<<4+(J<<1));1<J&&lj(a);for(var M=0;M<L;M++)lj(a)}else V(a);W(a);W(a);W(a)&&(mj(a),V(a),V(a),W(a));J=V(a);for(L=E=0;L<J;L++)if(M=!1,0!==L&&(M=W(a)),M){L===J&&V(a);W(a);V(a);for(var N=M=0;N<=E;N++){var Q=W(a),R=!1;Q||(R=W(a));(Q||R)&&M++}E=M}else{N=V(a);M=V(a);E=N+M;for(Q=0;Q<N;Q++)V(a),W(a);for(N=0;N<M;N++)V(a),W(a)}if(W(a))for(J=V(a),E=0;E<J;E++){for(L=0;L<K+4;L++)ij(a,1);ij(a,
1)}J=K=1;E=0;W(a);W(a);if(W(a)){W(a)&&(L=mj(a),M=[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<L&&16>=L?(K=M[L-1],J=N[L-1]):255===L&&(K=ij(a,16),J=ij(a,16)));W(a)&&W(a);W(a)&&(ij(a,3),W(a),W(a)&&(mj(a),mj(a),mj(a)));W(a)&&(V(a),V(a));W(a);W(a);W(a);if(L=W(a))V(a),V(a),V(a),V(a);if(W(a)&&(ij(a,32),ij(a,32),W(a)&&V(a),W(a))){N=!1;L=W(a);M=W(a);if(L||M){if(N=W(a))mj(a),ij(a,5),W(a),ij(a,5);ij(a,4);ij(a,4);N&&ij(a,4);ij(a,5);ij(a,5);ij(a,5)}for(Q=0;Q<=
f;Q++){var P=!0;R=1;W(a)||(P=W(a));var aa=!1;P?V(a):aa=W(a);aa||(R=V(a)+1);if(L){for(P=0;P<R;P++)V(a),V(a),N&&(V(a),V(a));W(a)}if(M){for(P=0;P<R;P++)V(a),V(a),N&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),E=V(a),V(a),V(a),V(a),V(a))}return{vf:D,Bf:g,Cf:h,Af:k,wf:l,xf:m,yf:n,zf:p,nf:q,pf:u,qf:w,rf:v,tf:A,uf:y,ve:E,hf:0,ff:z,df:F,cf:H,width:B-(b+c)*(1===z||2===z?2:1),height:C-(d+e)*(1===z?2:1),Yi:K,Xi:J}}
function kD(a){var b=new fj(a,!0);mj(b);mj(b);V(b);V(b);W(b);W(b);ij(b,3);W(b);W(b);V(b);V(b);lj(b);W(b);W(b);W(b)&&V(b);lj(b);lj(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Tf:c}}
function lD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Bf&3)<<6|(d.Cf?1:0)<<5|d.Af&31;e[2]=d.wf;e[3]=d.xf;e[4]=d.yf;e[5]=d.zf;e[6]=d.nf;e[7]=d.pf;e[8]=d.qf;e[9]=d.rf;e[10]=d.tf;e[11]=d.uf;e[12]=d.vf;e[13]=240|(d.ve&3840)>>8;e[14]=d.ve&255;e[15]=252|d.Tf&3;e[16]=252|d.ff&3;e[17]=248|d.df&7;e[18]=248|d.cf&7;e[19]=0;e[20]=0;e[21]=(d.hf&3)<<6|(d.Qf&7)<<3|(d.kg?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 mD(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*nD[14*(3===c?3-d:3===d?3:4)+e-1];f=oD[3*(3===c?0:2===c?1:2)+f];c=pD[c][d];var h=qD[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,ba:k,Wi:8*c*h}}return null}
function rD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function sD(a,b){if(b+1<a.length&&rD(a,b)){var c=mD(a,b),d=4;c&&c.ba&&(d=c.ba);b+=d;return b===a.length||b+1<a.length&&rD(a,b)}return!1}
var nD=[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],oD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],pD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],qD=[0,1,1,4];function tD(a){this.i=a;this.h=0;this.g=new Map}r=tD.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?ob(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.i};
r.transmux=function(a,b,c,d){for(var e=Cb(a),f=Wi(e).length;f<e.length&&!sD(e,f);f++);var g;for(a=[];f<e.length;){var h=mD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.ba<=e.length&&a.push({data:e.subarray(f,f+h.ba),size:h.ba,duration:1152,eb:0,flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:2,ib:0}});f+=h.ba}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=9E4*g.Wi/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
duration:d,ab:[],ma:new Uint8Array([]),wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:c,Za:a},stream:b};g=new lx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=rx(g),this.g.set(b.id,d));b=Ix(g);this.h++;b=Pd(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",tD);tD.prototype.transmux=tD.prototype.transmux;tD.prototype.getOriginalMimeType=tD.prototype.getOriginalMimeType;tD.prototype.convertCodecs=tD.prototype.convertCodecs;tD.prototype.isSupported=tD.prototype.isSupported;
tD.prototype.destroy=tD.prototype.destroy;lc("audio/mpeg",function(){return new tD("audio/mpeg")},tc);function uD(a){this.h=a;this.g=null}r=uD.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=qe(a).split(","),c=Ud("audio",b);b=Ud("video",b);return!c||b||"mp3"!=he(c)?!1:ob(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 pj;a=Cb(a);a=this.g.parse(a);if("mp3"!=a.rd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Wb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=mD(a,b))?(b+d.ba<=a.length&&(c=Pd(c,a.subarray(b,b+d.ba))),b+=d.ba):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",uD);uD.prototype.transmux=uD.prototype.transmux;
uD.prototype.getOriginalMimeType=uD.prototype.getOriginalMimeType;uD.prototype.convertCodecs=uD.prototype.convertCodecs;uD.prototype.isSupported=uD.prototype.isSupported;uD.prototype.destroy=uD.prototype.destroy;lc("video/mp2t",function(){return new uD("video/mp2t")},sc);/*
 @license
 MSS Transmuxer
 Copyright 2015 Dash Industry Forum
 SPDX-License-Identifier: BSD-3-Clause
*/
function vD(a){this.h=a;(this.g=uv.get("ISOBoxer")())&&wD(this)}
function wD(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]!==xD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=vD.prototype;r.destroy=function(){};
r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return ob(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return ob(b)||ob(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(Cb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.M()[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]=yD(u,"traf")+yD(h,"senc")+16);var v=Cb(e.write());return Promise.resolve(v)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function yD(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}S("shaka.transmuxer.MssTransmuxer",vD);vD.prototype.transmux=vD.prototype.transmux;
vD.prototype.getOriginalMimeType=vD.prototype.getOriginalMimeType;vD.prototype.convertCodecs=vD.prototype.convertCodecs;vD.prototype.isSupported=vD.prototype.isSupported;vD.prototype.destroy=vD.prototype.destroy;var xD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);lc("mss/audio/mp4",function(){return new vD("mss/audio/mp4")},tc);lc("mss/video/mp4",function(){return new vD("mss/video/mp4")},tc);function zD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=zD.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=qe(c).split(",");c=Ud("audio",d);d=Ud("video",d);if(c&&(c=he(c),!AD.includes(c))||d&&(c=he(d),!BD.includes(c)))return!1;if(b)return ob(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return ob(b)||ob(a)};
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=qe(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return cf(c,"audio/mp4")}).map(bf).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
r.transmux=function(a,b,c,d,e){var f=Cb(a);if("audio"==e&&!Dj(f)){for(var g=Wi(f),h=g.length;h<f.length;h++)if(sD(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(XC(f,h))return this.h||(this.h=new ZC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new pj;var k=this.j.parse(f),l=[],m=k.rd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],q=null,u=[],w=k.Ic();
if(!w.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var v=0;v<w.length;v++){var A=w[v],y=A.nalus;u.push.apply(u,x(y));var D=gD(y);if(D){null==q&&(q=A.dts);var z=void 0;z=v+1<w.length?(w[v+1].dts||0)-(A.dts||0):1<w.length?(A.dts||0)-(w[v-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:D.data,size:D.data.byteLength,duration:z,eb:Math.round((A.pts||0)-(A.dts||0)),flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:D.Bd?2:1,ib:D.Bd?0:1}})}}var B=eD(u);if(!B||null==q)throw new T(2,3,3018,c?c.M()[0]:null);b.height=B.height;
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ab:[],ma:new Uint8Array([]),wa:B.wa,Ba:B.Ba,Ca:B.Ca,data:{sb:this.g,baseMediaDecodeTime:q,Za:p},stream:b};break;case "hvc":var C=[],F=null,H=[],K=k.Ic();if(!K.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var J=0;J<K.length;J++){var E=K[J],L=E.nalus;H.push.apply(H,x(L));for(var M=!1,N=[],Q=!1,R=t(L),P=R.next();!P.done;P=R.next()){var aa=P.value;switch(aa.type){case 1:case 0:var ba=
Q=!0;break;case 19:case 20:case 21:M=ba=Q=!0;break;case 32:ba=!0;break;case 33:ba=!0;break;case 34:ba=!0;break;case 35:Q=ba=!0;break;case 39:case 40:ba=!0;break;default:ba=!1}if(Q&&ba){var Sa=aa.fullData.byteLength,ta=new Uint8Array(4);ta[0]=Sa>>24&255;ta[1]=Sa>>16&255;ta[2]=Sa>>8&255;ta[3]=Sa&255;N.push(ta);N.push(aa.fullData)}}var Ma=N.length?{data:Pd.apply(Fd,x(N)),Bd:M}:null;if(Ma){null==F&&null!=E.dts&&(F=E.dts);var Ya=void 0;Ya=J+1<K.length?(K[J+1].dts||0)-(E.dts||0):1<K.length?(E.dts||0)-(K[J-
1].dts||0):9E4*(c.endTime-c.startTime);C.push({data:Ma.data,size:Ma.data.byteLength,duration:Ya,eb:Math.round((E.pts||0)-(E.dts||0)),flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:Ma.Bd?2:1,ib:Ma.Bd?0:1}})}}var Ta=hD(H);if(!Ta||null==F)throw new T(2,3,3018,c?c.M()[0]:null);b.height=Ta.height;b.width=Ta.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ab:[],ma:new Uint8Array([]),wa:Ta.wa,Ba:Ta.Ba,Ca:Ta.Ca,data:{sb:this.g,baseMediaDecodeTime:F,Za:C},stream:b}}n&&
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var gb=[],Va,Ua=null,mc=t(k.Wb()),Oa=mc.next();!Oa.done;Oa=mc.next()){var lb=Oa.value,Pb=lb.data;if(Pb){var Nc=0;Va=WC(Pb,Nc);if(!Va)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Va.sampleRate;b.channelsCount=Va.channelCount;null==Ua&&null!==lb.pts&&(Ua=lb.pts);for(;Nc<Pb.length;){var je=VC(Pb,Nc);if(je){var ke=je.le+je.ba;Nc+ke<=Pb.length&&gb.push({data:Pb.subarray(Nc+je.le,Nc+ke),size:je.ba,duration:1024,eb:0,flags:{hb:0,
Wa:0,Va:0,Ta:0,Ua:2,ib:0}});Nc+=ke}else Nc++}}}if(!Va||null==Ua){if(!k.Ic().length)throw new T(2,3,3018,c?c.M()[0]:null);Ua=9E4*c.startTime;var le=Ud("audio",b.codecs.split(","));if(!le||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);Va={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Na:le};var Jd=YC(le,b.channelsCount);if(!Jd)throw new T(2,3,3018,c?c.M()[0]:null);for(var Li=Ua+9E4*(c.endTime-c.startTime),Kd=Ua;Kd<Li;)gb.push({data:Jd,size:Jd.byteLength,
duration:1024,eb:0,flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:2,ib:0}}),Kd+=1024/Va.sampleRate*9E4}var Mi=Va.sampleRate,Ni=Ua/9E4*Mi;n={id:b.id,type:"audio",codecs:Va.Na,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Mi,duration:d,ab:[],ma:new Uint8Array([]),wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:Ni,Za:gb},stream:b};break;case "ac3":for(var Eg=[],me=0,nc=new Uint8Array([]),vj=null,Qu=t(k.Wb()),Um=Qu.next();!Um.done;Um=Qu.next()){var Vm=Um.value,Wm=Vm.data;null==vj&&null!==Vm.pts&&
(vj=Vm.pts);for(var vf=0;vf<Wm.length;){var Nd=$C(Wm,vf);Nd?(b.audioSamplingRate=Nd.sampleRate,b.channelsCount=Nd.channelCount,me=Nd.sampleRate,nc=Nd.ma,Eg.push({data:Wm.subarray(vf,vf+Nd.ba),size:Nd.ba,duration:1536,eb:0,flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:2,ib:0}}),vf+=Nd.ba):vf++}}if(0==me||0==nc.byteLength||null==vj)throw new T(2,3,3018,c?c.M()[0]:null);var RD=vj/9E4*me;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:me,duration:d,ab:[],ma:nc,wa:new Uint8Array([]),
Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:RD,Za:Eg},stream:b};break;case "ec3":for(var Ru=[],wj=0,Xm=new Uint8Array([]),xj=null,Su=t(k.Wb()),Ym=Su.next();!Ym.done;Ym=Su.next()){var Zm=Ym.value,$m=Zm.data;null==xj&&null!==Zm.pts&&(xj=Zm.pts);for(var wf=0;wf<$m.length;){var Od=cD($m,wf);Od?(b.audioSamplingRate=Od.sampleRate,b.channelsCount=Od.channelCount,wj=Od.sampleRate,Xm=Od.ma,Ru.push({data:$m.subarray(wf,wf+Od.ba),size:Od.ba,duration:1536,eb:0,flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:2,ib:0}}),wf+=Od.ba):
wf++}}if(0==wj||0==Xm.byteLength||null==xj)throw new T(2,3,3018,c?c.M()[0]:null);var SD=xj/9E4*wj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:wj,duration:d,ab:[],ma:Xm,wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:SD,Za:Ru},stream:b};break;case "mp3":for(var Tu=[],yj,zj=null,Uu=t(k.Wb()),an=Uu.next();!an.done;an=Uu.next()){var bn=an.value,Sg=bn.data;if(Sg){null==zj&&null!==bn.pts&&(zj=bn.pts);for(var pe=0;pe<Sg.length;){var xf=mD(Sg,
pe);xf?(yj||(yj=xf),pe+xf.ba<=Sg.length&&Tu.push({data:Sg.subarray(pe,pe+xf.ba),size:xf.ba,duration:1152,eb:0,flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:2,ib:0}}),pe+=xf.ba):pe++}}}if(!yj||null==zj)throw new T(2,3,3018,c?c.M()[0]:null);var Vu=yj.sampleRate,TD=zj/9E4*Vu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Vu,duration:d,ab:[],ma:new Uint8Array([]),wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:TD,Za:Tu},stream:b};break;case "opus":var Wu=
[],Aj=null,Xc=k.F;if(!Xc)throw new T(2,3,3018,c?c.M()[0]:null);var Bb=[];switch(Xc.Jh){case 1:case 2:Bb=[0];break;case 0:Bb=[255,1,1,0,1];break;case 128:Bb=[255,2,0,0,1];break;case 3:Bb=[1,2,1,0,2,1];break;case 4:Bb=[1,2,2,0,1,2,3];break;case 5:Bb=[1,3,2,0,4,1,2,3];break;case 6:Bb=[1,4,2,0,4,1,2,3,5];break;case 7:Bb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Bb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Bb=[1,1,2,0,1];break;case 131:Bb=[1,1,3,0,1,2];break;case 132:Bb=[1,1,4,0,1,2,3];break;case 133:Bb=[1,1,5,
0,1,2,3,4];break;case 134:Bb=[1,1,6,0,1,2,3,4,5];break;case 135:Bb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Bb=[1,1,8,0,1,2,3,4,5,6,7]}var Xu=new Uint8Array([0,Xc.channelCount,0,0,Xc.sampleRate>>>24&255,Xc.sampleRate>>>17&255,Xc.sampleRate>>>8&255,Xc.sampleRate>>>0&255,0,0].concat(x(Bb)));for(var Yu=Xc.sampleRate,Zu=t(k.Wb()),cn=Zu.next();!cn.done;cn=Zu.next()){var dn=cn.value,yf=dn.data;null==Aj&&null!==dn.pts&&(Aj=dn.pts);for(var Tg=0;Tg<yf.length;){for(var UD=0!==(yf[Tg+1]&16),VD=0!==(yf[Tg+1]&8),
wd=Tg+2,Bj=0;255===yf[wd];)Bj+=255,wd+=1;Bj+=yf[wd];wd+=1;wd+=UD?2:0;wd+=VD?2:0;var $u=yf.slice(wd,wd+Bj);Wu.push({data:$u,size:$u.byteLength,duration:960,eb:0,flags:{hb:0,Wa:0,Va:0,Ta:0,Ua:2,ib:0}});Tg=wd+Bj}}if(0==Xu.byteLength||null==Aj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Xc.sampleRate;b.channelsCount=Xc.channelCount;var WD=Aj/9E4*Yu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Yu,duration:d,ab:[],ma:Xu,wa:new Uint8Array([]),Ba:0,
Ca:0,data:{sb:this.g,baseMediaDecodeTime:WD,Za:Wu},stream:b}}n&&(l.push(n),n=null)}}catch(en){return en&&3023==en.code?Promise.resolve(new Uint8Array([])):Promise.reject(en)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var av=new lx(l);if(this.i.has(b.id))var fn=this.i.get(b.id);else fn=rx(av),this.i.set(b.id,fn);var XD=Ix(av);this.g++;var YD=Pd(fn,XD);return Promise.resolve(YD)};S("shaka.transmuxer.TsTransmuxer",zD);zD.prototype.transmux=zD.prototype.transmux;
zD.prototype.getOriginalMimeType=zD.prototype.getOriginalMimeType;zD.prototype.convertCodecs=zD.prototype.convertCodecs;zD.prototype.isSupported=zD.prototype.isSupported;zD.prototype.destroy=zD.prototype.destroy;var AD=["aac","ac-3","ec-3","mp3","opus"],BD=["avc","hevc"];lc("video/mp2t",function(){return new zD("video/mp2t")},rc);/*
 @license
 EME Encryption Scheme Polyfill
 Copyright 2019 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function CD(){}var DD;
function ED(){DD||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(DD=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=FD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
function FD(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),G(e,DD.call(c,a,b),2);d=e.h;if(GD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=DD,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=HD;return e.return(HD.call(c,
a,b))})}
function HD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u;return O(function(w){if(1==w.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=ID(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=JD(h.videoCapabilities,d),l=JD(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 G(w,DD.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 KD(p,q,u))})}function JD(a,b){return a?a.filter(function(c){return LD(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",CD);CD.install=ED;function MD(){}var ND;
function OD(){ND||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ND=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=PD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
function PD(a){var b=this,c,d,e;return O(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),G(f,ND.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&GD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ND,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
navigator.mediaCapabilities.decodingInfo=QD;if(d){f.u(3);break}e=c;return G(f,ZD(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(QD.call(b,a))}})}
function QD(a){var b=this,c,d,e,f,g,h,k,l;return O(function(m){switch(m.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=ID(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},LD(d,g)&&LD(c,g))?G(m,ND.call(b,a),2):m.return(h);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
new KD(k.keySystemAccess,c,d);m.u(3);break}if(!a.keySystemConfiguration){m.u(3);break}l=k;return G(m,ZD(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
function ZD(a){var b,c;return O(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 G(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",MD);MD.install=OD;function KD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
KD.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};KD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
function ID(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";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function GD(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 LD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if($D||aE)return!0;return!1}function bE(){}function gA(){ED();OD()}S("EncryptionSchemePolyfills",bE);bE.install=gA;var aE=navigator.userAgent.includes("CrKey"),$D=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=bE);}).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