/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
var p,aa=typeof Object.create=="function"?Object.create:function(a){function b(){}b.prototype=a;return new b},ba=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=ca(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ba(c,a,{configurable:!0,writable:!0,value:b})}}var ia;
if(typeof Object.setPrototypeOf=="function")ia=Object.setPrototypeOf;else{var ja;a:{var ka={a:!0},la={};try{la.__proto__=ka;ja=la.a;break a}catch(a){}ja=!1}ia=ja?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ma=ia;
function na(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(ma)ma(a,b);else for(var c in b)if(c!="prototype")if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Fj=b.prototype}function oa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}
function r(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:oa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function A(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b});
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];typeof d==="function"&&typeof d.prototype[a]!="function"&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return pa(oa(this))}})}return a});function pa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
function ra(){this.o=!1;this.m=null;this.h=void 0;this.g=1;this.j=this.l=0;this.B=this.i=null}function ta(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.A=function(a){this.h=a};function ua(a,b){a.i={jg:b,vg:!0};a.g=a.l||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function H(a,b,c){a.g=c;return{value:b}}ra.prototype.u=function(a){this.g=a};function K(a){a.g=0}function va(a,b,c){a.l=b;c!=void 0&&(a.j=c)}function xa(a,b,c){a.g=b;a.l=c||0}
function za(a,b){a.l=b||0;b=a.i.jg;a.i=null;return b}function Aa(a){a.B=[a.i];a.l=0;a.j=0}function Ba(a,b){var c=a.B.splice(0)[0];(c=a.i=a.i||c)?c.vg?a.g=a.l||a.j:c.u!=void 0&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function Ca(a){this.g=new ra;this.h=a}function Ea(a,b){ta(a.g);var c=a.g.m;if(c)return Fa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ga(a)}
function Fa(a,b,c,d){try{var e=b.call(a.g.m,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.m=null,ua(a.g,g),Ga(a)}a.g.m=null;d.call(a.g,f);return Ga(a)}function Ga(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,ua(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.vg)throw b.jg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function Ha(a){this.next=function(b){ta(a.g);a.g.m?b=Fa(a,a.g.m.next,b,a.g.A):(a.g.A(b),b=Ga(a));return b};this.throw=function(b){ta(a.g);a.g.m?b=Fa(a,a.g.m["throw"],b,a.g.A):(ua(a.g,b),b=Ga(a));return b};this.return=function(b){return Ea(a,b)};this[Symbol.iterator]=function(){return this}}function Ja(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 L(a){return Ja(new Ha(new Ca(a)))}function Ka(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(this.g==null){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=g!=null;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}typeof h=="function"?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.A(2,g)};b.prototype.m=function(g){this.A(1,g)};b.prototype.A=function(g,h){if(this.h!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;this.h===2&&this.H();this.B()};b.prototype.H=function(){var g=this;e(function(){if(g.C()){var h=ea.console;typeof h!=="undefined"&&h.error(g.i)}},1)};b.prototype.C=
function(){if(this.o)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if(typeof k==="undefined")return!0;typeof g==="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof h==="function"?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.B=function(){if(this.g!=null){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
b.prototype.I=function(g){var h=this.j();g.Od(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,t){return typeof q=="function"?function(u){try{l(q(u))}catch(v){m(v)}}:t}var l,m,n=new b(function(q,t){l=q;m=t});this.Od(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Od=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;this.g==null?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).Od(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){q[u]=v;t--;t==0&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).Od(n(q.length-1),m),k=h.next();
while(!k.done)})};return b});function Ma(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return l==="object"&&k!==null||l==="function"}function e(k){if(!Ma(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
m=new a([[k,2],[l,3]]);if(m.get(k)!=2||m.get(l)!=3)return!1;m.delete(k);m.set(l,4);return!m.has(k)&&m.get(l)==4}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ma(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ma(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ma(k,
g)&&Ma(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ma(k,g)&&Ma(k[g],this.g)?delete k[g][this.g]:!1};return b});
fa("Map",function(a){function b(){var h={};return h.Ub=h.next=h.head=h}function c(h,k){var l=h[1];return pa(function(){if(l){for(;l.head!=h[1];)l=l.Ub;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;l=="object"||l=="function"?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Ma(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!=
4||m.value[1]!="t"||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Ub:this[1].Ub,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Ub.next=l.entry,this[1].Ub=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.Ub.next=
h.entry.next,h.entry.next.Ub=h.entry.Ub,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Ub=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||f.value[0].x!=
4||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Na(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{pg:e,v:f}}return{pg:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Na(this,b,c).pg}});
function Ta(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.values",function(a){return a?a:function(){return Ta(this,function(b,c){return c})}});
fa("Array.from",function(a){return a?a:function(b,c,d){c=c!=null?c:function(h){return h};var e=[],f=typeof Symbol!="undefined"&&Symbol.iterator&&b[Symbol.iterator];if(typeof f=="function"){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});fa("Array.prototype.keys",function(a){return a?a:function(){return Ta(this,function(b){return b})}});
fa("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}});fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
function Ua(a,b,c){if(a==null)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}fa("String.prototype.includes",function(a){return a?a:function(b,c){return Ua(this,b,"includes").indexOf(b,c||0)!==-1}});
fa("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(e<0||e>1114111||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);e<=65535?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
fa("Array.prototype.find",function(a){return a?a:function(b,c){return Na(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ua(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ma(b,d)&&c.push([d,b[d]]);return c}});
var Va=typeof Object.assign=="function"?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ma(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Va});fa("Array.prototype.entries",function(a){return a?a:function(){return Ta(this,function(b,c){return[b,c]})}});
fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Number.EPSILON",function(){return 2.220446049250313E-16});fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||b===Infinity||b===-Infinity||b===0)return b;var c=Math.floor(Math.abs(b));return b<0?-c:c}});fa("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ua(this,null,"repeat");if(b<0||b>1342177279)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});
fa("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ua(this,b,"endsWith");c===void 0&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;e>0&&c>0;)if(d[--c]!=b[--e])return!1;return e<=0}});var Wa=this||self;
function S(a,b){a=a.split(".");var c=Wa;a[0]in c||typeof c.execScript=="undefined"||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||b===void 0?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Xa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Xa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Za(a){return a.h/(1-Math.pow(a.g,a.i))};function $a(){this.h=new Xa(2);this.j=new Xa(5);this.g=0;this.i=128E3;this.l=16E3}$a.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)};$a.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)}};$a.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Za(this.h),Za(this.j))};function ab(){}function bb(){}function cb(){}function db(a){var b=Ka.apply(1,arguments);eb.has(a)||(eb.add(a),cb.apply(ab,A(b)))}function fb(){}function gb(){}var eb=new Set;
window.console&&((new Map).set(1,function(){return console.error.apply(console,A(Ka.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,A(Ka.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,A(Ka.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,A(Ka.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,A(Ka.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,A(Ka.apply(0,arguments)))}),
cb=function(){return console.warn.apply(console,A(Ka.apply(0,arguments)))},bb=function(){console.error.apply(console,A(Ka.apply(0,arguments)))});function hb(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function ib(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function jb(a,b){var c;c||(c=hb);if(a.length!=b.length)return!1;b=b.slice();a=r(a);for(var d=a.next(),e={};!d.done;e={wg:void 0},d=a.next()){e.wg=d.value;d=b.findIndex(function(f){return function(g){return c(f.wg,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0}
function kb(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=hb);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 lb(){this.g=new Map}p=lb.prototype;p.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};p.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};p.remove=function(a,b){if(this.g.has(a)){var c=this.g.get(a).filter(function(d){return d!=b});this.g.set(a,c);c.length||this.g.delete(a)}};p.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};p.size=function(){return this.g.size};p.keys=function(){return Array.from(this.g.keys())};function mb(){this.g=new lb}p=mb.prototype;p.release=function(){this.ib();this.g=null};p.G=function(a,b,c,d){this.g&&(a=new nb(a,b,c,d),this.g.push(b,a))};p.Pa=function(a,b,c,d){function e(g){f.pb(a,b,e);c(g)}var f=this;this.G(a,b,e,d)};p.pb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.pb(),this.g.remove(b,e))}};
p.ib=function(){if(this.g){for(var a=[],b=r(this.g.g.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,A(c.value));a=r(a);for(b=a.next();!b.done;b=a.next())b.value.pb();this.g.g.clear()}};S("shaka.util.EventManager",mb);mb.prototype.removeAll=mb.prototype.ib;mb.prototype.unlisten=mb.prototype.pb;mb.prototype.listenOnce=mb.prototype.Pa;mb.prototype.listen=mb.prototype.G;mb.prototype.release=mb.prototype.release;
function nb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ob(a,d);this.target.addEventListener(b,c,this.g)}nb.prototype.pb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ob(a,b){if(b==void 0)return!1;if(typeof b=="boolean")return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return pb(a)?b:b.capture||!1}
function pb(a){var b=qb;if(b==void 0){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}qb=b}return b||!1}var qb=void 0;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function rb(a){this.h=a;this.g=void 0}rb.prototype.value=function(){this.g===void 0&&(this.g=this.h());return this.g};/*
 @license
 Shaka Player
 Copyright 2025 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function sb(){return tb.value()}var ub=null,wb=null,tb=new rb(function(){var a=void 0;ub&&(a=ub());!a&&wb&&(a=wb());return a});function xb(a,b){this.g=a;this.h=b}xb.prototype.toString=function(){return"v"+this.g+"."+this.h};function yb(a,b){var c=new xb(5,0),d=zb,e=d.g,f=c.h-e.h;((c.g-e.g||f)>0?d.i:d.h)(d.g,c,a,b)}function Ab(a,b,c,d){cb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Bb(a,b,c,d){bb([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var zb=null;/*
 @license
 Copyright 2008 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
var Cb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
function Db(a){var b;a instanceof Db?(Eb(this,a.Hb),this.Ec=a.Ec,Fb(this,a.mb),Gb(this,a.Qc),this.zb=a.zb,Hb(this,a.g.clone()),this.nc=a.nc):a&&(b=String(a).match(Cb))?(Eb(this,b[1]||"",!0),this.Ec=Ib(b[2]||""),Fb(this,b[3]||"",!0),Gb(this,b[4]),this.zb=Ib(b[5]||"",!0),Hb(this,b[6]||"",!0),this.nc=Ib(b[7]||"")):this.g=new Jb(null)}p=Db.prototype;p.Hb="";p.Ec="";p.mb="";p.Qc=null;p.zb="";p.nc="";
p.toString=function(){var a=[],b=this.Hb;b&&a.push(Kb(b,Lb,!0),":");if(b=this.mb){a.push("//");var c=this.Ec;c&&a.push(Kb(c,Lb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Qc;b!=null&&a.push(":",String(b))}if(b=this.zb)this.mb&&b.charAt(0)!="/"&&a.push("/"),a.push(Kb(b,b.charAt(0)=="/"?Mb:Nb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.nc)&&a.push("#",Kb(b,Ob));return a.join("")};
p.resolve=function(a){var b=this.clone();b.Hb==="data"&&(b=new Db);var c=!!a.Hb;c?Eb(b,a.Hb):c=!!a.Ec;c?b.Ec=a.Ec:c=!!a.mb;c?Fb(b,a.mb):c=a.Qc!=null;var d=a.zb;if(c)Gb(b,a.Qc);else if(c=!!a.zb){if(d.charAt(0)!="/")if(this.mb&&!this.zb)d="/"+d;else{var e=b.zb.lastIndexOf("/");e!=-1&&(d=b.zb.substr(0,e+1)+d)}if(d==".."||d==".")d="";else if(d.indexOf("./")!=-1||d.indexOf("/.")!=-1){e=d.lastIndexOf("/",0)==0;d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];h=="."?e&&g==d.length&&f.push(""):h==
".."?((f.length>1||f.length==1&&f[0]!="")&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.zb=d:c=a.g.toString()!=="";c?Hb(b,a.g.clone()):c=!!a.nc;c&&(b.nc=a.nc);return b};p.clone=function(){return new Db(this)};function Eb(a,b,c){a.Hb=c?Ib(b,!0):b;a.Hb&&(a.Hb=a.Hb.replace(/:$/,""))}function Fb(a,b,c){a.mb=c?Ib(b,!0):b}function Gb(a,b){if(b){b=Number(b);if(isNaN(b)||b<0)throw Error("Bad port number "+b);a.Qc=b}else a.Qc=null}
function Hb(a,b,c){b instanceof Jb?a.g=b:(c||(b=Kb(b,Pb)),a.g=new Jb(b))}function Ib(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Kb(a,b,c){return a!=null?(a=encodeURI(a).replace(b,Qb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Qb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Lb=/[#\/\?@]/g,Nb=/[#\?:]/g,Mb=/[#\?]/g,Pb=/[#\?@]/g,Ob=/#/g;function Jb(a){this.g=a||null}
function Rb(a){if(!a.Sa&&(a.Sa=new Map,a.$c=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(d>=0){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f);e=e||"";a.add(f,decodeURIComponent(e))}}p=Jb.prototype;p.Sa=null;p.$c=null;function Sb(a){Rb(a);return a.$c}p.add=function(a,b){Rb(this);this.g=null;var c=this.Sa.has(a)?this.Sa.get(a):null;c||this.Sa.set(a,c=[]);c.push(b);this.$c++;return this};
p.set=function(a,b){Rb(this);this.g=null;this.Sa.has(a)?this.Sa.set(a,[b]):this.add(a,b);return this};p.get=function(a){Rb(this);return this.Sa.get(a)||[]};p.toString=function(){if(this.g)return this.g;if(!this.Sa||!this.Sa.size)return"";for(var a=[],b=r(this.Sa.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.Sa.get(d);for(var e=0;e<d.length;e++){var f=c;d[e]!==""&&(f+="="+encodeURIComponent(d[e]));a.push(f)}}return this.g=a.join("&")};
p.clone=function(){var a=new Jb;a.g=this.g;if(this.Sa){for(var b=new Map,c=r(this.Sa),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;b.set(d,e.concat())}a.Sa=b;a.$c=this.$c}return a};function Tb(){}function Ub(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Vb(a);b=Vb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Wb(a){return ArrayBuffer.isView(a)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function Vb(a,b,c){c=c===void 0?Infinity:c;return Xb(a,b===void 0?0:b,c,Uint8Array)}function Yb(a,b,c){c=c===void 0?Infinity:c;return Xb(a,b===void 0?0:b,c,Uint16Array)}function Zb(a,b,c){c=c===void 0?Infinity:c;return Xb(a,b===void 0?0:b,c,DataView)}
function Xb(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}S("shaka.util.BufferUtils",Tb);Tb.toDataView=Zb;Tb.toUint16=Yb;Tb.toUint8=Vb;Tb.toArrayBuffer=Wb;Tb.equal=Ub;function T(a,b,c){var d=Ka.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($b)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 $b=!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,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,
WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,
AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,
LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,
PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,
KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function ac(){}
function cc(a){if(!a)return"";a=Vb(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(window.TextDecoder&&!sb().Nf())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&bb('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;(a[c]&128)==0?d=a[c]:a.length>=c+2&&(a[c]&224)==192&&(a[c+1]&192)==128?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&(a[c]&240)==224&&(a[c+1]&192)==128&&
(a[c+2]&192)==128?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&(a[c]&241)==240&&(a[c+1]&192)==128&&(a[c+2]&192)==128&&(a[c+3]&192)==128&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(d<=65535)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
function dc(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Zb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return ec(d)}
function hc(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=Vb(a);if(c[0]==239&&c[1]==187&&c[2]==191)return cc(c);if(c[0]==254&&c[1]==255)return dc(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return dc(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return dc(a,!1);if(c[1]==0&&c[3]==0)return dc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return cc(a);throw new T(2,2,2003);}
function ic(a){if(window.TextEncoder&&!sb().Nf()){var b=new TextEncoder;return Wb(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 Wb(b)}function jc(a,b){for(var c=new ArrayBuffer(a.length*2),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(e*2,a.charCodeAt(e),b);return c}function ec(a){return kc.value()(a)}
function lc(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return e[1]=="#"?(e=e[2]=="x"||e[2]=="X"?parseInt(e.substring(3),16):parseInt(e.substring(2),10),e>=0&&e<=1114111?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",ac);ac.resetFromCharCode=function(){kc.g=void 0};
ac.toUTF16=jc;ac.toUTF8=ic;ac.fromBytesAutoDetect=hc;ac.fromUTF16=dc;ac.fromUTF8=cc;var kc=new rb(function(){function a(c){try{var d=new Uint8Array(c);return String.fromCharCode.apply(null,d).length>0}catch(e){return!1}}for(var b={jc:65536};b.jc>0;b={jc:b.jc},b.jc/=2)if(a(b.jc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.jc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.jc));return e}}(b);return null});function mc(){}function nc(a){a=ec(Vb(a));return btoa(a)}function oc(a,b){b=b==void 0?!0:b;a=nc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function pc(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 qc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(d*2,2),16);return c}
function rc(a){var b=Vb(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),c.length==1&&(c="0"+c),a+=c;return a}function sc(){for(var a=Ka.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1?b.set(e,c):b.set(Vb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",mc);mc.concat=sc;mc.toHex=rc;mc.fromHex=qc;mc.fromBase64=pc;mc.toBase64=oc;
mc.toStandardBase64=nc;function tc(a,b){var c=c===void 0?"":c;if(b.length==0)return a;if(a.length==1&&b.length==1){var d=new Db(a[0]);b=new Db(b[0]);b=d.resolve(b);c&&Hb(b,c);return[b.toString()]}b=b.map(function(h){return new Db(h)});d=[];a=r(a);for(var e=a.next();!e.done;e=a.next()){e=new Db(e.value);for(var f=r(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&Hb(g,c),d.push(g.toString())}return d}
function uc(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 wc(a,b){b=b===void 0?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;k.length!=22&&(k=oc(qc(h),!1));var l=g;l.length!=22&&(l=oc(qc(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:Vb(ic(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 xc(a,b){if(b.length==1)return b[0];a=yc(a,b);if(a!=null)return a;throw new T(2,4,4025,b);}function yc(a,b){var c=zc.get(a);c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Ac?"":null}
function Bc(a,b){var c=[];a=zc.get(a);a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}
var Ac="text",Cc={qa:"video",Z:"audio",Ka:Ac,oh:"image",rj:"application"},zc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Dc(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.o=d;this.j=!1;a:{typeof libDPIModule==="undefined"&&cb("Could not find LCEVC Library dependencies on this page");if(typeof LCEVCdec!=="undefined")this.h=LCEVCdec;else if(typeof LcevcDil!=="undefined")this.h=LcevcDil,this.j=!0,yb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{cb("Could not find LCEVC Library on this page");a=!1;break a}typeof this.h.SupportObject==="undefined"?(cb("Could not find LCEVC Library on this page"),
a=!1):(this.h.SupportObject.SupportStatus||cb(this.h.SupportObject.SupportError),a=typeof this.h!=="undefined"&&typeof libDPIModule!=="undefined"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}
function Ec(a,b,c,d){d.type!=="video"||a.o&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.o)}function Fc(a){a.g&&a.i.classList.add("shaka-hidden")}Dc.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Gc(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}S("shaka.lcevc.Dec",Dc);Dc.prototype.release=Dc.prototype.release;function Hc(a){if(Jc.has(a))return Jc.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),Jc.set(a,b),b):!1}function Kc(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}function Lc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var Jc=new Map;function Mc(){}Mc.prototype.extract=function(){};Mc.prototype.decode=function(){return[]};Mc.prototype.clear=function(){};Mc.prototype.getStreams=function(){return[]};function Nc(){}Nc.prototype.init=function(){};Nc.prototype.parse=function(){return[]};function Oc(){}p=Oc.prototype;p.init=function(){};p.pe=function(){};p.Yc=function(){};p.remove=function(){};p.De=function(){};S("shaka.media.IClosedCaptionParser",Oc);function Pc(a){this.h=new Map;this.i=0;this.j=new Nc;if(a=Qc(a.toLowerCase()))this.j=a();this.g=new Mc;if(a=Rc)this.g=a(),this.h.set(this.i,this.g)}p=Pc.prototype;
p.init=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?-1:c;if(c!=-1&&this.i!=c){b=c;var d=this.h.get(b);this.h.set(this.i,this.g);if(d)this.g=d;else{if(d=Rc)this.g=d();this.h.set(b,this.g)}}else b||this.Yc();this.j.init(a);c!=-1&&(this.i=c)};p.pe=function(a){a=this.j.parse(a);a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Vb(b.packet);c.length>0&&this.g.extract(c,b.pts)}return this.g.decode()};p.Yc=function(){this.g.clear()};
p.remove=function(a){a=a===void 0?[]:a;a=new Set(a);for(var b=r(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=c.value,!a.has(c)){var d=this.h.get(c);d&&d.clear();this.h.delete(c)}};p.De=function(){return this.g.getStreams()};function Sc(a,b){Tc.set(a,b)}function Qc(a){return Tc.get(a)}S("shaka.media.ClosedCaptionParser",Pc);Pc.findDecoder=function(){return Rc};Pc.unregisterDecoder=function(){Rc=null};Pc.registerDecoder=function(a){Rc=a};Pc.findParser=Qc;Pc.unregisterParser=function(a){Tc.delete(a)};
Pc.registerParser=Sc;var Tc=new Map,Rc=null;function Uc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Vc;this.scroll=Wc}S("shaka.text.CueRegion",Uc);var Vc=1;Uc.units={PX:0,PERCENTAGE:Vc,LINES:2};var Wc="";Uc.scrollMode={NONE:Wc,UP:"up"};function Xc(a){this.h=a||"";this.g=0}function Yc(a){Zc(a,/[ \t]+/gm)}function Zc(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=b==null?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||b==null||b.position!=a.g)return null;a.g+=b.length;return b.results}function $c(a){return a.g==a.h.length?null:(a=Zc(a,/[^ \t\n]*/gm))?a[0]:null}
function ad(a){a=Zc(a,bd);if(a==null)return null;var b=Number(a[2]),c=Number(a[3]);return b>59||c>59?null:(Number(a[6])||0)/1E3+c+b*60+(Number(a[1])||0)*3600}var bd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function cd(){}function fd(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||ArrayBuffer.isView(d))return d;if(c.has(d))return null;var e=Array.isArray(d);if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function gd(a){var b={},c;for(c in a)b[c]=a[c];return b}
function hd(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];e!==void 0&&(e=hd(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if(typeof a=="function")a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=r(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],e!==void 0&&(e=hd(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}S("shaka.util.ObjectUtils",cd);cd.alphabeticalKeyOrderStringify=hd;
cd.shallowCloneObject=gd;cd.cloneObject=fd;/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function id(a,b,c){a=jd(a,c===void 0?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}
function jd(a,b){function c(f,g){g=g===void 0?!1:g;for(var h=[];a[e];)if(a.charCodeAt(e)==60){if(a.charCodeAt(e+1)===47){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(k==-1){var l=f.indexOf(".");l>0&&(k=g.indexOf(f.substring(0,l)))}if(k==-1)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(a.charCodeAt(e+1)===33){if(a.charCodeAt(e+2)==45){for(;e!==-1&&(a.charCodeAt(e)!==
62||a.charCodeAt(e-1)!=45||a.charCodeAt(e-2)!=45||e==-1);)e=a.indexOf(">",e+1);e===-1&&(e=a.length)}else if(a.charCodeAt(e+2)===91&&a.charCodeAt(e+8)===91&&a.substr(e+3,5).toLowerCase()==="cdata"){k=a.indexOf("]]\x3e",e);k==-1?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];a.charCodeAt(e)!==62&&a[e];){var q=a.charCodeAt(e);if(q>64&&q<91||q>96&&q<123){q=d();for(var t=a.charCodeAt(e);t&&t!==39&&t!==34&&!(t>64&&t<91||t>96&&
t<123)&&t!==62;)e++,t=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(t===39||t===34){if(e===-1){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)typeof k[m]!=="string"&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(q.startsWith("xmlns:")){t=u;var v=q.split(":")[1];kd.set(t,v);ld.set(v,t)}m==="tt"&&q==="xml:space"&&u==="preserve"&&(l=!0);n[q]=u}e++}a.charCodeAt(e-1)!==47?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;
for(n=0;n<m;n++)q=k[n],typeof q!=="string"?b&&(q.parent=l):n==m-1&&q=="\n"&&k.pop();k=l}h.push(k);if(typeof k==="string")break;k.tagName[0]==="?"&&k.children&&(h.push.apply(h,A(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,e===-2&&(e=a.length),k=a.slice(k,e+1),g?k.length>0&&h.push(k):h.length&&k.length==1&&k[0]=="\n"?h.push(k):k.trim().length>0&&h.push(k),e++;return h}function d(){for(var f=e;"\r\n\t>/= ".indexOf(a[e])===-1&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
function md(a){return typeof a==="string"}function nd(a,b){var c=[];if(!a.children)return[];a=r(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function od(a){if(typeof a==="string")return lc(a);a=a.children.reduce(function(b,c){return typeof c==="string"?b+c:b},"");return a===""?null:lc(a)}function pd(a,b,c){c=c===void 0?[]:c;a.tagName===b&&c.push(a);if(a.children){a=r(a.children);for(var d=a.next();!d.done;d=a.next())pd(d.value,b,c)}return c}
function qd(a,b,c){b=kd.has(b)?kd.get(b):"";return a.attributes[b+":"+c]||null}function rd(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=qd(a,d.value,c))return d;return null}function sd(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}var kd=new Map,ld=new Map;function td(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Uc;this.position=null;this.positionAlign=ud;this.size=0;this.textAlign=vd;this.direction=wd;this.writingMode=xd;this.lineInterpretation=yd;this.line=null;this.lineHeight="";this.lineAlign=zd;this.displayAlign=Ad;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Bd;this.fontStyle=Cd;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={columns:32,rows:15}}function Dd(a,b){a=new td(a,b,"");a.lineBreak=!0;return a}td.prototype.clone=function(){var a=new td(0,0,""),b;for(b in this)a[b]=this[b],Array.isArray(a[b])&&(a[b]=a[b].slice());return a};
function Ed(a,b){if(a.payload!=b.payload||!(Math.abs(a.startTime-b.startTime)<.001&&Math.abs(a.endTime-b.endTime)<.001))return!1;for(var c in a)if(c!="startTime"&&c!="endTime"&&c!="payload")if(c=="nestedCues"){if(!kb(a.nestedCues,b.nestedCues,Ed))return!1}else if(c=="region"||c=="cellResolution")for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!kb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function Gd(a,b){b=b===void 0?new Map:b;var c=a.payload;if(c.includes("<")){b.size===0&&Hd(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)d[f]==="<"?e=f+1:d[f]===">"&&e>0&&(e=d.substr(e,f-e),e.match(Id)&&c.push(e),e=-1);c=r(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if(f[h]==="/"){var k=f.indexOf(">",h);if(k===-1){c=f;break a}if((k=f.substring(h+1,k))&&k=="v"){d=!0;var l=null;e.length&&
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else f[h]==="<"?(g=h+1,f[g]!="v"&&(g=-1)):f[h]===">"&&g>0&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=r(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=Jd(c);a.payload="";d="<span>"+c.replace(/\n/g,"<br />")+"</span>";try{var m=id(d,"span")}catch(n){}if(m)if(m=
m.children,m.length!=1||m[0].tagName)for(m=r(m),c=m.next();!c.done;c=m.next())Kd(c.value,a,b);else a.payload=lc(c);else a.payload=lc(c)}else a.payload=lc(c)}function Hd(a){for(var b=r(Object.entries(Ld)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new td(0,0,"");e.color=d;a.set("."+c,e)}b=r(Object.entries(Md));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new td(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function Jd(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 Kd(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Uc;d.position=null;d.size=0;d.textAlign=vd;if(a.tagName)for(var e=r(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=Nd(g.backgroundColor,h.backgroundColor),h.color=Nd(g.color,h.color),h.fontFamily=Nd(g.fontFamily,h.fontFamily),
h.fontSize=Nd(g.fontSize,h.fontSize),h.textShadow=Nd(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=Dd(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=Od;break;case "i":d.fontStyle=Pd;break;case "u":d.textDecoration.push(Qd);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=f?ad(new Xc(f)):null)d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(md(a)||e.length==1&&md(e[0]))for(c=od(a).split("\n"),a=!0,c=r(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Dd(d.startTime,d.endTime),b.nestedCues.push(a)),e.length>0&&(a=d.clone(),a.payload=lc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=r(e),a=b.next();!a.done;a=b.next())Kd(a.value,d,c)}function Nd(a,b){return a&&a.length>0?a:b}S("shaka.text.Cue",td);
td.parseCuePayload=Gd;td.equal=Ed;td.prototype.clone=td.prototype.clone;var ud="auto";td.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ud};var vd="center",Rd={LEFT:"left",RIGHT:"right",CENTER:vd,START:"start",END:"end"};td.textAlign=Rd;var Ad="after",Sd={BEFORE:"before",CENTER:"center",AFTER:Ad};td.displayAlign=Sd;var wd="ltr";td.direction={HORIZONTAL_LEFT_TO_RIGHT:wd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var xd="horizontal-tb";
td.writingMode={HORIZONTAL_TOP_TO_BOTTOM:xd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var yd=0;td.lineInterpretation={LINE_NUMBER:yd,PERCENTAGE:1};var zd="start",Td={CENTER:"center",START:zd,END:"end"};td.lineAlign=Td;var Ld={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};td.defaultTextColor=Ld;
var Md={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};td.defaultTextBackgroundColor=Md;var Bd=400,Od=700;td.fontWeight={NORMAL:Bd,BOLD:Od};var Cd="normal",Pd="italic",Ud={NORMAL:Cd,ITALIC:Pd,OBLIQUE:"oblique"};td.fontStyle=Ud;var Qd="underline";td.textDecoration={UNDERLINE:Qd,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Id=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Vd(){}Vd.prototype.destroy=function(){};function Wd(a,b,c){Xd.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,qe:b})}function Yd(a,b){for(var c=a.toLowerCase().split(";")[0],d=r([Zd,$d,ae,be]),e=d.next();!e.done;e=d.next())if(e=Xd.get(c+"-"+e.value)){var f=e.qe(),g=f.isSupported(a,b);f.destroy();if(g)return e.qe}return null}S("shaka.transmuxer.TransmuxerEngine",Vd);Vd.findTransmuxer=Yd;Vd.unregisterTransmuxer=function(a,b){Xd.delete(a.toLowerCase().split(";")[0]+"-"+b)};
Vd.registerTransmuxer=Wd;Vd.prototype.destroy=Vd.prototype.destroy;var Xd=new Map,be=1,ae=2,$d=3,Zd=4;Vd.PluginPriority={FALLBACK:be,PREFERRED_SECONDARY:ae,PREFERRED:$d,APPLICATION:Zd};function ce(){}function de(a,b){var c=a;b&&!ee.includes(a)&&(c+='; codecs="'+b+'"');return c}function fe(a,b){b&&(a+='; codecs="'+b+'"');return a}function ge(a,b,c){var d=de(a,b);b=fe(a,b);Yd(b)?(a=Yd(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c=a!="video/mp2t"&&c=="audio"?d.replace("video","audio"):d;return c}function he(a){return a.split(";")[0].split("/")[1]}
function ie(a){var b=je(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case a==="mp4a"&&b==="69":case a==="mp4a"&&b==="6b":case a==="mp4a"&&b==="40.34":return"mp3";case a==="mp4a"&&b==="66":case a==="mp4a"&&b==="67":case a==="mp4a"&&b==="68":case a==="mp4a"&&b==="40.2":case a==="mp4a"&&b==="40.02":case a==="mp4a"&&b==="40.5":case a==="mp4a"&&b==="40.05":case a==="mp4a"&&b==="40.29":case a==="mp4a"&&b==="40.42":return"aac";case a==="mp4a"&&b==="a5":case a==="ac3":case a==="ac-3":return"ac-3";
case a==="mp4a"&&b==="a6":case a==="eac3":case a==="ec-3":return"ec-3";case a==="ac-4":return"ac-4";case a==="mp4a"&&b==="b2":return"dtsx";case a==="mp4a"&&b==="a9":return"dtsc";case a==="vp09":case a==="vp9":return"vp9";case a==="avc1":case a==="avc3":return"avc";case a==="hvc1":case a==="hev1":return"hevc";case a==="vvc1":case a==="vvi1":return"vvc";case a==="dvh1":case a==="dvhe":return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case a==="dvav":case a==="dva1":return"dovi-avc";case a==="dav1":return"dovi-av1";
case a==="dvc1":case a==="dvi1":return"dovi-vvc"}return a}function ke(a){var b=[];a=r(a.split(","));for(var c=a.next();!c.done;c=a.next())c=je(c.value),b.push(c[0]);return b.sort().join(",")}function le(a){return a.split(";")[0]}function me(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function ne(a){return a==="application/x-mpegurl"||a==="application/vnd.apple.mpegurl"}
function je(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",ce);ce.getFullTypeWithAllCodecs=fe;ce.getFullType=de;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var ee=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function oe(a){this.i=null;this.l=a;this.C=!1;this.m=this.A=0;this.o=Infinity;this.h=this.g=null;this.D="";this.B=function(){};this.j=new Map}function pe(a,b){qe.set(a,b)}function re(a){return qe.get(a)}function se(a){return qe.has(a)?!0:a=="application/cea-608"||a=="application/cea-708"?!!Rc:!1}oe.prototype.destroy=function(){this.l=this.i=null;this.j.clear();return Promise.resolve()};
function te(a,b,c,d,e){var f,g,h,k,l,m,n;return L(function(q){if(q.g==1)return H(q,Promise.resolve(),2);if(!a.i||!a.l)return q.return();if(c==null||d==null)return a.i.parseInit(Vb(b)),q.return();f=a.C?c:a.A;g={periodStart:a.A,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Vb(b),g,e,[]);k=r(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.B(m,e||null,g);n=h.filter(function(t){return t.startTime>=a.m&&t.startTime<a.o});a.l.append(n);a.g==null&&(a.g=Math.max(c,a.m));a.h=Math.min(d,a.o);K(q)})}
oe.prototype.remove=function(a,b,c){c=c===void 0?!1:c;var d=this;return L(function(e){if(e.g==1)return H(e,Promise.resolve(),2);if(a>=b)return e.return();c&&ze(d,a,b);d.l&&d.l.remove(a,b)&&d.g!=null&&(b<=d.g||a>=d.h||(a<=d.g&&b>=d.h?d.g=d.h=null:a<=d.g&&b<d.h?d.g=b:a>d.g&&b>=d.h&&(d.h=a)),Ae(d));K(e)})};function Be(a,b,c){a.m=b;a.o=c}function Ce(a,b,c){a.D=b;if(b=a.j.get(b))b=b.filter(function(d){return d.endTime<=c}),b.length&&a.l.append(b)}
function De(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())De(a,d.value,c)}
function Ee(a,b,c){var d=new Map;b=r(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e=f.stream;f=f.cue;d.has(e)||d.set(e,[]);De(a,f,c);f.startTime>=a.m&&f.startTime<a.o&&(d.get(e).push(f),e==a.D&&a.l.append([f]))}c=r(d.keys());for(b=c.next();!b.done;b=c.next())for(b=b.value,a.j.has(b)||a.j.set(b,[]),e=r(d.get(b)),f=e.next();!f.done;f=e.next())f=f.value,a.j.get(b).push(f);Ae(a)}
function ze(a,b,c){for(var d=r(a.j.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f=a.j.get(e);f=f.filter(function(g){return g.startTime<b||g.endTime>=c});a.j.set(e,f)}}
function Ae(a){for(var b=Infinity,c=-Infinity,d=r(a.j.values()),e=d.next();!e.done;e=d.next()){e=r(e.value);for(var f=e.next();!f.done;f=e.next())f=f.value,b=Math.min(b,f.startTime),c=Math.max(c,f.endTime)}b!==Infinity&&c!==-Infinity&&(a.g=a.g==null?Math.max(b,a.m):Math.min(a.g,Math.max(b,a.m)),a.h=Math.max(a.h,Math.min(c,a.o)))}S("shaka.text.TextEngine",oe);oe.prototype.destroy=oe.prototype.destroy;oe.findParser=re;oe.unregisterParser=function(a){qe.delete(a)};oe.registerParser=pe;var qe=new Map;function Fe(a){this.h=a;this.g=null}Fe.prototype.ka=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},a*1E3);return this};Fe.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Ge(a){this.h=a;this.g=null}Ge.prototype.lc=function(){this.stop();this.h();return this};Ge.prototype.ka=function(a){var b=this;this.stop();this.g=(new Fe(function(){b.h()})).ka(a);return this};Ge.prototype.Ea=function(a){var b=this;this.stop();this.g=(new Fe(function(){b.g.ka(a);b.h()})).ka(a);return this};Ge.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Ge);Ge.prototype.stop=Ge.prototype.stop;Ge.prototype.tickEvery=Ge.prototype.Ea;
Ge.prototype.tickAfter=Ge.prototype.ka;Ge.prototype.tickNow=Ge.prototype.lc;function He(a,b){return a.concat(b)}function Ie(){}function Je(a){return a!=null}function Ke(a,b){return Promise.race([b,new Promise(function(c,d){(new Ge(d)).ka(a)})])};function Le(){}function Me(a,b){a=Ne(a);b=Ne(b);return a.split("-")[0]==b.split("-")[0]}function Oe(a,b){a=Ne(a);b=Ne(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&a.length==1&&b.length==2}function Pe(a,b){a=Ne(a);b=Ne(b);a=a.split("-");b=b.split("-");return a.length==2&&b.length==2&&a[0]==b[0]}
function Ne(a){a=r(a.split("-x-"));var b=a.next().value;b=b===void 0?"":b;a=a.next().value;a=a===void 0?"":a;var c=r(b.split("-"));b=c.next().value;b=b===void 0?"":b;c=c.next().value;c=c===void 0?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=Qe.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function Re(a,b){a=Ne(a);b=Ne(b);return b==a?4:Oe(b,a)?3:Pe(b,a)?2:Oe(a,b)?1:0}function Se(a){var b=a.indexOf("-");a=b>=0?a.substring(0,b):a;a=a.toLowerCase();return a=Qe.get(a)||a}
function Te(a){return a.language?Ne(a.language):a.audio&&a.audio.language?Ne(a.audio.language):a.video&&a.video.language?Ne(a.video.language):"und"}
function Ue(a,b){a=Ne(a);var c=new Set;b=r(b);for(var d=b.next();!d.done;d=b.next())c.add(Ne(d.value));b=r(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=r(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,Oe(d,a))return d;b=r(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,Pe(d,a))return d;c=r(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Oe(a,b))return b;return null}S("shaka.util.LanguageUtils",Le);Le.findClosestLocale=Ue;Le.getLocaleForVariant=Te;
Le.getLocaleForText=function(a){return Ne(a.language||"und")};Le.getBase=Se;Le.relatedness=Re;Le.areSiblings=function(a,b){var c=Se(a),d=Se(b);return a!=c&&b!=d&&c==d};Le.normalize=Ne;Le.isSiblingOf=Pe;Le.isParentOf=Oe;Le.areLanguageCompatible=Me;Le.areLocaleCompatible=function(a,b){a=Ne(a);b=Ne(b);return a==b};
var Qe=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 Ve(){}
function We(a,b,c,d,e){function f(y){var x=String(y.width||"")+String(y.height||"")+String(Math.round(y.frameRate||0))+(y.hdr||"")+y.fastSwitching;y.dependencyStream&&(x+=y.dependencyStream.baseOriginalId||"");y.roles&&(x+=y.roles.sort().join("_"));return x}function g(y){var x=y.language+(y.channelsCount||0)+(y.audioSamplingRate||0)+y.roles.join(",")+y.label+y.groupId+y.fastSwitching;y.dependencyStream&&(x+=y.dependencyStream.baseOriginalId||"");return x}if(e.length){var h=a.textStreams;e=r(e);for(var k=
e.next(),l={};!k.done;l={Sf:void 0},k=e.next())if(l.Sf=k.value,k=h.filter(function(y){return function(x){return x.codecs.startsWith(y.Sf)||x.mimeType.startsWith(y.Sf)?!0:!1}}(l)),k.length){h=k;break}a.textStreams=h}h=a.variants;if(b.length||c.length)h=Xe(h,b,c);if(d.length){b=new lb;c=r(h);for(h=c.next();!h.done;h=c.next())h=h.value,b.push(String(h.video.width||0),h);var m=[];b.forEach(function(y,x){y=0;var B=[];x=r(x);for(var C=x.next(),I={};!C.done;I={Ce:void 0},C=x.next())I.Ce=C.value,C=d.filter(function(E){return function(z){return E.Ce.decodingInfos[0][z]}}(I)).length,
C>y?(y=C,B=[I.Ce]):C==y&&B.push(I.Ce);m.push.apply(m,A(B))});h=m}c=new Set;b=new Set;h=r(h);for(e=h.next();!e.done;e=h.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);h=Array.from(c).sort(function(y,x){return y.bandwidth-x.bandwidth});var n=[];c=new Map;h=r(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=g(e);l=c.get(k)||[];if(l.length){var q=l[l.length-1],t=ie(q.codecs),u=ie(e.codecs);t!=u||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),n.push(e.id))}else l.push(e),
n.push(e.id);c.set(k,l)}var v={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};h=Array.from(b).sort(function(y,x){if(!y.bandwidth||!x.bandwidth||y.bandwidth==x.bandwidth){if(y.codecs&&x.codecs&&y.codecs!=x.codecs&&y.width==x.width){var B=ie(y.codecs),C=ie(x.codecs);if(B!=C)return(v[B]||1)-(v[C]||1)}return y.width-x.width}return y.bandwidth-x.bandwidth});b=Kc();var w=[];c=new Map;h=r(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=f(e);
l=c.get(k)||[];if(l.length){q=l[l.length-1];if(!b&&(t=ie(q.codecs),u=ie(e.codecs),t!==u))continue;t=ie(q.codecs);u=ie(e.codecs);t!=u||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),w.push(e.id))}else l.push(e),w.push(e.id);c.set(k,l)}a.variants=a.variants.filter(function(y){var x=y.audio;y=y.video;return x&&!n.includes(x.id)||y&&!w.includes(y.id)?!1:!0})}
function Xe(a,b,c){b=r(b);for(var d=b.next(),e={};!d.done;e={videoCodec:void 0},d=b.next())if(e.videoCodec=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.videoCodec)}}(e)),d.length){a=d;break}c=r(c);b=c.next();for(d={};!b.done;d={audioCodec:void 0},b=c.next())if(d.audioCodec=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.audioCodec)}}(d)),b.length){a=b;break}return a}
function Ye(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=r([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 Ze(a,b,c,d){c=c===void 0?[]:c;d=d===void 0?{}:d;return L(function(e){if(e.g==1)return H(e,$e(a,b,b.offlineSessionIds.length>0,c,d),2);af(b);return H(e,bf(b),0)})}
function $e(a,b,c,d,e){var f,g;return L(function(h){if(h.g==1)return sb().dh()&&cf(b.variants),H(h,df(b.variants,c,!1,d),2);f=null;a&&(g=a.g)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=ef(k,f,e);if(!l){var m=[];k.audio&&m.push(ff(k.audio));k.video&&m.push(ff(k.video))}return l});K(h)})}
function cf(a){var b=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),c=new Set;a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=r(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=r(b);for(var e=d.next();!e.done;e=d.next()){var f=r(e.value);e=f.next().value;f=f.next().value;if(a.codecs.includes(e)){a.codecs=a.codecs.replace(e,f);break}}}}
function ef(a,b,c){if(!a.decodingInfos.some(function(k){return!k.supported||b&&(k=k.keySystemAccess)&&(c[k.keySystem]||k.keySystem)!=b?!1:!0}))return!1;var d=sb(),e=d.ub()==="Xbox";d=d.Ma()==="MOBILE"&&d.ya()==="GECKO";var f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(e&&f&&(g>1920||h>1080)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(e=f&&f.dependencyStream)&&!Gc(e))return!1;a=a.audio;return d&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
function gf(a,b){var c,d,e,f,g,h,k;return L(function(l){if(l.g==1){c=function(m,n){if(m){var q=gd(m);q.supported=m.supported&&n.supported;q.powerEfficient=m.powerEfficient&&n.powerEfficient;q.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=n.keySystemAccess);return q}return n};d=null;e=[];f=r(b);g=f.next();for(h={};!g.done;h={cache:void 0,Nd:void 0},g=f.next())k=g.value,h.Nd=hd(k),h.cache=hf,h.cache.has(h.Nd)?d=c(d,h.cache.get(h.Nd)):e.push(jf(k).then(function(m){return function(n){var q=
null;n=r(n||[]);for(var t=n.next();!t.done;t=n.next())q=c(q,t.value);q&&(m.cache.set(m.Nd,q),d=c(d,q))}}(h)));return H(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);K(l)})}
function jf(a){var b=[""];a.video&&(b=me(a.video.contentType).split(","));var c=[""];a.audio&&(c=me(a.audio.contentType).split(","));var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=r(c),g=f.next(),h={};!g.done;h={mc:void 0},g=f.next())g=g.value,h.mc=fd(a),a.video&&(h.mc.video.contentType=de(le(h.mc.video.contentType),e)),a.audio&&(h.mc.audio.contentType=de(le(h.mc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){(sb().Ma()=="MOBILE"?Ke(5,navigator.mediaCapabilities.decodingInfo(k.mc)):
navigator.mediaCapabilities.decodingInfo(k.mc)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
function df(a,b,c,d){var e,f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C,I,E;return L(function(z){switch(z.g){case 1:if(e=a.some(function(D){return D.decodingInfos.length}))return z.return();f=r(d);g=f.next();h={};case 2:if(g.done){z.u(4);break}h.Lg=g.value;k=!1;l=r(a);m=l.next();case 5:if(m.done){z.u(7);break}n=m.value;q=kf(n,b,c).filter(function(D){return function(G){G=G[0];return(G.keySystemConfiguration&&G.keySystemConfiguration.keySystem)===D.Lg}}(h));t=r(q);u=t.next();case 8:if(u.done){z.u(10);break}v=u.value;
return H(z,gf(n,v),9);case 9:u=t.next();z.u(8);break;case 10:n.decodingInfos.some(function(D){return D.supported})&&(k=!0);m=l.next();z.u(5);break;case 7:if(k)return z.return();h={Lg:void 0};g=f.next();z.u(2);break;case 4:w=r(a),y=w.next();case 12:if(y.done){z.u(0);break}x=y.value;B=kf(x,b,c).filter(function(D){D=D[0];D=D.keySystemConfiguration&&D.keySystemConfiguration.keySystem;return!D||!d.includes(D)});C=r(B);I=C.next();case 15:if(I.done){y=w.next();z.u(12);break}E=I.value;return H(z,gf(x,E),
16);case 16:I=C.next(),z.u(15)}})}
function kf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=r(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=me(k);if(l.includes(",")&&!d){var m=l.split(","),n=le(k);l=xc("video",m);m=xc("audio",m);m=lf(m,n);n=ge(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=mf(l);k={contentType:ge(le(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||30};if(e.hdr)switch(e.hdr){case "PQ":k.transferFunction=
"pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=r(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=le(l),l=lf(me(l),k),k=ge(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];f.length==0&&f.push(null);g.length==0&&g.push(null);f=r(f);for(k=f.next();!k.done;k=f.next())for(k=k.value,l=r(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=r(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=r(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map;n=r(n);for(m=n.next();!m.done;m=n.next()){m=
m.value;var q=m.videoRobustness+","+m.audioRobustness;l.get(q)||l.set(q,[]);l.get(q).push(m)}l=r(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];q=r(h);for(var t=q.next();!t.done;t=q.next()){t=Object.assign({},t.value);for(var u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},v=r(n),w=v.next();!w.done;w=v.next()){w=w.value;if(w.initData&&w.initData.length){for(var y=new Set,x=r(w.initData),B=x.next();!B.done;B=x.next())y.add(B.value.initDataType);
u.initDataType=w.initData[0].initDataType}w.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");w.persistentStateRequired&&(u.persistentState="required");w.sessionType&&(u.sessionTypes=[w.sessionType]);d&&(u.audio?(w.encryptionScheme&&(u.audio.encryptionScheme=u.audio.encryptionScheme||w.encryptionScheme),u.audio.robustness=u.audio.robustness||w.audioRobustness):(u.audio={robustness:w.audioRobustness},w.encryptionScheme&&(u.audio.encryptionScheme=w.encryptionScheme)),u.audio.robustness==
""&&delete u.audio.robustness);e&&(u.video?(w.encryptionScheme&&(u.video.encryptionScheme=u.video.encryptionScheme||w.encryptionScheme),u.video.robustness=u.video.robustness||w.videoRobustness):(u.video={robustness:w.videoRobustness},w.encryptionScheme&&(u.video.encryptionScheme=w.encryptionScheme)),u.video.robustness==""&&delete u.video.robustness)}t.keySystemConfiguration=u;m.push(t)}a.push(m)}}return a}
function lf(a,b){var c=sb();return a.toLowerCase()=="flac"?c.ya()!="WEBKIT"?"flac":"fLaC":a.toLowerCase()==="opus"?c.ya()!="WEBKIT"?"opus":he(b)=="mp4"?"Opus":"opus":a.toLowerCase()=="ac-3"&&c.pd()?"ec-3":a}function mf(a){if(a.includes("avc1")){var b=a.split(".");if(b.length==3)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if(a=="vp9")return"vp09.00.41.08";return a}
function af(a){a.textStreams=a.textStreams.filter(function(b){b=de(b.mimeType,b.codecs);return se(b)})}
function bf(a){var b,c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.u(4);break}e=d.value;f=e.mimeType;f=="application/mp4"&&e.codecs=="mjpg"&&(f="image/jpg");if(nf.has(f)){l.u(5);break}g=of.get(f);if(!g){nf.set(f,!1);l.u(5);break}return H(l,pf(g),7);case 7:h=l.h,nf.set(f,h);case 5:(k=nf.get(f))&&b.push(e);d=c.next();l.u(2);break;case 4:a.imageStreams=b,K(l)}})}
function pf(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(c.height===2)}})}
function qf(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=b?b.groupId:null,k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=r(b.roles),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=r(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,videoLabel:null,
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:"",audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,videoRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:h,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,
accessibilityPurpose:null,originalLanguage:null};if(c){a.videoId=c.id;a.originalVideoId=c.originalId;a.width=c.width||null;a.height=c.height||null;a.frameRate=c.frameRate||null;a.pixelAspectRatio=c.pixelAspectRatio||null;a.videoBandwidth=c.bandwidth||null;a.hdr=c.hdr||null;a.colorGamut=c.colorGamut||null;a.videoLayout=c.videoLayout||null;a.videoRoles=c.roles;a.videoLabel=c.label;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec,a.videoBandwidth&&
d.bandwidth&&(a.videoBandwidth+=d.bandwidth);if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;e=g.split(",");try{a.videoCodec=xc("video",e),a.audioCodec=xc("audio",e)}catch(t){}}}b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=
b.label,a.audioRoles=b.roles,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=b.originalLanguage,e=b.dependencyStream)&&(a.audioCodec=e.codecs||a.audioCodec,a.audioBandwidth&&e.bandwidth&&(a.audioBandwidth+=e.bandwidth));c&&!a.videoBandwidth&&(b?a.audioBandwidth&&(a.videoBandwidth=a.bandwidth-a.audioBandwidth):a.videoBandwidth=a.bandwidth);b&&!a.audioBandwidth&&(c?a.videoBandwidth&&(a.audioBandwidth=a.bandwidth-a.videoBandwidth):a.audioBandwidth=a.bandwidth);b=[];a.videoCodec&&b.push(a.videoCodec);
a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}function rf(a){return{id:a.id,active:!1,type:Ac,bandwidth:a.bandwidth||0,language:a.language,label:a.label,kind:a.kind||null,mimeType:a.mimeType,codecs:a.codecs||null,primary:a.primary,roles:a.roles,accessibilityPurpose:a.accessibilityPurpose,forced:a.forced,originalTextId:a.originalId,originalLanguage:a.originalLanguage}}
function sf(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=tf(a.segmentIndex));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&b!=null&&(b/=Number(e.split("x")[0]));e&&c!=null&&(c/=Number(e.split("x")[1]));return{id:a.id,type:"image",bandwidth:a.bandwidth||0,width:b,height:c,mimeType:a.mimeType,codecs:a.codecs||null,tilesLayout:e||null,originalImageId:a.originalId}}function uf(a){a.__shaka_id||(a.__shaka_id=vf++);return a.__shaka_id}
function wf(a){var b={id:uf(a),active:a.mode!="disabled",type:Ac,bandwidth:0,language:Ne(a.language||"und"),label:a.label,kind:a.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:a.kind=="forced",originalTextId:a.id,originalLanguage:a.language};a.kind=="captions"&&(b.mimeType="unknown");a.kind=="subtitles"&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);return b}
function xf(a,b){var c=a?a.language:null;c={id:uf(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:Ne(c||"und"),label:a?a.label:null,videoLabel:null,kind:a?a.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:a?a.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,
channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:b?b.id:null,originalAudioId:a?a.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:c};a&&a.kind&&(c.roles=[a.kind],c.audioRoles=[a.kind]);a&&a.configuration&&(a.configuration.codec&&(c.audioCodec=a.configuration.codec,c.codecs=c.audioCodec),a.configuration.bitrate&&(c.audioBandwidth=a.configuration.bitrate,c.bandwidth+=c.audioBandwidth),
a.configuration.sampleRate&&(c.audioSamplingRate=a.configuration.sampleRate),a.configuration.numberOfChannels&&(c.channelsCount=a.configuration.numberOfChannels));if(b&&b.configuration&&(b.configuration.codec&&(c.videoCodec=b.configuration.codec,c.codecs=c.codecs?c.codecs+(","+c.videoCodec):c.videoCodec),b.configuration.bitrate&&(c.videoBandwidth=b.configuration.bitrate,c.bandwidth+=c.videoBandwidth),b.configuration.framerate&&(c.frameRate=b.configuration.framerate),b.configuration.width&&(c.width=
b.configuration.width),b.configuration.height&&(c.height=b.configuration.height),b.configuration.colorSpace&&b.configuration.colorSpace.transfer))switch(b.configuration.colorSpace.transfer){case "pq":c.hdr="PQ";break;case "hlg":c.hdr="HLG";break;case "bt709":c.hdr="SDR"}return c}function yf(a){return a.allowedByApplication&&a.allowedByKeySystem&&a.disabledUntilTime==0}function zf(a){return a.filter(function(b){return yf(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=Ue(Ne(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Ne(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 k.roles.length==0}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(He,[]);return a.length?
Bf(e,a[0]):e}function Bf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Cf(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}
function Df(a,b){b.length&&(b=b.filter(function(c){return ie(a.codecs)==ie(c.codecs)}).sort(function(c,d){return c.bandwidth&&d.bandwidth&&c.bandwidth!=d.bandwidth?c.bandwidth-d.bandwidth:(c.width||0)-(d.width||0)}),a.trickModeVideo=b[0],b.length>1&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
function ff(a){return a.type=="audio"?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:a.type=="video"?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
function Ef(a,b,c){if(c.autoShowText==0)return!1;if(c.autoShowText==1)return!0;var d=Ne(c.preferredTextLanguage);b=Ne(b.language);if(c.autoShowText==2)return Me(b,d);if(c.autoShowText==3){if(!a)return!1;a=Ne(a.language);return Me(b,d)&&!Me(a,b)}cb("Invalid autoShowText setting!");return!1}
function Ff(a){var b={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c?le(c):"",codecs:c?me(c):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,
dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};d.fullMimeTypes.add(de(d.mimeType,d.codecs));c.startsWith("audio/")?(d.type="audio",b.audio=d):b.video=d}return b}S("shaka.util.StreamUtils",Ve);Ve.meetsRestrictions=Ye;
var hf=new Map,vf=0,nf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),of=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Gf(){var a=this;this.H=null;this.B=!1;this.A=new $a;this.j=new mb;navigator.connection&&navigator.connection.addEventListener&&this.j.G(navigator.connection,"change",function(){if(a.B&&a.g.useNetworkInformation){a.A=new $a;a.g&&a.A.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.o=[];this.I=1;this.J=!1;this.h=this.m=this.g=this.C=null;this.l=new Ge(function(){if(a.B&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=
a.chooseVariant();b&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.D=window;"documentPictureInPicture"in window&&this.j.G(window.documentPictureInPicture,"enter",function(){a.D=window.documentPictureInPicture.window;a.l&&a.l.lc();a.j.Pa(a.D,"pagehide",function(){a.D=window;a.l&&a.l.lc()})});this.F=this.i=null}p=Gf.prototype;p.stop=function(){this.H=null;this.B=!1;this.o=[];this.I=1;this.m=this.C=null;this.h&&(this.h.disconnect(),this.h=null);this.l&&this.l.stop();this.F=this.i=null};
p.release=function(){this.stop();this.j.release();this.l=null};p.init=function(a){this.H=a};
p.chooseVariant=function(a){a=a===void 0?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:this.D.devicePixelRatio,b=this.D.screen.height*c,c*=this.D.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:this.D.devicePixelRatio,e=this.m.clientHeight,f=this.m.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.m&&(e=this.i.height,f=this.i.width);b=Math.min(b,e*d);c=Math.min(c,
f*d)}e=this.o.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=this.o);d=e;a&&e.length!=this.o.length&&(d=this.o.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=Hf(this,this.g.restrictions,d,Infinity,Infinity);if(b!=Infinity||c!=Infinity){a=If(a);a=r(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=Hf(this,this.g.restrictions,
d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Hf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=a[d];var g=isNaN(this.I)?1:Math.abs(this.I);f=g*e.bandwidth/this.g.bandwidthDowngradeTarget;for(var h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}g=g*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=f&&b<=g&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<
e.video.height))&&(c=e)}this.C=Date.now();return c};p.enable=function(){this.B=!0};p.disable=function(){this.B=!1};p.segmentDownloaded=function(a,b,c,d){var e=a;this.g.removeLatencyFromFirstPacketTime&&d&&d.packetNumber===1&&d.timeToFirstByte&&(e=a-d.timeToFirstByte);e>=this.g.cacheLoadThreshold&&this.A.sample(e,b);c&&this.C!=null&&this.B&&Jf(this)};p.trySuggestStreams=function(){this.B&&(this.C=Date.now(),Jf(this,!0))};
p.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=navigator.connection.downlink*1E6);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.A.getBandwidthEstimate(a);return this.F?this.F.getBandwidthEstimate(a):a};p.setVariants=function(a){if(jb(a,this.o))return!1;this.o=a;return!0};
p.playbackRateChanged=function(a){this.I=a};p.setMediaElement=function(a){function b(){c.l.ka(Kf)}var c=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.m));this.j.G(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.G(c.i,"resize",b))});this.j.G(a,"leavepictureinpicture",function(){c.i&&c.j.pb(c.i,"resize",b);c.i=null})};p.setCmsdManager=function(a){this.F=a};
p.configure=function(a){this.g=a;this.A&&this.g&&this.A.configure(this.g.advanced)};function Jf(a,b){if(b===void 0||!b){if(!a.J){b=a.A;if(!(b.g>=b.i))return;a.J=!0;a.C-=(a.g.switchInterval-a.g.minTimeToSwitch)*1E3}if(Date.now()-a.C<a.g.switchInterval*1E3)return}b=a.chooseVariant();a.getBandwidthEstimate();b&&a.H(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}
function Hf(a,b,c,d,e){if(a.F){var f=a.F.ng();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ye(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function If(a){var b=[];a=r(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",Gf);Gf.prototype.configure=Gf.prototype.configure;
Gf.prototype.setCmsdManager=Gf.prototype.setCmsdManager;Gf.prototype.setMediaElement=Gf.prototype.setMediaElement;Gf.prototype.playbackRateChanged=Gf.prototype.playbackRateChanged;Gf.prototype.setVariants=Gf.prototype.setVariants;Gf.prototype.getBandwidthEstimate=Gf.prototype.getBandwidthEstimate;Gf.prototype.trySuggestStreams=Gf.prototype.trySuggestStreams;Gf.prototype.segmentDownloaded=Gf.prototype.segmentDownloaded;Gf.prototype.disable=Gf.prototype.disable;Gf.prototype.enable=Gf.prototype.enable;
Gf.prototype.chooseVariant=Gf.prototype.chooseVariant;Gf.prototype.init=Gf.prototype.init;Gf.prototype.release=Gf.prototype.release;Gf.prototype.stop=Gf.prototype.stop;var Kf=1;function Pf(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(C){return C!=null&&C.g.trim()!=""})){f=h;break}for(h=c.length-1;h>=0;h--)if(c[h].some(function(C){return C!=null&&C.g.trim()!=""})){g=h;break}if(f===-1||g===-1)return null;for(var k=h=!1,l="white",m="black",n=Qf(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],t=-1,u=-1,v=0;v<q.length;v++)if(q[v]!=null&&q[v].g.trim()!==""){t=v;break}for(v=q.length-1;v>=0;v--)if(q[v]!=null&&q[v].g.trim()!==""){u=v;break}if(t===
-1||u===-1)q=Rf(d,e),a.nestedCues.push(q);else{for(;t<=u;t++)if(v=q[t]){var w=v.l,y=v.i,x=v.j,B=v.h;if(w!=h||y!=k||x!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Qf(d,e,w,y,x,B),h=w,k=y,l=x,m=B;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Rf(d,e),a.nestedCues.push(n));n=Qf(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Qf(a,b,c,d,e,f){a=new td(a,b,"");c&&a.textDecoration.push(Qd);d&&(a.fontStyle=Pd);a.color=e;a.backgroundColor=f;return a}
function Rf(a,b){a=new td(a,b,"");a.lineBreak=!0;return a}function Sf(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Tf(a,b){this.i=[];this.g=1;this.h=0;this.D=a;this.C=b;this.j=this.m=!1;this.l="white";this.o="black";this.A=this.B=null;Uf(this)}function Vf(a,b,c){var d="CC"+((a.D<<1|a.C)+1),e=new td(b,c,"");e.lineInterpretation=1;var f=Wf.get(a.g);f&&(e.line=f);a.A!=null&&a.B!=null&&(e.position=10+Math.min(70,a.A*10)+a.B*2.5);(b=Pf(e,d,a.i,b,c))&&a.g+b.cue.nestedCues.length-3>15&&(f=Wf.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Uf(a){Xf(a,0,15);a.g=1}
function Yf(a,b,c){if(!(c<32||c>127)){var d="";switch(b){case 0:d=Zf.has(c)?Zf.get(c):String.fromCharCode(c);break;case 1:d=$f.get(c);break;case 2:a.i[a.g].pop();d=ag.get(c);break;case 3:a.i[a.g].pop(),d=bg.get(c)}d&&a.i[a.g].push(new Sf(d,a.m,a.j,a.o,a.l))}}function cg(a,b,c,d){if(!(c<0||b<0))if(b>=c)for(--d;d>=0;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Xf(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
var Zf=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"]]),$f=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"]]),ag=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"]]),bg=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"]]),Wf=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 dg(a,b){this.h=0;this.o=new Tf(a,b);this.i=new Tf(a,b);this.g=this.j=new Tf(a,b);this.l=0;this.m=null}function eg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==3&&a.h!==4&&(e=Vf(d,a.l,c),c=a.i,c.g=c.h>0?c.h:0,Xf(c,0,15),c=a.j,c.g=c.h>0?c.h:0,Xf(c,0,15),d.g=15);a.h=3;d.h=b;return e}function fg(a){a.h=1;a.g=a.j;a.g.h=0}function gg(a){db("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var hg="black green blue cyan red yellow magenta black".split(" "),ig="white green blue cyan red yellow magenta white_italics".split(" ");function jg(a,b){this.J=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.H=this.L=this.I=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.D=this.B=!1;this.C="white";this.A="black";kg(this)}function kg(a){a.i=[];for(var b=0;b<16;b++)a.i.push(lg())}function lg(){for(var a=[],b=0;b<42;b++)a.push(null);return a}function mg(a,b){ng(a)&&(a.i[a.h][a.g]=new Sf(b,a.D,a.B,a.A,a.C),a.g++)}function ng(a){var b=a.g<a.m&&a.g>=0;return a.h<a.o&&a.h>=0&&b}jg.prototype.isVisible=function(){return this.l};
function og(a){for(var b=0,c=1;c<16;c++,b++)a.i[b]=a.i[c];for(c=0;c<1;c++,b++)a.i[b]=lg()}
function pg(a,b,c){var d=new td(a.j,b,"");d.textAlign=a.F===0?"left":a.F===1?"right":vd;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.I;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Vc:2;switch(a.H){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Pf(d,"svc"+c,a.i,a.j,b))a.j=b;return c}jg.prototype.display=function(){this.l=!0};function qg(){this.i=[];this.h=null;this.g=0}function rg(a,b){b.type===3?(a.g=(b.value&63)*2-1,a.h=[]):a.h&&(a.g>0&&(a.h.push(b),a.g--),a.g===0&&(a.i.push(new sg(a.h)),a.h=null,a.g=0))}function sg(a){this.g=0;this.h=a}sg.prototype.Ra=function(){return this.g<this.h.length};sg.prototype.Va=function(){return this.g};function tg(a){if(!a.Ra())throw new T(2,2,3E3);return a.h[a.g++]}sg.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};
sg.prototype.Rg=function(a){if(this.g-a<0)throw new T(2,2,3E3);this.g-=a};function ug(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
function vg(a,b,c,d){if(!a.g)return[];if(c==24)return c=tg(b).value,d=tg(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),mg(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!ng(b)||b.g<=0&&b.h<=0||(b.g<=0?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=pg(b,d,a.i));b.h+1>=b.o?og(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=pg(b,d,a.i));b.i[b.h]=lg();b.g=0;break;case 12:b.isVisible()&&
(e=pg(b,d,a.i)),kg(b),b.h=0,b.g=0}return e?[e]:[]}
function wg(a,b,c,d){if(c>=128&&c<=135)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(c===136){c=tg(b).value;b=[];c=r(xg(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=pg(e,d,a.i);f&&b.push(f)}kg(e)}return b}if(c===137)for(b=tg(b).value,b=r(xg(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(c===138){c=tg(b).value;b=null;c=r(xg(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=pg(e,d,a.i)),e.l=!1;return b?
[b]:[]}if(c===139){c=tg(b).value;b=null;c=r(xg(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=pg(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(c===140)return b=tg(b).value,yg(a,b,d);if(c===143)return d=yg(a,255,d),zg(a),d;if(c===144)b.skip(1),d=tg(b).value,a.g&&(a.g.B=(d&128)>0,a.g.D=(d&64)>0);else if(c===145)d=tg(b).value,c=tg(b).value,b.skip(1),a.g&&(b=Ag((c&48)>>4,(c&12)>>2,c&3),a.g.C=Ag((d&48)>>4,(d&12)>>2,d&3),a.g.A=b);else if(c===146)d=tg(b).value,b=tg(b).value,a.g&&(a=
a.g,a.h=d&15,a.g=b&63);else if(c===151)b.skip(1),b.skip(1),d=tg(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(c>=152&&c<=159){c=(c&15)-8;e=a.h[c]!==null;e||(f=new jg(c,a.i),f.j=d,a.h[c]=f);d=tg(b).value;f=tg(b).value;var g=tg(b).value,h=tg(b).value,k=tg(b).value;b=tg(b).value;e&&(b&7)===0||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.B=!1,b.C="white",b.A="black");b=a.h[c];b.l=(d&32)>0;b.L=f&127;b.I=g;b.H=(h&240)>>4;b.K=(f&128)>0;b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
function xg(a,b){for(var c=[],d=0;d<8;d++)(b&1)===1&&a.h[d]&&c.push(d),b>>=1;return c}function yg(a,b,c){var d=[];b=r(xg(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=pg(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function zg(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Ag(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Bg[a<<2|b<<1|c]}
var Cg=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"]]),Bg="black blue green cyan red magenta yellow white".split(" ");function Dg(a,b){this.h=Zb(a);this.i=b==Eg;this.g=0}p=Dg.prototype;p.Ra=function(){return this.g<this.h.byteLength};p.Va=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.U=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Fg();}};p.sa=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Fg();}};p.R=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Fg();}};
p.Ef=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Fg();}};p.re=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 Fg();}if(b>2097151)throw new T(2,3,3001);this.g+=8;return b*4294967296+a};p.Ab=function(a,b){if(this.g+a>this.h.byteLength)throw Fg();var c=Vb(this.h,this.g,a);this.g+=a;return b?new Uint8Array(c):c};
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Fg();this.g+=a};p.Rg=function(a){if(this.g<a)throw Fg();this.g-=a};p.seek=function(a){if(a<0||a>this.h.byteLength)throw Fg();this.g=a};p.xc=function(){for(var a=this.g;this.Ra()&&this.h.getUint8(this.g)!=0;)this.g+=1;a=Vb(this.h,a,this.g-a);this.g+=1;return cc(a)};function Fg(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Dg);Dg.prototype.readTerminatedString=Dg.prototype.xc;Dg.prototype.seek=Dg.prototype.seek;Dg.prototype.rewind=Dg.prototype.Rg;
Dg.prototype.skip=Dg.prototype.skip;Dg.prototype.readBytes=Dg.prototype.Ab;Dg.prototype.readUint64=Dg.prototype.re;Dg.prototype.readInt32=Dg.prototype.Ef;Dg.prototype.readUint32=Dg.prototype.R;Dg.prototype.readUint16=Dg.prototype.sa;Dg.prototype.readUint8=Dg.prototype.U;Dg.prototype.getLength=Dg.prototype.getLength;Dg.prototype.getPosition=Dg.prototype.Va;Dg.prototype.hasMoreData=Dg.prototype.Ra;var Eg=1;Dg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Eg};function Gg(){this.h=[];this.g=[];this.i=new qg;this.l=0;this.m=new Map([["CC1",new dg(0,0)],["CC2",new dg(0,1)],["CC3",new dg(1,0)],["CC4",new dg(1,1)]]);this.A=this.o=0;this.j=new Map;this.C=!0;this.B=new Set;Hg(this)}Gg.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Hg(this);a=r(this.j.values());for(var b=a.next();!b.done;b=a.next())zg(b.value)};
function Hg(a){a.o=0;a.A=0;for(var b=r(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,Uf(c.i),Uf(c.j),Uf(c.o);a.C=!0}
Gg.prototype.extract=function(a,b){if(this.C){for(var c=r(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new Dg(a,0);if(!(a.getLength()<8)&&a.U()===181&&a.sa()===49&&a.R()===1195456820&&a.U()===3&&(c=a.U(),(c&64)!==0))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.U(),f=(e&4)>>2,g=a.U(),h=a.U();f&&(e&=3,e===0||e===1?this.h.push({pts:b,type:e,kb:g,Mb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
Gg.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=r(this.h),d=c.next();!d.done;d=c.next())(d=Ig(this,d.value))&&b.push(d);c=r(this.g);for(d=c.next();!d.done;d=c.next())rg(this.i,d.value);c=r(this.i.i);for(d=c.next();!d.done;d=c.next())d=Jg(this,d.value),b.push.apply(b,A(d));this.i.i=[];this.h=[];this.g=[];return b};
function Ig(a,b){var c=b.type;if((b.kb&112)===16){var d=b.kb>>3&1;c===0?a.o=d:a.A=d}d="CC"+((c<<1|(c?a.A:a.o))+1);c=a.m.get(d);if(b.kb===255&&b.Mb===255||!b.kb&&!b.Mb||!Kg(b.kb)||!Kg(b.Mb))return++a.l>=45&&Hg(a),null;a.l=0;b.kb&=127;b.Mb&=127;var e=b.kb;if(e>=1&&e<=15||!b.kb&&!b.Mb)return null;e=null;if((b.kb&112)===16)a:{a.B.add(d),d=b.kb;a=b.Mb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,(d&240)===16&&(a&192)===64){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
null;var g=a>95?a-96:a-64;g<=13?d=ig[Math.floor(g/2)]:g<=15?e=!0:f=Math.floor((g-16)/2);a=(a&1)===1;c.h!==4&&(g=c.g,c.h===3&&b!==g.g&&(c=1+b-g.h,cg(g,c,1+g.g-g.h,g.h),Xf(g,0,c-1),Xf(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.A=f,g.o="black")}else if((d&247)===17&&(a&240)===32)c.g.m=!1,c.g.j=!1,c.g.l="white",Yf(c.g,0,32),d=!1,b=ig[(a&14)>>1],b==="white_italics"&&(b="white",d=!0),c.g.m=(a&1)===1,c.g.j=d,c.g.l=b;else if((d&247)===16&&(a&240)===32||(d&247)===23&&(a&255)===45)b="black",(d&7)===0&&(b=hg[(a&
14)>>1]),c.g.o=b;else if((d&247)===17&&(a&240)===48)Yf(c.g,1,a);else if((d&246)===18&&(a&224)===32)Yf(c.g,d&1?3:2,a);else{if((d&246)===20&&(a&240)===32){a=b.pts;d=null;switch(b.Mb){case 32:fg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=eg(c,2,a);break;case 38:d=eg(c,3,a);break;case 39:d=eg(c,4,a);break;case 40:Yf(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Uf(c.o);gg(c);break;case 43:gg(c);break;case 44:b=c.i;d=null;c.h!==4&&(d=Vf(b,c.l,a));Xf(b,0,15);break;case 45:b=
c.g;c.h!==3?d=null:(d=Vf(b,c.l,a),e=b.g-b.h+1,cg(b,e-1,e,b.h),Xf(b,0,e-1),Xf(b,b.g,15-b.g),c.l=a);break;case 46:Xf(c.j,0,15);break;case 47:b=null,c.h!==4&&(b=Vf(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,fg(c),c.l=a,d=b}e=d;break a}(d==23||d==31)&&a>=33&&a<=35&&(c.g.B=a-32)}e=null}else a=b.Mb,Yf(c.g,0,b.kb),Yf(c.g,0,a);return e}
function Jg(a,b){var c=[];try{for(;b.Ra();){var d=tg(b).value,e=(d&224)>>5,f=d&31;e===7&&f!=0&&(e=tg(b).value&63);if(e!=0){a.B.add("svc"+e);a.j.has(e)||a.j.set(e,new ug(e));for(var g=a.j.get(e),h=b.Va();b.Va()-h<f;){e=g;var k=b,l=tg(k),m=l.value,n=l.pts;if(m===16){var q=tg(k);m=m<<16|q.value}if(m>=0&&m<=31)var t=vg(e,k,m,n);else if(m>=128&&m<=159)t=wg(e,k,m,n);else{if(m>=4096&&m<=4127)e=k,k=m&255,k>=8&&k<=15?e.skip(1):k>=16&&k<=23?e.skip(2):k>=24&&k<=31&&e.skip(3);else if(m>=4224&&m<=4255)e=k,k=m&
255,k>=128&&k<=135?e.skip(4):k>=136&&k<=143&&e.skip(5);else if(m>=32&&m<=127)k=m,e.g&&(k===127?mg(e.g,"\u266a"):mg(e.g,String.fromCharCode(k)));else if(m>=160&&m<=255)e.g&&mg(e.g,String.fromCharCode(m));else if(m>=4128&&m<=4223){if(k=m&255,e.g)if(Cg.has(k)){var u=Cg.get(k);mg(e.g,u)}else mg(e.g,"_")}else m>=4256&&m<=4351&&e.g&&((m&255)!=160?mg(e.g,"_"):mg(e.g,"[CC]"));t=[]}c.push.apply(c,A(t))}}}}catch(v){if(v instanceof T&&v.code===3E3)db("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
else throw v;}return c}function Kg(a){for(var b=0;a;)b^=a&1,a>>=1;return b===1}Gg.prototype.getStreams=function(){return Array.from(this.B)};S("shaka.cea.CeaDecoder",Gg);Rc=function(){return new Gg};function Lg(a){for(var b=[],c=a,d=a=0;d<c.length;)a==2&&c[d]==3?(a=0,c=[].concat(A(c)),c.splice(d,1),c=new Uint8Array(c)):c[d]==0?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;a[d]==255;)c+=255,d++;c+=a[d++];for(var e=0;a[d]==255;)e+=255,d++;e+=a[d++];c==4&&b.push(a.subarray(d,d+e));d+=e}return b};function Mg(){this.i=new Map;this.h=new Map;this.g=!1}p=Mg.prototype;p.box=function(a,b){a=Ng(a);this.i.set(a,Og);this.h.set(a,b);return this};p.O=function(a,b){a=Ng(a);this.i.set(a,Pg);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new Dg(a,0);for(this.g=!1;a.Ra()&&!this.g;)this.Oc(0,a,b,c)};
p.Oc=function(a,b,c,d){var e=b.Va();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.R(),g=b.R(),h=Qg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Va()+8>b.getLength()){this.g=!0;return}f=b.re();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==Pg){if(d&&b.Va()+4>b.getLength()){this.g=!0;return}n=b.R();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(g-=b.Va(),b=g>0?b.Ab(g,!1):new Uint8Array(0),b=new Dg(b,0),l({name:h,
parser:this,partialOkay:c||!1,stopOnPartial:d||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Va(),b.getLength()-b.Va()))}};function Rg(a){for(var b=Sg(a);a.reader.Ra()&&!a.parser.g;)a.parser.Oc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Tg(a){for(var b=Sg(a),c=a.reader.R(),d=0;d<c&&(a.parser.Oc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial),!a.parser.g);d++);}
function Ug(a){var b=Sg(a);for(a.reader.skip(78);a.reader.Ra()&&!a.parser.g;)a.parser.Oc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Vg(a){var b=Sg(a);a.reader.skip(8);var c=a.reader.sa();a.reader.skip(6);c==2?a.reader.skip(48):a.reader.skip(12);for(c==1&&a.reader.skip(16);a.reader.Ra()&&!a.parser.g;)a.parser.Oc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Wg(a,b){return function(c){a(c.reader.Ab(c.reader.getLength()-c.reader.Va(),b))}}
function Ng(a){var b=0;a=r(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 Sg(a){return 8+(a.has64BitSize?8:0)+(a.flags!=null?4:0)}S("shaka.util.Mp4Parser",Mg);Mg.headerSize=Sg;Mg.typeToString=Qg;Mg.allData=Wg;Mg.audioSampleEntry=Vg;Mg.visualSampleEntry=Ug;Mg.sampleDescription=Tg;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.O;Mg.prototype.box=Mg.prototype.box;var Og=0,Pg=1;function Xg(a,b){var c=null,d=null,e=null,f=null,g=a.R();b&1&&(e=a.re());b&2&&(f=a.R());b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:g,ad:c,bd:d,wh:e,Sg:f}}function Yg(a,b){return b==1?(b=a.R(),a=a.R(),{baseMediaDecodeTime:b*4294967296+a}):{baseMediaDecodeTime:a.R()}}function Zg(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.R();a.skip(4);a=a.sa();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function $g(a,b,c){var d=a.R(),e=[],f=null;c&1&&(f=a.Ef());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Kf:null,sampleSize:null,ue:null};c&256&&(h.Kf=a.R());c&512&&(h.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(h.ue=b==0?a.R():a.Ef());e.push(h)}return{Ej:d,Jf:e,Se:f}}function ah(a){a.skip(6);a.skip(2);a.skip(8);var b=a.sa();a.skip(2);a.skip(2);a.skip(2);a=a.sa()+a.sa()/65536;return{channelCount:b,sampleRate:a}}function bh(a){a=a.R();return{codec:Qg(a)}}
function ch(a){var b=null,c=null,d=a.Ab(4,!1);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if(e==="nclx"){switch(a.sa()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.sa();a.sa();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,vd:c}}
function dh(a,b){b=b===void 0?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function eh(a){return(a<10?"0":"")+a};function fh(){this.j=new Map;this.i=this.h=0;this.g=gh}
fh.prototype.init=function(a){function b(f){f=f.name;hh.has(f)&&(c.g=hh.get(f))}var c=this,d=[],e=[];(new Mg).box("moov",Rg).box("mvex",Rg).O("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.R();g=g.R();c.h=f;c.i=g}).box("trak",Rg).O("tkhd",function(f){var g=f.reader;f=f.version;f==1?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.R();f==1?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.sa();g.sa();g.sa();g.sa();d.push(h)}).box("mdia",Rg).O("mdhd",
function(f){f=Zg(f.reader,f.version);e.push(f.timescale)}).box("minf",Rg).box("stbl",Rg).O("stsd",Tg).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",Ug).box("sinf",Rg).box("frma",function(f){f=bh(f.reader).codec;hh.has(f)&&(c.g=hh.get(f))}).parse(a,!0,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==gh&&cb("Unable to determine bitstream format for CEA parsing!");
d.forEach(function(f,g){c.j.set(f,e[g])})};
fh.prototype.parse=function(a){var b=this;if(this.g==gh)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,ad:b.h,bd:b.i,Kg:[],timescale:9E4});Rg(f)}).O("trun",function(f){var g=e[e.length-1];f=$g(f.reader,f.version,f.flags);g.Kg.push(f)}).O("tfhd",function(f){var g=e[e.length-1];f=Xg(f.reader,f.flags);g.ad=f.ad||b.h;g.bd=f.bd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).O("tfdt",function(f){var g=e[e.length-
1];f=Yg(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Va(),k=r(e),l=k.next();!l.done;l=k.next())l=l.value,l.baseMediaDecodeTime===null?cb("Unable to find base media decode time for CEA captions!"):(f.reader.seek(h),ih(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.ad,l.bd,g,l.Kg,c))}).parse(a,!1,!0);return c};
function ih(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Jf});n=[].concat.apply([],A(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Se);b.Ra();){g=b.R();var q=b.U(),t=null;t=!1;h=1;switch(a.g){case jh:t=q&31;t=t==6;break;case kh:h=2;b.skip(1);t=q>>1&63;t=t==39||t==40;break;case lh:h=2;b.skip(1);t=q>>1&63;t=t==23||t==24;break;default:return}if(t)for(q=0,l<n.length&&(q=n[l].ue||0),q=(c+q)/d,h=b.Ab(g-h,!1),h=r(Lg(h)),t=h.next();!t.done;t=h.next())k.push({packet:t.value,pts:q});
else try{b.skip(g-h)}catch(u){break}m-=g+4;m==0&&(c=l<n.length?c+(n[l].Kf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",fh);var gh=0,jh=1,kh=2,lh=3,hh=(new Map).set("avc1",jh).set("avc3",jh).set("dvav",jh).set("dva1",jh).set("hev1",kh).set("hvc1",kh).set("dvh1",kh).set("dvhe",kh).set("vvc1",lh).set("vvi1",lh).set("dvc1",lh).set("dvi1",lh);Sc("video/mp4",function(){return new fh});/*

 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 mh(a,b){this.j=a;if(b===void 0?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)d>=2&&a[d]==3&&a[d-1]==0&&a[d-2]==0||(b[c]=a[d],c++);this.j=Vb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function nh(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);d!==0&&(c.set(a.j.subarray(b,b+d)),a.h=(new Dg(c,0)).R(),a.g=d*8,a.i-=d)}function oh(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=c*8;a.g-=c;nh(a)}a.h<<=b;a.g-=b}
function ph(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;a.g>0?a.h<<=c:a.i>0&&nh(a);c=b-c;return c>0?d<<c|ph(a,c):d}function qh(a){var b;for(b=0;b<a.g;++b)if((a.h&2147483648>>>b)!==0)return a.h<<=b,a.g-=b,b;nh(a);return b+qh(a)}function rh(a){oh(a,1+qh(a))}function U(a){var b=qh(a);return ph(a,b+1)-1}function sh(a){a=U(a);return 1&a?1+a>>>1:-1*(a>>>1)}function V(a){return ph(a,1)===1}function th(a){return ph(a,8)}
function uh(a,b){for(var c=8,d=8,e=0;e<b;e++)d!==0&&(d=sh(a),d=(c+d+256)%256),c=d===0?c:d}function vh(a){th(a);U(a);return U(a)}S("shaka.util.ExpGolomb",mh);/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function wh(){}function xh(a,b){return b+10<=a.length&&a[b]===73&&a[b+1]===68&&a[b+2]===51&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function yh(a,b){return b+10<=a.length&&a[b]===51&&a[b+1]===68&&a[b+2]===73&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function zh(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 Ah(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if(a.type==="APIC"){if(a.size<2||a.data[0]!==3)return null;var c=a.data.subarray(1).indexOf(0);if(c===-1)return null;var d=cc(Vb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(f===-1)return null;var g=cc(Vb(a.data,3+c,f)),h;d==="--\x3e"?h=cc(Vb(a.data,4+c+f)):h=Wb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if(a.type==="TXXX"){if(a.size<2||a.data[0]!==
3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=cc(Vb(a.data,1,d));a=cc(Vb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="WXXX"){if(a.size<2||a.data[0]!==3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=cc(Vb(a.data,1,d));a=cc(Vb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="PRIV"){if(a.size<2)return null;c=a.data.indexOf(0);if(c===-1)return null;c=cc(Vb(a.data,0,c));b.description=c;c=="com.apple.streaming.transportStreamTimestamp"?
(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Wb(a.data.subarray(c.length+1)),b.data=a);return b}if(a.type[0]==="T"){if(a.size<2||a.data[0]!==3)return null;a=cc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return a.type[0]==="W"?(a=cc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Wb(a.data),b):null}
function Bh(a){for(var b=0,c=[];xh(a,b);){var d=zh(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=zh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ah(e))&&c.push(f);b+=e.size+10}yh(a,b)&&(b+=10)}return c}function Ch(a,b){for(var c=b=b===void 0?0:b,d=0;xh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=zh(a,b+6),yh(a,b+10)&&(d+=10),b+=d;return d>0?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",wh);wh.getID3Data=Ch;
wh.getID3Frames=Bh;function Dh(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.C=this.D=null;this.i=[];this.h=[];this.F=null;this.l=[];this.B=this.H=this.o=this.A=null}p=Dh.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};p.we=function(a){this.B!=null&&this.B!=a&&(this.o=this.A=null);this.B=a};
p.parse=function(a){if(a.length<564)return this;for(var b=Math.max(0,Eh(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(a[e]==71){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if((a[e+3]&48)>>4>1){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,be:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(m>0)for(var n=h+5,q=m;q>2;){var t=f[n+1]+2;switch(f[n]){case 5:var u=ec(f.subarray(n+2,n+t));g.audio==-1&&u==="Opus"?(g.audio=l,g.audioCodec="opus"):g.video==-1&&u==="AV01"&&(g.video=l,g.videoCodec="av1");break;case 106:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");break;case 122:g.audio==-1&&(g.audio=l,g.audioCodec="ec3");break;case 124:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 127:g.audioCodec=="opus"&&(u=
null,f[n+2]===128&&(u=f[n+3]),u!=null&&(this.H={channelCount:(u&15)===0?2:u&15,xh:u,sampleRate:48E3}))}n+=t;q-=t}break;case 15:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 17:g.audio==-1&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:g.be==-1&&(g.be=l);break;case 27:g.video==-1&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:g.audio==-1&&(g.audio=l,g.audioCodec="mp3");break;case 36:g.video==-1&&(g.video=l,g.videoCodec="hvc");break;case 129:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");
break;case 132:case 135:g.audio==-1&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;f.video!=-1&&(this.K=f.video,this.m=f.videoCodec);f.audio!=-1&&(this.D=f.audio,this.C=f.audioCodec);f.be!=-1&&(this.F=f.be);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.D:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
break;case this.F:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
function Fh(a,b){if((b[0]<<16|b[1]<<8|b[2])!==1)return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2;a.A==null&&(a.A=e);c.pts=Gh(e,a.A);a.A=c.pts;c.dts=c.pts;d&64&&(d=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,a.o==null&&(a.o=d),c.dts=c.pts!=
e?Gh(d,a.o):d);a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.Ri=function(a){yb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Bf(a,{ld:null,state:null})};
p.Bf=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;this.m=="hvc"&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;f==-1&&(l=0,m=this.m=="hvc"?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(f===1)f=n?0:2;else if(n)if(n==1){n=h-f-1;if(l>=0)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.ld)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength-
g)),n>0&&(n=a.subarray(0,n),f.data=sc(f.data,n),f.fullData=sc(f.fullData,n),f.state=0);h<d?(m=this.m=="hvc"?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}l>=0&&f>=0&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.ld&&(c=k.length?k[k.length-1]:b.ld)&&(c.data=sc(c.data,a),c.fullData=sc(c.fullData,a));b.state=f;return k};
p.getMetadata=function(){for(var a=[],b=r(this.l),c=b.next();!c.done;c=b.next())c=sc.apply(mc,A(c.value)),(c=Fh(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Bh(c.data),dts:c.dts,pts:c.pts});return a};
p.fb=function(){if(this.i.length&&!this.h.length)for(var a=r(this.i),b=a.next();!b.done;b=a.next()){var c=sc.apply(mc,A(b.value)),d=Fh(this,c);b=this.h.length?this.h[this.h.length-1]:null;d&&d.pts!=null&&d.dts!=null&&(!b||b.pts!=d.pts&&b.dts!=d.dts)?this.h.push(d):this.h.length&&(c=d?d.data:c)&&(b=this.h.pop(),b.data=sc(b.data,c),this.h.push(b))}return this.h};
p.Kc=function(a){a=a===void 0?!0:a;if(this.j.length&&!this.g.length){for(var b=r(this.j),c=b.next();!c.done;c=b.next()){var d=sc.apply(mc,A(c.value)),e=Fh(this,d);c=this.g.length?this.g[this.g.length-1]:null;e&&e.pts!=null&&e.dts!=null&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?this.g.push(e):this.g.length&&(d=e?e.data:d)&&(c=this.g.pop(),c.data=sc(c.data,d),this.g.push(c))}if(a){b={ld:null,state:null};c=[];d=r(this.g);for(e=d.next();!e.done;e=d.next())e=e.value,e.nalus=this.Bf(e,b),e.nalus.length&&(c.push(e),
b.ld=e.nalus[e.nalus.length-1]);this.g=c}}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if(a=="audio"){a=null;var b=this.fb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return a=="video"?(a=null,b=this.Kc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.cd=function(){return{audio:this.C,video:this.m}};p.ae=function(){for(var a=[],b=r(this.Kc()),c=b.next();!c.done;c=b.next())a.push.apply(a,A(c.value.nalus));return a};
p.ui=function(){yb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.qf();return{height:a.height,width:a.width}};p.qf=function(){return this.m=="hvc"?Hh(this):Ih(this)};function Jh(a){var b=a.Kc();return b.length>1&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(Math.abs(1/(b-a)*9E4)):null}
function Ih(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.ae();if(!c.length)return b;c=c.find(function(t){return t.type==7});if(!c)return b;c=new mh(c.data);var d=th(c),e=th(c),f=th(c);rh(c);if(Kh.includes(d)){var g=U(c);g===3&&oh(c,1);rh(c);rh(c);oh(c,1);if(V(c)){g=g!==3?8:12;for(var h=0;h<g;h++)V(c)&&(h<6?uh(c,16):uh(c,64))}}rh(c);g=U(c);if(g===0)U(c);else if(g===1)for(oh(c,1),rh(c),rh(c),g=U(c),h=0;h<g;h++)rh(c);rh(c);oh(c,1);g=U(c);h=U(c);var k=ph(c,1);k===0&&oh(c,1);oh(c,1);
var l=0,m=0,n=0,q=0;V(c)&&(l=U(c),m=U(c),n=U(c),q=U(c));b.height=String((2-k)*(h+1)*16-n*2-q*2);b.width=String((g+1)*16-l*2-m*2);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Jh(a);return b}
function Hh(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.ae();if(!c.length)return b;c=c.find(function(I){return I.type==33});if(!c)return b;var d=new mh(c.fullData,!0);th(d);th(d);ph(d,4);var e=ph(d,3);V(d);var f=ph(d,2),g=ph(d,1),h=ph(d,5),k=ph(d,32);c=th(d);for(var l=th(d),m=th(d),n=th(d),q=th(d),t=th(d),u=th(d),v=[],w=[],y=0;y<e;y++)v.push(V(d)),w.push(V(d));if(e>0)for(y=e;y<8;y++)ph(d,2);for(y=0;y<e;y++)v[y]&&ph(d,88),w[y]&&th(d);U(d);e=U(d);e==3&&ph(d,1);v=U(d);w=U(d);var x=
y=0,B=0,C=0;V(d)&&(y+=U(d),x+=U(d),B+=U(d),C+=U(d));b.width=String(v-(y+x)*(e===1||e===2?2:1));b.height=String(w-(B+C)*(e===1?2:1));d=function(I){for(var E=0,z=0;z<32;z++)E|=(I>>z&1)<<31-z;return E>>>0}(k);g=g==1?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;t&&(f+="."+t.toString(16).toUpperCase());q&&(f+="."+q.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Jh(a);return b}function Gh(a,b){var c=1;for(a>b&&(c=-1);Math.abs(b-a)>4294967296;)a+=c*8589934592;return a}function Lh(a){return Eh(a)<0?!1:!0}function Eh(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(a[c]==71&&a[c+188]==71&&a[c+376]==71)return c;c++}return-1}S("shaka.util.TsParser",Dh);Dh.syncOffset=Eh;Dh.probe=Lh;Dh.prototype.getVideoInfo=Dh.prototype.qf;Dh.prototype.getVideoResolution=Dh.prototype.ui;
Dh.prototype.getVideoNalus=Dh.prototype.ae;Dh.prototype.getCodecs=Dh.prototype.cd;Dh.prototype.getStartTime=Dh.prototype.getStartTime;Dh.prototype.getVideoData=Dh.prototype.Kc;Dh.prototype.getAudioData=Dh.prototype.fb;Dh.prototype.getMetadata=Dh.prototype.getMetadata;Dh.prototype.parseNalus=Dh.prototype.Bf;Dh.prototype.parseAvcNalus=Dh.prototype.Ri;Dh.prototype.parse=Dh.prototype.parse;Dh.prototype.setDiscontinuitySequence=Dh.prototype.we;Dh.prototype.clearData=Dh.prototype.clearData;
Dh.Timescale=9E4;var Kh=[100,110,122,244,44,83,86,118,128,138,139,134];function Mh(){this.g=null}Mh.prototype.init=function(){};Mh.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Dh;var b=[];a=Vb(a);if(!Lh(a))return b;a=this.g.parse(a);var c=a.cd(),d=a.ae();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=r(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&d.time!=null)for(var e=r(Lg(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
S("shaka.cea.TsCeaParser",Mh);Sc("video/mp2t",function(){return new Mh});S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});S("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});S("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function Nh(){}S("shaka.dependencies",Nh);Nh.has=function(a){return Oh.has(a)};Nh.add=function(a,b){if(!Ph[a])throw Error(a+" is not supported");a==Qh?yb("mux.js","mux.js is no longer used in Shaka Player."):Oh.set(a,function(){return b})};var Qh="muxjs",Ph={Dj:Qh,ISOBoxer:"ISOBoxer"};Nh.Allowed=Ph;var Oh=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Rh(){}function Sh(a,b){var c=document.createElement("source");c.src=a;c.type=b===void 0?"":b;return c}function Th(a){for(var b=!1,c=a.getElementsByTagName("source"),d=c.length-1;d>=0;--d)a.removeChild(c[d]),b=!0;a.src&&(a.removeAttribute("src"),b=!0);return b}function Uh(a){for(;a.firstChild;)a.removeChild(a.firstChild)}
function ci(){if(di)return di;ei||(ei=new Ge(function(){di=null}));(di=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(di=document.createElement("video"));ei.ka(1);return di}
function fi(a,b){var c,d,e,f,g;return L(function(h){if(h.g==1)return"fonts"in document&&"FontFace"in window?H(h,document.fonts.ready,2):h.return();if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();m.done===!1;)l.push(m.value),m=k.next();return l};d=r(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&f.display==="swap")return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);K(h)})}
S("shaka.util.Dom",Rh);Rh.removeAllChildren=Uh;Rh.clearSourceFromVideo=Th;var ei=null,di=null;function gi(){this.j=new rb(function(){return["Oculus","Quest"].some(function(a){return navigator.userAgent.includes(a.toLowerCase())})?"VR":navigator.userAgent.match(/Smart( ?|_)TV/i)||navigator.userAgent.match(/Android ?TV/i)?"TV":navigator.userAgentData?navigator.userAgentData.mobile?"MOBILE":"DESKTOP":/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?"MOBILE":navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android"?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?
"MOBILE":"DESKTOP"});this.l=new rb(function(){return navigator.vendor.includes("Apple")&&(navigator.userAgent.includes("Version/")||navigator.userAgent.includes("OS/"))?"WEBKIT":navigator.userAgent.includes("Edge/")?"EDGE":navigator.userAgent.includes("Chrome/")?"CHROMIUM":navigator.userAgent.includes("Firefox/")?"GECKO":"UNKNOWN"})}function hi(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=gi.prototype;p.Ib=function(){return!!navigator.mediaCapabilities};
p.Ma=function(){return this.j.value()};p.ya=function(){return this.l.value()};p.Rc=function(){return!1};p.Og=function(){return!1};p.ce=function(){return!1};p.Pg=function(){return!1};p.pd=function(){return!1};p.Dc=function(){return!0};p.kc=function(){return!0};p.rd=function(){return!0};p.Tg=function(){return 0};p.Nb=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.dh=function(){return!1};p.Nf=function(){return!1};
p.La=function(a){var b=this.Ma();if(b==="TV"||b==="CONSOLE"||b==="CAST")a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.Ng=function(){return[]};p.Jc=function(a){return window.matchMedia!==void 0&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"};p.hh=function(){return!1};p.Dg=function(){return!1};p.If=function(){return!1};p.ze=function(){return!0};p.Eg=function(){return!1};p.gh=function(){return!0};p.Cc=function(){return!1};
p.xf=function(a){return a==="com.apple.fps"};p.ye=function(){return!0};p.toString=function(){return"Device: "+this.ub()+" v"+this.oa()+"; Type: "+this.Ma()};function ii(){gi.call(this);this.g=new rb(function(){var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null});this.h=new rb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}na(ii,gi);p=ii.prototype;p.oa=function(){return this.g.value()};p.ub=function(){return"Apple Browser"};p.Ma=function(){return this.h.value()};
p.ya=function(){return"WEBKIT"};p.Ib=function(){return!1};p.Rc=function(a,b){return b==="audio"};p.ce=function(){return!0};p.Pg=function(a){return a==="audio"};p.La=function(a){gi.prototype.La.call(this,a);a.abr.minTimeToSwitch=.5;return a};p.hh=function(){return!0};p.ye=function(){return!1};
(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(ub=function(){return new ii});function ji(){if(!ki())throw Error("Not a Chromecast device!");gi.call(this);this.h=new rb(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.g=new rb(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?li:a.includes("fuchsia")?mi:ni})}na(ji,gi);p=ji.prototype;p.oa=function(){return this.h.value()};p.ub=function(){return"Chromecast with "+this.g.value()};
p.Ma=function(){return"CAST"};p.ya=function(){return"CHROMIUM"};p.Ib=function(){return gi.prototype.Ib.call(this)&&this.g.value()!==ni};p.kc=function(){return this.g.value()!==ni};p.Tg=function(){switch(this.g.value()){case li:return 0;case mi:return 3;default:return 1}};
p.Nb=function(){var a,b,c,d,e;return L(function(f){switch(f.g){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};va(f,2);if(!(c=a)){f.u(4);break}return H(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.h;case 4:if(c){b.width=3840;b.height=2160;f.u(6);break}if(!(d=a)){f.u(7);break}return H(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:d=
f.h;case 7:d&&(b.width=1920,b.height=1080);case 6:xa(f,3);break;case 2:e=za(f),bb("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};p.La=function(a){gi.prototype.La.call(this,a);a.streaming.stallSkip=0;return a};p.Cc=function(){return!0};function ki(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var li="Android",mi="Fuchsia",ni="Linux";ki()&&(ub=function(){return new ji});function oi(a,b){if(a===b||!a.length||!b.length)return!0;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(pi(c))return!0;for(var d=r(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||pi(e))return!0}return!1}
function qi(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=r((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(A(d.keyIds),A(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}else pi(d)?c.push(d):pi(f)&&c.push(f)}return c}
function ri(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function si(a){return a?!!a.match(/^com\.apple\.fps/):!1}function pi(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}var ti=new rb(function(){return Wb(new Uint8Array([0]))}),ui=new Map;function vi(){gi.call(this);var a=this;this.i=new rb(function(){var b=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return b?parseInt(b[2],10):null});this.g=new rb(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.h=new rb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?
navigator.platform.toLowerCase().includes("win32"):!1});this.A=new rb(function(){return navigator.userAgent.match(/Edge?\//)?!a.h.value():!0});this.o=new rb(function(){return navigator.userAgent.includes("sony.hbbtv.tv")});this.m=new rb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":navigator.userAgent.includes("Android")?!0:!1})}na(vi,gi);p=vi.prototype;p.oa=function(){return this.i.value()};p.ub=function(){return this.g.value()};
p.Rc=function(a){return ri(a)?this.g.value()==="Edge"&&this.h.value():!1};p.Og=function(){return this.g.value()==="Edge"&&this.h.value()};p.ce=function(){return this.g.value()==="Edge"&&this.h.value()};p.kc=function(){return this.A.value()};
p.La=function(a){gi.prototype.La.call(this,a);if(this.h.value())switch(this.g.value()){case "Firefox":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case "Chrome":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}this.m.value()&&(a.drm.defaultAudioRobustnessForWidevine="",a.drm.defaultVideoRobustnessForWidevine="");
return a};p.If=function(){return this.g.value()==="Edge"||this.o.value()};p.Cc=function(){if(this.ya()==="GECKO"){var a=this.oa();return a!==null?a>=100:gi.prototype.Cc.call(this)}return gi.prototype.Cc.call(this)};p.xf=function(a){return this.ya()==="GECKO"?a.startsWith("com.microsoft.playready.recommendation"):gi.prototype.xf.call(this,a)};wb=function(){return new vi};function wi(){gi.apply(this,arguments)}na(wi,gi);p=wi.prototype;p.oa=function(){return null};p.ub=function(){return"Hisense"};p.Ma=function(){return"TV"};p.Ib=function(){return!1};p.Nb=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}b==null&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};p.La=function(a){gi.prototype.La.call(this,a);a.streaming.stallSkip=0;return a};
if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))ub=function(){return new wi};function xi(){gi.call(this);this.g=new rb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}na(xi,gi);p=xi.prototype;p.ub=function(){return"PlayStation"};p.Ma=function(){return"CONSOLE"};p.ya=function(){return"WEBKIT"};p.oa=function(){return this.g.value()};p.Ib=function(){return!1};p.Dc=function(){return!1};p.kc=function(){return!1};p.Nf=function(){return this.oa()===4};
p.Nb=function(){var a,b,c,d,e;return L(function(f){switch(f.g){case 1:return a={width:1920,height:1080},b=!1,va(f,2),H(f,window.msdk.device.getDisplayInfo(),4);case 4:c=f.h;b=c.resolution==="4K";xa(f,3);break;case 2:return za(f),va(f,5),H(f,window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.h;b=d.resolution==="4K";xa(f,3);break;case 5:e=za(f),cb("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
p.La=function(a){gi.prototype.La.call(this,a);this.oa()===4&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};p.If=function(){return this.oa()===4};p.ze=function(){return this.oa()!==4};navigator.userAgent.includes("PlayStation")&&(ub=function(){return new xi});function yi(){gi.call(this);var a=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=a?parseInt(a[1],10):null;this.h=a?parseInt(a[2],10):null}na(yi,gi);p=yi.prototype;p.oa=function(){return this.g};p.ub=function(){return"Tizen"};p.ya=function(){return"CHROMIUM"};p.Ma=function(){return"TV"};p.Rc=function(){return!0};p.pd=function(){return this.oa()===3};p.Ib=function(){return!1};p.Dc=function(){var a=this.oa();return a!==null?a>=4:gi.prototype.Dc.call(this)};p.kc=function(){return!1};
p.rd=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:gi.prototype.rd.call(this)};
p.Nb=function(){var a=window.devicePixelRatio;a={width:window.screen.width*a>1920?3840:1920,height:window.screen.height*a>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var b=webapis.systeminfo.getMaxVideoResolution();a.width=b.width;a.height=b.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,
a.height=2160)}catch(c){cb("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.La=function(a){gi.prototype.La.call(this,a);a.drm.ignoreDuplicateInitData=this.oa()!==2;this.oa()===3&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};p.Ng=function(){var a=[];this.g!==null&&this.g<5&&a.push("opus");return a};
p.Jc=function(a){try{if(webapis.avinfo.isHdrTvSupport())return a?"HLG":"PQ"}catch(b){return gi.prototype.Jc.call(this,a)}return"SDR"};p.Dg=function(){return!0};p.Eg=function(){return this.oa()===3};navigator.userAgent.includes("Tizen")&&(ub=function(){return new yi});function zi(){gi.apply(this,arguments)}na(zi,gi);zi.prototype.oa=function(){return null};zi.prototype.ub=function(){return"Vizio"};zi.prototype.Ma=function(){return"TV"};zi.prototype.Ib=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(ub=function(){return new zi});function Ai(){gi.call(this);this.i=new rb(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")});this.h=new rb(function(){return navigator.userAgent.includes("SOPOpenBrowser")});this.g=new rb(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null})}na(Ai,gi);p=Ai.prototype;p.oa=function(){return this.g.value()};
p.ub=function(){return"WebKit STB"};p.Ma=function(){return"TV"};p.ya=function(){return"WEBKIT"};p.Ib=function(){return!1};p.Dc=function(){var a=this.g.value();return a!==null?a>=15:!0};p.Rc=function(){return this.h.value()};p.Nb=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.ze=function(){return!this.i.value()};p.ye=function(){return!1};
if(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))ub=function(){return new Ai};function Bi(){gi.call(this);var a=this;this.h=Ci();this.g=null;try{var b=new PalmServiceBridge;b.onservicecallback=function(c){c=JSON.parse(c);a.g=c.Ch["tv.model.supportHDR"]||c.Ch["tv.config.supportDolbyHDRContents"]||!1};b.call("luna://com.webos.service.config/getConfigs",JSON.stringify({Cj:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(c){cb("WebOS: getConfigs call failed",c)}}na(Bi,gi);p=Bi.prototype;p.oa=function(){return this.h};p.ub=function(){return"WebOS"};p.Ma=function(){return"TV"};
p.ya=function(){return"CHROMIUM"};p.Ib=function(){return!1};p.Dc=function(){var a=this.oa();return a!==null?a>3:gi.prototype.Dc.call(this)};p.kc=function(){var a=this.oa();return a!==null?a>6:gi.prototype.kc.call(this)};p.rd=function(){var a=this.oa();return a!==null?a>3:gi.prototype.rd.call(this)};p.Nb=function(){var a={width:1920,height:1080};try{var b=JSON.parse(window.PalmSystem.deviceInfo);a.width=Math.max(1920,b.screenWidth);a.height=Math.max(1080,b.screenHeight)}catch(c){cb("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.La=function(a){gi.prototype.La.call(this,a);this.oa()===3&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};p.Jc=function(a){return this.g==null?(cb("WebOS: getConfigs call haven't finished"),gi.prototype.Jc.call(this,a)):this.g?a?"HLG":"PQ":"SDR"};
function Ci(){var a=null,b=navigator.userAgent.match(/Chrome\/(\d+)/);b&&(a=parseInt(b[1],10));switch(a){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}p.gh=function(){return!1};p.Cc=function(){var a=this.oa();return a!==null?a>=6:gi.prototype.Cc.call(this)};if(navigator.userAgent.includes("Web0S")){var Di=new Bi;ub=function(){return Di}};function Ei(){gi.call(this);this.g=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=a?parseInt(a[1],10):null}na(Ei,gi);p=Ei.prototype;p.oa=function(){return this.h};p.ub=function(){return"Xbox"};p.Ma=function(){return"CONSOLE"};p.ya=function(){return this.g?"EDGE":"CHROMIUM"};p.Rc=function(){return!0};p.ce=function(){return!0};p.dh=function(){return this.g};
p.Nb=function(){var a={width:1920,height:1080},b=Fi();if(b)try{var c=new b.Media.Protection.ProtectionCapabilities,d=b.Media.Protection.ProtectionCapabilityResult;b=null;do b=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(b===d.maybe);b===d.probably&&(a.width=3840,a.height=2160)}catch(e){cb("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.La=function(a){gi.prototype.La.call(this,a);a.drm.parseInbandPsshEnabled=this.g;a.drm.preferredKeySystems.push("com.microsoft.playready");this.g&&(a.streaming.gapPadding=.01);return a};function Fi(){var a=null;try{a=typeof Windows!=="undefined"?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||Fi()!==null)ub=function(){return new Ei};function Gi(a,b){var c=Hi();this.l=a.maxAttempts==null?c.maxAttempts:a.maxAttempts;this.j=a.baseDelay==null?c.baseDelay:a.baseDelay;this.o=a.fuzzFactor==null?c.fuzzFactor:a.fuzzFactor;this.m=a.backoffFactor==null?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=b===void 0?!1:b)this.g=1}
function Ii(a){var b,c;return L(function(d){if(d.g==1){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(b==0)return d.return();c=a.h*(1+(Math.random()*2-1)*a.o);return H(d,new Promise(function(e){(new Ge(e)).ka(c/1E3)}),2)}a.h*=a.m;K(d)})}function Hi(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ji(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ji.prototype.resolve=function(){};Ji.prototype.reject=function(){};function Ki(a,b){this.promise=a;this.i=b;this.g=null}function Li(a){return new Ki(Promise.reject(a),function(){return Promise.resolve()})}function Mi(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new Ki(a,function(){return Promise.resolve()})}function Ni(a){return new Ki(Promise.resolve(a),function(){return Promise.resolve()})}function Oi(a){return new Ki(a,function(){return a.catch(function(){})})}Ki.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
Ki.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};Ki.prototype.Bb=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Pi(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ji;f.catch(function(){});var g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new Ki(f,function(){return d()})};
function Pi(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}ea.Object.defineProperties(Ki.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}});S("shaka.util.AbortableOperation",Ki);Ki.prototype.chain=Ki.prototype.Bb;Ki.prototype["finally"]=Ki.prototype.finally;
Ki.all=function(a){return new Ki(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})};Ki.prototype.abort=Ki.prototype.abort;Ki.notAbortable=Oi;Ki.completed=Ni;Ki.aborted=Mi;Ki.failed=Li;function Qi(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
Qi.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Qi.prototype.stopImmediatePropagation=function(){this.g=!0};Qi.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",Qi);function Ri(){this.Na=new lb;this.Yf=this}Ri.prototype.addEventListener=function(a,b){this.Na&&this.Na.push(a,b)};Ri.prototype.removeEventListener=function(a,b){this.Na&&this.Na.remove(a,b)};Ri.prototype.dispatchEvent=function(a){if(!this.Na)return!0;var b=this.Na.get(a.type)||[],c=this.Na.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Yf;a.currentTarget=this.Yf;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
Ri.prototype.release=function(){this.Na=null};function Si(){this.g=[]}function Ti(a,b){a.g.push(b.finally(function(){ib(a.g,b)}))}Si.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Ui(a,b,c,d,e,f,g){Ri.call(this);this.i=null;this.j=!1;this.A=new Si;this.g=new Set;this.h=new Set;this.o=a||null;this.m=b||null;this.B=c||null;this.C=d||null;this.D=e||null;this.H=f||null;this.F=g||null;this.l=new Map}na(Ui,Ri);p=Ui.prototype;p.configure=function(a){this.i=a};function Vi(a,b,c,d){d=d===void 0?!1:d;c=c||Wi;var e=Xi.get(a);(!e||c>=e.priority)&&Xi.set(a,{priority:c,qe:b,Si:d})}
function Yi(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=r(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.Vi=function(a){this.g.add(a)};p.mj=function(a){this.g.delete(a)};p.yh=function(){this.g.clear()};p.Wi=function(a){this.h.add(a)};p.nj=function(a){this.h.delete(a)};p.Ah=function(){this.h.clear()};p.gg=function(){this.l.clear()};
function Zi(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:c===void 0?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();Ri.prototype.release.call(this);return this.A.destroy()};
p.request=function(a,b,c){var d=this,e=new $i;if(this.j){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new aj(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?fd(b.retryParameters):Hi();b.uris=fd(b.uris);f=bj(this,a,b,c);var g=f.Bb(function(){return cj(d,a,b,c,new Gi(b.retryParameters,!1),0,null,e)}),h=g.Bb(function(q){return dj(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Bb(function(q){var t=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=t;q.xi||!d.o||u.fromCache||b.method=="HEAD"||a!=ej||d.o(u.timeMs,u.data.byteLength,fj(c),b,c);d.F&&d.F(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new aj(n.promise,function(){return n.abort()},e);Ti(this.A,f);return f};
function bj(a,b,c,d){function e(h){f=f.Bb(function(){c.body&&(c.body=Wb(c.body));return h(b,c,d)})}var f=Ni(void 0);a.D&&e(a.D);a=r(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Bb(void 0,function(h){if(h instanceof T&&h.code==7001)throw h;throw new T(2,1,1006,h);})}
function cj(a,b,c,d,e,f,g,h){a.i.forceHTTP&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.i.forceHTTPS&&(c.uris[f]=c.uris[f].replace("http://","https://"));f>0&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new Db(c.uris[f]),l=k.Hb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),Eb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=Xi.get(l))?l.qe:null;if(!n)return Li(new T(2,1,1E3,k));var q=l.Si;(k=a.l.get(k.mb))&&(c.headers["common-access-token"]=k);var t=null,u=null,v=!1,w=!1,y;return Oi(Ii(e)).Bb(function(){if(a.j)return Mi();
y=Date.now();var x=0;c.requestStartTime=Date.now();var B=n(c.uris[f],c,b,function(E,z,D){t&&t.stop();u&&u.ka(I/1E3);a.o&&b==ej&&(x++,c.packetNumber=x,a.o(E,z,fj(d),c,d),m=!0,h.g=D)},function(E){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.m&&a.m(E,c,b)},{minBytesForProgressEvents:a.i.minBytesForProgressEvents});if(!q)return B;var C=c.retryParameters.connectionTimeout;C&&(t=new Ge(function(){v=!0;B.abort()}),t.ka(C/1E3));var I=c.retryParameters.stallTimeout;I&&(u=new Ge(function(){v=!0;B.abort()}));
return B}).Bb(function(x){t&&t.stop();u&&u.stop();x.timeMs==void 0&&(x.timeMs=Date.now()-y);var B=x.headers["common-access-token"];if(B){var C=new Db(x.uri);a.l.set(C.mb,B)}B={response:x,xi:m};!w&&a.m&&a.m(x.headers,c,b);a.B&&a.B(c,x);return B},function(x){t&&t.stop();u&&u.stop();if(a.C){var B=null,C=0;x instanceof T&&(B=x,x.code==1001&&(C=x.data[1]));a.C(c,B,C,v)}if(a.j)return Mi();v&&(x=new T(1,1,1003,c.uris[f],b));if(x instanceof T){if(x.code==7001)throw x;if(x.code==1010)throw g;if(x.severity==
1){B=(new Map).set("error",x);B=new Qi("retry",B);B.cancelable=!0;a.dispatchEvent(B);if(B.defaultPrevented)throw x;f=(f+1)%c.uris.length;return cj(a,b,c,d,e,f,x,h)}}throw x;})}
function dj(a,b,c,d){var e=Ni(void 0);a=r(a.h);for(var f=a.next(),g={};!f.done;g={Qg:void 0},f=a.next())g.Qg=f.value,e=e.Bb(function(h){return function(){var k=c.response;k.data&&(k.data=Wb(k.data));return(0,h.Qg)(b,k,d)}}(g));return e.Bb(function(){return c},function(h){var k=2;if(h instanceof T){if(h.code==7001)throw h;k=h.severity}throw new T(k,1,1007,h);})}function fj(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.wc)return!1}return!0}S("shaka.net.NetworkingEngine",Ui);
Ui.prototype.request=Ui.prototype.request;Ui.prototype.destroy=Ui.prototype.destroy;Ui.makeRequest=Zi;Ui.defaultRetryParameters=function(){return Hi()};Ui.prototype.clearCommonAccessTokenMap=Ui.prototype.gg;Ui.prototype.clearAllResponseFilters=Ui.prototype.Ah;Ui.prototype.unregisterResponseFilter=Ui.prototype.nj;Ui.prototype.registerResponseFilter=Ui.prototype.Wi;Ui.prototype.clearAllRequestFilters=Ui.prototype.yh;Ui.prototype.unregisterRequestFilter=Ui.prototype.mj;
Ui.prototype.registerRequestFilter=Ui.prototype.Vi;Ui.unregisterScheme=function(a){Xi.delete(a)};Ui.registerScheme=Vi;Ui.prototype.configure=Ui.prototype.configure;function $i(){this.g=0}Ui.NumBytesRemainingClass=$i;function aj(a,b,c){Ki.call(this,a,b);this.h=c}na(aj,Ki);Ui.PendingRequest=aj;var ej=1;Ui.RequestType={MANIFEST:0,SEGMENT:ej,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9};
Ui.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var Wi=3;Ui.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Wi};var Xi=new Map;function gj(a){this.g=!1;this.h=new Ji;this.i=a}gj.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 hj(a,b){if(a.g){if(b instanceof T&&b.code==7003)throw b;throw new T(2,7,7003,b);}};function ij(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function jj(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function kj(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function lj(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function mj(a){var b=this;this.h=[];this.g=[];this.data=[];(new Mg).box("moov",Rg).box("moof",Rg).O("pssh",function(c){if(!(c.version>1)){var d=Vb(c.reader.h,-12,c.size);b.data.push(d);d=c.reader.Ab(16,!1);b.h.push(rc(d));if(c.version>0){d=c.reader.R();for(var e=0;e<d;e++){var f=c.reader.Ab(16,!1);f=rc(f);b.g.push(f)}}}}).parse(a)};function nj(a){var b=this;this.D=a;this.i=this.B=null;this.P=!1;this.J=0;this.g=null;this.o=new mb;this.j=new Map;this.V=[];this.C=new Map;this.K=!1;this.l=new Ji;this.h=null;this.A=function(c){c.severity==2&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.na=new Map;this.L=new Ge(function(){return oj(b)});this.ia=!1;this.N=[];this.Y=!1;this.F=new Ge(function(){pj(b)});this.l.catch(function(){});this.m=new gj(function(){return qj(b)});this.ea=!1;this.H=this.I=null;this.S=function(){return!1}}p=nj.prototype;
p.destroy=function(){return this.m.destroy()};function qj(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.l.reject(),a.F.stop(),a.F=null,a.L.stop(),a.L=null,H(b,rj(a),2);case 2:if(!a.i){b.u(3);break}va(b,4);return H(b,a.i.setMediaKeys(null),6);case 6:xa(b,5);break;case 4:za(b);case 5:a.i=null;case 3:a.g=null,a.B=null,a.C=new Map,a.h=null,a.A=function(){},a.D=null,a.ea=!1,a.I=null,K(b)}})}p.configure=function(a,b){this.h=a;b&&(this.S=b);this.F&&this.P&&this.g&&this.F.Ea(this.h.updateExpirationTime)};
function sj(a,b,c,d){d=d===void 0?!0:d;a.C=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next())a.C.set(e.value,{initData:null,initDataType:null});c=r(a.h.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.C.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.ia=a.C.size>0;return tj(a,b,d)}
function tj(a,b,c){var d,e,f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C;return L(function(I){if(I.g==1){uj(a.h.clearKeys,b);d=b.some(function(E){return E.video&&E.video.drmInfos.length||E.audio&&E.audio.drmInfos.length?!0:!1});e=kj(a.h.servers);f=kj(a.h.advanced||{});!d&&c&&vj(b,e);g=new WeakSet;h=r(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=wj(l),n=r(m),q=n.next();!q.done;q=n.next())t=q.value,g.has(t)||(g.add(t),xj(t,e,f,a.h.keySystemsMapping));u=function(E,z){var D=[];E=r(E);for(var G=E.next();!G.done;G=
E.next()){G=G.value;var F=G[z]||f.has(G.keySystem)&&f.get(G.keySystem)[z]||"",J;if(J=F=="")J=(J=G.keySystem)?!!J.match(/^com\.widevine\.alpha/):!1;J&&(z=="audioRobustness"?F=[a.h.defaultAudioRobustnessForWidevine]:z=="videoRobustness"&&(F=[a.h.defaultVideoRobustnessForWidevine]));if(typeof F==="string")D.push(G);else if(Array.isArray(F))for(F.length===0&&(F=[""]),F=r(F),J=F.next();!J.done;J=F.next()){var M={};D.push(Object.assign({},G,(M[z]=J.value,M)))}}return D};v=new WeakSet;w=r(b);for(y=w.next();!y.done;y=
w.next())x=y.value,x.video&&!v.has(x.video)&&(x.video.drmInfos=u(x.video.drmInfos,"videoRobustness"),x.video.drmInfos=u(x.video.drmInfos,"audioRobustness"),v.add(x.video)),x.audio&&!v.has(x.audio)&&(x.audio.drmInfos=u(x.audio.drmInfos,"videoRobustness"),x.audio.drmInfos=u(x.audio.drmInfos,"audioRobustness"),v.add(x.audio));return H(I,df(b,a.ia,a.ea,a.h.preferredKeySystems),2)}hj(a.m);B=d||e.size>0;if(!B)return a.P=!0,I.return(Promise.resolve());C=yj(a,b);return I.return(d?C:C.catch(function(){}))})}
function zj(a){var b;return L(function(c){switch(c.g){case 1:if(a.i.mediaKeys)return c.return();if(!a.I){c.u(2);break}return H(c,a.I,3);case 3:return hj(a.m),c.return();case 2:return va(c,4),a.I=a.i.setMediaKeys(a.B),H(c,a.I,6);case 6:xa(c,5);break;case 4:b=za(c),a.A(new T(2,6,6003,b.message));case 5:hj(a.m),K(c)}})}function Aj(a,b){return L(function(c){if(c.g==1)return H(c,zj(a),2);Bj(a,b.initDataType,Vb(b.initData));K(c)})}
p.Xb=function(a){var b=this,c,d;return L(function(e){if(e.g==1){if(b.i===a)return e.return();if(!b.B)return b.o.Pa(a,"encrypted",function(){b.A(new T(2,6,6010))}),e.return();b.i=a;b.h.delayLicenseRequestUntilPlayed&&b.o.Pa(b.i,"play",function(){for(var f=r(b.N),g=f.next();!g.done;g=f.next())Cj(b,g.value);b.Y=!0;b.N=[]});b.i.remote?(b.o.G(b.i.remote,"connect",function(){return rj(b)}),b.o.G(b.i.remote,"connecting",function(){return rj(b)}),b.o.G(b.i.remote,"disconnect",function(){return rj(b)})):"webkitCurrentPlaybackTargetIsWireless"in
b.i&&b.o.G(b.i,"webkitcurrentplaybacktargetiswirelesschanged",function(){return rj(b)});b.H=b.g?b.g.initData.find(function(f){return f.initData.length>0})||null:null;c=b.g.keySystem;return(d=sb().xf(c))||!b.H&&b.g.keySystem==="com.apple.fps"&&!b.C.size?e.u(2):H(e,zj(b),2)}Dj(b).catch(function(){});!d&&(b.H||b.C.size||b.h.parseInbandPsshEnabled)||b.o.G(b.i,"encrypted",function(f){return Aj(b,f)});K(e)})};
function Ej(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=Zi([a.g.serverCertificateUri],a.h.retryParameters);va(g,3);c=a.D.vc.request(5,b,{isPreload:a.S()});return H(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Vb(d.data);xa(g,4);break;case 3:throw e=za(g),new T(2,6,6017,e);case 4:if(a.m.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
va(g,6);return H(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:xa(g,0);break;case 6:throw f=za(g),new T(2,6,6004,f.message);}})}
function Dj(a){var b,c,d,e,f;return L(function(g){if(g.g==1){if(!a.C.size)return g.u(2);a.C.forEach(function(h,k){Fj(a,k,h)});return H(g,a.l,3)}if(g.g!=2){b=a.g&&a.g.keyIds||new Set([]);if(b.size>0&&Gj(a))return g.return(a.l);a.K=!1;a.l=new Ji;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=r(c);for(e=d.next();!e.done;e=d.next())f=e.value,Bj(a,f.initDataType,f.initData);Hj(a)&&a.l.resolve();return g.return(a.l)})}
function Bj(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.j.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Ub(c,e.value.initData))return;var f=!1;a.C.forEach(function(g){!f&&Ub(c,g.initData)&&(f=!0)});if(f)return}a.K=!0;a.j.size>0&&Hj(a)&&(a.l.resolve(),a.K=!1,a.l=new Ji,a.l.catch(function(){}));Ij(a,b,c,a.g.sessionType)}}
p.mf=function(){var a=this,b=this.j.keys();b=ij(b,function(c){var d=a.j.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.nf=function(){var a=Infinity,b=this.j.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};function Jj(a){return a.J?a.J:NaN}p.Xd=function(){return lj(this.na)};
function yj(a,b){var c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:c=new Map;d=Kj(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new T(2,6,6020);throw new T(2,6,6001);}hj(a.m);va(l,2);d.getConfiguration();var m=e=a.h.keySystemsMapping[d.keySystem]||d.keySystem,n=c.get(e),q=[],t=[],u=[],v=[],w=[],y=new Set,x=new Set;Lj(n,q,t,v,u,w,y,x);var B=a.ia?"persistent-license":"temporary";m={keySystem:m,encryptionScheme:q[0],licenseServerUri:t[0],distinctiveIdentifierRequired:n[0].distinctiveIdentifierRequired,
persistentStateRequired:n[0].persistentStateRequired,sessionType:n[0].sessionType||B,audioRobustness:n[0].audioRobustness||"",videoRobustness:n[0].videoRobustness||"",serverCertificate:v[0],serverCertificateUri:u[0],initData:w,keyIds:y};x.size>0&&(m.keySystemUris=x);n=r(n);for(x=n.next();!x.done;x=n.next())x=x.value,x.distinctiveIdentifierRequired&&(m.distinctiveIdentifierRequired=x.distinctiveIdentifierRequired),x.persistentStateRequired&&(m.persistentStateRequired=x.persistentStateRequired);a.g=
m;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return H(l,d.createMediaKeys(),4);case 4:f=l.h;hj(a.m);a.B=f;if(!(a.h.minHdcpVersion!=""&&"getStatusForPolicy"in a.B)){l.u(5);break}va(l,6);return H(l,a.B.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),8);case 8:g=l.h;if(g!="usable")throw new T(2,6,6018);hj(a.m);xa(l,5,2);break;case 6:h=za(l,2);if(h instanceof T)throw h;throw new T(2,6,6019,h.message);case 5:return a.P=!0,a.F.Ea(a.h.updateExpirationTime),H(l,Ej(a),9);case 9:hj(a.m);
xa(l,0);break;case 2:k=za(l);hj(a.m,k);a.g=null;if(k instanceof T)throw k;throw new T(2,6,6002,k.message);}})}
function Kj(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){e=r(wj(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(c.size==1&&c.has(""))throw new T(2,6,6E3);d=a.h.preferredKeySystems;d.length||(e=kj(a.h.servers),e.size==1&&(d=Array.from(e.keys())));e=r(d);var g=e.next();for(f={};!g.done;f={Mg:void 0},g=e.next()){f.Mg=g.value;g=r(b);for(var h=g.next();!h.done;h=g.next())if(h=h.value.decodingInfos.find(function(n){return function(q){return q.supported&&
q.keySystemAccess!=null&&q.keySystemAccess.keySystem==n.Mg}}(f)))return h.keySystemAccess}e=r([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=r(b),h=g.next();!h.done;h=g.next()){h=r(h.value.decodingInfos);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.supported&&k.keySystemAccess){var l=k.keySystemAccess.keySystem;if(!d.includes(l)){var m=c.get(l);!m&&a.h.keySystemsMapping[l]&&(m=c.get(a.h.keySystemsMapping[l]));l=r(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
f)return k.keySystemAccess}}}return null}function Mj(a){Hj(a)&&a.l.resolve()}function Nj(a,b){(new Ge(function(){b.loaded=!0;Mj(a)})).ka(Oj)}
function Fj(a,b,c){var d,e,f,g,h,k,l;L(function(m){switch(m.g){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.A(e),m.return(Promise.reject(e))}a.o.G(d,"message",function(n){a.i&&a.h.delayLicenseRequestUntilPlayed&&a.i.paused&&!a.Y?a.N.push(n):Cj(a,n)});a.o.G(d,"keystatuseschange",function(n){return Pj(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,zf:Infinity,Kb:null,type:"persistent-license"};a.j.set(d,f);va(m,2);return H(m,
d.load(b),4);case 4:return g=m.h,hj(a.m),g||(a.j.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.A(new T(h,6,6013)),f.loaded=!0),Nj(a,f),Mj(a),m.return(d);case 2:k=za(m),hj(a.m,k),a.j.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.A(new T(l,6,6005,k.message)),f.loaded=!0,Mj(a);case 3:return m.return(Promise.resolve())}})}
function Ij(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.A(new T(2,6,6005,f.message));return}a.o.G(e,"message",function(f){a.i&&a.h.delayLicenseRequestUntilPlayed&&a.i.paused&&!a.Y?a.N.push(f):Cj(a,f)});a.o.G(e,"keystatuseschange",function(f){return Pj(a,f)});a.j.set(e,{initData:c,initDataType:b,loaded:!1,zf:Infinity,Kb: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.A(b);return}a.h.logLicenseExchange&&oc(c);e.generateRequest(b,c).catch(function(f){if(!a.m.g){a.j.delete(e);
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;h<0&&(h+=4294967296);h="0x"+h.toString(16)}a.A(new T(2,6,6006,f.message,f,h))}})}function Qj(a){return L(function(b){return b.g==1?a.K?H(b,a.l,3):b.u(0):H(b,Promise.all(a.V.map(function(c){return c.promise})),0)})}
function Cj(a,b){var c,d,e,f,g,h,k,l,m,n,q,t,u,v,w,y;L(function(x){switch(x.g){case 1:c=b.target;a.h.logLicenseExchange&&oc(b.message);d=a.j.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];b.messageType=="individualization-request"&&f&&f.individualizationServer&&(e=f.individualizationServer);g=Zi([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&
f.headers)for(h in f.headers)g.headers[h]=f.headers[h];if(a.g.keySystem==="org.w3.clearkey"){var B=g,C=a.g;try{var I=hc(B.body);if(I){var E=JSON.parse(I);E.type||(E.type=C.sessionType,B.body=ic(JSON.stringify(E)))}}catch(z){}}if(ri(a.g.keySystem))if(B=dc(g.body,!0,!0),B.includes("PlayReadyKeyMessage")){B=id(B,"PlayReadyKeyMessage");C=pd(B,"HttpHeader");C=r(C);for(I=C.next();!I.done;I=C.next())E=I.value,I=pd(E,"name")[0],E=pd(E,"value")[0],g.headers[od(I)]=od(E);B=pd(B,"Challenge")[0];g.body=pc(od(B))}else g.headers["Content-Type"]=
"text/xml; charset=utf-8";k=Date.now();va(x,2);m=a.D.vc.request(2,g,{isPreload:a.S()});a.V.push(m);return H(x,m.promise,4);case 4:l=x.h;ib(a.V,m);xa(x,3);break;case 2:n=za(x);if(a.m.g)return x.return();q={sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType};t=new T(2,6,6007,n,q);a.j.size==1?(a.A(t),d&&d.Kb&&d.Kb.reject(t)):(d&&d.Kb&&d.Kb.reject(t),a.j.delete(c),Hj(a)&&(a.l.resolve(),a.L.ka(.1)));return x.return();case 3:if(a.m.g)return x.return();a.J+=(Date.now()-
k)/1E3;a.h.logLicenseExchange&&oc(l.data);va(x,5);return H(x,c.update(l.data),7);case 7:xa(x,6);break;case 5:return v=(u=za(x))&&u.message||String(u),w=new T(2,6,6008,v),a.A(w),d&&d.Kb&&d.Kb.reject(w),x.return();case 6:if(a.m.g)return x.return();y=new Qi("drmsessionupdate");a.D.onEvent(y);d&&(d.Kb&&d.Kb.resolve(),Nj(a,d));K(x)}})}
function Pj(a,b){b=b.target;var c=a.j.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if(typeof g=="string"){var h=g;g=f;f=h}h=sb();if(ri(a.g.keySystem)&&g.byteLength==16&&h.If()){h=Zb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}f!="status-pending"&&(c.loaded=!0);f=="expired"&&(d=!0);g=rc(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(e<0||d&&e<1E3)&&c&&!c.Kb&&(a.j.delete(b),Rj(b));Hj(a)&&(a.l.resolve(),
a.L.ka(Sj))}function oj(a){var b=a.aa,c=a.na;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return d=="expired"})&&a.A(new T(2,6,6014));a.D.Jg(lj(c))}
function Tj(){var a,b,c,d,e,f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C,I,E,z,D,G,F,J,M,O,R,P;return L(function(N){if(N.g==1){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&
window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b={};c=r(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return N.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
{contentType:'video/webm; codecs="vp8"'}];m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};q=[null,"cenc","cbcs"];t=new Map;u=sb();v=function(Q,Z,sa){var da,Oa,Ia,wa,Pa,ha,Qa,qa,La,Da,Ra,Sa,Ya;return L(function(ya){switch(ya.g){case 1:return va(ya,2),H(ya,Z.createMediaKeys(),5);case 5:da=ya.h;case 4:xa(ya,3);break;case 2:return za(ya),ya.return();case 3:Ia=(Oa=Z.getConfiguration().sessionTypes)?
Oa.includes("persistent-license"):!1;u.Eg()&&(Ia=!1);wa=Z.getConfiguration().videoCapabilities;Pa=Z.getConfiguration().audioCapabilities;ha={persistentState:Ia,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};t.get(Q)?ha=t.get(Q):t.set(Q,ha);(Qa=wa[0].encryptionScheme)&&!ha.encryptionSchemes.includes(Qa)&&ha.encryptionSchemes.push(Qa);(qa=wa[0].robustness)&&!ha.videoRobustnessLevels.includes(qa)&&ha.videoRobustnessLevels.push(qa);(La=Pa[0].robustness)&&!ha.audioRobustnessLevels.includes(La)&&
ha.audioRobustnessLevels.push(La);if(!(sa&&"getStatusForPolicy"in da)){ya.u(0);break}Da=r(f);Ra=Da.next();case 7:if(Ra.done){ya.u(0);break}Sa=Ra.value;if(ha.minHdcpVersions.includes(Sa)){ya.u(8);break}return H(ya,da.getStatusForPolicy({minHdcpVersion:Sa}),10);case 10:if(Ya=ya.h,Ya=="usable")ha.minHdcpVersions.includes(Sa)||ha.minHdcpVersions.push(Sa);else{ya.u(0);break}case 8:Ra=Da.next(),ya.u(7)}})};w=function(Q,Z,sa,da,Oa){Oa=Oa===void 0?!1:Oa;var Ia,wa,Pa,ha,Qa,qa,La,Da,Ra,Sa,Ya;return L(function(ya){switch(ya.g){case 1:va(ya,
2);Ia=fd(n);wa=r(Ia.videoCapabilities);for(Pa=wa.next();!Pa.done;Pa=wa.next())ha=Pa.value,ha.encryptionScheme=Z,ha.robustness=sa;Qa=r(Ia.audioCapabilities);for(qa=Qa.next();!qa.done;qa=Qa.next())La=qa.value,La.encryptionScheme=Z,La.robustness=da;Da=fd(Ia);Da.persistentState="required";Da.sessionTypes=["persistent-license"];Ra=[Da,Ia];Ya=sb();return Ya.Ma()=="MOBILE"?H(ya,Ke(5,navigator.requestMediaKeySystemAccess(Q,Ra)),7):H(ya,navigator.requestMediaKeySystemAccess(Q,Ra),6);case 6:Sa=ya.h;ya.u(5);
break;case 7:Sa=ya.h;case 5:return H(ya,v(Q,Sa,Oa),8);case 8:xa(ya,0);break;case 2:za(ya),K(ya)}})};y=r(a);for(x=y.next();!x.done;x=y.next())B=x.value,t.set(B,null);C=function(Q){return sb().ya()==="WEBKIT"&&Q==="org.w3.clearkey"?!1:!0};I=[];E=r(a);for(z=E.next();!z.done;z=E.next())if(D=z.value,C(D)){G=!0;F=r(q);for(J=F.next();!J.done;J=F.next())M=J.value,I.push(w(D,M,"","",G)),G=!1;O=r(k[D]||[]);for(R=O.next();!R.done;R=O.next())P=R.value,I.push(w(D,null,P,"")),I.push(w(D,null,"",P))}return H(N,
Promise.all(I),2)}return N.return(lj(t))})}function Rj(a){return L(function(b){if(b.g==1)return va(b,2),H(b,Ke(Uj,Promise.all([a.close().catch(function(){}),a.closed])),4);if(b.g!=2)return xa(b,0);za(b);K(b)})}
function rj(a){var b;return L(function(c){b=Array.from(a.j.entries());a.j.clear();return H(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value;var f=d.next().value;return L(function(g){if(g.g==1)return va(g,2),a.C.has(e.sessionId)||f.type!=="persistent-license"||a.h.persistentSessionOnlinePlayback?H(g,Rj(e),5):H(g,e.remove(),5);if(g.g!=2)return xa(g,0);za(g);K(g)})})),0)})}function wj(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function pj(a){a.j.forEach(function(b,c){var d=b.zf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.zf=e)})}function Hj(a){a=a.j.values();return jj(a,function(b){return b.loaded})}function Gj(a){for(var b=r(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if(a.aa.get(c.value)!=="usable")return!1;return!0}
function vj(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=r(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 Lj(a,b,c,d,e,f,g,h){var k=[];a=r(a);for(var l=a.next(),m={};!l.done;m={Ca:void 0},l=a.next()){m.Ca=l.value;b.includes(m.Ca.encryptionScheme)||b.push(m.Ca.encryptionScheme);m.Ca.keySystem=="org.w3.clearkey"&&m.Ca.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ca.licenseServerUri)||k.push(m.Ca.licenseServerUri):c.includes(m.Ca.licenseServerUri)||c.push(m.Ca.licenseServerUri);e.includes(m.Ca.serverCertificateUri)||e.push(m.Ca.serverCertificateUri);m.Ca.serverCertificate&&
(d.some(function(t){return function(u){return Ub(u,t.Ca.serverCertificate)}}(m))||d.push(m.Ca.serverCertificate));if(m.Ca.initData){l=r(m.Ca.initData);for(var n=l.next(),q={};!n.done;q={rf:void 0},n=l.next())q.rf=n.value,f.some(function(t){return function(u){var v=t.rf;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&Ub(u.initData,v.initData)}}(q))||f.push(q.rf)}if(m.Ca.keyIds)for(l=r(m.Ca.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ca.keySystemUris&&h)for(m=r(m.Ca.keySystemUris),
l=m.next();!l.done;l=m.next())h.add(l.value)}if(k.length==1)c.push(k[0]);else if(k.length>0){b=[];k=r(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,A(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
function xj(a,b,c,d){var e=a.keySystem;if(e&&(e!="org.w3.clearkey"||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.serverCertificate||(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=
c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&e=="com.microsoft.playready"&&(a.keySystem="com.chromecast.playready")}}function uj(a,b){a=kj(a);if(a.size!=0){a=wc(a);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var Uj=1,Oj=5,Sj=.5;function Vj(){}function Wj(a){a=hc(a);return(new Db(a)).mb}function Xj(a,b,c){function d(h){Zb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Vb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;typeof b=="string"?e=jc(b,!0):e=b;a=hc(a);a=jc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Yj(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=hc(a).split("skd://").pop();return Xj(a,c,b)}
function Zj(a,b){a===2&&(a=b.drmInfo)&&si(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.drm.FairPlay",Vj);
Vj.commonFairPlayResponse=function(a,b){if(a===2&&(a=b.originalRequest.drmInfo)&&si(a.keySystem)){try{var c=cc(b.data)}catch(e){return}a=!1;c=c.trim();c.substr(0,5)==="<ckc>"&&c.substr(-6)==="</ckc>"&&(c=c.slice(5,-6),a=!0);if(!a)try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Wb(pc(c)))}};Vj.muxFairPlayRequest=function(a,b){Zj(a,b)};
Vj.expressplayFairPlayRequest=function(a,b){if(a===2){var c=b.drmInfo;c&&si(c.keySystem)&&Zj(a,b)}};Vj.conaxFairPlayRequest=function(a,b){Zj(a,b)};Vj.ezdrmFairPlayRequest=function(a,b){Zj(a,b)};Vj.verimatrixFairPlayRequest=function(a,b){a===2&&(a=b.drmInfo)&&si(a.keySystem)&&(a=Vb(b.body),a=oc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=ic("spc="+a))};Vj.muxInitDataTransform=function(a,b,c){return Yj(a,b,c)};
Vj.expressplayInitDataTransform=function(a,b,c){return Yj(a,b,c)};Vj.conaxInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=hc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(c.length*2);d=Yb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Xj(a,d,b)};Vj.ezdrmInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=hc(a).split(";").pop();return Xj(a,c,b)};
Vj.verimatrixInitDataTransform=function(a,b,c){return Yj(a,b,c)};Vj.initDataTransform=Xj;Vj.defaultGetContentId=Wj;Vj.isFairPlaySupported=function(){var a;return L(function(b){if(b.g==1)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},va(b,2),H(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(b.g!=2)return b.return(!0);za(b);return b.return(!1)})};function ak(a){var b=0,c=Zb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+4+2;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if((e&1)!=0||e+a>c.byteLength){c=[];break a}var f=Vb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function bk(a){a=pc(od(a));a=ak(a).filter(function(b){return b.type===ck})[0];if(!a)return null;a=dc(a.value,!0);return(a=id(a,"WRMHEADER"))?a:null}var ck=1;function dk(a,b,c){this.type=a;this.W=b;this.segments=c||null}function ek(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=d===void 0?null:d}ek.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);d.length>0&&(c+=":"+d.join(","));return c};
function fk(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function gk(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function W(a,b,c){return(a=gk(a,b))?a.value:c||null}function hk(a,b){a=gk(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function ik(a,b,c){c=c===void 0?[]:c;this.W=b;this.h=a;this.g=c}function jk(a,b){this.name=a;this.value=b};function kk(a,b){return a.filter(function(c){return c.name==b})}function lk(a,b){return a.filter(function(c){return hk(c,"TYPE")==b})}function mk(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function nk(a,b,c){c=c===void 0?0:c;return(a=mk(a,b))?Number(a.value):c}function ok(a,b,c){return b?pk(a,[b],c):[]}function pk(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return qk(e,c)}));return tc(a,d)}
function qk(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=r(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 rk(){this.g=0}
function sk(a,b){b=cc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!tk.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!1,e=[],f=!0,g=0;g<c.length;g++){var h=c[g],k=c[g+1];if(h.startsWith("#")&&!h.startsWith("#EXT")||f)f=!1;else{h=uk(a,h);d||(vk.has(h.name)?(b=1,d=!0):h.name=="EXT-X-STREAM-INF"||h.name=="EXT-X-MEDIA"?d=!0:wk.has(h.name)&&(b=1,d=!0));if(wk.has(h.name)){if(b!=1)throw new T(2,4,4017);f=a;a=Array(Math.max(100,Math.floor((c.length-g)/2)));d=0;h=[];var l=[];
for(k=null;g<c.length;g++){var m=c[g];if(m.startsWith("#EXT"))m=uk(f,m),vk.has(m.name)?e.push(m):m.name=="EXT-X-MAP"?k=m:m.name=="EXT-X-PART"?l.push(m):m.name=="EXT-X-PRELOAD-HINT"?W(m,"TYPE")=="PART"?l.push(m):W(m,"TYPE")=="MAP"&&(m.name="EXT-X-MAP",k=m):h.push(m);else if(!m.startsWith("#")||m.startsWith("#EXT"))m=m.trim(),k&&h.push(k),h=new ik(m,h,l),d<a.length?a[d++]=h:(a.push(h),d++),h=[],l=[]}l.length&&(k&&h.push(k),c=new ik("",h,l),d<a.length?a[d++]=c:(a.push(c),d++));return new dk(b,e,d<a.length?
a.slice(0,d):a)}e.push(h);h.name=="EXT-X-STREAM-INF"&&(h.attributes.push(new jk("URI",k)),f=!0)}}return new dk(b,e)}function uk(a,b){a=a.g++;var c=b.match(xk);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Xc(d);var f;yk.lastIndex=0;(f=Zc(d,yk))&&(e=f[1]);zk.lastIndex=0;for(f=Zc(d,zk);f;)c.push(new jk(f[1],f[2]||f[3])),Yc(d),f=Zc(d,zk)}return new ek(a,b,c,e)}
var xk=/^#(EXT[^:]*)(?::(.*))?$/,tk=/^#EXTM3U($|[ \t\n])/m,yk=/^([^,=]+)(?:,|$)/g,zk=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,vk=new Set("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(" ")),wk=new Set("EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" "));function Ak(a,b,c,d,e,f,g,h){this.M=a;this.startByte=b;this.endByte=c;this.Nc=d===void 0?null:d;this.timescale=e===void 0?null:e;this.h=f===void 0?null:f;this.aesKey=g===void 0?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=h===void 0?!1:h}Ak.prototype.bc=function(){return this.startByte};Ak.prototype.ac=function(){return this.endByte};Ak.prototype.qd=function(a){this.h=a};Ak.prototype.sc=function(){return this.h};
function Bk(a,b){return a===b?!0:a&&b?a.bc()==b.bc()&&a.ac()==b.ac()&&kb(a.M().sort(),b.M().sort())&&Ub(a.sc(),b.sc()):a==b}S("shaka.media.InitSegmentReference",Ak);Ak.prototype.getEndByte=Ak.prototype.ac;Ak.prototype.getStartByte=Ak.prototype.bc;
function Ck(a,b,c,d,e,f,g,h,k,l,m,n,q,t,u,v){l=l===void 0?[]:l;t=t===void 0?Dk:t;this.startTime=a;this.l=this.endTime=b;this.H=c;this.startByte=d;this.endByte=e;this.$=f;this.m=g;this.F=h;this.D=k;this.g=l;this.tilesLayout=m===void 0?"":m;this.C=n===void 0?null:n;this.h=q===void 0?null:q;this.status=t;this.preload=!1;this.j=!0;this.A=!1;this.aesKey=u===void 0?null:u;this.thumbnailSprite=null;this.i=-1;this.o=v===void 0?!1:v;this.kd=this.wc=!1;a=r(this.g);for(b=a.next();!b.done;b=a.next())b.value.Cg();
this.o&&this.g.length&&this.g[this.g.length-1].Ag();this.B=this.bandwidth=this.mimeType=this.codecs=null;this.I=!1}p=Ck.prototype;p.M=function(){return this.H()};p.getStartTime=function(){return this.startTime};p.Qh=function(){return this.endTime};p.bc=function(){return this.startByte};p.ac=function(){return this.endByte};
function Ek(a){if(a.endByte)return a.endByte+1-a.startByte;if(a.bandwidth){var b=a.bandwidth*(a.endTime-a.startTime);if(!isNaN(b)&&b>0)return b}if(a.g.length>0&&a.o)for(a=r(a.g),a=a.next();!a.done;a=a.next()){Ek(a.value);break}return null}p.si=function(){return this.tilesLayout};p.ri=function(){return this.C};p.cc=function(){return this.status};p.Ji=function(){this.status=Fk};p.vf=function(){this.preload=!0};p.isPreload=function(){return this.preload};p.Bg=function(){this.j=!1};p.Ci=function(){return this.j};
p.Cg=function(){this.wc=!0};p.Ei=function(){return this.wc};p.Ag=function(){this.kd=!0};p.Di=function(){return this.kd};p.zg=function(){this.A=!0};p.zi=function(){return this.A};p.ah=function(a){this.thumbnailSprite=a};p.oi=function(){return this.thumbnailSprite};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.l+=a;for(var b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.l+=a};
p.Qf=function(a){this.h==null?bb("Sync attempted without sync time!"):(a=this.h-a-this.startTime,Math.abs(a)>=.001&&this.offset(a))};p.qd=function(a,b){this.B=a;this.I=b===void 0?!1:b};p.sc=function(a){var b=this.B;(a===void 0||a)&&this.I&&(this.B=null);return b};S("shaka.media.SegmentReference",Ck);Ck.prototype.getSegmentData=Ck.prototype.sc;Ck.prototype.setSegmentData=Ck.prototype.qd;Ck.prototype.syncAgainst=Ck.prototype.Qf;Ck.prototype.offset=Ck.prototype.offset;
Ck.prototype.getThumbnailSprite=Ck.prototype.oi;Ck.prototype.setThumbnailSprite=Ck.prototype.ah;Ck.prototype.hasByterangeOptimization=Ck.prototype.zi;Ck.prototype.markAsByterangeOptimization=Ck.prototype.zg;Ck.prototype.isLastPartial=Ck.prototype.Di;Ck.prototype.markAsLastPartial=Ck.prototype.Ag;Ck.prototype.isPartial=Ck.prototype.Ei;Ck.prototype.markAsPartial=Ck.prototype.Cg;Ck.prototype.isIndependent=Ck.prototype.Ci;Ck.prototype.markAsNonIndependent=Ck.prototype.Bg;Ck.prototype.isPreload=Ck.prototype.isPreload;
Ck.prototype.markAsPreload=Ck.prototype.vf;Ck.prototype.markAsUnavailable=Ck.prototype.Ji;Ck.prototype.getStatus=Ck.prototype.cc;Ck.prototype.getTileDuration=Ck.prototype.ri;Ck.prototype.getTilesLayout=Ck.prototype.si;Ck.prototype.getEndByte=Ck.prototype.ac;Ck.prototype.getStartByte=Ck.prototype.bc;Ck.prototype.getEndTime=Ck.prototype.Qh;Ck.prototype.getStartTime=Ck.prototype.getStartTime;Ck.prototype.getUris=Ck.prototype.M;var Dk=0,Fk=1;Ck.Status={sj:Dk,Aj:Fk,xj:2};function Gk(){}function Hk(a,b){Ik.set(a,b)}function Jk(){var a={};sb();if(hi())for(var b=r(Ik.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=hi()?Ik.has(c):ci().canPlayType(c)!="";return a}function Kk(a,b){if(b){var c=Ik.get(b.toLowerCase());if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Gk);
Gk.unregisterParserByMime=function(a){Ik.delete(a)};Gk.registerParserByMime=Hk;Gk.registerParserByExtension=function(){yb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Gk.AccessibilityPurpose={Bj:"visually impaired",tj:"hard of hearing",zj:"spoken subtitles"};var Ik=new Map;function X(a,b,c){this.i=a;this.D=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.J=!1;this.I=0;this.F=c===void 0?!0:c;this.H=0;this.A=!1;this.m=a}p=X.prototype;p.getDuration=function(){return this.l};p.Yh=function(){return this.h};p.Yg=function(a){this.i=a};p.hc=function(a){this.l=a};p.gi=function(){return this.i};p.fj=function(a){this.B=a};p.xe=function(a){a&&!this.C&&(this.J=!0);this.C=a};p.Zg=function(a){this.o=a};p.Zd=function(){return this.o};
p.Wg=function(a){this.D=a};p.Ph=function(){return this.D};p.Ni=function(a,b){if(a.length!=0){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(a.length!=0){var d=a[a.length-1].end+b;this.me(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);this.i!=null&&this.F&&!this.A&&(this.i=c-this.g-this.h)}}};
p.Ig=function(a){if(a.length!=0){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=r(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.me(b);this.g=Math.max(this.g,c);this.i!=null&&this.F&&!this.A&&(this.i=d-this.g-this.h)}};p.Mi=function(a,b){this.me(a);b==Infinity||this.ba()||(this.g=Math.max(this.g,b))};p.Zh=function(){return this.g};p.xg=function(){this.A=!0};
p.Fi=function(){return this.A};p.Xg=function(a){this.m=a};p.Uh=function(){return this.m};p.me=function(a){this.j==null?this.j=a:this.J||(this.j=Math.min(this.j,a))};p.Li=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){this.j!=null&&(this.j+=a);this.g!=null&&(this.g+=a)};p.ba=function(){return this.l==Infinity&&!this.C};p.Mc=function(){return this.l!=Infinity&&!this.C};p.$d=function(){return Math.max(this.I,this.ed()-this.o)};p.bh=function(a){this.I=a};
p.ed=function(){return this.ba()||this.Mc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.H,this.l):this.g?Math.min(this.g,this.l):this.l};p.dd=function(a){var b=Math.max(this.j,this.I);return this.o==Infinity?Math.ceil(b*1E3)/1E3:Math.max(b,Math.min(this.ed()-this.o+a,this.ob()))};p.Pb=function(){return this.dd(0)};p.ob=function(){return Math.max(0,this.ed()-(this.ba()||this.Mc()?this.D:0))};p.pj=function(){return this.i==null||this.g!=null&&this.F?!1:!0};
p.ej=function(a){this.H=a};p.Kh=function(){return this.H};S("shaka.media.PresentationTimeline",X);X.prototype.getAvailabilityTimeOffset=X.prototype.Kh;X.prototype.setAvailabilityTimeOffset=X.prototype.ej;X.prototype.usingPresentationStartTime=X.prototype.pj;X.prototype.getSeekRangeEnd=X.prototype.ob;X.prototype.getSeekRangeStart=X.prototype.Pb;X.prototype.getSafeSeekRangeStart=X.prototype.dd;X.prototype.getSegmentAvailabilityEnd=X.prototype.ed;X.prototype.setUserSeekStart=X.prototype.bh;
X.prototype.getSegmentAvailabilityStart=X.prototype.$d;X.prototype.isInProgress=X.prototype.Mc;X.prototype.isLive=X.prototype.ba;X.prototype.offset=X.prototype.offset;X.prototype.notifyMaxSegmentDuration=X.prototype.Li;X.prototype.notifyMinSegmentStartTime=X.prototype.me;X.prototype.getInitialProgramDateTime=X.prototype.Uh;X.prototype.setInitialProgramDateTime=X.prototype.Xg;X.prototype.isStartTimeLocked=X.prototype.Fi;X.prototype.lockStartTime=X.prototype.xg;X.prototype.getMaxSegmentEndTime=X.prototype.Zh;
X.prototype.notifyPeriodDuration=X.prototype.Mi;X.prototype.notifySegments=X.prototype.Ig;X.prototype.notifyTimeRange=X.prototype.Ni;X.prototype.getDelay=X.prototype.Ph;X.prototype.setDelay=X.prototype.Wg;X.prototype.getSegmentAvailabilityDuration=X.prototype.Zd;X.prototype.setSegmentAvailabilityDuration=X.prototype.Zg;X.prototype.setStatic=X.prototype.xe;X.prototype.setClockOffset=X.prototype.fj;X.prototype.getPresentationStartTime=X.prototype.gi;X.prototype.setDuration=X.prototype.hc;
X.prototype.setPresentationStartTime=X.prototype.Yg;X.prototype.getMaxSegmentDuration=X.prototype.Yh;X.prototype.getDuration=X.prototype.getDuration;function Lk(a){var b=this;this.j=a;this.h=new mb;this.g=new Set;this.i=(new Ge(function(){Mk(b,!1)})).lc();a.paused||this.i.Ea(.25);this.h.G(a,"playing",function(){b.i.lc().Ea(.25)});this.h.G(a,"pause",function(){b.i.stop()})}Lk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Mk(a,b){var c=a.j.currentTime;a=r(a.g);for(var d=a.next();!d.done;d=a.next())d.value.j(c,b)};function Nk(a){Ri.call(this);this.g=new Map;this.h=a}na(Nk,Ri);Nk.prototype.release=function(){this.g.clear();Ri.prototype.release.call(this)};function Ok(a,b){var c=a.g.get(b);c||(c={od:[],Re:null,contentType:b},a.g.set(b,c));return c}function Pk(a,b,c){var d=Ok(a,b.contentType);Qk(a,d);a={Nc:b,position:c};d=d.od;b=d.findIndex(function(e){return e.position>=c});b>=0?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
Nk.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Re;a:{var e=c.od;for(var f=e.length-1;f>=0;f--){var g=e[f];if(g.position<=a){e=g.Nc;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&&!kb(d.roles,e.roles);(g||h||d)&&Rk(this,a,e.contentType)&&(c.Re=e,d=new Qi("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Rk(this,a,e.contentType)&&(c.Re=e,JSON.stringify(e),c=new Qi("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function Rk(a,b,c){return(a=a.h()[c])&&a.length>0&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Qk(a,b){if((a=a.h()[b.contentType])&&a.length>0){var c=a[0].start,d=a[a.length-1].end,e=b.od;b.od=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.od=[]}
function Sk(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};a.type=="video"&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);a.type=="audio"&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
a.language);return b};function Tk(a){this.g=a;this.j=null;this.i=0;this.l=!1}p=Tk.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.l||(this.g=[],this.j&&this.j.stop(),this.j=null)};p.Ki=function(){this.l=!0};p.Db=function(a){for(var b=r(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function tf(a){return a.g[0]||null}
p.find=function(a){for(var b=this.g.length-1,c=b;c>=0;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};p.get=function(a){if(this.g.length==0)return null;a-=this.i;return a<0||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.l)for(var b=r(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
p.wf=function(a){if(!this.l&&a.length){var b=Math.round(a[0].startTime*1E3)/1E3;this.g=this.g.filter(function(c){return Math.round(c.startTime*1E3)/1E3<b});this.g.push.apply(this.g,A(a))}};p.je=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(c.g.length==0||d.endTime>c.g[0].startTime)});this.wf(a);this.sb(b)};p.sb=function(a){if(!this.l){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
p.Td=function(a,b,c){c=c===void 0?!1:c;if(!this.l){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;this.g.length!=0&&(a=this.g[this.g.length-1],b=new Ck(a.startTime,b,a.H,a.startByte,a.endByte,a.$,a.m,a.F,a.D,a.g,a.tilesLayout,a.C,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
p.Tf=function(a,b){var c=this;this.l||(this.j&&this.j.stop(),this.j=new Ge(function(){var d=b();d?c.g.push.apply(c.g,A(d)):(c.j.stop(),c.j=null)}),this.j.Ea(a))};Tk.prototype[Symbol.iterator]=function(){return this.Eb(0)};
Tk.prototype.Eb=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this.find(a);if(d==null)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&e.g.length>0)for(var g=e.g.length-1;g>=0;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.j;)g--,h=e.g[g];if(!h.j)return bb("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Uk(this,d,f,c)};function Vk(a,b,c){a=new Ck(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Tk([a])}
S("shaka.media.SegmentIndex",Tk);Tk.forSingleSegment=Vk;Tk.prototype.getIteratorForTime=Tk.prototype.Eb;Tk.prototype.updateEvery=Tk.prototype.Tf;Tk.prototype.fit=Tk.prototype.Td;Tk.prototype.evict=Tk.prototype.sb;Tk.prototype.mergeAndEvict=Tk.prototype.je;Tk.prototype.offset=Tk.prototype.offset;Tk.prototype.get=Tk.prototype.get;Tk.prototype.find=Tk.prototype.find;Tk.prototype.markImmutable=Tk.prototype.Ki;Tk.prototype.release=Tk.prototype.release;Tk.prototype.getNumEvicted=Tk.prototype.getNumEvicted;
Tk.prototype.getNumReferences=Tk.prototype.getNumReferences;function Uk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=Uk.prototype;p.Tc=function(a){this.reverse=a};p.Eh=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&a.g.length>0&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&a.g.length>0?a.g[this.g]:a};
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&a.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(a=this.i.get(this.h))&&a.g.length>0?a.g.length-1:0)):(this.h--,this.g=0):a&&a.g.length>0?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.Gf=function(){var a=this.current();if(a&&a.wc&&!a.j&&(a=this.i.get(this.h))&&a.g.length>0)for(var b=a.g[this.g];b.j&&!(this.g<=0);)this.g--,b=a.g[this.g]};
S("shaka.media.SegmentIterator",Uk);Uk.prototype.resetToLastIndependent=Uk.prototype.Gf;Uk.prototype.next=Uk.prototype.next;Uk.prototype.current=Uk.prototype.current;Uk.prototype.currentPosition=Uk.prototype.Eh;Uk.prototype.setReverse=Uk.prototype.Tc;function Wk(){Tk.call(this,[]);this.h=[]}na(Wk,Tk);p=Wk.prototype;p.clone=function(){var a=new Wk;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){this.h=[]};p.Db=function(a){for(var b=r(this.h),c=b.next();!c.done;c=b.next())c.value.Db(a)};
function Xk(a,b){a=r(a.h);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.find=function(a){for(var b=this.i,c=r(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(e!=null)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function Yk(a,b){a=r(a.h);for(var c=a.next();!c.done&&c.value.find(b)==null;c=a.next());return-1}
p.get=function(a){for(var b=this.i,c=r(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};p.offset=function(){};p.wf=function(){};p.sb=function(a){if(this.h.length){var b=this.h[0];b.sb(a);b.getNumReferences()==0&&(this.h.shift(),this.i+=b.getNumEvicted(),b.release(),this.sb(a))}};p.je=function(){};p.Td=function(){};p.Tf=function(){};S("shaka.media.MetaSegmentIndex",Wk);Wk.prototype.updateEvery=Wk.prototype.Tf;
Wk.prototype.fit=Wk.prototype.Td;Wk.prototype.mergeAndEvict=Wk.prototype.je;Wk.prototype.evict=Wk.prototype.sb;Wk.prototype.merge=Wk.prototype.wf;Wk.prototype.offset=Wk.prototype.offset;Wk.prototype.get=Wk.prototype.get;Wk.prototype.find=Wk.prototype.find;Wk.prototype.forEachTopLevelReference=Wk.prototype.Db;Wk.prototype.release=Wk.prototype.release;function Zk(a){var b=le(a),c=b.split("/")[0];a=me(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,vd:null,colorGamut:null,frameRate:null}}
function $k(a,b,c){function d(z){y=z.name;var D=z.reader;D.skip(24);var G=D.sa(),F=D.sa();D.skip(50);q=String(G);n=String(F);z.reader.Ra()&&Rg(z)}function e(z){var D=ah(z.reader);t=D.channelCount;u=D.sampleRate;f(z.name)}function f(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":h.push(z+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(z+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(z+".05.04");l=!0;break;case "vp09":h.push(z+".00.10.08");l=!0;break;case "av01":h.push(z+".0.01M.08");
l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(z);k=!0;break;case "apac":g.push("apac.31.00"),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,q=null,t=null,u=null,v=null,w=null,y;(new Mg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).O("mdhd",function(z){m=Zg(z.reader,z.version).language}).box("minf",Rg).box("stbl",Rg).O("stsd",Tg).box("mp4a",function(z){var D=ah(z.reader);t=D.channelCount;u=D.sampleRate;z.reader.Ra()?Rg(z):f(z.name)}).box("esds",
function(z){z=z.reader;for(var D="mp4a",G,F;z.Ra();){G=z.U();for(var J=z.U();J&128;)J=z.U();if(G==3)z.sa(),J=z.U(),J&128&&z.sa(),J&64&&z.skip(z.U()),J&32&&z.sa();else if(G==4)F=z.U(),z.skip(12);else if(G==5)break}F&&(D+="."+dh(F),G==5&&z.Ra()&&(G=z.U(),F=(G&248)>>3,F===31&&z.Ra()&&(F=32+((G&7)<<3)+((z.U()&224)>>5)),D+="."+F));g.push(D);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("apac",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",d).box("dvav",
d).box("dvh1",d).box("dvhe",d).box("vp09",d).box("av01",d).box("avcC",function(z){var D=y||"";switch(y){case "dvav":D="avc3";break;case "dva1":D="avc1"}z=z.reader;z.skip(1);z=D+"."+dh(z.U())+dh(z.U())+dh(z.U());h.push(z);l=!0}).box("hvcC",function(z){var D=y||"";switch(y){case "dvh1":D="hvc1";break;case "dvhe":D="hev1"}var G=z.reader;G.skip(1);z=G.U();var F=["","A","B","C"][z>>6],J=z&31,M=G.R(),O=(z&32)>>5?"H":"L";z=[G.U(),G.U(),G.U(),G.U(),G.U(),G.U()];G=G.U();for(var R=0,P=0;P<32;P++){R|=M&1;if(P==
31)break;R<<=1;M>>=1}D=D+("."+F+J)+("."+dh(R,!0));D+="."+O+G;F="";for(J=z.length;J--;)if((O=z[J])||F)F="."+O.toString(16).toUpperCase()+F;D+=F;h.push(D);l=!0}).box("dvcC",function(z){var D=y||"";switch(y){case "hvc1":D="dvh1";break;case "hev1":D="dvhe";break;case "avc1":D="dva1";break;case "avc3":D="dvav";break;case "av01":D="dav1"}var G=z.reader;G.skip(2);z=G.U();G=G.U();h.push(D+"."+eh(z>>1&127)+"."+eh(z<<5&32|G>>3&31));l=!0}).box("dvvC",function(z){var D=y||"";switch(y){case "hvc1":D="dvh1";break;
case "hev1":D="dvhe";break;case "avc1":D="dva1";break;case "avc3":D="dvav";break;case "av01":D="dav1"}var G=z.reader;G.skip(2);z=G.U();G=G.U();h.push(D+"."+eh(z>>1&127)+"."+eh(z<<5&32|G>>3&31));l=!0}).O("vpcC",function(z){var D=y||"",G=z.reader;z=G.U();var F=G.U();G=G.U()>>4&15;h.push(D+"."+eh(z)+"."+eh(F)+"."+eh(G));l=!0}).box("av1C",function(z){var D=y||"";switch(y){case "dav1":D="av01"}var G=z.reader;G.skip(1);z=G.U();G=G.U();var F=z>>>5,J=(G&64)>>6;h.push(D+"."+F+"."+eh(z&31)+(G>>>7?"H":"M")+
"."+eh(F===2&&J?(G&32)>>5?12:10:J?10:8)+"."+((G&16)>>4)+"."+((G&8)>>3)+((G&4)>>2)+(G&3)+"."+eh(1)+"."+eh(1)+"."+eh(1)+".0");l=!0}).box("enca",Vg).box("encv",Ug).box("sinf",Rg).box("frma",function(z){z=bh(z.reader).codec;f(z)}).box("colr",function(z){h=h.map(function(F){if(F.startsWith("av01.")){var J=z.reader,M=J.Va(),O=J.Ab(4,!1);var R=String.fromCharCode(O[0]);R+=String.fromCharCode(O[1]);R+=String.fromCharCode(O[2]);R+=String.fromCharCode(O[3]);if(R==="nclx"){O=J.sa();R=J.sa();var P=J.sa(),N=J.U()>>
7,Q=F.split(".");Q.length==10&&(Q[6]=eh(O),Q[7]=eh(R),Q[8]=eh(P),Q[9]=String(N),F=Q.join("."))}J.seek(M)}return F});var D=ch(z.reader),G=D.colorGamut;v=D.vd;w=G}).parse(a||b,!0,!0);if(!g.length&&!h.length)return null;var x=k&&!l,B=new Map;if(l&&!c){c=new Pc("video/mp4");a&&c.init(a);try{c.pe(b);for(var C=r(c.De()),I=C.next();!I.done;I=C.next()){var E=I.value;B.set(E,E)}}catch(z){}c.Yc()}return{type:x?"audio":"video",mimeType:x?"audio/mp4":"video/mp4",codecs:al(g.concat(h)).join(", "),language:m,height:n,
width:q,channelCount:t,sampleRate:u,closedCaptions:B,vd:v,colorGamut:w,frameRate:null}}function al(a){var b=new Set,c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ke(d);b.has(e)||(c.push(d),b.add(e))}b=Bc("audio",c);d=Bc("video",c);a=Bc(Ac,c);d=bl(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function bl(a){if(a.length<=1)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?Hc('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function cl(a){var b=null;(new Mg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).O("stsd",Tg).box("encv",Ug).box("enca",Vg).box("sinf",Rg).box("schi",Rg).O("tenc",function(c){c=c.reader;c.U();c.U();c.U();c.U();c=c.Ab(16,!1);b=rc(c)}).parse(a,!0);return b}
function dl(a,b,c){var d,e,f,g,h;return L(function(k){if(k.g==1)return d=b,d.cryptoKey?k.u(2):H(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Vb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;g>=0;g--)e[g]=f&255,f>>=8;b.blockCipherMode=="CBC"?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function el(){}function fl(a,b){try{var c=gl(a);return Ni({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return Li(d)}}
function gl(a){var b=a.split(":");if(b.length<2||b[0]!="data")throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(b.length<2)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;b.length>1&&b[b.length-1]=="base64"&&(d=!0,b.pop());var e;d?e=pc(a):e=ic(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",el);el.parse=fl;Vi("data",fl);function hl(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=il(a);if(e=jl.get(d))return m.return(e);f=0;g=Zi([a],c);va(m,2);g.method="HEAD";return H(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];xa(m,3);break;case 2:k=za(m);if(!k||k.code!=1002&&k.code!=1001){m.u(3);break}g.method="GET";return H(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():"")}})}
function il(a){a=(new Db(a)).zb.split("/").pop().split(".");return a.length==1?"":a.pop().toLowerCase()}
var jl=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv",
"text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function kl(a){this.o=null;this.B=a;this.H=new Si;this.l=[];this.i=null;this.j=[];this.C=null;this.F=[];this.D=300;this.m=new Map;this.h=new Map;this.g=null;this.A="UNKNOWN"}kl.prototype.configure=function(a){this.o=a};kl.prototype.destroy=function(){this.B=this.o=null;this.l=[];this.i=null;this.j=[];this.F=[];this.m.clear();this.g!=null&&(this.g.stop(),this.g=null);return this.H.destroy()};kl.prototype.setManifestType=function(a){this.A=a};
function ll(a,b){var c,d,e,f,g,h,k;return L(function(l){if(l.g==1)return c=tc(a.l,[ml(a,b)]),d=Zi(c,a.o.retryParameters),e=a.B.networkingEngine.request(8,d),Ti(a.H,e),va(l,2),H(l,e.promise,4);if(l.g!=2)return f=l.h,g=cc(f.data),h=JSON.parse(g),h.VERSION==1&&nl(a,h,f.uri),xa(l,0);if((k=za(l))&&k.code==7001)return l.return();a.g!=null&&(a.g.stop(),a.g=null);a.g=new Ge(function(){ll(a,b)});a.g.ka(a.D);K(l)})}
function ml(a,b){if(!a.j.length)return b;b=new Db(b);var c=a.C||a.j[0],d=Math.round(a.B.getBandwidthEstimate()),e=b.g;a.A=="DASH"?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):a.A=="HLS"&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Sb(e)&&Hb(b,e);return b.toString()}function nl(a,b,c){a.g!=null&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Ge(function(){ll(a,d)});if(c=b.TTL)a.D=c;a.g.ka(a.D);a.j=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
function ol(a,b,c,d){var e=a.m.get(b);e||(e=new Map);e.set(c,d);a.m.set(b,e)}kl.prototype.banLocation=function(a){this.h.set(a,Date.now()+6E4)};
function pl(a,b){var c=c===void 0?!1:c;b=a.m.get(b)||new Map;for(var d=[],e=r(a.j),f=e.next(),g={};!f.done;g={Pc:void 0},f=e.next())if(g.Pc=f.value,f=b.get(g.Pc))d.push({Cf:g.Pc,location:f});else if(f=a.F.find(function(k){return function(l){return l.uj==k.Pc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].nh?(h=new Db(h),Fb(h,f["URI-REPLACEMENT"].nh),d.push({Cf:g.Pc,location:h.toString()})):d.push({Cf:g.Pc,location:h}))}e=Date.now();g=r(a.h.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
h=a.h.get(f),e>h&&a.h.delete(f);d=d.filter(function(k){for(var l=r(a.h.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new Db(k.location)).mb))return!1;return!0});d.length&&(a.C=d[0].Cf);d=d.map(function(k){return k.location});if(!d.length&&a.i)for(e=r(a.i.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.i,d.push(g);if(!d.length)for(b=r(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:tc(a.l,d)};function ql(a,b,c,d,e){a=Zi(a,d,e);if(b!=0||c!=null)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Hl(){var a=this;this.g=this.h=null;this.F=1;this.B=new Map;this.K=new Map;this.C=new Map;this.C.set("video",new Map);this.C.set("audio",new Map);this.C.set(Ac,new Map);this.C.set("image",new Map);this.Tb=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return Il(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){var c=hk(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=hk(b,"URI");c=gl(e.split("?")[0]);
e=e.split("?")[0];a.N.has(e)||(c=Vb(c.data),a.N.set(e,c));d=uc("com.widevine.alpha",d,[{initDataType:"cenc",initData:a.N.get(e)}]);(b=W(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b}).set("com.microsoft.playready",function(b){var c=hk(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");b=hk(b,"URI");b=gl(b.split("?")[0]);b=Vb(b.data);c=new Uint8Array([154,4,240,121,152,64,66,134,171,
146,230,91,224,136,95,149]);var e=b.length,f=12+c.length+4+e,g=new Uint8Array(f),h=Zb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;h.setUint32(k,0);k+=4;g.set(c,k);k+=c.length;h.setUint32(k,e);g.set(b,k+4);d=uc("com.microsoft.playready",d,[{initDataType:"cenc",initData:g}]);if(b=id(["<PLAYREADY>",oc(b),"</PLAYREADY>"].join("\n"))){try{var l=bk(b);if(l)c:{for(var m=r(pd(l,"DATA")),n=m.next();!n.done;n=m.next()){var q=n.value;if(q.children)for(var t=r(q.children),u=t.next();!u.done;u=
t.next()){var v=u.value;if(v.tagName=="LA_URL"){var w=od(v);break c}}}w=""}else w="";var y=w}catch(x){y=""}d.licenseServerUri=y}y=Promise.resolve(d)}else y=Promise.resolve(null);return y}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=hk(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=hk(b,"URI");c=gl(e.split("?")[0]);e=e.split("?")[0];a.N.has(e)||(c=Vb(c.data),a.N.set(e,c));d=uc("com.huawei.wiseplay",d,[{initDataType:"cenc",
initData:a.N.get(e)}]);(b=W(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.$a=new Set;this.i=new Map;this.l=null;this.H="";this.Ha=new rk;this.L=-1;this.na=Infinity;this.ia=this.Wb=this.Ya=!1;this.D=new Ge(function(){if(a.aa&&!a.g.continueLoadingWhenPaused&&(a.Y.pb(a.aa,"timeupdate"),a.aa.paused)){a.Y.Pa(a.aa,"timeupdate",function(){return Jl(a)});return}Jl(a)});this.Fa=Kl;this.m=null;this.Wa=0;this.o=Infinity;this.Na=this.Ga=
this.V=0;this.ea=new Si;this.I=new Map;this.J=new Map;this.za=new Map;this.ua=new Map;this.P=new Map;this.va=new Map;this.wa=new Map;this.Vb=this.xa=!1;this.Fb=new Xa(5);this.j=null;this.S=!0;this.Y=new mb;this.A=this.aa=null;this.Gb=function(){return!1};this.N=new Map}p=Hl.prototype;p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.Gb=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.ba()&&this.D.lc()};
p.start=function(a,b){var c=this,d;return L(function(e){return e.g==1?(c.h=b,c.xa=b.isLowLatencyMode(),H(e,Ll(c,[a]).promise,2)):e.g!=3?(d=e.h,c.H=d.uri,H(e,Ml(c,d.data),3)):e.return(c.m)})};
p.stop=function(){this.D&&(this.D.stop(),this.D=null);var a=[];this.ea&&(a.push(this.ea.destroy()),this.ea=null);this.g=this.h=null;this.$a.clear();this.m=null;this.i.clear();this.K.clear();this.J.clear();this.B.clear();this.za.clear();this.ua.clear();this.P.clear();this.va.clear();this.wa.clear();this.N.clear();this.j&&this.j.destroy();this.Y&&(this.Y.release(),this.Y=null);return Promise.all(a)};
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m;return L(function(n){if(n.g==1){if(!Nl(a))return n.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=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Ol(a,g));return H(n,Promise.all(b),2)}Pl(a,d.map(function(q){return q.stream}));h=d.some(function(q){return q.fd==0});d.length&&!h&&Ql(a,Kl);h&&Rl(a);k=r(d);for(l=k.next();!l.done;l=k.next())m=l.value,m.stream.isAudioMuxedInVideo||
!m.stream.segmentIndex||tf(m.stream.segmentIndex)||a.h.disableStream(m.stream);K(n)})};function Sl(a,b){return Nl(a)?a.C.get(b.type):b.ie}
function Ol(a,b){var c,d,e,f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C,I,E,z,D,G,F,J,M,O,R,P,N,Q,Z,sa,da,Oa,Ia;return L(function(wa){switch(wa.g){case 1:if(b.stream.isAudioMuxedInVideo)return wa.return();c=[];d=r(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new Db(f),h=g.g,b.Pd&&(b.xb>=0&&h.add("_HLS_msn",String(b.xb)),b.yb>=0&&h.add("_HLS_part",String(b.yb))),b.Qd&&h.add("_HLS_skip","YES"),Sb(h)&&Hb(g,Ib(h.toString())),c.push(g.toString());va(wa,2);return H(wa,Ll(a,c,!0).promise,4);case 4:k=wa.h;xa(wa,
3);break;case 2:throw l=za(wa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return wa.return();m=sk(a.Ha,k.data);if(m.type!=1)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.M().includes(n)||b.se.push(n);q=kk(m.W,"EXT-X-DEFINE");t=Tl(a,q,n);u=b.stream;v=Sl(a,b);return H(wa,Ul(a,m,u.mimeType,b.M,t),5);case 5:w=wa.h;y=w.keyIds;x=w.drmInfos;B=w.encrypted;C=w.ag;u.encrypted||!B||C||(u.encrypted=!0);I=function(Pa,ha){return Pa.size===ha.size&&[].concat(A(Pa)).every(function(Qa){return ha.has(Qa)})};
I(u.keyIds,y)||(u.keyIds=y,u.drmInfos=x,a.h.newDrmInfo(u));E=Vl(a,m,v,t,b.M,b.type);z=E.segments;if(D=E.bandwidth)u.bandwidth=D;G=Sk(u);F=r(z);for(J=F.next();!J.done;J=F.next())M=J.value,M.$&&(M.$.Nc=G);u.segmentIndex.je(z,a.l.$d());z.length&&(O=nk(m.W,"EXT-X-MEDIA-SEQUENCE",0),P=(R=mk(m.W,"EXT-X-SKIP"))?Number(W(R,"SKIPPED-SEGMENTS")):0,N=Wl(O,z),Q=N.xb,Z=N.yb,b.xb=Q+P,b.yb=Z,sa=v.get(O),u.segmentIndex.sb(sa));if(da=tf(u.segmentIndex))b.uc=da.startTime,Oa=z[z.length-1],b.ec=Oa.endTime;if(Ia=mk(m.W,
"EXT-X-ENDLIST"))b.fd=!0;Xl(a,m);Yl(a,m.W,u.type,t,b.M);K(wa)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.aa=a};
function Zl(a,b,c){c=c===void 0?!1:c;for(var d=a.L==-1,e=r(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=Sl(a,f);if(g=tf(g)){h=r(h);for(var k=h.next();!k.done;k=h.next()){k=r(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.L=Math.max(a.L,l));f.Te=l;break}}}}if(!(a.L<0))for(b=r(b),d=b.next();!d.done;d=b.next())if(d=d.value,$l(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.L-d.Te,f>0&&(e.g.splice(0,f),e=tf(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
am(a,d,e)}
function bm(a,b){if(a.na==Infinity){b=r(b);for(var c=b.next();!c.done;c=b.next())c=tf(c.value.stream.segmentIndex),c!=null&&c.h!=null&&(a.na=Math.min(a.na,c.h))}b=a.na;if(b!=Infinity){c=r(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!$l(a,d.type)){var e=d.stream.segmentIndex;if(e!=null){var f=tf(e);if(f)if(f.h==null)bb("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.M(),"Expect AV sync issues!");else for(am(a,d,f.h-b-f.startTime),d=r(e),e=d.next();!e.done;e=d.next())e.value.Qf(b)}}}}
function am(a,b,c){if(!(Math.abs(c)<.001)){b.uc+=c;b.ec+=c;a=Sl(a,b);for(var d=r(a),e=d.next();!e.done;e=d.next()){var f=r(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.M()}}
function Ml(a,b){var c,d,e,f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C,I,E,z,D,G,F,J,M,O,R,P,N,Q,Z,sa,da,Oa,Ia,wa,Pa,ha,Qa,qa,La;return L(function(Da){switch(Da.g){case 1:c=Cc;d=sk(a.Ha,b);e=kk(d.W,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new X(null,0);a.l.xe(!0);k=function(){return[a.H]};l=null;m=new Map;if(d.type==1)return a.S=!1,Q=kk(d.W,"EXT-X-DEFINE"),m=Tl(a,Q,a.H),l=c.qa,Z="",sa=new Map,H(Da,cm(a,a.F++,m,d,k,"",l,Z,!0,"Media Playlist",null,sa,null,!1,null,!1),7);dm(a,e);n=kk(d.W,"EXT-X-MEDIA");q=kk(d.W,"EXT-X-STREAM-INF");
t=kk(d.W,"EXT-X-IMAGE-STREAM-INF");u=kk(d.W,"EXT-X-I-FRAME-STREAM-INF");v=kk(d.W,"EXT-X-SESSION-KEY");w=kk(d.W,"EXT-X-SESSION-DATA");y=kk(d.W,"EXT-X-CONTENT-STEERING");em(a,w);return H(Da,fm(a,y),4);case 4:if(!a.g.ignoreSupplementalCodecs){x=[];B=r(q);C=B.next();for(I={};!C.done;I={eh:void 0},C=B.next())if(E=C.value,z=W(E,"SUPPLEMENTAL-CODECS"))I.eh=z.split(/\s*,\s*/).map(function(Ra){return Ra.split("/")[0]}),D=E.attributes.map(function(Ra){return function(Sa){var Ya=Sa.name,ya=Sa.value;Ya=="CODECS"&&
(ya=Ra.eh.join(","),Sa=Sa.value.split(","),Sa.length>1&&(Sa=yc("audio",Sa))&&(ya+=","+Sa));return new jk(Ya,ya)}}(I)),x.push(new ek(E.id,E.name,D,null));q.push.apply(q,A(x));G=[];F=r(u);J=F.next();for(M={};!J.done;M={fh:void 0},J=F.next())if(O=J.value,R=W(O,"SUPPLEMENTAL-CODECS"))M.fh=R.split(/\s*,\s*/).map(function(Ra){return Ra.split("/")[0]}),P=O.attributes.map(function(Ra){return function(Sa){var Ya=Sa.name;Sa=Sa.value;Ya=="CODECS"&&(Sa=Ra.fh.join(","));return new jk(Ya,Sa)}}(M)),G.push(new ek(O.id,
O.name,P,null));u.push.apply(u,A(G))}gm(a,q);hm(a,n);N=im(a,u);return H(Da,jm(a,q,v,n,k,a.B,N),5);case 5:return f=Da.h,g=km(a,n),H(Da,lm(a,t,u),6);case 6:h=Da.h;Da.u(3);break;case 7:da=Da.h,a.i.set(a.H,da),da.stream&&(Oa=Sk(da.stream),da.stream.segmentIndex.Db(function(Ra){Ra.$&&(Ra.$.Nc=Oa)})),l=da.stream.type,Ia=!0,a.g.disableAudio&&da.type=="audio"?Ia=!1:a.g.disableVideo&&da.type=="video"&&!da.stream.codecs.includes(",")&&(Ia=!1),Ia&&f.push({id:0,language:Ne(Z||"und"),disabledUntilTime:0,primary:!0,
audio:da.type=="audio"?da.stream:null,video:da.type=="video"?da.stream:null,bandwidth:da.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);mm(a,d);d.type==1&&(Nl(a)&&(nm(a,d),wa=a.o,a.D.ka(wa)),Pa=Array.from(a.i.values()),om(a,Pa),Rl(a),Yl(a,d.W,l,m,k));a.m={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.A};if(a.ia||!a.g.hls.disableCodecGuessing){Da.u(8);break}ha=[];Qa=r(a.m.variants);for(qa=Qa.next();!qa.done;qa=Qa.next())La=qa.value,La.audio&&La.audio.codecs===""&&ha.push(La.audio.createSegmentIndex()),La.video&&La.video.codecs===""&&ha.push(La.video.createSegmentIndex());return H(Da,Promise.all(ha),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),K(Da)}})}
function pm(a,b){var c,d,e,f,g,h,k,l,m,n,q,t,u,v,w,y;return L(function(x){if(x.g==1){c=Zk(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return x.return(c);d=qm(a,b);e=d.segment;f=d.segmentIndex;g=e.M();if(h=il(g[0]))if(k=rm.get(h))return x.return(Zk(k));return H(x,Promise.all([sm(a,e.$,0),sm(a,e,f)]),2)}l=x.h;m=l[1].mimeType;n=l[0].data;q=l[1].data;t="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");u=["audio/mp4","video/mp4","video/iso.segment"];v=e.$||u.includes(m);if(!v&&Lh(Vb(q))){var B=
q,C=a.g.disableAudio,I=a.g.disableVideo,E=a.g.disableText;var z=Vb(B);var D=(new Dh).parse(z),G=D.cd();z=D.qf();var F=[],J=!1,M=!1;if(!C)switch(G.audio){case "aac":case "aac-loas":D.fb().length&&(F.push("mp4a.40.2"),J=!0);break;case "mp3":D.fb().length&&(F.push("mp4a.40.34"),J=!0);break;case "ac3":D.fb().length&&(F.push("ac-3"),J=!0);break;case "ec3":D.fb().length&&(F.push("ec-3"),J=!0);break;case "opus":D.fb().length&&(F.push("opus"),J=!0)}if(!I)switch(G.video){case "avc":z.codec?F.push(z.codec):
F.push("avc1.42E01E");M=!0;break;case "hvc":z.codec?F.push(z.codec):F.push("hvc1.1.6.L93.90");M=!0;break;case "av1":F.push("av01.0.01M.08"),M=!0}if(F.length){C=J&&!M;I=new Map;if(M&&!E){E=new Pc("video/mp2t");E.pe(B);B=r(E.De());for(M=B.next();!M.done;M=B.next())M=M.value,I.set(M,M);E.Yc()}z={type:C?"audio":"video",mimeType:"video/mp2t",codecs:F.join(", "),language:null,height:z.height,width:z.width,channelCount:null,sampleRate:null,closedCaptions:I,vd:null,colorGamut:null,frameRate:z.frameRate}}else z=
null;if(w=z)return x.return(w)}else if(v||t.includes(h))if(y=$k(n,q,a.g.disableText))return x.return(y);return m?x.return(Zk(m)):x.return(c)})}
function sm(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(!b)return l.return({mimeType:null,data:null});d=ej;e=ql(b.M(),b.bc(),b.ac(),a.g.retryParameters);f=b instanceof Ck?1:0;return H(l,tm(a,e,d,{type:f}).promise,2);case 2:g=l.h;h=g.data;if(!b.aesKey){l.u(3);break}return H(l,dl(h,b.aesKey,c),4);case 4:h=l.h;case 3:return b instanceof Ck?b.qd(h,!0):b.qd(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
function Rl(a){if(Nl(a)){if(a.Fa==um){for(var b=Infinity,c=Infinity,d=r(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&e.stream.type!="text"&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.ec),c=Math.min(c,e.uc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Zg(b)}}else a.l.hc(vm(a));if(!a.l.A)for(b=r(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||c.type!="audio"&&c.type!="video"||(c=tf(c.stream.segmentIndex))&&
c.h&&a.l.Xg(c.h);a.l.xg()}function dm(a,b){var c=(new Db(a.H)).g;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"QUERYPARAM");d&&f&&(a.B.has(d)||a.B.set(d,f));e&&(d=c.get(e)[0])&&!a.B.has(d)&&a.B.set(e,d)}}
function Tl(a,b,c){c=(new Db(c)).g;var d=new Map;b=r(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=W(f,"NAME"),h=W(f,"VALUE");e=W(f,"QUERYPARAM");f=W(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.B.get(f))&&d.set(f,e)}return d}
function gm(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"AUDIO");c=W(d,"VIDEO");var f=W(d,"SUBTITLES");d=wm(a,d);if(f){var g=yc(Ac,d);a.J.set(f,g);ib(d,g)}e&&(f=yc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.J.set(e,f));c&&(e=yc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.J.set(c,e))}}
function em(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"DATA-ID");c=W(d,"URI");var f=W(d,"LANGUAGE");d=W(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",ok([a.H],c,a.B)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new Qi("sessiondata",e);if(a.h)a.h.onEvent(c)}}
function fm(a,b){var c,d,e,f,g,h;return L(function(k){if(!a.h||!a.g)return k.return();d=r(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=W(f,"PATHWAY-ID"),h=W(f,"SERVER-URI"),g&&h){a.j=new kl(a.h);a.j.configure(a.g);a.j.l=[a.H];a.j.setManifestType("HLS");a.j.i=g;c=ll(a.j,h);break}return H(k,c,0)})}
function km(a,b){var c=lk(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return xm(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=hk(d.value,"GROUP-ID");if(d=a.J.get(e))if(e=a.K.get(e)){e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=ym(Ac,d)||zm(Ac),Am(f.stream)}}return b.filter(function(g){return g})}
function Am(a){var b=new Set([de(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Db(function(c){c.mimeType&&b.add(de(c.mimeType,a.codecs))});a.fullMimeTypes=b}
function lm(a,b,c){var d,e;return L(function(f){if(f.g==1)return d=b.map(function(g){var h,k,l;return L(function(m){if(m.g==1){if(h=a.g.disableThumbnails)return m.return(null);va(m,2);return H(m,Bm(a,g),4)}if(m.g!=2)return k=m.h,m.return(k.stream);l=za(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=Cm(a,g);return h.stream.type!=="image"?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
throw k;}})),H(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function Dm(a,b,c){b=b.filter(function(h){var k=W(h,"URI")||"";h=W(h,"TYPE");return h!="SUBTITLES"&&(k!=""||h=="AUDIO")});var d={};b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=fk(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)xm(a,d[g],c,!1)}function im(a,b){return b.map(function(c){c=Cm(a,c);return c.stream.type!=="video"?null:c.stream}).filter(function(c){return c})}
function jm(a,b,c,d,e,f,g){var h,k,l,m,n,q,t,u,v,w,y,x,B,C,I,E,z,D,G,F,J,M,O,R,P,N,Q,Z,sa,da,Oa,Ia,wa,Pa,ha,Qa;return L(function(qa){switch(qa.g){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(c.length>0)){qa.u(2);break}l=r(c);m=l.next();case 3:if(m.done){qa.u(2);break}n=m.value;q=hk(n,"METHOD");t=W(n,"KEYFORMAT")||"identity";u=null;if(q=="NONE"){qa.u(4);break}if(Em(q)){v=ok(e(),hk(n,"URI"),f);w=v.sort().join("");a.P.has(w)||(y=Zi(v,a.g.retryParameters),x=tm(a,y,6).promise,a.P.set(w,x));qa.u(4);break}if(t==
"identity")return H(qa,Fm(a,n,"",e,null,f),12);B=a.Tb.get(t);if(!B){C=null;qa.u(10);break}return H(qa,B(n,"",null),11);case 11:C=qa.h;case 10:u=C;qa.u(6);break;case 12:u=qa.h;case 6:if(u){if(u.keyIds)for(I=r(u.keyIds),E=I.next();!E.done;E=I.next())z=E.value,k.add(z);h.push(u)}case 4:m=l.next();qa.u(3);break;case 2:D={};G=r(b);for(F=G.next();!F.done;F=G.next())J=F.value,M=fk(J,!a.j),D[M]?D[M].push(J):D[M]=[J];O=[];for(R in D)P=D[R],N=P[0],Q=W(N,"FRAME-RATE"),Z=Number(W(N,"AVERAGE-BANDWIDTH"))||Number(hk(N,
"BANDWIDTH")),sa=W(N,"RESOLUTION"),da=r(sa?sa.split("x"):[null,null]),Oa=da.next().value,Ia=da.next().value,wa=W(N,"VIDEO-RANGE"),(Pa=W(N,"REQ-VIDEO-LAYOUT"))&&Pa.includes(",")&&(ha=Pa.split(",").filter(function(La){return La=="CH-STEREO"||La=="CH-MONO"}),Pa=ha[0]),Pa=Pa||"CH-MONO",Qa=Gm(a,P,d),O.push.apply(O,A(Hm(a,Qa.audio,Qa.video,Z,Oa,Ia,Q,wa,Pa,h,k,g)));return qa.return(O.filter(function(La){return La!=null}))}})}
function Gm(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=r(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=W(m,"AUDIO");var n=W(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=W(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(c=c.filter(function(u){return f.includes(hk(u,"GROUP-ID"))}),Dm(a,c,e));c=(e=f.sort().join(","))&&a.K.has(e)?a.K.get(e):[];g?d.audio.push.apply(d.audio,A(c)):h&&d.video.push.apply(d.video,A(c));h=!1;var t=b.map(function(u){return hk(u,
"URI")});g=d.audio.find(function(u){return u&&u.M().find(function(v){return t.includes(v)})});c=wm(a,b[0]);k=yc("video",c);(l=yc("audio",c))&&!k?(g="audio",h=d.audio.length>0&&!d.audio.some(function(u){return u.stream.isAudioMuxedInVideo})):!d.audio.length&&!d.video.length&&l&&k?(g="video",c=[[k,l].join()]):d.audio.length&&g?(g="audio",h=!0):g=d.video.length&&!d.audio.length?"audio":"video";h||(b=Im(a,b,c,g),e&&a.g.enableAudioGroups&&(b.stream.groupId=e),b.stream.type=="audio"&&g==="audio"&&d.audio.some(function(u){return u.stream.isAudioMuxedInVideo})&&
(a=d.audio[0].stream,b.stream.language=a.language,b.stream.channelsCount=a.channelsCount,b.stream.label=a.label,b.stream.audioSamplingRate=a.audioSamplingRate,b.stream.originalId=a.originalId,b.stream.originalLanguage=a.originalLanguage),d[b.stream.type]=[b]);return d}
function wm(a,b){b=W(b,"CODECS")||"";a.ia=b.length>0;a.ia||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),b=b.join(","));return al(b.split(/\s*,\s*/))}function Jm(a){return(a=W(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function Km(a){return(a=W(a,"SAMPLE-RATE"))?parseInt(a,10):null}
function Lm(a){a=W(a,"CHANNELS");if(!a)return!1;a=a.split("/");return a.length!=2?!1:a[1]==="JOC"||a[1].includes("ATMOS")}function Mm(a){a=hk(a,"TYPE").toLowerCase();a=="subtitles"&&(a=Ac);return a}
function Hm(a,b,c,d,e,f,g,h,k,l,m,n){for(var q=r(c),t=q.next();!t.done;t=q.next())Nm(t.value.stream,e,f,g,h,k,null);e=a.g.disableVideo;if(!c.length||e)c=[null];e&&(b=b.filter(function(y){return!y.stream.isAudioMuxedInVideo}));e=a.g.disableAudio;if(!b.length||e)b=[null];e=[];b=r(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=r(c),h=g.next();!h.done;h=g.next()){var u=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=u?u.stream:null)k.drmInfos=l,k.keyIds=m,a.g.disableIFrames||Df(k,n);k&&
!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);q=f?f.stream.drmInfos:null;t=u?u.stream.drmInfos:null;u=u?u.M().sort().join(","):"";var v=f?f.M().sort().join(","):"",w=[];h&&h.codecs&&w.push(h.codecs);k&&k.codecs&&w.push(k.codecs);u=[u,v,w.sort()].join("-");h&&k&&!oi(q,t)||a.$a.has(u)||(h={id:a.F++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.$a.add(u))}return e}
function hm(a,b){b=lk(b,"CLOSED-CAPTIONS");a.S=b.length==0;b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"LANGUAGE");c=Ne(e||"und");e||(e=W(d,"NAME"))&&(c=e);e=hk(d,"GROUP-ID");d=hk(d,"INSTREAM-ID").replace("SERVICE","svc");a.I.get(e)||a.I.set(e,new Map);a.I.get(e).set(d,c)}}
function xm(a,b,c,d){d=d===void 0?!0:d;for(var e=[],f=[],g=new Map,h=r(b),k=h.next(),l={};!k.done;l={qg:void 0},k=h.next())k=k.value,l.qg=++a.F,l=function(v){return function(){return"shaka://hls-muxed"+v.qg}}(l),l=d?hk(k,"URI"):W(k,"URI")||l(),k=hk(k,"GROUP-ID"),e.push(l),f.push(k),g.set(k,l);d=f.sort().join(",");k=b[0];b="";h=Mm(k);if(h==Ac)b=W(k,"CODECS")||"";else for(f=r(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.J.has(l)){b=a.J.get(l);break}f=e.sort().join(",");if(a.i.has(f))return a.i.get(f);
l=a.F++;if(a.j){g=r(g);for(var m=g.next();!m.done;m=g.next()){var n=r(m.value);m=n.next().value;n=n.next().value;(m=c.get(m))&&ol(a.j,l,m,n)}}c=W(k,"LANGUAGE");g=W(k,"NAME");m=W(k,"DEFAULT")=="YES";n=h=="audio"?Jm(k):null;var q=h=="audio"?Lm(k):!1,t=W(k,"CHARACTERISTICS"),u=W(k,"FORCED")=="YES";k=h=="audio"?Km(k):null;e=Om(a,l,e,b,h,c,m,g,n,null,t,u,k,q);e.stream&&a.g.enableAudioGroups&&(e.stream.groupId=d);a.K.has(d)?a.K.get(d).push(e):a.K.set(d,[e]);a.i.set(f,e);return e}
function Bm(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(q.g==1){c=hk(b,"URI");d=W(b,"CODECS","jpeg")||"";if(a.i.has(c))return q.return(a.i.get(c));e=W(b,"LANGUAGE");f=W(b,"NAME");g=W(b,"CHARACTERISTICS");h=Om(a,a.F++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=W(b,"RESOLUTION"))?H(q,h.stream.createSegmentIndex(),3):q.u(2)}if(q.g!=2){l=tf(h.stream.segmentIndex);if(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]);h.stream.closeSegmentIndex()}if(n=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return q.return(h)})}
function Cm(a,b){var c="video",d=hk(b,"URI"),e=W(b,"CODECS")||"";e=="mjpg"&&(c="image");if(a.i.has(d))return a.i.get(d);var f=W(b,"LANGUAGE"),g=W(b,"NAME"),h=W(b,"CHARACTERISTICS");c=Om(a,a.F++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=W(b,"RESOLUTION");f=r(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=W(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
function Im(a,b,c,d){for(var e=a.F++,f=[],g=r(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=hk(k,"URI");k=W(k,"PATHWAY-ID");a.j&&k&&ol(a.j,e,k,h);f.push(h)}g=f.sort().join(",")+c.sort().join(",");if(a.i.has(g))return a.i.get(g);h=f.join(",");a:{b=W(b[0],"CLOSED-CAPTIONS");if(d=="video"){if(a.g.disableText){a.S=!1;b=null;break a}if(b){if(b!="NONE"){b=a.I.get(b);break a}a.S=!1}else if(!b&&a.I.size)for(b=r(a.I.keys()),b=b.next();!b.done;b=b.next()){b=a.I.get(b.value);break a}}b=null}c=xc(d,c);d=
Om(a,e,f,c,d,null,!1,h,null,b,null,!1,null,!1);a.i.set(g,d);return d}
function Om(a,b,c,d,e,f,g,h,k,l,m,n,q,t){function u(C){var I,E,z,D,G,F,J,M,O,R,P,N,Q,Z,sa,da,Oa,Ia,wa,Pa;return L(function(ha){switch(ha.g){case 1:return I=Cc,va(ha,2),H(ha,C.promise,4);case 4:E=ha.h;if(C.aborted)return ha.return();z=E.uri;z!=E.originalUri&&(D=y.M(),D.includes(z)||y.se.push(z));G=sk(a.Ha,E.data);if(G.type!=1)throw new T(2,4,4017);F=kk(G.W,"EXT-X-DEFINE");J=Tl(a,F,z);M=!1;(!a.ia&&a.g.hls.disableCodecGuessing||a.S&&e==I.qa&&!a.g.hls.disableClosedCaptionsDetection)&&G.segments.length>
0&&(a.S=!1,M=!0);O=!a.ia&&a.g.hls.disableCodecGuessing;R=Nl(a);return H(ha,cm(a,0,J,G,v,d,e,f,g,h,k,l,m,n,q,t,void 0,M,O),5);case 5:P=ha.h;if(C.aborted)return ha.return();N=P.stream;mm(a,G);Nl(a)&&!R&&nm(a,G);y.uc=P.uc;y.ec=P.ec;y.Qd=P.Qd;y.Pd=P.Pd;y.fd=P.fd;y.ie=P.ie;y.xb=P.xb;y.yb=P.yb;w.segmentIndex=N.segmentIndex;w.encrypted=N.encrypted;w.drmInfos=N.drmInfos;w.keyIds=N.keyIds;w.mimeType=N.mimeType;w.bandwidth=w.bandwidth||N.bandwidth;w.codecs=w.codecs||N.codecs;w.closedCaptions=w.closedCaptions||
N.closedCaptions;w.width=w.width||N.width;w.height=w.height||N.height;w.hdr=w.hdr||N.hdr;w.colorGamut=w.colorGamut||N.colorGamut;w.frameRate=w.frameRate||N.frameRate;w.language=="und"&&N.language!="und"&&(w.language=N.language);w.language=w.language||N.language;w.channelsCount=w.channelsCount||N.channelsCount;w.audioSamplingRate=w.audioSamplingRate||N.audioSamplingRate;Am(w);w.drmInfos.length&&a.h.newDrmInfo(w);Q=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)Q=!0;
a.m&&Q&&a.h.makeTextStreamsForClosedCaptions(a.m);e==I.Ka&&(Z=tf(N.segmentIndex))&&Z.$&&(w.mimeType="application/mp4",Am(w));sa=Sk(w);w.segmentIndex.Db(function(Qa){Qa.$&&(Qa.$.Nc=sa)});Pm(a)&&(a.Wb?om(a,[y]):(a.Wb=!0,da=Array.from(a.i.values()),Oa=da.filter(function(Qa){return Qa.stream.segmentIndex}),om(a,Oa),Rl(a),Ia=a.o,Ia>0&&a.D.ka(Ia)));Yl(a,G.W,w.type,J,v);a.m&&(a.m.startTime=a.A);xa(ha,0);break;case 2:wa=za(ha);w.closeSegmentIndex();if(wa.code===7001)return ha.return();Pa=a.h.disableStream(w);
if(!Pa)throw wa;K(ha)}})}function v(){return a.j&&c.length>1?pl(a.j,b):y.se.concat(pk([a.H],c,a.B))}var w=Qm(a,d,e,f,g,h,k,l,m,n,q,t);c.some(function(C){return C.startsWith("shaka://hls-muxed")})&&(w.isAudioMuxedInVideo=!0,w.mimeType="video/mp2t",Am(w));var y={stream:w,type:e,se:[],uc:0,ec:0,ie:new Map,Qd:!1,Pd:!1,fd:!1,Te:-1,xb:-1,yb:-1,M:v},x=null,B;w.createSegmentIndex=function(){if(x)return x;if(w.isAudioMuxedInVideo)return w.segmentIndex=new Tk([]),Promise.resolve();B=Ll(a,y.M(),!0);return x=
new Promise(function(C){C(u(B))})};w.closeSegmentIndex=function(){x&&!w.segmentIndex&&B.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);x=null};return y}function vm(a){var b=Infinity;a=r(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&c.stream.type!="text"&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.ec));return b}
function Pl(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Db(function(e){c.push(e)});a.l.Ig(c)}
function om(a,b){if(!Nl(a))for(var c=vm(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Td(0,c);Pl(a,b.map(function(f){return f.stream}));d=Array.from(a.i.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return f.stream.type=="audio"});e=d.some(function(f){return f.stream.type=="video"});d=Nl(a)&&!a.Ya;c=!Nl(a)&&a.Ya&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?Zl(a,b,d):(bm(a,b),a.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&Zl(a,
b))}function $l(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Pm(a){if(!a.m)return!1;var b=[],c=[];a=r(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 b.length>0&&!b.some(function(e){return e.segmentIndex})||c.length>0&&!c.some(function(e){return e.segmentIndex})?!1:!0}
function cm(a,b,c,d,e,f,g,h,k,l,m,n,q,t,u,v,w,y,x){y=y===void 0?!0:y;x=x===void 0?!0:x;var B,C,I,E,z,D,G,F,J,M,O,R,P,N,Q,Z,sa,da,Oa,Ia,wa,Pa,ha,Qa,qa,La,Da,Ra,Sa;return L(function(Ya){switch(Ya.g){case 1:B=d.segments||[];C=B.every(function(ya){return mk(ya.W,"EXT-X-GAP")?!0:!1});if(!B.length||C)throw new T(2,4,4053);Rm(a,d);Nl(a)&&Xl(a,d);I=Nl(a)?a.C.get(g):new Map;E=Vl(a,d,I,c,e,g);z=E.segments;D=E.bandwidth;O=M=J=F=G=null;if(!(z.length>0&&y)){Ya.u(2);break}return H(Ya,pm(a,z),3);case 3:R=Ya.h,g!=
R.type&&Nl(a)&&(a.C.set(R.type,a.C.get(g)),a.C.set(g,new Map)),g=R.type,h=R.language,m=R.channelCount,u=R.sampleRate,a.g.disableText||(n=R.closedCaptions),F=R.height,G=R.width,J=R.vd,M=R.colorGamut,O=R.frameRate,x&&(w=R.mimeType,f=R.codecs);case 2:if(w){Ya.u(4);break}return H(Ya,Sm(a,g,f,z),5);case 5:w=Ya.h,g!=Ac||f||w!="application/mp4"||!z[0]||z[0].$||(w="text/vtt");case 4:return H(Ya,Ul(a,d,w,e,c),6);case 6:P=Ya.h;N=P.drmInfos;Q=P.keyIds;Z=P.encrypted;sa=P.ag;if(Z&&!N.length&&!sa)throw new T(2,
4,4026);da=Qm(a,f,g,h,k,l,m,n,q,t,u,v);da.encrypted=Z&&!sa;da.drmInfos=N;da.keyIds=Q;da.mimeType=w;D&&(da.bandwidth=D);Am(da);g=="video"&&(G||F||J||M)&&Nm(da,G,F,O,J,null,M);Nl(a)&&Xl(a,d);Oa=z[0].startTime;Ia=z[z.length-1];wa=Ia.endTime;Pa=new Tk(z);da.segmentIndex=Pa;Qa=(ha=mk(d.W,"EXT-X-SERVER-CONTROL"))?gk(ha,"CAN-SKIP-UNTIL")!=null:!1;qa=ha?gk(ha,"CAN-BLOCK-RELOAD")!=null:!1;La=nk(d.W,"EXT-X-MEDIA-SEQUENCE",0);Da=Wl(La,z);Ra=Da.xb;Sa=Da.yb;return Ya.return({stream:da,type:g,se:[],M:e,uc:Oa,ec:wa,
Qd:Qa,Pd:qa,fd:!1,Te:-1,xb:Ra,yb:Sa,ie:I})}})}function Wl(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{xb:a,yb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.A&&(c=0),{xb:a,yb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{xb:a,yb:c}}
function Qm(a,b,c,d,e,f,g,h,k,l,m,n){var q=ym(c,b)||zm(c),t=[];if(k){k=r(k.split(","));for(var u=k.next();!u.done;u=k.next())t.push(u.value)}k=void 0;u=null;c==Ac?k=t.includes("public.accessibility.transcribes-spoken-dialog")&&t.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":t.includes("public.accessibility.describes-video")&&(u="visually impaired");t.length||k!=="subtitle"||t.push("subtitle");a={id:a.F++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:q,codecs:b,kind:c==Ac?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ne(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:t,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,
fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};Am(a);return a}
function Ul(a,b,c,d,e){var f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C,I,E,z,D,G,F,J,M,O,R,P,N,Q;return L(function(Z){switch(Z.g){case 1:f=new Map;if(!a.g.ignoreDrmInfo&&b.segments)for(g=r(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=kk(k.W,"EXT-X-KEY"),m=null,l.length)for(m=Tm(a,b,k.W,d,e),n=r(l),q=n.next();!q.done;q=n.next())t=q.value,f.set(t,m);v=u=!1;w=[];y=new Set;x=r(f);B=x.next();case 2:if(B.done){Z.u(4);break}C=B.value;I=r(C);E=I.next().value;z=I.next().value;D=E;G=z;F=hk(D,"METHOD");if(F==
"NONE"){Z.u(3);break}u=!0;J=W(D,"KEYFORMAT")||"identity";M=null;if(Em(F)){v=!0;Z.u(3);break}if(J=="identity")return H(Z,Fm(a,D,c,d,G,e),11);O=a.Tb.get(J);if(!O){R=null;Z.u(9);break}return H(Z,O(D,c,G),10);case 10:R=Z.h;case 9:M=R;Z.u(6);break;case 11:M=Z.h;case 6:if(M){if(M.keyIds)for(P=r(M.keyIds),N=P.next();!N.done;N=P.next())Q=N.value,y.add(Q);w.push(M)}case 3:B=x.next();Z.u(2);break;case 4:return Z.return({drmInfos:w,keyIds:y,encrypted:u,ag:v})}})}
function Um(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw cb("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=W(b,"IV","");if(g){var h=qc(g.substr(2));if(h.byteLength!=16)throw new T(2,4,4048);}else f=nk(c.W,"EXT-X-MEDIA-SEQUENCE",0);var k=ok(d(),hk(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.ua.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(hk(b,
"METHOD")){case "AES-256":m.bitsKey=256;break;case "AES-256-CTR":m.bitsKey=256,m.blockCipherMode="CTR"}m.fetchKey=function(){var n,q,t,u;return L(function(v){if(v.g==1)return a.P.has(l)||(n=Zi(k,a.g.retryParameters),q=tm(a,n,6).promise,a.P.set(l,q)),H(v,a.P.get(l),2);if(v.g!=3){t=v.h;if(!t.data||t.data.byteLength!=m.bitsKey/8)throw new T(2,4,4049);u={name:m.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:m.bitsKey};return H(v,window.crypto.subtle.importKey("raw",t.data,u,!0,["decrypt"]),3)}m.cryptoKey=
v.h;m.fetchKey=void 0;K(v)})};a.ua.set(c,m)}return a.ua.get(c)}function mm(a,b){a.A==null&&(b=mk(b.W,"EXT-X-START"))&&(a.A=Number(hk(b,"TIME-OFFSET")))}function Rm(a,b){var c=mk(b.W,"EXT-X-PLAYLIST-TYPE");b=mk(b.W,"EXT-X-ENDLIST");b=c&&c.value=="VOD"||b;c=c&&c.value=="EVENT"&&!b;c=!b&&!c;b?Ql(a,Kl):c?Ql(a,um):Ql(a,Vm)}
function Xl(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;e>=0;){var f=mk(d[e].W,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=mk(b.W,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=mk(b.W,"EXT-X-PART-INF"))a.V=Number(hk(e,"PART-TARGET"));b=mk(b.W,"EXT-X-SERVER-CONTROL");a.xa&&a.V?(a.o=a.Vb?a.V*5<=c?Math.min(a.V,a.o):Math.min(c,a.o):Math.min(a.V,a.o),a.Na=b?Number(hk(b,"PART-HOLD-BACK")):0):(a.o=Math.min(c,a.o),c=
b?gk(b,"HOLD-BACK"):null,a.Ga=c?Number(c.value):0);a.Wa=Math.max(d,a.Wa)}function nm(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Na)c=a.Na;else if(a.Ga)c=a.Ga;else for(var d=b.segments.length,e=d-Math.min(d,a.g.hls.liveSegmentsDelay);e<d;e++){var f=mk(b.segments[e].W,"EXTINF");c=f?c+Number(f.value.split(",")[0]):c+a.Wa}a.A&&a.A<0&&(c=Math.min(-a.A,c),a.A+=c);a.l.Yg(0);a.l.Wg(c);a.l.xe(!1)}
function Tm(a,b,c,d,e){var f=mk(c,"EXT-X-MAP");if(!f)return null;var g=hk(f,"URI"),h=ok(d(),g,e);g=[h.toString(),W(f,"BYTERANGE","")].join("-");if(!a.za.has(g)){var k=void 0,l=null,m=!1;c=r(c);for(var n=c.next();!n.done;n=c.next())n=n.value,n.name=="EXT-X-KEY"?(m=hk(n,"METHOD"),Em(m)&&n.id<f.id?(m=!1,k=Um(a,n,b,d,e)):m=m!="NONE"):n.name=="EXT-X-BYTERANGE"&&n.id<f.id&&(l=n);b=Wm(h,f,l,k,m);a.za.set(g,b)}return a.za.get(g)}
function Wm(a,b,c,d,e){var f=0,g=null;b=W(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(f=b.split("@"),g=Number(f[0]),f=Number(f[1]),g=f+g-1,d&&(c=g+1-f,c%16&&(g+=16-c%16)));return new Ak(function(){return a},f,g,null,null,null,d,e)}
function Xm(a,b,c,d,e,f,g,h,k,l){var m=d.W,n=mk(m,"EXTINF"),q=0,t=0,u=null;d.g.length&&(a.m.isLowLatency=!0);var v=null;if(c&&c.h)v=c.h+c.endTime-c.startTime;else if(!a.g.hls.ignoreManifestProgramDateTime){var w=mk(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=sd(w.value),a.Ya=!0)}var y=Dk;mk(m,"EXT-X-GAP")&&(a.m.gapCount++,y=2);if(!n){if(d.g.length==0)throw new T(2,4,4024,"EXTINF");if(!a.xa)return null}var x=[];w=!1;var B=null,C=!1,I=!1;if(a.xa&&d.g.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;
for(var E=v,z={},D=0;D<d.g.length;z={Be:void 0,nd:void 0},D++){var G=d.g[D],F=D==0?c:x[x.length-1],J=D==0?e:F.endTime,M=Number(W(G,"DURATION"))||a.V;if(M){var O=J+M,R=0,P=null;G.name=="EXT-X-PRELOAD-HINT"?(R=(R=W(G,"BYTERANGE-START"))?Number(R):0,(F=W(G,"BYTERANGE-LENGTH"))?P=R+Number(F)-1:R&&(P=Number.MAX_SAFE_INTEGER)):(R=W(G,"BYTERANGE"),P=r(Ym(F,R)),R=P.next().value,P=P.next().value);z.nd=W(G,"URI");if(z.nd){F=Dk;W(G,"GAP")=="YES"&&(a.m.gapCount++,F=2,C=!0);z.Be=null;var N=function(Z){return function(){Z.Be==
null&&(Z.Be=ok(h(),Z.nd,f));return Z.Be}}(z);q&&R>=0&&P!=null&&(B=N,w=!0);J=new Ck(J,O,N,R,P,b,0,0,Infinity,[],"",null,E,F,l);G.name=="EXT-X-PRELOAD-HINT"&&(J.vf(),I=!0);W(G,"INDEPENDENT")!="YES"&&D>0&&J.Bg();G=k;G||(x.length&&x[0].mimeType?G=x[0].mimeType:z.nd&&(z=il(z.nd),G=Zm.get(g).get(z)||null));G&&(J.mimeType=G,$m.has(G)&&(J.$=null));x.push(J);E&&(E+=M)}}}}if(n){n=Number(n.value.split(",")[0]);if(n==0)return null;q=e+n}else if(x.length)q=x[x.length-1].endTime;else return null;w&&(C||x[0].startByte!=
0?(w=!1,B=null):x=[]);(n=mk(m,"EXT-X-BYTERANGE"))?(u=r(Ym(c,n.value)),t=u.next().value,u=u.next().value):x.length&&(t=x[0].startByte,u=x[x.length-1].endByte);c="";n=null;g=="image"&&(c="1x1",g=mk(m,"EXT-X-TILES"))&&(c=hk(g,"LAYOUT"),(g=W(g,"DURATION"))&&(n=Number(g)));var Q=null;b=new Ck(e,q,function(){if(B)return B();Q==null&&(Q=ok(h(),d.h,f));return Q||[]},t,u,b,0,0,Infinity,x,c,n,v,y,l,x.length>0&&!!d.h);k&&(b.mimeType=k,$m.has(k)&&(b.$=null));w&&(a.Vb=!0,b.zg(),I&&b.vf());return b}
function Ym(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.endByte+1,d=c+b-1);return[c,d]}
function Yl(a,b,c,d,e){if(c=="video"||c=="audio"){var f=a.l.m;if(f&&!$l(a,c))for(b=kk(b,"EXT-X-DATERANGE"),b=b.filter(function(F){return gk(F,"START-DATE")!=null}).sort(function(F,J){F=hk(F,"START-DATE");J=hk(J,"START-DATE");return F<J?-1:F>J?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=hk(g,"START-DATE"),k=sd(h);if(!isNaN(k)){var l=Math.max(0,k-f),m=null,n=W(g,"END-DATE");if(n){var q=sd(n);if(!isNaN(q)&&(m=q-f,m<0))continue}if(m==null){var t=W(g,"DURATION")||W(g,"PLANNED-DURATION");if(t){var u=
parseFloat(t);isNaN(u)||(m=l+u);if(k-f+u<0)continue}}var v=W(g,"CLASS")||"com.apple.quicktime.HLS",w=W(g,"END-ON-NEXT")=="YES";if(m==null&&w){for(var y=c+1;y<b.length;y++){var x=W(b[y],"CLASS")||"com.apple.quicktime.HLS";if(v==x){var B=hk(b[y],"START-DATE"),C=sd(B);if(!isNaN(C)&&C&&C>k){m=Math.max(0,C-f);break}}}if(m==null)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var I=[],E=r(g.attributes),z=E.next();!z.done;z=E.next()){var D=z.value;if(!y.includes(D.name)){var G=
qk(D.value,d);if(D.name=="X-ASSET-URI"||D.name=="X-ASSET-LIST")G=ok(e(),D.value,d)[0];I.push({key:D.name,description:"",data:G,mimeType:null,pictureType:null})}}if(I.length>1)a.h.onMetadata(v,l,m,I)}}catch(F){}}}}
function Vl(a,b,c,d,e,f){function g(F){F=il(F);if(!F)return null;var J=Zm.get(f).get(F);J||(J=rm.get(F));return J}var h=b.segments,k=null,l=null,m=null,n=null,q=void 0,t=nk(b.W,"EXT-X-DISCONTINUITY-SEQUENCE",-1),u=nk(b.W,"EXT-X-MEDIA-SEQUENCE",0),v=mk(b.W,"EXT-X-SKIP"),w=v?Number(W(v,"SKIPPED-SEGMENTS")):0,y=u+w,x=0;Nl(a)&&c.has(y)&&(x=c.get(y));x===0&&a.Fa==um&&c.size>0&&!c.has(y)&&a.l.i!=null&&(x=a.l.$d());var B=[],C=null;v=[];for(var I=0;I<h.length;I++){var E=h[I];(y=mk(E.W,"EXT-X-MAP"))&&y.id!==
l&&(k=Tm(a,b,E.W,e,d),l=y.id);y=E.h;var z="";y&&(z=il(y));z!==n&&(m=g(y),n=z);z=I==0?x:C.endTime;y=u+w+I;mk(E.W,"EXT-X-DISCONTINUITY")&&(t++,C&&C.$&&(C.$.g=z));for(var D=r(E.W),G=D.next();!G.done;G=D.next())G=G.value,G.name=="EXT-X-KEY"&&(Em(hk(G,"METHOD"))?q=Um(a,G,b,e,d):q=void 0);c.set(y,z);if(z=Xm(a,k,C,E,z,d,f,e,m,q)){if(C=nk(E.W,"EXT-X-BITRATE"))v.push({bitrate:C,duration:z.endTime-z.startTime}),z.bandwidth=C;else if(z.endByte){if(E=Ek(z))C=z.endTime-z.startTime,E=E*8/C/1E3,v.push({bitrate:E,
duration:C}),z.bandwidth=E}else v.length&&(C=v.pop(),C.duration+=z.endTime-z.startTime,v.push(C),z.bandwidth=C.bitrate);if(z.bandwidth)for(C=r(z.g),E=C.next();!E.done;E=C.next())E.value.bandwidth=z.bandwidth;C=z;z.i=t;$l(a,f)&&a.L!=null&&y<a.L||B.push(z)}}b=void 0;v.length&&(b=v.reduce(function(F,J){return F+J.duration},0),b=Math.round(v.reduce(function(F,J){return F+J.bitrate*J.duration},0)/b*1E3));if(v=B.some(function(F){return F.h!=null}))for(c={},d=0;d<B.length;c={Vd:void 0,Ud:void 0,Md:void 0,
yc:void 0,Ld:void 0},d++)if(c.yc=B[d],c.yc.h==null)for(c.Ud=0,c.Vd=d,e=function(F){return function(){var J=B[F.Vd];if(J){if(J.h!=null)return J.h+F.Ud;F.Ud-=J.endTime-J.startTime;F.Vd+=1}return null}}(c),c.Ld=0,c.Md=d,h=function(F){return function(){var J=B[F.Md];if(J){J!=F.yc&&(F.Ld+=J.endTime-J.startTime);if(J.h!=null)return J.h+F.Ld;--F.Md}return null}}(c);c.yc.h==null;)c.yc.h=h(),c.yc.h==null&&(c.yc.h=e());if(v)for(c=r(B),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=r(e.g),h=e.next();!h.done;h=
e.next())h=h.value,h.h=d,d+=h.endTime-h.startTime;c=a.na;if(v&&c!=Infinity&&!$l(a,f))for(a=r(B),v=a.next();!v.done;v=a.next())v.value.Qf(c);return{segments:B,bandwidth:b}}function ym(a,b){if(a==Ac){if(b=="vtt"||b=="wvtt")return"text/vtt";if(b&&b!=="")return"application/mp4"}return a!="image"||b&&b!="jpeg"?a=="audio"&&b=="mp4a.40.34"?"audio/mpeg":b=="mjpg"?"application/mp4":null:"image/jpeg"}function zm(a){return a==Ac?"text/vtt":Zm.get(a).get("mp4")}
function qm(a,b){a=Nl(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];c.cc()==2&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function Sm(a,b,c,d){var e,f,g,h,k,l,m,n,q,t,u,v,w;return L(function(y){switch(y.g){case 1:e=ej;f=qm(a,d);g=f.segment;if(g.status==2)return y.return(zm(b));k=g.M();if(l=il(k[0]))if(m=Zm.get(b),(n=m.get(l))||(n=rm.get(l)))return y.return(n);if(h=ym(b,c))return y.return(h);t=1;u=Zi(k,a.g.retryParameters);va(y,2);u.method="HEAD";return H(y,tm(a,u,e,{type:t}).promise,4);case 4:v=y.h;q=v.headers["content-type"];xa(y,3);break;case 2:w=za(y);if(!w||w.code!=1002&&w.code!=1001){y.u(3);break}u.method="GET";
a.g.hls.allowRangeRequestsToGuessMimeType&&(u.headers.Range="bytes=0-0");return H(y,tm(a,u,e,{type:t}).promise,6);case 6:v=y.h,q=v.headers["content-type"];case 3:if(!q){y.u(7);break}h=q.toLowerCase().split(";")[0];if(h!="application/octet-stream"){y.u(8);break}if(v.data.byteLength){y.u(9);break}u.method="GET";return H(y,tm(a,u,e,{type:t}).promise,10);case 10:v=y.h;case 9:Lh(Vb(v.data))&&(h="video/mp2t");case 8:if(h!="application/octet-stream")return y.return(h);case 7:return y.return(zm(b))}})}
function Nm(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 Ll(a,b,c){return tm(a,Zi(b,a.g.retryParameters),0,{type:c?2:3})}
function Jl(a){var b,c,d,e,f,g;return L(function(h){switch(h.g){case 1:if(!a.h)return h.return();va(h,2);b=Date.now();return H(h,a.update(),4);case 4:c=Date.now();Nl(a)&&(d=(c-b)/1E3,a.Fb.sample(1,d),e=a.g.updatePeriod>0?a.g.updatePeriod:a.o,f=Math.max(0,e-Za(a.Fb)),a.D.ka(f));xa(h,3);break;case 2:g=za(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.D.ka(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
K(h)}})}function Nl(a){return a.Fa!=Kl}function Ql(a,b){a.Fa=b;a.l&&a.l.xe(!Nl(a));Nl(a)||a.D.stop()}function tm(a,b,c,d){if(!a.ea)throw new T(2,7,7001);d||(d={});d.isPreload=a.Gb();b=a.h.networkingEngine.request(c,b,d);Ti(a.ea,b);return b}function Em(a){return a=="AES-128"||a=="AES-256"||a=="AES-256-CTR"}
function Il(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(m.g==1){if(c=="video/mp2t")throw new T(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new T(2,4,4041);e=hk(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";e=="SAMPLE-AES"&&(g="cbcs");h=hk(b,"URI");k=uc("com.apple.fps",g,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],h);var n=(new Db(h)).mb.replace(/-/g,"").toLowerCase();return(l=n.length===32&&/^[0-9a-f]+$/.test(n)?
n:null)||!d?m.u(2):H(m,an(a,d),3)}m.g!=2&&(l=m.h);l&&k.keyIds.add(l);return m.return(k)})}
function Fm(a,b,c,d,e,f){var g,h,k,l,m,n,q,t,u,v,w,y;return L(function(x){switch(x.g){case 1:if(c=="video/mp2t")throw new T(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new T(2,4,4041);g=hk(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return x.return(null);k=ok(d(),hk(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=rc(pc(k[0].split("data:text/plain;base64,").pop()));x.u(2);break}m=k.sort().join("");a.va.has(m)||(n=Zi(k,a.g.retryParameters),q=tm(a,n,6).promise,
a.va.set(m,q));return H(x,a.va.get(m),3);case 3:t=x.h,l=rc(t.data);case 2:u="00000000000000000000000000000000";if(!e){x.u(4);break}return H(x,an(a,e),5);case 5:(v=x.h)&&(u=v);case 4:return w=new Map,w.set(u,l),y="cenc",g=="SAMPLE-AES"&&(y="cbcs"),x.return(wc(w,y))}})}
function an(a,b){var c,d,e,f;return L(function(g){if(g.g==1){c=null;if(a.wa.has(b))return c=a.wa.get(b),g.u(2);d=ql(b.M(),b.bc(),b.ac(),a.g.retryParameters);e=ej;return H(g,tm(a,d,e,{type:0}).promise,3)}g.g!=2&&(f=g.h,b.qd(f.data),c=cl(f.data),a.wa.set(b,c));return g.return(c)})}S("shaka.hls.HlsParser",Hl);
var rm=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),bn=(new Map).set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),cn=(new Map).set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts",
"video/mp2t").set("tsv","video/mp2t"),dn=(new Map).set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),en=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),Zm=(new Map).set("audio",bn).set("video",cn).set("text",dn).set("image",en),$m=new Set(["video/mp2t"].concat(A(ee))),
Kl="VOD",Vm="EVENT",um="LIVE";Hk("application/x-mpegurl",function(){return new Hl});Hk("application/vnd.apple.mpegurl",function(){return new Hl});function fn(a,b,c){c=c===void 0?!0:c;this.h=a;this.g=new Set([a]);b=b||[];a=r(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}
fn.prototype.add=function(a,b){var c=this.h;b=b===void 0?!0:b;var d;if(!(d=!!c.audio!=!!a.audio||!!c.video!=!!a.video||c.language!=a.language)&&(d=c.audio&&a.audio)){d=c.audio;var e=a.audio;d=!(!((!d.channelsCount||!e.channelsCount||d.channelsCount>2||e.channelsCount>2)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!gn(d,e))&&hn(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||gn(c,d))&&hn(c.roles,d.roles)));return d?!1:(this.g.add(a),
!0)};fn.prototype.values=function(){return this.g.values()};function gn(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ke(d)});b=b.codecs.split(",").map(function(d){return ke(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 hn(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0}S("shaka.media.AdaptationSet",fn);function jn(){this.g=kn;this.i=(new Map).set(kn,2).set(ln,1);this.h=0}function mn(a,b){var c=a.g!==b;a.g=b;c&&b===kn&&(a.h=Date.now());return c}var ln=0,kn=1;function nn(a){this.g=a}
function on(a){for(var b=[],c=r(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=pn;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;g.type=="audio"&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(qn+1));m=Math.floor(m%(qn+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(A(rn(h,4)),[0,0,0,0],A(rn(n,4)),A(rn(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],A(rn(k,2)),[0,0],A(rn(l,
2)),[0,0]));h=pn("tkhd",h);k=pn;n=g.duration*g.timescale;l=Math.floor(n/(qn+1));n=Math.floor(n%(qn+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(A(rn(g.timescale,4)),A(rn(l,4)),A(rn(n,4)),A(rn(m,2)),[0,0]));l=pn("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=sn.value();break;case "audio":m=tn.value()}n=pn("hdlr",m);a:{switch(g.type){case "video":g=pn("minf",pn("vmhd",un.value()),
vn.value(),wn(g));break a;case "audio":g=pn("minf",pn("smhd",xn.value()),vn.value(),wn(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=sc.apply(mc,A(b));f=a.g[0];c=pn;d=f.duration*f.timescale;e=Math.floor(d/(qn+1));d=Math.floor(d%(qn+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(A(rn(f.timescale,4)),A(rn(e,4)),A(rn(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=pn("mvhd",e);d=[];a=r(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(A(rn(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=pn("trex",k),h.call(g,k);a=sc.apply(mc,A(d));a=pn("mvex",a);d=[];if(f.encrypted){f=r(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=r(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=sc.apply(mc,A(d))}else f=new Uint8Array([]);
a=c("moov",e,b,a,f);b=yn.value();c=new Uint8Array(b.byteLength+a.byteLength);c.set(b);c.set(a,b.byteLength);return c}
function wn(a){var b=pn,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=sb().pd()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;d=a.stream.height||0;if(a.Ja.byteLength>0)var e=pn("avcC",a.Ja);else{e=pn;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.rb.length;n++){var q=zn(a.rb[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),
f+=q.length+2}}g.length>0&&(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(A(rn(c,2)),A(rn(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=An(a);g=new Uint8Array([]);a.encrypted&&(g=Bn(a.stream,a.codecs),d="encv");d=pn(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),a.Ja.byteLength>0&&(c=pn("hvcC",a.Ja)),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(A(rn(d,2)),A(rn(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=An(a),g=new Uint8Array([]),a.encrypted&&(g=Bn(a.stream,a.codecs),e="encv"),d=pn(e,d,c,h,g));break;case "audio":if(c=="mp3")a=pn(".mp3",Cn(a));else if(c=="ac-3")c=pn("dac3",a.Aa),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Bn(a.stream,a.codecs),d="enca"),a=pn(d,Cn(a),c,e);else if(c=="ec-3")c=pn("dec3",a.Aa),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Bn(a.stream,a.codecs),d="enca"),
a=pn(d,Cn(a),c,e);else if(c=="opus")c=pn("dOps",a.Aa),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Bn(a.stream,a.codecs),d="enca"),a=pn(d,Cn(a),c,e);else{if(a.Aa.byteLength>0)c=pn("esds",a.Aa);else{c=pn;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=xc("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(k==="mp4a.40.5"||k==="mp4a.40.29")h=l[g*2];g=parseInt(k.split(".").pop(),10);d=
new Uint8Array([0,0,0,0,3,25].concat(A(rn(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=Bn(a.stream,a.codecs),d="enca");a=pn(d,Cn(a),c,e)}d=a}a=pn("stsd",Dn.value(),d);return b("stbl",a,pn("stts",En.value()),pn("stsc",Fn.value()),pn("stsz",Gn.value()),pn("stco",Hn.value()))}
function An(a){if(!a.Oa&&!a.Qa)return new Uint8Array([]);var b=a.Qa;a=new Uint8Array([].concat(A(rn(a.Oa,4)),A(rn(b,4))));return pn("pasp",a)}function Cn(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(A(rn(a.stream.audioSamplingRate||44100,2)),[0,0]))}
function Bn(a,b){var c=pn;b=new Uint8Array([].concat(A(rn(In(b.split(".")[0]),4))));b=pn("frma",b);var d="cenc";var e=a.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(A(rn(In(d),4)),[0,1,0,0]));d=pn("schm",d);e=pn;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=r(a.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=r(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=zn(h.value)}a=new Uint8Array([0,0,0,0,
0,0,1,8]);f=pn("tenc",a,f);return c("sinf",b,d,e("schi",f))}
function Jn(a){var b=[];a=r(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=pn;var g=new Uint8Array([0,0,0,0].concat(A(rn(c.data?c.data.sequenceNumber:0,4))));g=pn("mfhd",g);var h;var k=c.data?c.data.jb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ua<<4|m.Za<<2|m.Xa}k=pn("sdtp",l);var n=k.length+32+20+8+16+8+8;l=pn;h=new Uint8Array([0,0,0,58].concat(A(rn(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=pn("tfhd",h);m=c.data?
c.data.baseMediaDecodeTime:0;var q=Math.floor(m%(qn+1));m=new Uint8Array([1,0,0,0].concat(A(rn(Math.floor(m/(qn+1)),4)),A(rn(q,4))));m=pn("tfdt",m);var t=n;n=c.data?c.data.jb:[];q=n.length;var u=12+16*q,v=new Uint8Array(u);t+=8+u;v.set([c.type==="video"?1:0,0,15,1].concat(A(rn(q,4)),A(rn(t,4))),0);for(t=0;t<q;t++){var w=n[t];u=rn(w.duration,4);var y=rn(w.size,4),x=w.flags;w=rn(w.eb,4);v.set([].concat(A(u),A(y),[x.gb<<2|x.Ua,x.Za<<6|x.Xa<<4|x.hb,x.Ta&61440,x.Ta&15],A(w)),12+16*t)}n=pn("trun",v);k=
l("traf",h,m,n,k);f=f("moof",g,k);e.call(d,b,[f,Kn(c)])}return sc.apply(mc,A(b))}function Kn(a){a=(a.data?a.data.jb:[]).map(function(b){return b.data});a=sc.apply(mc,A(a));return pn("mdat",a)}function rn(a,b){var c=[];for(--b;b>=0;b--)c.push(a>>8*b&255);return c}function zn(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[c*2]+a[c*2+1]),16);return b}function In(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<(a.length-c-1)*8;return b}
function pn(a){var b=Ka.apply(1,arguments),c=Ln.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Ln.set(a,c));for(var d=8,e=b.length-1;e>=0;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
var qn=4294967295,Ln=new Map,sn=new rb(function(){return 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])}),tn=new rb(function(){return 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])}),En=new rb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),Fn=new rb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),Hn=new rb(function(){return new Uint8Array([0,
0,0,0,0,0,0,0])}),Gn=new rb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),un=new rb(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),xn=new rb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),Dn=new rb(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),yn=new rb(function(){var a=new Uint8Array([105,115,111,109]),b=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);return pn("ftyp",a,c,a,b)}),vn=new rb(function(){var a=new Uint8Array([0,0,0,0,0,0,0,1,0,
0,0,12,117,114,108,32,0,0,0,1]);a=pn("dref",a);return pn("dinf",a)});function Mn(a){a=Vb(a);var b=null;(new Mg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).O("stsd",Tg).box("enca",function(c){b=c.reader.h;return Vg(c)}).box("sinf",Rg).box("frma",function(c){c.parser.stop();bh(c.reader).codec==="ec-3"&&b&&b.getUint16(16)!==2&&b.setUint16(16,2)}).parse(a);return a}
function Nn(a,b,c){function d(t){n.push({box:t,Gg:1701733217})}function e(t){n.push({box:t,Gg:1701733238})}function f(t){k=!0;t.parser.stop()}function g(t){m.push(t);Rg(t)}var h=b=Vb(b),k=!1,l,m=[],n=[];(new Mg).box("moov",g).box("trak",g).box("mdia",g).box("minf",g).box("stbl",g).O("stsd",function(t){l=t;m.push(t);Tg(t)}).O("encv",f).O("enca",f).O("dvav",e).O("dva1",e).O("dvh1",e).O("dvhe",e).O("dvc1",e).O("dvi1",e).O("hev1",e).O("hvc1",e).O("avc1",e).O("avc3",e).O("ac-3",d).O("ec-3",d).O("ac-4",
d).O("Opus",d).O("fLaC",d).O("mp4a",d).parse(b);if(k)return b;if(n.length==0||!l)throw gb(rc(b)),new T(2,3,3019,c);n.reverse();c=r(n);for(var q=c.next();!q.done;q=c.next())q=q.value,h=On(a,h,l,q.box,m,q.Gg);return sb().Og()?(a=new Uint8Array(b.byteLength+h.byteLength),a.set(h),a.set(b,h.byteLength),a):h}
function Pn(a){a=Vb(a);var b=[];(new Mg).box("mdat",function(g){b.push(g)}).parse(a);for(var c=[],d=0;d<b.length;d++){var e=b[d-1],f=b[d];c.push(Qn(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return sc.apply(mc,A(c))}
function Qn(a){function b(n){g.push(n);Rg(n)}var c,d,e,f,g=[];(new Mg).box("moof",b).box("traf",b).O("tfhd",function(n){c=n;e=Xg(n.reader,n.flags)}).O("trun",function(n){d=n;f=$g(n.reader,n.version,n.flags)}).parse(a);if(e&&e.Sg!==2){var h=c.start+Sg(c)+4+(e.wh!==null?8:0),k=Zb(a);if(e.Sg!==null)k.setUint32(h,2);else{Rn(a,c.start,c.size+4);var l=k.getUint32(c.start+8);k.setUint32(c.start+8,l|2);f&&f.Se!==null&&k.setInt32(d.start+Sg(d)+4,f.Se+4);l=a.subarray(0,h);k=a.subarray(h);a=new Uint8Array(a.byteLength+
4);a.set(l);l=[];for(var m=3;m>=0;m--)l.push(2>>8*m&255);a.set(new Uint8Array(l),h);a.set(k,h+4);h=r(g);for(k=h.next();!k.done;k=h.next())k=k.value,Rn(a,k.start,k.size+4)}}return a}
function On(a,b,c,d,e,f){var g=Bn(a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Zb(a).setUint32(4,f);a.set(g,d.size);Rn(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=sb().ce()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=r(e);for(e=b.next();!e.done;e=b.next())e=e.value,Rn(f,e.start,e.size+a.byteLength);a=Zb(f,c.start);c=Sg(c);b=a.getUint32(c);a.setUint32(c,b+1);return f}
function Rn(a,b,c){a=Zb(a,b);b=a.getUint32(0);b!=0&&(b==1?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}
function Sn(a){function b(e){d.push({start:e.start,size:e.size});Rg(e)}var c=Vb(a),d=[];(new Mg).box("moov",b).box("trak",b).box("mdia",b).box("minf",b).box("stbl",b).box("stsd",function(e){d.push({start:e.start,size:e.size});for(var f=Zb(c,e.start),g=0;g<e.size-3;g++){var h=f.getUint32(g);h==1633889587?f.setUint32(g,1700998451):h==1684103987&&f.setUint32(g,1684366131)}}).parse(c);return c};function Tn(a){return a.length==1&&a.end(0)-a.start(0)<1E-4}function Un(a){return!a||Tn(a)?null:a.length==1&&a.start(0)<0?0:a.length?a.start(0):null}function Vn(a){return!a||Tn(a)?null:a.length?a.end(a.length-1):null}function Wn(a,b){return!a||!a.length||Tn(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Xn(a,b){if(!a||!a.length||Tn(a))return 0;var c=0;a=r(Yn(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 Zn(a,b,c){if(!a||!a.length||Tn(a))return null;a=Yn(a).findIndex(function(d,e,f){return d.start>b&&(e==0||f[e-1].end-b<=c)});return a>=0?a:null}function Yn(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function $n(a,b,c,d){var e=this;this.A=d;this.g=a;this.D=b;this.h=c;this.j=new mb;this.m=!1;this.l=0;this.C=!1;this.H=this.F=0;this.o=ao(this);this.B=!1;this.j.G(a,"waiting",function(){return bo(e)});this.i=(new Ge(function(){bo(e)})).Ea(this.h.gapJumpTimerTime)}$n.prototype.release=function(){this.j&&(this.j.release(),this.j=null);this.i!=null&&(this.i.stop(),this.i=null);this.o&&(this.o.release(),this.o=null);this.g=this.D=this.A=null};
$n.prototype.oe=function(){this.B=!0;this.i&&this.i.Ea(this.h.gapJumpTimerTime);bo(this)};
function bo(a){if(a.g.readyState!=0){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||a.g.currentTime==a.l&&(a.g.autoplay||a.g.currentTime!=a.l)){var b;if(!(b=!a.o)){b=a.o;var c=b.h,d=co(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.i=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.i)b.j&&b.j(b.g,e),b.i=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Zn(c,b,a.h.gapDetectionThreshold),d==null||d==0&&!a.B||(e=c.start(d),(f=a.h.gapPadding)&&(e=Math.ceil((e+f)*
100)/100),e>=a.D.ob()||e-b<.001||(d!=0&&c.end(d-1),eo(a,e),b==a.l&&(a.l=e),a.F++,a.A(new Qi("gapjumped")))))}}}function eo(a,b){a.C=!0;a.j.Pa(a.g,"seeked",function(){a.C=!1});a.g.currentTime=b}
function ao(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new fo(new go(a.g),b,function(){var d;return L(function(e){if(e.g==1)return d=Yn(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.u(2)):H(e,a.g.play(),3):e.return();if(e.g!=2){if(!a.g)return e.return();a.g.pause();a.g.play()}a.H++;a.A(new Qi("stalldetected"));K(e)})})}function fo(a,b,c){this.h=a;this.m=co(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.o=b;this.j=c}
fo.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function go(a){var b=this;this.g=a;this.h=new mb;this.i=!1;this.h.G(this.g,"audiofocuspaused",function(){b.i=!0});this.h.G(this.g,"audiofocusgranted",function(){b.i=!1});this.h.G(this.g,"audiofocuslost",function(){b.i=!0})}
function co(a){if(a.g.paused||a.g.playbackRate==0||a.i||a.g.buffered.length==0)var b=!1;else a:{b=a.g.currentTime;a=r(Yn(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}go.prototype.release=function(){this.h&&this.h.release();this.h=null};/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function ho(a,b,c){this.g=a;this.i=b;this.h=c}function io(a,b){return L(function(c){if(c.g==1)return H(c,Ze(a.h,b,a.g.drm.preferredKeySystems,a.g.drm.keySystemsMapping),2);a.g.streaming.dontChooseCodecs||We(b,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes,a.g.preferredTextFormats);if(!b.variants.some(yf))throw new T(2,4,4032);return c.return(jo(a,b))})}
function ko(a,b){var c=a.g.restrictions;a=a.i;var d=!1;b=r(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Ye(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
function jo(a,b){var c=ko(a,b);if(b){var d=a.h?a.h.g:null;if(d&&a.h.B){for(var e=new Set,f=r(b.variants),g=f.next();!g.done;g=f.next())g=g.value,g.audio&&e.add(g.audio),g.video&&e.add(g.video);e=r(e);for(f=e.next();!f.done;f=e.next())lo(a,d.keySystem,f.value)}mo(a,b)}return c}function lo(a,b,c){c=r(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=r(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Bj(a.h,e.initDataType,e.initData)}}
function mo(a,b){a=a.h?a.h.Xd():{};var c=Object.keys(a);c=c.length&&c[0]=="00";var d=!1,e=!1,f=new Set,g=new Set,h=new Set;b=r(b.variants);for(var k=b.next();!k.done;k=b.next())k=k.value,k.audio&&h.add(k.audio),k.video&&h.add(k.video),k.allowedByApplication?k.allowedByKeySystem&&(d=!0):e=!0;h=r(h);for(b=h.next();!b.done;b=h.next())if(b=b.value,b.keyIds.size)for(b=r(b.keyIds),k=b.next();!k.done;k=b.next()){k=k.value;var l=a[c?"00":k];l?no.includes(l)&&g.add(l):f.add(k)}if(!d)throw a={hasAppRestrictions:e,
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var no=["output-restricted","internal-error"];function oo(a,b,c,d,e){var f=this;this.g=a;this.P=c;this.B=d;this.ia=b;this.l=new Map;this.D=new Map;this.Ga=new Map;this.h=null;this.Fa=!1;this.H=e||null;this.o=new Map;this.A=new mb;this.j=new Map;this.J=null;this.L=new Ji;this.za="";this.$a=!1;this.xa=!0;this.N=!1;this.C=this.S=null;this.i=po(this,this.L);this.Na=this.F=!1;this.K=new gj(function(){return qo(f)});this.I=!1;this.aa="UNKNOWN";this.Wa=this.Ya=!1;this.Ha=new Ji;this.m=!1;this.wa=null;this.ea=new Map;this.ua=this.V=this.va=this.Y=null;
this.na=new Ji;this.g.remote&&(this.N=this.g.remote.state!="disconnected",this.A.G(this.g.remote,"connect",function(){f.N=f.g.remote.state!="disconnected"}),this.A.G(this.g.remote,"connecting",function(){f.N=f.g.remote.state!="disconnected"}),this.A.G(this.g.remote,"disconnect",function(){f.N=f.g.remote.state!="disconnected"}))}
function po(a,b){a.xa=!0;if(window.ManagedMediaSource){a.C||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.A.G(c,"startstreaming",function(){a.xa=!0});a.A.G(c,"endstreaming",function(){a.xa=!1})}else c=new MediaSource;a.A.Pa(c,"sourceopen",function(){URL.revokeObjectURL(a.za);b.resolve()});a.A.Pa(a.g,"playing",function(){a.$a=!0});a.za=ro(c);a.B.useSourceElements?(a.g.removeAttribute("src"),a.S&&a.g.removeChild(a.S),a.C&&a.g.removeChild(a.C),a.S=Sh(a.za),a.g.appendChild(a.S),a.C&&a.g.appendChild(a.C),
a.g.load()):a.g.src=a.za;return c}function so(a,b,c){a.g&&window.ManagedMediaSource&&a.i&&a.B.useSourceElements&&(a.C&&a.g.removeChild(a.C),a.C=Sh(b,c),a.g.appendChild(a.C),a.g.disableRemotePlayback=!1)}
function to(){var a='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(A(ee)),b=
{};sb();a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(se(c))b[c]=!0;else if(hi()){var d=le(c),e=lf(me(c),d);d=de(d,e);b[c]=Hc(d)||(Yd(d)?!0:!1)}else b[c]=ci().canPlayType(c)!="";d=c.split(";")[0];b[d]=b[d]||b[c]}return b}p=oo.prototype;p.destroy=function(){return this.K.destroy()};
function qo(a){var b,c,d,e,f,g,h,k,l,m,n,q,t,u,v;return L(function(w){if(w.g==1){b=[];c=r(a.o);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=r(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.o.set(l,h.slice(0,1)),k&&b.push(k.p.catch(Ie)),m=r(h.slice(1)),n=m.next();!n.done;n=m.next())q=n.value,q.p.reject(new T(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return H(w,Promise.all(b),2)}t=r(a.j.values());for(u=t.next();!u.done;u=t.next())v=u.value,v.destroy();a.A&&(a.A.release(),a.A=null);a.g&&a.C&&
a.g.removeChild(a.C);a.g&&a.S&&(a.g.removeChild(a.S),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.S=null;a.C=null;a.B=null;a.i=null;a.h=null;a.ia=null;a.l.clear();a.Ga.clear();a.j.clear();a.J=null;a.o.clear();a.H=null;a.ea.clear();a.P=null;K(w)})}
p.init=function(a,b,c,d){b=b===void 0?!1:b;c=c===void 0?"UNKNOWN":c;d=d===void 0?!1:d;var e=this,f,g,h,k,l,m;return L(function(n){if(n.g==1)return f=Cc,H(n,e.L,2);if(n.g!=3){if(!uo(e)&&!vo(e))return n.u(3);bb("Expected MediaSource to be open during init(); reopening the media source.");e.L=new Ji;e.i=po(e,e.L);return H(n,e.L,3)}e.I=b;e.aa=c;e.Ya=d;e.Wa=!e.I&&e.aa=="HLS"&&!e.Ya;e.ea.clear();e.Y=null;e.va=null;e.V=null;e.ua=null;e.na=new Ji;g=r(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,
l=a.get(k),wo(e,k,l,l.codecs),e.m?(e.o.set(f.Z,[]),e.o.set(f.qa,[])):e.o.set(k,[]);(m=a.get(f.Z))&&m.isAudioMuxedInVideo&&(e.m=!0);K(n)})};
function wo(a,b,c,d){b=="audio"&&d&&(d=lf(d,c.mimeType));var e=de(c.mimeType,d);if(b==Ac)xo(a,e,a.I,c.external);else{var f=a.B.forceTransmux;if(!Hc(e)||!a.I&&ee.includes(e))f=!0;var g=fe(c.mimeType,d);if(f){f=yc("audio",(d||"").split(","));d=yc("video",(d||"").split(","));if(f&&d){a.m=!0;wo(a,"audio",c,f);wo(a,"video",c,d);return}if(d=Yd(g))e=d(),a.j.set(b,e),e=e.convertCodecs(b,g)}g=e+a.B.addExtraFeaturesToSourceBuffer(e);hj(a.K);try{var h=a.i.addSourceBuffer(g)}catch(k){throw new T(2,3,3015,k,"The mediaSource_ status was "+
a.i.readyState+" expected 'open'",null);}a.I&&(h.mode=yo);a.A.G(h,"error",function(){var k=a.o.get(b)[0];k.p.reject(new T(2,3,3014,a.g.error?a.g.error.code:0,k.uri))});a.A.G(h,"updateend",function(){return zo(a,b)});a.l.set(b,h);a.D.set(b,e);a.Ga.set(b,!!c.drmInfos.length)}}p.configure=function(a){this.B=a;this.h&&(this.h.B=a.modifyCueCallback)};function Ao(a){return a.xa&&!a.N&&!a.F}
function xo(a,b,c,d){a.h||(a.h=new oe(a.ia),a.h&&(a.h.B=a.B.modifyCueCallback));var e=a.h;d=d||a.Fa;a=a.aa;b=="application/cea-608"||b=="application/cea-708"?e.i=null:(e.i=qe.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):yb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):yb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.C=d)}
function uo(a){return a.F?!1:a.i?a.i.readyState=="ended":!0}function vo(a){return a.F?!1:a.i?a.i.readyState=="closed":!0}function Bo(a,b){return a.l.size?b==Ac?a.h.g:Un(Co(a,b)):null}function Do(a,b){return a.l.size?b==Ac?a.h.h:Vn(Co(a,b)):null}function Eo(a,b,c){if(b==Ac)return a=a.h,a.h==null||a.h<c?0:a.h-Math.max(c,a.g);a=Co(a,b);return Xn(a,c)}
p.$b=function(){var a={total:this.F?[]:Yn(this.g.buffered),audio:Yn(Co(this,"audio")),video:Yn(Co(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;b!=null&&c!=null&&a.text.push({start:b,end:c})}return a};function Co(a,b){if(a.F||a.N)return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function Fo(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=null,k=[],l=Vb(c);if(ee.includes(f))c=Bh(l),c.length&&d&&((g=c.find(function(u){return u.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof g.data=="number"&&(h=Math.round(g.data)/1E3),a.P.onMetadata([{cueTime:d.startTime,data:l,frames:c,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.$){l=new Mg;var m=e.emsgSchemeIdUris!=null&&e.emsgSchemeIdUris.length>0||a.B.dispatchAllEmsgBoxes;m&&l.O("emsg",
function(u){var v=e.emsgSchemeIdUris;if(u.version===0){var w=u.reader.xc();var y=u.reader.xc();var x=u.reader.R();var B=u.reader.R();var C=u.reader.R();var I=u.reader.R();var E=d.startTime+B/x}else x=u.reader.R(),E=u.reader.re()/x+d.m,B=E-d.startTime,C=u.reader.R(),I=u.reader.R(),w=u.reader.xc(),y=u.reader.xc();u=u.reader.Ab(u.reader.getLength()-u.reader.Va(),!0);if(v&&v.includes(w)||a.B.dispatchAllEmsgBoxes)if(w=="urn:mpeg:dash:event:2012")a.P.Qi();else if(v=E+C/x,a.P.Oi({startTime:E,endTime:v,schemeIdUri:w,
value:y,timescale:x,presentationTimeDelta:B,eventDuration:C,id:I,messageData:u}),w=="https://aomedia.org/emsg/ID3"||w=="https://developer.apple.com/streaming/emsg-id3")if(x=Bh(u),x.length)a.P.onMetadata([{cueTime:E,data:u,frames:x,dts:E,pts:E}],0,v)});var n=d.$.timescale;b=n&&!isNaN(n);var q=0,t=!1;b&&l.O("prft",function(u){var v=u.reader,w=u.version;v.R();u=v.R();var y=v.R();u=u*1E3+y/4294967296*1E3;w===0?v=v.R():(w=v.R(),v=v.R(),v=w*4294967296+v);u=(new Date(Date.UTC(1900,0,1,0,0,0,0)+u)).getTime();
v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/n*1E3)});v=new Qi("prft",v);a.P.onEvent(v)}).box("moof",Rg).box("traf",Rg).O("tfdt",function(u){t||(q=Yg(u.reader,u.version).baseMediaDecodeTime/n,t=!0,m||u.parser.stop())});(m||b)&&l.parse(c,!1,g);t&&d.m==0&&(h=q)}else f.includes("/mp4")||f.includes("/webm")||!Lh(l)||(a.ea.has(b)||a.ea.set(b,new Dh),k=a.ea.get(b),k.clearData(),k.we(d.i),k.parse(l),l=k.getStartTime(b),l!=null&&(h=l),k=k.getMetadata());return{timestamp:h,metadata:k}}
function Go(a,b,c,d,e,f,g,h,k,l,m){g=g===void 0?!1:g;h=h===void 0?!1:h;k=k===void 0?!1:k;l=l===void 0?!1:l;var n,q,t,u,v,w,y,x,B,C,I,E,z,D,G,F,J,M,O,R,P;return L(function(N){switch(N.g){case 1:n=Cc;if(b!=n.Ka){N.u(2);break}if(a.aa!="HLS"){N.u(3);break}return H(N,a.Ha,4);case 4:q=N.h,a.h.A=q;case 3:return H(N,te(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return N.return();case 2:if(l||!a.m){N.u(6);break}return H(N,Go(a,n.Z,c,d,e,f,g,h,k,!0),7);case 7:return H(N,Go(a,n.qa,
c,d,e,f,g,h,k,!0),8);case 8:return N.return();case 6:if(!a.l.has(b))return N.return();t=a.l.get(b).timestampOffset;u=a.D.get(b);a.j.has(b)&&(u=a.j.get(b).getOriginalMimeType());if(d&&(v=Fo(a,b,c,d,e,u,k),w=v.timestamp,y=v.metadata,w!=null&&(a.Y==null&&b==n.qa&&(a.Y=w,a.va=d.startTime,a.V!=null&&(x=0,a.va==a.ua&&(x=a.Y-a.V),a.na.resolve(x))),a.V==null&&b==n.Z&&(a.V=w,a.ua=d.startTime,a.Y!=null&&(B=0,a.va==a.ua&&(B=a.Y-a.V),a.na.resolve(B))),C=w,I=ee,!a.I&&I.includes(a.D.get(b))&&(C=0),E=d.startTime-
C,z=Math.abs(t-E),(z>=.001||g||h)&&(!k||E>0||!t)&&(t=E,a.Wa&&(Ho(a,b,function(){return Io(a,b)},null),Ho(a,b,function(){return Jo(a,b,t)},null))),(D=b==n.qa||!a.l.has(n.qa))&&a.Ha.resolve(t)),y.length))a.P.onMetadata(y,t,d?d.endTime:null);f&&b==n.qa&&(a.h||xo(a,"application/cea-608",a.I,!1),a.J||(G=u.split(";",1)[0],a.J=new Pc(G)),d?(F=a.J.pe(c),F.length&&Ee(a.h,F,t)):a.J.init(c,h,m));if(!a.j.has(b)){N.u(9);break}return H(N,a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:J=N.h,ArrayBuffer.isView(J)?
c=J:(M=J,M.init!=null&&(O=M.init,Ho(a,b,function(){a.H&&Ec(a.H,O,t,e);a.l.get(b).appendBuffer(O)},d?d.M()[0]:null)),c=M.data);case 9:c=Ko(a,e,c,d,b);if(!d||!a.I||b==n.Ka){N.u(11);break}if(!g&&!h){N.u(11);break}R=d.startTime;if(a.aa!="HLS"||a.m||b!=n.Z||!a.l.has(n.qa)){N.u(13);break}return H(N,a.na,14);case 14:P=N.h,Math.abs(P)>.15&&(R-=P);case 13:Ho(a,b,function(){return Io(a,b)},null),Ho(a,b,function(){return Jo(a,b,R)},null);case 11:return H(N,Ho(a,b,function(){var Q=c;a.H&&Ec(a.H,Q,t,e);a.l.get(b).appendBuffer(Q)},
d?d.M()[0]:null),15);case 15:K(N)}})}function Lo(a,b){var c=Do(a,"video")||0;Ce(a.h,b,c)}function Mo(a){a.h&&Ce(a.h,"",0)}p.remove=function(a,b,c,d){var e=this,f,g;return L(function(h){return h.g==1?(f=Cc,a==f.qa&&e.J&&(e.J.remove(d),g=e.h.g||0,e.h.remove(g,c,!0)),a==f.Ka?H(h,e.h.remove(b,c),0):c>b?H(h,Ho(e,a,function(){return No(e,a,b,c)},null),5):h.u(0)):e.m?H(h,Ho(e,f.Z,function(){return No(e,f.Z,b,c)},null),0):h.u(0)})};
function Oo(a,b){var c;return L(function(d){return d.g==1?(c=Cc,b==c.Ka?a.h?H(d,a.h.remove(0,Infinity),0):d.return():b===c.qa&&a.J&&a.h?H(d,a.h.remove(0,Infinity,!0),4):d.u(4)):d.g!=6?H(d,Ho(a,b,function(){return No(a,b,0,a.i.duration)},null),6):a.m?H(d,Ho(a,c.Z,function(){return No(a,c.Z,0,a.i.duration)},null),0):d.u(0)})}
p.flush=function(a){var b=this,c;return L(function(d){return d.g==1?(c=Cc,a==c.Ka?d.return():H(d,Ho(b,a,function(){b.g.currentTime-=.001;zo(b,a)},null),2)):b.m?H(d,Ho(b,c.Z,function(){var e=c.Z;b.g.currentTime-=.001;zo(b,e)},null),0):d.u(0)})};
function Po(a,b,c,d,e,f,g,h,k){var l,m,n;return L(function(q){if(q.g==1){l=Cc;if(b==l.Ka)return f||(a.h.A=c),Be(a.h,d,e),q.return();m=[];return H(q,Qo(a,b,g,h,k),2)}n=q.h;n||(m.push(Ho(a,b,function(){return Io(a,b)},null)),a.m&&m.push(Ho(a,l.Z,function(){return Io(a,l.Z)},null)));f||(m.push(Ho(a,b,function(){return Jo(a,b,c)},null)),a.m&&m.push(Ho(a,l.Z,function(){return Jo(a,l.Z,c)},null)));if(d!=0||e!=Infinity)m.push(Ho(a,b,function(){return Ro(a,b,d,e)},null)),a.m&&m.push(Ho(a,l.Z,function(){return Ro(a,
l.Z,d,e)},null));return m.length?H(q,Promise.all(m),0):q.u(0)})}function So(a,b,c){var d,e;return L(function(f){if(f.g==1){d=Cc;if(b==d.Ka)return f.return();b==d.qa&&(a.Ha=new Ji);if(!a.I||(e=Do(a,b))&&Math.abs(e-c)<.15)return f.return();Ho(a,b,function(){return Io(a,b)},null);a.m&&Ho(a,d.Z,function(){return Io(a,d.Z)},null);return H(f,Ho(a,b,function(){return Jo(a,b,c)},null),2)}return a.m?H(f,Ho(a,d.Z,function(){return Jo(a,d.Z,c)},null),0):f.u(0)})}
p.endOfStream=function(a){var b=this;return L(function(c){return H(c,To(b,function(){uo(b)||vo(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.hc=function(a){var b=this;return L(function(c){return H(c,To(b,function(){if(b.B.durationReductionEmitsUpdateEnd&&a<b.i.duration)for(var d=r(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:new Ji,uri:null};b.o.get(e).unshift(f)}b.i.duration=a;b.wa=a}),0)})};p.getDuration=function(){return this.i.duration};
function Uo(a,b,c){L(function(d){return a.K.g||a.g.error||a.N||a.F||uo(a)||vo(a)?d.return():H(d,To(a,function(){uo(a)||vo(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function Vo(a){L(function(b){return a.K.g||a.g.error||a.N||a.F||uo(a)||vo(a)?b.return():H(b,To(a,function(){uo(a)||vo(a)||a.i.clearLiveSeekableRange()}),0)})}function No(a,b,c,d){d<=c?zo(a,b):a.l.get(b).remove(c,d)}
function Io(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;zo(a,b)}function Jo(a,b,c){c<0&&(c+=.001);a.l.get(b).timestampOffset=c;zo(a,b)}function Ro(a,b,c,d){var e=a.l.get(b);if(e.appendWindowEnd!==d||e.appendWindowStart!==c)e.appendWindowStart=0,e.appendWindowEnd=d,e.appendWindowStart=c;zo(a,b)}
function zo(a,b){if(a.F||a.K.g){var c=a.o.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.o.set(b,[]))}else if(c=a.o.get(b)[0])c.p.resolve(),Wo(a,b)}function Ho(a,b,c,d){hj(a.K);c={start:c,p:new Ji,uri:d};a.o.get(b).push(c);a.o.get(b).length==1&&Xo(a,b);return c.p}
function To(a,b){var c,d,e,f,g,h,k,l,m,n,q,t,u;return L(function(v){switch(v.g){case 1:hj(a.K);c=[];d=Array.from(a.l.keys());e=r(d);f=e.next();for(g={};!f.done;g={ready:void 0},f=e.next())h=f.value,g.ready=new Ji,k={start:function(w){return function(){return w.ready.resolve()}}(g),p:g.ready,uri:null},l=a.o.get(h),l.push(k),c.push(g.ready),l.length==1&&k.start();va(v,2);return H(v,Promise.all(c),4);case 4:xa(v,3);break;case 2:throw m=za(v),m;case 3:return va(v,5,6),H(v,b(),6);case 6:Aa(v);n=r(d);for(q=
n.next();!q.done;q=n.next())t=q.value,Wo(a,t);Ba(v,0);break;case 5:throw u=za(v),new T(2,3,3015,u,a.g.error||"No error in the media element",null);}})}function Wo(a,b){a.o.get(b).shift();Xo(a,b)}function Xo(a,b){var c=a.o.get(b)[0];if(c)try{c.start()}catch(d){d.name=="QuotaExceededError"?c.p.reject(new T(2,3,3017,b)):Ao(a)?c.p.reject(new T(2,3,3015,d,a.g.error||"No error in the media element",c.uri)):c.p.reject(new T(2,3,3024,b)),Wo(a,b)}}function Yo(a,b){a.ia=b;a.h&&(a.h.l=b)}
function Ko(a,b,c,d,e){if(he(a.D.get(e))!="mp4")return c;var f=d===null,g=a.Ga.get(e),h=a.P.Vh(),k=!1;d&&d.$&&(k=d.$.encrypted);d=d?d.M()[0]:null;var l=sb();a.B.correctEc3Enca&&f&&e==="audio"&&(c=Mn(c));a.B.insertFakeEncryptionInInit&&g&&l.Rc(h,e)&&(f?c=Nn(b,c,d):!k&&l.Pg(e)&&(c=Pn(c)));f&&l.pd()&&(c=Sn(c));return c}
function Zo(a,b,c,d){return Ho(a,b,function(){if(b!==Ac){a.D.get(b);if(Kc()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.B.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.D.set(b,c)}zo(a,b)}},null)}
function $o(a,b){var c,d,e,f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C,I;return L(function(E){if(E.g==1){if(a.F||a.N)return E.return();c=Cc;a.F=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.Na=!0);a.$a&&(a.g.autoplay=!1);E.l=0;E.j=2;a.A.ib();f=r(a.j.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=r(a.l.values());for(l=k.next();!l.done;l=k.next()){m=l.value;try{a.i.removeSourceBuffer(m)}catch(z){}}a.j.clear();a.l.clear();n=a.i.duration;a.L=new Ji;a.i=po(a,a.L);return H(E,a.L,4)}if(E.g!=
2){!isNaN(n)&&n?a.i.duration=n:!isNaN(a.wa)&&a.wa&&(a.i.duration=a.wa);q=new Ji;t=a.i.sourceBuffers;u=b.size;v=0;w=function(){v++;v===u&&(q.resolve(),a.A.pb(t,"addsourcebuffer",w))};a.A.G(t,"addsourcebuffer",w);y=r(b.keys());for(x=y.next();!x.done;x=y.next())B=x.value,C=b.get(B),wo(a,B,C,C.codecs);(I=b.get(c.Z))&&I.isAudioMuxedInVideo&&(a.m=!0);a.m&&!a.o.has(c.Z)&&a.o.set(c.Z,[]);a.g.currentTime=d;return H(E,q,2)}Aa(E);a.F=!1;hj(a.K);a.A.Pa(a.g,"canplaythrough",function(){a.K.g||(a.g.autoplay=e,a.Na&&
(a.Na=!1,a.g.play()))});return Ba(E,0)})}function ap(a,b){return To(a,function(){return $o(a,b)})}function bp(a,b,c,d){var e=!1,f=yc("audio",(d||"").split(",")),g=yc("video",(d||"").split(",")),h=g;b=="audio"&&(h=f);h||(h=d);d=de(c,h);var k=le(a.D.get(b)),l=a.B.forceTransmux;!Hc(d)||!a.I&&ee.includes(d)?l=!0:l||c==k||(l=!sb().ye()&&ee.includes(c));if(l&&(a=fe(c,h),c=Yd(a))){var m=c();f&&g&&(e=!0);d=m.convertCodecs(b,a)}b=ie(me(d));return{Jb:m,kj:e,dg:le(d),codec:b,mimeType:d}}
function cp(a,b,c,d,e){if(b==Ac)return{type:dp,le:c,Jb:null};var f=ie(me(a.D.get(b))),g=le(a.D.get(b)),h=bp(a,b,c,d),k=h.Jb,l=h.kj,m=h.dg,n=h.codec;h=h.mimeType;var q=!0;l&&a.D.has("audio")&&(c=bp(a,"audio",c,d),d=ie(me(a.D.get("audio"))),q=le(a.D.get("audio")),q=d==c.codec&&q==c.dg,c.Jb&&c.Jb.destroy());if(f===n&&g===m&&q)return{type:dp,le:h,Jb:k};f=!0;if(a.m&&!e.has("audio")||l&&k&&!a.j.has(b))f=!1;if(f&&a.B.codecSwitchingStrategy==="smooth"&&Kc())return{type:ep,le:h,Jb:k};k&&k.destroy();return{type:fp,
le:h,Jb:null}}function Qo(a,b,c,d,e){var f,g,h,k,l,m;return L(function(n){if(n.g==1){f=Cc;g=cp(a,b,c,d,e);h=g.type;k=g.Jb;l=g.le;if(m=e.get(f.Z))a.m=m.isAudioMuxedInVideo;if(h==dp)return a.j.has(b)&&!k?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&k?a.j.set(b,k):k&&(a.j.has(b)&&a.j.get(b).transmux!==k.transmux?(a.j.get(b).destroy(),a.j.set(b,k)):k.destroy()),n.return(!1);if(h==ep)return H(n,Zo(a,b,l,k),3);if(h!=fp)return n.u(3);k&&k.destroy();return H(n,ap(a,e),3)}return n.return(!0)})}
function gp(a,b,c,d,e){a=cp(a,b,c,d,e);a.Jb&&a.Jb.destroy();return a.type==fp}var ro=window.URL.createObjectURL,yo="sequence",dp="none",fp="reset",ep="changeType";function hp(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Yd();this.h=new Ge(function(){b.g.Fg(b.i*.25)})}hp.prototype.release=function(){this.set(this.qc());this.h&&(this.h.stop(),this.h=null);this.g=null};hp.prototype.set=function(a){this.i=a;ip(this)};hp.prototype.qc=function(){return this.g.qc()};function ip(a){a.h.stop();var b=a.j?0:a.i;if(b>=0)try{a.g.Yd()!=b&&a.g.Mf(b);return}catch(c){}a.h.Ea(.25);a.g.Yd()!=0&&a.g.Mf(0)};function jp(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=kp.value().get(b),c.Pa(a,b,d))}var kp=new rb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function lp(a,b,c,d){var e=this;this.g=a;this.m=b;this.A=c;this.l=null;this.j=function(){e.l==null&&(e.l=d());return e.l};this.o=!1;this.h=new mb;this.i=new mp(a);jp(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){np(e,e.j())})}lp.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i!=null&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function op(a){return a.o?a.g.currentTime:a.j()}
function pp(a,b){a.g.readyState>0?qp(a.i,b):jp(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){np(a,a.j())})}function np(a,b){Math.abs(a.g.currentTime-b)<.001?rp(a):(a.h.Pa(a.g,"seeking",function(){rp(a)}),qp(a.i,a.g.currentTime&&a.g.currentTime!=0?a.g.currentTime:b))}function rp(a){a.o=!0;a.h.G(a.g,"seeking",function(){return a.m()});a.A(a.g.currentTime)}
function mp(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Ge(function(){b.i<=0?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}mp.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function qp(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ea(.1)};function sp(a){this.g=a;this.i=!1;this.h=null;this.j=new mb}p=sp.prototype;p.ready=function(){function a(){if(b.h==null||b.h==0&&b.g.duration!=Infinity)b.i=!0;else{var c=b.g.currentTime,d=null;if(typeof b.h==="number")d=b.h;else if(b.h instanceof Date){var e=tp(b);e!==null&&(d=b.h.getTime()/1E3-e,d=up(b,d))}d==null?b.i=!0:(d<0&&(d=Math.max(0,c+d)),c!=d?(b.j.Pa(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;jp(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){a()})};
p.release=function(){this.j&&(this.j.release(),this.j=null);this.g=null};p.Ee=function(a){this.h=this.i?this.h:a};p.Id=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(tp(this)||0),a=up(this,a));return a||0};p.Xf=function(){return 0};p.Vf=function(){return 0};p.Wf=function(){return!1};p.Hg=function(){};p.sg=function(){var a=Vn(this.g.buffered);return a!=null&&a>=this.g.duration-1};
function tp(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null}function up(a,b){a=a.g.seekable;a.length>0&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
function vp(a,b,c,d,e,f){var g=this;this.h=a;this.g=b.presentationTimeline;this.l=c;this.A=e;this.o=null;this.i=new $n(a,b.presentationTimeline,c,f);this.j=new lp(a,function(){a:{var h=g.i;h.m=!0;h.B=!1;h.i&&h.i.Ea(h.h.gapJumpTimerTime);bo(h);var k=op(g.j);h=wp(g,k);if(!Lc()&&Math.abs(h-k)>.001){k=!1;var l=sb().Tg();if(l){var m=Date.now()/1E3;if(!g.o||g.o<m-l)g.o=m,k=!0}else k=!0;if(k){pp(g.j,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.i;k.g.seeking&&!k.m&&(k.m=!0,k.l=h);k.i&&
k.i.Ea(k.h.gapJumpTimerTime);bo(k)},function(){return xp(g,d)});this.m=new Ge(function(){if(g.h.readyState!=0&&!g.h.paused){var h=op(g.j),k=g.g.Pb(),l=g.g.ob();l-k<3&&(k=l-3);h<k&&(h=wp(g,h),g.h.currentTime=h)}})}p=vp.prototype;p.ready=function(){this.m.Ea(.25)};p.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.m&&(this.m.stop(),this.m=null);this.h=this.j=this.g=this.l=null;this.A=function(){}};p.Ee=function(a){pp(this.j,xp(this,a))};
p.Id=function(){var a=op(this.j);return this.h.readyState>0&&!this.h.paused?yp(this,a):a};p.Xf=function(){return this.i.H};p.Vf=function(){return this.i.F};p.Wf=function(){return this.i.C};function xp(a,b){b==null?b=a.g.getDuration()<Infinity?a.g.Pb():a.g.ob():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):b<0&&(b=a.g.ob()+b);return zp(a,yp(a,b))}p.Hg=function(){this.i.oe()};p.sg=function(){if(this.g.ba()){var a=this.g.ed(),b=Vn(this.h.buffered);if(b!=null&&b>=a)return!0}return!1};
function zp(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function wp(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.Pb(),f=a.g.ob(),g=a.g.getDuration();f-e<3&&(e=f-3);var h=a.g.dd(c),k=a.g.dd(d);c=a.g.dd(c+d);return b>=g?zp(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?a.g.ba()&&a.l.returnToEndOfLiveWindowWhenOutside?f-a.l.safeSeekEndOffset:Wn(a.h.buffered,k)?k:c:b>=h||Wn(a.h.buffered,b)?b:c}function yp(a,b){var c=a.g.Pb();if(b<c)return c;a=a.g.ob();return b>a?a:b};function Ap(){this.h=this.g=null}Ap.prototype.configure=function(a){this.g=a};Ap.prototype.getConfiguration=function(){return this.g};
Ap.prototype.create=function(a){var b;if(this.g.language){var c=Bp(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(f){return f.primary}),b=b.length?b:a);a=Cp(b,this.g.role);a.length&&(b=a);a=Dp(b,this.g.videoRole);a.length&&(b=a);this.g.videoLayout&&(a=Ep(b,this.g.videoLayout),a.length&&(b=a));this.g.hdrLevel&&(a=Fp(b,this.g.hdrLevel),a.length&&(b=a));var d=[this.g.channelCount,this.g.preferredAudioChannelCount];a=d.filter(function(f,g){return f&&d.indexOf(f)===g});if(a.length)for(a=r(a),
c=a.next();!c.done;c=a.next())if(c=Gp(b,c.value),c.length){b=c;break}this.g.audioLabel&&(a=Hp(b,this.g.audioLabel),a.length&&(b=a));this.g.videoLabel&&(a=Ip(b,this.g.videoLabel),a.length&&(b=a));a=Jp(b,this.g.spatialAudio);a.length&&(b=a);var e=[this.g.audioCodec,this.g.activeAudioCodec].concat(A(this.g.preferredAudioCodecs));a=e.filter(function(f,g){return f&&e.indexOf(f)===g});if(a.length)for(a=r(a),c=a.next();!c.done;c=a.next())if(c=Kp(b,c.value),c.length){b=c;break}return this.h=new fn(b[0],b,
!(this.g.codecSwitchingStrategy=="smooth"&&Kc()))};Ap.prototype.getLastAdaptationSet=function(){return this.h};function Bp(a,b){b=Ne(b);var c=Ue(b,a.map(function(d){return Te(d)}));return c?a.filter(function(d){return c==Te(d)}):[]}function Cp(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):c.audio.roles.length==0:!1})}function Dp(a,b){return a.filter(function(c){return c.video?b?c.video.roles.includes(b):c.video.roles.length==0:!1})}
function Hp(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Ip(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function Gp(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount>b?!1:!0}).sort(function(c,d){return c.audio||d.audio?c.audio?d.audio?(d.audio.channelsCount||0)-(c.audio.channelsCount||0):1:-1:0})}
function Fp(a,b){if(b=="AUTO"){var c=a.some(function(d){return d.video&&d.video.hdr&&d.video.hdr=="HLG"?!0:!1});b=sb().Jc(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function Ep(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Jp(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Kp(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Lp(a){Ri.call(this);this.h=new Map;this.i=a;this.g=null}na(Lp,Ri);Lp.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);Ri.prototype.release.call(this)};function Mp(a,b){var c=b.schemeIdUri+"_"+b.id+"_"+(b.startTime.toFixed(1)+"_"+b.endTime.toFixed(1));a.h.has(c)||(a.h.set(c,b),b=new Qi("regionadd",new Map([["region",b]])),a.dispatchEvent(b),Np(a))}
function Np(a){a.g||(a.g=(new Ge(function(){for(var b=a.i(),c=r(a.h),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;e.endTime<b.start&&(a.h.delete(d),d=new Qi("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).Ea(2))};function Op(a,b,c,d,e){function f(g,h){return h.fastSwitching&&g.wc&&g.kd?!1:!0}this.m=a;this.i=b;this.l=c;this.g=new Map;this.j=new Map;this.h=null;this.o=d;this.A=e||f}function Pp(a,b){a.l=b;a=r(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
function Qp(a,b,c){c=c===void 0?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.h||(a.h=a.i.segmentIndex.Eb(b,!0,a.o));if(!a.h)return Promise.resolve();c&&a.h.next();for(b=[];a.g.size<a.m;){c=a.h.next().value;if(!c)break;var d=!0;c.isPreload()&&c.endByte!=null&&(d=!1);c.cc()==2&&(d=!1);c.sc(!1)&&(d=!1);d&&c.$&&b.push(Rp(a,c.$));d&&!a.g.has(c)&&(d=new Sp(a.l),b.push(Tp(d,c,a.i)),a.g.set(c,d));if(!a.A(c,a.i))break}Up(a);return Promise.all(b)}
function Rp(a,b){if(!a.i.segmentIndex||b.sc()||Array.from(a.j.keys()).some(function(e){return Bk(e,b)}))return Promise.resolve();var c=new Sp(a.l),d=Tp(c,b,a.i);a.j.set(b,c);return d}function Vp(a,b){b=r(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Wp(a,c)}function Xp(a){Vp(a,a.g);Vp(a,a.j);a.h=null}Op.prototype.sb=function(a,b){b=b===void 0?!1:b;for(var c=r(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Wp(this,d);b&&Up(this)};
Op.prototype.Tc=function(a){this.o=a;this.h&&this.h.Tc(a)};function Up(a){if(a.g.size)for(var b=Array.from(a.g.keys()),c=r(a.j.keys()),d=c.next(),e={};!d.done;e={tf:void 0},d=c.next())e.tf=d.value,b.some(function(f){return function(g){return Bk(g.$,f.tf)}}(e))||Wp(a,e.tf)}function Yp(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&Wp(a,d)}Up(a)}function Zp(a,b){b&&b!==a.i&&(Xp(a),a.i=b)}
function Wp(a,b){var c=a.g;b instanceof Ak&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function Sp(a){this.g=a;this.md=this.Pf=null}function Tp(a,b,c){var d=new Uint8Array(0);a.md=a.g(b,c,function(e){return L(function(f){if(f.g==1)return d.byteLength>0?d=sc(d,e):d=e,a.Pf?H(f,a.Pf(d),3):f.u(0);d=new Uint8Array(0);K(f)})});return a.md.promise.catch(function(e){return e instanceof T&&e.code==7001?Promise.resolve():Promise.reject(e)})}Sp.prototype.abort=function(){this.md&&this.md.abort()};function $p(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.L=new Map;this.C=1;this.B=this.o=null;this.Y=0;this.h=new Map;this.N=!1;this.aa=null;this.D=!1;this.l=new gj(function(){return aq(c)});this.S=Date.now()/1E3;this.m=new Map;this.V={projection:null,hfov:null};this.ia=0;this.ea=Infinity;this.H=null;this.P=[];this.A=new Ge(function(){if(c.j&&c.g)if(c.j.presentationTimeline.ba()){var d=c.j.presentationTimeline.Pb(),e=c.j.presentationTimeline.ob();e-d>1?Uo(c.g.T,d,e):Vo(c.g.T)}else Vo(c.g.T),
c.A&&c.A.stop();else c.A&&c.A.stop()});this.I=null;this.J=!1;this.K=new Ge(function(){var d=c.g.video;!d.ended&&c.I&&(c.J=!0,d.currentTime=c.I,c.I=null)});this.F=new mb}p=$p.prototype;p.destroy=function(){return this.l.destroy()};
function aq(a){var b,c,d,e,f,g,h;return L(function(k){if(k.g==1){a.A&&a.A.stop();a.A=null;a.K&&a.K.stop();a.K=null;a.F&&(a.F.release(),a.F=null);b=[];c=r(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,bq(e),b.push(cq(e)),e.X&&(Xp(e.X),e.X=null);f=r(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,Xp(h);return H(k,Promise.all(b),2)}a.h.clear();a.m.clear();a.g=null;a.j=null;a.i=null;a.I=null;K(k)})}
p.configure=function(a){this.i=a;this.aa=new Gi({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.h.get("audio");b&&b.X&&(Xp(b.X),b.X=null);b=r(this.m.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Xp(this.m.get(c)),this.m.delete(c)}a.disableTextPrefetch&&(b=this.h.get(Ac))&&
b.X&&(Xp(b.X),b.X=null);a.disableVideoPrefetch&&(b=this.h.get("video"))&&b.X&&(Xp(b.X),b.X=null);b=r(this.h.keys());for(c=b.next();!c.done;c=b.next())c=this.h.get(c.value),c.X?(Yp(c.X,a.segmentPrefetchLimit),a.segmentPrefetchLimit>0||(Xp(c.X),c.X=null)):a.segmentPrefetchLimit>0&&(c.X=dq(this,c.stream));a.disableAudioPrefetch||eq(this)};function fq(a,b,c){a.j.presentationTimeline.ba()||(a.ia=b,a.ea=c)}
p.start=function(a){var b=this;return L(function(c){if(c.g==1)return H(c,gq(b,a||new Map),2);hj(b.l);b.N=!0;K(c)})};function hq(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Cc,a.Y++,d=a.Y,va(l,2),H(l,Oo(a.g.T,c.Ka),4);case 4:xa(l,3);break;case 2:if(e=za(l),a.g)a.g.onError(e);case 3:f=de(b.mimeType,b.codecs),xo(a.g.T,f,a.j.sequenceMode,b.external),g=a.g.T.ia,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.Y==d&&(k=iq(a,b),a.h.set(c.Ka,k),jq(a,k,0)),K(l)}})}
function kq(a){var b=a.h.get(Ac);b&&(bq(b),cq(b).catch(function(){}),a.H=a.h.get(Ac),a.h.delete(Ac),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.B=null}
function lq(a,b){for(var c=a.g.wb()<0,d=r(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ma&&e.ma.Tc(c),e.X&&e.X.Tc(c);d=r(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.Tc(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.fc&&(mq(a,b,!1,0,!1),c.fc=d);else if(b=c.fc)c.fc=null,mq(a,b,!0,0,!1)}
function nq(a,b,c,d,e,f){c=c===void 0?!1:c;d=d===void 0?0:d;e=e===void 0?!1:e;f=f===void 0?!1:f;a.o=b;a.N&&(b.video&&mq(a,b.video,c,d,e,f),b.audio&&mq(a,b.audio,c,d,e,f))}function oq(a,b){L(function(c){if(c.g==1)return a.H=null,a.B=b,a.N?b.segmentIndex?c.u(2):H(c,b.createSegmentIndex(),2):c.return();mq(a,b,!0,0,!1);K(c)})}function pq(a){var b=a.h.get(Ac);b&&mq(a,b.stream,!0,0,!0)}
function qq(a,b){for(var c=r(a.L.entries()),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.L.delete(d))}}
function mq(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Ac?g&&(g.fc&&(b.trickModeVideo?(g.fc=b,b=b.trickModeVideo):g.fc=null),g.stream!=b||e)&&(a.m.has(b)?g.X=a.m.get(b):g.X&&Zp(g.X,b),b.type==Ac&&g.stream!=b&&(e=de(b.mimeType,b.codecs),xo(a.g.T,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ba?(e="("+g.type+":"+g.stream.id+")",a.L.has(e)||a.L.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,
g.stream=b,g.ma=null,g.Ke=!!f,b.dependencyStream?g.Zb=iq(a,b.dependencyStream):g.Zb=null,rq(a),e&&(g.ab=null,g.Sb=null,g.Rb=null,b.isAudioMuxedInVideo&&(b=null,g.type==="video"?b=a.h.get("audio"):g.type==="audio"&&(b=a.h.get("video")),b&&(cq(b).catch(function(){}),b.ab=null,b.Sb=null,b.Rb=null,sq(a,b),tq(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.Cb?g.Vc=!0:g.Ba?(g.Lb=!0,g.Hc=d,g.Vc=!0):(bq(g),uq(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ba||g.cb||jq(a,g,0),tq(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
hq(a,b)}
function tq(a,b){var c,d,e;return L(function(f){if(f.g==1){if(!b.Ia)return f.return();c=b.stream;d=b.Ia;return c.segmentIndex?f.u(2):H(f,c.createSegmentIndex(),2)}if(f.g!=4)return e=c.dependencyStream,!e||e.segmentIndex?f.u(4):H(f,e.createSegmentIndex(),4);if(b.Ia!=d||b.stream!=c)return f.return();var g=a.g.Ob();var h=Do(a.g.T,b.type),k=b.stream.segmentIndex.find(b.Da?b.Da.endTime:g),l=k==null?null:b.stream.segmentIndex.get(k);k=l?Ek(l):null;l&&!k&&(k=(l.endTime-l.getStartTime())*(b.stream.bandwidth||a.o.bandwidth)/
8);k?((l=l.$)&&(k+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=a.g.getBandwidthEstimate(),g=k*8/l<(h||0)-g-a.i.rebufferingGoal||b.Ia.h.g>k?!0:!1):g=!0;g&&b.Ia.abort();K(f)})}
p.Ac=function(){if(this.g){for(var a=this.g.Ob(),b=r(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e;if(e=!this.J)e=this.g.T,d==Ac?(e=e.h,e=e.g==null||e.h==null?!1:a>=e.g&&a<e.h):(e=Co(e,d),e=Wn(e,a)),e=!e;if(e){this.S=0;c.X&&(c.X.h=null);if(c.type==="audio"){e=r(this.m.values());for(var f=e.next();!f.done;f=e.next())f.value.h=null}c.ma=null;(Do(this.g.T,d)!=null||c.Ba)&&sq(this,c);c.Ia&&(c.Ia.abort(),c.Ia=null);d===Ac&&(d=this.g.T,d.J&&d.J.Yc());c.Ac=!0}!this.J||
c.Cb||c.Ba||c.cb||jq(this,c,0)}vq(this)&&wq(this)}};function sq(a,b){b.Cb||b.Lb||(b.Ba?(b.Lb=!0,b.Hc=0):Bo(a.g.T,b.type)==null?b.cb==null&&jq(a,b,0):(bq(b),uq(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function gq(a,b){var c,d,e,f,g,h,k,l;return L(function(m){if(m.g==1){if(!a.o)throw new T(2,5,5006);c=xq(a,!0);d=a.g.T;return H(m,d.init(c,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}hj(a.l);a.updateDuration();e=r(c.keys());for(f=e.next();!f.done;f=e.next())g=f.value,h=c.get(g),a.h.has(g)||(k=iq(a,h),b.has(h.id)&&(l=b.get(h.id),Pp(l,function(n,q,t){return yq(n,q,t||null,a.i.retryParameters,a.g.vc)}),k.X=l),a.h.set(g,k),jq(a,k,0));rq(a);K(m)})}
function iq(a,b){var c={stream:b,type:b.type,ma:null,X:dq(a,b),Da:null,ab:null,ge:null,Sb:null,Rb:null,ee:null,fe:null,fc:null,endOfStream:!1,Ba:!1,cb:null,Lb:!1,Hc:0,Vc:!1,Cb:!1,Ac:!0,Ke:!1,Ff:!1,gd:!1,Ia:null,Zb:null};b.dependencyStream&&(c.Zb=iq(a,b.dependencyStream));return c}
function dq(a,b){if(b.type==="video"&&a.i.disableVideoPrefetch||b.type==="audio"&&a.i.disableAudioPrefetch||b.type===Ac&&(b.mimeType=="application/cea-608"||b.mimeType=="application/cea-708")||b.type===Ac&&a.i.disableTextPrefetch)return null;if(a.m.has(b))return a.m.get(b);var c=a.h.get(b.type);return(c=c&&c.X)&&b===c.i?c:a.i.segmentPrefetchLimit>0?new Op(a.i.segmentPrefetchLimit,b,function(d,e,f){return yq(d,e,f||null,a.i.retryParameters,a.g.vc)},a.g.wb()<0,a.g.jj):null}
function eq(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=r(a.j.variants),e=d.next(),f={};!e.done;f={qb:void 0},e=d.next())if(f.qb=e.value,f.qb.audio)if(a.m.has(f.qb.audio)){if(e=a.m.get(f.qb.audio),Yp(e,b),!(b>0&&c.some(function(h){return function(k){return Me(h.qb.audio.language,k)}}(f)))){var g=a.h.get(f.qb.audio.type);e!==(g&&g.X)&&Xp(e);a.m.delete(f.qb.audio)}}else b<=0||!c.some(function(h){return function(k){return Me(h.qb.audio.language,k)}}(f))||!(e=dq(a,f.qb.audio))||
(f.qb.audio.segmentIndex||f.qb.audio.createSegmentIndex(),a.m.set(f.qb.audio,e))}p.updateDuration=function(){var a=Lc(),b=this.j.presentationTimeline.getDuration();b<Infinity?(a&&(this.A&&this.A.stop(),Vo(this.g.T)),this.g.T.hc(b)):a?(this.A&&this.A.Ea(.5),this.g.T.hc(Infinity)):this.g.T.hc(4294967296)};
function zq(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:hj(a.l);c=Cc;if(b.Ba||b.cb==null||b.Cb)return n.return();b.cb=null;if(!b.Lb){n.u(2);break}return H(n,uq(a,b,b.Vc,b.Hc),3);case 3:return n.return();case 2:qq(a,b);if(b.stream.segmentIndex){n.u(4);break}d=b.stream;va(n,5);return H(n,b.stream.createSegmentIndex(),7);case 7:xa(n,6);break;case 5:return e=za(n),H(n,Aq(a,b,e),8);case 8:return n.return();case 6:if(d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.Ba||
b.cb||jq(a,b,0),n.return();case 4:if(!b.Zb){n.u(9);break}if(b.Zb.stream.segmentIndex){n.u(9);break}va(n,11);return H(n,b.Zb.stream.createSegmentIndex(),13);case 13:xa(n,9);break;case 11:za(n);case 9:va(n,14);f=Bq(a,b);f!=null&&(jq(a,b,f),b.gd=!1);xa(n,15);break;case 14:return g=za(n),H(n,Aq(a,b,g),16);case 16:return n.return();case 15:if(b.type===c.Ka)return n.return();h=[b];k=b.type===c.Z?c.qa:c.Z;(l=a.h.get(k))&&h.push(l);if(!a.N||!h.every(function(q){return q.endOfStream})){n.u(0);break}return H(n,
a.g.T.endOfStream(),18);case 18:hj(a.l),m=a.g.T.getDuration(),m!=0&&m<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.hc(m),K(n)}})}
function Bq(a,b){if(Cq(b))return Lo(a.g.T,b.stream.originalId||""),null;b.type==Ac&&Mo(a.g.T);if(b.stream.isAudioMuxedInVideo&&b.type=="audio")return null;if(b.type!=Ac&&vo(a.g.T))return Dq(a,!0),null;var c=a.i.updateIntervalSeconds/Math.max(1,Math.abs(a.g.wb()));if(!Ao(a.g.T)&&b.type!=Ac)return c/2;var d=a.g.Ob();if(b.type==="audio")for(var e=r(a.m.keys()),f=e.next();!f.done;f=e.next())f=a.m.get(f.value),f.sb(d,!0),Qp(f,d);e=b.Da?b.Da.endTime:d;var g=Eo(a.g.T,b.type,d);f=Math.max(1,Math.max(a.i.rebufferingGoal,
a.i.bufferingGoal)*a.C);var h=a.j.presentationTimeline.getDuration()-e,k=Do(a.g.T,b.type);if(h<1E-6&&k)return b.endOfStream=!0,b.type=="video"&&(a=a.h.get(Ac))&&Cq(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.ma;k=Eq(a,b,d,k);if(!k)return c;g=b.ab;var l=k.$;g&&l&&Bk(l,g)&&(g.g=l.g);g=!1;h&&b.Ke&&(g=!0,b.Ke=!1);h=Infinity;l=Array.from(a.h.values());l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,Cq(m)||m.ma&&!m.ma.current()||(h=Math.min(h,m.Da?m.Da.endTime:d));if(e>=
h+a.j.presentationTimeline.h)return c;b.X&&b.ma&&!a.m.has(b.stream)&&(b.X.sb(k.startTime+.001),Qp(b.X,k.startTime).catch(function(){}));if(vq(a)&&Fq(a,b,k))return null;Gq(a,b,d,k,g).catch(function(){});b.Zb&&Hq(a,b.Zb,d,f);return null}
function Eq(a,b,c,d){if(b.ma)return(c=b.ma.current())&&b.Da&&Math.abs(b.Da.startTime-c.startTime)<.001&&(c=b.ma.next().value),c;if(b.Da||d)return c=b.Da?b.Da.endTime:d,a=a.g.wb()<0,b.stream.segmentIndex&&(b.ma=b.stream.segmentIndex.Eb(c,!1,a)),b.ma&&b.ma.next().value;d=a.j.sequenceMode||vq(a)?0:a.i.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=a.g.wb()<0;var f=null;d&&(b.stream.segmentIndex&&(b.ma=b.stream.segmentIndex.Eb(e,!1,a)),f=b.ma&&b.ma.next().value);f||(b.stream.segmentIndex&&(b.ma=
b.stream.segmentIndex.Eb(c,!1,a)),f=b.ma&&b.ma.next().value);return f}
function Gq(a,b,c,d,e){var f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C,I,E;return L(function(z){switch(z.g){case 1:f=Cc;g=b.stream;h=b.ma;b.Ba=!0;va(z,2);if(d.cc()==2)throw new T(1,1,1011);return H(z,Iq(a,b,d,e),4);case 4:hj(a.l);if(a.D)return z.return();k=g.mimeType=="video/mp4"||g.mimeType=="audio/mp4";l=window.ReadableStream;if((m=a.i.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&(a.j.type!="HLS"||d.A))return t=new Uint8Array(0),v=u=!1,y=function(D){var G,F,J,M;return L(function(O){switch(O.g){case 1:if(u)return O.return();
v=!0;hj(a.l);if(a.D)return O.return();va(O,2);t=sc(t,D);G=!1;F=0;(new Mg).box("mdat",function(R){F=R.size+R.start;G=!0}).parse(t,!1,!0);if(!G){O.u(4);break}J=t.subarray(0,F);t=t.subarray(F);return H(O,Jq(a,b,c,g,d,J,!0,e),5);case 5:b.X&&b.ma&&Qp(b.X,d.startTime,!0);case 4:xa(O,0);break;case 2:w=M=za(O),K(O)}})},H(z,Kq(a,b,d,y),9);n=Kq(a,b,d);return H(z,n,7);case 7:q=z.h;hj(a.l);if(a.D)return z.return();hj(a.l);return b.Lb?(b.Ba=!1,jq(a,b,0),z.return()):H(z,Jq(a,b,c,g,d,q,!1,e),6);case 9:x=z.h;if(w)throw w;
if(v){z.u(10);break}u=!0;hj(a.l);return a.D?z.return():b.Lb?(b.Ba=!1,jq(a,b,0),z.return()):H(z,Jq(a,b,c,g,d,x,!1,e),10);case 10:b.X&&b.ma&&Qp(b.X,d.startTime,!0);case 6:hj(a.l);if(a.D)return z.return();b.Da=d;h.next();b.Ba=!1;b.Ff=!1;B=a.g.T.$b();C=B[b.type];fb(JSON.stringify(C));b.Lb||(I=null,b.type===f.qa?I=a.h.get(f.Z):b.type===f.Z&&(I=a.h.get(f.qa)),I&&I.type==f.Z?a.g.oe(d,b.stream,I.stream.isAudioMuxedInVideo):a.g.oe(d,b.stream,b.stream.codecs.includes(",")));bq(b);jq(a,b,0);xa(z,0);break;case 2:E=
za(z);hj(a.l,E);if(a.D)return z.return();b.Ba=!1;if(E.code==7001)b.Ba=!1,bq(b),jq(a,b,0),z.u(0);else if(b.type==f.Ka&&a.i.ignoreTextStreamFailures)a.h.delete(f.Ka),z.u(0);else{if(E.code==3017)return H(z,Lq(a,b,E),0);b.gd=!0;E.category==1&&b.X&&Wp(b.X,d);E.severity=2;return H(z,Aq(a,b,E),0)}}})}
function Hq(a,b,c,d){var e,f,g,h,k,l,m,n,q,t,u;return L(function(v){switch(v.g){case 1:e=b.stream;for(h=(g=(f=e.segmentIndex)&&f.Eb(c))&&g.next().value;h&&a.P.includes(h.startTime);)h=g&&g.next().value;if(!h){v.u(0);break}k=h.$;if(!k||Bk(k,b.ab)){v.u(3);break}b.ab=k;va(v,4);return H(v,Kq(a,b,k),6);case 6:l=v.h;var w=a.g.T;w.H&&Ec(w.H,l,0,e);a.P=[];xa(v,3);break;case 4:throw m=za(v),b.ab=null,m;case 3:if(b.Da&&b.Da==h){v.u(0);break}b.Da=h;va(v,8);return H(v,Kq(a,b,h),10);case 10:n=v.h;w=a.g.T;w.H&&
Ec(w.H,n,0,e);a.P.push(h.startTime);xa(v,9);break;case 8:throw q=za(v),b.Da=null,q;case 9:t=Math.max.apply(Math,[0].concat(A(a.P)));u=a.g.Ob();if(u+d>t)return H(v,Hq(a,b,h.startTime,d),0);v.u(0)}})}
function Lq(a,b,c){var d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:d=Array.from(a.h.values());if(e=d.some(function(t){return t!=b&&t.Ff})){q.u(2);break}if(a.i.avoidEvictionOnQuotaExceededError){f=Mq(a,c);if(g=a.g.disableStream(b.stream,f))return q.return();jq(a,b,4);return q.return()}h=Math.round(100*a.C);if(h>20){a.C-=.2;q.u(3);break}if(h>4){a.C-=.04;q.u(3);break}k=Mq(a,c);l=a.g.disableStream(b.stream,k);if(!l){b.gd=!0;a.D=!0;a.g.onError(c);q.u(5);break}a.C=1;m=a.g.Ob();return H(q,
Nq(a,b,m),5);case 5:return q.return();case 3:return b.Ff=!0,n=a.g.Ob(),H(q,Nq(a,b,n),2);case 2:jq(a,b,4),K(q)}})}
function Iq(a,b,c,d){var e,f,g,h,k,l,m,n,q,t,u,v,w,y,x,B;return L(function(C){switch(C.g){case 1:e=Cc;f=b.Da==null;g=[];h=Math.max(0,Math.max(c.F,a.ia)-.1);k=Math.min(c.D,a.ea)+.1;l=c.codecs||b.stream.codecs;m=ke(l);n=le(c.mimeType||b.stream.mimeType);q=c.m;if(q==b.ge&&h==b.Sb&&k==b.Rb&&m==b.ee&&n==b.fe){C.u(2);break}t=b.ee&&b.fe&&gp(a.g.T,b.type,n,l,xq(a));if(!t){C.u(3);break}u=null;b.type===e.qa?u=a.h.get(e.Z):b.type===e.Z&&(u=a.h.get(e.qa));if(!u){C.u(3);break}return H(C,cq(u).catch(function(){}),
5);case 5:u.ab=null,u.Sb=null,u.Rb=null,sq(a,u);case 3:return H(C,Oq(a,b,q,h,k,c,m,n),2);case 2:return Bk(c.$,b.ab)||(b.ab=c.$,c.j&&c.$&&(v=Kq(a,b,c.$),w=function(){var I,E,z,D,G,F,J,M,O,R,P;return L(function(N){switch(N.g){case 1:return va(N,2),H(N,v,4);case 4:return I=N.h,hj(a.l),E=null,z=new Map,D={projection:null,hfov:null},b.stream&&(G=b.stream.videoLayout)&&(F=G.split("/"),F.includes("PROJ-RECT")?D.projection="rect":F.includes("PROJ-EQUI")?D.projection="equi":F.includes("PROJ-HEQU")?D.projection=
"hequ":F.includes("PROJ-PRIM")?D.projection="prim":F.includes("PROJ-AIV")&&(D.projection="hequ")),J=new Mg,J.box("moov",Rg).box("trak",Rg).box("mdia",Rg).O("mdhd",function(Q){E=Zg(Q.reader,Q.version).timescale}).box("hdlr",function(Q){Q=Q.reader;Q.skip(8);switch(Q.xc()){case "soun":z.set(e.Z,E);break;case "vide":z.set(e.qa,E)}E=null}),b.type!==e.qa||D.projection||J.box("minf",Rg).box("stbl",Rg).O("stsd",Tg).box("encv",Ug).box("avc1",Ug).box("avc3",Ug).box("hev1",Ug).box("hvc1",Ug).box("dvav",Ug).box("dva1",
Ug).box("dvh1",Ug).box("dvhe",Ug).box("dvc1",Ug).box("dvi1",Ug).box("vexu",Rg).box("proj",Rg).O("prji",function(Q){Q=Q.reader.xc();D.projection=Q}).box("hfov",function(Q){Q=Q.reader.R()/1E3;D.hfov=Q}),J.parse(I,!0,!0),b.type===e.qa&&Pq(a,D),z.has(b.type)?c.$.timescale=z.get(b.type):E!=null&&(c.$.timescale=E),M=b.stream.segmentIndex,M instanceof Wk&&(O=Yk(M,c.startTime)),R=b.stream.closedCaptions&&b.stream.closedCaptions.size>0,H(N,a.g.eg(b.type,I),5);case 5:return H(N,Go(a.g.T,b.type,I,null,b.stream,
R,b.Ac,d,!1,!1,O),6);case 6:xa(N,0);break;case 2:throw P=za(N),b.ab=null,P;}})},y=c.startTime,f&&(x=Do(a.g.T,b.type),x!=null&&(y=x)),a.g.Pi(y,c.$),g.push(w()))),B=b.Da?b.Da.i:-1,c.i!=B&&g.push(So(a.g.T,b.type,c.startTime)),H(C,Promise.all(g),0)}})}
function Oq(a,b,c,d,e,f,g,h){var k,l,m,n,q;return L(function(t){switch(t.g){case 1:k=Cc;l=xq(a);va(t,2);b.Sb=d;b.Rb=e;g&&(b.ee=g);h&&(b.fe=h);b.ge=c;m=a.j.sequenceMode||a.j.type=="HLS";n=null;b.type===k.qa?n=a.h.get(k.Z):b.type===k.Z&&(n=a.h.get(k.qa));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){t.u(4);break}return H(t,Po(a.g.T,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return H(t,Po(a.g.T,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),6);case 6:xa(t,
0);break;case 2:throw q=za(t),b.Sb=null,b.Rb=null,b.ee=null,b.fe=null,b.ge=null,q;}})}
function Jq(a,b,c,d,e,f,g,h){g=g===void 0?!1:g;h=h===void 0?!1:h;var k,l,m,n,q;return L(function(t){switch(t.g){case 1:return k=d.closedCaptions&&d.closedCaptions.size>0,a.i.shouldFixTimestampOffset&&(l=d.mimeType=="video/mp4"||d.mimeType=="audio/mp4",m=null,e.$&&(m=e.$.timescale),(n=l&&m&&d.type==="video"&&a.j.type=="DASH")&&(new Mg).box("moof",Rg).box("traf",Rg).O("tfdt",function(u){var v,w,y,x,B,C;return L(function(I){v=Yg(u.reader,u.version);w=v.baseMediaDecodeTime;if(!w)return I.return();y=-w/
m;x=Number(b.ge)||0;if(!(x<y))return I.u(0);B=b.Sb;C=b.Rb;return H(I,Oq(a,b,y,B,C,e),0)})}).parse(f,!1,g)),H(t,Nq(a,b,c),2);case 2:return hj(a.l),q=b.Ac,b.Ac=!1,H(t,a.g.eg(b.type,f),3);case 3:return H(t,Go(a.g.T,b.type,f,e,d,k,q,h,g),4);case 4:hj(a.l),K(t)}})}
function Nq(a,b,c){var d,e,f,g,h,k,l,m,n;return L(function(q){if(q.g==1){d=b.stream.segmentIndex;d instanceof Wk&&(d.sb(a.j.presentationTimeline.$d()),e=[],Xk(d,function(){e.push(-1)}));f=Math.max(a.i.bufferBehind*a.C,a.j.presentationTimeline.h);g=Bo(a.g.T,b.type);if(g==null)return a.H==b&&(a.H=null),q.return();h=c-g;k=a.i.evictionGoal;l=a.j.presentationTimeline.Pb();m=a.j.presentationTimeline.ob();n=h-f;m-l>k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():H(q,a.g.T.remove(b.type,g,g+n,e),2)}if(q.g!=
4)return hj(a.l),a.H?H(q,Nq(a,a.H,c),4):q.u(0);hj(a.l);K(q)})}function Cq(a){return a&&a.type==Ac&&(a.stream.mimeType=="application/cea-608"||a.stream.mimeType=="application/cea-708")}
function Kq(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.sc())return l.return(e);f=null;if(b.X){var m=b.X,n=m.g;c instanceof Ak&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Pf=d),f=m.md):f=null}f||(f=yq(c,b.stream,d||null,a.i.retryParameters,a.g.vc));g=0;b.ma&&(g=b.ma.h);b.Ia=f;return H(l,f.promise,2);case 2:h=l.h;b.Ia=null;k=h.data;if(!c.aesKey){l.u(3);break}return H(l,dl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
function yq(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a instanceof Ck?a:void 0,h=g?1:0;a=ql(a.M(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(ej,a,{type:h,stream:b,segment:g,isPreload:f})}
function uq(a,b,c,d){var e,f;return L(function(g){if(g.g==1)return b.Lb=!1,b.Vc=!1,b.Hc=0,b.Cb=!0,b.Da=null,b.ma=null,b.X&&!a.m.has(b.stream)&&Xp(b.X),d?(e=a.g.Ob(),f=a.g.T.getDuration(),H(g,a.g.T.remove(b.type,e+d,f),3)):H(g,Oo(a.g.T,b.type),4);if(g.g!=3)return hj(a.l),c?H(g,a.g.T.flush(b.type),3):g.u(3);hj(a.l);b.Cb=!1;b.endOfStream=!1;b.Ba||b.cb||jq(a,b,0);K(g)})}
function jq(a,b,c){var d=b.type;if(d!=Ac||a.h.has(d))b.cb=(new Fe(function(){var e;return L(function(f){if(f.g==1)return va(f,2),H(f,zq(a,b),4);if(f.g!=2)return xa(f,0);e=za(f);if(a.g)a.g.onError(e);K(f)})})).ka(c)}function bq(a){a.cb!=null&&(a.cb.stop(),a.cb=null)}function cq(a){return L(function(b){return a.Ia?H(b,a.Ia.abort(),0):b.u(0)})}
function Aq(a,b,c){var d;return L(function(e){if(e.g==1)return c.code==3024?(b.Ba=!1,bq(b),jq(a,b,0),e.return()):H(e,Ii(a.aa),2);hj(a.l);if(c.category===1&&c.code!=1003){if(b.fc)return lq(a,!1),e.return();d=Mq(a,c);c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||c.code!=1011)a.g.onError(c);c.handled||a.i.failureCallback(c);K(e)})}function Mq(a,b){return a.i.maxDisabledTime===0&&b.code==1011?1:a.i.maxDisabledTime}
function Dq(a,b){b=b===void 0?!1:b;var c,d,e,f,g,h;return L(function(k){if(k.g==1){c=Date.now()/1E3;d=a.i.minTimeBetweenRecoveries;if(!b){if(!a.i.allowMediaSourceRecoveries||c-a.S<d)return k.return(!1);a.S=c}e=Cc;if(f=a.h.get(e.Z))bq(f),f.Ia&&(f.Ia.abort(),f.Ia=null),f.ab=null,f.Sb=null,f.Rb=null,f.Ba=!1,f.Lb=!1,f.Hc=0,f.Vc=!1,f.Cb=!1,f.ma&&f.ma.Gf();if(g=a.h.get(e.qa))bq(g),g.Ia&&(g.Ia.abort(),g.Ia=null),g.ab=null,g.Sb=null,g.Rb=null,g.Ba=!1,g.Lb=!1,g.Hc=0,g.Vc=!1,g.Cb=!1,g.ma&&g.ma.Gf();h=a.g.video.paused;
return H(k,ap(a.g.T,xq(a)),2)}!g||g.Cb||g.Ba||g.cb||jq(a,g,0);!f||f.Cb||f.Ba||f.cb||jq(a,f,0);h||a.g.video.play();return k.return(!0)})}function Pq(a,b){if(a.V.projection!=b.projection||a.V.hfov!=b.hfov){if(b.projection!=null||b.hfov!=null){var c=(new Map).set("detail",b);c=new Qi("spatialvideoinfo",c)}else c=new Qi("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.V=b}}
function vq(a){if(a.i.crossBoundaryStrategy!=="keep")return!0;var b=sb();if(!Kc()||!b.kc()){b=r(a.h.keys());for(var c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==Cc.Ka&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1)return!0}else if(!b.ye())for(b=r(a.h.keys()),c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==Cc.Ka&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1){a=new Set;b=r(c.fullMimeTypes);for(c=b.next();!c.done;c=b.next())a.add(he(c.value));return a.size>
1}return!1}function rq(a){a.F.ib();vq(a)&&(a.F.G(a.g.video,"waiting",function(){return wq(a)}),a.F.G(a.g.video,"timeupdate",function(){return wq(a)}))}function wq(a){if(vq(a)){a.K.stop();var b=a.g.Ob(),c=a.h.get("video")||a.h.get("audio");c&&(c=c.ab)&&c.g!==null&&(b=c.g-b,b<0||b>1||(a.I=c.g+.1,a.K.ka(b)))}}
function Fq(a,b,c){if(b.type===Ac)return!1;var d=b.ab;if(!d)return!1;var e=c.$;c=d.g!==e.g;a.i.crossBoundaryStrategy==="reset_to_encrypted"&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.i.crossBoundaryStrategy="keep"));a.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&d.encrypted==e.encrypted&&(c=!1);if(a.i.crossBoundaryStrategy==="keep"&&d.mimeType&&e.mimeType){var f=ie(me(d.mimeType)),g=ie(me(d.mimeType));d.mimeType==e.mimeType&&f==g&&(c=!1)}c&&(a.J||b.Ac)&&(a.J=!1,Dq(a,!0).then(function(){var h=
(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.g.onEvent(new Qi("boundarycrossed",h))}));return c}function xq(a,b){function c(f){if(f.fullMimeTypes&&f.fullMimeTypes.size>1&&a.h.has(f.type)){var g=a.h.get(f.type),h=Do(a.g.T,g.type),k=a.g.Ob();(g=Eq(a,g,k,h))&&g.codecs&&g.mimeType&&(f.codecs=g.codecs,f.mimeType=g.mimeType)}}b=b===void 0?!1:b;var d=new Map,e=a.o.audio;e&&(c(e),d.set("audio",e));if(e=a.o.video)c(e),d.set("video",e);b&&a.B&&d.set(Ac,a.B);return d};function Qq(){}
function Rq(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&Object.keys(d).length==0:c.constructor==Object&&Object.keys(c).length==0;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?b[l]===void 0?n===void 0||h?delete a[l]:a[l]=fd(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=fd(n)),m=Rq(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||b[l]==null||typeof b[l]!="function"&&b[l].constructor!=n.constructor?(bb("Invalid config, wrong type for "+m),
k=!1):typeof c[l]=="function"&&c[l].length!=b[l].length?(cb("Unexpected number of arguments for "+m),a[l]=b[l]):a[l]=Array.isArray(a[l])?b[l].slice():b[l]:(bb("Invalid config, unrecognized key "+m),k=!1)}return k}function Sq(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(e<0)break;if(e==0||a[e-1]!="\\")f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Tq(a,b){return a&&b}
function Uq(a,b){function c(f){for(var g=r(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&Object.keys(f[h]).length===0)delete f[h];else{var k=f[h];Array.isArray(k)&&k.length===0?delete f[h]:typeof f[h]=="function"?delete f[h]:e(f[h])&&(c(f[h]),Object.keys(f[h]).length===0&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])||
(h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),Object.keys(l).length>0||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?jb(l,g[k])||(h[k]=l):Number.isNaN(l)&&Number.isNaN(g[k])||l!==g[k]&&(h[k]=l);else h[k]=l;return h},{})}function e(f){return f&&typeof f==="object"&&!Array.isArray(f)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Qq);Qq.getDifferenceFromConfigObjects=Uq;Qq.convertToConfigObject=Sq;Qq.mergeConfigObjects=Rq;function Vq(){}
function Wq(){var a=Infinity,b=sb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:Hi(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&k=="skd"&&(k=l.serverCertificate,l=Wj(h),h=Xj(h,l,k));return h},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,
minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},d="reload";Kc()&&b.kc()&&(d="smooth");var e={retryParameters:Hi(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,
ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Xq,manifestPreprocessorTXml:Yq,sequenceMode:!1,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],
mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:b.Dc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Xq,manifestPreprocessorTXml:Yq,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
f={trackSelectionCallback:function(h){return L(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return L(function(l){if(l.g==1)return navigator.storage&&navigator.storage.estimate?H(l,navigator.storage.estimate(),3):l.return(!0);k=l.h;return l.return(k.usage+h<k.quota*.95)})},progressCallback:function(h,k){return Tq([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:Hi(),failureCallback:function(h){return Tq([h])},rebufferingGoal:0,
bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],
disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,
loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(h){return Tq([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k){return Tq([h,k])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,
durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new Gf},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(Ap,[null].concat(A(Ka.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,
maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredAudioRole:"",preferredVideoRole:"",
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,
playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,
disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:Infinity,preloadPrevItem:!0,repeatMode:0}};f.trackSelectionCallback=function(h){return L(function(k){return k.return(Zq(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.La(g)}
function $q(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}
function ar(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 Rq(a,b,c||Wq(),d,"")}
function Zq(a,b,c){var d=c;d=="AUTO"&&(c=a.some(function(h){return h.hdr&&h.hdr=="HLG"?!0:!1}),d=sb().Jc(c));var e=a.filter(function(h){return h.type!="variant"||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Ue(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Ne(h.language)==f}));c.length==0&&(c=e.filter(function(h){return h.primary}));c.length==0&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&h.height<=480});g.length&&(g.sort(function(h,k){return k.height-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=r(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ac&&c.type!="image"||b.push(c);return b}function Xq(a){return Tq([a],a)}function Yq(a){return Tq([a],a)}S("shaka.util.PlayerConfiguration",Vq);Vq.mergeConfigObjects=ar;Vq.createDefaultForLL=$q;Vq.createDefault=Wq;function br(){this.g=null;this.h=[]}function cr(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(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 dr(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(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 er(){this.i=this.h=null;this.g=[]}function fr(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 gr(){this.C=this.aa=NaN;this.l="";this.j=this.yg=this.A=this.B=this.K=this.D=this.o=this.m=this.J=this.F=this.i=this.V=this.Y=this.N=this.P=this.S=NaN;this.L=0;this.H=this.I=NaN;this.g=new br;this.h=new er}function hr(a,b,c){a.S=b;a.P=c}function ir(a,b,c){a.aa=b;a.C=c}function jr(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function kr(a,b){a.j=isNaN(a.j)?b:a.j+b}
function lr(a){var b=a.aa,c=a.C,d=a.l,e=a.B,f=a.P,g=a.S,h=a.N,k=a.Y,l=a.V,m=a.A,n=a.i,q=a.F,t=a.J,u=a.m,v=cr(a.g,"playing"),w=cr(a.g,"paused"),y=cr(a.g,"buffering"),x=a.o,B=a.D,C=a.K,I=a.yg,E=a.j,z=a.L,D=a.I,G=a.H,F=dr(a.g),J=[];a=r(a.h.g);for(var M=a.next();!M.done;M=a.next())M=M.value,J.push({timestamp:M.timestamp,id:M.id,type:M.type,fromAdaptation:M.fromAdaptation,bandwidth:M.bandwidth});return{width:b,height:c,currentCodecs:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,corruptedFrames:h,
stallsDetected:k,gapsJumped:l,estimatedBandwidth:m,completionPercent:n,loadLatency:q,manifestTimeSeconds:t,drmTimeSeconds:u,playTime:v,pauseTime:w,bufferingTime:y,licenseTime:x,liveLatency:B,maxSegmentDuration:C,manifestSizeBytes:I,bytesDownloaded:E,nonFatalErrorCount:z,manifestPeriodCount:D,manifestGapCount:G,stateHistory:F,switchHistory:J}};function mr(a,b,c,d){Ri.call(this);this.N=a;this.Y=b;this.za=d.networkingEngine;this.l=c;this.B=null;this.xa=0;this.Ga=d.Rd;this.F=d.Hi;this.Ha=d.Ii;this.g=d.config;this.j=this.H=this.h=null;this.ua=!1;this.I=d.Ui;this.va=!1;this.i=null;this.ia=!1;this.o=null;this.L=new Map;this.wa=!1;this.Fa=d.Ti;this.aa=new gr;this.na=new Ji;this.A=new Ji;this.P=null;this.C=!1;this.ea=d.sh;this.V=this.m=null;this.S=!1;this.K=[];this.J=[];this.D=!0}na(mr,Ri);function nr(a,b,c){(a=b?a.J:a.K)?a.push(c):c()}
function or(a){if(a.J)for(var b=r(a.J),c=b.next();!c.done;c=b.next())c=c.value,c();a.J=null}function pr(a,b){a.P=b;a.S=!0;if(a.K){b=r(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}p=mr.prototype;p.getStartTime=function(){return this.l};p.Wd=function(){return this.N};p.pf=function(){return this.h};function qr(a){a.va=!0;return a.I}p.getStats=function(){return this.aa};function rr(a){a.ia=!0;return a.i}p.ei=function(){return this.m?qf(this.m):null};
p.di=function(){return this.V?rf(this.V):null};function sr(a){a.wa=!0;return a.L}
p.start=function(){var a=this;(function(){var b;return L(function(c){switch(c.g){case 1:return H(c,Promise.resolve(),2);case 2:return va(c,3),H(c,tr(a),5);case 5:ur(a);if("webkit"===window.shakaMediaKeysPolyfill){c.u(6);break}return H(c,vr(a),7);case 7:ur(a);case 6:if(!a.ea){c.u(8);break}return H(c,wr(a),9);case 9:ur(a);case 8:if(!a.ea||!a.i){c.u(10);break}return H(c,Qj(a.i),11);case 11:ur(a);case 10:a.A.resolve();xa(c,0);break;case 3:b=za(c),b instanceof T&&(b.code==7001||b.code==7003)||a.A.reject(b),
K(c)}})})()};p.dispatchEvent=function(a){return this.P?this.P.dispatchEvent(a):Ri.prototype.dispatchEvent.call(this,a)};p.onError=function(a){a.severity===2&&(this.A.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new Qi("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function ur(a){if(a.C)throw new T(2,7,7003);}function xr(a,b){a.dispatchEvent(new Qi("onstatechange",(new Map).set("state",b)))}
function tr(a){var b,c,d,e,f,g;return L(function(h){switch(h.g){case 1:xr(a,"manifest-parser");a.j||(a.H=Kk(a.N,a.Y),a.j=a.H(),a.j.configure(a.g.manifest,function(){return a.D}));b=Date.now()/1E3;xr(a,"manifest");if(a.h){h.u(2);break}return H(h,a.j.start(a.N,a.Ha),3);case 3:return a.h=h.h,yr(a.h),H(h,zr(a),2);case 2:return a.na.resolve(),c=new Qi("manifestparsed",void 0),H(h,Promise.resolve(),5);case 5:a.dispatchEvent(c);if(a.h.variants.length==0)throw new T(2,4,4036);yr(a.h);d=ko(a.F,a.h);if(!d){h.u(6);
break}e=new Qi("trackschanged",void 0);return H(h,Promise.resolve(),7);case 7:ur(a),a.dispatchEvent(e);case 6:f=Date.now()/1E3,g=f-b,a.aa.J=g,K(h)}})}
function vr(a,b){var c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.h||a.i)return g.return();xr(a,"drm-engine");a.xa=Date.now()/1E3;a.i=a.Ga();a.F.h=a.i;a.i.configure(a.g.drm,function(){return a.D});c=zf(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.ba());return H(g,sj(a.i,c,a.h.offlineSessionIds,d),2);case 2:ur(a);if(!b){g.u(3);break}return H(g,a.i.Xb(b),4);case 4:ur(a);case 3:return H(g,io(a.F,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new Qi("trackschanged",
void 0);return H(g,Promise.resolve(),7);case 7:a.dispatchEvent(f),K(g)}})}p.configure=function(a,b){a=Sq(a,b);ar(this.g,a)};p.getConfiguration=function(){return fd(this.g)};
function zr(a){var b,c,d,e,f;return L(function(g){a.B||(a.B=a.g.adaptationSetCriteriaFactory(),a.B.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredAudioRole,videoRole:a.g.preferredVideoRole,channelCount:a.g.preferredAudioChannelCount,hdrLevel:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,audioLabel:a.g.preferredAudioLabel,videoLabel:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:"",
activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:a.g.preferredAudioCodecs,preferredAudioChannelCount:a.g.preferredAudioChannelCount}));if(a.h.variants.length!=1&&a.h.type!="HLS")return g.u(0);b=Ar(a);if(!b)return g.u(0);c=[];d=r([b.video,b.audio]);for(e=d.next();!e.done;e=d.next())(f=e.value)&&!f.segmentIndex&&c.push(f.createSegmentIndex());return c.length>0?H(g,Promise.all(c),0):g.u(0)})}
function wr(a){var b,c,d,e,f;return L(function(g){!a.m&&(b=Ar(a))&&(a.m=b);if(!a.m)return g.u(0);c=a.h.presentationTimeline.ba();d=[];e=a.m;e.video&&d.push(Br(a,e.video,c));e.audio&&d.push(Br(a,e.audio,c));(f=Af(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&Ef(e.audio,f,a.g)&&(d.push(Br(a,f,c)),a.V=f);return H(g,Promise.all(d),0)})}
function Ar(a){if(!a.o){var b=a.g.abrFactory;a.o=b();a.o.configure(a.g.abr)}b=zf(a.h.variants);b=a.B.create(b);a.o.setVariants(Array.from(b.values()));return a.o.chooseVariant(!0)}
function Br(a,b,c){var d,e,f,g,h;return L(function(k){if(k.g==1)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Op(d,b,function(l,m,n){return yq(l,m,n||null,a.g.streaming.retryParameters,a.za,a.D)},!1),a.L.set(b.id,e),b.segmentIndex?k.u(2):H(k,b.createSegmentIndex(),2);f=typeof a.l==="number"?a.l:0;g=b.segmentIndex.Eb(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=tf(b.segmentIndex));return h?c?h.$?H(k,Rp(e,h.$),0):k.u(0):H(k,Qp(e,h.startTime),0):k.u(0)})}p.qj=function(){return this.A};
p.destroy=function(){var a=this,b,c,d;return L(function(e){if(e.g==1)return a.C=!0,!a.j||a.ua?e.u(2):H(e,a.j.stop(),2);if(e.g!=4)return a.o&&a.o.release(),a.I&&!a.va&&a.I.release(),!a.i||a.ia?e.u(4):H(e,a.i.destroy(),4);if(a.L.size>0&&!a.wa)for(b=r(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,Xp(d);K(e)})};function yr(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",mr);
mr.prototype.destroy=mr.prototype.destroy;mr.prototype.waitForFinish=mr.prototype.qj;mr.prototype.getPrefetchedTextTrack=mr.prototype.di;mr.prototype.getPrefetchedVariantTrack=mr.prototype.ei;function Cr(a,b){Ri.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Gc:null,Fc:Dr,tc:function(d,e){return Er(c,"enter",d,e)}},{Gc:Fr,Fc:Dr,tc:function(d,e){return Er(c,"enter",d,e)}},{Gc:Gr,Fc:Dr,tc:function(d,e){return Er(c,"enter",d,e)}},{Gc:Dr,Fc:Fr,tc:function(d,e){return Er(c,"exit",d,e)}},{Gc:Dr,Fc:Gr,tc:function(d,e){return Er(c,"exit",d,e)}},{Gc:Fr,Fc:Gr,tc:function(d,e){e?Er(c,"skip",d,e):(Er(c,"enter",d,e),Er(c,"exit",d,e))}},{Gc:Gr,Fc:Fr,tc:function(d,e){return Er(c,"skip",
d,e)}}];this.h=new mb;this.h.G(this.i,"regionremove",function(d){c.g.delete(d.region)})}na(Cr,Ri);Cr.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Ri.prototype.release.call(this)};
Cr.prototype.j=function(a,b){if(!this.l||a!=0){this.l=!1;for(var c=r(this.i.h.values()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Fr:a>d.endTime?Gr:Dr;this.g.set(d,f);for(var g=r(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Gc==e&&h.Fc==f&&h.tc(d,b)}}};function Er(a,b,c,d){b=new Qi(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Fr=1,Dr=2,Gr=3;function Hr(a,b,c,d,e,f,g){if(c>=200&&c<=299&&c!=202||c==304)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=hc(b)}catch(h){}throw new T(c==401||c==403?2:1,1,1001,d,c,f,a,g,e||d);};function Ir(){}
function Jr(a,b,c,d,e,f){var g=new Kr;try{kj(b.headers).forEach(function(m,n){g.append(n,m)})}catch(m){return Li(new T(1,1,1002,a,m,c))}var h=new Lr,k={fg:!1,jh:!1};a=Mr(a,b,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new Ki(a,function(){k.fg=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new Ge(function(){k.jh=!0;h.abort()});l.ka(b/
1E3);a.finally(function(){l.stop()})}return a}
function Mr(a,b,c,d,e,f,g,h,k){var l,m,n,q,t,u,v,w,y,x,B,C,I,E,z;return L(function(D){switch(D.g){case 1:return l=Nr,m=Or,q=new ArrayBuffer(0),u=t=0,v={},w=Date.now(),va(D,2),H(D,l(a,d),4);case 4:n=D.h;v=Pr(n.headers);g(v);if(d.method=="HEAD"){D.u(5);break}x=(y=n.headers.get("Content-Length"))?parseInt(y,10):0;if(!n.body)return H(D,n.arrayBuffer(),9);B=n.clone().body.getReader();C=function(G){function F(){var J,M,O,R;return L(function(P){switch(P.g){case 1:return va(P,2),H(P,B.read(),4);case 4:J=
P.h;xa(P,3);break;case 2:return za(P),P.return();case 3:if(J.done){P.u(5);break}t+=J.value.byteLength;if(!h){P.u(5);break}return H(P,h(J.value),5);case 5:M=Date.now();O=t-u;if(M-w>100&&O>=k||J.done)R=J.done?0:x-t,f(M-w,O,R),u=t,w=M;J.done?G.close():(G.enqueue(J.value),F());K(P)}})}F()};new m({start:C});return H(D,n.arrayBuffer(),8);case 8:q=D.h;D.u(5);break;case 9:q=D.h,I=Date.now(),f(I-w,q.byteLength,0);case 5:b.headers.Range&&(E=b.headers.Range.replace("bytes=","").split("-").filter(function(G){return G}).map(function(G){return parseInt(G,
10)}),E.length==2&&q.byteLength!=E[1]-E[0]+1&&cb("Payload length does not match range requested bytes",b,n));xa(D,3);break;case 2:z=za(D);if(e.fg)throw new T(1,1,7001,a,c);if(e.jh)throw new T(1,1,1003,a,c);throw new T(1,1,1002,a,z,c);case 3:return D.return(Hr(v,q,n.status,a,n.url,b,c))}})}function Pr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
function Qr(){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",Ir);Ir.isSupported=Qr;Ir.parse=Jr;var Nr=window.fetch,Lr=window.AbortController,Or=window.ReadableStream,Kr=window.Headers;Qr()&&(Vi("http",Jr,2,!0),Vi("https",Jr,2,!0),Vi("blob",Jr,2,!0));function Rr(){}
function Sr(a,b,c,d,e,f){var g=new Tr,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;var q={};g.onabort=function(){n(new T(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var u=g.getAllResponseHeaders().trim().split("\r\n"),v={};u=r(u);for(var w=u.next();!w.done;w=u.next())w=w.value.split(": "),v[w[0].toLowerCase()]=w.slice(1).join(": ");
q=v;e(q)}};g.onload=function(u){var v=g.response;try{d(Date.now()-h,u.loaded-k,0);var w=Hr(q,v,g.status,a,g.responseURL,b,c);m(w)}catch(y){n(y)}};g.onerror=function(u){n(new T(1,1,1002,a,u,c))};g.ontimeout=function(){n(new T(1,1,1003,a,c))};g.onprogress=function(u){var v=Date.now(),w=f.minBytesForProgressEvents||0,y=u.loaded-k;if(v-h>100&&y>=w||u.lengthComputable&&u.loaded==u.total)d(v-h,y,g.readyState==4?0:u.total-u.loaded),k=u.loaded,h=v};for(var t in b.headers)try{g.setRequestHeader(t.toLowerCase(),
b.headers[t])}catch(u){throw new T(1,1,1002,a,u,c);}g.send(b.body)});return new Ki(l,function(){g.abort();return Promise.resolve()})}S("shaka.net.HttpXHRPlugin",Rr);Rr.parse=Sr;var Tr=window.XMLHttpRequest;Vi("http",Sr,1,!0);Vi("https",Sr,1,!0);Vi("blob",Sr,1,!0);/*
 @license
 Copyright 2013 Ali Al Dallal

 Licensed under the MIT license.

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
*/
for(var js={ach:"Lwo",ady:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"T\u0255\u0265i",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-AR":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-MA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-SA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)","ay-BO":"Aymar aru",az:"Az\u0259rbaycan dili","az-AZ":"Az\u0259rbaycan dili",
"be-BY":"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bg:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438","bg-BG":"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bn:"\u09ac\u09be\u0982\u09b2\u09be","bn-IN":"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)","bn-BD":"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)","bs-BA":"Bosanski",ca:"Catal\u00e0","ca-ES":"Catal\u00e0",cak:"Maya Kaqchikel","ck-US":"\u13e3\u13b3\u13a9 (tsalagi)",
cs:"\u010ce\u0161tina","cs-CZ":"\u010ce\u0161tina",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (\u00d6sterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserb\u0161\u0107ina",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac","el-GR":"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)",
"en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Espa\u00f1ol","es-AR":"Espa\u00f1ol (Argentine)","es-419":"Espa\u00f1ol (Latinoam\u00e9rica)","es-CL":"Espa\u00f1ol (Chile)","es-CO":"Espa\u00f1ol (Colombia)","es-EC":"Espa\u00f1ol (Ecuador)","es-ES":"Espa\u00f1ol (Espa\u00f1a)","es-LA":"Espa\u00f1ol (Latinoam\u00e9rica)","es-NI":"Espa\u00f1ol (Nicaragua)","es-MX":"Espa\u00f1ol (M\u00e9xico)",
"es-US":"Espa\u00f1ol (Estados Unidos)","es-VE":"Espa\u00f1ol (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"\u0641\u0627\u0631\u0633\u06cc","fa-IR":"\u0641\u0627\u0631\u0633\u06cc","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"F\u00f8royskt",fr:"Fran\u00e7ais","fr-CA":"Fran\u00e7ais (Canada)","fr-FR":"Fran\u00e7ais (France)","fr-BE":"Fran\u00e7ais (Belgique)","fr-CH":"Fran\u00e7ais (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",
gl:"Galego","gl-ES":"Galego","gn-PY":"Ava\u00f1e'\u1ebd","gu-IN":"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0","gx-GR":"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",he:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f","he-IL":"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",hi:"\u0939\u093f\u0928\u094d\u0926\u0940","hi-IN":"\u0939\u093f\u0928\u094d\u0926\u0940",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserb\u0161\u0107ina",ht:"Krey\u00f2l",hu:"Magyar","hu-HU":"Magyar","hy-AM":"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",
id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"\u00cdslenska","is-IS":"\u00cdslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"\u65e5\u672c\u8a9e","ja-JP":"\u65e5\u672c\u8a9e","jv-ID":"Basa Jawa","ka-GE":"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8","kk-KZ":"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a","km-KH":"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kab:"Taqbaylit",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1","kn-IN":"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",
ko:"\ud55c\uad6d\uc5b4","ko-KR":"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",ku:"Kurd\u00ee","ku-TR":"Kurd\u00ee",la:"Latin","la-VA":"Latin",lb:"L\u00ebtzebuergesch","li-NL":"L\u00e8mb\u00f6rgs",lt:"Lietuvi\u0173","lt-LT":"Lietuvi\u0173",lv:"Latvie\u0161u","lv-LV":"Latvie\u0161u",mai:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0","mg-MG":"Malagasy",mk:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438","mk-MK":"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",
ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","ml-IN":"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","mn-MN":"\u041c\u043e\u043d\u0433\u043e\u043b",mr:"\u092e\u0930\u093e\u0920\u0940","mr-IN":"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"\u1017\u1019\u102c\u1005\u1000\u102c",nb:"Norsk (bokm\u00e5l)","nb-NO":"Norsk (bokm\u00e5l)",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","ne-NP":"\u0928\u0947\u092a\u093e\u0932\u0940",nl:"Nederlands","nl-BE":"Nederlands (Belgi\u00eb)",
"nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"\u0b13\u0b21\u0b3c\u0b3f\u0b06",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40","pa-IN":"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",pl:"Polski","pl-PL":"Polski","ps-AF":"\u067e\u069a\u062a\u0648",pt:"Portugu\u00eas","pt-BR":"Portugu\u00eas (Brasil)","pt-PT":"Portugu\u00eas (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Rom\u00e2n\u0103","ro-RO":"Rom\u00e2n\u0103",ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",
"ru-RU":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","sa-IN":"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d","se-NO":"Davvis\u00e1megiella","si-LK":"\u0db4\u0dc5\u0dcf\u0dad",sk:"Sloven\u010dina","sk-SK":"Sloven\u010dina (Slovakia)",sl:"Sloven\u0161\u010dina","sl-SI":"Sloven\u0161\u010dina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"\u0421\u0440\u043f\u0441\u043a\u0438","sr-RS":"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili",
"sw-KE":"Kiswahili",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd","ta-IN":"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41","te-IN":"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tg:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301","tg-TJ":"\u0442\u043e\u04b7\u0438\u043a\u04e3",th:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22","th-TH":"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",tl:"Filipino","tl-PH":"Filipino",
tlh:"tlhIngan-Hol",tr:"T\u00fcrk\u00e7e","tr-TR":"T\u00fcrk\u00e7e","tt-RU":"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",uk:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430","uk-UA":"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648","ur-PK":"\u0627\u0631\u062f\u0648",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Ti\u1ebfng Vi\u1ec7t","vi-VN":"Ti\u1ebfng Vi\u1ec7t","xh-ZA":"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9","yi-DE":"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",
zh:"\u4e2d\u6587","zh-HANS":"\u4e2d\u6587\u7b80\u4f53","zh-HANT":"\u4e2d\u6587\u7e41\u9ad4","zh-CN":"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09","zh-HK":"\u4e2d\u6587\uff08\u9999\u6e2f\uff09","zh-SG":"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09","zh-TW":"\u4e2d\u6587\uff08\u53f0\u7063\uff09","zu-ZA":"isiZulu"},ks=r(Object.keys(js)),ls=ks.next();!ls.done;ls=ks.next()){var ms=ls.value;js[ms.toLowerCase()]=js[ms]};function ns(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return ns(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=Od,e=a.fontStyle==Pd,f=a.textDecoration.includes(Qd);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;e==""&&b&&(e=b.color);d="";(e=os(e))&&(d+="."+e);e=a.backgroundColor;e==""&&b&&(e=b.backgroundColor);(b=os(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=r(h);h=k.next().value;
k=k.next().value;return"<"+h+(k===void 0?"":k)+">"+g+"</"+h+">"},a.payload)}
function os(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&a.length>7&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function ps(a,b){var c=[];a=r(qs(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,A(ps(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=ns(d,b);c.push(e)}return c}
function qs(a){var b=[];a=r(a);for(var c=a.next(),d={};!c.done;d={Oe:void 0},c=a.next())d.Oe=c.value,b.some(function(e){return function(f){return Ed(e.Oe,f)}}(d))||b.push(d.Oe);return b}
function rs(a){function b(d){for(var e=5381,f=d.length;f;)e=e*33^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}a.textAlign=="center"&&c.align!="center"&&(c.align="middle");a.writingMode=="vertical-lr"?c.vertical="lr":a.writingMode=="vertical-rl"&&
(c.vertical="rl");a.lineInterpretation==1&&(c.snapToLines=!1);a.line!=null&&(c.line=a.line);a.position!=null&&(c.position=a.position);return c}
function ss(a,b){var c=ps(b),d=[];b=a.cues?Array.from(a.cues):[];c=r(c);for(var e=c.next(),f={};!e.done;f={Lc:void 0},e=c.next())f.Lc=e.value,!b.some(function(g){return function(h){return h.startTime==g.Lc.startTime&&h.endTime==g.Lc.endTime&&h.text==g.Lc.payload?!0:!1}}(f))&&f.Lc.payload&&(e=rs(f.Lc))&&d.push(e);b=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-
d.indexOf(h)});b=r(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function ts(a,b){var c=!1;a.mode==="disabled"&&(c=!0,a.mode="hidden");for(var d=0;d<a.cues.length;){var e=a.cues[d];b(e)?a.removeCue(e):d++}c&&(a.mode="disabled")};function us(a){var b=this;this.i=a;this.l=new mb;this.j=null;this.h=new Map;this.g=-1;this.A=!1;this.o=null;this.C=function(){b.l.pb(b.i,"textchanged",b.m);b.l.pb(b.j.textTracks,"change",b.B);for(var c=r(b.h.values()),d=c.next();!d.done;d=c.next())d.value.remove();b.h.clear();b.g=-1;b.j=null};this.m=function(){var c=new Map,d=b.i.dc();d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;if(b.h.has(e.id)){var f=b.h.get(e.id);e.active||f.track.mode==="disabled"||(f.track.mode="disabled");b.h.delete(e.id)}else{f=
b.j.ownerDocument.createElement("track");f.kind=vs(e);var g=f,h=void 0;if(e.label)h=e.label;else if(e.language)if(e.language in js)h=js[e.language];else{var k=Se(e.language);k in js&&(h=js[k]+" ("+e.language+")")}h||(h=e.originalTextId,e.language&&e.language!==e.originalTextId&&(h+=" ("+e.language+")"));g.label=h;e.language in js&&(f.srclang=e.language);f.src="data:,WEBVTT";f.track.mode="disabled";b.j.appendChild(f)}c.set(e.id,f);e.active&&(b.g=e.id)}d=r(b.h.values());for(e=d.next();!e.done;e=d.next())e.value.remove();
b.g>-1&&(c.has(b.g)?(d=c.get(b.g).track,d.mode==="disabled"&&(d.mode=b.A?"showing":"hidden")):b.g=-1);b.h=c};this.B=function(){if(!b.o){var c=b.j;b.o=(new Ge(function(){b.o=null;if(b.j===c){var d=-1,e=!1;if(b.h.has(b.g)){var f=b.h.get(b.g);f.track.mode==="showing"?(d=b.g,e=!0):f.track.mode==="hidden"&&(d=b.g)}if(!e)for(e=r(b.h),f=e.next();!f.done;f=e.next()){var g=r(f.value);f=g.next().value;g=g.next().value;if(g.track.mode==="showing"){d=f;break}else d<0&&g.track.mode==="hidden"&&(d=f)}e=r(b.h);
for(f=e.next();!f.done;f=e.next())g=r(f.value),f=g.next().value,g=g.next().value,f!==d&&g.track.mode!=="disabled"&&(g.track.mode="disabled");b.g!==d&&(b.g=d,d>-1&&b.i.Lf({id:d}));b.i.$g(d>-1&&b.h.get(d).track.mode==="showing")}})).ka(0)}};this.l.G(a,"loaded",function(){return b.enableTextDisplayer()});this.enableTextDisplayer()}p=us.prototype;p.configure=function(){};
p.remove=function(a,b){if(this.i)this.h.has(this.g)&&ts(this.h.get(this.g).track,function(c){return c.startTime<b&&c.endTime>a});else return!1;return!0};p.append=function(a){this.h.has(this.g)&&ss(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.C(),this.i=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.A};
p.setTextVisibility=function(a){this.A=a;if(this.h.has(this.g)){var b=this.h.get(this.g).track;b.mode!=="disabled"&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.i&&this.i.m===3)if(b=Array.from(this.i.h.textTracks).filter(function(d){return["captions","subtitles","forced"].includes(d.kind)}),a){a=null;b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c.mode==="showing"){a=null;break}else a||c.mode!=="hidden"||(a=c);a&&(a.mode="showing")}else for(a=r(b),b=a.next();!b.done;b=
a.next())b=b.value,b.mode==="showing"&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.i&&this.i.m===2&&(this.j=this.i.h,this.l.Pa(this.i,"unloading",this.C),this.l.G(this.i,"textchanged",this.m),this.l.G(this.j.textTracks,"change",this.B),this.m())};
function vs(a){var b=sb();return a.forced&&b.ya()==="WEBKIT"?"forced":a.kind==="caption"||a.roles&&a.roles.some(function(c){return c.includes("transcribes-spoken-dialog")})&&a.roles.some(function(c){return c.includes("describes-music-and-sound")})?"captions":"subtitles"}S("shaka.text.NativeTextDisplayer",us);us.prototype.enableTextDisplayer=us.prototype.enableTextDisplayer;us.prototype.setTextLanguage=us.prototype.setTextLanguage;us.prototype.setTextVisibility=us.prototype.setTextVisibility;
us.prototype.isTextVisible=us.prototype.isTextVisible;us.prototype.destroy=us.prototype.destroy;us.prototype.append=us.prototype.append;us.prototype.remove=us.prototype.remove;us.prototype.configure=us.prototype.configure;function ws(a,b){yb("SimpleTextDisplayer","Please migrate to NativeTextDisplayer");this.h=a;this.i=b;this.g=null;a=r(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,b.kind!=="metadata"&&b.kind!=="chapters"&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=ws.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;ts(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
p.append=function(a){this.g&&ss(this.g,a)};p.destroy=function(){this.g&&(ts(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?this.g.mode=="showing":!1};p.setTextVisibility=function(a){a&&!this.g&&xs(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){xs(this)};function xs(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}
S("shaka.text.SimpleTextDisplayer",ws);ws.prototype.enableTextDisplayer=ws.prototype.enableTextDisplayer;ws.prototype.setTextLanguage=ws.prototype.setTextLanguage;ws.prototype.setTextVisibility=ws.prototype.setTextVisibility;ws.prototype.isTextVisible=ws.prototype.isTextVisible;ws.prototype.destroy=ws.prototype.destroy;ws.prototype.append=ws.prototype.append;ws.prototype.remove=ws.prototype.remove;ws.prototype.configure=ws.prototype.configure;function ys(){}p=ys.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};S("shaka.text.StubTextDisplayer",ys);ys.prototype.enableTextDisplayer=ys.prototype.enableTextDisplayer;ys.prototype.setTextLanguage=ys.prototype.setTextLanguage;ys.prototype.setTextVisibility=ys.prototype.setTextVisibility;
ys.prototype.isTextVisible=ys.prototype.isTextVisible;ys.prototype.destroy=ys.prototype.destroy;ys.prototype.append=ys.prototype.append;ys.prototype.remove=ys.prototype.remove;ys.prototype.configure=ys.prototype.configure;function zs(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.o=b;this.C=this.A=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.B=new Ge(function(){c.j.paused||As(c)});Bs(this);this.l=new Map;this.i=new mb;this.i.G(document,"fullscreenchange",function(){As(c,!0)});this.i.G(this.j,"seeking",
function(){As(c,!0)});this.i.G(this.j,"ratechange",function(){Bs(c)});this.i.G(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.A=e/d:c.A=null});this.D=null;"ResizeObserver"in window&&(this.D=new ResizeObserver(function(){As(c,!0)}),this.D.observe(this.g));this.F=new Map}p=zs.prototype;p.configure=function(a){this.C=a;Bs(this);As(this,!0)};
p.append=function(a){var b=[].concat(A(this.h));a=r(qs(a));for(var c=a.next(),d={};!c.done;d={Pe:void 0},c=a.next())d.Pe=c.value,b.some(function(e){return function(f){return Ed(f,e.Pe)}}(d))||this.h.push(d.Pe);this.h.length&&Bs(this);As(this)};
p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.o.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.B&&(this.B.stop(),this.B=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.D&&(this.D.disconnect(),this.D=null);return Promise.resolve()};p.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});As(this,c>this.h.length);this.h.length||Bs(this);return!0};
p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.o.appendChild(this.g),As(this,!0)):this.g.parentElement&&this.o.removeChild(this.g)};p.setTextLanguage=function(a){a&&a!="und"?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function Bs(a){a.B&&(a.h.length?a.B.Ea((a.C?a.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.B.stop())}
function Cs(a,b){for(;b!=null;){if(b==a.g)return!0;b=b.parentElement}return!1}
function Ds(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.l.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.mh:null;l&&(g.push(l.Qe),l.zc&&g.push(l.zc),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?Cs(a,n)||(f=!0):(Es(a,k,e),l=a.l.get(k),n=l.mh,f=!0));k.nestedCues.length>0&&n&&Ds(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,t){return q.startTime!=
t.startTime?q.startTime-t.startTime:q.endTime-t.endTime});h=r(h);for(d=h.next();!d.done;d=h.next())d=a.l.get(d.value),d.zc?(d.zc.contains(c)&&d.zc.removeChild(c),c.appendChild(d.zc),d.zc.appendChild(d.Qe)):c.appendChild(d.Qe)}}function As(a,b){if(a.g){var c=a.j.currentTime;if(!a.m||(b===void 0?0:b)){b=r(a.F.values());for(var d=b.next();!d.done;d=b.next())Uh(d.value);Uh(a.g);a.l.clear();a.F.clear()}a.m&&Ds(a,a.h,a.g,c,[])}}
function Es(a,b,c){var d=c.length>1,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&b.nestedCues.length>0;var f=document.createElement(e);e!="br"&&Fs(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.A===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Vc?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Vc?"%":"px");if(a.F.has(c))c=a.F.get(c);else{e=document.createElement("span");var k=g.heightUnits==Vc?"%":"px",l=g.widthUnits==
Vc?"%":"px",m=g.viewportAnchorUnits==Vc?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;g.heightUnits===2&&(n=g.height*5.33,k="%");g.widthUnits===2&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;g.viewportAnchorUnits===2?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.A===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-
g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*q/100+m);g.heightUnits!==0&&g.widthUnits!==0&&g.viewportAnchorUnits!==0&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
b.displayAlign=="before"?"flex-start":b.displayAlign=="center"?"center":"flex-end";a.F.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.l.set(b,{Qe:f,mh:e,zc:c})}
function Gs(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==ud?c:a==="left"||a==="start"&&b===wd||a==="end"&&b==="rtl"?"line-left":a==="right"||a==="start"&&b==="rtl"||a==="end"&&b===wd?"line-right":"center"}
function Fs(a,b,c,d,e){var f=b.style,g=c.nestedCues.length==0,h=d.length>1;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Hs(c.linePadding,c,a.o);f.paddingRight=Hs(c.linePadding,c,a.o);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Is(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.setAttribute("translate","no"),l.textContent=
k)}if(h&&!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if(c.textAlign=="left"||c.textAlign=="start")f.width="100%",f.alignItems="start";else if(c.textAlign=="right"||c.textAlign=="end")f.width="100%",f.alignItems="end";f.justifyContent=c.displayAlign=="before"?"flex-start":c.displayAlign=="center"?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=
c.letterSpacing;d=a.C?a.C.fontScaleFactor:1;if(d!==1||c.fontSize)f.fontSize=Hs(c.fontSize||"1em",c,a.o,d);d=c.line;d!=null&&(g=c.lineInterpretation,g==yd&&(g=1,h=16,a.A&&a.A<1&&(h=32),d=d<0?100+d/h*100:d/h*100),g==1&&(f.position="absolute",c.writingMode==xd?(f.width="100%",c.lineAlign==zd?f.top=d+"%":c.lineAlign=="end"&&(f.bottom=100-d+"%")):c.writingMode=="vertical-lr"?(f.height="100%",c.lineAlign==zd?f.left=d+"%":c.lineAlign=="end"&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==zd?f.right=
d+"%":c.lineAlign=="end"&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=Gs(c);a=="line-left"?(f.cssFloat="left",c.position!==null&&(f.position="absolute",c.writingMode==xd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):a=="line-right"?(f.cssFloat="right",c.position!==null&&(f.position="absolute",c.writingMode==xd?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):c.position!==null&&c.position!=50&&(f.position="absolute",c.writingMode==xd?(f.left=c.position+"%",
f.width="auto"):f.top=c.position+"%",c.size&&(f.transform="translateX(-50%)"));f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==xd?f.width=c.size+"%":f.height=c.size+"%")}
function Hs(a,b,c,d){d=d===void 0?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function Is(a,b){for(var c=a.length-1;c>=0;c--){var d=b(a[c]);if(d||d===0)return d}return null}S("shaka.text.UITextDisplayer",zs);zs.prototype.enableTextDisplayer=zs.prototype.enableTextDisplayer;
zs.prototype.setTextLanguage=zs.prototype.setTextLanguage;zs.prototype.setTextVisibility=zs.prototype.setTextVisibility;zs.prototype.isTextVisible=zs.prototype.isTextVisible;zs.prototype.remove=zs.prototype.remove;zs.prototype.destroy=zs.prototype.destroy;zs.prototype.append=zs.prototype.append;zs.prototype.configure=zs.prototype.configure;function Js(a,b){function c(f){for(var g=f,h=r(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(g*1E3%1E3);return(f<10?"0":"")+f+":"+(h<10?"0":"")+h+":"+(k<10?"0":"")+k+"."+(g<100?g<10?"00":"0":"")+g}var d=ps(a);a="WEBVTT\n\n";d=r(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 vd: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 Ks(a,b){this.g=b;this.j=a;this.D=new Map;this.l=void 0;this.C=!1;this.J=!0;this.o=this.I=!1;this.B=this.A=void 0;this.H=0;this.K={request:!1,response:!1,event:!1};this.m={};this.i=new mb;this.F=[];this.h=null}Ks.prototype.setMediaElement=function(a){this.h=a;Ls(this)};Ks.prototype.configure=function(a){this.g=a;Ms(this)};function Ns(a){a.D.clear();a.C=!1;a.J=!0;a.I=!1;a.o=!1;a.A=0;a.B=0;a.H=0;a.K={request:!1,response:!1,event:!1};Os(a);a.m={};a.h=null;a.i.ib()}
function Ps(a,b){a.o=b;a.o?a.l==Qs?a.l=Rs:a.l==Ss&&(a.l=Ts):a.l==Rs?a.l=Qs:a.l==Ts&&(a.l=Ss)}function Us(a,b){if(a.g&&a.g.enabled&&(Vs(a,"ps",{Bc:"d"}),a.h&&a.h.autoplay)){var c=a.h.play();c&&c.then(function(){a.H=b}).catch(function(){a.H=0})}}
function Ws(a,b,c){try{if(!a.g.enabled)return b;var d=Xs(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=Ys;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=Zs;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=$s;break a}e=void 0}d.ot=e;d.su=
!0;var f=at(d);return bt(b,f)}catch(g){return db("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
function Ls(a){a.i.G(a.h,"playing",function(){a.B||(a.B=Date.now());Vs(a,"ps",{Bc:"p"})});a.i.G(a.h,"volumechange",function(){Vs(a,a.h.muted?"m":"um")});a.i.G(a.h,"play",function(){a.A||(a.A=Date.now(),Vs(a,"ps",{Bc:"s"}))});a.i.G(a.h,"pause",function(){Vs(a,"ps",{Bc:"a"})});a.i.G(a.j,"buffering",function(){Vs(a,"ps",{Bc:"w"})});a.i.G(a.h,"seeking",function(){return Vs(a,"ps",{Bc:"k"})});a.i.G(document,"fullscreenchange",function(){Vs(a,document.fullscreenElement?"pe":"pc")});var b=a.h;(b.webkitPresentationMode||
b.webkitSupportsFullscreen)&&a.i.G(b,"webkitpresentationmodechanged",function(){b.webkitPresentationMode?Vs(a,b.webkitPresentationMode!=="inline"?"pe":"pc"):b.webkitSupportsFullscreen&&Vs(a,b.webkitDisplayingFullscreen?"pe":"pc")});a.i.G(a.h,"enterpictureinpicture",function(){Vs(a,"pe")});a.i.G(a.h,"leavepictureinpicture",function(){Vs(a,"pc")});"documentPictureInPicture"in window&&a.i.G(window.documentPictureInPicture,"enter",function(c){Vs(a,"pe");a.i.Pa(c.window,"pagehide",function(){Vs(a,"pc")})});
a.i.G(document,"visibilitychange",function(){document.hidden?Vs(a,"b",{bg:!0}):Vs(a,"b")});a.i.G(a.j,"complete",function(){Vs(a,"ps",{Bc:"e"})})}function Ms(a){Os(a);var b=ct(a);b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value.timeInterval,c===void 0&&(c=dt),c>=1){var d=new Ge(function(){return Vs(a,et)});d.Ea(c);a.F.push(d)}}function Os(a){if(a.F)for(var b=r(a.F),c=b.next();!c.done;c=b.next())c.value.stop();a.F=[]}
function ct(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===ft&&b.enabled}):[]}function gt(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===ht&&b.enabled===!0}):[]}function Xs(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.l,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.j.getBandwidthEstimate()/1E3}}
function Vs(a,b,c){c=c===void 0?{}:c;b=Object.assign({e:b,ts:Date.now()},c);b=it(a,b,ft);c=a.g.targets;if(!(a.g.version<jt)&&c){var d=ct(a);c=Array.from(new Set([].concat(A(kt),A(lt))));d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=mt(e.includeKeys||[],c);f.includes(nt)||f.push(nt);f=ot(b,f);var g=e.events||[],h=f.e,k=f.sta;h&&(!pt.includes(h)||!(h!=="ps"||k&&qt.includes(k))||g&&g.length>0&&!g.includes(h))||rt(a,f,e)}}}
function st(a,b,c){if(a.g.enabled){c=it(a,c,tt);var d=ut({mode:tt,useHeaders:a.g.useHeaders,includeKeys:a.g.includeKeys||[]});a.m[d]||(a.m[d]={request:1,response:1});c.sn=a.m[d].request++;d=a.g.includeKeys||[];var e=a.g.version==jt?Array.from(new Set([].concat(A(kt),A(vt)))):wt;d=mt(d,e);c=ot(c,d);xt(c,b,a.g.useHeaders)}}
function rt(a,b,c,d){var e=Hi(),f=c.url;if(c.useHeaders){b=yt(b);if(!Object.keys(b).length)return;d&&Object.assign(d.headers,b);d=Zi([f],e);Object.assign(d.headers,b)}else{b=at(b);if(!b)return;f=bt(f,b);d&&(d.uri=f);d=Zi([f],e)}a.j.I.request(9,d)}function xt(a,b,c){if(c)a=yt(a),Object.keys(a).length&&Object.assign(b.headers,a);else{var d=at(a);d&&(b.uris=b.uris.map(function(e){return bt(e,d)}))}}
function mt(a,b){if(!a||a.length===0)return b;for(var c=r(a),d=c.next();!d.done;d=c.next())b.includes(d.value);return a=a.filter(function(e){return b.includes(e)})}function ot(a,b){return Object.keys(a).reduce(function(c,d){b.includes(d)&&(c[d]=a[d]);return c},{})}function zt(a){if(a.type===0)return At;if(a=a.stream){var b=a.type;if(b=="video")return a.codecs&&a.codecs.includes(",")?Zs:Bt;if(b=="audio")return Ys;if(b=="text")return a.mimeType==="application/mp4"?Ct:Dt}}
function ut(a){var b=Object.keys(a).sort().reduce(function(c,d){d!=="enabled"&&(c[d]=a[d]);return c},{});return JSON.stringify(b)}function Et(a,b){b=a.j.$b()[b];if(!b.length)return NaN;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:NaN}function Ft(a,b){b=a.j.$b()[b];if(!b.length)return 0;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:0}
function Gt(a,b){var c=a.j.Qb();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.type==="variant"&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Bt:return a.videoBandwidth||NaN;case Ys:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function Ht(a,b,c){var d=b.segment,e=0;d&&(e=d.endTime-d.startTime);e={d:e*1E3,st:a.j.ba()?It:Jt};e.ot=zt(b);var f=e.ot===Bt||e.ot===Ys||e.ot===Zs||e.ot===Ct;if(b=b.stream){var g=a.j.wb();if(f&&(e.bl=Et(a,b.type),e.ot!==Ct)){var h=Ft(a,b.type);e.dl=g?h/Math.abs(g):h}b.bandwidth&&(e.br=b.bandwidth/1E3);if(b.segmentIndex&&d){if((g=b.segmentIndex.Eb(d.endTime,!0,g<0))&&(g=g.next().value)&&g!=d){if(c&&!kb(d.M(),g.M())){var k=g.M()[0];h=new URL(k);var l=new URL(c);if(h.origin!==l.origin)c=k;else{c=h.pathname.split("/").slice(1);
k=l.pathname.split("/").slice(1,-1);l=Math.min(c.length,k.length);for(var m=0;m<l&&c[m]===k[m];m++)c.shift(),k.shift();for(;k.length;)k.shift(),c.unshift("..");c=c.join("/")+h.search+h.hash}e.nor=c}!g.startByte&&!g.endByte||d.startByte==g.startByte&&d.endByte==g.endByte||(c=g.startByte+"-",g.endByte&&(c+=g.endByte),e.nrr=c)}g=a.j.wb()||1;c=Ft(a,b.type)||500;d=(b=b.bandwidth)?b*(d.endTime-d.startTime)/1E3/(c/g/1E3)*a.g.rtpSafetyFactor:NaN;isNaN(d)||(e.rtp=d)}}f&&e.ot!==Ct&&(e.tb=Gt(a,e.ot)/1E3);return e}
function it(a,b,c){Object.assign(b,Xs(a));b.pr=a.j.wb();var d=b.ot===Bt||b.ot===Zs;a.I&&d&&(b.bs=!0,b.su=!0,a.I=!1);b.su==null&&(b.su=a.J);a.j.ba()&&(d=Kt(a.j),b.ltc=d||void 0);document.hidden&&(b.bg=!0);d=a.B&&a.A?a.B-(a.H||a.A):void 0;d==void 0||a.K[c]||(b.msd=d,a.K[c]=!0);return b}
function at(a){function b(n){return c(n/100)*100}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&n!=null&&n!==""&&n!==!1}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c,ttfb:c,ttlb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&(h!=="v"||k!==1)&&(h!="pr"||k!==1)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m=l==="string"&&h!=="ot"&&h!=="sf"&&h!=="st"?h+"="+JSON.stringify(k):
l==="boolean"?h:l==="symbol"?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}
function yt(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[f[g]!=null?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=at(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function bt(a,b){if(!b||a.includes("offline:"))return a;a=new Db(a);a.g.set("CMCD",b);return a.toString()}var $s="m",Ys="a",Bt="v",Zs="av",At="i",Dt="c",Ct="tt",jt=2,Jt="v",It="l",Qs="d",Rs="ld",Ss="h",Ts="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:Qs,vj:Rs,HLS:Ss,wj:Ts,yj:"s",OTHER:"o"});
var wt="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),kt="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),vt="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),Lt="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),lt=["e","sta"],pt="ps e t c b m um pe pc".split(" "),qt="spawkrfeqd".split(""),dt=10,nt="ts",et="t",tt="request",ht="response",ft="event";function Mt(a){this.h=a;this.g=null}p=Mt.prototype;p.configure=function(a){this.h=a};p.ng=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Nt)?this.g.get(Nt)*1E3:null};p.lg=function(){return this.h.enabled&&this.g&&this.g.has(Ot)?this.g.get(Ot)*1E3:null};p.ji=function(){return this.h.enabled&&this.g&&this.g.has(Pt)?this.g.get(Pt):null};p.ki=function(){return this.h.enabled&&this.g&&this.g.has(Qt)?this.g.get(Qt):null};
p.getBandwidthEstimate=function(a){var b=this.lg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return c>0&&c<=1?a*(1-c)+b*c:a};function Rt(a){return a?a.toLowerCase()==="false"?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Mt);Mt.prototype.getBandwidthEstimate=Mt.prototype.getBandwidthEstimate;Mt.prototype.getRoundTripTime=Mt.prototype.ki;Mt.prototype.getResponseDelay=Mt.prototype.ji;Mt.prototype.getEstimatedThroughput=Mt.prototype.lg;
Mt.prototype.getMaxBitrate=Mt.prototype.ng;var Ot="etp",Nt="mb",Pt="rd",Qt="rtt";function St(){this.g=null;this.h=[]}function Tt(a,b){return L(function(c){if(c.g==1)return a.g?H(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;K(c)})}St.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function Y(a,b,c){b=b===void 0?null:b;Ri.call(this);var d=this;this.m=Ut;this.h=null;this.xd=b;this.ea=!1;this.Gd=new mb;this.yd=new mb;this.j=new mb;this.Gb=new mb;this.Wb=new mb;this.F=this.H=this.D=this.I=null;this.Jd=0;this.na=new St;this.P=this.ia=this.aa=this.i=this.Vb=this.J=this.l=this.ud=this.V=this.$f=this.va=this.L=this.Wa=this.xa=this.wd=this.S=this.Fa=this.N=this.$a=null;this.Ga=!1;this.Cd=this.o=null;this.Hd=1E9;this.Fd=[];this.Tb=new Map;this.Ya=[];this.Fe=-1;this.g=Vt(this);this.He=
$q();this.Y=null;this.Kd=-1;this.Fb=null;this.wa={width:Infinity,height:Infinity};this.Bd=new ho(this.g,this.wa,null);this.Ed=[];this.B=null;this.K=this.g.adaptationSetCriteriaFactory();this.K.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,
codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount});this.Sc=this.g.preferredTextLanguage;this.Xc=this.g.preferredTextRole;this.Wc=this.g.preferForcedSubs;this.zd=[];c&&c(this);this.L=new Ks(this,this.g.cmcd);this.va=new Mt(this.g.cmsd);this.I=Wt(this);this.Uc=this.ua=this.za=this.C=null;this.Je=!1;this.Ge=[];this.Ie=
new Ge(function(){return L(function(e){if(e.g==1)return d.ua?H(e,d.Xb(d.Uc,!0),3):e.u(0);if(e.g!=4)return H(e,d.load(d.ua),4);d.Je?d.Uc.pause():d.Uc.play();d.ua=null;d.Je=!1;K(e)})});Xt&&(this.C=Xt(),this.C.configure(this.g.ads),this.Wb.G(this.C,"ad-content-pause-requested",function(e){var f;return L(function(g){if(g.g==1){d.Ie.stop();if(d.ua)return g.u(0);d.Uc=d.h;d.Je=d.jd();f=e.saveLivePosition||!1;return H(g,d.ig(!0,f),3)}d.ua=g.h;K(g)})}),this.Wb.G(this.C,"ad-content-resume-requested",function(e){e=
e.offset||0;if(d.ua){var f=d.ua;f.l&&e&&(typeof f.l==="number"?f.l+=e:f.l.setTime(f.l.getTime()+e*1E3))}d.Ie.ka(.1)}),this.Wb.G(this.C,"ad-content-attach-requested",function(){return L(function(e){return d.h||!d.Uc?e.u(0):H(e,d.Xb(d.Uc,!0),0)})}));Yt&&(this.za=Yt(this),this.za.configure(this.g.queue));this.Gd.G(window,"online",function(){Zt(d);d.Hf()});this.Dd=new Ge(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=r(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,k.disabledUntilTime>0&&k.disabledUntilTime<=
e&&(k.disabledUntilTime=0,f=!0),k.disabledUntilTime>0&&(g=!1);g&&d.Dd.stop();f&&$t(d,!1,void 0,!1,!1)});this.Ha=null;a&&(yb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Xb(a,!0));this.A=null}na(Y,Ri);function au(a){a.V!=null&&(Fc(a.V),a.V.release(),a.V=null)}function bu(a,b,c){c||b.lcevc.enabled?(au(a),a.V==null&&(a.V=new Dc(a.h,a.$f,b.lcevc,c),a.H&&(a.H.H=a.V))):au(a)}function cu(a,b){return new Qi(a,b)}p=Y.prototype;
p.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.m==du)return c.return();au(a);b=a.detach();a.m=du;return H(c,b,2);case 2:return H(c,a.hg(),3);case 3:a.Gd&&(a.Gd.release(),a.Gd=null);a.yd&&(a.yd.release(),a.yd=null);a.j&&(a.j.release(),a.j=null);a.Gb&&(a.Gb.release(),a.Gb=null);a.Wb&&(a.Wb.release(),a.Wb=null);a.Cd=null;a.g=null;a.B=null;a.xd=null;a.L=null;a.va=null;if(!a.I){c.u(4);break}return H(c,a.I.destroy(),5);case 5:a.I=null;case 4:a.o&&(a.o.release(),a.o=null),
a.za&&(a.za.destroy(),a.za=null),Ri.prototype.release.call(a),K(c)}})};function eu(a,b){a.dispatchEvent(cu("onstatechange",(new Map).set("state",b)))}
p.Xb=function(a,b){b=b===void 0?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.m==du)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return H(g,c.detach(),2);case 2:return H(g,fu(c,"attach"),4);case 4:if(g.h)return g.return();va(g,5,6);d||(eu(c,"attach"),e=function(){var h=gu(c,!1);h&&hu(c,h)},c.yd.G(a,"error",e),c.h=a,c.L&&c.L.setMediaElement(a));sb();if(!b||!hi()||c.H){g.u(6);break}return H(g,iu(c),6);case 6:Aa(g);c.na.release();Ba(g,0);break;case 5:return f=
za(g),H(g,c.detach(),10);case 10:throw f;}})};p.uh=function(a){this.$f=a};p.detach=function(a){a=a===void 0?!1:a;var b=this;return L(function(c){if(c.g==1){if(b.m==du)throw new T(2,7,7E3);return H(c,b.td(!1,a),2)}if(c.g!=3)return H(c,fu(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.yd.ib(),b.h=null),eu(b,"detach"),b.C&&!a&&b.C.release()}finally{b.na.release()}K(c)})};
function fu(a,b){var c;return L(function(d){return d.g==1?(c=++a.Jd,H(d,Tt(a.na,b),2)):c!=a.Jd?(a.na.release(),d.return(!0)):d.return(!1)})}
p.td=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q,t,u,v,w,y,x;return L(function(B){switch(B.g){case 1:return c.m!=du&&(c.m=Ut),H(B,fu(c,"unload"),2);case 2:if(B.h)return B.return();B.l=0;B.j=3;c.Ga=!1;eu(c,"unload");au(c);d=c.zd.map(function(C){return C()});c.zd=[];return H(B,Promise.all(d),5);case 5:c.dispatchEvent(cu("unloading"));c.wd&&(c.wd.release(),c.wd=null);c.xa&&(c.xa.release(),c.xa=null);c.Wa&&(c.Wa.release(),c.Wa=null);c.h&&(c.j.ib(),c.Gb.ib());c.Dd.stop();
c.$a&&(c.$a.release(),c.$a=null);c.Fa&&(c.Fa.stop(),c.Fa=null);if(!c.J){B.u(6);break}return H(B,c.J.stop(),7);case 7:c.J=null,c.Vb=null;case 6:c.o&&c.o.stop();if(!c.l){B.u(8);break}return H(B,c.l.destroy(),9);case 9:c.l=null;case 8:c.N&&(c.N.release(),c.N=null);c.F&&(c.F.release(),c.F=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.D){B.u(10);break}return H(B,c.D.destroy(),11);case 11:c.D=null;case 10:if(!c.H){B.u(12);break}return H(B,c.H.destroy(),13);case 13:c.H=null;case 12:if(c.C&&!b)c.C.onAssetUnload();
c.ua&&!b&&(c.ua.destroy(),c.ua=null);b||c.Ie.stop();c.L&&Ns(c.L);c.va&&(c.va.g=null);if(!c.A){B.u(14);break}return H(B,c.A.destroy(),15);case 15:c.A=null;case 14:c.ea=!1;if(c.h){e=r(c.Ge);for(f=e.next();!f.done;f=e.next())g=f.value,g.src.startsWith("blob:")&&URL.revokeObjectURL(g.src),g.remove();c.Ge=[];Th(c.h)&&c.h.load()}if(!c.D){B.u(16);break}return H(B,c.D.destroy(),17);case 17:c.D=null;case 16:c.Ha&&c.aa!=c.Ha.Wd()&&(c.Ha.C||c.Ha.destroy(),c.Ha=null);c.aa=null;c.ia=null;c.S=null;if(c.i){h=r(c.i.variants);
for(k=h.next();!k.done;k=h.next())for(l=k.value,m=r([l.audio,l.video]),n=m.next();!n.done;n=m.next())(q=n.value)&&q.segmentIndex&&q.segmentIndex.release();t=r(c.i.textStreams);for(u=t.next();!u.done;u=t.next())v=u.value,v.segmentIndex&&v.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(hf.clear(),ui.clear());c.i=null;c.B=new gr;c.Zf=null;c.Fb=null;c.Y=null;c.Kd=-1;c.Fd=[];w=r(c.Tb.values());for(y=w.next();!y.done;y=w.next())x=y.value,x.stop();c.Tb.clear();c.Ya=[];c.Fe=-1;c.I&&c.I.gg();
ju(c);case 3:Aa(B);c.na.release();Ba(B,4);break;case 4:sb();if(a&&hi()&&!c.H&&c.h)return H(B,iu(c),0);B.u(0)}})};p.oj=function(a){this.P=a};
p.load=function(a,b,c){b=b===void 0?null:b;var d=this,e,f,g,h,k,l,m,n,q,t,u,v,w,y;return L(function(x){switch(x.g){case 1:if(d.m==du)throw new T(2,7,7E3);e=null;f="";if(a instanceof mr){if(a.C)throw new T(2,7,7006);e=a;f=e.Wd()||""}else f=a||"";return H(x,Tt(d.na,"load"),2);case 2:d.na.release();if(!d.h)throw new T(2,7,7002);if(!d.aa){x.u(3);break}d.aa=f;return H(x,d.td(!1),3);case 3:g=++d.Jd;h=function(){return L(function(B){if(B.g==1)return d.Jd==g?B.u(0):e?H(B,e.destroy(),3):B.u(3);throw new T(2,
7,7E3);})};k=function(B,C){return L(function(I){switch(I.g){case 1:return I.l=0,I.j=2,H(I,Tt(d.na,C),4);case 4:return H(I,h(),5);case 5:return H(I,B(),6);case 6:return H(I,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Aa(I),d.na.release(),Ba(I,0)}})};va(x,5,6);b==null&&e&&(b=e.getStartTime());d.P=b;d.Ga=!1;d.dispatchEvent(cu("loading"));if(e){c=e.Y;x.u(8);break}if(c){x.u(8);break}return H(x,k(function(){return L(function(B){if(B.g==1)return H(B,ku(d,f),2);c=B.h;K(B)})},"guessMimeType_"),8);case 8:l=!!e;
if(e){pr(e,d);d.B=e.getStats();x.u(11);break}return H(x,lu(d,f,b,c,!0,d.g),12);case 12:(e=x.h)?(e.D=!1,pr(e,d),d.B=e.getStats(),e.start(),e.A.catch(function(){})):d.B=new gr;case 11:m=!e;n=Date.now()/1E3;d.B=e?e.getStats():new gr;d.aa=f;d.ia=c||null;ju(d);q=function(){var B=d.h?d.h.buffered:null;return{start:Un(B)||0,end:Vn(B)||0}};d.xa=new Lp(q);d.xa.addEventListener("regionadd",function(B){mu(d,B.region,"metadataadded")});if(m)return H(x,k(function(){return L(function(B){return H(B,nu(d,c),0)})},
"initializeSrcEqualsDrmInner_"),23);d.Wa=new Lp(q);return H(x,k(function(){return L(function(B){if(B.g==1)return H(B,Promise.race([e.na,e.A]),2);d.Vb=e.H;var C=e;C.ua=!0;d.J=C.j;d.i=e.pf();K(B)})},"waitForFinish"),15);case 15:if(d.H){x.u(16);break}return H(x,k(function(){return L(function(B){return H(B,iu(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&&(d.A.enableTextDisplayer?d.A.enableTextDisplayer():yb("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),
H(x,k(function(){return L(function(B){return H(B,e.A,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Bd=e.F;d.J&&d.J.setMediaElement&&d.h&&d.J.setMediaElement(d.h);d.wd=qr(e);d.ud=e.Fa;if(t=e.B)d.K=t;l&&d.h&&d.h.nodeName==="AUDIO"&&(ou(d),d.configure("manifest.disableVideo",!0));if(e.i){x.u(19);break}return H(x,k(function(){return L(function(B){return H(B,vr(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.D=rr(e),H(x,k(function(){return L(function(B){return H(B,d.D.Xb(d.h),0)})},
"drmEngine_.attach"),21);case 21:return u=d.g.abrFactory,d.o&&d.Cd==u||(d.Cd=u,d.o&&d.o.release(),d.o=u(),typeof d.o.setMediaElement!="function"&&(yb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),typeof d.o.setCmsdManager!="function"&&(yb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),typeof d.o.trySuggestStreams!="function"&&(yb("AbrManager w/o trySuggestStreams",
"Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){}),d.o.configure(d.g.abr)),v=sr(e),w=e.m,H(x,k(function(){return L(function(B){return H(B,pu(d,n,w,v),0)})},"loadInner_"),22);case 22:or(e);d.ia&&sb().hh()&&ne(d.ia)&&so(d.H,d.aa,d.ia);x.u(14);break;case 23:return H(x,k(function(){return L(function(B){return H(B,qu(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(cu("loaded"));case 6:Aa(x);if(!e){x.u(25);break}return H(x,e.destroy(),25);case 25:d.Ha=
null;Ba(x,0);break;case 5:y=za(x);if(!y||y.code==7E3){x.u(27);break}return H(x,d.td(!1),27);case 27:throw y;}})};function ou(a){for(var b=r(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
p.lj=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d;return L(function(e){return e.g==1?H(e,ru(c),2):e.g!=3?(d=e.h,H(e,c.td(a,b),3)):e.return(d)})};p.ig=function(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c=this,d;return L(function(e){return e.g==1?H(e,ru(c,b),2):e.g!=3?(d=e.h,H(e,c.detach(a),3)):e.return(d)})};
function ru(a,b){b=b===void 0?!1:b;var c,d,e;return L(function(f){if(f.g==1){c=null;if(!(a.i&&a.J&&a.Vb&&a.aa&&a.g))return f.u(2);d=a.h.currentTime;a.ba()&&!b&&(d=null);return H(f,su(a,a.aa,d,a.ia,a.g,!0,!1),3)}if(f.g!=2){c=f.h;a.Ed.push(c);a.J&&a.J.setMediaElement&&a.J.setMediaElement(null);if(e=a.l?a.l.o:null)c.m=e;var g=c,h=a.J,k=a.Vb;g.h=a.i;g.j=h;g.H=k;c.B=a.K;c.start();a.i=null;a.J=null;a.Vb=null;a.o=null;a.Cd=null}return f.return(c)})}
p.preload=function(a,b,c,d){b=b===void 0?null:b;var e=this,f,g;return L(function(h){if(h.g==1)return f=Vt(e),ar(f,d||e.g,Vt(e)),H(h,lu(e,a,b,c,!1,f),2);(g=h.h)?g.start():hu(e,new T(2,7,7005));return h.return(g)})};p.hg=function(){var a=this,b,c,d,e;return L(function(f){b=[];c=r(a.Ed);for(d=c.next();!d.done;d=c.next())e=d.value,e.C||b.push(e.destroy());a.Ed=[];return H(f,Promise.all(b),0)})};
function lu(a,b,c,d,e,f){e=e===void 0?!1:e;var g,h,k,l;return L(function(m){if(m.g==1)return d?m.u(2):H(m,ku(a,b),3);m.g!=2&&(d=m.h);if(g=tu(a,d))return m.return(null);h=f||a.g;k=!1;e&&a.h&&a.h.nodeName==="AUDIO"&&(k=!0);l=su(a,b,c,d||null,h,!e,k);l=e?l.then(function(n){n.D=!1;return n}):l.then(function(n){a.Ed.push(n);return n});return m.return(l)})}
function su(a,b,c,d,e,f,g){f=f===void 0?!0:f;g=g===void 0?!1:g;var h,k,l,m,n,q,t,u,v,w,y,x,B,C,I;return L(function(E){if(E.g==1){h=null;k=fd(e);g&&(k.manifest.disableVideo=!0);l=function(){return h.S&&h.C?null:h};m=function(){return l()?l().getConfiguration():a.g};if(a.wa.width!=Infinity||a.wa.height!=Infinity||a.g.ignoreHardwareResolution)return E.u(2);n=sb();return H(E,n.Nb(),3)}E.g!=2&&(q=E.h,a.wa.width=q.width,a.wa.height=q.height);t=new ho(k,a.wa,null);u={networkingEngine:a.I,filter:function(z){var D,
G;return L(function(F){if(F.g==1)return H(F,io(t,z),2);if(F.g!=4){D=F.h;if(!D)return F.u(0);G=cu("trackschanged");return H(F,Promise.resolve(),4)}h.dispatchEvent(G);K(F)})},makeTextStreamsForClosedCaptions:function(z){return uu(a,z)},onTimelineRegionAdded:function(z){Mp(h.I,z)},onEvent:function(z){return h.dispatchEvent(z)},onError:function(z){return h.onError(z)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.l&&h.S&&a.l.updateDuration()},newDrmInfo:function(z){var D=
h.i,G=D?D.g:null;G&&D.B&&lo(t,G.keySystem,z)},onManifestUpdated:function(){var z=(new Map).set("isLive",a.ba());h.dispatchEvent(cu("manifestupdated",z));nr(h,!1,function(){if(a.C)a.C.onManifestUpdated(a.ba())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(z,D,G,F){var J=z;if(z=="com.apple.hls.interstitial"||z=="com.apple.hls.overlay")if(J="com.apple.quicktime.HLS",z={startTime:D,endTime:G,values:F},a.C)a.C.onHLSInterstitialMetadata(a,a.h,z);F=r(F);z=F.next();
for(var M={};!z.done;M={Df:void 0},z=F.next())M.Df=z.value,M.Df.name!="ID"&&nr(h,!1,function(O){return function(){vu(a,D,G,J,O.Df)}}(M))},disableStream:function(z){return a.disableStream(z,a.g.streaming.maxDisabledTime)},addFont:function(z,D){return a.addFont(z,D)}};v=new Lp(function(){return a.bb()});v.addEventListener("regionadd",function(z){var D=z.region;wu(a,"timelineregionadded",D,h);nr(h,!1,function(){a.C&&(a.C.onDashTimedMetadata(D),a.C.onDASHInterstitialMetadata(a,a.h,D))})});w=null;k.streaming.observeQualityChanges&&
(w=new Nk(function(){return a.$b()}),w.addEventListener("qualitychange",function(z){xu(a,z.quality,z.position)}),w.addEventListener("audiotrackchange",function(z){xu(a,z.quality,z.position,!0)}));y=!0;x={vc:a.I,onError:function(z){return h.onError(z)},Jg:function(z){nr(h,!0,function(){a.D&&yu(a,z)})},onExpirationUpdated:function(z,D){var G=cu("expirationupdated");h.dispatchEvent(G);if((G=h.j)&&G.onExpirationUpdated)G.onExpirationUpdated(z,D)},onEvent:function(z){h.dispatchEvent(z);z.type=="drmsessionupdate"&&
y&&(y=!1,z=Date.now()/1E3-h.xa,(a.B||h.getStats()).m=z,a.V&&Fc(a.V))}};B=Wt(a,l);Yi(a.I,B);C=function(){return a.Rd(x)};I={config:k,Ii:u,Ui:v,Ti:w,Rd:C,Hi:t,networkingEngine:B,sh:f};h=new mr(b,d,c,I);return E.return(h)})}
function ku(a,b){var c,d,e,f;return L(function(g){if(g.g==1)return c=a.g.manifest.retryParameters,H(g,hl(b,a.I,c),2);d=g.h;d=="application/x-mpegurl"&&(e=sb(),e.ya()==="WEBKIT"&&(d="application/vnd.apple.mpegurl"));d=="video/quicktime"&&(f=sb(),f.ya()==="CHROMIUM"&&(d="video/mp4"));return g.return(d)})}
function tu(a,b){if(!hi(sb()))return!0;if(b){if((a.h||ci()).canPlayType(b)=="")return!1;if(!hi(sb())||!Ik.has(b))return!0;if(ne(b))return sb().ya()==="WEBKIT"&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if(b==="application/dash+xml"||b==="video/vnd.mpeg.dash.mpd")return a.g.streaming.preferNativeDash}return!1}
function zu(a,b){var c=a.g.textDisplayFactory;a.Zf!==c||(b===void 0?0:b)?(b=a.A,a.A=c(),a.A.configure?a.A.configure(a.g.textDisplayer):yb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.A.setTextLanguage||yb("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),b?(a.A.setTextVisibility(b.isTextVisible()),b.destroy().catch(function(){})):a.A.setTextVisibility(a.ea),a.H&&Yo(a.H,a.A),a.Zf=c,a.l&&pq(a.l)):a.A&&a.A.configure&&
a.A.configure(a.g.textDisplayer)}
function iu(a){var b,c,d;return L(function(e){if(e.g==1)return sb(),eu(a,"media-source"),a.g.mediaSource.useSourceElements&&Th(a.h),zu(a),b=Au(a.h,a.A,{Vh:function(){return a.keySystem()},onMetadata:function(f,g,h){f=r(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&typeof k.cueTime=="number"&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=r(k.frames),q=n.next();!q.done;q=n.next())vu(a,l,m,"org.id3",q.value);if(a.C)a.C.onHlsTimedMetadata(k,l)}},Oi:function(f){a.Wa&&Mp(a.Wa,
{schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Qi:function(){a.J&&a.J.update&&a.J.update()}},a.V,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Fa=d,H(e,b.L,2);a.H=b;K(e)})}
function Bu(a,b,c){function d(){return Cu(a)}a.j.G(b,"playing",d);a.j.G(b,"pause",d);a.j.G(b,"ended",d);a.j.G(b,"ratechange",function(){var f=a.h.playbackRate;f!=0&&(a.N&&(a.N.set(f),a.m==Du&&a.o.playbackRateChanged(f),Eu(a,f)),f=cu("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.G(b.remote,"connect",function(){a.l&&b.remote.state=="connected"&&Fu(a);Gu(a)}),a.j.G(b.remote,"connecting",function(){return Gu(a)}),a.j.G(b.remote,"disconnect",function(){return L(function(f){if(f.g==1)return a.l&&b.remote.state==
"disconnected"?H(f,Dq(a.l),3):f.u(2);f.g!=2&&Fu(a);Gu(a);K(f)})}));b.audioTracks&&(a.j.G(b.audioTracks,"addtrack",function(){return Gu(a)}),a.j.G(b.audioTracks,"removetrack",function(){return Gu(a)}),a.j.G(b.audioTracks,"change",function(){return Gu(a)}));b.videoTracks&&(a.j.G(b.videoTracks,"addtrack",function(){return Gu(a)}),a.j.G(b.videoTracks,"removetrack",function(){return Gu(a)}),a.j.G(b.videoTracks,"change",function(){return Gu(a)}));(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&
a.j.G(b,"webkitpresentationmodechanged",function(){a.xd&&zu(a,!0)});if(b.textTracks){var e=function(){a.m===Hu&&a.A instanceof us&&Fu(a);Gu(a)};a.j.G(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Iu(a,f);break;case "chapters":Ju(a,f);break;default:e()}});a.j.G(b.textTracks,"removetrack",e);a.j.G(b.textTracks,"change",e)}b.preload!="none"&&a.j.Pa(b,"loadedmetadata",function(){a.B.F=Date.now()/1E3-c})}
function pu(a,b,c,d){var e,f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C,I,E,z,D,G,F,J,M,O,R,P;return L(function(N){switch(N.g){case 1:eu(a,"load");e=a.h;a.N=new hp({Yd:function(){return e.playbackRate},qc:function(){return e.defaultPlaybackRate},Mf:function(Q){e.playbackRate=Q},Fg:function(Q){e.currentTime+=Q}});Bu(a,e,b);"onchange"in window.screen&&a.j.G(window.screen,"change",function(){if(a.K.getConfiguration){var Q=a.K.getConfiguration();Q.hdrLevel=="AUTO"?Ku(a):a.g.preferredVideoHdrLevel=="AUTO"&&a.g.abr.enabled&&
(Q.hdrLevel="AUTO",a.K.configure(Q),Ku(a))}});f=!1;g=r(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=Gc(l));bu(a,a.g,f);a.Sc=a.g.preferredTextLanguage;a.Xc=a.g.preferredTextRole;a.Wc=a.g.preferForcedSubs;Lu(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(Q,Z,sa){a.i&&a.l&&Q!=a.l.o&&Mu(a,Q,!0,Z===void 0?!1:Z,sa===void 0?0:sa)});a.o.setMediaElement(e);a.o.setCmsdManager(a.va);a.l=Nu(a);a.l.configure(a.g.streaming);
a.m=Du;a.dispatchEvent(cu("streaming"));m=c;case 2:(q=a.l.o)||m||(m=Ou(a,!0));t=[];n=q||m;u=r([n.video,n.audio]);for(v=u.next();!v.done;v=u.next())(w=v.value)&&!w.segmentIndex&&(t.push(w.createSegmentIndex()),w.dependencyStream&&t.push(w.dependencyStream.createSegmentIndex()));if(!(t.length>0)){N.u(4);break}return H(N,Promise.all(t),4);case 4:if(!n||n.disabledUntilTime!=0){N.u(2);break}if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?
a.configure(a.He):cb("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."));a.L&&(Ps(a.L,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),Us(a.L,b*1E3));Lu(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);fq(a.l,a.g.playRangeStart,a.g.playRangeEnd);a.Ga=!0;a.dispatchEvent(cu("canupdatestarttime"));y=function(Q){a.F=Pu(a,Q);a.$a=Qu(a,Q);Ru(a,e,!1)};
a.g.streaming.startAtSegmentBoundary||(x=a.P,x==null&&a.i.startTime&&(x=a.i.startTime),y(x));if(q){N.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){N.u(8);break}B=a.i.presentationTimeline;a.P instanceof Date&&(I=B.m||B.i,E=a.P.getTime()/1E3-I,E!=null&&(C=E));C==null&&(C=typeof a.P==="number"?a.P:a.h.currentTime);a.P==null&&a.i.startTime&&(C=a.i.startTime);z=B.Pb();D=B.ob();C<z?C=z:C>D&&(C=D);return H(N,Su(m,C),9);case 9:G=N.h,y(G);case 8:Mu(a,m,!0,!1,0);case 7:return a.F.ready(),F=a.dc().find(function(Q){return Q.active}),
F||((J=Af(a.i.textStreams,a.Sc,a.Xc,a.Wc)[0]||null)&&fr(a.B.h,J,!0),m&&(J?(Ef(m.audio,J,a.g)&&(a.ea=!0),a.ea&&a.A.setTextVisibility(!0)):(a.ea=!1,a.A.setTextVisibility(!1)),Tu(a)),J&&(a.g.streaming.alwaysStreamText||a.uf())&&(oq(a.l,J),Uu(a))),H(N,a.l.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),Vu(a));Gu(a);a.i.variants.some(function(Q){return Q.primary});if((M=a.ba())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)O=
function(){return Wu(a)},a.j.G(e,"timeupdate",O);M||(R=function(){return Xu(a)},a.j.G(e,"timeupdate",R),Xu(a),a.i.nextUrl&&(a.g.streaming.preloadNextUrlWindow>0&&(P=function(){var Q;return L(function(Z){if(Z.g==1){Q=a.bb().end-a.h.currentTime;if(isNaN(Q)||!(Q<=a.g.streaming.preloadNextUrlWindow))return Z.u(0);a.j.pb(e,"timeupdate",P);return H(Z,a.preload(a.i.nextUrl),4)}a.Ha=Z.h;K(Z)})},a.j.G(e,"timeupdate",P)),a.j.G(e,"ended",function(){a.load(a.Ha||a.i.nextUrl)})));if(a.C)a.C.onManifestUpdated(M);
K(N)}})}function nu(a,b){var c,d,e;return L(function(f){return f.g==1?(c=Date.now()/1E3,d=!0,a.D=a.Rd({vc:a.I,onError:function(g){hu(a,g)},Jg:function(){},onExpirationUpdated:function(){var g=cu("expirationupdated");a.dispatchEvent(g)},onEvent:function(g){a.dispatchEvent(g);g.type=="drmsessionupdate"&&d&&(d=!1,a.B.m=Date.now()/1E3-c)}}),a.D.configure(a.g.drm),e=Ff([b]),a.D.ea=!0,H(f,sj(a.D,[e],[]),2)):H(f,a.D.Xb(a.h),0)})}
function qu(a,b,c){var d,e,f,g,h,k,l,m,n,q,t,u;return L(function(v){switch(v.g){case 1:eu(a,"src-equals");d=a.h;a.F=new sp(d);e=!1;a.zd.push(function(){e=!0});a.dispatchEvent(cu("canupdatestarttime"));a.P!=null&&a.F.Ee(a.P);a.$a=Yu(a,a.P||0);a.N=new hp({Yd:function(){return d.playbackRate},qc:function(){return d.defaultPlaybackRate},Mf:function(w){d.playbackRate=w},Fg:function(w){d.currentTime+=w}});Ru(a,d,!0);d.textTracks&&(zu(a),f=function(w){if(!(a.A instanceof us)){var y=Zu(a).find(function(x){return x.mode!==
"disabled"});y&&(y.mode=w?"showing":"hidden");a.A instanceof ws&&(y=$u(a))&&(y.mode=!w&&a.A.isTextVisible()?"showing":"hidden")}},a.j.G(d,"enterpictureinpicture",function(){return f(!0)}),a.j.G(d,"leavepictureinpicture",function(){return f(!1)}),d.remote?(a.j.G(d.remote,"connect",function(){return f(!1)}),a.j.G(d.remote,"connecting",function(){return f(!1)}),a.j.G(d.remote,"disconnect",function(){return f(!1)})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.j.G(d,"webkitcurrentplaybacktargetiswirelesschanged",
function(){return f(!1)}),g=d,(g.webkitPresentationMode||g.webkitSupportsFullscreen)&&a.j.G(g,"webkitpresentationmodechanged",function(){g.webkitPresentationMode?f(g.webkitPresentationMode!=="inline"):g.webkitSupportsFullscreen&&f(g.webkitDisplayingFullscreen)}));Bu(a,d,b);h=Ws(a.L,a.aa,c);!h.includes("#t=")&&(a.g.playRangeStart>0||isFinite(a.g.playRangeEnd))&&(h+="#t=",a.g.playRangeStart>0&&(h+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(h+=","+a.g.playRangeEnd));if(!a.H){v.u(2);break}return H(v,
a.H.destroy(),3);case 3:a.H=null;case 2:return Th(d),d.src=h,k=sb(),k.Ma()=="TV"&&d.load(),d.preload!="none"&&!d.autoplay&&ne(c)&&k.ya()==="WEBKIT"&&d.load(),a.m=Hu,a.dispatchEvent(cu("streaming")),l=new Ji,jp(d,HTMLMediaElement.HAVE_METADATA,a.j,function(){a.F.ready();a.ia&&ne(a.ia)||l.resolve()}),m=function(){return new Promise(function(w){var y=new Ge(w);a.j.G(d.textTracks,"change",function(){return y.ka(.5)});y.ka(.5)})},jp(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.j,function(){var w,y,x,B,C;return L(function(I){if(I.g==
1)return H(I,m(),2);if(e)return I.return();av(a);w=Zu(a);w.some(function(E){return E.mode==="showing"})&&(a.ea=!0,a.A.setTextVisibility(!0));if(!(a.A instanceof us))for(w.length&&(a.A.enableTextDisplayer?a.A.enableTextDisplayer():yb("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),y=!1,x=r(w),B=x.next();!B.done;B=x.next())C=B.value,C.mode!=="disabled"&&(y?(C.mode="disabled",cb("Found more than one enabled text track, disabling it",C)):(bv(a,C),
y=!0));cv(a);a.ia&&ne(a.ia)&&l.resolve();K(I)})}),d.error?l.reject(gu(a)):d.preload=="none"&&(cb('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),l.resolve()),a.j.Pa(d,"error",function(){l.reject(gu(a))}),H(v,Ke(a.g.streaming.loadTimeout,l),4);case 4:if((n=a.ba())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||
a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return Wu(a)},a.j.G(d,"timeupdate",q);n||(t=function(){return Xu(a)},a.j.G(d,"timeupdate",t),Xu(a));a.C&&(a.C.onManifestUpdated(n),n&&(u=a.bb().end,a.j.G(d,"progress",function(){var w=a.bb().end;u!=w&&(a.C.onManifestUpdated(a.ba()),u=w)})));a.Ga=!0;K(v)}})}function av(a){var b=a.g.preferredAudioLanguage;b!=""&&a.Ug(b,a.g.preferredAudioRole)}
function cv(a){var b=a.g.preferredTextLanguage;b!=""&&a.Vg(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function Iu(a,b){if(b.kind=="metadata"){b.mode="hidden";a.j.G(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,vu(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value);if(b.cues){d=[];e=r(b.cues);for(var f=e.next(),g={};!f.done;g={Yb:void 0},f=e.next())g.Yb=f.value,g.Yb.type=="com.apple.quicktime.HLS"&&g.Yb.startTime!=null&&(f=d.find(function(h){return function(k){return k.startTime==h.Yb.startTime&&k.endTime==h.Yb.endTime}}(g)),
f||(f={startTime:g.Yb.startTime,endTime:g.Yb.endTime,values:[]},d.push(f)),f.values.push(g.Yb.value));d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return h.key=="X-ASSET-URI"||h.key=="X-ASSET-LIST"})&&a.C&&(e.values.push({key:"CUE",description:"",data:e.startTime!=0||a.ba()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.C.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new Ge(function(){var d=dv(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).lc().ka(.5);
a.zd.push(function(){c.stop()})}}function mu(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(cu(c,b))}function vu(a,b,c,d,e){a.xa&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),Mp(a.xa,b))}function Ju(a,b){if(b&&b.kind=="chapters"){b.mode="hidden";var c=(new Ge(function(){b.mode="hidden"})).lc().ka(.5);a.zd.push(function(){c.stop()})}}
p.Xi=function(){for(var a=this.na;a.g;)a.release()};p.Rd=function(a){return new nj(a)};
function Wt(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?nr(b(),!0,f):f()}b||(b=function(){return null});var e=new Ui(function(f,g,h,k,l){d(function(){a.o&&a.o.segmentDownloaded(f,g,h,k,l)})},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(cu("downloadheadersreceived",g));d(function(){if(a.va){var k=a.va;if(k.h.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;l<n.length;l++){var q=n[l].split("=");
m.set(q[0],Rt(q[1]))}}catch(y){}if(m=f["cmsd-dynamic"]){a:{try{var t=new Map,u=m.split(";");for(m=1;m<u.length;m++){var v=u[m].split("=");t.set(v[0],Rt(v[1]))}var w=t;break a}catch(y){w=null;break a}w=void 0}w&&(k.g=w)}}}})},function(f,g){f=(new Map).set("request",f).set("response",g);c(cu("downloadcompleted",f))},function(f,g,h,k){f=(new Map).set("request",f).set("error",g).set("httpResponseCode",h).set("aborted",k);c(cu("downloadfailed",f))},function(f,g,h){d(function(){if(a.L){var k=a.L,l=h;l=
l===void 0?{}:l;if(k.g.enabled)if(g.method==="HEAD")st(k,g,{});else switch(f){case 0:try{if(k.g.enabled){if(l.type){a:{switch(l.type){case 4:var m=k.o?Rs:Qs;break a;case 3:case 2:m=k.o?Ts:Ss;break a;case 5:m="s";break a}m=void 0}k.l=m}st(k,g,{ot:$s,su:!k.C})}}catch(q){db("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",q)}break;case ej:try{if(k.g.enabled){var n=Ht(k,l,g.uris[0]);n.ts=Date.now();k.D.set(g,n.ts);st(k,g,n)}}catch(q){db("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",
q)}break;case 2:case 5:case 6:st(k,g,{ot:"k"});break;case 4:st(k,g,{ot:"o"})}}})},function(f,g,h,k){(f=b()?b().j:a.J)&&f.banLocation&&f.banLocation(k)},function(f,g,h){if(g.data){var k=g.data.byteLength,l=b()?b().getStats():a.B;l&&(kr(l,k),f===0&&(l.yg=k));k=a.L;h=h===void 0?{}:h;if(gt(k).length!==0)switch(f){case ej:try{var m=Ht(k,h,g.uri);g.originalRequest&&g.originalRequest.timeToFirstByte!=null&&(m.ttfb=g.originalRequest.timeToFirstByte);g.timeMs!=null&&(m.ttlb=g.timeMs);var n=g.originalUri||
g.uri;if(n.includes("CMCD="))try{var q=new URL(n);q.searchParams.delete("CMCD");var t=q.toString()}catch(z){t=n}else t=n;m.url=t;k.D.has(g.originalRequest)?(m.ts=k.D.get(g.originalRequest),k.D.delete(g.originalRequest)):m.ts||(m.ts=Date.now());var u=gt(k);if(u.length!==0){var v=k.g.version==jt?Array.from(new Set([].concat(A(kt),A(Lt)))):wt;m.rc=g.status||0;var w=it(k,m,ht);g.headers&&g.headers["CMSD-Static"]&&(w.cmsds=btoa(g.headers["CMSD-Static"]));g.headers&&g.headers["CMSD-Dynamic"]&&(w.cmsdd=
btoa(g.headers["CMSD-Dynamic"]));for(var y=r(u),x=y.next();!x.done;x=y.next()){var B=x.value,C=mt(B.includeKeys||[],v),I=ut(B);k.m[I]||(k.m[I]={request:1,response:1});w.sn=k.m[I].response++;var E=ot(w,C);rt(k,E,B,g)}}}catch(z){db("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",z)}}}});e.configure(a.g.networking);return e}
function Pu(a,b){return new vp(a.h,a.i,a.g.streaming,b,function(){a.$a&&Mk(a.$a,!a.F.Wf());a.l&&a.l.Ac();a.S&&ev(a,"seeking")},function(c){return a.dispatchEvent(c)})}
function Qu(a,b){var c=a.ba()||typeof b==="number"&&b>0;b=new Cr(a.wd,c);b.addEventListener("enter",function(f){wu(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){wu(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(wu(a,"timelineregionenter",g),wu(a,"timelineregionexit",g))});var d=new Cr(a.xa,c);d.addEventListener("enter",function(f){mu(a,f.region,"metadata")});c=new Cr(a.Wa,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",
f.region.emsg);a.dispatchEvent(cu("emsg",f))});var e=new Lk(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.ud&&e.g.add(a.ud);return e}function Yu(a,b){b=new Cr(a.xa,b instanceof Date||b>0);b.addEventListener("enter",function(d){mu(a,d.region,"metadata")});var c=new Lk(a.h);c.g.add(b);return c}
function Ru(a,b,c){a.S=new jn;mn(a.S,ln);fv(a);ju(a);a.Fa=new Ge(function(){ev(a)});a.g.streaming.rebufferingGoal&&a.Fa.Ea(.25);a.j.G(b,"waiting",function(){return ev(a,"waiting")});a.j.G(b,"canplaythrough",function(){return ev(a,"canplaythrough")});a.j.G(b,"playing",function(){return ev(a,"playing")});a.j.G(b,"seeked",function(){return ev(a,"seeked")});c&&(a.j.G(b,"stalled",function(){return ev(a,"stalled")}),a.j.G(b,"progress",function(){return ev(a,"progress")}),a.j.G(b,"timeupdate",function(){return ev(a,
"timeupdate")}))}function fv(a){var b=a.g.streaming.rebufferingGoal;a.S.i.set(kn,Math.min(.5,b/2)).set(ln,b)}function ev(a,b){if(a.g.streaming.rebufferingGoal){b=a.H?uo(a.H):!1;b=a.jd()||b||a.F.sg();var c=Xn(a.h.buffered,a.h.currentTime),d=a.S,e=d.i.get(d.g);mn(d,b||c>=e&&c>0?kn:ln)&&ju(a)}else if(b){c=void 0;switch(b){case "seeking":case "waiting":c=ln;break;case "canplaythrough":case "playing":case "seeked":c=kn}c!==void 0&&mn(a.S,c)&&ju(a)}}function Au(a,b,c,d,e){return new oo(a,b,c,e,d)}
function Nu(a){return new $p(a.i,{Ob:function(){return a.F?a.F.Id():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},wb:function(){return a.wb()},video:a.h,T:a.H,vc:a.I,onError:function(b){return hu(a,b)},onEvent:function(b){return a.dispatchEvent(b)},oe:function(b,c,d){var e=b.startTime,f=b.endTime,g=c.type;if(g!=Ac){if(a.F){a.F.Hg();var h=Bo(a.H,g);!a.ba()&&a.h.paused&&!a.h.seeking&&h!=null&&h>0&&a.F.Id()<h&&a.F.Ee(h)}ev(a)}d=(new Map).set("start",e).set("end",f).set("contentType",
g).set("isMuxed",d);a.dispatchEvent(cu("segmentappended",d));a.o&&c.fastSwitching&&b.wc&&b.kd&&a.o.trySuggestStreams()},Pi:function(b,c){(c=c.Nc)&&a.ud&&Pk(a.ud,c,b)},eg:function(b,c){var d=a.D;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new mj(Vb(c));c=0;for(var e=r(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(c==0)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=r(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;Bj(d,"cenc",c);
d=d.l}}else d=Promise.resolve();return d},disableStream:function(b,c){return a.disableStream(b,c)},jj:function(b,c){return a.g.abr.enabled&&c.fastSwitching&&b.wc&&b.kd?!1:!0}})}
p.configure=function(a,b){var c=this.getConfiguration();arguments.length==2&&typeof a=="string"&&(a=Sq(a,b));"preferredVariantRole"in a&&(yb("preferredVariantRole configuration","Please Use preferredAudioRole instead."),a.preferredAudioRole=a.preferredVariantRole,delete a.preferredVariantRole);a.streaming&&"forceTransmuxTS"in a.streaming&&(yb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,
delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(yb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);if(a.streaming&&"useNativeHlsOnSafari"in a.streaming){yb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var d=sb();a.streaming.preferNativeHls=
a.streaming.useNativeHlsOnSafari&&d.ya()==="WEBKIT";delete a.streaming.useNativeHlsOnSafari}a.streaming&&typeof a.streaming.liveSync=="boolean"&&(yb("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),d=a.streaming.liveSync,a.streaming.liveSync={},a.streaming.liveSync.enabled=d);if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){d=a.streaming.liveSyncMinLatency||0;var e=Math.abs((a.streaming.liveSyncMaxLatency||
1)-d)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=d+e;a.streaming.liveSync.targetLatencyTolerance=e}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(yb("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&&(yb("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&&(yb("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&&(yb("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&&(yb("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&&(yb("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&&(yb("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&&(yb("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){yb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");
var f=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return f};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(yb("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&"parsePrftBox"in a.streaming&&(yb("streaming.parsePrftBox configuration","Now fired without needing a configuration."),
delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(yb("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),a.manifest.enableAudioGroups=a.manifest.dash.enableAudioGroups,delete a.manifest.dash.enableAudioGroups);a.streaming&&"dispatchAllEmsgBoxes"in a.streaming&&(yb("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.dispatchAllEmsgBoxes=
a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in a.streaming&&(yb("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),a.streaming.lowLatencyMode=a.streaming.autoLowLatencyMode,delete a.streaming.autoLowLatencyMode);a.manifest&&a.manifest.dash&&"ignoreSupplementalCodecs"in a.manifest.dash&&(yb("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),
a.manifest.ignoreSupplementalCodecs=a.manifest.dash.ignoreSupplementalCodecs,delete a.manifest.dash.ignoreSupplementalCodecs);a.manifest&&a.manifest.hls&&"ignoreSupplementalCodecs"in a.manifest.hls&&(yb("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),a.manifest.ignoreSupplementalCodecs=a.manifest.hls.ignoreSupplementalCodecs,delete a.manifest.hls.ignoreSupplementalCodecs);a.manifest&&a.manifest.dash&&"updatePeriod"in a.manifest.dash&&
(yb("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.dash.updatePeriod,delete a.manifest.dash.updatePeriod);a.manifest&&a.manifest.hls&&"updatePeriod"in a.manifest.hls&&(yb("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.hls.updatePeriod,delete a.manifest.hls.updatePeriod);a.manifest&&a.manifest.dash&&"ignoreDrmInfo"in a.manifest.dash&&(yb("manifest.dash.ignoreDrmInfo configuration",
"Please Use manifest.ignoreDrmInfo instead."),a.manifest.ignoreDrmInfo=a.manifest.dash.ignoreDrmInfo,delete a.manifest.dash.ignoreDrmInfo);if(a.drm&&a.drm.advanced){d=!1;for(var g in a.drm.advanced){var h=a.drm.advanced[g];e=h.videoRobustness;h=h.audioRobustness;"videoRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].videoRobustness)&&(a.drm.advanced[g].videoRobustness=[e],d=!0);"audioRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].audioRobustness)&&(a.drm.advanced[g].audioRobustness=
[h],d=!0)}d&&yb("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}a.streaming&&"forceHTTP"in a.streaming&&(yb("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTP=a.streaming.forceHTTP,delete a.streaming.forceHTTP);a.streaming&&"forceHTTPS"in a.streaming&&(yb("streaming.forceHTTPS configuration",
"Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTPS=a.streaming.forceHTTPS,delete a.streaming.forceHTTPS);a.streaming&&"minBytesForProgressEvents"in a.streaming&&(yb("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),a.networking=a.networking||{},a.networking.minBytesForProgressEvents=a.streaming.minBytesForProgressEvents,delete a.streaming.minBytesForProgressEvents);g=ar(this.g,a,Vt(this));
gv(this,c);return g};p.Dh=function(a){this.He=a};
function gv(a,b){a.Bd=new ho(a.g,a.wa,a.D);if(a.J){var c=fd(a.g.manifest);a.h&&a.h.nodeName==="AUDIO"&&(c.disableVideo=!0);a.J.configure(c)}a.D&&a.D.configure(a.g.drm);if(a.l){a.l.configure(a.g.streaming);try{a.m!=du&&jo(a.Bd,a.i)&&Gu(a)}catch(e){hu(a,e)}a.o&&Ku(a);c=a.l.o;!c||c.allowedByApplication&&c.allowedByKeySystem||$t(a)}a.I&&a.I.configure(a.g.networking);a.H&&(a.H.configure(a.g.mediaSource),a.H.Fa=a.g.manifest.segmentRelativeVttTiming);a.A&&zu(a);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?
a.o.enable():a.o.disable(),Vu(a));a.S&&fv(a);a.Fa&&(a.g.streaming.rebufferingGoal?a.Fa.Ea(.25):a.Fa.stop());a.i&&Lu(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.C&&a.C.configure(a.g.ads);a.L&&a.L.configure(a.g.cmcd);a.va&&a.va.configure(a.g.cmsd);a.za&&a.za.configure(a.g.queue);if(a.m==Du&&a.K.getConfiguration){c=a.K.getConfiguration();var d=!1;b.preferredVideoHdrLevel!=a.g.preferredVideoHdrLevel&&c.hdrLevel!=a.g.preferredVideoHdrLevel&&(c.hdrLevel=a.g.preferredVideoHdrLevel,d=
!0);b.preferredVideoLayout!=a.g.preferredVideoLayout&&c.videoLayout!=a.g.preferredVideoLayout&&(c.videoLayout=a.g.preferredVideoLayout,d=!0);b.preferSpatialAudio!=a.g.preferSpatialAudio&&c.spatialAudio!=a.g.preferSpatialAudio&&(c.spatialAudio=a.g.preferSpatialAudio,d=!0);b.preferredVideoRole!=a.g.preferredVideoRole&&c.videoRole!=a.g.preferredVideoRole&&(c.videoRole=a.g.preferredVideoRole,d=!0);d&&(a.K.configure(c),$t(a))}}p.getConfiguration=function(){var a=Vt(this);ar(a,this.g,Vt(this));return a};
p.Oh=function(){return this.He};p.bi=function(){var a=Vt(this);ar(a,this.g,Vt(this));return Uq(this.g,Vt(this))};p.kg=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.bb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};
p.Yi=function(){var a=this.getConfiguration(),b;for(b in this.g)delete this.g[b];ar(this.g,Vt(this),Vt(this));gv(this,a)};p.Wh=function(){return this.m};p.mg=function(){return this.i?this.i.type:null};p.$h=function(){return this.h};p.ai=function(){return this.I};p.Wd=function(){return this.aa};p.Gh=function(){return this.C?this.C:null};p.ii=function(){return this.za?this.za:null};
p.ba=function(){return this.i&&!this.ra()?this.i.presentationTimeline.ba():this.h&&(this.h.src||this.ra())?this.h.duration==Infinity:!1};p.Mc=function(){return this.i?this.i.presentationTimeline.Mc():!1};p.Ai=function(){if(this.i&&!this.ra()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&(this.h.src||this.ra())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1};
p.Gi=function(){if(this.i&&!this.ra()){var a=this.i.variants;if(!a.length)return!1;a=a[0];return a.audio||!a.video?!1:!a.video.codecs.includes(",")}return this.h&&(this.h.src||this.ra())&&this.h.audioTracks?this.h.audioTracks.length==0:!1};
p.bb=function(){if(this.i&&!this.ra()){if(!this.Ga&&this.i.type=="HLS")return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Pb(),end:a.ob()}}if(this.h&&(this.h.src||this.ra())&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};p.wi=function(){this.ba()&&(this.h.currentTime=this.bb().end)};p.Bi=function(){return this.Ga};
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.D?this.D.g:null};p.nf=function(){return this.D?this.D.nf():Infinity};p.mf=function(){return this.D?this.D.mf():[]};p.Xd=function(){return this.D?this.D.Xd():{}};p.ug=function(){return this.S?this.S.g==ln:!!this.aa};p.wb=function(){return this.h?this.N?this.N.i:1:0};p.Uf=function(a){this.m==Du&&this.l&&lq(this.l,a)};
p.sd=function(a,b){b=b===void 0?!0:b;a==0?cb("A trick play rate of 0 is unsupported!"):(this.N.set(a),this.m==Du&&(this.o.playbackRateChanged(a),this.Uf(b&&a!=1)),Eu(this,a))};p.Zc=function(){var a=this.N.qc();this.m==Hu&&this.N.set(a);this.m==Du&&(this.N.set(a),this.o.playbackRateChanged(a),this.Uf(!1));this.Gb.ib()};
p.Qb=function(){if(this.i&&!this.ra()){for(var a=this.l?this.l.o:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,yf(e)){var f=qf(e);f.active=e==a;f.active||c==1||a==null||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}if(this.h&&this.h.audioTracks){var g=hv(this);a=Array.from(this.h.audioTracks);return a.length?a.map(function(h){return xf(h,g)}):g?[xf(null,g)]:[]}return[]};
p.dc=function(){if(this.i){if(this.ra())return[];for(var a=this.l?this.l.B:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=rf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Zu(this).map(function(f){return wf(f)}):[]};p.Th=function(){var a=this.Fd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return sf(b)})};
p.Hh=function(a){var b=this,c,d;return L(function(e){if(e.g==1)return H(e,iv(b,a),2);c=e.h;if(!c)return e.return(null);d=[];c.segmentIndex.Db(function(f){var g=jv(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.columns,k=f.l-f.startTime,l=0;l<h;l++){var m=kv(f,c,f.startTime+k*l/h,g);d.push(m)}});c.closeSegmentIndex&&c.closeSegmentIndex();return e.return(d)})};function jv(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
p.pi=function(a,b){var c=this,d,e,f,g,h,k;return L(function(l){if(l.g==1)return H(l,iv(c,a),2);d=l.h;if(!d)return l.return(null);d.closeSegmentIndex&&(c.Tb.has(d)||(e=new Ge(function(){d.closeSegmentIndex();c.Tb.delete(d)}),c.Tb.set(d,e)),f=c.Tb.get(d),f.ka(5));g=d.segmentIndex.find(b);if(g==null)return l.return(null);h=d.segmentIndex.get(g);return(k=jv(h.tilesLayout||d.tilesLayout))?l.return(kv(h,d,b,k)):l.return(null)})};
function iv(a,b){var c,d;return L(function(e){if(e.g==1){if(a.m!=Du&&a.m!=Hu)return e.return(null);c=a.Fd;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return e.return(null);b!=null&&(d=c.find(function(f){return f.id==b}));return d?d.segmentIndex?e.u(2):H(e,d.createSegmentIndex(),2):e.return(null)}return e.return(d)})}
function kv(a,b,c,d){var e=b.width||0,f=b.height||0,g=e/d.columns,h=f/d.rows,k=d.columns*d.rows,l=a.l-a.startTime;l=a.C||l/k;var m=a.startTime,n=0,q=0;k>1&&(q=Math.floor((c-a.startTime)/l),m=a.startTime+q*l,n=q%d.columns*g,q=Math.floor(q/d.columns)*h);d=!1;if(c=a.thumbnailSprite)d=!0,h=c.height,n=c.positionX,q=c.positionY,g=c.width;return{segment:a,imageHeight:f,imageWidth:e,height:h,positionX:n,positionY:q,startTime:m,duration:l,uris:a.M(),startByte:a.bc(),endByte:a.ac(),width:g,sprite:d,mimeType:a.mimeType||
b.mimeType,codecs:a.codecs||b.codecs}}
p.Lf=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.l.B&&(fr(c.B.h,d,!1),oq(c.l,d),Fu(c),Uu(c),c.Sc=d.language)}var c=this;if(this.i&&this.F&&(b(),!this.ra()))return;(function(){if(c.h&&c.h.textTracks){var d=Zu(c),e=d.find(function(h){return uf(h)===a.id});if(e){if(c.A instanceof us){d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f===e?c.ea?"showing":"hidden":"disabled";f.mode!==g&&(f.mode=g)}}else d=d.find(function(h){return h.mode!=="disabled"}),
d!==e&&(d&&(d.mode="disabled",c.j.pb(d,"cuechange"),c.A.remove(0,Infinity)),e&&bv(c,e));Fu(c);Uu(c)}}})()};
function bv(a,b){a.j.G(b,"cuechange",function(){a.A.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},d=[],e=Array.from(b.activeCues||[]);e=r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(f.endTime===Infinity||f.endTime<f.startTime)f=null;else{var g=new td(f.startTime,f.endTime,f.text);g.line=typeof f.line==="number"?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
yd:1;g.position=typeof f.position==="number"?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;f.vertical==="lr"?g.writingMode="vertical-lr":f.vertical==="rl"&&(g.writingMode="vertical-rl");f.region&&(g.region.id=f.region.id,g.region.height=f.region.lines,g.region.heightUnits=2,g.region.regionAnchorX=f.region.regionAnchorX,g.region.regionAnchorY=f.region.regionAnchorY,g.region.scroll=f.region.scroll,g.region.viewportAnchorX=f.region.viewportAnchorX,
g.region.viewportAnchorY=f.region.viewportAnchorY,g.region.viewportAnchorUnits=Vc,g.region.width=f.region.width,g.region.widthUnits=Vc);Gd(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.A.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
p.ve=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&yf(f)){var g=e.l.o;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount&&g.audio.label==f.audio.label)&&cb("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.ra()?Mu(e,f,!1,!1,0):Mu(e,f,!1,b||!1,c||0);e.K.configure({language:f.language,
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",videoRole:f.video&&f.video.roles&&f.video.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,hdrLevel:f.video&&f.video.hdr?f.video.hdr:"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1,videoLayout:f.video&&f.video.videoLayout?f.video.videoLayout:"",audioLabel:f.audio&&f.audio.label?f.audio.label:"",videoLabel:f.video&&f.video.label?f.video.label:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,
audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:"",activeAudioCodec:g.audio&&g.audio.codecs?g.audio.codecs:"",activeAudioChannelCount:g.audio&&g.audio.channelsCount?g.audio.channelsCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount});Ku(e)}}var e=this;b=b===void 0?!1:b;c=c===void 0?0:c;if(this.i&&this.F&&(d(),!this.ra()))return;(function(){if(a.originalAudioId&&e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=r(f);for(var g=f.next();!g.done;g=
f.next())if(g=g.value,uf(g)==a.id){lv(e,g);break}}})()};
p.bj=function(a,b){function c(){var e=d.K.getConfiguration();e.audioCodec=a.codecs||"";e.audioLabel=a.label||"";e.channelCount=a.channelsCount||0;e.language=a.language;e.role=a.roles[0]||"";e.spatialAudio=a.spatialAudio;d.K.configure(e);$t(d,!0,b,!1,!1)}var d=this;b=b===void 0?0:b;if(this.i&&this.F&&(c(),!this.ra()))return;(function(){if(d.h&&d.h.audioTracks){var e=Ne(a.language),f=Array.from(d.h.audioTracks),g=null;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=h.language||"und";if(h.label==
a.label&&Ne(k)==e&&h.kind==a.roles[0]){g=h;break}}g&&lv(d,g)}})()};
p.getAudioTracks=function(){if(this.i&&!this.ra()){var a=this.Qb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.m!=Du||this.ra()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&(f.audioCodec||ee.includes(f.audioMimeType||""))}));if(!c.length)return[];a=new Map;c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalAudioId;e||d.audioId==null||(e=String(d.audioId));!e&&d.codecs.includes(",")&&d.audioCodec&&(e="muxed-in-video");
e&&(e+=[d.language,d.label,d.channelsCount,d.spatialAudio].join("_"),a.set(e,{active:d.active,language:d.language,label:d.label,mimeType:d.audioMimeType,codecs:d.audioCodec,primary:d.primary,roles:d.audioRoles||[],accessibilityPurpose:d.accessibilityPurpose,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,originalLanguage:d.originalLanguage}))}return Array.from(a.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(f){var g=
f.language;g={active:f.enabled,language:Ne(g||"und"),label:f.label,mimeType:null,codecs:null,primary:f.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:g};f.kind&&g.roles.push(f.kind);f.configuration&&(f.configuration.codec&&(g.codecs=f.configuration.codec),f.configuration.sampleRate&&(g.audioSamplingRate=f.configuration.sampleRate),f.configuration.numberOfChannels&&(g.channelsCount=f.configuration.numberOfChannels));return g}):
[]};
p.dj=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?0:c;var d=this.Qb();if(d.length){var e=d.find(function(f){return f.active});e&&(d=d.find(function(f){return f.audioId===e.audioId&&(f.videoBandwidth||f.bandwidth)==a.bandwidth&&f.width==a.width&&f.height==a.height&&f.frameRate==a.frameRate&&f.pixelAspectRatio==a.pixelAspectRatio&&f.hdr==a.hdr&&f.colorGamut==a.colorGamut&&f.videoLayout==a.videoLayout&&f.videoMimeType==a.mimeType&&f.videoCodec==a.codecs&&kb(f.videoRoles,a.roles)&&f.videoLabel==a.label}))&&
!d.active&&this.ve(d,b,c)}};
p.getVideoTracks=function(){if(this.m==Hu||this.ra())return[];var a=this.Qb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a.filter(function(f){return f.originalAudioId===b.originalAudioId&&f.audioId===b.audioId&&f.audioGroupId===b.audioGroupId&&f.videoCodec});if(!c.length)return[];a=new Map;c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalVideoId;e||d.videoId==null||(e=String(d.videoId));e&&a.set(e,{active:d.active,bandwidth:d.videoBandwidth||
d.bandwidth,width:d.width,height:d.height,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,mimeType:d.videoMimeType,codecs:d.videoCodec,roles:d.videoRoles||[],label:d.videoLabel})}return Array.from(a.values())};p.Jh=function(){return mv(this.Qb())};p.mi=function(){return mv(this.dc())};p.Ih=function(){return Array.from(nv(this.Qb()))};p.li=function(){return Array.from(nv(this.dc()))};
p.Ug=function(a,b,c,d,e,f,g){function h(){function l(u,v){return u.video||v.video?u.video&&v.video?Math.abs((u.video.height||0)-(v.video.height||0))+Math.abs((u.video.width||0)-(v.video.width||0)):Infinity:0}var m=k.l.o;k.K=k.g.adaptationSetCriteriaFactory();k.K.configure({language:a,role:b||"",videoRole:m.video&&m.video.roles&&m.video.roles[0]||"",channelCount:c||0,hdrLevel:"",spatialAudio:f||!1,videoLayout:"",audioLabel:g||"",videoLabel:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,
audioCodec:e||"",activeAudioCodec:m.audio&&m.audio.codecs?m.audio.codecs:"",activeAudioChannelCount:m.audio&&m.audio.channelsCount?m.audio.channelsCount:0,preferredAudioCodecs:k.g.preferredAudioCodecs,preferredAudioChannelCount:k.g.preferredAudioChannelCount});var n=k.K.create(k.i.variants),q=null;n=r(n.values());for(var t=n.next();!t.done;t=n.next())t=t.value,yf(t)&&(!q||l(q,m)>l(t,m))&&(q=t);q!=m&&(q?(m=qf(q),k.ve(m,!0,d||0)):$t(k))}var k=this;c=c===void 0?0:c;d=d===void 0?0:d;e=e===void 0?"":e;
f=f===void 0?!1:f;g=g===void 0?"":g;if(this.i&&this.F&&(h(),!this.ra()))return;(function(){if(k.h&&k.h.audioTracks){var l=Af(k.Qb(),a,b||"",!1)[0];l&&k.ve(l)}})()};p.Vg=function(a,b,c){function d(){e.Sc=a;e.Xc=b||"";e.Wc=c||!1;var f=Af(e.i.textStreams,e.Sc,e.Xc,e.Wc)[0]||null;f&&f!=e.l.B&&(fr(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.uf())&&(oq(e.l,f),Fu(e),Uu(e))}var e=this;c=c===void 0?!1:c;if(this.i&&this.F&&(d(),!this.ra()))return;(function(){var f=Af(e.dc(),a,b||"",c||!1)[0];f&&e.Lf(f)})()};
p.cj=function(a,b,c){function d(){for(var f=null,g=r(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}f!=null&&(e.K=e.g.adaptationSetCriteriaFactory(),e.K.configure({language:f.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),
$t(e,b,c))}var e=this;b=b===void 0?!0:b;c=c===void 0?0:c;if(this.i&&this.F&&(d(),!this.ra()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=r(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&lv(e,g)}})()};p.uf=function(){var a=this.ea;return this.A?this.A.isTextVisible():a};p.Nh=function(){return this.Ya.map(function(a){return rf(a)})};
p.Lh=function(a){yb("getChapters","Please use an getChaptersAsync.");if(!this.Ya.length)return[];var b=Ne(a);a=this.Ya.filter(function(f){return Ne(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=r(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.Db(function(f){var g=f.M()[0],h=f.startTime+"-"+f.endTime+"-"+g;f={id:h,title:g,startTime:f.startTime,endTime:f.endTime};d.has(h)||(c.push(f),d.add(h))});return c};
p.Mh=function(a){var b=this,c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(!b.Ya.length)return l.return([]);c=Ne(a);d=b.Ya.filter(function(m){return Ne(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=r(d);h=g.next();case 2:if(h.done){l.u(4);break}k=h.value;if(k.segmentIndex){l.u(5);break}return H(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Db(function(m){var n=m.M()[0],q=m.startTime+"-"+m.endTime+"-"+n;m={id:q,title:n,startTime:m.startTime,endTime:m.endTime};f.has(q)||
(e.push(m),f.add(q))});h=g.next();l.u(2);break;case 4:return l.return(e)}})};function Zu(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind!="metadata"&&b.kind!="chapters"&&b.label!="Shaka Player TextTrack"})}function $u(a){return Array.from(a.h.textTracks).find(function(b){return b.label=="Shaka Player TextTrack"})}function dv(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind=="metadata"})}
p.$g=function(a){a=!!a;this.ea!=a&&(this.ea=a,this.m==Du?(this.A.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.B||(a=Af(this.i.textStreams,this.Sc,this.Xc,this.Wc),a.length>0&&(oq(this.l,a[0]),Fu(this),Uu(this))):kq(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.A.setTextVisibility(a),Tu(this))};
p.ci=function(){if(this.F)var a=this.F.Id();else{if(this.P==null)return new Date;if(this.P instanceof Date)return this.P;a=this.P}if(this.i&&!this.ra()){var b=this.i.presentationTimeline;return new Date(((b.m||b.i)+a)*1E3)}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+a*1E3)):null};
p.og=function(){if(this.i&&!this.ra()){var a=this.i.presentationTimeline;a=a.m||a.i;return a===null?null:new Date(a*1E3)}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};p.Zd=function(){return this.ba()?this.i?this.i.presentationTimeline.Zd():null:null};p.$b=function(){if(this.m==Du)return this.H.$b();var a={total:[],audio:[],video:[],text:[]};this.m==Hu&&(a.total=Yn(this.h.buffered));return a};
function Kt(a){if(!a.h||!a.h.currentTime)return null;var b=a.og();return b?Math.floor(Date.now()-(b.getTime()+a.h.currentTime*1E3)):null}p.getBandwidthEstimate=function(){return this.o?this.o.getBandwidthEstimate():NaN};
p.getStats=function(){if(this.m!=Du&&this.m!=Hu)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,
switchHistory:[],stateHistory:[]};Cu(this);var a=this.h,b=a.currentTime/a.duration;isNaN(b)||this.ba()||jr(this.B,Math.round(100*b));this.F&&(this.B.V=this.F.Vf(),this.B.Y=this.F.Xf());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),hr(this.B,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.B.N=Number(b.corruptedVideoFrames));this.B.o=this.D?Jj(this.D):NaN;ir(this.B,a.videoWidth||NaN,a.videoHeight||NaN);this.B.l="";this.ba()&&(a=Kt(this),a!=null&&(this.B.D=a/1E3));b=this.Qb().find(function(e){return e.active});
a=this.dc().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.N?this.N.i:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.B.B=d}b.width&&b.height&&ir(this.B,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.B.l=b)}this.m!=Du||this.ra()||(this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&(this.B.K=this.i.presentationTimeline.h)),a=this.o.getBandwidthEstimate(),this.B.A=a);this.m==Hu&&kr(this.B,NaN);
return lr(this.B)};
p.qh=function(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=this,k,l,m,n,q,t,u,v,w,y,x,B;return L(function(C){switch(C.g){case 1:if(h.m!=Du&&h.m!=Hu)throw new T(1,7,7004);c!="subtitles"&&c!="captions"&&cb("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){C.u(2);break}return H(C,ov(h,a),3);case 3:d=C.h;case 2:k=[];h.C&&(k=h.C.getCuePoints());if(h.m!=Hu){C.u(4);break}l=sb();g&&l.ya()==="WEBKIT"&&(c="forced");return H(C,pv(h,a,b,c,d,f||"",k),5);case 5:m=C.h;if(m.track)return Gu(h),
Fu(h),C.return(wf(m.track));throw new T(1,2,2012);case 4:n=Cc;q=h.bb();t=q.end-q.start;h.i&&(t=h.i.presentationTimeline.getDuration());if(t==Infinity)throw new T(1,4,4033);if(!k.length){C.u(6);break}return H(C,qv(h,a,h.I,h.g.streaming.retryParameters),7);case 7:u=C.h,v=rv(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=ro(w),d="text/vtt";case 6:y={id:h.Hd++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Vk(0,t,[a]),mimeType:d||"",codecs:e||"",kind:c,
encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:n.Ka,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([de(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};x=de(y.mimeType,y.codecs);B=se(x);if(!B)throw new T(2,2,2014,d);h.i.textStreams.push(y);Gu(h);
Fu(h);return C.return(rf(y))}})};
p.rh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C;return L(function(I){switch(I.g){case 1:if(c.m!=Du&&c.m!=Hu)throw new T(1,7,7004);if(b){I.u(2);break}return H(I,ov(c,a),3);case 3:b=I.h;case 2:if(b!="text/vtt")throw new T(1,2,2017,a);d=Cc;e=c.bb();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(f==Infinity)throw new T(1,4,4045);return H(I,qv(c,a,c.I,c.g.streaming.retryParameters),4);case 4:g=I.h;h=re(b);if(!h)throw new T(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,
segmentEnd:f,vttOffset:0};m=Vb(g);n=k.parseMedia(m,l,a,[]);q=[];t=r(n);u=t.next();for(v={};!u.done;v={Ae:void 0,Ic:void 0},u=t.next())v.Ic=u.value,v.Ae=null,w=function(E){return function(){E.Ae==null&&(E.Ae=tc([a],[E.Ic.payload]));return E.Ae||[]}}(v),y=new Ck(v.Ic.startTime,v.Ic.endTime,w,0,null,null,0,0,Infinity),v.Ic.payload.includes("#xywh")&&(x=v.Ic.payload.split("#xywh=")[1].split(","),x.length===4&&y.ah({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],
10)})),q.push(y);B=b;if(!q.length){I.u(5);break}return H(I,hl(q[0].M()[0],c.I,c.g.manifest.retryParameters),6);case 6:B=I.h;case 5:return C={id:c.Hd++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Tk(q),mimeType:B||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.oh,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,
audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([de(B||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.m==Hu?c.Fd.push(C):c.i.imageStreams.push(C),Gu(c),I.return(sf(C))}})};
p.ph=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,q,t,u,v,w,y,x;return L(function(B){switch(B.g){case 1:if(d.m!=Du&&d.m!=Hu)throw new T(1,7,7004);if(c){B.u(2);break}return H(B,ov(d,a),3);case 3:c=B.h;case 2:e=Cc;f=d.bb();g=f.end-f.start;d.i&&(g=d.i.presentationTimeline.getDuration());if(g==Infinity)throw new T(1,4,4055);return H(B,qv(d,a,d.I,d.g.streaming.retryParameters),4);case 4:h=B.h;k=re(c);if(!k)throw new T(2,2,2014,c);l=k();m={periodStart:0,segmentStart:0,segmentEnd:g,vttOffset:0};n=Vb(h);q=
l.parseMedia(n,m,a,[]);t=[];u=r(q);v=u.next();for(w={};!v.done;w={Sd:void 0},v=u.next())w.Sd=v.value,y=new Ck(w.Sd.startTime,w.Sd.endTime,function(C){return function(){return[C.Sd.payload]}}(w),0,null,null,0,0,Infinity),t.push(y);x={id:d.Hd++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Tk(t),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:null,type:e.Ka,primary:!1,trickModeVideo:null,
dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([de("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null};d.Ya.push(x);Gu(d);return B.return(rf(x))}})};
function ov(a,b){var c;return L(function(d){switch(d.g){case 1:return va(d,2),H(d,hl(b,a.I,a.g.streaming.retryParameters),4);case 4:c=d.h;xa(d,3);break;case 2:za(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
function pv(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(n.g==1)return e!="text/vtt"||g.length?H(n,qv(a,b,a.I,a.g.streaming.retryParameters),3):n.u(2);n.g!=2&&(h=n.h,k=rv(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ro(l),e="text/vtt");m=document.createElement("track");a:{var q=a.L,t=b;try{if(!q.g.enabled){var u=t;break a}var v=Xs(q);v.ot=Dt;v.su=!0;var w=at(v);u=bt(t,w);break a}catch(y){db("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",y);u=t;break a}u=void 0}m.src=u;m.label=
f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);a.Ge.push(m);return n.return(m)})}function qv(a,b,c,d){var e,f,g;return L(function(h){if(h.g==1){e=ej;f=Zi([b],d);f.method="GET";var k=a.L;try{k.g.enabled&&st(k,f,{ot:Dt,su:!0})}catch(l){db("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return H(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
function rv(a,b,c,d){var e=re(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Vb(b),b=c.parseMedia(b,a,null,[]),Js(b,d);throw new T(2,2,2014,c);}p.gj=function(a,b){this.wa.width=a;this.wa.height=b};p.Hf=function(a){if(this.m==Du){var b=this.l;a=a===void 0?.1:a;if(b.l.g)b=!1;else if(b.D)b=!1;else{for(var c=r(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.gd||d.Ba||d.cb||(d.gd=!1,jq(b,d,a));b=!0}}else b=!1;return b};
p.pf=function(){cb("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for.");return this.i};p.Xh=function(){return this.Vb};
p.Rh=function(){var a={video:null,audio:null,text:null};if(this.m!=Du)return a;var b=this.l.o,c=this.h.currentTime;b=r([b.video,b.audio,this.l.B]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};d.type=="video"?(e.width=d.width,e.height=d.height,a.video=e):d.type=="audio"?a.audio=e:d.type==Ac&&(a.text=e)}return a};
function Vt(a){var b=Wq();b.streaming.failureCallback=function(c){if(a.ba()){var d=null;c.code==1001||c.code==1002?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):c.code==1003&&(d=.1);d!=null&&(c.severity=1,a.Hf(d))}};b.textDisplayFactory=function(){if(a.xd){var c=a.h;c=c.webkitDisplayingFullscreen||c.webkitPresentationMode&&c.webkitPresentationMode!="inline"?!1:!0}else c=!1;return c?new zs(a.h,a.xd):"track"in document.createElement("track")?new us(a):new ys};return b}p.ij=function(a){this.xd=a};
function uu(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,e.mimeType!="application/cea-608"&&e.mimeType!="application/cea-708"||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(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 Wk,l=e.closedCaptions.get(g);h={id:a.Hd++,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:Ac,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([de(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
b.textStreams.push(h);c.add(g)}}
function Su(a,b){var c,d,e,f,g;return L(function(h){if(h.g==1)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return L(function(t){if(t.g==1)return k?k.segmentIndex?t.u(2):H(t,k.createSegmentIndex(),2):t.return(null);n=(m=k.segmentIndex.Eb(l))?m.next().value:null;if(!n)return t.return(null);q=n.startTime;return t.return(q)})},H(h,e(c,b),2);if(h.g!=3)return f=h.h,H(h,e(d,b),3);g=h.h;return g!=null&&f!=null?h.return(Math.max(g,f)):g!=null?h.return(g):f!=null?h.return(f):h.return(b)})}
function ju(a){var b=a.ug();if(a.B&&a.S&&a.F){if(a.g.streaming.rebufferingGoal==0){var c=a.N;c.j=!1;ip(c)}else c=a.N,c.j=b,ip(c);a.L&&(c=a.L,b||c.C||(c.C=!0),c.C&&b&&(c.I=!0,Vs(c,"ps",{Bc:"r"})),c.J=b);Cu(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Kd<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;
a.Y&&(a.Y=Math.min(a.Y+ ++a.Kd*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(cu("buffering",b))}function Eu(a,b){a.Gb.ib();a.Gb.G(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.bb(),e=a.ba(),f=e?a.g.streaming.safeSeekOffset:0;b>0?(!e||b>=1)&&Math.floor(c)>=Math.floor(d.end)&&a.Zc():Math.floor(c)<=Math.floor(d.start+f)&&a.Zc()})}
function Cu(a){if(a.B&&a.S){var b=a.B.g,c="playing";a.S.g==ln?c="buffering":a.jd()?c="ended":a.h.paused&&(c="paused");var d=c;if(b.g==null)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(cu("statechanged",c)))}}
function Wu(a){var b=a.h.playbackRate,c=a.ba();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.kg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.sd(d,!1):e==1&&b!==a.N.qc()&&a.Zc()}if(c&&(c=a.bb(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,a.i.serviceDescription.targetLatency!=null?h=a.i.serviceDescription.targetLatency+d:a.i.serviceDescription.maxLatency!=null&&(h=a.i.serviceDescription.maxLatency),a.i.serviceDescription.targetLatency!=null?
k=Math.max(0,a.i.serviceDescription.targetLatency-d):a.i.serviceDescription.minLatency!=null&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.Y||typeof g!=="number"||(a.Y=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Fb&&a.Y!==null&&typeof g==="number"&&a.Kd<n&&Date.now()-a.Fb>f*1E3&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
a.Y=Math.max(a.Y-(g-f)/2,f+d),a.Fb=Date.now());e&&a.Y!==null&&(h=a.Y+d,k=a.Y-d);g=c.end-a.h.currentTime;d=0;a.m==Hu&&(e=a.h.buffered,e.length>0&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=a.g.streaming.liveSync.panicThreshold*1E3;f=Date.now()-a.S.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.sd(m,!1):h!=void 0&&l&&g-d>h?(b!=l&&a.sd(l,!1),a.Fb=null):k!=void 0&&m&&g-d<k?(b!=m&&a.sd(m,!1),a.Fb=null):b!==a.N.qc()&&(a.Zc(),a.Fb=Date.now())}}
function Xu(a){if(a.h){var b=function(e,f){var g=g===void 0?Number.EPSILON:g;if(e===f)g=!0;else{var h=Math.abs(e-f);g=h<=g?!0:g!==Number.EPSILON?Math.abs(h-g)<=Number.EPSILON:!1}return(g||f>e)&&a.Fe<e?(a.Fe=e,!0):!1},c=a.bb();c=c.end-c.start;c=c>0?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=cu("started");else if(b(25,c))d=cu("firstquartile");else if(b(50,c))d=cu("midpoint");else if(b(75,c))d=cu("thirdquartile");else{if(b(100,c)||c>100)d=cu("complete");a.g&&a.g.playRangeEnd!=Infinity&&
a.jd()&&a.h.pause()}d&&a.dispatchEvent(d)}}}function Ku(a){try{mo(a.Bd,a.i)}catch(c){return hu(a,c),!1}var b=zf(a.i.variants);b=a.K.create(b);a=a.o.setVariants(Array.from(b.values()));return typeof a=="boolean"?a:!0}
function Ou(a,b){b=b===void 0?!1:b;if(Ku(a)){if(!a.g.abr.enabled){var c=a.K;typeof c.getLastAdaptationSet!="function"&&(yb("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),c.getLastAdaptationSet=function(){return null});if(c=c.getLastAdaptationSet())if(c=Array.from(c.values()),c.length){var d=a.l.o;if(d&&d.video&&(c=c.find(function(e){return e.video==d.video})))return c}}return a.o.chooseVariant(b)}return null}
function $t(a,b,c,d,e){b=b===void 0?!0:b;c=c===void 0?0:c;d=d===void 0?!1:d;e=e===void 0?!0:e;var f=Ou(a);f&&Mu(a,f,e,b,c,d)}
function Mu(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a.l.o;if(b==g)d&&nq(a.l,b,d,e,!0);else{var h=a.B.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));nq(a.l,b,d,e,f,c);d=null;g&&(d=qf(g));g=qf(b);g.active=!0;if(a.V&&(e=a.V,b=b.video)){b.dependencyStream&&(b=b.dependencyStream);f=0;h=-1;switch(b.mimeType){case "video/webm":f=1;break;case "video/mp4":f=2}switch(a.mg()){case "DASH":h=1;break;case "HLS":h=0}e.g&&(e.g.setLevelSwitching(b.id,
!0),e.g.setContainerFormat(f),e.j||e.g.setStreamingFormat(h))}c?(c=(new Map).set("oldTrack",d).set("newTrack",g),c=cu("adaptation",c),sv(a,c)):tv(a,d,g);uv(a,d,g)}}function lv(a,b){var c=Array.from(a.h.audioTracks).find(function(e){return e.enabled});b.enabled=!0;if(c){b.id!==c.id&&(c.enabled=!1);var d=hv(a);c=xf(c,d);b=xf(b,d);tv(a,c,b);uv(a,c,b)}}function hv(a){return a.h&&a.h.videoTracks?Array.from(a.h.videoTracks).find(function(b){return b.selected}):null}
function Gu(a){var b=cu("trackschanged");sv(a,b);vv(a)}function tv(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=cu("variantchanged",b);sv(a,b)}function uv(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&vv(a)}function vv(a){var b=cu("audiotrackschanged");sv(a,b)}function Fu(a){var b=cu("textchanged");sv(a,b)}function Tu(a){var b=cu("texttrackvisibility");sv(a,b)}
function Vu(a){a.g.abr.enabled||Zt(a);var b=(new Map).set("newStatus",a.g.abr.enabled);sv(a,cu("abrstatuschanged",b))}function Uu(a){var b=a.dc().find(function(c){return c.active});b&&a.A&&a.A.setTextLanguage&&a.A.setTextLanguage(b.language)}function Zt(a,b){b=b===void 0?!0:b;if(a.m==Du){a.Dd.stop();for(var c=r(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Ku(a)}}
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===du||!navigator.onLine||b==0||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?a.type=="audio"?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=r(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.Dd.Ea(1);b=this.$b().video.reduce(function(h,
k){return h+k.end-k.start},0);$t(this,!1,b,!0,!1);return!0}return!1};
function hu(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:if(a.m==du)return h.return();b.severity===1&&a.B.L++;c=!0;if(!(a.Ga&&a.i&&a.l)||b.code!=3016&&b.code!=3014&&b.code!=3015&&b.code!=3024&&b.code!=3018){h.u(2);break}d=sb();if(d.ya()==="WEBKIT"&&b.code==3016)return h.return();va(h,3);return H(h,Dq(a.l),5);case 5:e=h.h;c=!e;e&&(f=cu("mediasourcerecovered"),a.dispatchEvent(f));xa(h,2);break;case 3:za(h),c=!0;case 2:if(!c)return h.return();b.severity===2&&Zt(a,!1);g=cu("error",(new Map).set("detail",
b));a.dispatchEvent(g);g.defaultPrevented&&(b.handled=!0);K(h)}})}p.addFont=function(a,b){return fi(a,b)};function wu(a,b,c,d){d=d===void 0?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,timescale:c.timescale,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(cu(b,a))}
function xu(a,b,c,d){d=d===void 0?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(cu(d?"audiotrackchanged":"mediaqualitychanged",b))}
function gu(a,b){b=b===void 0?!0:b;if(!a.h.error)return b?new T(2,3,3016):null;var c=a.h.error.code;if(!b&&c==1)return null;if(b=a.h.error.msExtendedCode)b<0&&(b+=4294967296),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}
function yu(a,b){var c=cu("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);d.length==1&&d[0]==""&&(d=["00"],b={"00":b[""]});var e=d.length==1&&d[0]=="00";c=!1;if(d.length){d=a.keySystem();for(var f=kj(a.g.drm.clearKeys),g=function(u,v){u.allowedByKeySystem=!0;v=r(v);for(var w=v.next();!w.done;w=v.next())if(w=w.value,(w=b[e?"00":w])||a.D.H)u.allowedByKeySystem=u.allowedByKeySystem&&!!w&&!no.includes(w)},h=r(a.i.variants),k=h.next();!k.done;k=h.next()){k=k.value;var l=Cf(k);l=r(l);for(var m=
l.next();!m.done;m=l.next()){m=m.value;var n=k.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!f.size&&a.i.type=="HLS")for(var q=r(m.drmInfos),t=q.next();!t.done;t=q.next())t=t.value,t.keySystem==d&&(t.keyIds.size?g(k,t.keyIds):g(k,m.keyIds));else g(k,m.keyIds);n!=k.allowedByKeySystem&&(c=!0)}}}if(c&&(Gu(a),!Ku(a)))return;(c=a.l.o)&&!c.allowedByKeySystem&&$t(a)}function Lu(a,b,c){b>0&&(a.ba()||a.bh(b));b=a.getDuration();c<b&&(a.ba()||a.hc(c))}
function sv(a,b){L(function(c){if(c.g==1)return H(c,Promise.resolve(),2);a.m!=du&&a.dispatchEvent(b);K(c)})}function nv(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ne(c.language)):b.add("und");return b}
function mv(a){for(var b=new Map,c=new Map,d=0;d<a.length;d++){var e=a[d],f="und",g=[];e.language&&(f=Ne(e.language));e.type=="variant"?g=e.audioRoles:g=e.roles;g&&g.length||(g=[""]);b.has(f)||b.set(f,new Set);g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,b.get(f).add(h),e.label&&(c.has(f)||c.set(f,new Map),c.get(f).set(h,e.label))}var k=[];b.forEach(function(l,m){l=r(l);for(var n=l.next();!n.done;n=l.next()){n=n.value;var q=null;c.has(m)&&c.get(m).has(n)&&(q=c.get(m).get(n));k.push({language:m,
role:n,label:q})}});return k}p.ra=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1};p.jd=function(){return!this.h||this.h.ended?!0:this.Ga&&!this.ba()&&this.h.currentTime>=this.bb().end};S("shaka.Player",Y);Y.prototype.isEnded=Y.prototype.jd;Y.prototype.isRemotePlayback=Y.prototype.ra;Y.prototype.addFont=Y.prototype.addFont;Y.prototype.setVideoContainer=Y.prototype.ij;Y.prototype.getFetchedPlaybackInfo=Y.prototype.Rh;Y.prototype.getManifestParserFactory=Y.prototype.Xh;
Y.prototype.getManifest=Y.prototype.pf;Y.prototype.retryStreaming=Y.prototype.Hf;Y.prototype.setMaxHardwareResolution=Y.prototype.gj;Y.prototype.addChaptersTrack=Y.prototype.ph;Y.prototype.addThumbnailsTrack=Y.prototype.rh;Y.prototype.addTextTrackAsync=Y.prototype.qh;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getBufferedInfo=Y.prototype.$b;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Zd;Y.prototype.getPresentationStartTimeAsDate=Y.prototype.og;
Y.prototype.getPlayheadTimeAsDate=Y.prototype.ci;Y.prototype.setTextTrackVisibility=Y.prototype.$g;Y.prototype.getChaptersAsync=Y.prototype.Mh;Y.prototype.getChapters=Y.prototype.Lh;Y.prototype.getChaptersTracks=Y.prototype.Nh;Y.prototype.isTextTrackVisible=Y.prototype.uf;Y.prototype.selectVariantsByLabel=Y.prototype.cj;Y.prototype.selectTextLanguage=Y.prototype.Vg;Y.prototype.selectAudioLanguage=Y.prototype.Ug;Y.prototype.getTextLanguages=Y.prototype.li;Y.prototype.getAudioLanguages=Y.prototype.Ih;
Y.prototype.getTextLanguagesAndRoles=Y.prototype.mi;Y.prototype.getAudioLanguagesAndRoles=Y.prototype.Jh;Y.prototype.getVideoTracks=Y.prototype.getVideoTracks;Y.prototype.selectVideoTrack=Y.prototype.dj;Y.prototype.getAudioTracks=Y.prototype.getAudioTracks;Y.prototype.selectAudioTrack=Y.prototype.bj;Y.prototype.selectVariantTrack=Y.prototype.ve;Y.prototype.selectTextTrack=Y.prototype.Lf;Y.prototype.getThumbnails=Y.prototype.pi;Y.prototype.getAllThumbnails=Y.prototype.Hh;
Y.prototype.getImageTracks=Y.prototype.Th;Y.prototype.getTextTracks=Y.prototype.dc;Y.prototype.getVariantTracks=Y.prototype.Qb;Y.prototype.cancelTrickPlay=Y.prototype.Zc;Y.prototype.trickPlay=Y.prototype.sd;Y.prototype.useTrickPlayTrackIfAvailable=Y.prototype.Uf;Y.prototype.getPlaybackRate=Y.prototype.wb;Y.prototype.isBuffering=Y.prototype.ug;Y.prototype.getKeyStatuses=Y.prototype.Xd;Y.prototype.getActiveSessionsMetadata=Y.prototype.mf;Y.prototype.getExpiration=Y.prototype.nf;
Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.isFullyLoaded=Y.prototype.Bi;Y.prototype.goToLive=Y.prototype.wi;Y.prototype.seekRange=Y.prototype.bb;Y.prototype.isVideoOnly=Y.prototype.Gi;Y.prototype.isAudioOnly=Y.prototype.Ai;Y.prototype.isInProgress=Y.prototype.Mc;Y.prototype.isLive=Y.prototype.ba;Y.prototype.getQueueManager=Y.prototype.ii;Y.prototype.getAdManager=Y.prototype.Gh;Y.prototype.getAssetUri=Y.prototype.Wd;
Y.prototype.getNetworkingEngine=Y.prototype.ai;Y.prototype.getMediaElement=Y.prototype.$h;Y.prototype.getManifestType=Y.prototype.mg;Y.prototype.getLoadMode=Y.prototype.Wh;Y.prototype.resetConfiguration=Y.prototype.Yi;Y.prototype.getBufferFullness=Y.prototype.kg;Y.prototype.getNonDefaultConfiguration=Y.prototype.bi;Y.prototype.getConfigurationForLowLatency=Y.prototype.Oh;Y.prototype.getConfiguration=Y.prototype.getConfiguration;Y.prototype.configurationForLowLatency=Y.prototype.Dh;
Y.prototype.configure=Y.prototype.configure;Y.prototype.releaseAllMutexes=Y.prototype.Xi;Y.prototype.destroyAllPreloads=Y.prototype.hg;Y.prototype.preload=Y.prototype.preload;Y.prototype.detachAndSavePreload=Y.prototype.ig;Y.prototype.unloadAndSavePreload=Y.prototype.lj;Y.prototype.load=Y.prototype.load;Y.prototype.updateStartTime=Y.prototype.oj;Y.prototype.unload=Y.prototype.td;Y.prototype.detach=Y.prototype.detach;Y.prototype.attachCanvas=Y.prototype.uh;Y.prototype.attach=Y.prototype.Xb;
Y.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return H(k,Tj(),3);case 3:b=k.h;case 2:return c=Jk(),d=to(),e=sb(),H(k,e.Nb(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=wv,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};
Y.isBrowserSupported=function(){window.Promise||cb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;sb();return hi()?!0:ci().canPlayType("application/x-mpegurl")!=""};Y.setQueueManagerFactory=function(a){Yt=a};Y.setAdManagerFactory=function(a){Xt=a};Y.registerSupportPlugin=function(a,b){wv.set(a,b)};Y.prototype.destroy=Y.prototype.destroy;var du=0,Ut=1,Du=2,Hu=3;
Y.LoadMode={DESTROYED:du,NOT_LOADED:Ut,MEDIA_SOURCE:Du,SRC_EQUALS:Hu};Y.version="v4.16.3";var xv=["4","16"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(xv[0]),Number(xv[1])));var wv=new Map,Xt=null,Yt=null;function yv(){}function zv(a,b){a={priority:b||0,callback:a};for(b=0;b<Av.length;b++)if(Av[b].priority<a.priority){Av.splice(b,0,a);return}Av.push(a)}S("shaka.polyfill",yv);yv.register=zv;yv.installAll=function(){for(var a=r(Av),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){cb("Error installing polyfill!",c)}}};var Av=[];function Bv(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}Bv.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};Bv.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function Cv(a){if(a.startsWith("com.apple"))return"cbcs";if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("org.w3")||a.startsWith("com.huawei"))return"cenc";cb("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}
function Dv(a){if(!a)return!1;a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&a.encryptionScheme!==void 0?!0:!1}function Ev(a,b){return!a||a==b||(a=="cbcs"||a=="cbcs-1-9")&&sb().Cc()?!0:!1};function Fv(){}var Gv;function Hv(){sb().ze()&&!Gv&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(Gv=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=Iv,navigator.emeEncryptionSchemePolyfilled=!0)}
function Iv(a,b){var c=this,d,e;return L(function(f){if(f.g==1)return H(f,Gv.call(c,a,b),2);d=f.h;if(e=Dv(d))return navigator.requestMediaKeySystemAccess=Gv,f.return(d);navigator.requestMediaKeySystemAccess=Jv;return f.return(Jv.call(c,a,b))})}
function Jv(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,t,u;return L(function(v){if(v.g==1){d=Cv(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Kv(h.videoCapabilities,d),l=Kv(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 H(v,Gv.call(c,a,e),2)}q=v.h;u=t=null;e[0]&&(e[0].videoCapabilities&&(t=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new Bv(q,t,u))})}function Kv(a,b){return a?a.filter(function(c){return Ev(c.encryptionScheme,b)}):a}yv.EmeEncryptionScheme=Fv;Fv.install=Hv;zv(Hv);function Lv(){}var Mv;function Nv(){sb().ze()&&!Mv&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(Mv=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=Ov,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
function Ov(a){var b=this,c,d,e;return L(function(f){switch(f.g){case 1:return H(f,Mv.call(b,a),2);case 2:c=f.h;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=Dv(d))return navigator.mediaCapabilities.decodingInfo=Mv,f.return(c);navigator.mediaCapabilities.decodingInfo=Pv;if(d){f.u(3);break}return H(f,Qv(a),4);case 4:return c.keySystemAccess=f.h,f.return(c);case 3:return f.return(Pv.call(b,a))}})}
function Pv(a){var b=this,c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:return d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=Cv(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},Ev(d,g)&&Ev(c,g))?H(l,Mv.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=new Bv(k.keySystemAccess,c,d);l.u(3);break}if(!a.keySystemConfiguration){l.u(3);
break}return H(l,Qv(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
function Qv(a){var b,c;return L(function(d){if(d.g==1){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return H(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}yv.MCapEncryptionScheme=Lv;Lv.install=Nv;zv(Nv,-2);function Rv(){}function Sv(){sb().Ib()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Rv.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Tv)}
function Tv(a){var b,c,d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};sb();c=a.video;d=a.audio;if(a.type!="media-source"){if(a.type=="file"){if(c&&(e=c.contentType,f=ci().canPlayType(e)!="",!f)||d&&(g=d.contentType,h=ci().canPlayType(g)!="",!h))return q.return(b)}else return q.return(b);q.u(2);break}if(!hi())return q.return(b);if(!c){q.u(3);break}return H(q,Uv(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var t=
sb().Ma(),u=d.contentType;t==="CAST"&&d.spatialRendering&&(u+="; spatialRendering=true");l=Hc(u);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return H(q,Vv(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}function Uv(a){var b,c,d;return L(function(e){return e.g==1?(b=sb(),c=b.Ma(),c!=="CAST"?e.u(2):H(e,Wv(a),3)):e.g!=2?(d=e.h,e.return(d)):e.return(Hc(a.contentType))})}
function Vv(a,b,c){var d,e,f,g,h,k,l,m,n,q,t;return L(function(u){switch(u.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},sb().Dg()&&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=le(k)+";"+ke(k);n=le(l)+";"+ke(l);q=c.keySystem;t=null;va(u,2);if(ui.has(m+"#"+n+"#"+q)){t=ui.get(m+"#"+n+"#"+q)||null;u.u(4);break}return H(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:t=u.h,ui.set(m+"#"+n+"#"+q,t);case 4:xa(u,
3);break;case 2:za(u);case 3:return u.return(t)}})}
function Wv(a){var b,c,d,e,f;return L(function(g){if(g.g==1){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(Hc(a.contentType));b=a.contentType;a.width&&a.height&&a.width>1280&&a.height>720&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),c<24||c>30)&&(b+="; framerate="+a.framerate);d=a.transferFunction||"";switch(d){case "":case "srgb":break;case "pq":b+="; eotf=smpte2084";break;case "hlg":b+="; eotf=arib-std-b67";break;
default:return g.return(!1)}e=!1;f=Xv;return f.has(b)?(e=f.get(b),g.u(2)):H(g,cast.__platform__.canDisplayType(b),3)}g.g!=2&&(e=g.h,f.set(b,e));return g.return(e)})}yv.MediaCapabilities=Rv;Rv.install=Sv;Rv.originalMcap=null;var Xv=new Map;zv(Sv,-1);function Yv(){}function Zv(){var a=sb(),b=a.ya()==="WEBKIT"?a.oa():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(b<=12?($v(),aw()):b<=15&&$v());a=r(a.Ng());for(b=a.next();!b.done;b=a.next())bw(b.value);(window.MediaSource||window.ManagedMediaSource)&&cw();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&dw()}
function $v(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ka.apply(0,arguments));b.abort=function(){};return b}}function aw(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function cw(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return he(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return he(c)!="mp2t"&&b(c)}}}
function bw(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return ke(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return ke(d)!=a&&c(d)}}}
function dw(){var a=MediaSource.isTypeSupported;sb().gh()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(d<0)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});f>=0&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}yv.MediaSource=Yv;Yv.install=Zv;zv(Zv);function ew(){}var fw,gw,hw,iw,jw,kw;
function lw(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=mw){if(a===void 0?0:a)fw=!0,gw=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),hw=HTMLMediaElement.prototype.setMediaKeys,iw=window.MediaKeys,jw=window.MediaKeySystemAccess,kw=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=nw;window.MediaKeys=ow;window.MediaKeySystemAccess=
pw;navigator.requestMediaKeySystemAccess=qw;window.shakaMediaKeysPolyfill=mw;hf.clear();ui.clear()}}function qw(a,b){try{var c=new pw(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function nw(a){var b=this.mediaKeys;b&&b!=a&&rw(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?rw(a,this):Promise.resolve()}
function sw(a){a=Vb(a.initData);if(Zb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=dc(a.subarray(4),!0);a=ic(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Wb(a);this.dispatchEvent(b)}yv.PatchedMediaKeysApple=ew;
ew.uninstall=function(){window.shakaMediaKeysPolyfill==mw&&fw&&(fw=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",gw),HTMLMediaElement.prototype.setMediaKeys=hw,window.MediaKeys=iw,window.MediaKeySystemAccess=jw,navigator.requestMediaKeySystemAccess=kw,gw=kw=hw=jw=iw=null,window.shakaMediaKeysPolyfill="",hf.clear(),ui.clear())};ew.install=lw;
function pw(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if(c.persistentState=="required")b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(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=r(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
pw.prototype.createMediaKeys=function(){var a=new ow(this.keySystem);return Promise.resolve(a)};pw.prototype.getConfiguration=function(){return this.g};function ow(a){this.h=new WebKitMediaKeys(a);this.g=new mb}ow.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary")throw new TypeError("Session type "+a+" is unsupported on this platform.");return new tw(this.h,a)};ow.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function rw(a,b){a.g.ib();if(!b)return Promise.resolve();a.g.G(b,"webkitneedkey",sw);try{return jp(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}ow.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function tw(a){Ri.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new mb;this.sessionId="";this.expiration=NaN;this.closed=new Ji;this.keyStatuses=new uw;this.onkeystatuseschange=null}
na(tw,Ri);p=tw.prototype;
p.generateRequest=function(a,b){var c=this;this.h=new Ji;try{var d=this.l.createSession("video/mp4",Vb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.G(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",c.keyStatuses.cc()==void 0?"license-request":"license-renewal").set("message",Wb(e.message));e=new Qi("message",e);c.dispatchEvent(e)});this.j.G(d,"webkitkeyadded",function(){c.g&&(vw(c,"usable"),c.g.resolve(),c.g=null)});this.j.G(d,"webkitkeyerror",
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(c.h!=null)c.h.reject(e),c.h=null;else if(c.g!=null)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:vw(c,"output-not-allowed");break;default:vw(c,"internal-error")}});vw(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
p.update=function(a){this.g=new Ji;try{this.i.update(Vb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
function vw(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new Qi("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}function uw(){this.size=0;this.g=void 0}p=uw.prototype;p.cc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,ti.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=ti.value();return this.g&&Ub(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var mw="apple";
zv(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||lw())});function ww(){}function xw(){if(window.MediaKeys){var a=sb();MediaKeys.prototype.setServerCertificate&&a.rd()||(MediaKeys.prototype.setServerCertificate=yw)}}function yw(){return Promise.resolve(!1)}yv.PatchedMediaKeysCert=ww;ww.install=xw;zv(xw);function zw(){}
function Aw(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Bw="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Cw;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Dw;window.MediaKeys=Ew;window.MediaKeySystemAccess=Fw;window.shakaMediaKeysPolyfill=Gw}}
function Hw(a){var b=Bw;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Cw(a,b){try{var c=new Fw(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Dw(a){var b=this.mediaKeys;b&&b!=a&&Iw(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Iw(a,this);return Promise.resolve()}yv.PatchedMediaKeysWebkit=zw;zw.install=Aw;
function Fw(a,b){this.g=this.keySystem=a;var c=!1;a=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=r(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=r(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=r(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));f.persistentState=="required"&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if(a=="org.w3.clearkey"||a=="com.widevine.alpha")c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}Fw.prototype.createMediaKeys=function(){var a=new Ew(this.g);return Promise.resolve(a)};Fw.prototype.getConfiguration=function(){return this.h};function Ew(a){this.l=a;this.h=null;this.g=new mb;this.i=[];this.j=new Map}
function Iw(a,b){a.h=b;a.g.ib();var c=Bw;b&&(a.g.G(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Wb(d.initData);a.h.dispatchEvent(e)}),a.g.G(b,c+"keymessage",function(d){var e=Jw(a,d.sessionId);e&&(d=(new Map).set("messageType",e.keyStatuses.cc()==void 0?"licenserequest":"licenserenewal").set("message",d.message),d=new Qi("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.G(b,c+"keyadded",function(d){(d=Jw(a,d.sessionId))&&d.ready()}),
a.g.G(b,c+"keyerror",function(d){var e=Jw(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(d.systemCode==45&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Kw(e,"output-restricted"):f==1?Kw(e,"expired"):Kw(e,"internal-error"))}}))}
Ew.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary"&&a!="persistent-license")throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Lw(b,this.l,a);this.i.push(a);return a};Ew.prototype.setServerCertificate=function(){return Promise.resolve(!1)};Ew.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function Jw(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 Lw(a,b,c){Ri.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Ji;this.keyStatuses=new Mw;this.onkeystatuseschange=null}na(Lw,Ri);p=Lw.prototype;p.ready=function(){Kw(this,"usable");this.g&&this.g.resolve();this.g=null};
function Nw(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if(a.l=="persistent-license")if(c)var d=Vb(ic("LOAD_SESSION|"+c));else{var e=ic("PERSISTENT|");d=sc(e,b)}else d=Vb(b)}catch(g){return Promise.reject(g)}a.h=new Ji;var f=Hw("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if(g.name!="InvalidStateError")return a.h=null,Promise.reject(g);(new Ge(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).ka(.01)}return a.h}
function Ow(a,b,c){if(a.g)a.g.then(function(){return Ow(a,b,c)}).catch(function(){return Ow(a,b,c)});else{a.g=b;if(a.i=="webkit-org.w3.clearkey"){var d=cc(c);var e=JSON.parse(d);e.keys[0].kty!="oct"&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=pc(e.keys[0].k);e=pc(e.keys[0].kid)}else d=Vb(c),e=null;var f=Hw("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function Kw(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new Qi("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}p.generateRequest=function(a,b){return Nw(this,b,null)};p.load=function(a){return this.l=="persistent-license"?Nw(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Ji;Ow(this,b,a);return b};
p.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Hw("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function Mw(){this.size=0;this.g=void 0}p=Mw.prototype;p.cc=function(){return this.g};
p.forEach=function(a){this.g&&a(this.g,ti.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=ti.value();return this.g&&Ub(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var Bw="",Gw="webkit";zv(Aw);function Pw(){}function Qw(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Rw))}function Rw(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}yv.RandomUUID=Pw;Pw.install=Qw;zv(Qw);function Sw(){}function Tw(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Uw})}function Uw(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}yv.Symbol=Sw;Sw.install=Tw;zv(Tw);function Vw(){}function Ww(){for(var a=r([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),b=a.next();!b.done;b=a.next())b=b.value,b.prototype.indexOf||(b.prototype.indexOf=Xw),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=Yw),b.prototype.includes||(b.prototype.includes=Zw)}function Xw(a,b){return Array.prototype.indexOf.call(this,a,b)}function Yw(a,b){return Array.prototype.lastIndexOf.call(this,a,b)}
function Zw(a,b){return this.indexOf(a,b)!==-1}yv.TypedArray=Vw;Vw.install=Ww;zv(Ww);function $w(){}function ax(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}yv.VideoPlayPromise=$w;$w.install=ax;zv(ax);function bx(){}function cx(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||typeof ci().webkitDroppedFrameCount==="number")&&(a.getVideoPlaybackQuality=dx)}}function dx(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}yv.VideoPlaybackQuality=bx;bx.install=cx;zv(cx);function ex(){}function fx(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(b==3)a=gx;else if(b==6)a=hx;else{try{var c=!!gx(1,2,"")}catch(d){c=!1}c&&(a=gx)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function gx(a,b,c){return new window.TextTrackCue(a,b,c)}function hx(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}yv.VTTCue=ex;ex.install=fx;zv(fx);function ix(){this.g="UNKNOWN"}ix.prototype.parseInit=function(){};ix.prototype.setSequenceMode=function(){};ix.prototype.setManifestType=function(a){this.g=a};
ix.prototype.parseMedia=function(a,b,c,d){var e=cc(a);a=[];if(e=="")return a;var f=id(e,"tt",!0);if(!f)throw new T(2,2,2005,"Failed to parse TTML.");e=pd(f,"body")[0];if(!e)return[];var g=rd(f,jx,"frameRate"),h=rd(f,jx,"subFrameRate"),k=rd(f,jx,"frameRateMultiplier"),l=rd(f,jx,"tickRate"),m=rd(f,jx,"cellResolution"),n=f.attributes["xml:space"]||"default",q=rd(f,kx,"extent");if(n!="default"&&n!="preserve")throw new T(2,2,2005,"Invalid xml:space value: "+n);n=n=="default";g=new lx(g,h,k,l);m=mx(m);
h=pd(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return v!="\n"});k=pd(f,"style");f=pd(f,"region");l=[];for(var t=r(f),u=t.next();!u.done;u=t.next())(u=nx(this,u.value,k,q))&&l.push(u);if(nd(e,"p").length)throw new T(2,2,2001,"<p> can only be inside <div> in TTML");q=r(nd(e,"div"));for(t=q.next();!t.done;t=q.next())if(nd(t.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=ox(this,e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor=
"transparent"),a.push(b);return a};
function ox(a,b,c,d,e,f,g,h,k,l,m,n,q,t){var u=m;if(md(b)){if(!n)return null;var v={tagName:"span",children:[od(b)],attributes:{},parent:null}}else v=b;for(var w=null,y=r(px),x=y.next();!x.done&&!(w=qx(v,"backgroundImage",e,"#",x.value)[0]);x=y.next());y=null;x=rd(v,px,"backgroundImage");var B=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(x&&B.test(x)){y=parseInt(x.split(":").pop(),10)-1;if(y>=t.length)return null;y=t[y]}else q&&x&&!x.startsWith("#")&&(B=new Db(q),x=new Db(x),(x=B.resolve(x).toString())&&
(y=x));if(b.tagName=="p"||w||y)n=!0;b=n;x=(v.attributes["xml:space"]||(k?"default":"preserve"))=="default";B=v.children.every(md);k=[];if(!B)for(var C=r(v.children),I=C.next();!I.done;I=C.next())(I=ox(a,I.value,c,d,e,f,g,h,x,l,v,n,q,t))&&k.push(I);e=m!=null;q=od(v);q=v.children.length&&q&&/\S/.test(q);C=v.attributes.begin||v.attributes.end||v.attributes.dur;if(!(C||q||v.tagName=="br"||k.length!=0||e&&!x))return null;t=rx(v,d);q=t.start;for(t=t.end;u&&u.tagName&&u.tagName!="tt";)t=sx(u,d,q,t),q=t.start,
t=t.end,u=u.parent;q==null&&(q=0);q+=c.periodStart;t=t==null?Infinity:t+c.periodStart;a.g!=="HLS"&&(q=Math.max(q,c.segmentStart),t=Math.min(t,c.segmentEnd));if(!C&&k.length>0)for(q=Infinity,t=0,c=r(k),d=c.next();!d.done;d=c.next())d=d.value,q=Math.min(q,d.startTime),t=Math.max(t,d.endTime);if(v.tagName=="br")return a=new td(q,t,""),a.lineBreak=!0,a;c="";B&&(c=lc(od(v)||""),x&&(c=c.replace(/\s+/g," ")));c=new td(q,t,c);c.nestedCues=k;n||(c.isContainer=!0);l&&(c.cellResolution=l);l=qx(v,"region",g,
"")[0];if(v.attributes.region&&l&&l.attributes["xml:id"]){var E=l.attributes["xml:id"];c.region=h.filter(function(z){return z.id==E})[0]}h=l;m&&e&&!v.attributes.region&&!v.attributes.style&&(h=qx(m,"region",g,"")[0]);tx(a,c,v,h,w,y,f,b,k.length==0);return c}
function nx(a,b,c,d){var e=new Uc,f=b.attributes["xml:id"];if(!f)return null;e.id=f;f=null;d&&(f=ux.exec(d)||vx.exec(d));d=f?Number(f[1]):null;f=f?Number(f[2]):null;var g,h=wx(a,b,c,"extent");if(h){var k=(g=ux.exec(h))||vx.exec(h);k!=null&&(e.width=Number(k[1]),e.height=Number(k[2]),g||(d!=null&&(e.width=e.width*100/d),f!=null&&(e.height=e.height*100/f)),e.widthUnits=g||d!=null?Vc:0,e.heightUnits=g||f!=null?Vc:0)}if(a=wx(a,b,c,"origin"))if(k=(g=ux.exec(a))||vx.exec(a),k!=null)e.viewportAnchorX=Number(k[1]),
e.viewportAnchorY=Number(k[2]),g?h||(e.width=100-e.viewportAnchorX,e.widthUnits=Vc,e.height=100-e.viewportAnchorY,e.heightUnits=Vc):(f!=null&&(e.viewportAnchorY=e.viewportAnchorY*100/f),d!=null&&(e.viewportAnchorX=e.viewportAnchorX*100/d)),e.viewportAnchorUnits=g||d!=null?Vc:0;return e}function xx(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),b.length==4)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
function tx(a,b,c,d,e,f,g,h,k){h=h||k;yx(a,c,d,g,"direction",h)=="rtl"&&(b.direction="rtl");k=yx(a,c,d,g,"writingMode",h);k=="tb"||k=="tblr"?b.writingMode="vertical-lr":k=="tbrl"?b.writingMode="vertical-rl":k=="rltb"||k=="rl"?b.direction="rtl":k&&(b.direction=wd);(k=yx(a,c,d,g,"textAlign",!0))?(b.positionAlign=zx.get(k),b.lineAlign=Ax.get(k),b.textAlign=Rd[k.toUpperCase()]):b.textAlign=vd;if(k=yx(a,c,d,g,"displayAlign",!0))b.displayAlign=Sd[k.toUpperCase()];if(k=yx(a,c,d,g,"color",h))b.color=xx(k);
if(k=yx(a,c,d,g,"backgroundColor",h))b.backgroundColor=xx(k);if(k=yx(a,c,d,g,"border",h))b.border=k;if(k=yx(a,c,d,g,"fontFamily",h))switch(k){case "monospaceSerif":b.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":b.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":b.fontFamily="sans-serif";break;case "monospaceSansSerif":b.fontFamily="Consolas,monospace";break;case "proportionalSerif":b.fontFamily="serif";break;default:b.fontFamily=
k.split(",").filter(function(l){return l!="default"}).join(",")}(k=yx(a,c,d,g,"fontWeight",h))&&k=="bold"&&(b.fontWeight=Od);k=yx(a,c,d,g,"wrapOption",h);b.wrapLine=k&&k=="noWrap"?!1:!0;(k=yx(a,c,d,g,"lineHeight",h))&&k.match(Bx)&&(b.lineHeight=k);(k=yx(a,c,d,g,"fontSize",h))&&(k.match(Bx)||k.match(Cx))&&(b.fontSize=k);if(k=yx(a,c,d,g,"fontStyle",h))b.fontStyle=Ud[k.toUpperCase()];e?(f=e.attributes.imageType||e.attributes.imagetype,k=e.attributes.encoding,e=od(e).trim(),f=="PNG"&&k=="Base64"&&e&&
(b.backgroundImage="data:image/png;base64,"+e)):f&&(b.backgroundImage=f);if(e=yx(a,c,d,g,"textOutline",h))e=e.split(" "),e[0].match(Bx)?b.textStrokeColor=b.color:(b.textStrokeColor=xx(e[0]),e.shift()),e[0]&&e[0].match(Bx)?b.textStrokeWidth=e[0]:b.textStrokeColor="";(e=yx(a,c,d,g,"letterSpacing",h))&&e.match(Bx)&&(b.letterSpacing=e);(e=yx(a,c,d,g,"linePadding",h))&&e.match(Bx)&&(b.linePadding=e);if(e=yx(a,c,d,g,"opacity",h))b.opacity=parseFloat(e);(e=wx(a,d,g,"textDecoration"))&&Dx(b,e);(e=Ex(a,c,
g,"textDecoration"))&&Dx(b,e);if(e=yx(a,c,d,g,"textCombine",h))b.textCombineUpright=e;switch(yx(a,c,d,g,"ruby",h)){case "container":b.rubyTag="ruby";break;case "text":b.rubyTag="rt"}}
function Dx(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(Qd)||a.textDecoration.push(Qd);break;case "noUnderline":a.textDecoration.includes(Qd)&&ib(a.textDecoration,Qd);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ib(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ib(a.textDecoration,"overline")}}function yx(a,b,c,d,e,f){f=f===void 0?!0:f;return(b=Ex(a,b,d,e))?b:f?wx(a,c,d,e):null}function wx(a,b,c,d){if(!b)return null;var e=rd(b,kx,d);return e?e:Fx(a,b,c,d)}function Ex(a,b,c,d){var e=rd(b,kx,d);return e?e:Fx(a,b,c,d)}
function Fx(a,b,c,d){b=qx(b,"style",c,"");for(var e=null,f=0;f<b.length;f++){var g=qd(b[f],"urn:ebu:tt:style",d);g||(g=rd(b[f],kx,d));g||(g=Ex(a,b[f],c,d));g&&(e=g)}return e}function qx(a,b,c,d,e){var f=[];if(!a||c.length<1)return f;var g=a;for(a=null;!a&&!(a=e?qd(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(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 sx(a,b,c,d){a=rx(a,b);c==null?c=a.start:a.start!=null&&(c+=a.start);d==null?d=a.end:a.start!=null&&(d+=a.start);return{start:c,end:d}}function rx(a,b){var c=Gx(a.attributes.begin,b),d=Gx(a.attributes.end,b);a=Gx(a.attributes.dur,b);d==null&&a!=null&&(d=c+a);return{start:c,end:d}}
function Gx(a,b){var c=null;if(Hx.test(a)){a=Hx.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+d*60+c*3600}else if(Ix.test(a))c=Jx(Ix,a);else if(Kx.test(a))c=Jx(Kx,a);else if(Lx.test(a))a=Lx.exec(a),c=Number(a[1])/b.frameRate;else if(Mx.test(a))a=Mx.exec(a),c=Number(a[1])/b.g;else if(Nx.test(a))c=Jx(Nx,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
function Jx(a,b){a=a.exec(b);return a==null||a[0]==""?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+(Number(a[2])||0)*60+(Number(a[1])||0)*3600}function mx(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",ix);ix.prototype.parseMedia=ix.prototype.parseMedia;ix.prototype.setManifestType=ix.prototype.setManifestType;ix.prototype.setSequenceMode=ix.prototype.setSequenceMode;ix.prototype.parseInit=ix.prototype.parseInit;
function lx(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);this.g==0&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var ux=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Cx=/^(\d{1,4}(?:\.\d+)?|100)%$/,Bx=/^(\d+px|\d+em|\d*\.?\d+c)$/,vx=/^(\d+)px (\d+)px$/,Hx=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ix=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Kx=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,Lx=/^(\d*(?:\.\d*)?)f$/,Mx=/^(\d*(?:\.\d*)?)t$/,Nx=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Ax=(new Map).set("left",zd).set("center","center").set("right",
"end").set("start",zd).set("end","end"),zx=(new Map).set("left","line-left").set("center","center").set("right","line-right"),jx=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],kx=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],px=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];pe("application/ttml+xml",function(){return new ix});function Ox(){this.g=new ix}Ox.prototype.parseInit=function(a){var b=!1;(new Mg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).O("stsd",Tg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};Ox.prototype.setSequenceMode=function(a){this.g.setSequenceMode(a)};Ox.prototype.setManifestType=function(a){this.g.setManifestType(a)};
Ox.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new Mg).box("moof",Rg).box("traf",Rg).O("tfhd",function(y){e=Xg(y.reader,y.flags).bd}).O("trun",function(y){y=$g(y.reader,y.version,y.flags);y=r(y.Jf);for(var x=y.next();!x.done;x=y.next())h.push(x.value.sampleSize||e||0)}).O("subs",function(y){for(var x=y.reader,B=x.R(),C=-1,I=0;I<B;I++){var E=x.R();C+=E;E=x.sa();for(var z=[],D=0;D<E;D++)y.version==1?z.push(x.R()):z.push(x.sa()),x.U(),x.U(),x.R();g.set(C,z)}}).box("mdat",
Wg(function(y){f.push(y)},!1)).parse(a,!1);if(f.length==0)throw new T(2,2,2007);for(var k=sc.apply(mc,A(f)),l=0,m=0;m<h.length;m++){var n=Vb(k,l,h[m]);l+=h[m];var q=g.get(m);if(q&&q.length){n=Vb(n,0,q[0]);for(var t=[],u=q[0],v=1;v<q.length;v++){var w=Vb(a,u,q[v]);w=nc(w);t.push("data:image/png;base64,"+w);u+=q[v]}d=d.concat(this.g.parseMedia(n,b,c,t))}else d=d.concat(this.g.parseMedia(n,b,c,[]))}return d};S("shaka.text.Mp4TtmlParser",Ox);Ox.prototype.parseMedia=Ox.prototype.parseMedia;
Ox.prototype.setManifestType=Ox.prototype.setManifestType;Ox.prototype.setSequenceMode=Ox.prototype.setSequenceMode;Ox.prototype.parseInit=Ox.prototype.parseInit;pe('application/mp4; codecs="stpp"',function(){return new Ox});pe('application/mp4; codecs="stpp.ttml"',function(){return new Ox});pe('application/mp4; codecs="stpp.ttml.im1i"',function(){return new Ox});pe('application/mp4; codecs="stpp.ttml.im1t"',function(){return new Ox});pe('application/mp4; codecs="stpp.ttml.im2i"',function(){return new Ox});
pe('application/mp4; codecs="stpp.ttml.im2t"',function(){return new Ox});pe('application/mp4; codecs="stpp.ttml.etd1"',function(){return new Ox});pe('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new Ox});pe('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new Ox});pe('application/mp4; codecs="stpp.TTML.im1t"',function(){return new Ox});function Px(){this.g="UNKNOWN"}Px.prototype.parseInit=function(){};Px.prototype.setSequenceMode=function(){};Px.prototype.setManifestType=function(a){this.g=a};
Px.prototype.parseMedia=function(a,b){a=cc(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(this.g=="HLS")if(c[0].includes("X-TIMESTAMP-MAP")){a=c[0];var d=a.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);a=a.match(/MPEGTS:(\d+)/m);if(!d||!a)throw new T(2,2,2E3);d=(d=d[1])?ad(new Xc(d)):null;if(d==null)throw new T(2,2,2E3);a=Number(a[1]);for(var e=b.segmentStart-b.periodStart;e>=95443.7176888889;)e-=
95443.7176888889,a+=8589934592;a=b.periodStart+a/9E4-d}else b.periodStart&&b.vttOffset==b.periodStart&&(a=0);b=[];d=r(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Xc(e);var f=new Uc;$c(e);Yc(e);for(var g=$c(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");Yc(e);g=$c(e)}b.push(f)}d=new Map;Hd(d);e=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((f.length!=1||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&f[0]=="STYLE"){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),g!=-1&&(h[g].push(f[k]),
f[k].includes("}")&&(g=-1));h=r(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 td(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var t=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=t;break;case "color":m=!0;l.color=t;break;case "font-family":m=
!0;l.fontFamily=t;break;case "font-size":m=!0;l.fontSize=t;break;case "font-weight":if(parseInt(t,10)>=700||t=="bold")m=!0,l.fontWeight=Od;break;case "font-style":switch(t){case "normal":m=!0;l.fontStyle=Cd;break;case "italic":m=!0;l.fontStyle=Pd;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(t);break;case "text-combine-upright":m=!0;l.textCombineUpright=t;break;case "text-shadow":m=!0;l.textShadow=t;break;case "white-space":m=!0,l.wrapLine=t!="noWrap"}}}m&&
d.set(g,l)}}l=f;m=a;if(l.length==1&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Xc(l[0]),g=ad(h),n=Zc(h,/[ \t]+--\x3e[ \t]+/g),k=ad(h),g==null||n==null||k==null)cb("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new td(g,k,m);Yc(h);for(g=$c(h);g;)Qx(l,g,b),Yc(h),
g=$c(h);Gd(l,d);f!=null&&(l.id=f);f=l}f&&e.push(f)}return e};
function Qx(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],b=="middle"?a.textAlign=vd:a.textAlign=Rd[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode=d[1]=="lr"?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b=="line-left"||b=="start"?"line-left":b=="line-right"||
b=="end"?"line-right":b=="center"||b=="middle"?"center":ud);else if(d=/^region:(.*)$/.exec(b)){if(b=Rx(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=Td[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=yd,a.line=Number(c[1]),c[2]&&(a.lineAlign=Td[c[2].toUpperCase()])}function Rx(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
S("shaka.text.VttTextParser",Px);Px.prototype.parseMedia=Px.prototype.parseMedia;Px.prototype.setManifestType=Px.prototype.setManifestType;Px.prototype.setSequenceMode=Px.prototype.setSequenceMode;Px.prototype.parseInit=Px.prototype.parseInit;pe("text/vtt",function(){return new Px});pe('text/vtt; codecs="vtt"',function(){return new Px});pe('text/vtt; codecs="wvtt"',function(){return new Px});function Sx(){this.g=null}Sx.prototype.parseInit=function(a){var b=this,c=!1;(new Mg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).O("mdhd",function(d){d=Zg(d.reader,d.version);b.g=d.timescale}).box("minf",Rg).box("stbl",Rg).O("stsd",Tg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};Sx.prototype.setSequenceMode=function(){};Sx.prototype.setManifestType=function(){};
Sx.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).O("tfdt",function(B){g=!0;c=Yg(B.reader,B.version).baseMediaDecodeTime}).O("tfhd",function(B){l=Xg(B.reader,B.flags).ad}).O("trun",function(B){h=!0;d=$g(B.reader,B.version,B.flags).Jf}).box("mdat",Wg(function(B){k=!0;e=B},!1)).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Dg(e,0),n=r(d),q=n.next();!q.done;q=
n.next()){q=q.value;var t=q.Kf||l,u=q.ue?c+q.ue:a;a=u+(t||0);var v=0;do{var w=m.R();v+=w;var y=m.R(),x=null;Qg(y)=="vttc"?w>8&&(x=m.Ab(w-8,!1)):m.skip(w-8);t&&x&&(w=Tx(x,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(Je)};function Tx(a,b,c){var d,e,f;(new Mg).box("payl",Wg(function(g){d=cc(g)},!1)).box("iden",Wg(function(g){e=cc(g)},!1)).box("sttg",Wg(function(g){f=cc(g)},!1)).parse(a);return d?Ux(d,e,f,b,c):null}
function Ux(a,b,c,d,e){a=new td(d,e,a);Gd(a);b&&(a.id=b);if(c)for(b=new Xc(c),c=$c(b);c;)Qx(a,c,[]),Yc(b),c=$c(b);return a}S("shaka.text.Mp4VttParser",Sx);Sx.prototype.parseMedia=Sx.prototype.parseMedia;Sx.prototype.setManifestType=Sx.prototype.setManifestType;Sx.prototype.setSequenceMode=Sx.prototype.setSequenceMode;Sx.prototype.parseInit=Sx.prototype.parseInit;pe('application/mp4; codecs="wvtt"',function(){return new Sx});function Vx(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,a>0)?{hd:c,ha:a}:null}function Wx(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
function Xx(a,b){if(b+1<a.length&&a[b]===255&&(a[b+1]&246)===240){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&&a[b]===255&&(a[b+1]&246)===240}return!1}
function Yx(a,b){switch(a){case "mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===5)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(b===6)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(b===1)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(b===2||b===3)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 Zx(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=Zx.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/aac"?Hc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(me(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Vb(a),f=Ch(e),g=f.length;g<e.length&&!Xx(e,g);g++);a=c.endTime*1E3;f=Bh(f);f.length&&c&&(f=f.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(a=f.data);f=Wx(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=Vx(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.hd+k.ha;g+l<=e.length&&
h.push({data:e.subarray(g+k.hd,g+l),size:k.ha,duration:1024,eb:0,flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:2,hb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,rb:[],Aa:new Uint8Array([]),Ja:new Uint8Array([]),Oa:0,Qa:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,jb:h},stream:b};d=new nn([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=on(d),this.g.set(c,b));c=this.i!==b;d=Jn(d);this.i=b;this.h++;
return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.AacTransmuxer",Zx);Zx.prototype.transmux=Zx.prototype.transmux;Zx.prototype.getOriginalMimeType=Zx.prototype.getOriginalMimeType;Zx.prototype.convertCodecs=Zx.prototype.convertCodecs;Zx.prototype.isSupported=Zx.prototype.isSupported;Zx.prototype.destroy=Zx.prototype.destroy;Wd("audio/aac",function(){return new Zx("audio/aac")},be);function $x(a,b){if(b+8>a.length||a[b]!==11||a[b+1]!==119)return null;var c=a[b+4]>>6;if(c>=3)return null;var d=a[b+4]&63,e=[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][d*3+c]*2;if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;f===2?g+=2:(f&1&&f!==1&&(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,Aa:a,ha:e}}
function ay(a,b){if(a[b]===11&&a[b+1]===119){var c=0,d=5;b+=d;for(var e,f;d>0;){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(c<16)return!0}return!1};function by(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=by.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ac3"?Hc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ac3"?sb().pd()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){a=Vb(a);for(var e=Ch(a),f=e.length;f<a.length&&!ay(a,f);f++);var g=c.endTime*1E3;e=Bh(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=$x(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.Aa;k.push({data:a.subarray(f,f+l.ha),size:l.ha,duration:1536,
eb:0,flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:2,hb:0}});f+=l.ha}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,rb:[],Aa:h,Ja:new Uint8Array([]),Oa:0,Qa:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,jb:k},stream:b};d=new nn([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=on(d),this.g.set(c,b));c=this.i!==b;d=Jn(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.Ac3Transmuxer",by);
by.prototype.transmux=by.prototype.transmux;by.prototype.getOriginalMimeType=by.prototype.getOriginalMimeType;by.prototype.convertCodecs=by.prototype.convertCodecs;by.prototype.isSupported=by.prototype.isSupported;by.prototype.destroy=by.prototype.destroy;Wd("audio/ac3",function(){return new by("audio/ac3")},be);function cy(a,b){if(b+8>a.length||(a[b]<<8|a[b+1]<<0)!==2935)return null;var c=new mh(a.subarray(b+2));oh(c,2);oh(c,3);var d=ph(c,11)+1<<1,e=ph(c,2);if(e==3){e=ph(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=ph(c,2);var g=ph(c,3),h=ph(c,1);c=ph(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/([1,2,3,6][f]*16));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,Aa:a,ha:d}};function dy(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=dy.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ec3"?Hc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){a=Vb(a);for(var e=Ch(a),f=e.length;f<a.length&&(a[f]<<8|a[f+1]<<0)!==2935;f++);var g=c.endTime*1E3;e=Bh(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=cy(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.Aa;k.push({data:a.subarray(f,f+l.ha),
size:l.ha,duration:1536,eb:0,flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:2,hb:0}});f+=l.ha}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:e,duration:d,rb:[],Aa:h,Ja:new Uint8Array([]),Oa:0,Qa:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,jb:k},stream:b};d=new nn([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=on(d),this.g.set(c,b));c=this.i!==b;d=Jn(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};
S("shaka.transmuxer.Ec3Transmuxer",dy);dy.prototype.transmux=dy.prototype.transmux;dy.prototype.getOriginalMimeType=dy.prototype.getOriginalMimeType;dy.prototype.convertCodecs=dy.prototype.convertCodecs;dy.prototype.isSupported=dy.prototype.isSupported;dy.prototype.destroy=dy.prototype.destroy;Wd("audio/ec3",function(){return new dy("audio/ec3")},be);function ey(a){if(!a.length)return null;var b=a.find(function(v){return v.type==7});a=a.find(function(v){return v.type==8});if(!b||!a)return null;var c=new mh(b.data),d=th(c);th(c);th(c);rh(c);if(fy.includes(d)&&(d=U(c),d===3&&oh(c,1),rh(c),rh(c),oh(c,1),V(c))){d=d!==3?8:12;for(var e=0;e<d;e++)V(c)&&(e<6?uh(c,16):uh(c,64))}rh(c);d=U(c);if(d===0)U(c);else if(d===1)for(oh(c,1),rh(c),rh(c),d=U(c),e=0;e<d;e++)rh(c);rh(c);oh(c,1);var f=U(c),g=U(c),h=ph(c,1);h===0&&oh(c,1);oh(c,1);var k=0,l=0,m=0,n=0;V(c)&&
(k=U(c),l=U(c),m=U(c),n=U(c));e=d=1;if(V(c)&&V(c)){var q=th(c),t=[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];q>0&&q<=16?(d=t[q-1],e=u[q-1]):q===255&&(d=ph(c,16),e=ph(c,16))}c=(2-h)*(g+1)*16-m*2-n*2;f=(f+1)*16-k*2-l*2;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,A(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,A(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
225].concat(k,[1],b));return{height:c,width:f,Ja:a,Oa:d,Qa:e}}
function gy(a){function b(u){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:u.pts,dts:u.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var u=[],v=r(e.nalus),w=v.next();!w.done;w=v.next()){w=w.value;var y=w.fullData.byteLength,x=new Uint8Array(4);x[0]=y>>24&255;x[1]=y>>16&255;x[2]=y>>8&255;x[3]=y&255;u.push(x);u.push(w.fullData)}e.data=sc.apply(mc,A(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;g<a.length;g++){var h=a[g],k=h.nalus,l=!1;e&&k.length&&!f&&(c(),b(h));k=r(h.nalus);for(var m=
k.next();!m.done;m=k.next()){m=m.value;var n=!1;switch(m.type){case 1:var q=!1;n=!0;var t=m.data;l&&t.length>4&&(t=vh(new mh(t)),t===2||t===4||t===7||t===9)&&(q=!0);q&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=q;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
return d}var fy=[100,110,122,244,44,83,86,118,128,138,139,134];function hy(a){if(!a.length)return null;var b=a.find(function(g){return g.type==32}),c=a.find(function(g){return g.type==33}),d=a.find(function(g){return g.type==34});if(!b||!c||!d)return null;var e=iy(b.fullData);a=jy(c.fullData);var f=ky(d.fullData);b=ly(b.fullData,c.fullData,d.fullData,{yf:e.yf,Rf:e.Rf,kf:a.kf,lf:a.lf,cf:a.cf,jf:a.jf,df:a.df,ef:a.ef,gf:a.gf,hf:a.hf,We:a.We,Xe:a.Xe,Ye:a.Ye,Ze:a.Ze,$e:a.$e,bf:a.bf,ke:a.ke,Ne:a.Ne,Me:a.Me,Le:a.Le,Af:f.Af,Ve:a.Ve,Ue:a.Ue});return{height:a.height,width:a.width,
Ja:b,Oa:a.aj,Qa:a.$i}}function iy(a){var b=new mh(a,!0);th(b);th(b);ph(b,4);ph(b,2);ph(b,6);a=ph(b,3);b=V(b);return{yf:a+1,Rf:b}}
function jy(a){a=new mh(a,!0);th(a);th(a);var b=0,c=0,d=0,e=0;ph(a,4);var f=ph(a,3);V(a);for(var g=ph(a,2),h=ph(a,1),k=ph(a,5),l=th(a),m=th(a),n=th(a),q=th(a),t=th(a),u=th(a),v=th(a),w=th(a),y=th(a),x=th(a),B=th(a),C=[],I=[],E=0;E<f;E++)C.push(V(a)),I.push(V(a));if(f>0)for(E=f;E<8;E++)ph(a,2);for(E=0;E<f;E++)C[E]&&ph(a,88),I[E]&&th(a);U(a);C=U(a);C==3&&ph(a,1);I=U(a);E=U(a);V(a)&&(b+=U(a),c+=U(a),d+=U(a),e+=U(a));var z=U(a),D=U(a),G=U(a);if(V(a))for(var F=0;F<=f;F++)U(a),U(a),U(a);else U(a),U(a),
U(a);U(a);U(a);U(a);U(a);U(a);U(a);if(V(a)&&V(a))for(F=0;F<4;F++)for(var J=0;J<(F===3?2:6);J++)if(V(a)){var M=Math.min(64,1<<4+(F<<1));F>1&&sh(a);for(var O=0;O<M;O++)sh(a)}else U(a);V(a);V(a);V(a)&&(th(a),U(a),U(a),V(a));F=U(a);for(M=J=0;M<F;M++)if(O=!1,M!==0&&(O=V(a)),O){M===F&&U(a);V(a);U(a);for(var R=O=0;R<=J;R++){var P=V(a),N=!1;P||(N=V(a));(P||N)&&O++}J=O}else{R=U(a);O=U(a);J=R+O;for(P=0;P<R;P++)U(a),V(a);for(R=0;R<O;R++)U(a),V(a)}if(V(a))for(F=U(a),J=0;J<F;J++){for(M=0;M<G+4;M++)ph(a,1);ph(a,
1)}F=G=1;J=!0;M=1;R=O=0;V(a);V(a);if(V(a)){if(V(a)){P=th(a);N=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var Q=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];P>0&&P<=16?(G=N[P-1],F=Q[P-1]):P===255&&(G=ph(a,16),F=ph(a,16))}V(a)&&V(a);V(a)&&(ph(a,3),V(a),V(a)&&(th(a),th(a),th(a)));V(a)&&(U(a),U(a));V(a);V(a);V(a);if(P=V(a))rh(a),rh(a),rh(a),rh(a);if(V(a)&&(M=ph(a,32),O=ph(a,32),V(a)&&U(a),V(a))){Q=!1;P=V(a);N=V(a);if(P||N){if(Q=V(a))th(a),ph(a,5),V(a),ph(a,5);ph(a,4);ph(a,4);Q&&ph(a,4);ph(a,5);ph(a,
5);ph(a,5)}for(var Z=0;Z<=f;Z++){J=V(a);var sa=!0,da=1;J||(sa=V(a));var Oa=!1;sa?U(a):Oa=V(a);Oa||(da=U(a)+1);if(P){for(sa=0;sa<da;sa++)U(a),U(a),Q&&(U(a),U(a));V(a)}if(N){for(sa=0;sa<da;sa++)U(a),U(a),Q&&(U(a),U(a));V(a)}}}V(a)&&(V(a),V(a),V(a),R=U(a),U(a),U(a),U(a),U(a))}return{cf:B,kf:g,lf:h,jf:k,df:l,ef:m,gf:n,hf:q,We:t,Xe:u,Ye:v,Ze:w,$e:y,bf:x,ke:R,Ne:C,Me:z,Le:D,width:I-(b+c)*(C===1||C===2?2:1),height:E-(d+e)*(C===1?2:1),aj:G,$i:F,Ve:O/M,Ue:J}}
function ky(a){var b=new mh(a,!0);th(b);th(b);U(b);U(b);V(b);V(b);ph(b,3);V(b);V(b);U(b);U(b);sh(b);V(b);V(b);V(b)&&U(b);sh(b);sh(b);V(b);V(b);V(b);V(b);a=V(b);b=V(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Af:c}}
function ly(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.kf&3)<<6|(d.lf?1:0)<<5|d.jf&31;e[2]=d.df;e[3]=d.ef;e[4]=d.gf;e[5]=d.hf;e[6]=d.We;e[7]=d.Xe;e[8]=d.Ye;e[9]=d.Ze;e[10]=d.$e;e[11]=d.bf;e[12]=d.cf;e[13]=240|(d.ke&3840)>>8;e[14]=d.ke&255;e[15]=252|d.Af&3;e[16]=252|d.Ne&3;e[17]=248|d.Me&7;e[18]=248|d.Le&7;e[19]=0;e[20]=parseInt(d.Ve,10);e[21]=((d.Ue?1:0)&3)<<6|(d.yf&7)<<3|(d.Rf?1:0)<<2|3;e[22]=3;a=[a,b,c];b=23;c=a.length-1;for(d=0;d<a.length;d+=
1)e.set(new Uint8Array([32+d|(d===c?128:0),0,1]),b),b+=3,e.set(new Uint8Array([a[d].byteLength>>8,a[d].byteLength&255]),b),b+=2,e.set(a[d],b),b+=a[d].byteLength;return e};function my(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(c!==1&&e!==0&&e!==15&&f!==3){var g=a[b+3]>>6;e=ny[(c===3?3-d:d===3?3:4)*14+e-1]*1E3;f=oy[(c===3?0:c===2?1:2)*3+f];c=py[c][d];var h=qy[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)&&l<=87&&d===2&&e>=224E3&&g===0&&(a[b+3]|=128);return{sampleRate:f,channelCount:g===3?1:2,ha:k,Zi:c*8*h}}return null}
function ry(a,b){return a[b]===255&&(a[b+1]&224)===224&&(a[b+1]&6)!==0}function sy(a,b){if(b+1<a.length&&ry(a,b)){var c=my(a,b),d=4;c&&c.ha&&(d=c.ha);b+=d;return b===a.length||b+1<a.length&&ry(a,b)}return!1}
var ny=[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],oy=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],py=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],qy=[0,1,1,4];function ty(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=ty.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/mpeg"?Hc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Vb(a),f=Ch(e).length;f<e.length&&!sy(e,f);f++);var g;for(a=[];f<e.length;){var h=my(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.ha<=e.length&&a.push({data:e.subarray(f,f+h.ha),size:h.ha,duration:1152,eb:0,flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:2,hb:0}});f+=h.ha}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=g.Zi*9E4/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:g.sampleRate,
duration:d,rb:[],Aa:new Uint8Array([]),Ja:new Uint8Array([]),Oa:0,Qa:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,jb:a},stream:b};d=new nn([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=on(d),this.g.set(c,b));c=this.i!==b;d=Jn(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};S("shaka.transmuxer.Mp3Transmuxer",ty);ty.prototype.transmux=ty.prototype.transmux;ty.prototype.getOriginalMimeType=ty.prototype.getOriginalMimeType;ty.prototype.convertCodecs=ty.prototype.convertCodecs;
ty.prototype.isSupported=ty.prototype.isSupported;ty.prototype.destroy=ty.prototype.destroy;Wd("audio/mpeg",function(){return new ty("audio/mpeg")},be);function uy(a){this.h=a;this.g=null}p=uy.prototype;p.destroy=function(){};p.isSupported=function(a){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var b=me(a).split(","),c=yc("audio",b);b=yc("video",b);return!c||b||ie(c)!="mp3"?!1:Hc(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Dh;this.g.we(c.i);a=Vb(a);a=this.g.parse(a);if(a.cd().audio!="mp3"||e!="audio")return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=r(a.fb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=my(a,b))?(b+d.ha<=a.length&&(c=sc(c,a.subarray(b,b+d.ha))),b+=d.ha):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",uy);uy.prototype.transmux=uy.prototype.transmux;
uy.prototype.getOriginalMimeType=uy.prototype.getOriginalMimeType;uy.prototype.convertCodecs=uy.prototype.convertCodecs;uy.prototype.isSupported=uy.prototype.isSupported;uy.prototype.destroy=uy.prototype.destroy;Wd("video/mp2t",function(){return new uy("video/mp2t")},ae);function vy(a){this.m=a;this.g=0;this.j=new Map;this.l=this.i=this.h=null}p=vy.prototype;p.destroy=function(){this.j.clear();this.i&&this.i.destroy()};
p.isSupported=function(a,b){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=me(c).split(",");c=yc("audio",d);d=yc("video",d);if(c&&(c=ie(c),!wy.includes(c))||d&&(c=ie(d),!xy.includes(c)))return!1;if(b)return Hc(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Hc(b)||Hc(a)};
p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?(b=me(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return lf(c,"audio/mp4")}).map(mf).join(","),a=="audio"?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.getOriginalMimeType=function(){return this.m};
p.transmux=function(a,b,c,d,e){var f=Vb(a);if(e=="audio"&&!Lh(f)){for(var g=Ch(f),h=g.length;h<f.length;h++)if(sy(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(Xx(f,h))return this.i||(this.i=new Zx("audio/aac")),this.i.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.h?this.h.clearData():this.h=new Dh;this.h.we(c.i);var k=this.h.parse(f),l=[],m=k.cd();try{var n=null;if(e=="video"){switch(m.video){case "avc":var q=[],t=null,
u=k.Kc(),v=gy(u);if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var y=v[w];t==null&&(t=y.dts);var x=void 0;x=w+1<v.length?(v[w+1].dts||0)-(y.dts||0):v.length>1?(y.dts||0)-(v[w-1].dts||0):(c.endTime-c.startTime)*9E4;q.push({data:y.data,size:y.data.byteLength,duration:x,eb:Math.round((y.pts||0)-(y.dts||0)),flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:y.isKeyframe?2:1,hb:y.isKeyframe?0:1}})}for(var B=[],C=r(u),I=C.next();!I.done;I=C.next())B.push.apply(B,A(I.value.nalus));var E=ey(B);
if(!E||t==null)throw new T(2,3,3018,c?c.M()[0]:null);b.height=E.height;b.width=E.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:9E4,duration:d,rb:[],Aa:new Uint8Array([]),Ja:E.Ja,Oa:E.Oa,Qa:E.Qa,data:{sequenceNumber:this.g,baseMediaDecodeTime:t,jb:q},stream:b};break;case "hvc":var z=[],D=null,G=[],F=k.Kc();if(!F.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var J=0;J<F.length;J++){var M=F[J],O=M.nalus;G.push.apply(G,A(O));for(var R=!1,P=[],N=!1,
Q=r(O),Z=Q.next();!Z.done;Z=Q.next()){var sa=Z.value;switch(sa.type){case 1:case 0:var da=N=!0;break;case 19:case 20:case 21:R=da=N=!0;break;case 32:da=!0;break;case 33:da=!0;break;case 34:da=!0;break;case 35:N=da=!0;break;case 39:case 40:da=!0;break;default:da=!1}if(N&&da){var Oa=sa.fullData.byteLength,Ia=new Uint8Array(4);Ia[0]=Oa>>24&255;Ia[1]=Oa>>16&255;Ia[2]=Oa>>8&255;Ia[3]=Oa&255;P.push(Ia);P.push(sa.fullData)}}var wa=P.length?{data:sc.apply(mc,A(P)),isKeyframe:R}:null;if(wa){D==null&&M.dts!=
null&&(D=M.dts);var Pa=void 0;Pa=J+1<F.length?(F[J+1].dts||0)-(M.dts||0):F.length>1?(M.dts||0)-(F[J-1].dts||0):(c.endTime-c.startTime)*9E4;z.push({data:wa.data,size:wa.data.byteLength,duration:Pa,eb:Math.round((M.pts||0)-(M.dts||0)),flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:wa.isKeyframe?2:1,hb:wa.isKeyframe?0:1}})}}var ha=hy(G);if(!ha||D==null)throw new T(2,3,3018,c?c.M()[0]:null);b.height=ha.height;b.width=ha.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:9E4,
duration:d,rb:[],Aa:new Uint8Array([]),Ja:ha.Ja,Oa:ha.Oa,Qa:ha.Qa,data:{sequenceNumber:this.g,baseMediaDecodeTime:D,jb:z},stream:b}}n&&(l.push(n),n=null)}if(e=="audio"){switch(m.audio){case "aac":for(var Qa=[],qa,La=null,Da=null,Ra=null,Sa=r(k.fb()),Ya=Sa.next();!Ya.done;Ya=Sa.next()){var ya=Ya.value,fc=ya.data;if(fc){var bc=0;if(Da==-1&&Ra)fc=sc(Ra,ya.data),Da=null;else if(Da!=null&&Ra){bc=Math.max(0,Da);var Ur=sc(Ra,fc.subarray(0,bc));Qa.push({data:Ur,size:Ur.byteLength,duration:1024,eb:0,flags:{gb:0,
Za:0,Xa:0,Ta:0,Ua:2,hb:0}});Da=Ra=null}qa=Wx(fc,bc);if(!qa)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=qa.sampleRate;b.channelsCount=qa.channelCount;La==null&&ya.pts!==null&&(La=ya.pts);for(;bc<fc.length;){var ue=Vx(fc,bc);if(!ue){Ra=fc.subarray(bc,fc.length);Da=-1;break}var Lf=ue.hd+ue.ha;Da=Math.max(0,bc+Lf-fc.length);Da!=0?Ra=fc.subarray(bc+ue.hd,bc+Lf):bc+Lf<=fc.length&&Qa.push({data:fc.subarray(bc+ue.hd,bc+Lf),size:ue.ha,duration:1024,eb:0,flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:2,hb:0}});
bc+=Lf}}}if(!qa||La==null){La=c.startTime*9E4;var rl=yc("audio",b.codecs.split(","));if(!rl||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);qa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:rl};var sl=Yx(rl,b.channelsCount);if(!sl)throw new T(2,3,3018,c?c.M()[0]:null);for(var Yy=La+(c.endTime-c.startTime)*9E4,Vr=La;Vr<Yy;)Qa.push({data:sl,size:sl.byteLength,duration:1024,eb:0,flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:2,hb:0}}),Vr+=1024/qa.sampleRate*9E4}var Wr=
qa.sampleRate,Zy=La/9E4*Wr;n={id:b.id,type:"audio",codecs:qa.codec,encrypted:b.encrypted&&b.drmInfos.length>0,timescale:Wr,duration:d,rb:[],Aa:new Uint8Array([]),Ja:new Uint8Array([]),Oa:0,Qa:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:Zy,jb:Qa},stream:b};break;case "ac3":for(var Xr=[],Vh=0,tl=new Uint8Array([]),Wh=null,Yr=r(k.fb()),ul=Yr.next();!ul.done;ul=Yr.next()){var vl=ul.value,wl=vl.data;Wh==null&&vl.pts!==null&&(Wh=vl.pts);for(var ve=0;ve<wl.length;){var dd=$x(wl,ve);dd?(b.audioSamplingRate=
dd.sampleRate,b.channelsCount=dd.channelCount,Vh=dd.sampleRate,tl=dd.Aa,Xr.push({data:wl.subarray(ve,ve+dd.ha),size:dd.ha,duration:1536,eb:0,flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:2,hb:0}}),ve+=dd.ha):ve++}}if(Vh==0||tl.byteLength==0||Wh==null)throw new T(2,3,3018,c?c.M()[0]:null);var $y=Wh/9E4*Vh;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:Vh,duration:d,rb:[],Aa:tl,Ja:new Uint8Array([]),Oa:0,Qa:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:$y,jb:Xr},stream:b};
break;case "ec3":for(var Zr=[],Xh=0,xl=new Uint8Array([]),Yh=null,$r=r(k.fb()),yl=$r.next();!yl.done;yl=$r.next()){var zl=yl.value,Al=zl.data;Yh==null&&zl.pts!==null&&(Yh=zl.pts);for(var we=0;we<Al.length;){var ed=cy(Al,we);ed?(b.audioSamplingRate=ed.sampleRate,b.channelsCount=ed.channelCount,Xh=ed.sampleRate,xl=ed.Aa,Zr.push({data:Al.subarray(we,we+ed.ha),size:ed.ha,duration:1536,eb:0,flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:2,hb:0}}),we+=ed.ha):we++}}if(Xh==0||xl.byteLength==0||Yh==null)throw new T(2,3,3018,
c?c.M()[0]:null);var az=Yh/9E4*Xh;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:Xh,duration:d,rb:[],Aa:xl,Ja:new Uint8Array([]),Oa:0,Qa:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:az,jb:Zr},stream:b};break;case "mp3":for(var as=[],Zh,$h=null,bs=r(k.fb()),Bl=bs.next();!Bl.done;Bl=bs.next()){var Cl=Bl.value,Mf=Cl.data;if(Mf){$h==null&&Cl.pts!==null&&($h=Cl.pts);for(var Fd=0;Fd<Mf.length;){var xe=my(Mf,Fd);xe?(Zh||(Zh=xe),Fd+xe.ha<=Mf.length&&as.push({data:Mf.subarray(Fd,
Fd+xe.ha),size:xe.ha,duration:1152,eb:0,flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:2,hb:0}}),Fd+=xe.ha):Fd++}}}if(!Zh||$h==null)throw new T(2,3,3018,c?c.M()[0]:null);var cs=Zh.sampleRate,bz=$h/9E4*cs;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:cs,duration:d,rb:[],Aa:new Uint8Array([]),Ja:new Uint8Array([]),Oa:0,Qa:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:bz,jb:as},stream:b};break;case "opus":var ds=[],ai=null,vc=k.H;if(!vc)throw new T(2,3,3018,c?c.M()[0]:
null);var vb=[];switch(vc.xh){case 1:case 2:vb=[0];break;case 0:vb=[255,1,1,0,1];break;case 128:vb=[255,2,0,0,1];break;case 3:vb=[1,2,1,0,2,1];break;case 4:vb=[1,2,2,0,1,2,3];break;case 5:vb=[1,3,2,0,4,1,2,3];break;case 6:vb=[1,4,2,0,4,1,2,3,5];break;case 7:vb=[1,4,2,0,4,1,2,3,5,6];break;case 8:vb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:vb=[1,1,2,0,1];break;case 131:vb=[1,1,3,0,1,2];break;case 132:vb=[1,1,4,0,1,2,3];break;case 133:vb=[1,1,5,0,1,2,3,4];break;case 134:vb=[1,1,6,0,1,2,3,4,5];break;case 135:vb=
[1,1,7,0,1,2,3,4,5,6];break;case 136:vb=[1,1,8,0,1,2,3,4,5,6,7]}var es=new Uint8Array([0,vc.channelCount,0,0,vc.sampleRate>>>24&255,vc.sampleRate>>>17&255,vc.sampleRate>>>8&255,vc.sampleRate>>>0&255,0,0].concat(A(vb)));for(var fs=vc.sampleRate,gs=r(k.fb()),Dl=gs.next();!Dl.done;Dl=gs.next()){var El=Dl.value,ye=El.data;ai==null&&El.pts!==null&&(ai=El.pts);for(var Nf=0;Nf<ye.length;){for(var cz=(ye[Nf+1]&16)!==0,dz=(ye[Nf+1]&8)!==0,Ic=Nf+2,bi=0;ye[Ic]===255;)bi+=255,Ic+=1;bi+=ye[Ic];Ic+=1;Ic+=cz?2:
0;Ic+=dz?2:0;var hs=ye.slice(Ic,Ic+bi);ds.push({data:hs,size:hs.byteLength,duration:960,eb:0,flags:{gb:0,Za:0,Xa:0,Ta:0,Ua:2,hb:0}});Nf=Ic+bi}}if(es.byteLength==0||ai==null)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=vc.sampleRate;b.channelsCount=vc.channelCount;var ez=ai/9E4*fs;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&b.drmInfos.length>0,timescale:fs,duration:d,rb:[],Aa:es,Ja:new Uint8Array([]),Oa:0,Qa:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:ez,jb:ds},
stream:b}}n&&(l.push(n),n=null)}}catch(Fl){return Fl&&Fl.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(Fl)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var is=new nn(l),Gl=b.id+"_"+c.i;if(this.j.has(Gl))var Of=this.j.get(Gl);else Of=on(is),this.j.set(Gl,Of);var fz=this.l!==Of,gz=Jn(is);this.l=Of;this.g++;return Promise.resolve({data:gz,init:fz?Of:null})};S("shaka.transmuxer.TsTransmuxer",vy);vy.prototype.transmux=vy.prototype.transmux;
vy.prototype.getOriginalMimeType=vy.prototype.getOriginalMimeType;vy.prototype.convertCodecs=vy.prototype.convertCodecs;vy.prototype.isSupported=vy.prototype.isSupported;vy.prototype.destroy=vy.prototype.destroy;var wy=["aac","ac-3","ec-3","mp3","opus"],xy=["avc","hevc"];Wd("video/mp2t",function(){return new vy("video/mp2t")},$d);function yy(){}na(yy,Vj);S("shaka.util.FairPlayUtils",yy);function zy(){this.m=[];this.h=[];this.g=[];this.j=[];this.i=[];this.o=!1;this.l=new Set}p=zy.prototype;p.release=function(){for(var a=r(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.m=[];this.o=!1;this.l.clear()};p.ti=function(){return this.m};p.ni=function(){return this.j.slice()};p.Sh=function(){return this.i};
p.Fh=function(a,b){if(a){if(a.type=="audio")for(var c=r(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if(a.type=="video")for(c=r(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a})),d.dependencyStream&&(d.dependencyStream.matchedStreams=d.dependencyStream.matchedStreams.filter(function(e){return e!==
a}));else if(a.type==Ac)for(c=r(this.j),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if(a.type=="image")for(c=r(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.l.delete(b)}};
function Ay(a,b){var c=[],d=[],e=[],f=[];a=r(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[By(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Cy(n),n]})),l=new Map(h.textStreams.map(function(n){return[Dy(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ey(n),n]}));if(b){var m=Fy(Ac);l.set(Dy(m),m);m=Fy("image");h.set(Ey(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{cg:c,kh:d,ih:e,rg:f}}
p.Bh=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,q,t,u,v,w,y,x,B,C,I,E,z,D,G,F,J,M,O,R,P,N,Q,Z,sa;return L(function(da){if(da.g==1){e=Cc;if(!b&&a.length==1)return f=Ay(a,!1),g=f.cg,h=f.kh,k=f.ih,l=f.rg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),da.u(2);m=c?d.l.size:0;n=-1;for(q=0;q<a.length;q++)t=a[q],d.l.has(t.id)||(d.l.add(t.id),n==-1&&(n=q));if(n==-1)return da.return();u=Ay(a,!0);v=u.cg;w=u.kh;y=u.ih;
x=u.rg;return H(da,Promise.all([Gy(d,d.h,v,n,m),Gy(d,d.g,w,n,m),Gy(d,d.j,y,n,m),Gy(d,d.i,x,n,m)]),2)}B=0;C=[];if(d.g.length&&d.h.length)for(J=r(d.h),M=J.next();!M.done;M=J.next())for(O=M.value,R=r(d.g),P=R.next();!P.done;P=R.next())N=P.value,Q=qi(O.drmInfos,N.drmInfos),O.drmInfos.length&&N.drmInfos.length&&!Q.length||(Z=(O.bandwidth||0)+(N.bandwidth||0),O.dependencyStream&&(Z+=O.dependencyStream.bandwidth||0),N.dependencyStream&&(Z+=N.dependencyStream.bandwidth||0),sa=B++,C.push({id:sa,language:O.language,
disabledUntilTime:0,primary:O.primary,audio:O,video:N,bandwidth:Z,drmInfos:Q,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(I=d.g.length?d.g:d.h,E=r(I),z=E.next();!z.done;z=E.next())D=z.value,G=B++,F=D.bandwidth||0,D.dependencyStream&&(F+=D.dependencyStream.bandwidth||0),C.push({id:G,language:D.language,disabledUntilTime:0,primary:D.primary,audio:D.type==e.Z?D:null,video:D.type==e.qa?D:null,bandwidth:F,drmInfos:D.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
d.m=C;K(da)})};
function Gy(a,b,c,d,e){var f=Hy,g=Iy,h,k,l,m,n,q,t,u,v,w,y,x,B,C,I,E,z,D,G,F;return L(function(J){switch(J.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=r(b);m=l.next();case 2:if(m.done){J.u(4);break}n=m.value;return H(J,Jy(a,n,c,d,g,h,e),5);case 5:q=J.h;if(!q)throw new T(2,4,4037);m=l.next();J.u(2);break;case 4:t=r(h);for(u=t.next();!u.done;u=t.next())for(v=u.value,w=r(v),y=w.next();!y.done;y=w.next())x=y.value,(B=Ky(a,b,x,c,f,g,h))&&b.push(B);C=r(h);
for(I=C.next();!I.done;I=C.next())for(E=I.value,z=r(E),D=z.next(),G={};!D.done;G={Of:void 0},D=z.next())if(G.Of=D.value,!Ly(G.Of)&&(F=b.some(function(M){return function(O){return My(M.Of,O)}}(G))))throw new T(2,4,4037);return J.return(b)}})}function Jy(a,b,c,d,e,f,g){return L(function(h){if(h.g==1)return Ny(a,c,b,g>0),b.matchedStreams?b.segmentIndex?H(h,Oy(b,d+g),2):h.u(2):h.return(!1);Py(b,d,e,f,g);return h.return(!0)})}
function Oy(a,b){var c,d,e,f,g,h;return L(function(k){if(k.g==1){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex()),f.dependencyStream&&!f.dependencyStream.segmentIndex&&c.push(f.dependencyStream.createSegmentIndex());return H(k,Promise.all(c),2)}if(a.segmentIndex instanceof Wk)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);K(k)})}
function Ky(a,b,c,d,e,f,g){if(Ly(c))return null;var h=e(c);Ny(a,d,h);h.createSegmentIndex&&(h.createSegmentIndex=function(){return L(function(k){if(h.segmentIndex)return k.u(0);h.segmentIndex=new Wk;return H(k,Oy(h,0),0)})},h.closeSegmentIndex=function(){h.segmentIndex&&(h.segmentIndex.release(),h.segmentIndex=null);if(h.matchedStreams)for(var k=r(h.matchedStreams),l=k.next();!l.done;l=k.next()){l=l.value;var m;if(m=l.segmentIndex){a:{m=r(b);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n!==
h&&n.segmentIndex&&n.matchedStreams&&n.matchedStreams.includes(l)){m=!0;break a}m=!1}m=!m}m&&(l.segmentIndex.release(),l.segmentIndex=null)}});if(!h.matchedStreams||!h.matchedStreams.length)return null;Py(h,0,f,g,0);return h}
function Py(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;a.type=="audio"&&Re(a.language,g.language)==0&&(h=!1);if(h&&((h=d[b-e])&&h.delete(g),g.fullMimeTypes))for(g=r(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function Hy(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set(a.keyIds);b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;b.trickModeVideo=null;b.dependencyStream=null;return b}
function Iy(a,b){function c(g,h){g||(g=[]);h=r(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=r(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);a.originalId==null?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=qi(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=r(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=r(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Hy(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
for(var g=new Wk,h=r(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),Iy(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),Iy(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=Hy(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new Wk,h=r(a.dependencyStream.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.dependencyStream.segmentIndex=g;return Promise.resolve()}),a.dependencyStream.matchedStreams.push(b.dependencyStream),Iy(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),Iy(a.dependencyStream,b))}
function Ny(a,b,c,d){d=(d===void 0?0:d)?c.matchedStreams:[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=Qy(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function Qy(a,b,c){var d={audio:By,video:Cy,text:Dy,image:Ey}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return My(l,m)},video:function(l,m){return My(l,m)},text:Ry,image:Sy}[c.type];for(var g={audio:Ty,video:Uy,text:Vy,image:Wy}[c.type],h=r(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.o&&!Ly(e)&&b.delete(d(e));return e}
function Xy(a,b){return a.mimeType!=b.mimeType?!1:hz(a.codecs)===hz(b.codecs)}p.hj=function(a){this.o=a};function My(a,b){return a.drmInfos&&!oi(a.drmInfos,b.drmInfos)?!1:!0}function Ry(a,b){return b.language?a.forced!==b.forced||Re(a.language,b.language)==0||b.kind!=a.kind?!1:!0:!0}function Sy(){return!0}
function Ty(a,b,c){var d=iz(a,b,c);if(d===jz)return!0;if(d===kz)return!1;d=Re(a.language,b.language);var e=Re(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1;if(c.roles.length!==b.roles.length)return c.roles.length<b.roles.length}else{if(!c.roles.length&&
b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=lz(a.channelsCount,b.channelsCount,c.channelsCount);if(d==jz)return!0;if(d==kz)return!1;d=lz(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==jz?!0:d==kz?!1:a.bandwidth&&mz(a.bandwidth,b.bandwidth,c.bandwidth)==jz?!0:!1}
function Uy(a,b,c){var d=iz(a,b,c);if(d===jz)return!0;if(d===kz)return!1;d=lz(a.width*a.height,b.width*b.height,c.width*c.height);if(d==jz)return!0;if(d==kz)return!1;if(a.frameRate){d=lz(a.frameRate,b.frameRate,c.frameRate);if(d==jz)return!0;if(d==kz)return!1}return a.bandwidth&&mz(a.bandwidth,b.bandwidth,c.bandwidth)==jz?!0:!1}
function Vy(a,b,c){var d=Re(a.language,b.language),e=Re(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 Wy(a,b,c){return lz(a.width*a.height,b.width*b.height,c.width*c.height)==jz?!0:!1}
function Fy(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Tk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,
baseOriginalId:null}}function lz(a,b,c){if(b==a&&a!=c)return kz;if(c==a&&a!=b)return jz;if(b>a){if(c<=a||c-a<b-a)return jz;if(c-a>b-a)return kz}else{if(c>a)return kz;if(a-c<a-b)return jz;if(a-c>a-b)return kz}return nz}function iz(a,b,c){var d=a.mimeType===b.mimeType&&a.codecs===b.codecs,e=a.mimeType===c.mimeType&&a.codecs===c.codecs;if(d&&!e)return kz;if(!d&&e)return jz;b=Xy(a,b);a=Xy(a,c);return b&&!a?kz:!b&&a?jz:nz}function mz(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?jz:b<a?kz:nz}
function Ly(a){switch(a.type){case Ac:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function Cy(a){return oz([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}
function By(a){return oz([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function Dy(a){return oz([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function Ey(a){return oz([a.width,a.codecs,a.mimeType])}function oz(a){return JSON.stringify(a)}function hz(a){if(!pz.has(a)){var b=ie(a);pz.set(a,b)}return pz.get(a)}
S("shaka.util.PeriodCombiner",zy);zy.prototype.setUseStreamOnce=zy.prototype.hj;zy.prototype.combinePeriods=zy.prototype.Bh;zy.prototype.deleteStream=zy.prototype.Fh;zy.prototype.getImageStreams=zy.prototype.Sh;zy.prototype.getTextStreams=zy.prototype.ni;zy.prototype.getVariants=zy.prototype.ti;var jz=1,nz=0,kz=-1,pz=new Map;}).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.hls.map