UNPKG

shaka-player

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

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
var q,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 da=ca(this),ea="Int8 Uint8 Uint8Clamped Int16 Uint16 Int32 Uint32 Float32 Float64".split(" ");da.BigInt64Array&&(ea.push("BigInt64"),ea.push("BigUint64"));
function ia(a,b){if(b)for(var c=0;c<ea.length;c++)ka(ea[c]+"Array.prototype."+a,b)}function la(a,b){b&&ka(a,b)}function ka(a,b){var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))return;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 ma;
if(typeof Object.setPrototypeOf=="function")ma=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},qa={};try{qa.__proto__=oa;na=qa.a;break a}catch(a){}na=!1}ma=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ra=ma;
function ta(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(ra)ra(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.Xl=b.prototype}function ua(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}
function t(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:ua(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function va(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}function wa(a){if(!(a instanceof Object))throw new TypeError("Iterator result "+a+" is not an object");}
function xa(){this.J=!1;this.D=null;this.j=void 0;this.i=1;this.C=this.H=0;this.M=this.B=null}function ya(a){if(a.J)throw new TypeError("Generator is already running");a.J=!0}xa.prototype.L=function(a){this.j=a};function za(a,b){a.B={ih:b,Ch:!0};a.i=a.H||a.C}xa.prototype.getNextAddressJsc=function(){return this.i};xa.prototype.getYieldResultJsc=function(){return this.j};xa.prototype.return=function(a){this.B={return:a};this.i=this.C};xa.prototype["return"]=xa.prototype.return;
xa.prototype.P=function(a){this.B={A:a};this.i=this.C};xa.prototype.jumpThroughFinallyBlocks=xa.prototype.P;xa.prototype.h=function(a,b){this.i=b;return{value:a}};xa.prototype.yield=xa.prototype.h;xa.prototype.U=function(a,b){a=t(a);var c=a.next();wa(c);if(c.done)this.j=c.value,this.i=b;else return this.D=a,this.h(c.value,b)};xa.prototype.yieldAll=xa.prototype.U;xa.prototype.A=function(a){this.i=a};xa.prototype.jumpTo=xa.prototype.A;xa.prototype.l=function(){this.i=0};xa.prototype.jumpToEnd=xa.prototype.l;
xa.prototype.o=function(a,b){this.H=a;b!=void 0&&(this.C=b)};xa.prototype.setCatchFinallyBlocks=xa.prototype.o;xa.prototype.K=function(a){this.H=0;this.C=a||0};xa.prototype.setFinallyBlock=xa.prototype.K;xa.prototype.u=function(a,b){this.i=a;this.H=b||0};xa.prototype.leaveTryBlock=xa.prototype.u;xa.prototype.m=function(a){this.H=a||0;a=this.B.ih;this.B=null;return a};xa.prototype.enterCatchBlock=xa.prototype.m;
xa.prototype.F=function(a,b,c){c?this.M[c]=this.B:this.M=[this.B];this.H=a||0;this.C=b||0};xa.prototype.enterFinallyBlock=xa.prototype.F;xa.prototype.G=function(a,b){b=this.M.splice(b||0)[0];(b=this.B=this.B||b)?b.Ch?this.i=this.H||this.C:b.A!=void 0&&this.C<b.A?(this.i=b.A,this.B=null):this.i=this.C:this.i=a};xa.prototype.leaveFinallyBlock=xa.prototype.G;xa.prototype.N=function(a){return new Aa(a)};xa.prototype.forIn=xa.prototype.N;
function Aa(a){this.j=a;this.h=[];for(var b in a)this.h.push(b);this.h.reverse()}Aa.prototype.i=function(){for(;this.h.length>0;){var a=this.h.pop();if(a in this.j)return a}return null};Aa.prototype.getNext=Aa.prototype.i;function Ba(a){this.h=new xa;this.i=a}function Ca(a,b){ya(a.h);var c=a.h.D;if(c)return Da(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.h.return);a.h.return(b);return Ea(a)}
function Da(a,b,c,d){try{var e=b.call(a.h.D,c);wa(e);if(!e.done)return a.h.J=!1,e;var f=e.value}catch(g){return a.h.D=null,za(a.h,g),Ea(a)}a.h.D=null;d.call(a.h,f);return Ea(a)}function Ea(a){for(;a.h.i;)try{var b=a.i(a.h);if(b)return a.h.J=!1,{value:b.value,done:!1}}catch(c){a.h.j=void 0,za(a.h,c)}a.h.J=!1;if(a.h.B){b=a.h.B;a.h.B=null;if(b.Ch)throw b.ih;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function Fa(a){this.next=function(b){ya(a.h);a.h.D?b=Da(a,a.h.D.next,b,a.h.L):(a.h.L(b),b=Ea(a));return b};this.throw=function(b){ya(a.h);a.h.D?b=Da(a,a.h.D["throw"],b,a.h.L):(za(a.h,b),b=Ea(a));return b};this.return=function(b){return Ca(a,b)};this[Symbol.iterator]=function(){return this}}function Ha(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 G(a){return Ha(new Fa(new Ba(a)))}function Ia(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}la("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.h=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.h};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b});
la("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");ba(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return Ja(ua(this))}});return a});function Ja(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
la("Promise",function(a){function b(g){this.i=0;this.j=void 0;this.h=[];this.u=!1;var h=this.l();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.h=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.i=function(g){if(this.h==null){this.h=[];var h=this;this.j(function(){h.m()})}this.h.push(g)};var e=da.setTimeout;c.prototype.j=function(g){e(g,0)};c.prototype.m=function(){for(;this.h&&this.h.length;){var g=this.h;this.h=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.l(l)}}}this.h=null};c.prototype.l=function(g){this.j(function(){throw g;})};b.prototype.l=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.G),reject:g(this.m)}};b.prototype.G=function(g){if(g===this)this.m(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=g!=null;break a;case "function":h=!0;break a;default:h=!1}h?this.F(g):this.o(g)}};
b.prototype.F=function(g){var h=void 0;try{h=g.then}catch(k){this.m(k);return}typeof h=="function"?this.K(h,g):this.o(g)};b.prototype.m=function(g){this.B(2,g)};b.prototype.o=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(this.i!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.i);this.i=g;this.j=h;this.i===2&&this.H();this.C()};b.prototype.H=function(){var g=this;e(function(){if(g.D()){var h=da.console;typeof h!=="undefined"&&h.error(g.j)}},1)};b.prototype.D=
function(){if(this.u)return!1;var g=da.CustomEvent,h=da.Event,k=da.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=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.j;return k(g)};b.prototype.C=function(){if(this.h!=null){for(var g=0;g<this.h.length;++g)f.i(this.h[g]);this.h=null}};var f=new c;
b.prototype.J=function(g){var h=this.l();g.ce(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.l();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,u){return typeof p=="function"?function(r){try{l(p(r))}catch(v){m(v)}}:u}var l,m,n=new b(function(p,u){l=p;m=u});this.ce(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.ce=function(g,h){function k(){switch(l.i){case 1:g(l.j);break;case 2:h(l.j);
break;default:throw Error("Unexpected state: "+l.i);}}var l=this;this.h==null?f.i(k):this.h.push(k);this.u=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).ce(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(r){return function(v){p[r]=v;u--;u==0&&l(p)}}var p=[],u=0;do p.push(void 0),u++,d(k.value).ce(n(p.length-1),m),k=h.next();
while(!k.done)})};return b});function Ka(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
la("WeakMap",function(a){function b(k){this.h=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return l==="object"&&k!==null||l==="function"}function e(k){if(!Ka(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(!Ka(k,g))throw Error("WeakMap key fail: "+k);k[g][this.h]=l;return this};b.prototype.get=function(k){return d(k)&&Ka(k,g)?k[g][this.h]:void 0};b.prototype.has=function(k){return d(k)&&Ka(k,
g)&&Ka(k[g],this.h)};b.prototype.delete=function(k){return d(k)&&Ka(k,g)&&Ka(k[g],this.h)?delete k[g][this.h]:!1};return b});
la("Map",function(a){function b(){var h={};return h.Ub=h.next=h.head=h}function c(h,k){var l=h[1];return Ja(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&&Ka(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!=
4||m.value[1]!="t"||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],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});
la("Set",function(a){function b(c){this.h=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.h.size}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||f.value[0].x!=
4||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?0:c;this.h.set(c,c);this.size=this.h.size;return this};b.prototype.delete=function(c){c=this.h.delete(c);this.size=this.h.size;return c};b.prototype.clear=function(){this.h.clear();this.size=0};b.prototype.has=function(c){return this.h.has(c)};b.prototype.entries=function(){return this.h.entries()};b.prototype.values=function(){return this.h.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.h.forEach(function(f){return c.call(d,f,f,e)})};return b});function La(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{uh:e,v:f}}return{uh:-1,v:void 0}}la("Array.prototype.findIndex",function(a){return a?a:function(b,c){return La(this,b,c).uh}});
function Ma(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}la("Array.prototype.values",function(a){return a?a:function(){return Ma(this,function(b,c){return c})}});
la("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}});la("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});
la("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}});la("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 Na(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+""}la("String.prototype.includes",function(a){return a?a:function(b,c){return Na(this,b,"includes").indexOf(b,c||0)!==-1}});
la("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}});
la("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Na(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}});
la("WeakSet",function(a){function b(c){this.h=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.h.set(c,!0);return this};b.prototype.has=function(c){return this.h.has(c)};b.prototype.delete=function(c){return this.h.delete(c)};return b});
la("Array.prototype.find",function(a){return a?a:function(b,c){return La(this,b,c).v}});la("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ka(b,d)&&c.push([d,b[d]]);return c}});var Oa=typeof Object.assign=="function"?Object.assign:function(a,b){if(a==null)throw new TypeError("No nullish arg");a=Object(a);for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ka(d,e)&&(a[e]=d[e])}return a};la("Object.assign",function(a){return a||Oa});
la("Math.clz32",function(a){return a?a:function(b){b=Number(b)>>>0;if(b===0)return 32;var c=0;(b&4294901760)===0&&(b<<=16,c+=16);(b&4278190080)===0&&(b<<=8,c+=8);(b&4026531840)===0&&(b<<=4,c+=4);(b&3221225472)===0&&(b<<=2,c+=2);(b&2147483648)===0&&c++;return c}});la("Array.prototype.entries",function(a){return a?a:function(){return Ma(this,function(b,c){return[b,c]})}});
la("Promise.withResolvers",function(a){return a?a:function(){var b,c;return{promise:new Promise(function(d,e){b=d;c=e}),resolve:b,reject:c}}});la("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;})})}});
la("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}});la("Number.EPSILON",function(){return 2.220446049250313E-16});la("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
la("Array.prototype.fill",function(a){return a?a:function(b,c,d){var e=this.length||0;c<0&&(c=Math.max(0,e+c));if(d==null||d>e)d=e;d=Number(d);d<0&&(d=Math.max(0,e+d));for(c=Number(c||0);c<d;c++)this[c]=b;return this}});ia("fill",function(a){return a?a:Array.prototype.fill});la("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});la("String.prototype.trimLeft",function(a){function b(){return this.replace(/^[\s\xa0]+/,"")}return a||b});
la("String.prototype.trimStart",function(a){return a||String.prototype.trimLeft});la("String.prototype.repeat",function(a){return a?a:function(b){var c=Na(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}});la("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});
la("Number.isInteger",function(a){return a?a:function(b){return Number.isFinite(b)?b===Math.floor(b):!1}});la("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Na(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 Pa=this||self;
function J(a,b){a=a.split(".");var c=Pa;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 Qa(a){this.j=Math.log(.5);this.h=Math.exp(this.j/a);this.l=this.i=0}Qa.prototype.sample=function(a,b){var c=Math.pow(this.h,a);b=b*(1-c)+c*this.i;isNaN(b)||(this.i=b,this.l+=a)};function Ra(a){return a.i/(1-Math.pow(a.h,a.l))};function Sa(){this.i=new Qa(2);this.l=new Qa(5);this.h=0;this.j=128E3;this.m=16E3}Sa.prototype.configure=function(a){this.j=a.minTotalBytes;this.m=a.minBytes;var b=this.i;b.h=Math.exp(b.j/a.fastHalfLife);b=this.l;b.h=Math.exp(b.j/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.m)){var c=8E3*b/a;a/=1E3;this.h+=b;this.i.sample(a,c);this.l.sample(a,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.h<this.j?a:Math.min(Ra(this.i),Ra(this.l))};function Ta(){}function Ua(){}function Va(){}function Xa(a){var b=Ia.apply(1,arguments);Ya.has(a)||(Ya.add(a),Va.apply(Ta,va(b)))}function Za(){}function $a(){}var Ya=new Set;
self.console&&((new Map).set(1,function(){return console.error.apply(console,va(Ia.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,va(Ia.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,va(Ia.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,va(Ia.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,va(Ia.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,va(Ia.apply(0,arguments)))}),
Va=function(){return console.warn.apply(console,va(Ia.apply(0,arguments)))},Ua=function(){console.error.apply(console,va(Ia.apply(0,arguments)))});function ab(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function bb(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function cb(a,b){var c;c||(c=ab);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={Fh:void 0},d=a.next()){e.Fh=d.value;d=b.findIndex(function(f){return function(g){return c(f.Fh,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0}
function db(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;b(a[e])?c=e+1:d=e}return c}function eb(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=ab);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 fb(){this.h=new Map}q=fb.prototype;q.push=function(a,b){this.h.getOrInsertComputed(a,function(){return[]}).push(b)};q.get=function(a){return this.h.has(a)?this.h.get(a).slice():null};q.remove=function(a,b){if(this.h.has(a)){var c=this.h.get(a).filter(function(d){return d!=b});this.h.set(a,c);c.length||this.h.delete(a)}};q.forEach=function(a){this.h.forEach(function(b,c){a(c,b)})};q.size=function(){return this.h.size};q.keys=function(){return Array.from(this.h.keys())};function gb(){this.h=new fb}q=gb.prototype;q.release=function(){this.Pa();this.h=null};q.I=function(a,b,c,d){this.h&&(a=new hb(a,b,c,d),this.h.push(b,a))};q.Ja=function(a,b,c,d){function e(g){f.mb(a,b,e);c(g)}var f=this;this.I(a,b,e,d)};q.yb=function(a,b,c,d){if(this.h){b=t(b);for(var e=b.next();!e.done;e=b.next())this.I(a,e.value,c,d)}};
q.Qj=function(a,b,c,d){var e=this;if(this.h)for(var f=!1,g=function(l){if(!f){f=!0;for(var m=t(b),n=m.next();!n.done;n=m.next())e.mb(a,n.value,g);c(l)}},h=t(b),k=h.next();!k.done;k=h.next())this.I(a,k.value,g,d)};q.mb=function(a,b,c){if(this.h){var d=this.h.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.mb(),this.h.remove(b,e))}};q.Fk=function(a,b,c){if(this.h){b=t(b);for(var d=b.next();!d.done;d=b.next())this.mb(a,d.value,c)}};
q.Pa=function(){if(this.h){for(var a=[],b=t(this.h.h.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,va(c.value));a=t(a);for(b=a.next();!b.done;b=a.next())b.value.mb();this.h.h.clear()}};J("shaka.util.EventManager",gb);gb.prototype.removeAll=gb.prototype.Pa;gb.prototype.unlistenMulti=gb.prototype.Fk;gb.prototype.unlisten=gb.prototype.mb;gb.prototype.listenOnceMulti=gb.prototype.Qj;gb.prototype.listenMulti=gb.prototype.yb;gb.prototype.listenOnce=gb.prototype.Ja;gb.prototype.listen=gb.prototype.I;
gb.prototype.release=gb.prototype.release;function hb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.h=ib(a,d);this.target.addEventListener(b,c,this.h)}hb.prototype.mb=function(){this.target.removeEventListener(this.type,this.listener,this.h);this.listener=this.target=null;this.h=!1};function ib(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 jb(a)?b:b.capture||!1}
function jb(a){var b=kb;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}kb=b}return b||!1}var kb=void 0;function mb(a){this.i=a;this.h=void 0}mb.prototype.value=function(){this.h===void 0&&(this.h=this.i());return this.h};function nb(){return ob.value()}var pb=null,qb=null,ob=new mb(function(){var a=void 0;pb&&(a=pb());!a&&qb&&(a=qb());return a});function rb(){}function sb(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=tb(a);b=tb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function ub(a){return ArrayBuffer.isView(a)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function tb(a,b,c){c=c===void 0?Infinity:c;return vb(a,b===void 0?0:b,c,Uint8Array)}function wb(a,b,c){c=c===void 0?Infinity:c;return vb(a,b===void 0?0:b,c,Uint16Array)}function xb(a,b,c){c=c===void 0?Infinity:c;return vb(a,b===void 0?0:b,c,DataView)}
function vb(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)}J("shaka.util.BufferUtils",rb);rb.toDataView=xb;rb.toUint16=wb;rb.toUint8=tb;rb.toArrayBuffer=ub;rb.equal=sb;function K(a,b,c){var d=Ia.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(yb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}K.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};function zb(a){var b=a.code,c=a.msExtendedCode;c&&(c<0&&(c+=4294967296),c=c.toString(16));return{code:b,Xi:c,message:a.message}}J("shaka.util.Error",K);var yb=!0;
K.Severity={RECOVERABLE:1,CRITICAL:2};K.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
K.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,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,BUFFER_WRITE_OUT_OF_BOUNDS:3025,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,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,WEBTRANSPORT_NOT_AVAILABLE:4056,WEBTRANSPORT_INITIALIZATION_FAILED:4057,MSF_VOD_CONTENT_NOT_SUPPORTED:4058,HLS_INVALID_KEY_IV_FOR_GCM:4059,HLS_INVALID_GCM_SEGMENT:4060,DASH_INVALID_JSON:4061,MSF_NO_CATALOG:4062,DASH_UNSUPPORTED_ESSENTIAL_PROPERTY:4063,MSF_CATALOG_TIMEOUT:4064,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,SS_IMA_SDK_MISSING:10002,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,VAST_INVALID_XML:10007,CS_AD_CONTAINER_MISSING:10008,
SS_AD_CONTAINER_MISSING:10009,MEDIATAILOR_REQUEST_FAILED:10010};function Ab(){}
function Bb(a){if(!a)return"";a=tb(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(self.TextDecoder&&!nb().Bg())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('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 Cb(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new K(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=xb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return Db.value()(d)}
function Eb(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=tb(a);if(c[0]==239&&c[1]==187&&c[2]==191)return Bb(c);if(c[0]==254&&c[1]==255)return Cb(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return Cb(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return Cb(a,!1);if(c[1]==0&&c[3]==0)return Cb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bb(a);throw new K(2,2,2003);}
function Fb(a){if(self.TextEncoder&&!nb().Bg()){var b=new TextEncoder;return ub(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return ub(b)}function Gb(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 Hb(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||""}J("shaka.util.StringUtils",Ab);Ab.resetFromCharCode=function(){Db.h=void 0};
Ab.toUTF16=Gb;Ab.toUTF8=Fb;Ab.fromBytesAutoDetect=Eb;Ab.fromUTF16=Cb;Ab.fromUTF8=Bb;var Db=new mb(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={sc:65536};b.sc>0;b={sc:b.sc},b.sc/=2)if(a(b.sc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.sc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.sc));return e}}(b);return null});function Ib(){}function Lb(a){a=tb(a);return Uint8Array.prototype.toBase64?a.toBase64({alphabet:"base64",omitPadding:!1}):(a=Db.value()(a),btoa(a))}function Mb(a,b){b=b==void 0?!0:b;return Uint8Array.prototype.toBase64?tb(a).toBase64({alphabet:"base64url",omitPadding:!b}):(a=Lb(a).replace(/\+/g,"-").replace(/\//g,"_"),b?a:a.replace(/[=]*$/,""))}
function Nb(a){if(!("fromBase64"in Uint8Array)){a=self.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}a=a.replace(/\s+/g,"");return Uint8Array.fromBase64(a,{alphabet:/[-_]/.test(a)?"base64url":"base64"})}function Ob(a){if(!("fromHex"in Uint8Array)){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=parseInt(a.substr(d*2,2),16);return c}return Uint8Array.fromHex(a)}
function Pb(a){var b=tb(a);if(!Uint8Array.prototype.toHex){a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),c.length==1&&(c="0"+c),a+=c;return a}return b.toHex()}function Qb(){var a=Ia.apply(0,arguments);return Sb(a,0,a.length)}
function Sb(a,b,c){b=b===void 0?0:b;c=c===void 0?a.length:c;for(var d=0,e=b;e<c;++e)d+=a[e].byteLength;d=new Uint8Array(d);for(e=0;b<c;++b){var f=a[b];ArrayBuffer.isView(f)&&f.BYTES_PER_ELEMENT===1?d.set(f,e):d.set(tb(f),e);e+=f.byteLength}return d}function Tb(a){for(var b=new Uint8Array(a.length),c=0,d=0,e=0;e<a.length;e++){var f=a[e];c>=2&&f==3?c=0:(b[d++]=f,f==0?c++:c=0)}return b.subarray(0,d)}J("shaka.util.Uint8ArrayUtils",Ib);Ib.concat=Qb;Ib.toHex=Pb;Ib.fromHex=Ob;Ib.fromBase64=Nb;
Ib.toBase64=Mb;Ib.toStandardBase64=Lb;function Ub(a,b){if(a===b||!a.length||!b.length)return!0;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Vb(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||Vb(e))return!0}return!1}
function Wb(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(va(d.keyIds),va(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 Vb(d)?c.push(d):Vb(f)&&c.push(f)}return c}
function Xb(a){return a?a.keySystem:""}function Yb(a){return a==="org.w3.clearkey"}function Zb(a){return a?!!a.match(/^com\.widevine\.alpha/):!1}function $b(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function ac(a){return a?!!a.match(/^com\.apple\.fps/):!1}function Vb(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}function bc(a,b,c,d){d=[].concat(va(new Set(d))).sort().join("#");return a+"#"+b+"#"+c+"#"+d}
function dc(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c={"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"};if(!a&&!b)return c;var d=
{},e;for(e in c){var f=c[e],g=e;b?g="urn:uuid:"+e:a&&(g=e.replace(/-/g,""));d[g]=f}return d}function ec(a){return a.length===22?a:Mb(Ob(a),!1)}var fc=new mb(function(){return ub(new Uint8Array([0]))}),hc=new Map;function ic(){}function jc(a,b){a=kc(a);b=kc(b);return a.split("-")[0]==b.split("-")[0]}function lc(a,b){a=kc(a);b=kc(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&a.length==1&&b.length==2}function nc(a,b){a=kc(a);b=kc(b);a=a.split("-");b=b.split("-");return a.length==2&&b.length==2&&a[0]==b[0]}
function kc(a){a=t(a.split("-x-"));var b=a.next().value;b=b===void 0?"":b;a=a.next().value;a=a===void 0?"":a;var c=t(b.split("-"));b=c.next().value;b=b===void 0?"":b;c=c.next().value;c=c===void 0?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=oc.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function pc(a,b){a=kc(a);b=kc(b);return b==a?4:lc(b,a)?3:nc(b,a)?2:lc(a,b)?1:0}function qc(a){var b=a.indexOf("-");a=b>=0?a.substring(0,b):a;a=a.toLowerCase();return a=oc.get(a)||a}
function rc(a){return a.language?kc(a.language):a.audio&&a.audio.language?kc(a.audio.language):a.video&&a.video.language?kc(a.video.language):"und"}
function sc(a,b){a=kc(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(kc(d.value));b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,lc(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,nc(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,lc(a,b))return b;return null}J("shaka.util.LanguageUtils",ic);ic.findClosestLocale=sc;ic.getLocaleForVariant=rc;
ic.getLocaleForText=function(a){return kc(a.language||"und")};ic.getBase=qc;ic.relatedness=pc;ic.areSiblings=function(a,b){var c=qc(a),d=qc(b);return a!=c&&b!=d&&c==d};ic.normalize=kc;ic.isSiblingOf=nc;ic.isParentOf=lc;ic.areLanguageCompatible=jc;ic.areLocaleCompatible=function(a,b){a=kc(a);b=kc(b);return a==b};
var oc=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 tc(a,b,c,d,e){b={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set,mediaTypes:e};d&&(b.keySystemUris=new Set([d]));!c&&ac(a)&&b.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null});return b}
function uc(a,b){b=b===void 0?"cenc":b;var c=[],d=[],e=[],f=new Map;a.forEach(function(h,k){var l=ec(k);h=ec(h);var m={kty:"oct",kid:l,k:h};c.push(m);d.push(m.kid);e.push(k);f.set(l,h)});a=JSON.stringify({keys:c});var g=JSON.stringify({kids:d});g=[{initData:tb(Fb(g)),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:g,keyIds:new Set(e),clearKeys:f}}function vc(a,b){if(b.length==1)return b[0];a=wc(a,b);if(a!=null)return a;throw new K(2,4,4025,b);}function wc(a,b){var c=xc.get(a);c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==yc?"":null}
function zc(a,b){var c=[];a=xc.get(a);a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}
var yc="text",Ac={qa:"video",X:"audio",Ra:yc,Ei:"image",Qk:"application",Ci:"chapter"},xc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cehx]?$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^mp2v/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Bc(a,b,c,d){this.h=null;this.m=a;this.j=b;this.o=c;this.l=d;typeof libDPIModule==="undefined"&&Va("Could not find LCEVC Library dependencies on this page");typeof LCEVCdec!=="undefined"?(this.i=LCEVCdec,typeof this.i.SupportObject==="undefined"?(Va("Could not find LCEVC Library on this page"),a=!1):(this.i.SupportObject.SupportStatus||Va(this.i.SupportObject.SupportError),a=typeof this.i!=="undefined"&&typeof libDPIModule!=="undefined"&&this.j instanceof HTMLCanvasElement&&this.i.SupportObject.SupportStatus)):
(Va("Could not find LCEVC Library on this page"),a=!1);a&&!this.h&&this.i.SupportObject.webGLSupport(this.j)&&(this.j.classList.remove("shaka-hidden"),this.h=new this.i.LCEVCdec(this.m,this.j,this.o))}function Cc(a,b,c,d){d.type!=="video"||a.l&&!Dc(d)||a.h&&a.h.appendBuffer(b,"video",d.id,-c,!a.l)}function Ec(a){a.h&&a.j.classList.add("shaka-hidden")}Bc.prototype.release=function(){this.h&&(this.h.close(),this.h=null)};function Dc(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}
J("shaka.lcevc.Dec",Bc);Bc.prototype.release=Bc.prototype.release;function Fc(){}function Gc(a,b){Hc.set(a,b)}function Jc(){var a={};nb();if(Kc())for(var b=t(Hc.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","audio/x-mpegurl"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=Kc()?Hc.has(c):Lc().canPlayType(c)!="";return a}function Nc(a,b){if(b){var c=Hc.get(b);if(c)return c}throw new K(2,4,4E3,a,b);}J("shaka.media.ManifestParser",Fc);Fc.unregisterParserByMime=function(a){Hc.delete(a)};
Fc.registerParserByMime=Gc;Fc.AccessibilityPurpose={Dl:"visually impaired",Zk:"hard of hearing",yl:"spoken subtitles"};var Hc=new Map;function Oc(){}q=Oc.prototype;q.extract=function(){};q.extractRaw608=function(){};q.decode=function(){return[]};q.clear=function(){};q.getStreams=function(){return[]};function Pc(){}Pc.prototype.init=function(){};Pc.prototype.parse=function(){return[]};function Qc(a){this.i=new Map;this.j=0;this.l=new Pc;if(a=Rc(a.toLowerCase()))this.l=a();this.h=new Oc;if(a=Sc)this.h=a(),this.i.set(this.j,this.h)}Qc.prototype.init=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?-1:c;c!=-1&&this.j!=c?Tc(this,c):b||this.h.clear();this.l.init(a);c!=-1&&(this.j=c)};
function Uc(a,b){b=a.l.parse(b);b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;var d=tb(c.packet);if(d.length>0)switch(c.format){case Vc:a.h.extract(d,c.pts);break;case Wc:a.h.extractRaw608(d,c.pts)}}return a.h.decode()}function Tc(a,b){a.i.set(a.j,a.h);a.h=a.i.getOrInsertComputed(b,function(){var c=Sc;return c?c():a.h})}
Qc.prototype.remove=function(a){a=a===void 0?[]:a;a=new Set(a);for(var b=t(this.i.keys()),c=b.next();!c.done;c=b.next())if(c=c.value,!a.has(c)){var d=this.i.get(c);d&&d.clear();this.i.delete(c)}};function Yc(a,b){Zc.set(a,b)}function Rc(a){return Zc.get(a)}J("shaka.media.ClosedCaptionParser",Qc);Qc.findDecoder=function(){return Sc};Qc.unregisterDecoder=function(){Sc=null};Qc.registerDecoder=function(a){Sc=a};Qc.findParser=Rc;Qc.unregisterParser=function(a){Zc.delete(a)};Qc.registerParser=Yc;
var Zc=new Map,Sc=null,Vc="sei",Wc="raw608";function $c(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=ad;this.scroll=cd}
$c.prototype.clone=function(){var a=new $c;a.id=this.id;a.viewportAnchorX=this.viewportAnchorX;a.viewportAnchorY=this.viewportAnchorY;a.regionAnchorX=this.regionAnchorX;a.regionAnchorY=this.regionAnchorY;a.width=this.width;a.height=this.height;a.heightUnits=this.heightUnits;a.widthUnits=this.widthUnits;a.viewportAnchorUnits=this.viewportAnchorUnits;a.scroll=this.scroll;return a};J("shaka.text.CueRegion",$c);$c.prototype.clone=$c.prototype.clone;var ad=1;$c.units={PX:0,PERCENTAGE:ad,LINES:2};
var cd="";$c.scrollMode={NONE:cd,UP:"up"};function dd(a){this.i=a||"";this.h=0}function ed(a,b){for(var c=fd(a);c;)b(c),gd(a,/[ \t]+/gm),c=fd(a)}function gd(a,b){b.lastIndex=a.h;b=b.exec(a.i);b=b==null?null:{position:b.index,length:b[0].length,results:b};if(a.h==a.i.length||b==null||b.position!=a.h)return null;a.h+=b.length;return b.results}function fd(a){return a.h==a.i.length?null:(a=gd(a,/[^ \t\n]*/gm))?a[0]:null}
function hd(a){a=gd(a,id);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 id=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function jd(){}function ld(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 md(a){var b={},c;for(c in a)b[c]=a[c];return b}
function nd(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=nd(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if(typeof a=="function")a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=t(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],e!==void 0&&(e=nd(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}J("shaka.util.ObjectUtils",jd);jd.alphabeticalKeyOrderStringify=nd;
jd.shallowCloneObject=md;jd.cloneObject=ld;/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function od(a,b,c){a=pd(a,c===void 0?!1:c);if(!b&&a.length)return a[0];var d=b.split(",");return(b=a.find(function(e){return d.includes(e.tagName)}))?b:null}
function pd(a,b){function c(g,h){h=h===void 0?!1:h;for(var k=[];a[e];)if(a.charCodeAt(e)==60){if(a.charCodeAt(e+1)===47){h=e+2;e=a.indexOf(">",e);h=a.substring(h,e);var l=h.indexOf(g);if(l==-1){var m=g.indexOf(".");m>0&&(l=h.indexOf(g.substring(0,m)))}if(l==-1)throw g=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(g.length-1)+"\nColumn: "+(g[g.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"){l=a.indexOf("]]\x3e",e);l==-1?(k.push(a.substr(e+9)),e=a.length):(k.push(a.substring(e+9,l)),e=l+3);continue}e++;continue}if(f>512)throw Error("XML is too deeply nested");f++;a:{m=h;e++;var n=d(),p={};for(l=[];a.charCodeAt(e)!==62&&a[e];){var u=a.charCodeAt(e);if(u>64&&u<91||u>96&&u<123){u=d();for(var r=
a.charCodeAt(e);r&&r!==39&&r!==34&&!(r>64&&r<91||r>96&&r<123)&&r!==62;)e++,r=a.charCodeAt(e);var v=e+1;e=a.indexOf(a[e],v);v=(" "+a.slice(v,e)).slice(1);if(r===39||r===34){if(e===-1){m={tagName:n,attributes:p,children:l,parent:null};if(b)for(n=0;n<l.length;n++)typeof l[n]!=="string"&&(l[n].parent=m);l=m;break a}}else v=null,e--;if(u.startsWith("xmlns:")){r=v;var w=u.split(":")[1];qd.set(r,w);td.set(w,r)}n==="tt"&&u==="xml:space"&&v==="preserve"&&(m=!0);p[u]=v}e++}a.charCodeAt(e-1)!==47?(e++,l=c(n,
m)):e++;m={tagName:n,attributes:p,children:l,parent:null};n=l.length;for(p=0;p<n;p++)u=l[p],typeof u!=="string"?b&&(u.parent=m):p==n-1&&u=="\n"&&l.pop();l=m}f--;k.push(l);if(typeof l==="string")break;l.tagName[0]==="?"&&l.children&&(k.push.apply(k,va(l.children)),l.children=[])}else l=e,e=a.indexOf("<",e)-1,e===-2&&(e=a.length),l=(" "+a.slice(l,e+1)).slice(1),h?l.length>0&&k.push(l):k.length&&l.length==1&&l[0]=="\n"?k.push(l):l.trim().length>0&&k.push(l),e++;return k}function d(){for(var g=e;"\r\n\t>/= ".indexOf(a[e])===
-1&&a[e];)e++;return(" "+a.slice(g,e)).slice(1)}var e=0,f=0;return c("")}function ud(a){return typeof a==="string"}function vd(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function wd(a){if(typeof a==="string")return Hb(a);var b=[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c==="string"&&b.push(c);b=b.join("");return b===""?null:Hb(b)}
function xd(a,b,c){c=c===void 0?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())xd(d.value,b,c)}return c}function yd(a,b,c){b=qd.has(b)?qd.get(b):"";return a.attributes[b+":"+c]||null}function zd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=yd(a,d.value,c))return d;return null}function Ad(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 qd=new Map,td=new Map;function Bd(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new $c;this.position=null;this.positionAlign=Cd;this.size=0;this.textAlign=Dd;this.direction=Ed;this.writingMode=Fd;this.lineInterpretation=Gd;this.line=null;this.lineHeight="";this.lineAlign=Hd;this.displayAlign=Id;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Jd;this.fontStyle=Kd;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 Ld(a,b){a=new Bd(a,b,"");a.lineBreak=!0;return a}
Bd.prototype.clone=function(){function a(d){if(d===null||typeof d!=="object")return d;if(Array.isArray(d))return d.map(a);if(d instanceof Bd)return d.clone();if(d instanceof $c)return d.clone();var e={},f;for(f in d)e[f]=a(d[f]);return e}var b=new Bd(0,0,""),c;for(c in this)b[c]=a(this[c]);return b};
function Md(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(!eb(a.nestedCues,b.nestedCues,Md))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(!eb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function Nd(a,b){b=b===void 0?new Map:b;var c=a.payload;if(c.includes("<")){b.size===0&&Pd(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(Qd)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if(f[h]==="/"){var k=f.indexOf(">",h);if(k===-1){c=f;break a}if((k=f.substring(h+1,k))&&k=="v"){d=!0;var l=null;e.length&&
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else f[h]==="<"?(g=h+1,f[g]!="v"&&(g=-1)):f[h]===">"&&g>0&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=Rd(c);a.payload="";d="<span>"+c.replace(/\n/g,"<br />")+"</span>";try{var m=od(d,"span")}catch(n){}if(m)if(m=
m.children,m.length!=1||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())Sd(c.value,a,b);else a.payload=Hb(c);else a.payload=Hb(c)}else a.payload=Hb(c)}function Pd(a){for(var b=t(Object.entries(Td)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Bd(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Ud));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Bd(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function Rd(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 Sd(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new $c;d.position=null;d.size=0;d.textAlign=Dd;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=g.backgroundColor||h.backgroundColor,h.color=g.color||h.color,h.fontFamily=g.fontFamily||h.fontFamily,
h.fontSize=g.fontSize||h.fontSize,h.textShadow=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=Ld(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=Vd;break;case "i":d.fontStyle=Wd;break;case "u":d.textDecoration.push(Xd);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=f?hd(new dd(f)):null)d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(ud(a)||e.length==1&&ud(e[0]))for(c=wd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Ld(d.startTime,d.endTime),b.nestedCues.push(a)),e.length>0&&(a=d.clone(),a.payload=Hb(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())Sd(a.value,d,c)}J("shaka.text.Cue",Bd);Bd.parseCuePayload=Nd;Bd.equal=Md;Bd.prototype.clone=Bd.prototype.clone;
var Cd="auto";Bd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Cd};var Dd="center",Yd={LEFT:"left",RIGHT:"right",CENTER:Dd,START:"start",END:"end"};Bd.textAlign=Yd;var Id="after",Zd={BEFORE:"before",CENTER:"center",AFTER:Id};Bd.displayAlign=Zd;var Ed="ltr";Bd.direction={HORIZONTAL_LEFT_TO_RIGHT:Ed,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Fd="horizontal-tb";Bd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Fd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
var Gd=0;Bd.lineInterpretation={LINE_NUMBER:Gd,PERCENTAGE:1};var Hd="start",ae={CENTER:"center",START:Hd,END:"end"};Bd.lineAlign=ae;var Td={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Bd.defaultTextColor=Td;var Ud={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Bd.defaultTextBackgroundColor=Ud;var Jd=400,Vd=700;Bd.fontWeight={NORMAL:Jd,BOLD:Vd};
var Kd="normal",Wd="italic",be={NORMAL:Kd,ITALIC:Wd,OBLIQUE:"oblique"};Bd.fontStyle=be;var Xd="underline";Bd.textDecoration={UNDERLINE:Xd,LINE_THROUGH:"line-through",OVERLINE:"overline"};var Qd=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function ce(){}ce.prototype.destroy=function(){};function de(a,b,c){ee.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,ng:b})}function fe(a,b){for(var c=t(ge),d=c.next();!d.done;d=c.next()){a:{var e=a;d=d.value;d=d===void 0?null:d;e=e.toLowerCase().split(";")[0];d=t(d!==null?[d]:ge);for(var f=d.next();!f.done;f=d.next())if(f=ee.get(e+"-"+f.value)){e=f.ng;break a}e=null}if(e&&(d=e(),f=d.isSupported(a,b),d.destroy(),f))return e}return null}J("shaka.transmuxer.TransmuxerEngine",ce);
ce.findTransmuxer=fe;ce.unregisterTransmuxer=function(a,b){ee.delete(a.toLowerCase().split(";")[0]+"-"+b)};ce.registerTransmuxer=de;ce.prototype.destroy=ce.prototype.destroy;var ee=new Map;ce.PluginPriority={FALLBACK:1,PREFERRED_SECONDARY:2,PREFERRED:3,APPLICATION:4};var ge=[4,3,2,1];function he(){}function ie(a,b){var c=a;b&&!je.includes(a)&&(c+='; codecs="'+b+'"');return c}function ke(a,b){b&&(a+='; codecs="'+b+'"');return a}function le(a,b,c){var d=ie(a,b);b=ke(a,b);fe(b)?(a=fe(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 me(a){return a.split(";")[0].split("/")[1]}
function ne(a){var b=oe(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";case a==="lvc1":return"lcevc"}return a}function pe(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=oe(c.value),b.push(c[0]);return b.sort().join(",")}function qe(a){return a.split(";")[0]}function re(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}
function se(a){return a==="application/x-mpegurl"||a==="application/vnd.apple.mpegurl"||a==="audio/x-mpegurl"}function te(a,b){var c=nb(),d=a.toLowerCase();return d=="flac"?c.Da()!="WEBKIT"?"flac":"fLaC":d==="opus"?c.Da()!="WEBKIT"?"opus":me(b)=="mp4"?"Opus":"opus":d=="ac-3"&&c.Hd()?"ec-3":a}function ue(a,b){a=a.split(",").map(function(d){return d.trim()});var c=wc("audio",a);return a.map(function(d){return d==c?te(d,b):ve(d)}).join(",")}
function ve(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 oe(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}J("shaka.util.MimeUtils",he);he.getFullTypeWithAllCodecs=ke;he.getFullType=ie;
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var je=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function we(a,b){this.m=null;this.l=a;this.F=b===void 0?"UNKNOWN":b;this.D=this.K=this.J=!1;this.u=new Map;this.j=new Map;this.B=0;this.C=Infinity;this.i=this.h=null;this.H="";this.G=function(){};this.o=new Map}function xe(a,b){ye.set(a,b)}function ze(a){return ye.get(a)}function Ae(a){return ye.has(a)?!0:a=="application/cea-608"||a=="application/cea-708"?!!Sc:!1}we.prototype.destroy=function(){this.l=this.m=null;this.u.clear();this.j.clear();this.o.clear();return Promise.resolve()};
function Be(a,b,c,d,e,f){f=f===void 0?-1:f;var g,h,k,l,m,n,p,u,r;return G(function(v){if(v.i==1)return a.D||a.u.has(f)?v.h(Promise.resolve(),2):(g=a.j.get(f)||[],g.push({buffer:b,startTime:c,endTime:d,uri:e,Vi:f}),a.j.set(f,g),v.return());if(!a.m||!a.l)return v.return();if(c==null||d==null)return a.m.parseInit(tb(b)),v.return();h=a.D?0:a.u.get(f);k=a.J||a.D?c:a.u.get(f);l={periodStart:h,segmentStart:c,segmentEnd:d,vttOffset:k,isMpegTs:a.K};m=a.m.parseMedia(tb(b),l,e,[]);n=t(m);for(p=n.next();!p.done;p=
n.next())u=p.value,a.G(u,e||null,l);r=m.filter(function(w){return w.startTime>=a.B&&w.startTime<a.C});a.l.append(r);a.h==null&&(a.h=Math.max(c,a.B));a.i=Math.min(d,a.C);v.l()})}
we.prototype.remove=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n;return G(function(p){if(p.i==1)return p.h(Promise.resolve(),2);if(a>=b||c&&(Ce(d,a,b),d.H===""))return p.return();e=function(u){return u.startTime<b&&u.endTime>a};f=t(d.j.keys());for(g=f.next();!g.done;g=f.next()){h=g.value;k=d.j.get(h);l=[];for(m=0;m<k.length;m++)n=k[m],e(n)||l.push(n);d.j.set(h,l)}d.l&&d.l.remove(a,b)&&d.h!=null&&(b<=d.h||a>=d.i||(a<=d.h&&b>=d.i?d.h=d.i=null:a<=d.h&&b<d.i?d.h=b:a>d.h&&b>=d.i&&(d.i=
a)),De(d));p.l()})};function Ee(a,b,c){c=c===void 0?-1:c;(!a.u.has(c)||a.F!=="HLS"||a.F==="HLS"&&c===-1&&a.u.get(c)===0)&&a.u.set(c,b);b=a.j.get(c)||[];for(var d=0;d<b.length;d++){var e=b[d];Be(a,e.buffer,e.startTime,e.endTime,e.uri,e.Vi)}a.j.set(c,[])}function Fe(a,b){a.K=b}function Ge(a,b,c){a.B=b;a.C=c}function He(a,b,c){a.H=b;if(b=a.o.get(b))b=b.filter(function(d){return d.endTime<=c}),b.length&&a.l.append(b)}
function Ie(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ie(a,d.value,c)}
function Je(a,b,c){var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e=f.stream;f=f.cue;d.getOrInsert(e,[]);Ie(a,f,c);f.startTime>=a.B&&f.startTime<a.C&&(d.get(e).push(f),e==a.H&&a.l.append([f]))}c=t(d.keys());for(b=c.next();!b.done;b=c.next())for(e=b.value,b=a.o.getOrInsertComputed(e,function(){return[]}),e=t(d.get(e)),f=e.next();!f.done;f=e.next())b.push(f.value);De(a)}
function Ce(a,b,c){for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f=a.o.get(e);f=f.filter(function(g){return g.startTime<b||g.endTime>=c});a.o.set(e,f)}}
function De(a){for(var b=Infinity,c=-Infinity,d=t(a.o.values()),e=d.next();!e.done;e=d.next()){e=t(e.value);for(var f=e.next();!f.done;f=e.next())f=f.value,b=Math.min(b,f.startTime),c=Math.max(c,f.endTime)}b!==Infinity&&c!==-Infinity&&(a.h=a.h==null?Math.max(b,a.B):Math.min(a.h,Math.max(b,a.B)),a.i=Math.max(a.i,Math.min(c,a.C)))}J("shaka.text.TextEngine",we);we.prototype.destroy=we.prototype.destroy;we.findParser=ze;we.unregisterParser=function(a){ye.delete(a)};we.registerParser=xe;var ye=new Map;function Ke(a){this.i=a;this.h=null}Ke.prototype.Xa=function(){this.stop();this.i();return this};Ke.prototype.ia=function(a){var b=this;this.stop();Le(this,function(){b.i()},a);return this};Ke.prototype.Ka=function(a){this.stop();Me(this,a);return this};Ke.prototype.stop=function(){var a;(a=this.h)==null||a.call(this);this.h=null};function Le(a,b,c){var d=!0,e=null;a.h=function(){clearTimeout(e);d=!1};e=setTimeout(function(){d&&b()},c*1E3)}function Me(a,b){Le(a,function(){Me(a,b);a.i()},b)}
J("shaka.util.Timer",Ke);Ke.prototype.stop=Ke.prototype.stop;Ke.prototype.tickEvery=Ke.prototype.Ka;Ke.prototype.tickAfter=Ke.prototype.ia;Ke.prototype.tickNow=Ke.prototype.Xa;function Ne(a){return a!=null}function Te(a,b){return Promise.race([b,new Promise(function(c,d){(new Ke(d)).ia(a)})])}function Ue(a){return new Promise(function(b){(new Ke(b)).ia(a)})};function Ve(){}
function We(a,b,c,d,e){if(e.length){var f=a.textStreams;e=t(e);for(var g=e.next(),h={};!g.done;h={Hg:void 0},g=e.next())if(h.Hg=g.value,g=f.filter(function(r){return function(v){return v.codecs.startsWith(r.Hg)||v.mimeType.startsWith(r.Hg)?!0:!1}}(h)),g.length){f=g;break}a.textStreams=f}f=a.variants;if(b.length||c.length)f=Xe(f,b,c);if(d.length){b=new fb;f=t(f);for(c=f.next();!c.done;c=f.next())c=c.value,b.push(String(c.video.width||0),c);var k=[];b.forEach(function(r,v){r=0;var w=[];v=t(v);for(var y=
v.next(),x={};!y.done;x={Xe:void 0},y=v.next())x.Xe=y.value,y=d.filter(function(A){return function(C){return A.Xe.decodingInfos[0][C]}}(x)).length,y>r?(r=y,w=[x.Xe]):y==r&&w.push(x.Xe);k.push.apply(k,va(w))});f=k}b=new Set;c=t(f);for(e=c.next();!e.done;e=c.next())e=e.value,e.video&&b.add(e.video);if(b.size){var l={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};e=Array.from(b).sort(function(r,v){return r.bandwidth&&v.bandwidth&&r.bandwidth!=
v.bandwidth?r.bandwidth-v.bandwidth:r.width!=v.width?r.width-v.width:r.codecs&&v.codecs?(r=ne(r.codecs),v=ne(v.codecs),(l[r]||1)-(l[v]||1)):0});var m=[];b=new Map;c=function(r){var v=[String(r.width||""),String(r.height||""),String(Math.round(r.frameRate||0)),r.hdr||"",r.fastSwitching];r.dependencyStream&&v.push(r.dependencyStream.baseOriginalId||"");r.roles&&v.push(r.roles.sort().join("_"));return v.join(";")};e=t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;h=c(g);var n=b.get(h)||[];if(n.length){var p=
ne(n[n.length-1].codecs),u=ne(g.codecs);p==u&&(n.push(g),m.push(g.id))}else n.push(g),m.push(g.id);b.set(h,n)}a.variants=f.filter(function(r){return(r=r.video)&&!m.includes(r.id)?!1:!0})}else a.variants=f}
function Xe(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={xi:void 0},d=b.next())if(e.xi=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.xi)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={Wg:void 0},b=c.next())if(d.Wg=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Wg)}}(d)),b.length){a=b;break}return a}
function Ye(a,b,c){function d(g,h,k){return g>=h&&g<=k}if(a&&a.video&&a.video.width&&a.video.height){var e=a.video.width,f=a.video.height;f>e&&(f=t([f,e]),e=f.next().value,f=f.next().value);if(!d(e,b.minWidth,Math.min(b.maxWidth,c.width))||!d(f,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e*f,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 G(function(e){if(e.i==1)return e.h($e(a,b,b.offlineSessionIds.length>0,c,d),2);af(b);return e.h(bf(b),0)})}
function $e(a,b,c,d,e){var f,g;return G(function(h){if(h.i==1)return nb().mi()&&cf(b.variants),h.h(df(b.variants,c,!1,d),2);f=null;a&&(g=a.ec())&&(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});h.l()})}
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=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(b);for(var e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;if(a.codecs.includes(e)){a.codecs=a.codecs.replace(e,f);break}}}}
function 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=nb(),e=d.jb()==="Xbox";d=d.Ha()==="MOBILE"&&d.Da()==="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)&&!Dc(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 G(function(l){if(l.i==1){c=function(m,n){if(m){var p=md(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,be:void 0},g=f.next())k=g.value,h.be=nd(k),h.cache=hf,h.cache.has(h.be)?d=c(d,h.cache.get(h.be)):e.push(jf(k).then(function(m){return function(n){var p=
null;n=t(n||[]);for(var u=n.next();!u.done;u=n.next())p=c(p,u.value);p&&(m.cache.set(m.be,p),d=c(d,p))}}(h)));return l.h(Promise.all(e),2)}d&&a.decodingInfos.push(d);l.l()})}
function jf(a){var b=[""];a.video&&(b=re(a.video.contentType).split(","));var c=[""];a.audio&&(c=re(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={tc:void 0},g=f.next())g=g.value,h.tc=ld(a),a.video&&(h.tc.video.contentType=ie(qe(h.tc.video.contentType),e)),a.audio&&(h.tc.audio.contentType=ie(qe(h.tc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){(nb().Ha()=="MOBILE"?Te(5,navigator.mediaCapabilities.decodingInfo(k.tc)):
navigator.mediaCapabilities.decodingInfo(k.tc)).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,p,u,r,v,w,y,x,A,C,z,B;return G(function(D){switch(D.i){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return D.return();f=t(d);g=f.next();h={};case 2:if(g.done){D.A(4);break}h.Uh=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){D.A(7);break}n=m.value;p=kf(n,b,c).filter(function(F){return function(E){E=E[0];E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||E===F.Uh}}(h));u=t(p);r=u.next();case 8:if(r.done){D.A(10);break}v=
r.value;return D.h(gf(n,v),9);case 9:r=u.next();D.A(8);break;case 10:n.decodingInfos.some(function(F){return F.supported})&&(k=!0);m=l.next();D.A(5);break;case 7:if(k)return D.return();h={Uh:void 0};g=f.next();D.A(2);break;case 4:w=t(a),y=w.next();case 12:if(y.done){D.A(0);break}x=y.value;A=kf(x,b,c).filter(function(F){F=F[0];F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});C=t(A);z=C.next();case 15:if(z.done){y=w.next();D.A(12);break}B=z.value;return D.h(gf(x,
B),16);case 16:z=C.next(),D.A(15)}})}
function kf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=re(k);if(l.includes(",")&&!d){var m=l.split(","),n=qe(k);l=vc("video",m);m=vc("audio",m);m=te(m,n);n=le(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=ve(l);k={contentType:le(qe(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||30};if(e.hdr)switch(e.hdr){case "PQ":k.transferFunction=
"pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=qe(l),l=te(re(l),k),k=le(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];f.length==0&&f.push(null);g.length==0&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=k.value,l=t(g),n=l.next();!n.done;n=
l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map;n=t(n);for(m=n.next();!m.done;m=n.next()){m=
m.value;var p=m.videoRobustness+","+m.audioRobustness;l.get(p)||l.set(p,[]);l.get(p).push(m)}l=t(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];p=t(h);for(var u=p.next();!u.done;u=p.next()){u=Object.assign({},u.value);for(var r={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},v=t(n),w=v.next();!w.done;w=v.next()){w=w.value;if(w.initData&&w.initData.length){for(var y=new Set,x=t(w.initData),A=x.next();!A.done;A=x.next())y.add(A.value.initDataType);
r.initDataType=w.initData[0].initDataType}w.distinctiveIdentifierRequired&&(r.distinctiveIdentifier="required");w.persistentStateRequired&&(r.persistentState="required");w.sessionType&&(r.sessionTypes=[w.sessionType]);d&&(r.audio?(w.encryptionScheme&&(r.audio.encryptionScheme=r.audio.encryptionScheme||w.encryptionScheme),r.audio.robustness=r.audio.robustness||w.audioRobustness):(r.audio={robustness:w.audioRobustness},w.encryptionScheme&&(r.audio.encryptionScheme=w.encryptionScheme)),r.audio.robustness==
""&&delete r.audio.robustness);e&&(r.video?(w.encryptionScheme&&(r.video.encryptionScheme=r.video.encryptionScheme||w.encryptionScheme),r.video.robustness=r.video.robustness||w.videoRobustness):(r.video={robustness:w.videoRobustness},w.encryptionScheme&&(r.video.encryptionScheme=w.encryptionScheme)),r.video.robustness==""&&delete r.video.robustness)}u.keySystemConfiguration=r;m.push(u)}a.push(m)}}return a}
function af(a){a.textStreams=a.textStreams.filter(function(b){b=ie(b.mimeType,b.codecs);return Ae(b)})}
function bf(a){var b,c,d,e,f,g,h,k;return G(function(l){switch(l.i){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;f=="application/mp4"&&e.codecs=="mjpg"&&(f="image/jpg");if(lf.has(f)){l.A(5);break}g=mf.get(f);if(!g){lf.set(f,!1);l.A(5);break}return l.h(nf(g),7);case 7:h=l.j,lf.set(f,h);case 5:(k=lf.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,l.l()}})}
function nf(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 of(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=b?b.groupId:null,k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,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,audioLanguage:null,videoLanguage: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.videoLanguage=c.language||null;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.pixelAspectRatio=d.pixelAspectRatio||a.pixelAspectRatio,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=vc("video",e),a.audioCodec=vc("audio",e)}catch(u){}}}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.audioLanguage=b.language||null,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 pf(a){return{id:a.id,active:!1,type:yc,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 qf(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=rf(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 sf(a){return{id:a.id,type:"chapter",bandwidth:a.bandwidth||0,language:a.language}}
function tf(a){a.__shaka_id==void 0&&(a.__shaka_id=uf++);return a.__shaka_id}function vf(a,b){b=b===void 0?!1:b;b={id:tf(a),active:b&&a.mode!="disabled",type:yc,bandwidth:0,language:kc(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 wf(a,b){var c=a?a.language:null;c={id:tf(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:kc(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,audioLanguage:a?kc(a.language||"und"):
null,videoLanguage:b?kc(b.language||"und"):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 xf(a){return a.allowedByApplication&&a.allowedByKeySystem&&a.disabledUntilTime==0}
function yf(a){return a.filter(function(b){return xf(b)})}
function zf(a,b,c,d){if(!b)return[];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=sc(kc(b),a.map(function(k){return k.language}));if(h)e=a.filter(function(k){return kc(k.language)==h});else return[]}e=e.filter(function(k){return k.forced==d});if(c){if(a=Af(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(function(k,
l){return k.concat(l)},[]);return a.length?Af(e,a[0]):e}function Af(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Bf(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}
function Cf(a,b){b.length&&(b=b.filter(function(c){return ne(a.codecs)==ne(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 Df(a){var b={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",supplementalCodecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],accessibilityPurpose:null,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,
isAudioMuxedInVideo:!1,baseOriginalId:null,isIframe:!1};Object.assign(b,a);b.mimeType&&b.fullMimeTypes.add(ie(b.mimeType,b.codecs));return b}
function Ef(a){var b={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Df({mimeType:c?qe(c):"",codecs:c?re(c):"",encrypted:!0,language:"und",type:"video"});c.startsWith("audio/")?(d.type="audio",b.audio=d):b.video=d}return b}J("shaka.util.StreamUtils",Ve);Ve.meetsRestrictions=Ye;
var hf=new Map,uf=0,lf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),mf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Ff(){var a=this;this.M=this.H=null;this.u=!1;this.B=new Sa;this.j=new gb;navigator.connection&&navigator.connection.addEventListener&&this.j.I(navigator.connection,"change",function(){a.h.useNetworkInformation&&navigator.onLine&&(a.B=new Sa,a.h&&a.B.configure(a.h.advanced),a.trySuggestStreams())});this.o=[];this.J=1;this.P=!1;this.m=this.i=this.h=this.C=null;this.D=new Ke(function(){if(a.u&&(a.h.restrictToElementSize||a.h.restrictToScreenSize)){var b=a.chooseVariant();b&&a.H&&a.H(b,a.h.clearBufferSwitch,
a.h.safeMarginSwitch)}});this.F=window;"documentPictureInPicture"in window&&this.j.I(window.documentPictureInPicture,"enter",function(){a.F=window.documentPictureInPicture.window;a.D&&a.D.Xa();a.j.Ja(a.F,"pagehide",function(){a.F=window;a.D&&a.D.Xa()})});this.N=this.G=this.l=null;this.L=this.K=0}q=Ff.prototype;q.stop=function(){this.H=null;this.u=!1;this.o=[];this.J=1;this.i=this.C=null;var a;(a=this.m)==null||a.disconnect();this.m=null;var b;(b=this.D)==null||b.stop();this.G=this.l=null;Gf(this)};
q.release=function(){this.stop();this.j.release();this.D=null};q.init=function(a,b){this.H=a;this.M=b};
q.chooseVariant=function(a){a=a===void 0?!1:a;var b=Infinity,c=Infinity;this.h.restrictToScreenSize&&(c=this.h.ignoreDevicePixelRatio?1:this.F.devicePixelRatio,b=this.F.screen.height*c,c*=this.F.screen.width);if(this.m&&this.h.restrictToElementSize){var d=this.h.ignoreDevicePixelRatio?1:this.F.devicePixelRatio,e=this.i.clientHeight,f=this.i.clientWidth;this.l&&document.pictureInPictureElement&&document.pictureInPictureElement==this.i&&(e=this.l.height,f=this.l.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.h.restrictions,d,Infinity,Infinity);if(b!=Infinity||c!=Infinity){a=If(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=Hf(this,this.h.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.J)?1:Math.abs(this.J);f=g*e.bandwidth/this.h.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.h.bandwidthUpgradeTarget;c&&e&&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};q.enable=function(){this.u=!0;Jf(this);this.o.length&&this.trySuggestStreams()};q.disable=function(){this.u=!1};q.segmentDownloaded=function(a,b,c){a>=this.h.cacheLoadThreshold&&this.B.sample(a,b);c&&this.C!=null&&this.u&&Kf(this)};q.trySuggestStreams=function(){this.u&&(this.C=Date.now(),Kf(this,!0))};
q.getBandwidthEstimate=function(){var a=this.h.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.h.useNetworkInformation&&(a=navigator.connection.downlink*1E6);if(navigator.connection&&navigator.connection.downlink&&this.h.useNetworkInformation&&this.h.preferNetworkInformationBandwidth)return a;a=this.B.getBandwidthEstimate(a);return this.G?this.G.getBandwidthEstimate(a):a};q.setVariants=function(a){if(cb(a,this.o))return!1;this.o=a;return!0};
q.playbackRateChanged=function(a){this.J=a};q.setMediaElement=function(a){function b(){c.D.ia(Lf)}var c=this;this.i=a;this.m&&(this.m.disconnect(),this.m=null);this.i&&"ResizeObserver"in window&&(this.m=new ResizeObserver(b),this.m.observe(this.i));this.j.I(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.l=d.pictureInPictureWindow,c.j.I(c.l,"resize",b))});this.j.I(a,"leavepictureinpicture",function(){c.l&&c.j.mb(c.l,"resize",b);c.l=null});Mf(this)};
q.setCmsdManager=function(a){this.G=a};q.configure=function(a){this.h=a;this.B&&this.h&&this.B.configure(this.h.advanced);Mf(this)};function Kf(a,b){if(b===void 0||!b){if(!a.P){b=a.B;if(!(b.h>=b.j))return;a.P=!0;a.C-=(a.h.switchInterval-a.h.minTimeToSwitch)*1E3}if(Date.now()-a.C<a.h.switchInterval*1E3)return}b=a.chooseVariant();a.getBandwidthEstimate();b&&a.H&&(a.H(b,a.h.clearBufferSwitch,a.h.safeMarginSwitch),Jf(a))}
function Hf(a,b,c,d,e){if(a.G){var f=a.G.oh();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=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&(c=c.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}
function Mf(a){Gf(a);var b=a.i;a.h.droppedFrames&&b!=null&&b.getVideoPlaybackQuality&&(Jf(a),Nf(a),a.N=(new Ke(function(){if(!a.i.paused&&a.u&&a.h.droppedFrames){var c=a.i.getVideoPlaybackQuality(),d=c.droppedVideoFrames;c=c.totalVideoFrames;if((isNaN(a.J)?1:Math.abs(a.J))>1||!c)a.K=d,a.L=c;else{var e=d-a.K,f=c-a.L;a.K=d;a.L=c;e/f>=a.h.advanced.droppedFramesThreshold&&a.M&&a.M("video",a.h.advanced.droppedFramesBanDuration)}}})).Ka(a.h.advanced.droppedFramesInterval))}
function Gf(a){a.j.mb(a.i,"resize");var b;(b=a.N)==null||b.stop();a.N=null}function Jf(a){var b=a.i;a.h.droppedFrames&&(b==null?0:b.getVideoPlaybackQuality)&&(b=b.getVideoPlaybackQuality(),a.K=b.droppedVideoFrames,a.L=b.totalVideoFrames)}function Nf(a){a.j.I(a.i,"resize",function(){Jf(a)})}J("shaka.abr.SimpleAbrManager",Ff);Ff.prototype.configure=Ff.prototype.configure;Ff.prototype.setCmsdManager=Ff.prototype.setCmsdManager;Ff.prototype.setMediaElement=Ff.prototype.setMediaElement;
Ff.prototype.playbackRateChanged=Ff.prototype.playbackRateChanged;Ff.prototype.setVariants=Ff.prototype.setVariants;Ff.prototype.getBandwidthEstimate=Ff.prototype.getBandwidthEstimate;Ff.prototype.trySuggestStreams=Ff.prototype.trySuggestStreams;Ff.prototype.segmentDownloaded=Ff.prototype.segmentDownloaded;Ff.prototype.disable=Ff.prototype.disable;Ff.prototype.enable=Ff.prototype.enable;Ff.prototype.chooseVariant=Ff.prototype.chooseVariant;Ff.prototype.init=Ff.prototype.init;
Ff.prototype.release=Ff.prototype.release;Ff.prototype.stop=Ff.prototype.stop;var Lf=1;function Of(a,b,c,d,e,f){f=f===void 0?!1:f;if(d>=e)return null;for(var g=-1,h=-1,k=0;k<c.length;k++)c[k].some(function(D){return D!=null&&D.h.trim()!=""})&&(g===-1&&(g=k),h=k);if(g===-1||h===-1)return null;for(var l=k=!1,m="white",n="black",p=d,u=Pf(d,e,k,l,m,n);g<=h;g++){for(var r=c[g],v=-1,w=-1,y=0;y<r.length;y++)r[y]!=null&&r[y].h.trim()!==""&&(v===-1&&(v=y),w=y);if(v===-1||w===-1)r=Qf(d,e),a.nestedCues.push(r);else{for(;v<=w;v++)if(y=r[v]){var x=y.m,A=y.j,C=y.l,z=y.i,B=y.o;B=f&&B!=null&&B>d?B:
d;if(x!=k||A!=l||C!=m||z!=n||B!=p)u.payload&&a.nestedCues.push(u),u=Pf(B,e,x,A,C,z),k=x,l=A,m=C,n=z,p=B;u.payload+=y.h}else u.payload+=" ";u.payload&&a.nestedCues.push(u);g!==h&&(p=Qf(d,e),a.nestedCues.push(p));p=d;u=Pf(d,e,k,l,m,n)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Pf(a,b,c,d,e,f){a=new Bd(a,b,"");c&&a.textDecoration.push(Xd);d&&(a.fontStyle=Wd);a.color=e;a.backgroundColor=f;return a}function Qf(a,b){a=new Bd(a,b,"");a.lineBreak=!0;return a}
function Rf(a,b){switch(a){case Sf:return b==6;case Tf:return b==39||b==40;case Uf:return b==23||b==24;default:return!1}}var Sf=0,Tf=1,Uf=2;function Vf(a,b,c,d,e,f){this.h=a;this.m=b;this.j=c;this.i=d;this.l=e;this.o=f===void 0?null:f};function Wf(a,b){this.j=[];this.h=1;this.i=0;this.F=a;this.D=b;this.m=this.u=!1;this.o="white";this.C="black";this.B=this.l=null;Xf(this)}function Yf(a,b,c,d){d=d===void 0?!1:d;var e="CC"+((a.F<<1|a.D)+1),f=new Bd(b,c,"");f.lineInterpretation=1;var g=a.j.findIndex(function(h){return h.some(function(k){return k.h.trim()!=""})});if(g=Zf.get(g))f.line=g;a.B!=null&&a.l!=null&&(f.position=10+Math.min(70,a.B*10)+a.l*2.5);return Of(f,e,a.j,b,c,d)}function Xf(a){$f(a,0,15);a.h=1;a.l=null;a.B=null}
function ag(a,b,c,d){d=d===void 0?null:d;if(!(c<32||c>127)){var e="";switch(b){case 0:e=bg.has(c)?bg.get(c):String.fromCharCode(c);break;case 1:e=cg.get(c);break;case 2:a.j[a.h].pop();e=dg.get(c);break;case 3:a.j[a.h].pop(),e=eg.get(c)}e&&a.j[a.h].push(new Vf(e,a.u,a.m,a.C,a.o,d))}}function fg(a,b,c,d){if(!(c<0||b<0))if(b>=c)for(--d;d>=0;d--)a.j[b+d]=a.j[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.j[b+e]=a.j[c+e].map(function(f){return f})}
function $f(a,b,c){for(var d=0;d<=c;d++)a.j[b+d]=[]}
var bg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),cg=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"]]),dg=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"]]),eg=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"]]),Zf=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 gg(a,b){this.i=0;this.u=new Wf(a,b);this.j=new Wf(a,b);this.h=this.l=new Wf(a,b);this.m=0;this.o=null}function hg(a,b,c){a.h=a.j;var d=a.h,e=null;a.i!==3&&a.i!==4&&(e=Yf(d,a.m,c,a.i===2),c=a.j,c.h=c.i>0?c.i:0,$f(c,0,15),c=a.l,c.h=c.i>0?c.i:0,$f(c,0,15),d.h=15);a.i=3;d.i=b;return e}function ig(a){a.i=1;a.h=a.l;a.h.i=0}function jg(a){Xa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.h=a.u;a.i=4}var kg="black green blue cyan red yellow magenta black".split(" "),og="white green blue cyan red yellow magenta white_italics".split(" ");function pg(a,b){this.K=b;this.N=a;this.L=this.m=!1;this.o=this.u=this.H=this.M=this.J=0;this.G=2;this.j=[];this.h=this.i=this.l=0;this.F=this.C=!1;this.D="white";this.B="black";qg(this)}function qg(a){a.j=[];for(var b=0;b<16;b++)a.j.push(rg())}function rg(){for(var a=[],b=0;b<42;b++)a.push(null);return a}function sg(a,b){tg(a)&&(a.j[a.i][a.h]=new Vf(b,a.F,a.C,a.B,a.D),a.h++)}function tg(a){var b=a.h<a.o&&a.h>=0;return a.i<a.u&&a.i>=0&&b}pg.prototype.isVisible=function(){return this.m};
function ug(a,b,c){var d=new Bd(a.l,b,"");d.textAlign=a.G===0?"left":a.G===1?"right":Dd;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.N;e.height=a.u;e.width=a.o;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?ad: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=Of(d,"svc"+c,a.j,a.l,b))a.l=b;return c}pg.prototype.display=function(){this.m=!0};function vg(){this.j=[];this.i=null;this.h=0}function wg(a,b){b.type===3?(a.h=(b.value&63)*2-1,a.i=[]):a.i&&(a.h>0&&(a.i.push(b),a.h--),a.h===0&&(a.j.push(new xg(a.i)),a.i=null,a.h=0))}function xg(a){this.h=0;this.i=a}xg.prototype.Va=function(){return this.h<this.i.length};xg.prototype.Ia=function(){return this.h};function yg(a){if(!a.Va())throw new K(2,2,3E3);return a.i[a.h++]}xg.prototype.skip=function(a){if(this.h+a>this.i.length)throw new K(2,2,3E3);this.h+=a};
xg.prototype.$h=function(a){if(this.h-a<0)throw new K(2,2,3E3);this.h-=a};function zg(a){this.j=a;this.i=[null,null,null,null,null,null,null,null];this.h=null}
function Ag(a,b){var c=yg(b),d=c.value;c=c.pts;if(d===16){var e=yg(b);d=d<<16|e.value}if(d>=0&&d<=31){e=d;if(e==24)c=yg(b).value,b=yg(b).value,a.h&&sg(a.h,String.fromCharCode(c<<8|b)),a=[];else if(a.h){b=a.h;d=null;switch(e){case 8:!tg(b)||b.h<=0&&b.i<=0||(b.h<=0?(b.h=b.o-1,b.i--):b.h--,b.j[b.i][b.h]=null);break;case 13:b.isVisible()&&(d=ug(b,c,a.j));if(b.i+1>=b.u){a=0;for(c=1;c<16;c++,a++)b.j[a]=b.j[c];for(c=0;c<1;c++,a++)b.j[a]=rg()}else b.i++;b.h=0;break;case 14:b.isVisible()&&(d=ug(b,c,a.j));
b.j[b.i]=rg();b.h=0;break;case 12:b.isVisible()&&(d=ug(b,c,a.j)),qg(b),b.i=0,b.h=0}a=d?[d]:[]}else a=[];return a}if(d>=128&&d<=159)return Bg(a,b,d,c);d>=4096&&d<=4127?(a=d&255,a>=8&&a<=15?b.skip(1):a>=16&&a<=23?b.skip(2):a>=24&&a<=31&&b.skip(3)):d>=4224&&d<=4255?(a=d&255,a>=128&&a<=135?b.skip(4):a>=136&&a<=143&&b.skip(5)):d>=32&&d<=127?(b=d,a.h&&(b===127?sg(a.h,"\u266a"):sg(a.h,String.fromCharCode(b)))):d>=160&&d<=255?a.h&&sg(a.h,String.fromCharCode(d)):d>=4128&&d<=4223?(b=d&255,a.h&&(Cg.has(b)?(b=
Cg.get(b),sg(a.h,b)):sg(a.h,"_"))):d>=4256&&d<=4351&&a.h&&((d&255)!=160?sg(a.h,"_"):sg(a.h,"[CC]"));return[]}
function Bg(a,b,c,d){if(c>=128&&c<=135)d=c&7,a.i[d]&&(a.h=a.i[d]);else{if(c===136){c=yg(b).value;b=[];c=t(Dg(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.i[e.value];if(e.isVisible()){var f=ug(e,d,a.j);f&&b.push(f)}qg(e)}return b}if(c===137)for(b=yg(b).value,b=t(Dg(a,b)),c=b.next();!c.done;c=b.next())c=a.i[c.value],c.isVisible()||(c.l=d),c.display();else{if(c===138){c=yg(b).value;b=null;c=t(Dg(a,c));for(e=c.next();!e.done;e=c.next())e=a.i[e.value],e.isVisible()&&(b=ug(e,d,a.j)),e.m=!1;return b?
[b]:[]}if(c===139){c=yg(b).value;b=null;c=t(Dg(a,c));for(e=c.next();!e.done;e=c.next())e=a.i[e.value],e.isVisible()?b=ug(e,d,a.j):e.l=d,e.m=!e.m;return b?[b]:[]}if(c===140)return b=yg(b).value,Eg(a,b,d);if(c===143)return d=Eg(a,255,d),Fg(a),d;if(c===144)b.skip(1),d=yg(b).value,a.h&&(a.h.C=(d&128)>0,a.h.F=(d&64)>0);else if(c===145)d=yg(b).value,c=yg(b).value,b.skip(1),a.h&&(b=Gg[(c&48)>>4>>1<<2|(c&12)>>2>>1<<1|(c&3)>>1],a.h.D=Gg[(d&48)>>4>>1<<2|(d&12)>>2>>1<<1|(d&3)>>1],a.h.B=b);else if(c===146)d=
yg(b).value,b=yg(b).value,a.h&&(a=a.h,a.i=d&15,a.h=b&63);else if(c===151)b.skip(1),b.skip(1),d=yg(b).value,b.skip(1),a.h&&(a.h.G=d&3);else if(c>=152&&c<=159){c=(c&15)-8;e=a.i[c]!==null;e||(f=new pg(c,a.j),f.l=d,a.i[c]=f);d=yg(b).value;f=yg(b).value;var g=yg(b).value,h=yg(b).value,k=yg(b).value;b=yg(b).value;e&&(b&7)===0||(b=a.i[c],b.i=0,b.h=0,b.F=!1,b.C=!1,b.D="white",b.B="black");b=a.i[c];b.m=(d&32)>0;b.M=f&127;b.J=g;b.H=(h&240)>>4;b.L=(f&128)>0;b.u=(h&15)+1;b.o=(k&63)+1;a.h=a.i[c]}}}return[]}
function Dg(a,b){for(var c=[],d=0;d<8;d++)(b&1)===1&&a.i[d]&&c.push(d),b>>=1;return c}function Eg(a,b,c){var d=[];b=t(Dg(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.i[e];f.isVisible()&&(f=ug(f,c,a.j))&&d.push(f);a.i[e]=null}return d}function Fg(a){a.h=null;a.i=[null,null,null,null,null,null,null,null]}
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"]]),Gg="black blue green cyan red magenta yellow white".split(" ");function Hg(a,b){this.i=xb(a);this.j=b==Ig;this.h=0}q=Hg.prototype;q.Va=function(){return this.h<this.i.byteLength};q.Ia=function(){return this.h};q.Oa=function(){return this.i.byteLength};q.W=function(){try{var a=this.i.getUint8(this.h);this.h+=1;return a}catch(b){throw Jg();}};q.va=function(){try{var a=this.i.getUint16(this.h,this.j);this.h+=2;return a}catch(b){throw Jg();}};q.R=function(){try{var a=this.i.getUint32(this.h,this.j);this.h+=4;return a}catch(b){throw Jg();}};
q.og=function(){try{var a=this.i.getInt32(this.h,this.j);this.h+=4;return a}catch(b){throw Jg();}};q.Ne=function(){try{if(this.j){var a=this.i.getUint32(this.h,!0);var b=this.i.getUint32(this.h+4,!0)}else b=this.i.getUint32(this.h,!1),a=this.i.getUint32(this.h+4,!1)}catch(c){throw Jg();}if(b>2097151)throw new K(2,3,3001);this.h+=8;return b*4294967296+a};q.wa=function(a,b){if(this.h+a>this.i.byteLength)throw Jg();var c=tb(this.i,this.h,a);this.h+=a;return b?new Uint8Array(c):c};
q.skip=function(a){if(this.h+a>this.i.byteLength)throw Jg();this.h+=a};q.$h=function(a){if(this.h<a)throw Jg();this.h-=a};q.seek=function(a){if(a<0||a>this.i.byteLength)throw Jg();this.h=a};q.$c=function(){for(var a=this.h;this.Va()&&this.i.getUint8(this.h)!=0;)this.h+=1;a=tb(this.i,a,this.h-a);this.h+=1;return Bb(a)};function Jg(){return new K(2,3,3E3)}J("shaka.util.DataViewReader",Hg);Hg.prototype.readTerminatedString=Hg.prototype.$c;Hg.prototype.seek=Hg.prototype.seek;Hg.prototype.rewind=Hg.prototype.$h;
Hg.prototype.skip=Hg.prototype.skip;Hg.prototype.readBytes=Hg.prototype.wa;Hg.prototype.readUint64=Hg.prototype.Ne;Hg.prototype.readInt32=Hg.prototype.og;Hg.prototype.readUint32=Hg.prototype.R;Hg.prototype.readUint16=Hg.prototype.va;Hg.prototype.readUint8=Hg.prototype.W;Hg.prototype.getLength=Hg.prototype.Oa;Hg.prototype.getPosition=Hg.prototype.Ia;Hg.prototype.hasMoreData=Hg.prototype.Va;var Ig=1;Hg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ig};function Kg(){this.h=[];this.i=[];this.j=new vg;this.l=0;this.m=new Map([["CC1",new gg(0,0)],["CC2",new gg(0,1)],["CC3",new gg(1,0)],["CC4",new gg(1,1)]]);this.u=this.o=0;this.D=new Map;this.C=!0;this.B=new Set;Lg(this)}q=Kg.prototype;q.clear=function(){this.l=0;this.h=[];this.i=[];var a=this.j;a.j=[];a.i=null;a.h=0;Lg(this);a=t(this.D.values());for(var b=a.next();!b.done;b=a.next())Fg(b.value)};
function Lg(a){a.o=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.i=0,c.h=c.l,c.o=null,Xf(c.j),Xf(c.l),Xf(c.u);a.C=!0}
q.extract=function(a,b){if(this.C){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.m=b;this.C=!1}a=new Hg(a,0);if(!(a.Oa()<8)&&a.W()===181&&a.va()===49&&a.R()===1195456820&&a.W()===3&&(c=a.W(),(c&64)!==0))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.W(),f=(e&4)>>2,g=a.W(),h=a.W();f&&(e&=3,e===0||e===1?this.h.push({pts:b,type:e,gb:g,Bb:h,order:this.h.length}):(this.i.push({pts:b,type:e,value:g,order:this.i.length}),this.i.push({pts:b,type:2,value:h,order:this.i.length})))}};
q.extractRaw608=function(a,b){for(var c=0;c+1<a.length;c+=2)this.h.push({pts:b,type:0,gb:a[c],Bb:a[c+1],order:this.h.length})};
q.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.i.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Mg(this,d.value))&&b.push(d);c=t(this.i);for(d=c.next();!d.done;d=c.next())wg(this.j,d.value);c=t(this.j.j);for(d=c.next();!d.done;d=c.next())d=Ng(this,d.value),b.push.apply(b,va(d));this.j.j=[];this.h=[];this.i=[];return b};
function Mg(a,b){var c=b.type;if((b.gb&112)===16){var d=b.gb>>3&1;c===0?a.o=d:a.u=d}var e="CC"+((c<<1|(c?a.u:a.o))+1);c=a.m.get(e);if(b.gb===255&&b.Bb===255||!b.gb&&!b.Bb||!Og(b.gb)||!Og(b.Bb))return++a.l>=45&&Lg(a),null;a.l=0;b.gb&=127;b.Bb&=127;d=b.gb;if(d>=1&&d<=15||!b.gb&&!b.Bb)return null;d=null;if((b.gb&112)===16)a:{a.B.add(e),d=b.gb;a=b.Bb;e=b.pts;if(c.o===(d<<8|a))c.o=null;else if(c.o=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=og[Math.floor(g/2)]:g<=15?e=!0:f=Math.floor((g-16)/2);a=(a&1)===1;c.i!==4&&(g=c.h,c.i===3&&b!==g.h&&(c=1+b-g.i,fg(g,c,1+g.h-g.i,g.i),$f(g,0,c-1),$f(g,b+1,15-b)),g.h=b,g.u=a,g.m=e,g.o=d,g.B=f,g.l=null,g.C="black")}else if((d&247)===17&&(a&240)===32)c.h.u=!1,c.h.m=!1,c.h.o="white",ag(c.h,0,32,e),b=!1,d=og[(a&14)>>1],d==="white_italics"&&(d="white",b=!0),c.h.u=(a&1)===1,c.h.m=b,c.h.o=d;else if((d&247)===16&&(a&240)===32||(d&247)===23&&(a&255)===45)b="black",
(d&7)===0&&(b=kg[(a&14)>>1]),c.h.C=b;else if((d&247)===17&&(a&240)===48)ag(c.h,1,a,e);else if((d&246)===18&&(a&224)===32)ag(c.h,d&1?3:2,a,e);else{if((d&246)===20&&(a&240)===32){a=b.pts;d=null;switch(b.Bb){case 32:ig(c);break;case 33:c=c.h;c.j[c.h].pop();break;case 37:d=hg(c,2,a);break;case 38:d=hg(c,3,a);break;case 39:d=hg(c,4,a);break;case 40:ag(c.h,0,32,a);break;case 41:c.i=2;c.h=c.j;c.h.i=0;c.m=a;break;case 42:Xf(c.u);jg(c);break;case 43:jg(c);break;case 44:b=c.j;d=null;c.i!==4&&(d=Yf(b,c.m,a,
c.i===2||c.i===3));$f(b,0,15);break;case 45:b=c.h;c.i!==3?d=null:(d=Yf(b,c.m,a,!0),e=b.h-b.i+1,fg(b,e-1,e,b.i),$f(b,0,e-1),$f(b,b.h,15-b.h),c.m=a);break;case 46:$f(c.l,0,15);break;case 47:b=null,c.i!==4&&(b=Yf(c.j,c.m,a,c.i===2||c.i===3)),d=c.l,c.l=c.j,c.j=d,ig(c),c.m=a,d=b}break a}(d==23||d==31)&&a>=33&&a<=35&&(c.h.l=a-32)}d=null}else a=b.Bb,e=b.pts,ag(c.h,0,b.gb,e),ag(c.h,0,a,e);return d}
function Ng(a,b){var c=[];try{for(;b.Va();){var d=yg(b).value,e=(d&224)>>5,f=d&31;e===7&&f!=0&&(e=yg(b).value&63);if(e!=0){a.B.add("svc"+e);for(var g=a.D.getOrInsertComputed(e,function(l){return new zg(l)}),h=b.Ia();b.Ia()-h<f;){var k=Ag(g,b);c.push.apply(c,va(k))}}}}catch(l){if(l instanceof K&&l.code===3E3)Xa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw l;}return c}function Og(a){for(var b=0;a;)b^=a&1,a>>=1;return b===1}q.getStreams=function(){return Array.from(this.B)};
J("shaka.cea.CeaDecoder",Kg);Sc=function(){return new Kg};function Pg(a){var b=[];a=Tb(a);for(var c=0;c<a.length;){for(var d=0;a[c]==255;)d+=255,c++;d+=a[c++];for(var e=0;a[c]==255;)e+=255,c++;e+=a[c++];d==4&&b.push(a.subarray(c,c+e));c+=e}return b};function Qg(){this.j=new Map;this.i=new Map;this.h=!1}q=Qg.prototype;q.box=function(a,b){a=Rg(a);this.j.set(a,Sg);this.i.set(a,b);return this};q.ka=function(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())this.box(c.value,b);return this};q.O=function(a,b){a=Rg(a);this.j.set(a,Tg);this.i.set(a,b);return this};q.jh=function(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())this.O(c.value,b);return this};q.stop=function(){this.h=!0};
q.parse=function(a,b,c){a=new Hg(a,0);for(this.h=!1;a.Va()&&!this.h;)this.Yc(0,a,b,c)};
q.Yc=function(a,b,c,d){var e=b.Ia();if(d&&e+8>b.Oa())this.h=!0;else{var f=b.R(),g=b.R(),h=Ug(g),k=!1;switch(f){case 0:f=b.Oa()-e;break;case 1:if(d&&b.Ia()+8>b.Oa()){this.h=!0;return}f=b.Ne();k=!0}var l=this.i.get(g);if(l){var m=null,n=null;if(this.j.get(g)==Tg){if(d&&b.Ia()+4>b.Oa()){this.h=!0;return}n=b.R();m=n>>>24;n&=16777215}g=e+f;c&&g>b.Oa()&&(g=b.Oa());d&&g>b.Oa()?this.h=!0:(g-=b.Ia(),b=g>0?b.wa(g,!1):new Uint8Array(0),b=new Hg(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.Ia(),b.Oa()-b.Ia()))}};function Vg(a){for(var b=Wg(a);a.reader.Va()&&!a.parser.h;)a.parser.Yc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Xg(a){for(var b=Wg(a),c=a.reader.R(),d=0;d<c&&(a.parser.Yc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial),!a.parser.h);d++);}
function Yg(a){var b=Wg(a);for(a.reader.skip(78);a.reader.Va()&&!a.parser.h;)a.parser.Yc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function Zg(a){var b=Wg(a);a.reader.skip(8);var c=a.reader.va();a.reader.skip(6);c==2?a.reader.skip(48):a.reader.skip(12);for(c==1&&a.reader.skip(16);a.reader.Va()&&!a.parser.h;)a.parser.Yc(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function $g(a,b){return function(c){a(c.reader.wa(c.reader.Oa()-c.reader.Ia(),b))}}
function Rg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Ug(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Wg(a){return 8+(a.has64BitSize?8:0)+(a.flags!=null?4:0)}J("shaka.util.Mp4Parser",Qg);Qg.headerSize=Wg;Qg.typeToString=Ug;Qg.allData=$g;Qg.audioSampleEntry=Zg;Qg.visualSampleEntry=Yg;Qg.sampleDescription=Xg;Qg.children=Vg;Qg.prototype.parseNext=Qg.prototype.Yc;Qg.prototype.parse=Qg.prototype.parse;
Qg.prototype.stop=Qg.prototype.stop;Qg.prototype.fullBoxes=Qg.prototype.jh;Qg.prototype.fullBox=Qg.prototype.O;Qg.prototype.boxes=Qg.prototype.ka;Qg.prototype.box=Qg.prototype.box;var Sg=0,Tg=1,ah=["moov","trak","mdia","minf","stbl"],bh=["moof","traf"],ch=[].concat(va(["avc1","avc3","dvav","dva1"]),va(["hev1","hvc1","dvh1","dvhe"])),dh=[].concat(va(ch),va(["vvc1","vvi1","dvc1","dvi1"])),eh="ac-3 ec-3 ac-4 Opus fLaC apac".split(" ");function fh(a,b){var c=null,d=null,e=null,f=null,g=a.R();b&1&&(e=a.Ne());b&2&&(f=a.R());b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:g,Ob:c,ac:d,Yg:e,yg:f}}function gh(a,b){return b==1?(b=a.R(),a=a.R(),{Ca:b*4294967296+a}):{Ca:a.R()}}function hh(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.R();a.skip(4);a=a.va();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function ih(a,b,c){var d=a.R(),e=[],f=null;c&1&&(f=a.og());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={bd:null,sampleSize:null,Qe:null};c&256&&(h.bd=a.R());c&512&&(h.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(h.Qe=b==0?a.R():a.og());e.push(h)}return{sampleCount:d,nc:e,Zb:f}}
function jh(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.R();b==1?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.va()+a.va()/16;a=a.va()+a.va()/16;return{trackId:c,width:b,height:a}}function kh(a){a.skip(6);a.skip(2);a.skip(8);var b=a.va();a.skip(2);a.skip(2);a.skip(2);a=a.va()+a.va()/65536;return{channelCount:b,sampleRate:a}}function lh(a){a=a.R();return{codec:Ug(a)}}
function mh(a,b){a.W();var c=a.W(),d=b>=1?c>>4&15:0;b=b>=1?c&15:0;c=a.W();var e=a.W(),f=a.wa(16,!1);f=Pb(f);var g=null;c===1&&e===0&&(g=a.W(),g=a.wa(g,!0));return{defaultKID:f,Nl:c,Ti:e,oe:d,pe:b,$b:g}}
function nh(a){var b=null,c=null,d=a.wa(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.va()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.va();a.va();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,Md:c}}
function oh(a,b){a=a.toString(16).toUpperCase();return(b===void 0?0:b)?a:("0"+a).slice(-2)}function ph(a){return(a<10?"0":"")+a}
function qh(a,b,c,d){var e=!!(b&2);b&1&&(a.skip(3),c=a.W(),a.skip(16),c===0&&(d=a.W(),d=a.wa(d,!0)));b=a.R();for(var f=[],g=0;g<b;g++){var h=d;if(c>0)h=a.wa(c,!0);else if(!h)throw Error("SENC specifies IV size 0 but no constant IV is available.");var k=new Uint8Array(16);k.set(h.subarray(0,Math.min(h.length,16)),0);h=null;if(e){var l=a.va();h=[];for(var m=0;m<l;m++)h.push({nd:a.va(),cc:a.R()})}f.push({iv:k,oi:h})}return{Qa:f}};function rh(){this.l=new Map;this.j=this.i=0;this.m=null;this.h=sh}
rh.prototype.init=function(a){var b=this,c=[],d=[],e=null;(new Qg).ka([].concat(va(ah),["mvex"]),Vg).O("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.R();g=g.R();b.i=f;b.j=g}).O("tkhd",function(f){f=jh(f.reader,f.version);e=f.trackId;c.push(f.trackId)}).O("mdhd",function(f){f=hh(f.reader,f.version);d.push(f.timescale)}).O("stsd",Xg).ka(dh,function(f){f=f.name;th.has(f)&&(b.h=th.get(f))}).box("encv",Yg).box("sinf",Vg).box("frma",function(f){f=lh(f.reader).codec;th.has(f)&&(b.h=th.get(f))}).box("c608",
function(){b.h=uh;b.m=e}).parse(a,!0,!0);if(!c.length||!d.length||c.length!=d.length)throw new K(2,2,2010);this.h==sh&&Va("Unable to determine bitstream format for CEA parsing!");c.forEach(function(f,g){b.l.set(f,d[g])})};
rh.prototype.parse=function(a){var b=this;if(this.h==sh)return[];var c=[],d=0,e=[];(new Qg).box("moof",function(f){d=f.start;e=[];Vg(f)}).box("traf",function(f){e.push({trackId:null,Ca:null,Ob:b.i,ac:b.j,jg:[],timescale:9E4});Vg(f)}).O("trun",function(f){var g=e[e.length-1];f=ih(f.reader,f.version,f.flags);g.jg.push(f)}).O("tfhd",function(f){var g=e[e.length-1];f=fh(f.reader,f.flags);g.trackId=f.trackId;g.Ob=f.Ob||b.i;g.ac=f.ac||b.j;f=f.trackId;b.l.has(f)&&(g.timescale=b.l.get(f))}).O("tfdt",function(f){var g=
e[e.length-1];f=gh(f.reader,f.version);g.Ca=f.Ca}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Ia(),k=t(e),l=k.next();!l.done;l=k.next()){var m=l.value;if(b.h!=uh||m.trackId===b.m)if(m.Ca===null)Va("Unable to find base media decode time for CEA captions!");else if(f.reader.seek(h),b.h===uh){l=f.reader;var n=m.timescale,p=m.Ob,u=m.ac,r=m.Ca,v=t(m.jg);for(m=v.next();!m.done;m=v.next()){m=m.value;m.Zb!=null&&l.seek(g+m.Zb);m=t(m.nc);for(var w=m.next();!w.done;w=m.next()){w=w.value;var y=
r/n,x=l.wa(w.sampleSize||u,!1);c.push({packet:x,pts:y,format:Wc});r+=w.bd||p}}}else a:for(l=b,n=f.reader,p=m.timescale,u=m.Ob,r=m.ac,v=m.Ca,m=t(m.jg),w=m.next();!w.done;w=m.next())for(w=w.value,w.Zb!=null&&n.seek(g+w.Zb),w=t(w.nc),y=w.next();!y.done;y=w.next()){y=y.value;x=(v+(y.Qe||0))/p;for(var A=y.sampleSize||r;A>0&&n.Va();){var C=n.R(),z=n.W(),B=1;switch(l.h){case vh:z&=31;z=Rf(Sf,z);break;case wh:case xh:B=2;n.skip(1);z=z>>1&63;z=Rf(l.h===wh?Tf:Uf,z);break;default:break a}if(z)for(B=n.wa(C-B,
!1),B=t(Pg(B)),z=B.next();!z.done;z=B.next())c.push({packet:z.value,pts:x,format:Vc});else try{n.skip(C-B)}catch(D){break a}A-=C+4}v+=y.bd||u}}}).parse(a,!1,!0);return c};J("shaka.cea.Mp4CeaParser",rh);var sh=0,vh=1,wh=2,xh=3,uh=4,th=(new Map).set("avc1",vh).set("avc3",vh).set("dvav",vh).set("dva1",vh).set("hev1",wh).set("hvc1",wh).set("dvh1",wh).set("dvhe",wh).set("vvc1",xh).set("vvi1",xh).set("dvc1",xh).set("dvi1",xh);Yc("video/mp4",function(){return new rh});function yh(){}function zh(a,b){var c=Ah.get(b)||[];b=[];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,b.push.apply(b,va(d().parse(a)));a=new Set;c=[];b=t(b);for(d=b.next();!d.done;d=b.next())d=d.value,a.has(d.key)||(a.add(d.key),c.push(d));return c}function Ch(a){a=Ah.get(a);return a!=null&&a.length>0}function Dh(a,b){Ah.has(a)||Ah.set(a,[]);Ah.get(a).push(b)}J("shaka.metadata.Metadata",yh);yh.unregisterParserByMime=function(a){Ah.delete(a)};yh.registerParserByMime=Dh;yh.supports=Ch;
yh.getMetadataFrames=zh;var Ah=new Map;function Eh(){}function Fh(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 Gh(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 Hh(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 Ih(a,b){switch(b){case 0:return Array.from(a).map(function(c){return String.fromCharCode(c)}).join("");case 1:return Eb(a);case 2:return Cb(a,!1);case 3:return Bb(a);default:return""}}function Jh(a){return a===1||a===2?2:1}function Kh(a,b,c){c=c===void 0?0:c;if(b===1||b===2){for(b=c;b+1<a.length;b+=2)if(a[b]===0&&a[b+1]===0)return b;return-1}return a.indexOf(0,c)}
function Lh(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if(a.type==="APIC"){if(a.size<2)return null;var c=a.data[0],d=a.data.subarray(1).indexOf(0);if(d===-1)return null;var e=Bb(tb(a.data,1,d)),f=a.data[2+d],g=3+d;d=Kh(a.data,c,g);if(d===-1)return null;g=Ih(a.data.subarray(g,d),c);c=d+Jh(c);var h;e==="--\x3e"?h=Bb(a.data.subarray(c)):h=ub(a.data.subarray(c));b.mimeType=e;b.pictureType=f;b.description=g;b.data=h;return b}if(a.type==="COMM"){if(a.size<5)return null;
h=a.data[0];e=Bb(a.data.subarray(1,4)).replace(/\0/g,"");c=Kh(a.data,h,4);if(c===-1)return null;f=Ih(a.data.subarray(4,c),h);a=Ih(a.data.subarray(c+Jh(h)),h).replace(/\0*$/,"");b.description=f||e;b.data=a;return b}if(a.type==="TXXX"){if(a.size<2)return null;f=a.data[0];h=Kh(a.data,f,1);if(h===-1)return null;e=Ih(a.data.subarray(1,h),f);a=Ih(a.data.subarray(h+Jh(f)),f).replace(/^\ufeff/,"").replace(/\0*$/,"");b.description=e;b.data=a;return b}if(a.type==="WXXX"){if(a.size<2)return null;f=a.data[0];
h=Kh(a.data,f,1);if(h===-1)return null;e=Ih(a.data.subarray(1,h),f);a=Bb(a.data.subarray(h+Jh(f))).replace(/\0*$/,"");b.description=e;b.data=a;return b}if(a.type==="PRIV"){if(a.size<2)return null;e=a.data.indexOf(0);if(e===-1)return null;e=Bb(tb(a.data,0,e));b.description=e;e=="com.apple.streaming.transportStreamTimestamp"?(e=a.data.subarray(e.length+1),a=e[3]&1,e=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7],e/=45,a&&(e+=4.772185884E7),b.data=e):(a=ub(a.data.subarray(e.length+1)),b.data=a);return b}if(a.type===
"UFID"){e=a.data.indexOf(0);if(e===-1)return null;f=Bb(tb(a.data,0,e));b.description=f;b.data=ub(a.data.subarray(e+1));return b}if(a.type[0]==="T"){if(a.size<2)return null;a=Ih(a.data.subarray(1),a.data[0]).replace(/\0+$/,"").split("\x00").map(function(k){return k.replace(/^\ufeff/,"")}).filter(function(k){return k.length>0}).join(" / ");b.data=a;return b}return a.type[0]==="W"?(a=Bb(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=ub(a.data),b):null}
function Mh(a){for(var b=0,c=[];Fh(a,b);){var d=a[b+3],e=Hh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(e=b+e;b+10<e&&a[b]!==0;){var f=a.subarray(b);if(d>=4)var g=Hh(f,4);else g=f[4]<<24,g|=f[5]<<16,g|=f[6]<<8,g|=f[7],g>>>=0;f={type:String.fromCharCode(f[0],f[1],f[2],f[3]),size:g,data:f.subarray(10,10+g)};(g=Lh(f))&&c.push(g);b+=f.size+10}Gh(a,b)&&(b+=10)}return c}
function Nh(a,b){for(var c=b=b===void 0?0:b,d=0;Fh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Hh(a,b+6),Gh(a,b+10)&&(d+=10),b+=d;return d>0?a.subarray(c,c+d):new Uint8Array([])}Eh.prototype.parse=function(a){return Mh(a)};J("shaka.metadata.Id3Utils",Eh);Eh.prototype.parse=Eh.prototype.parse;Eh.getID3Data=Nh;Eh.getID3Frames=Mh;for(var Oh=t(je),Ph=Oh.next();!Ph.done;Ph=Oh.next())Dh(Ph.value,function(){return new Eh});/*

 Copyright Brightcove, Inc.

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

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

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/
function Qh(a,b){this.l=a;if(b===void 0?0:b)this.l=Tb(a);this.j=this.l.byteLength;this.h=this.i=0}function Rh(a){var b=a.l.byteLength-a.j,c=Math.min(4,a.j);if(c!==0){for(var d=0,e=0;e<c;e++)d=d<<8|a.l[b+e];a.i=d<<(4-c)*8;a.h=c*8;a.j-=c}}function Sh(a,b){if(a.h<=b){b-=a.h;var c=Math.floor(b/8);b-=c*8;a.h-=c;Rh(a)}a.i<<=b;a.h-=b}function Th(a,b){var c=Math.min(a.h,b),d=a.i>>>32-c;a.h-=c;a.h>0?a.i<<=c:a.j>0&&Rh(a);c=b-c;return c>0?d<<c|Th(a,c):d}
function Uh(a){for(var b=0;a.h===0;){if(a.j===0)return b;Rh(a)}for(;;){var c=Math.clz32(a.i);c>a.h&&(c=a.h);b+=c;a.i<<=c;a.h-=c;if(a.h>0||a.j===0)break;Rh(a)}return b}function Vh(a){Sh(a,1+Uh(a))}function V(a){var b=Uh(a);return Th(a,b+1)-1}function Wh(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Xh(a){return Th(a,1)===1}function Yh(a){return Th(a,8)}function Zh(a,b){for(var c=8,d=8,e=0;e<b;e++)d!==0&&(d=Wh(a),d=(c+d+256)%256),c=d===0?c:d}function $h(a){V(a);return V(a)}
J("shaka.util.ExpGolomb",Qh);function ai(){this.L=null;this.M=!1;this.D=this.N=null;this.o=[];this.l=[];this.h=[];this.G=this.H=null;this.m=[];this.j=[];this.i=[];this.J=null;this.B=[];this.u=[];this.F=this.K=this.C=null}q=ai.prototype;q.clearData=function(){this.o=[];this.l=[];this.h=[];this.m=[];this.j=[];this.i=[];this.B=[];this.u=[]};q.Re=function(a){this.F!=null&&this.F!=a&&(this.C=null);this.F=a};
q.parse=function(a){if(a.length<564)return this;for(var b=Math.max(0,bi(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.L=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.L: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,p=m;p>2;){var u=f[n+1]+2;switch(f[n]){case 5:var r=n+2;r=f[r]<<24|f[r+1]<<16|f[r+2]<<8|f[r+3];g.audio==-1&&r===1332770163?(g.audio=l,g.audioCodec="opus"):g.video==-1&&r===1096167473&&(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"&&(r=null,f[n+2]===128&&(r=f[n+3]),r!=null&&(this.K={channelCount:(r&15)===0?2:r&15,Mi:r,sampleRate:48E3}))}n+=u;p-=u}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.N=f.video,this.D=f.videoCodec);f.audio!=-1&&(this.H=f.audio,this.G=f.audioCodec);f.Be!=-1&&(this.J=f.Be);d&&!this.M&&(d=!1,e=b-188);this.M=!0;break;case this.N:h=a.subarray(h,e+188);f?(this.l.push(this.o.length),this.o.push(h)):this.l.length&&this.o.push(h);break;case this.H:h=a.subarray(h,e+188);f?(this.j.push(this.m.length),this.m.push(h)):this.j.length&&this.m.push(h);break;case this.J:h=a.subarray(h,
e+188);f?(this.u.push(this.B.length),this.B.push(h)):this.u.length&&this.B.push(h);break;default:d=!0}}return this};function ci(a,b,c){return Sb(a,b[c],c+1<b.length?b[c+1]:a.length)}
function di(a,b,c){if(b.byteLength<9||(b[0]<<16|b[1]<<8|b[2])!==1)return null;var d=b[4]<<8|b[5];if(d&&d>c-6)return null;var e=null,f=null,g=b[7];if(b.byteLength<ei(b))return null;if(g&192){e=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2;var h=null;g&64&&(h=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,e=fi(e,h));a.C==null&&(a.C=e);e=fi(e,a.C);f=a.C=e;h!=null&&(f=fi(h,e))}a=b[8]+9;return c<=a?null:{packetLength:d,
ek:a,pts:e,dts:f}}function gi(a,b){return(a=di(a,b,b.byteLength))?{data:b.subarray(a.ek),packetLength:a.packetLength,pts:a.pts,dts:a.dts,nalus:[]}:null}
q.Th=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;this.D=="hvc"&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0,n=this.D==="hvc";f==-1&&(l=0,m=n?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var p=a[h++];if(f)if(f===1)f=p?0:2;else if(p)if(p==1){p=h-f-1;if(l>=0)k.push({data:a.subarray(l+e,p),fullData:a.subarray(l,p),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.Je)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)),p>0&&(p=a.subarray(0,p),f.data=Qb(f.data,p),f.fullData=Qb(f.fullData,p),f.state=0);h<d?(m=n?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=p?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.Je&&(c=k.length?k[k.length-1]:b.Je)&&(c.data=Qb(c.data,a),c.fullData=Qb(c.fullData,a));b.state=f;return k};
q.getMetadata=function(){for(var a=[],b=0;b<this.u.length;b++){var c=ci(this.B,this.u,b);(c=gi(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Mh(c.data),dts:c.dts,pts:c.pts})}return a};
q.ib=function(){if(this.j.length&&!this.i.length)for(var a=0;a<this.j.length;a++){var b=ci(this.m,this.j,a),c=gi(this,b),d=this.i.length?this.i[this.i.length-1]:null;c&&c.pts!=null&&c.dts!=null&&(!d||d.pts!=c.pts&&d.dts!=c.dts)?this.i.push(c):this.i.length&&(b=c?c.data:b)&&(d=this.i[this.i.length-1],d.data=Qb(d.data,b))}return this.i};
q.Rc=function(a){a=a===void 0?!0:a;if(this.l.length&&!this.h.length){for(var b=0;b<this.l.length;b++){var c=ci(this.o,this.l,b),d=gi(this,c),e=this.h.length?this.h[this.h.length-1]:null;d&&d.pts!=null&&d.dts!=null&&(!e||e.pts!=d.pts&&e.dts!=d.dts)?this.h.push(d):this.h.length&&(c=d?d.data:c)&&(e=this.h[this.h.length-1],e.data=Qb(e.data,c))}if(a){b={Je:null,state:null};e=[];c=t(this.h);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.Th(d,b),d.nalus.length&&(e.push(d),b.Je=d.nalus[d.nalus.length-
1]);this.h=e}}return a?this.h:(a=this.h,this.h=[],a)};function hi(a,b){if(b=="audio"){b=a.m;var c=a.j}else if(b=="video")b=a.o,c=a.l;else return null;for(var d=0;d<c.length;d++){var e=c[d],f=d+1<c.length?c[d+1]:b.length,g=b[e];if(g){for(var h=0,k=e;k<f;k++)h+=b[k].byteLength;e=g.byteLength>=9&&g.byteLength>=ei(g)?g:Sb(b,e,f);if(h=di(a,e,h))if(h=ii(h),h!=null)return h}}return null}function ei(a){a=a[7];return a&64?19:a&192?14:9}
function ii(a){return a.pts==null||a.dts==null?null:Math.min(a.dts,a.pts)/9E4}q.getStartTime=function(a){if(a=="audio")a=this.ib();else if(a=="video")a=this.Rc(!1);else return null;return a.length?ii(a[0]):null};q.qd=function(){return{audio:this.G,video:this.D}};q.ze=function(){for(var a=[],b=t(this.Rc()),c=b.next();!c.done;c=b.next())a.push.apply(a,va(c.value.nalus));return a};q.rh=function(){return this.D=="hvc"?ji(this):ki(this)};
function li(a){var b=a.Rc();return b.length>1&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?Math.abs(1/(b-a)*9E4):null}
function ki(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.ze();if(!c.length)return b;c=c.find(function(u){return u.type==7});if(!c)return b;c=new Qh(c.data);var d=Yh(c),e=Yh(c),f=Yh(c);Vh(c);if(mi.includes(d)){var g=V(c);g===3&&Sh(c,1);Vh(c);Vh(c);Sh(c,1);if(Xh(c)){g=g!==3?8:12;for(var h=0;h<g;h++)Xh(c)&&(h<6?Zh(c,16):Zh(c,64))}}Vh(c);g=V(c);if(g===0)V(c);else if(g===1)for(Sh(c,1),Vh(c),Vh(c),g=V(c),h=0;h<g;h++)Vh(c);Vh(c);Sh(c,1);g=V(c);h=V(c);var k=Th(c,1);k===0&&Sh(c,1);Sh(c,
1);var l=0,m=0,n=0,p=0;Xh(c)&&(l=V(c),m=V(c),n=V(c),p=V(c));b.height=String((2-k)*(h+1)*16-n*2-p*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=li(a);return b}
function ji(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.ze();if(!c.length)return b;c=c.find(function(z){return z.type==33});if(!c)return b;var d=new Qh(c.fullData,!0);Yh(d);Yh(d);Th(d,4);var e=Th(d,3);Xh(d);var f=Th(d,2);c=Th(d,1);for(var g=Th(d,5),h=Th(d,32),k=Yh(d),l=Yh(d),m=Yh(d),n=Yh(d),p=Yh(d),u=Yh(d),r=Yh(d),v=[],w=[],y=0;y<e;y++)v.push(Xh(d)),w.push(Xh(d));if(e>0)for(y=e;y<8;y++)Th(d,2);for(y=0;y<e;y++)v[y]&&Th(d,88),w[y]&&Yh(d);V(d);e=V(d);e==3&&Th(d,1);v=V(d);w=V(d);var x=
y=0,A=0,C=0;Xh(d)&&(y+=V(d),x+=V(d),A+=V(d),C+=V(d));b.width=String(v-(y+x)*(e===1||e===2?2:1));b.height=String(w-(A+C)*(e===1?2:1));d=function(z){for(var B=0,D=0;D<32;D++)B|=(z>>D&1)<<31-D;return B>>>0}(h);f="hvc1"+("."+["","A","B","C"][f]+g);f+="."+d.toString(16).toUpperCase();f+="."+(c==1?"H":"L")+r;u&&(f+="."+u.toString(16).toUpperCase());p&&(f+="."+p.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
k&&(f+="."+k.toString(16).toUpperCase());b.codec=f;b.frameRate=li(a);return b}function fi(a,b){var c=1;for(a>b&&(c=-1);Math.abs(b-a)>4294967296;)a+=c*8589934592;return a}function ni(a){return bi(a)<0?!1:!0}function bi(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;var d=a.indexOf(71,c+1);c=d>=0&&d<b?d:c+1}return-1}J("shaka.util.TsParser",ai);ai.syncOffset=bi;ai.probe=ni;ai.prototype.getVideoInfo=ai.prototype.rh;ai.prototype.getVideoNalus=ai.prototype.ze;
ai.prototype.getCodecs=ai.prototype.qd;ai.prototype.getStartTime=ai.prototype.getStartTime;ai.prototype.getVideoData=ai.prototype.Rc;ai.prototype.getAudioData=ai.prototype.ib;ai.prototype.getMetadata=ai.prototype.getMetadata;ai.prototype.parseNalus=ai.prototype.Th;ai.prototype.parse=ai.prototype.parse;ai.prototype.setDiscontinuitySequence=ai.prototype.Re;ai.prototype.clearData=ai.prototype.clearData;ai.Timescale=9E4;var mi=[100,110,122,244,44,83,86,118,128,138,139,134];function oi(){this.h=null}oi.prototype.init=function(){};oi.prototype.parse=function(a){this.h?this.h.clearData():this.h=new ai;var b=[];a=tb(a);if(!ni(a))return b;a=this.h.parse(a);var c=a.qd(),d=a.ze();a=null;switch(c.video){case "avc":a=Sf;break;case "hvc":a=Tf}if(a==null)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,d.time!=null&&Rf(a,d.type))for(var e=t(Pg(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time,format:Vc});return b};
J("shaka.cea.TsCeaParser",oi);Yc("video/mp2t",function(){return new oi});J("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});J("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});J("shaka.config.MsfFilterType",{NONE:0,NEXT_GROUP_START:1,LARGEST_OBJECT:2,ABSOLUTE_START:3,ABSOLUTE_RANGE:4});J("shaka.config.MsfVersion",{AUTO:"auto",DRAFT_14:"draft-14",DRAFT_16:"draft-16"});J("shaka.config.PositionArea",{DEFAULT:0,TOP_LEFT:1,TOP_CENTER:2,TOP_RIGHT:3,CENTER_LEFT:4,CENTER:5,CENTER_RIGHT:6,BOTTOM_LEFT:7,BOTTOM_CENTER:8,BOTTOM_RIGHT:9});J("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function pi(a,b){this.h=a;this.i=b}pi.prototype.toString=function(){return"v"+this.h+"."+this.i};function qi(a,b){var c=new pi(6,0),d=ri,e=d.h,f=c.i-e.i;((c.h-e.h||f)>0?d.j:d.i)(d.h,c,a,b)};function si(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function ti(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var ri=null;function ui(){}function vi(a,b){var c=document.createElement("source");c.src=a;c.type=b===void 0?"":b;return c}function wi(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 xi(a){for(;a.firstChild;)a.removeChild(a.firstChild)}
function Lc(){if(yi)return yi;zi||(zi=new Ke(function(){yi=null}));(yi=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yi=document.createElement("video"));zi.ia(1);return yi}
function Ji(a,b){var c,d,e,f,g;return G(function(h){if(h.i==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=t(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&f.display==="swap")return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);h.l()})}
J("shaka.util.Dom",ui);ui.removeAllChildren=xi;ui.clearSourceFromVideo=wi;var zi=null,yi=null;function Ki(){this.l=new mb(function(){for(var a=navigator.userAgent.toLowerCase(),b=t([{type:"VR",qg:/oculus|quest/},{type:"TV",qg:/smart[ _]?tv|android ?tv/},{type:"MOBILE",qg:/iphone|ipad|ipod|android/}]),c=b.next();!c.done;c=b.next())if(c=c.value,c.qg.test(a))return c.type;a=navigator.userAgentData;var d;b=(a==null?void 0:(d=a.platform)==null?void 0:d.toLowerCase())||"";if(a){if(a.mobile)return"MOBILE";if(b.includes("android"))return"TV"}return"DESKTOP"});this.m=new mb(function(){var a=navigator.userAgent;
return navigator.vendor.includes("Apple")&&(a.includes("Version/")||a.includes("OS/"))?"WEBKIT":a.includes("Edge/")?"EDGE":a.includes("Chrome/")?"CHROMIUM":a.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Kc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}q=Ki.prototype;q.Kb=function(){return!!navigator.mediaCapabilities};q.Ha=function(){return this.l.value()};q.Da=function(){return this.m.value()};q.ad=function(){return!1};q.ug=function(){return!1};
q.Ce=function(){return!1};q.Yh=function(){return!1};q.Hd=function(){return!1};q.fb=function(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType};q.Jd=function(){return!0};q.ai=function(){return 0};q.Db=function(){return Promise.resolve({width:Infinity,height:Infinity})};q.mi=function(){return!1};q.Bg=function(){return!1};
q.Sa=function(a){var b=this.Ha();if(b==="TV"||b==="CONSOLE"||b==="CAST")a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;b==="TV"&&(a.textDisplayer.suspendRenderingWhenHidden=!1);return a};q.Xh=function(){return[]};q.hc=function(a){return window.matchMedia!==void 0&&(window.matchMedia("(color-gamut: p3)").matches||window.matchMedia("(dynamic-range: high)").matches)?a?"HLG":"PQ":"SDR"};q.ri=function(){return!1};q.Mh=function(){return!1};q.Pe=function(){return!1};
q.Ue=function(){return!0};q.Nh=function(){return!1};q.pi=function(){return!0};q.Gc=function(){return!1};q.fg=function(a){return a==="com.apple.fps"};q.Te=function(){return!0};function Li(a,b){a=a.Ha();return["DESKTOP","MOBILE","VR","APPLE_VR"].includes(a)?b.remote:null}q.dd=function(){return typeof Worker!=="undefined"};q.sh=function(){return!0};q.toString=function(){return"Device: "+this.jb()+" v"+this.ua()+"; Type: "+this.Ha()};function Mi(){Ki.call(this);this.h=new mb(function(){var a=navigator.userAgent.match(/Version\/(\d+)(?:\.(\d+))?/);a||(a=navigator.userAgent.match(/OS (\d+)(?:_(\d+))?/));return a?[parseInt(a[1],10),parseInt(a[2]||"0",10)]:[0,0]});this.i=new mb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}ta(Mi,Ki);q=Mi.prototype;q.ua=function(){return this.h.value()[0]};q.jb=function(){return"Apple Browser"};
q.Ha=function(){return this.i.value()};q.Da=function(){return"WEBKIT"};q.Kb=function(){return!1};q.ad=function(a,b){return!Ni(this)&&b==="audio"};q.Ce=function(){return!Ni(this)};q.Yh=function(a){return!Ni(this)&&a==="audio"};q.Sa=function(a){Ki.prototype.Sa.call(this,a);a.abr.minTimeToSwitch=.5;return a};q.ri=function(){return!0};q.Te=function(){return!1};q.sh=function(){return!1};function Ni(a){a=a.h.value();return a[0]>=27?!0:a[0]===26&&a[1]>=4}
(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"))&&(pb=function(){return new Mi});function Oi(){if(!Pi())throw Error("Not a Chromecast device!");Ki.call(this);this.i=new mb(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.h=new mb(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?Qi:a.includes("fuchsia")?Ri:Si})}ta(Oi,Ki);q=Oi.prototype;q.ua=function(){return this.i.value()};q.jb=function(){return"Chromecast with "+this.h.value()};
q.Ha=function(){return"CAST"};q.Da=function(){return"CHROMIUM"};q.Kb=function(){return Ki.prototype.Kb.call(this)&&this.h.value()!==Si};q.fb=function(a){return Ki.prototype.fb.call(this,a)&&this.h.value()!==Si};q.ai=function(){switch(this.h.value()){case Qi:return 0;case Ri:return 3;default:return 1}};
q.Db=function(){var a,b,c,d,e;return G(function(f){switch(f.i){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};f.o(2);if(!(c=a)){f.A(4);break}return f.h(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.j;case 4:if(c){b.width=3840;b.height=2160;f.A(6);break}if(!(d=a)){f.A(7);break}return f.h(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:d=
f.j;case 7:d&&(b.width=1920,b.height=1080);case 6:f.u(3);break;case 2:e=f.m(),Ua("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};q.Sa=function(a){Ki.prototype.Sa.call(this,a);a.streaming.stallSkip=0;return a};q.Gc=function(){return!0};function Pi(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var Qi="Android",Ri="Fuchsia",Si="Linux";Pi()&&(pb=function(){return new Oi});function Ti(){Ki.call(this);this.j=new mb(function(){var a=navigator.userAgent.match(/Edge?\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/))?parseInt(a[2],10):null});this.h=new mb(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.i=new mb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()==
"windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1});this.u=new mb(function(){return navigator.userAgent.includes("sony.hbbtv.tv")});this.o=new mb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":navigator.userAgent.includes("Android")?!0:!1})}ta(Ti,Ki);q=Ti.prototype;q.ua=function(){return this.j.value()};q.jb=function(){return this.h.value()};
q.ad=function(a){return $b(a)?this.i.value():!1};q.ug=function(a){return $b(a)||this.h.value()==="Edge"?this.i.value():!1};q.Ce=function(a){return $b(a)||this.h.value()==="Edge"?this.i.value():!1};q.fb=function(a){return this.i.value()&&$b(a)?!1:Ki.prototype.fb.call(this,a)};
q.Sa=function(a){Ki.prototype.Sa.call(this,a);if(this.i.value())switch(this.h.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.o.value()&&(a.drm.defaultAudioRobustnessForWidevine="SW_SECURE_CRYPTO",a.drm.defaultVideoRobustnessForWidevine=
"SW_SECURE_CRYPTO");return a};q.Pe=function(){return this.h.value()==="Edge"||this.u.value()};q.Gc=function(){if(this.Da()==="GECKO"){var a=this.ua();return a!==null?a>=100:Ki.prototype.Gc.call(this)}return Ki.prototype.Gc.call(this)};q.fg=function(a){return this.Da()==="GECKO"?$b(a):Ki.prototype.fg.call(this,a)};qb=function(){return new Ti};function Ui(){Ki.apply(this,arguments)}ta(Ui,Ki);q=Ui.prototype;q.ua=function(){return null};q.jb=function(){return"Hisense"};q.Ha=function(){return"TV"};q.Kb=function(){return!1};q.fb=function(){return!1};q.Db=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}b==null&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};
q.Sa=function(a){Ki.prototype.Sa.call(this,a);a.streaming.stallSkip=0;return a};q.dd=function(){return!1};if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))pb=function(){return new Ui};function Vi(){Ki.call(this);this.h=new mb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}ta(Vi,Ki);q=Vi.prototype;q.jb=function(){return"PlayStation"};q.Ha=function(){return"CONSOLE"};q.Da=function(){return"WEBKIT"};q.ua=function(){return this.h.value()};q.Kb=function(){return!1};q.fb=function(){return!1};q.Bg=function(){return this.ua()===4};
q.Db=function(){var a,b,c,d,e;return G(function(f){switch(f.i){case 1:return a={width:1920,height:1080},b=!1,f.o(2),f.h(window.msdk.device.getDisplayInfo(),4);case 4:c=f.j;b=c.resolution==="4K";f.u(3);break;case 2:return f.m(),f.o(5),f.h(window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.j;b=d.resolution==="4K";f.u(3);break;case 5:e=f.m(),Va("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
q.Sa=function(a){Ki.prototype.Sa.call(this,a);this.ua()===4&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};q.Pe=function(){return this.ua()===4};q.Ue=function(){return this.ua()!==4};navigator.userAgent.includes("PlayStation")&&(pb=function(){return new Vi});function Wi(){Ki.apply(this,arguments)}ta(Wi,Ki);q=Wi.prototype;q.ua=function(){return null};q.jb=function(){return"TitanOS"};q.Ha=function(){return"TV"};q.Db=function(){var a={width:1920,height:1080};try{SmartTvA_API.hasCapability("UHD")?(a.width=3840,a.height=2160):SmartTvA_API.hasCapability("FHD")?(a.width=1920,a.height=1080):(a.width=1280,a.height=720)}catch(b){Va("Titan OS: Error detecting screen size, default screen size 1920x1080.",b)}return Promise.resolve(a)};
q.hc=function(a){try{if(SmartTvA_API.hasCapability("HDR","HDR10")||SmartTvA_API.hasCapability("HDR","DV"))return a?"HLG":"PQ"}catch(b){return Va("Titan OS: Error checking HDR support",b),Ki.prototype.hc.call(this,a)}return"SDR"};navigator.userAgent.includes("TitanOS")&&(pb=function(){return new Wi});function Xi(){Ki.apply(this,arguments)}ta(Xi,Ki);q=Xi.prototype;q.ua=function(){return null};q.jb=function(){return"TiVoOS"};q.Ha=function(){return"TV"};q.Da=function(){return"CHROMIUM"};q.fb=function(){return!1};navigator.userAgent.includes("TiVoOS")&&(pb=function(){return new Xi});function Yi(){Ki.call(this);var a=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.h=a?parseInt(a[1],10):null;this.i=a?parseInt(a[2],10):null}ta(Yi,Ki);q=Yi.prototype;q.ua=function(){return this.h};q.jb=function(){return"Tizen"};q.Da=function(){return"CHROMIUM"};q.Ha=function(){return"TV"};q.ad=function(){return!0};q.Hd=function(){return this.ua()===3};q.Kb=function(){return!1};q.fb=function(){return!1};q.Jd=function(){return this.h&&this.i?this.h===5?this.i>=5:this.h>5:Ki.prototype.Jd.call(this)};
q.Db=function(){var a=window.devicePixelRatio;a={width:window.screen.width*a>1920?3840:1920,height:window.screen.height*a>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var b=webapis.systeminfo.getMaxVideoResolution();a.width=b.width;a.height=b.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,
a.height=2160)}catch(c){Va("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};q.Sa=function(a){Ki.prototype.Sa.call(this,a);a.drm.ignoreDuplicateInitData=this.ua()!==2;this.ua()===3&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};q.Xh=function(){var a=[];this.h!==null&&this.h<5&&a.push("opus");return a};
q.hc=function(a){try{if(webapis.avinfo.isHdrTvSupport())return a?"HLG":"PQ"}catch(b){return Ki.prototype.hc.call(this,a)}return"SDR"};q.Mh=function(){return!0};q.Nh=function(){return this.ua()===3};q.dd=function(){var a=this.ua();return a!==null&&a<3?!1:Ki.prototype.dd.call(this)};navigator.userAgent.includes("Tizen")&&(pb=function(){return new Yi});function Zi(){Ki.apply(this,arguments)}ta(Zi,Ki);Zi.prototype.ua=function(){return null};Zi.prototype.jb=function(){return"Vizio"};Zi.prototype.Ha=function(){return"TV"};Zi.prototype.Kb=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(pb=function(){return new Zi});function $i(){Ki.call(this);this.j=new mb(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")});this.i=new mb(function(){return navigator.userAgent.includes("SOPOpenBrowser")});this.h=new mb(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})}ta($i,Ki);q=$i.prototype;q.ua=function(){return this.h.value()};
q.jb=function(){return"WebKit STB"};q.Ha=function(){return"TV"};q.Da=function(){return"WEBKIT"};q.Kb=function(){return!1};q.ad=function(){return this.i.value()};q.Db=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};q.Ue=function(){return!this.j.value()};q.Te=function(){return!1};
if(navigator.userAgent.includes("PlayStation")?0: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")))pb=function(){return new $i};function aj(){Ki.call(this);var a=this;this.i=bj();this.h=null;try{var b=new PalmServiceBridge;b.onservicecallback=function(c){c=JSON.parse(c);var d,e,f,g;a.h=(g=(f=(d=c.configs)==null?void 0:d["tv.model.supportHDR"])!=null?f:(e=c.configs)==null?void 0:e["tv.config.supportDolbyHDRContents"])!=null?g:!1};b.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(c){Va("WebOS: getConfigs call failed",c)}}
ta(aj,Ki);q=aj.prototype;q.ua=function(){return this.i};q.jb=function(){return"WebOS"};q.Ha=function(){return"TV"};q.Da=function(){return"CHROMIUM"};q.Kb=function(){return!1};q.fb=function(){return!1};q.Jd=function(){var a=this.ua();return a!==null?a>3:Ki.prototype.Jd.call(this)};q.Db=function(){var a={width:1920,height:1080};try{var b=JSON.parse(window.PalmSystem.deviceInfo);a.width=Math.max(1920,b.screenWidth);a.height=Math.max(1080,b.screenHeight)}catch(c){Va("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
q.Sa=function(a){Ki.prototype.Sa.call(this,a);this.ua()===3&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};q.hc=function(a){return this.h==null?(Va("WebOS: getConfigs call haven't finished"),Ki.prototype.hc.call(this,a)):this.h?a?"HLG":"PQ":"SDR"};
function bj(){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;case 132:return 26;default:return null}}q.pi=function(){return!1};q.Gc=function(){var a=this.ua();return a!==null?a>=6:Ki.prototype.Gc.call(this)};q.dd=function(){var a=this.ua();return a!==null&&a<4?!1:Ki.prototype.dd.call(this)};
if(navigator.userAgent.includes("Web0S")){var cj=new aj;pb=function(){return cj}};function dj(){Ki.call(this);this.h=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.i=a?parseInt(a[1],10):null}ta(dj,Ki);q=dj.prototype;q.ua=function(){return this.i};q.jb=function(){return"Xbox"};q.Ha=function(){return"CONSOLE"};q.Da=function(){return this.h?"EDGE":"CHROMIUM"};q.ad=function(){return!0};q.ug=function(){return!0};q.Ce=function(){return!0};q.mi=function(){return this.h};
q.Db=function(){var a={width:1920,height:1080},b=ej();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){Va("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
q.Sa=function(a){Ki.prototype.Sa.call(this,a);a.drm.parseInbandPsshEnabled=this.h;a.drm.preferredKeySystems.push("com.microsoft.playready");this.h&&(a.streaming.gapPadding=.01);return a};q.Pe=function(){return!0};function ej(){var a=null;try{a=typeof Windows!=="undefined"?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||ej()!==null)pb=function(){return new dj};function fj(a,b){var c=gj();this.u=a.maxAttempts==null?c.maxAttempts:a.maxAttempts;this.o=a.baseDelay==null?c.baseDelay:a.baseDelay;this.C=a.fuzzFactor==null?c.fuzzFactor:a.fuzzFactor;this.B=a.backoffFactor==null?c.backoffFactor:a.backoffFactor;this.h=0;this.i=this.o;this.m=b===void 0?!1:b;this.l=this.j=null;this.m&&(this.h=1)}
fj.prototype.attempt=function(){var a=this,b,c,d;return G(function(e){if(e.i==1){if(a.h>=a.u)if(a.m)a.h=1,a.i=a.o;else throw new K(2,7,1010);b=a.h;a.h++;if(b==0)return e.return();c=a.i*(1+(Math.random()*2-1)*a.C);d=Promise.withResolvers();a.j=d;a.l=hj(c,function(){a.j=null;a.l=null;d.resolve()});return e.h(d.promise,2)}a.i*=a.B;e.l()})};fj.prototype.stop=function(){var a;(a=this.l)==null||a.stop();this.l=null;var b;(b=this.j)==null||b.reject(new K(2,7,7001));this.j=null};
function gj(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}}function hj(a,b){b=new Ke(b);b.ia(a/1E3);return b};function ij(a,b){this.promise=a;this.j=b;this.h=null}function jj(a){return new ij(Promise.reject(a),function(){return Promise.resolve()})}function kj(){var a=Promise.reject(new K(2,7,7001));a.catch(function(){});return new ij(a,function(){return Promise.resolve()})}function lj(a){return new ij(Promise.resolve(a),function(){return Promise.resolve()})}da.Object.defineProperties(ij.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h!==null}}});
ij.prototype.abort=function(){this.h||(this.h=this.j());return this.h};ij.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
ij.prototype.Cb=function(a,b){function c(h){return function(k){if(e.h&&h)f.reject(g);else{var l=h?a:b;l?d=mj(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=Promise.withResolvers();f.promise.catch(function(){});var g=new K(2,7,7001);this.promise.then(c(!0),c(!1));return new ij(f.promise,function(){return d()})};
function mj(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()}}}J("shaka.util.AbortableOperation",ij);ij.prototype.chain=ij.prototype.Cb;ij.prototype["finally"]=ij.prototype.finally;ij.all=function(a){return new ij(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})};
ij.prototype.abort=ij.prototype.abort;ij.notAbortable=function(a){return new ij(a,function(){return a.catch(function(){})})};ij.completed=lj;ij.aborted=kj;ij.failed=jj;function nj(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.h=!1}
nj.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};nj.prototype.stopImmediatePropagation=function(){this.h=!0};nj.prototype.stopPropagation=function(){};J("shaka.util.FakeEvent",nj);function oj(){this.$a=new fb;this.Sg=this}oj.prototype.addEventListener=function(a,b){this.$a&&this.$a.push(a,b)};oj.prototype.removeEventListener=function(a,b){this.$a&&this.$a.remove(a,b)};oj.prototype.dispatchEvent=function(a){if(!this.$a)return!0;var b=this.$a.get(a.type)||[],c=this.$a.get("__shaka_all_events__");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Sg;a.currentTarget=this.Sg;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.h)break}return a.defaultPrevented};
oj.prototype.release=function(){this.$a=null};function pj(){this.h=[]}function qj(a,b){a.h.push(b.finally(function(){bb(a.h,b)}))}pj.prototype.destroy=function(){for(var a=[],b=t(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.h=[];return Promise.all(a)};function rj(a,b){var c=c===void 0?"":c;if(b.length==0)return a;var d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;for(var f=t(b),g=f.next();!g.done;g=f.next()){g=new URL(g.value,e);if(c){var h=c.replace(/^[?&]/,""),k=g.search.replace(/^\?/,"");g.search=k?k+"&"+h:h}d.push(g.toString())}}return d}function sj(a){try{var b=(new URL(a)).protocol.slice(0,-1);if(b&&a.toLowerCase().startsWith(b+":"))return b}catch(c){}return(a=a.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/))?a[1].toLowerCase():""}
function tj(a,b){try{var c=new URL(a);c.protocol=b;if(c.protocol===b+":")return c.toString()}catch(d){}c=a.indexOf(":");return c===-1?b+":"+a:b+a.slice(c)}function uj(a){try{var b=(new URL(a)).hostname;if(b)return b}catch(c){}return(a=a.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/([^/?#]*)/))?a[1]:""}function vj(a,b){a=new URL(a);a.hostname=b;return a.toString()}
function wj(a,b){b=b==null?void 0:b();if(!b)return a;a=new URL(a);b=b.replace(/^[?&]/,"").split("&").filter(function(c){return c});xj(a,b);return a.toString()}function yj(a,b){if(!b.size)return a;a=new URL(a);var c=[];b=t(b.entries());for(var d=b.next();!d.done;d=b.next()){var e=t(d.value);d=e.next().value;e=e.next().value;c.push(encodeURIComponent(d)+"="+encodeURIComponent(e))}xj(a,c);return a.toString()}
function xj(a,b){function c(f){return f.split("=")[0]}var d=new Set(b.map(c)),e=a.search.replace(/^\?/,"").split("&").filter(function(f){return f&&!d.has(c(f))});a.search=e.concat(b).join("&")};function zj(a,b,c,d,e,f,g){oj.call(this);this.j=null;this.l=!1;this.B=new pj;this.h=new Set;this.i=new Set;this.u=a||null;this.o=b||null;this.C=c||null;this.D=d||null;this.F=e||null;this.H=f||null;this.G=g||null;this.m=new Map}ta(zj,oj);q=zj.prototype;q.configure=function(a){this.j=a};function Aj(a,b,c,d){d=d===void 0?!1:d;c=c||Bj;var e=Cj.get(a);(!e||c>=e.priority)&&Cj.set(a,{priority:c,ng:b,fk:d})}
function Dj(a,b){for(var c=t(a.h),d=c.next();!d.done;d=c.next())b.h.add(d.value);a=t(a.i);for(c=a.next();!c.done;c=a.next())b.i.add(c.value)}q.ik=function(a){this.h.add(a)};q.Hk=function(a){this.h.delete(a)};q.Ni=function(){this.h.clear()};q.jk=function(a){this.i.add(a)};q.Ik=function(a){this.i.delete(a)};q.Oi=function(){this.i.clear()};q.bh=function(){this.m.clear()};
function Ej(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,attempt:0}}q.destroy=function(){this.l=!0;this.h.clear();this.i.clear();this.m.clear();oj.prototype.release.call(this);return this.B.destroy()};
q.request=function(a,b,c){var d=this,e=new Fj;if(this.l){var f=Promise.reject(new K(2,7,7001));f.catch(function(){});return new Gj(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};f=ld(b.headers);b.retryParameters=b.retryParameters?ld(b.retryParameters):gj();b.uris=ld(b.uris);b.attempt=0;f=Hj(this,a,b,c,new fj(b.retryParameters,!1),null,e,f);var g=f.Cb(function(l){return Ij(d,a,l,c)}),h=0;f.promise.then(function(){h=Date.now()},function(){});var k=g.Cb(function(l){var m=
l.response;m.timeMs+=Date.now()-h;l.Ij||!d.u||m.fromCache||b.method=="HEAD"||a!=Jj||d.u(m.timeMs,m.data.byteLength,Kj(c),b,c);d.G&&d.G(a,m,c);return m},function(l){l&&(l.severity=2);throw l;});e=new Gj(k.promise,function(){return k.abort()},e);qj(this.B,e);return e};
function Lj(a,b,c,d){function e(h){f=f.Cb(function(){c.body&&(c.body=ub(c.body));return h(b,c,d)})}var f=lj(void 0);a.F&&e(a.F);a=t(a.h);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Cb(void 0,function(h){if(h instanceof K&&h.code==7001)throw h;throw new K(2,1,1006,h);})}
function Hj(a,b,c,d,e,f,g,h){var k=c.attempt%c.uris.length;c.headers=ld(h);var l=Lj(a,b,c,d),m=Date.now(),n=0;l.promise.then(function(){n=Date.now()-m},function(){});a.j.forceHTTP&&(c.uris[k]=c.uris[k].replace("https://","http://"));a.j.forceHTTPS&&(c.uris[k]=c.uris[k].replace("http://","https://"));k>0&&a.H&&a.H(b,d,c.uris[k],c.uris[k-1]);var p=sj(c.uris[k]),u=!1;p||(p=location.protocol,p=p.slice(0,-1),c.uris[k]=tj(c.uris[k],p));p=p.toLowerCase();var r=(p=Cj.get(p))?p.ng:null;if(!r)return jj(new K(2,
1,1E3,c.uris[k]));var v=p.fk;(p=a.m.get(uj(c.uris[k])))&&(c.headers[a.j.commonAccessTokenHeaderName]=p);var w=null,y=null,x=!1,A=!1,C;return l.Cb(function(){var z=e.attempt();return new ij(z,function(){e.stop();return z.catch(function(){})})}).Cb(function(){if(a.l)return kj();C=Date.now();var z=0;c.requestStartTime=Date.now();var B=r(c.uris[k],c,b,function(E,H,O){w&&w.stop();y&&y.ia(F/1E3);a.u&&b==Jj&&(z++,c.packetNumber=z,a.u(E,H,Kj(d),c,d),u=!0,g.h=O)},function(E){A=!0;c.timeToFirstByte=Date.now()-
c.requestStartTime;a.o&&a.o(E,c,b)},{minBytesForProgressEvents:a.j.minBytesForProgressEvents});if(!v)return B;var D=c.retryParameters.connectionTimeout;D&&(w=new Ke(function(){x=!0;B.abort()}),w.ia(D/1E3));var F=c.retryParameters.stallTimeout;F&&(y=new Ke(function(){x=!0;B.abort()}));return B}).Cb(function(z){w&&w.stop();y&&y.stop();z.timeMs==void 0&&(z.timeMs=Date.now()-C,z.timeMs+=n);var B=z.headers[a.j.commonAccessTokenHeaderName];B&&a.m.set(uj(z.uri),B);B={response:z,Ij:u};!A&&a.o&&a.o(z.headers,
c,b);a.C&&a.C(b,c,d,z);return B},function(z){w&&w.stop();y&&y.stop();if(a.D){var B=null,D=0;z instanceof K&&(B=z,z.code==1001&&(D=z.data[1]));a.D(b,c,d,B,D,x)}if(a.l)return kj();x&&(z=new K(1,1,1003,c.uris[k],b));if(z instanceof K){if(z.code==7001)throw z;if(z.code==1010)throw f;if(z.severity==1){B=(new Map).set("error",z);B=new nj("retry",B);B.cancelable=!0;a.dispatchEvent(B);if(B.defaultPrevented)throw z;++c.attempt;return Hj(a,b,c,d,e,z,g,h)}}throw z;})}
function Ij(a,b,c,d){var e=lj(void 0);a=t(a.i);for(var f=a.next(),g={};!f.done;g={Zh:void 0},f=a.next())g.Zh=f.value,e=e.Cb(function(h){return function(){var k=c.response;k.data&&(k.data=ub(k.data));return(0,h.Zh)(b,k,d)}}(g));return e.Cb(function(){return c},function(h){var k=2;if(h instanceof K){if(h.code==7001)throw h;k=h.severity}throw new K(k,1,1007,h);})}function Kj(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Bc)return!1}return!0}J("shaka.net.NetworkingEngine",zj);
zj.prototype.request=zj.prototype.request;zj.prototype.destroy=zj.prototype.destroy;zj.makeRequest=Ej;zj.defaultRetryParameters=function(){return gj()};zj.prototype.clearCommonAccessTokenMap=zj.prototype.bh;zj.prototype.clearAllResponseFilters=zj.prototype.Oi;zj.prototype.unregisterResponseFilter=zj.prototype.Ik;zj.prototype.registerResponseFilter=zj.prototype.jk;zj.prototype.clearAllRequestFilters=zj.prototype.Ni;zj.prototype.unregisterRequestFilter=zj.prototype.Hk;
zj.prototype.registerRequestFilter=zj.prototype.ik;zj.unregisterScheme=function(a){Cj.delete(a)};zj.registerScheme=Aj;zj.prototype.configure=zj.prototype.configure;function Fj(){this.h=0}zj.NumBytesRemainingClass=Fj;function Gj(a,b,c){ij.call(this,a,b);this.i=c}ta(Gj,ij);zj.PendingRequest=Gj;var Jj=1,Mj={MANIFEST:0,SEGMENT:Jj,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9,SESSION_DATA:10,FINGERPRINT:11,PLAYLIST:12,EVENT_CALLBACK:13};zj.RequestType=Mj;
zj.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,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,TRACKING_EVENT:13};var Bj=3;zj.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Bj};var Cj=new Map;function Nj(a){this.h=!1;this.i=Promise.withResolvers();this.j=a}Nj.prototype.destroy=function(){var a=this;if(this.h)return this.i.promise;this.h=!0;return this.j().then(function(){a.i.resolve()},function(){a.i.resolve()})};function Oj(a,b){if(a.h){if(b instanceof K&&b.code==7003)throw b;throw new K(2,7,7003,b);}};function Pj(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Qj(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Rj(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Sj(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Tj(a){var b=this;this.h=[];this.data=[];(new Qg).ka(["moov","moof"],Vg).O("pssh",function(c){if(!(c.version>1)){var d=tb(c.reader.i,-12,c.size);b.data.push(d);c=c.reader.wa(16,!1);b.h.push(Pb(c))}}).parse(a)};function Uj(a){var b=this;this.F=a;this.u=this.B=null;this.P=!1;this.K=0;this.h=null;this.C=new gb;this.j=new Map;this.V=[];this.D=new Map;this.L=!1;this.m=Promise.withResolvers();this.i=null;this.o=function(c){c.severity==2&&b.m.reject(c);a.onError(c)};this.Z=new Map;this.ma=new Map;this.M=new Ke(function(){return Vj(b)});this.ea=!1;this.N=[];this.oa=!1;this.G=new Ke(function(){Wj(b)});this.m.promise.catch(function(){});this.l=new Nj(function(){return Xj(b)});this.ba=!1;this.H=this.J=null;this.U=
function(){return!1}}q=Uj.prototype;q.destroy=function(){return this.l.destroy()};
function Xj(a){var b;return G(function(c){switch(c.i){case 1:return a.C.release(),a.C=null,a.m.reject(),a.G.stop(),a.G=null,a.M.stop(),a.M=null,c.h(Yj(a),2);case 2:if(!a.u){c.A(3);break}c.o(4);return c.h(a.u.setMediaKeys(null),6);case 6:c.u(5);break;case 4:b=c.m(),Va("DrmEngine.destroyNow_ exception",b);case 5:a.u=null;case 3:a.h=null,a.B=null,a.D=new Map,a.i=null,a.o=function(){},a.F=null,a.ba=!1,a.J=null,c.l()}})}q.configure=function(a,b){this.i=a;b&&(this.U=b);this.G&&this.P&&this.h&&this.G.Ka(this.i.updateExpirationTime)};
function Zj(a,b,c,d){d=d===void 0?!0:d;a.D=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next())a.D.set(e.value,{initData:null,initDataType:null});c=t(a.i.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.D.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.ea=a.D.size>0;return ak(a,b,d)}
function ak(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C;return G(function(z){if(z.i==1){bk(a.i.clearKeys,b);d=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});e=Rj(a.i.servers);f=Rj(a.i.advanced||{});!d&&c&&ck(b,e);g=new WeakSet;h=t(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=dk(l),n=t(m),p=n.next();!p.done;p=n.next())u=p.value,g.has(u)||(g.add(u),ek(u,e,f,a.i.keySystemsMapping));r=function(B,D){var F=[];B=t(B);for(var E=B.next();!E.done;E=
B.next()){E=E.value;var H=E[D]||f.has(E.keySystem)&&f.get(E.keySystem)[D]||"";H==""&&Zb(E.keySystem)&&(D=="audioRobustness"?H=[a.i.defaultAudioRobustnessForWidevine]:D=="videoRobustness"&&(H=[a.i.defaultVideoRobustnessForWidevine]));if(typeof H==="string")F.push(E);else if(Array.isArray(H)){H.length===0&&(H=[""]);H=t(H);for(var O=H.next();!O.done;O=H.next()){var R={};F.push(Object.assign({},E,(R[D]=O.value,R)))}}}return F};v=new WeakSet;w=t(b);for(y=w.next();!y.done;y=w.next())x=y.value,x.video&&
!v.has(x.video)&&(x.video.drmInfos=r(x.video.drmInfos,"videoRobustness"),x.video.drmInfos=r(x.video.drmInfos,"audioRobustness"),v.add(x.video)),x.audio&&!v.has(x.audio)&&(x.audio.drmInfos=r(x.audio.drmInfos,"videoRobustness"),x.audio.drmInfos=r(x.audio.drmInfos,"audioRobustness"),v.add(x.audio));return z.h(df(b,a.ea,a.ba,a.i.preferredKeySystems),2)}Oj(a.l);A=d||e.size>0;if(!A)return a.P=!0,z.return(Promise.resolve());C=fk(a,b);return z.return(d?C:C.catch(function(){}))})}
function gk(a){var b;return G(function(c){switch(c.i){case 1:if(a.u.mediaKeys)return c.return();if(!a.J){c.A(2);break}return c.h(a.J,3);case 3:return Oj(a.l),c.return();case 2:return c.o(4),a.J=a.u.setMediaKeys(a.B),c.h(a.J,6);case 6:c.u(5);break;case 4:b=c.m(),a.o(new K(2,6,6003,b.message));case 5:Oj(a.l),c.l()}})}function hk(a,b){return G(function(c){if(c.i==1)return c.h(gk(a),2);ik(a,b.initDataType,tb(b.initData));c.l()})}
q.Mb=function(a){var b=this,c,d,e,f;return G(function(g){if(g.i==1){if(b.u===a)return g.return();if(!b.B)return b.C.Ja(a,"encrypted",function(){b.o(new K(2,6,6010))}),g.return();c=nb();b.u=a;b.i.delayLicenseRequestUntilPlayed&&b.C.Ja(b.u,"play",function(){for(var h=t(b.N),k=h.next();!k.done;k=h.next())jk(b,k.value);b.oa=!0;b.N=[]});(d=Li(c,b.u))?b.C.yb(d,["connect","connecting","disconnect"],function(){Yj(b)}):"webkitCurrentPlaybackTargetIsWireless"in b.u&&b.C.I(b.u,"webkitcurrentplaybacktargetiswirelesschanged",
function(){return Yj(b)});b.H=b.h?b.h.initData.find(function(h){return h.initData.length>0})||null:null;e=b.h.keySystem;return(f=c.fg(e))||!b.H&&b.h.keySystem==="com.apple.fps"&&!b.D.size?g.A(2):g.h(gk(b),2)}kk(b).catch(function(){});!f&&(b.H||b.D.size||b.i.parseInbandPsshEnabled)||b.C.I(b.u,"encrypted",function(h){return hk(b,h)});g.l()})};
function lk(a){var b,c,d,e,f;return G(function(g){switch(g.i){case 1:if(!a.B||!a.h)return g.return();if(!a.h.serverCertificateUri||a.h.serverCertificate&&a.h.serverCertificate.length){g.A(2);break}b=Ej([a.h.serverCertificateUri],a.i.retryParameters);g.o(3);c=a.F.Ac.request(5,b,{isPreload:a.U()});return g.h(c.promise,5);case 5:d=g.j;a.h.serverCertificate=tb(d.data);g.u(4);break;case 3:throw e=g.m(),new K(2,6,6017,e);case 4:if(a.l.h)return g.return();case 2:if(!a.h.serverCertificate||!a.h.serverCertificate.length)return g.return();
g.o(6);return g.h(a.B.setServerCertificate(a.h.serverCertificate),8);case 8:g.u(0);break;case 6:throw f=g.m(),new K(2,6,6004,f.message);}})}
function kk(a){var b,c,d,e,f;return G(function(g){if(g.i==1){if(!a.D.size)return g.A(2);a.D.forEach(function(h,k){mk(a,k,h)});return g.h(a.m.promise,3)}if(g.i!=2){b=a.h&&a.h.keyIds||new Set([]);if(b.size>0&&nk(a))return g.return(a.m.promise);a.L=!1;a.m=Promise.withResolvers();a.m.promise.catch(function(){})}c=(a.h?a.h.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,ik(a,f.initDataType,f.initData);ok(a)&&a.m.resolve();return g.return(a.m.promise)})}
function ik(a,b,c){if(c.length){try{c=a.i.initDataTransform(c,b,a.h)}catch(g){b=g;g instanceof K||(b=new K(2,6,6016,g));a.o(b);return}if(a.i.ignoreDuplicateInitData){var d=a.j.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(sb(c,e.value.initData))return;var f=!1;a.D.forEach(function(g){!f&&sb(c,g.initData)&&(f=!0)});if(f)return}a.L=!0;a.j.size>0&&ok(a)&&(a.m.resolve(),a.L=!1,a.m=Promise.withResolvers(),a.m.promise.catch(function(){}));pk(a,b,c,a.h.sessionType)}}
q.Of=function(){var a=this,b=this.j.keys();b=Pj(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)};q.rg=function(a){var b=this;this.j.forEach(function(c,d){a!=void 0&&d.sessionId!=a||qk(b,d)})};
q.wg=function(a,b){b=b===void 0?.1:b;var c=this,d,e,f,g,h;return G(function(k){switch(k.i){case 1:Oj(c.l);e=d=null;c.j.forEach(function(l,m){m.sessionId===a.sessionId&&(d=m,e=l)});if(!(d&&e&&c.h&&e.initData&&e.initDataType))return k.return(!1);f=e.initData;g=e.initDataType;if(!(b>0)){k.A(2);break}return k.h(Ue(b),2);case 2:return k.o(4),c.j.delete(d),k.h(rk(c,d),6);case 6:h=pk(c,g,f,c.h.sessionType,!1);if(!h)throw new K(2,6,6005,"Failed to create new session for license retry");return k.return(!0);
case 4:return k.m(),k.return(!1)}})};q.Pf=function(){var a=Infinity,b=this.j.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};function sk(a){return a.K?a.K:NaN}q.ec=function(){return this.h};q.xe=function(){return Sj(this.ma)};
function fk(a,b){var c,d,e,f,g,h,k;return G(function(l){switch(l.i){case 1:c=new Map;d=tk(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new K(2,6,6020);throw new K(2,6,6001);}Oj(a.l);l.o(2);d.getConfiguration();e=a.i.keySystemsMapping[d.keySystem]||d.keySystem;a.h=uk(a,e,c.get(e));if(!a.h.licenseServerUri)throw new K(2,6,6012,a.h.keySystem);return l.h(d.createMediaKeys(),4);case 4:f=l.j;Oj(a.l);a.B=f;if(!(a.i.minHdcpVersion!=""&&"getStatusForPolicy"in a.B)){l.A(5);break}l.o(6);return l.h(a.B.getStatusForPolicy({minHdcpVersion:a.i.minHdcpVersion}),
8);case 8:g=l.j;if(g!="usable")throw new K(2,6,6018);Oj(a.l);l.u(5,2);break;case 6:h=l.m(2);if(h instanceof K)throw h;throw new K(2,6,6019,h.message);case 5:return a.P=!0,a.G.Ka(a.i.updateExpirationTime),l.h(lk(a),9);case 9:Oj(a.l);l.u(0);break;case 2:k=l.m();Oj(a.l,k);a.h=null;if(k instanceof K)throw k;throw new K(2,6,6002,k.message);}})}
function tk(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(dk(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.getOrInsertComputed(f.keySystem,function(){return[]}).push(f)}if(c.size==1&&c.has(""))throw new K(2,6,6E3);d=a.i.preferredKeySystems;d.length||(e=Rj(a.i.servers),e.size==1&&(d=Array.from(e.keys())));e=t(d);var g=e.next();for(f={};!g.done;f={Vh:void 0},g=e.next()){f.Vh=g.value;g=t(b);for(var h=g.next();!h.done;h=g.next())if(h=h.value.decodingInfos.find(function(n){return function(p){return p.supported&&
p.keySystemAccess!=null&&p.keySystemAccess.keySystem==n.Vh}}(f)))return h.keySystemAccess}e=t([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=t(b),h=g.next();!h.done;h=g.next()){h=t(h.value.decodingInfos);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.supported&&k.keySystemAccess){var l=k.keySystemAccess.keySystem;if(!d.includes(l)){var m=c.get(l);!m&&a.i.keySystemsMapping[l]&&(m=c.get(a.i.keySystemsMapping[l]));l=t(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
f)return k.keySystemAccess}}}return null}function vk(a){ok(a)&&a.m.resolve()}function wk(a,b){(new Ke(function(){b.loaded=!0;vk(a)})).ia(xk)}
function mk(a,b,c){var d,e,f,g,h,k,l;G(function(m){switch(m.i){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new K(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.C.I(d,"message",function(n){yk(a)?a.N.push(n):jk(a,n)});a.C.I(d,"keystatuseschange",function(n){return zk(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,hg:Infinity,pb:null,type:"persistent-license",zd:0,Dh:!1};a.j.set(d,f);m.o(2);return m.h(d.load(b),4);case 4:return g=m.j,Oj(a.l),
g||(a.j.delete(d),h=a.i.persistentSessionOnlinePlayback?1:2,a.o(new K(h,6,6013)),f.loaded=!0),wk(a,f),vk(a),m.return(d);case 2:k=m.m(),Oj(a.l,k),a.j.delete(d),l=a.i.persistentSessionOnlinePlayback?1:2,a.o(new K(l,6,6005,k.message)),f.loaded=!0,vk(a);case 3:return m.return(Promise.resolve())}})}
function pk(a,b,c,d,e){e=e===void 0?!1:e;try{var f=a.B.createSession(d)}catch(g){return a.o(new K(2,6,6005,g.message)),null}a.C.I(f,"message",function(g){yk(a)?a.N.push(g):jk(a,g)});a.C.I(f,"keystatuseschange",function(g){return zk(a,g)});a.j.set(f,{initData:c,initDataType:b,loaded:!1,hg:Infinity,pb:null,type:d,zd:0,Dh:e});f.closed.then(function(g){if(!a.l.h){var h=a.j.get(f);if(h){var k=f;g=g||"unknown";g!=="unknown"&&(a.j.delete(k),Ak(a,g,h))}}}).catch(function(){});a.i.logLicenseExchange&&Mb(c);
f.generateRequest(b,c).catch(function(g){if(!a.l.h){a.j.delete(f);var h=g.errorCode;if(h&&h.systemCode){var k=h.systemCode;k<0&&(k+=4294967296);k="0x"+k.toString(16)}a.o(new K(2,6,6006,g.message,g,k))}});return f}function yk(a){return a.u?a.i.delayLicenseRequestUntilPlayed&&a.u.paused&&!a.oa:a.i.delayLicenseRequestUntilPlayed}function Bk(a){return G(function(b){return b.i==1?!a.L||yk(a)?b.A(0):b.h(a.m.promise,3):b.h(Promise.all(a.V.map(function(c){return c.promise})),0)})}
function jk(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x;G(function(A){switch(A.i){case 1:c=b.target;a.i.logLicenseExchange&&Mb(b.message);d=a.j.get(c);e=a.h.licenseServerUri;f=a.i.advanced[a.h.keySystem];b.messageType=="individualization-request"&&f&&f.individualizationServer&&(e=f.individualizationServer);g=Ej([e],a.i.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.h;d&&(g.initData=d.initData,g.initDataType=d.initDataType,d.Dh&&
(g.licenseRequestType="license-renewal"));if(f&&f.headers)for(h in f.headers)g.headers[h]=f.headers[h];if(k=Yb(a.h.keySystem)){var C=g,z=a.h;try{var B=Eb(C.body);if(B){var D=JSON.parse(B);D.type||(D.type=z.sessionType,C.body=Fb(JSON.stringify(D)))}}catch(F){}}if($b(a.h.keySystem))if(C=Cb(g.body,!0,!0),C.includes("PlayReadyKeyMessage")){C=od(C,"PlayReadyKeyMessage");z=xd(C,"HttpHeader");z=t(z);for(B=z.next();!B.done;B=z.next())D=B.value,B=xd(D,"name")[0],D=xd(D,"value")[0],g.headers[wd(B)]=wd(D);C=
xd(C,"Challenge")[0];g.body=Nb(wd(C))}else g.headers["Content-Type"]="text/xml; charset=utf-8";l=Date.now();A.o(2);n=a.F.Ac.request(2,g,{isPreload:a.U()});a.V.push(n);return A.h(n.promise,4);case 4:m=A.j;bb(a.V,n);A.u(3);break;case 2:p=A.m();if(a.l.h)return A.return();u={sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType};r=new K(2,6,6007,p,u);if(a.i.failureCallback)try{a.i.failureCallback(r)}catch(F){}if(r.handled)return d&&d.pb&&d.pb.reject(r),A.return();a.j.size==
1?(a.o(r),d&&d.pb&&d.pb.reject(r)):(d&&d.pb&&d.pb.reject(r),a.j.delete(c),ok(a)&&(a.m.resolve(),a.M.ia(.1)));return A.return();case 3:if(a.l.h)return A.return();a.K+=(Date.now()-l)/1E3;a.i.logLicenseExchange&&Mb(m.data);k&&Ck(a,m);A.o(5);return A.h(c.update(m.data),7);case 7:d&&(d.zd=Date.now()/1E3);A.u(6);break;case 5:return w=(v=A.m())&&v.message||String(v),y=new K(2,6,6008,w),a.o(y),d&&d.pb&&d.pb.reject(y),A.return();case 6:if(a.l.h)return A.return();x=new nj("drmsessionupdate");a.F.onEvent(x);
d&&(d.pb&&d.pb.resolve(),wk(a,d));A.l()}})}function Ck(a,b){b=Bb(b.data);try{var c=JSON.parse(b),d=new Map(c.keys.map(function(l){var m=l.kid;l=l.k;return[ec(m),ec(l)]}));if(a.h.clearKeys)for(var e=t(d),f=e.next();!f.done;f=e.next()){var g=t(f.value),h=g.next().value,k=g.next().value;a.h.clearKeys.set(h,k)}else a.h.clearKeys=d}catch(l){}}
function zk(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=nb();if($b(a.h.keySystem)&&g.byteLength==16&&h.Pe()){h=xb(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)}c&&f!="status-pending"&&(c.loaded=!0);f=="expired"&&(d=!0);g=Pb(g).slice(0,32);a.Z.set(g,f)});var e=b.expiration-Date.now();(e<0||d&&e<1E3)&&c&&!c.pb&&(a.j.delete(b),rk(a,b));ok(a)&&(a.m.resolve(),
a.M.ia(Dk))}function Vj(a){var b=a.Z,c=a.ma;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return d=="expired"})&&a.o(new K(2,6,6014));a.F.Sh(Sj(c))}
function Ek(){var a,b,c,d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H,O;return G(function(R){if(R.i==1){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&
window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b={};c=t(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return R.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];
m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};p=[null,"cenc","cbcs"];u=new Map;r=nb();v=function(N,S,L){var P,Q,M,W,ha,I,U,T,Y,fa,ja,sa,Ga;return G(function(pa){switch(pa.i){case 1:return pa.o(2),pa.h(S.createMediaKeys(),5);case 5:P=pa.j;case 4:pa.u(3);break;case 2:return pa.m(),pa.return();case 3:M=(Q=S.getConfiguration().sessionTypes)?Q.includes("persistent-license"):
!1;r.Nh()&&(M=!1);W=S.getConfiguration().videoCapabilities;ha=S.getConfiguration().audioCapabilities;I={persistentState:M,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};u.get(N)?I=u.get(N):u.set(N,I);(U=W[0].encryptionScheme)&&!I.encryptionSchemes.includes(U)&&I.encryptionSchemes.push(U);(T=W[0].robustness)&&!I.videoRobustnessLevels.includes(T)&&I.videoRobustnessLevels.push(T);(Y=ha[0].robustness)&&!I.audioRobustnessLevels.includes(Y)&&I.audioRobustnessLevels.push(Y);
if(!(L&&"getStatusForPolicy"in P)){pa.A(0);break}fa=t(f);ja=fa.next();case 7:if(ja.done){pa.A(0);break}sa=ja.value;if(I.minHdcpVersions.includes(sa)){pa.A(8);break}return pa.h(P.getStatusForPolicy({minHdcpVersion:sa}),10);case 10:if(Ga=pa.j,Ga=="usable")I.minHdcpVersions.includes(sa)||I.minHdcpVersions.push(sa);else{pa.A(0);break}case 8:ja=fa.next(),pa.A(7)}})};w=function(N,S,L,P,Q){Q=Q===void 0?!1:Q;var M,W,ha,I,U,T,Y,fa,ja,sa,Ga;return G(function(pa){switch(pa.i){case 1:pa.o(2);M=ld(n);W=t(M.videoCapabilities);
for(ha=W.next();!ha.done;ha=W.next())I=ha.value,I.encryptionScheme=S,I.robustness=L;U=t(M.audioCapabilities);for(T=U.next();!T.done;T=U.next())Y=T.value,Y.encryptionScheme=S,Y.robustness=P;fa=ld(M);fa.persistentState="required";fa.sessionTypes=["persistent-license"];ja=[fa,M];Ga=nb();return Ga.Ha()=="MOBILE"?pa.h(Te(5,navigator.requestMediaKeySystemAccess(N,ja)),7):pa.h(navigator.requestMediaKeySystemAccess(N,ja),6);case 6:sa=pa.j;pa.A(5);break;case 7:sa=pa.j;case 5:return pa.h(v(N,sa,Q),8);case 8:pa.u(0);
break;case 2:pa.m(),pa.l()}})};y=[];x=t(a);for(A=x.next();!A.done;A=x.next()){C=A.value;u.set(C,null);z=!0;B=t(p);for(D=B.next();!D.done;D=B.next())F=D.value,y.push(w(C,F,"","",z)),z=!1;E=t(k[C]||[]);for(H=E.next();!H.done;H=E.next())O=H.value,y.push(w(C,null,O,"")),y.push(w(C,null,"",O))}return R.h(Promise.all(y),2)}return R.return(Sj(u))})}
function rk(a,b){var c,d;return G(function(e){switch(e.i){case 1:return c=null,e.o(2),e.h(Te(Fk,Promise.all([b.close().catch(function(){}),b.closed])),4);case 4:d=e.j;c=d[1];e.u(3);break;case 2:e.m();case 3:c&&c!=="unknown"&&Ak(a,c),e.l()}})}
function Ak(a,b,c){if(b==="internal-error")a.o(new K(2,6,6005,"CDM reported internal error"));else if(b!=="closed-by-application"&&b!=="release-acknowledged"&&b!=="resource-evicted"&&b==="hardware-context-reset"&&c)if(c.initDataType&&c.initData)try{pk(a,c.initDataType,c.initData,c.type)}catch(d){a.o(new K(2,6,6005,"Failed to recreate session after hardware context reset: "+d.message))}else a.o(new K(2,6,6005,"Cannot recreate session after hardware reset: missing metadata"))}
function Yj(a){var b;return G(function(c){b=Array.from(a.j.entries());a.j.clear();return c.h(Promise.all(b.map(function(d){d=t(d);var e=d.next().value;var f=d.next().value;return G(function(g){if(g.i==1)return g.o(2),a.D.has(e.sessionId)||f.type!=="persistent-license"||a.i.persistentSessionOnlinePlayback?g.h(rk(a,e),5):g.h(e.remove(),5);if(g.i!=2)return g.u(0);g.m();g.l()})})),0)})}function dk(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function Wj(a){var b=Date.now()/1E3;a.j.forEach(function(c,d){var e=c.hg,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(a.F.onExpirationUpdated(d.sessionId,f),c.hg=f);a.i.renewalIntervalSec>0&&(e=b-c.zd,c.zd>0&&e>=a.i.renewalIntervalSec&&qk(a,d))})}
function qk(a,b){var c,d,e,f,g,h,k,l;G(function(m){switch(m.i){case 1:if(c=a.j.get(b))c.zd=Date.now()/1E3;if(!a.h)return m.return();d=a.h.keySystem;e=b;f={sessionId:b.sessionId,sessionType:a.h.sessionType,initData:c?c.initData:null,initDataType:c?c.initDataType:null};m.o(2);return ac(d)?(g=Fb("renew"),m.h(b.update(g),5)):$b(d)&&c&&c.initData&&c.initDataType?m.h(Gk(a,b,c),7):(Va("Manual license renewal is not supported for "+d),m.return());case 7:e=m.j;m.A(5);break;case 5:m.u(3);break;case 2:return m.m(),
m.return();case 3:h=a.j.get(e),k={sessionId:e.sessionId,sessionType:a.h.sessionType,initData:h?h.initData:null,initDataType:h?h.initDataType:null},l=new nj("licenserenewal",(new Map).set("oldSessionMetadata",f).set("newSessionMetadata",k)),a.F.onEvent(l),m.l()}})}
function Gk(a,b,c){var d;return G(function(e){if(e.i==1)return a.j.delete(b),e.h(rk(a,b),2);d=pk(a,c.initDataType,c.initData,a.h.sessionType,!0);if(!d)throw new K(2,6,6005,"Failed to create new session for renewal");return e.return(d)})}function ok(a){a=a.j.values();return Qj(a,function(b){return b.loaded})}function nk(a){for(var b=t(a.h&&a.h.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if(a.Z.get(c.value)!=="usable")return!1;return!0}
function ck(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
function uk(a,b,c){var d=[],e=[],f=[],g=[],h=[],k=new Set,l=new Set;Hk(c,d,e,g,f,h,k,l);a=a.ea?"persistent-license":"temporary";b={keySystem:b,encryptionScheme:d[0],licenseServerUri:e[0],distinctiveIdentifierRequired:c[0].distinctiveIdentifierRequired,persistentStateRequired:c[0].persistentStateRequired,sessionType:c[0].sessionType||a,audioRobustness:c[0].audioRobustness||"",videoRobustness:c[0].videoRobustness||"",serverCertificate:g[0],serverCertificateUri:f[0],initData:h,keyIds:k,mediaTypes:c[0].mediaTypes};
l.size>0&&(b.keySystemUris=l);c=t(c);for(l=c.next();!l.done;l=c.next())l=l.value,l.distinctiveIdentifierRequired&&(b.distinctiveIdentifierRequired=l.distinctiveIdentifierRequired),l.persistentStateRequired&&(b.persistentStateRequired=l.persistentStateRequired);return b}
function Hk(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Ga:void 0},l=a.next()){m.Ga=l.value;b.includes(m.Ga.encryptionScheme)||b.push(m.Ga.encryptionScheme);Yb(m.Ga.keySystem)&&m.Ga.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ga.licenseServerUri)||k.push(m.Ga.licenseServerUri):c.includes(m.Ga.licenseServerUri)||c.push(m.Ga.licenseServerUri);e.includes(m.Ga.serverCertificateUri)||e.push(m.Ga.serverCertificateUri);m.Ga.serverCertificate&&(d.some(function(u){return function(r){return sb(r,
u.Ga.serverCertificate)}}(m))||d.push(m.Ga.serverCertificate));if(m.Ga.initData){l=t(m.Ga.initData);for(var n=l.next(),p={};!n.done;p={Vf:void 0},n=l.next())p.Vf=n.value,f.some(function(u){return function(r){var v=u.Vf;return r.keyId&&r.keyId==v.keyId?!0:r.initDataType==v.initDataType&&sb(r.initData,v.initData)}}(p))||f.push(p.Vf)}if(m.Ga.keyIds)for(l=t(m.Ga.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ga.keySystemUris&&h)for(m=t(m.Ga.keySystemUris),l=m.next();!l.done;l=m.next())h.add(l.value)}if(k.length==
1)c.push(k[0]);else if(k.length>0){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,va(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
function ek(a,b,c,d){var e=a.keySystem;if(e&&(!Yb(e)||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.serverCertificate||(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=
c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&e=="com.microsoft.playready"&&(a.keySystem="com.chromecast.playready")}}function bk(a,b){a=Rj(a);if(a.size!=0){a=uc(a);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var Fk=1,xk=5,Dk=.5;function Ik(){}function Jk(a){a=Eb(a);return uj(a)}function Kk(a,b,c){function d(h){xb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(tb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new K(2,6,6015);var e;typeof b=="string"?e=Gb(b,!0):e=b;a=Eb(a);a=Gb(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Lk(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=Eb(a).split("skd://").pop();return Kk(a,c,b)}
function Mk(a,b){a!==2||b.attempt>0||(a=b.drmInfo)&&ac(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}J("shaka.drm.FairPlay",Ik);
Ik.commonFairPlayResponse=function(a,b){if(a===2&&(a=b.originalRequest.drmInfo)&&ac(a.keySystem)){try{var c=Bb(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=ub(Nb(c)))}};
Ik.gumletFairPlayRequest=function(a,b){a!==2||b.attempt>0||(a=b.drmInfo)&&ac(a.keySystem)&&b.body&&(a=tb(b.body),a=Mb(a),b.body=Fb(JSON.stringify({Wl:a})),b.headers["Content-Type"]="application/json")};Ik.muxFairPlayRequest=function(a,b){Mk(a,b)};Ik.expressplayFairPlayRequest=function(a,b){Mk(a,b)};Ik.conaxFairPlayRequest=function(a,b){Mk(a,b)};Ik.ezdrmFairPlayRequest=function(a,b){Mk(a,b)};
Ik.verimatrixFairPlayRequest=function(a,b){a!==2||b.attempt>0||(a=b.drmInfo)&&ac(a.keySystem)&&(a=tb(b.body),a=Mb(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Fb("spc="+a))};Ik.muxInitDataTransform=function(a,b,c){return Lk(a,b,c)};Ik.expressplayInitDataTransform=function(a,b,c){return Lk(a,b,c)};
Ik.conaxInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=Eb(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(c.length*2);d=wb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Kk(a,d,b)};Ik.ezdrmInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=Eb(a).split(";").pop();return Kk(a,c,b)};Ik.verimatrixInitDataTransform=function(a,b,c){return Lk(a,b,c)};Ik.initDataTransform=Kk;
Ik.defaultGetContentId=Jk;Ik.isFairPlaySupported=function(){var a;return G(function(b){if(b.i==1)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},b.o(2),b.h(navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(b.i!=2)return b.return(!0);b.m();return b.return(!1)})};function Nk(a){var b=0,c=xb(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=tb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Ok(a){a=Nk(a).find(function(b){return b.type===Pk});if(!a)return null;a=Cb(a.value,!0);return(a=od(a,"WRMHEADER"))?a:null}
function Qk(a){try{var b=Ok(a);if(b)a:{for(var c=t(xd(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=t(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if(h.tagName=="LA_URL"){var k=wd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Pk=1;function Rk(a,b,c){this.type=a;this.Y=b;this.segments=c||null}function Sk(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=d===void 0?null:d}Sk.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 Tk(a,b){return a.attributes.find(function(c){return c.name===b})||null}function X(a,b,c){return(a=Tk(a,b))?a.value:c||null}function Uk(a,b){a=Tk(a,b);if(!a)throw new K(2,4,4023,b);return a.value}function Vk(a,b,c){c=c===void 0?[]:c;this.Y=b;this.i=a;this.h=c}function Wk(a,b){this.name=a;this.value=b};function Xk(a,b){return a.filter(function(c){return c.name==b})}function Yk(a,b){return a.filter(function(c){return Uk(c,"TYPE")==b})}function Zk(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function $k(a,b,c){c=c===void 0?0:c;return(a=Zk(a,b))?Number(a.value):c}function al(a,b,c){return b?bl(a,[b],c):[]}function bl(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return cl(e,c)}));return rj(a,d)}
function cl(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new K(2,4,4039,e);}}return a}function dl(a){a=a.value;var b=a.indexOf(",");return Number(b===-1?a:a.substring(0,b))}function el(a){return(a=X(a,"SUPPLEMENTAL-CODECS"))?a.split(/\s*,\s*/).map(function(b){return b.split("/")[0]}).join(","):""};function fl(){this.h=0}
function gl(a,b){var c=Bb(b).trim().split(/[\r\n]+/);if(!c[0].startsWith("#EXTM3U"))throw new K(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=hl(a,h);d||(il.has(h.name)?(b=1,d=!0):h.name=="EXT-X-STREAM-INF"||h.name=="EXT-X-MEDIA"?d=!0:jl.has(h.name)&&(b=1,d=!0));if(jl.has(h.name)){if(b!=1)throw new K(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=hl(f,m),il.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"?X(m,"TYPE")=="PART"?l.push(m):X(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 Vk(m,h,l),d<a.length?a[d++]=h:(a.push(h),d++),h=[],l=[]}l.length&&(k&&h.push(k),c=new Vk("",h,l),d<a.length?a[d++]=c:(a.push(c),d++));return new Rk(b,e,d<a.length?a.slice(0,d):a)}e.push(h);
h.name=="EXT-X-STREAM-INF"&&(h.attributes.push(new Wk("URI",k)),f=!0)}}return new Rk(b,e)}
function hl(a,b){a=a.h++;var c=b.indexOf(":"),d=c===-1?b.substring(1):b.substring(1,c);if(!d.startsWith("EXT"))throw new K(2,4,4016,b);b=c===-1?null:b.substring(c+1);if(b===null)a=new Sk(a,d,[]);else if(b.indexOf("=")===-1)a=new Sk(a,d,[],b);else{c=[];var e=null,f=0,g=b.indexOf(","),h=b.indexOf("=");g!==-1&&g<h&&(e=b.substring(0,g),f=g+1);for(;f<b.length;){for(;b[f]===" ";)f++;h=b.indexOf("=",f);if(h===-1)break;g=b.substring(f,h);f=h+1;if(b[f]==='"'){f++;var k=b.indexOf('"',f);h=k===-1?b.substring(f):
b.substring(f,k);f=k===-1?b.length:k+1}else k=b.indexOf(",",f),h=k===-1?b.substring(f):b.substring(f,k),f=k===-1?b.length:k;f<b.length&&b[f]===","&&f++;c.push(new Wk(g,h))}a=new Sk(a,d,c,e)}return a}var il=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(" ")),jl=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 kl(a,b,c,d,e,f,g,h){this.S=a;this.startByte=b;this.endByte=c;this.Vc=d===void 0?null:d;this.timescale=e===void 0?null:e;this.i=f===void 0?null:f;this.aesKey=g===void 0?null:g;this.h=this.mimeType=this.codecs=null;this.encrypted=h===void 0?!1:h}kl.prototype.jc=function(){return this.startByte};kl.prototype.fc=function(){return this.endByte};kl.prototype.Id=function(a){this.i=a};kl.prototype.uc=function(){return this.i};
function ll(a,b){return a===b?!0:a&&b?a.jc()==b.jc()&&a.fc()==b.fc()&&eb(a.S().sort(),b.S().sort())&&sb(a.uc(),b.uc()):a==b}J("shaka.media.InitSegmentReference",kl);kl.prototype.getEndByte=kl.prototype.fc;kl.prototype.getStartByte=kl.prototype.jc;
function ml(a,b,c,d,e,f,g,h,k,l,m,n,p,u,r,v){l=l===void 0?[]:l;u=u===void 0?nl:u;this.startTime=a;this.m=this.endTime=b;this.H=c;this.startByte=d;this.endByte=e;this.$=f;this.o=g;this.G=h;this.F=k;this.i=l;this.tilesLayout=m===void 0?"":m;this.D=n===void 0?null:n;this.h=p===void 0?null:p;this.status=u;this.preload=!1;this.l=!0;this.B=!1;this.aesKey=r===void 0?null:r;this.thumbnailSprite=null;this.j=-1;this.u=v===void 0?!1:v;this.yd=this.Bc=!1;a=t(this.i);for(b=a.next();!b.done;b=a.next())b.value.Lh();
this.u&&this.i.length&&this.i[this.i.length-1].Jh();this.C=this.bandwidth=this.mimeType=this.codecs=null;this.K=!1;this.J=null}q=ml.prototype;q.S=function(){return this.H()};q.getStartTime=function(){return this.startTime};q.kj=function(){return this.endTime};q.jc=function(){return this.startByte};q.fc=function(){return this.endByte};
function ol(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.i.length>0&&a.u)for(a=t(a.i),a=a.next();!a.done;a=a.next()){ol(a.value);break}return null}q.Fj=function(){return this.tilesLayout};q.Ej=function(){return this.D};q.Gb=function(){return this.status};q.Tj=function(){this.status=pl};q.cg=function(){this.preload=!0};q.isPreload=function(){return this.preload};q.Kh=function(){this.l=!1};q.Lj=function(){return this.l};
q.Lh=function(){this.Bc=!0};q.Nj=function(){return this.Bc};q.Jh=function(){this.yd=!0};q.Mj=function(){return this.yd};q.Ih=function(){this.B=!0};q.Jj=function(){return this.B};q.ki=function(a){this.thumbnailSprite=a};q.Cj=function(){return this.thumbnailSprite};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.m+=a;for(var b=t(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.m+=a};
q.Fg=function(a){this.h==null?Ua("Sync attempted without sync time!"):(a=this.h-a-this.startTime,Math.abs(a)>=.001&&this.offset(a))};q.Id=function(a,b){this.C=a;this.K=b===void 0?!1:b};q.uc=function(a){var b=this.C;(a===void 0||a)&&this.K&&(this.C=null);return b};q.Ag=function(a){this.J=a};q.getMetadata=function(){return this.J};J("shaka.media.SegmentReference",ml);ml.prototype.getMetadata=ml.prototype.getMetadata;ml.prototype.setMetadata=ml.prototype.Ag;ml.prototype.getSegmentData=ml.prototype.uc;
ml.prototype.setSegmentData=ml.prototype.Id;ml.prototype.syncAgainst=ml.prototype.Fg;ml.prototype.offset=ml.prototype.offset;ml.prototype.getThumbnailSprite=ml.prototype.Cj;ml.prototype.setThumbnailSprite=ml.prototype.ki;ml.prototype.hasByterangeOptimization=ml.prototype.Jj;ml.prototype.markAsByterangeOptimization=ml.prototype.Ih;ml.prototype.isLastPartial=ml.prototype.Mj;ml.prototype.markAsLastPartial=ml.prototype.Jh;ml.prototype.isPartial=ml.prototype.Nj;ml.prototype.markAsPartial=ml.prototype.Lh;
ml.prototype.isIndependent=ml.prototype.Lj;ml.prototype.markAsNonIndependent=ml.prototype.Kh;ml.prototype.isPreload=ml.prototype.isPreload;ml.prototype.markAsPreload=ml.prototype.cg;ml.prototype.markAsUnavailable=ml.prototype.Tj;ml.prototype.getStatus=ml.prototype.Gb;ml.prototype.getTileDuration=ml.prototype.Ej;ml.prototype.getTilesLayout=ml.prototype.Fj;ml.prototype.getEndByte=ml.prototype.fc;ml.prototype.getStartByte=ml.prototype.jc;ml.prototype.getEndTime=ml.prototype.kj;
ml.prototype.getStartTime=ml.prototype.getStartTime;ml.prototype.getUris=ml.prototype.S;var nl=0,pl=1;ml.Status={Rk:nl,Bl:pl,al:2};function ql(a,b,c,d){this.i=a;this.G=b;this.u=this.o=Infinity;this.j=d===void 0?1:d;this.h=this.m=null;this.D=0;this.C=!0;this.L=!1;this.K=0;this.H=c===void 0?!0:c;this.J=0;this.B=!1;this.l=a;this.F=[]}q=ql.prototype;q.getDuration=function(){return this.o};q.qj=function(){return this.j};q.ei=function(a){this.i=a};q.qc=function(a){this.o=a};q.xj=function(){return this.i};q.wk=function(a){this.D=a};q.Se=function(a){a&&!this.C&&(this.L=!0);this.C=a};q.ji=function(a){this.u=a};q.ye=function(){return this.u};
q.ci=function(a){this.G=a};q.jj=function(){return this.G};q.$j=function(a,b){if(a.length!=0){var c=(Date.now()+this.D)/1E3;a=a.filter(function(e){return e.start+b<c});if(a.length!=0){var d=a[a.length-1].end+b;this.Le(a[0].start+b);this.j=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.j);this.h=Math.max(this.h,d);this.i!=null&&this.H&&!this.B&&(this.i=c-this.h-this.j)}}};
q.Rh=function(a){if(a.length!=0){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.D)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.j=Math.max(this.j,e.endTime-e.startTime));this.Le(b);this.h=Math.max(this.h,c);this.i!=null&&this.H&&!this.B&&(this.i=d-this.h-this.j)}};q.Zj=function(a,b){this.Le(a);b==Infinity||this.isLive()||(this.h=Math.max(this.h,b))};q.rj=function(){return this.h};q.Gh=function(){this.B=!0};
q.Oj=function(){return this.B};q.di=function(a){this.l=a};q.oj=function(){return this.l};q.gi=function(a){this.F=a};q.Tf=function(a){if(!this.F.length)return null;for(var b=this.F[0],c=t(this.F),d=c.next();!d.done;d=c.next())if(d=d.value,d.start<=a)b=d;else break;return b};q.qh=function(a){var b=this.Tf(a);return b?b.mg+(a-b.start):this.l==null?null:this.l+a};q.Le=function(a){this.m==null?this.m=a:this.L||(this.m=Math.min(this.m,a))};q.Yj=function(a){this.j=Math.max(this.j,a)};
q.offset=function(a){this.m!=null&&(this.m+=a);this.h!=null&&(this.h+=a)};q.isLive=function(){return this.o==Infinity&&!this.C};q.Uc=function(){return this.o!=Infinity&&!this.C};q.ra=function(){return!this.C};q.ud=function(){var a=this.td()-this.u;return Math.max(this.K,a)};q.li=function(a){this.K=a};q.td=function(){return this.ra()?Math.min(Math.max(0,(Date.now()+this.D)/1E3-this.j-this.i)+this.J,this.o):this.h?Math.min(this.h,this.o):this.o};
q.sd=function(a){var b=Math.max(this.m,this.K);if(this.u==Infinity)return Math.ceil(b*1E3)/1E3;var c=this.td()-this.u;a=Math.min(c+a,this.kb());return Math.max(b,a)};q.xb=function(){return this.sd(0)};q.kb=function(){var a=this.ra()?this.G:0;return Math.max(0,this.td()-a)};q.Kk=function(){return this.i==null||this.h!=null&&this.H?!1:!0};q.vk=function(a){this.J=a};q.fj=function(){return this.J};J("shaka.media.PresentationTimeline",ql);ql.prototype.getAvailabilityTimeOffset=ql.prototype.fj;
ql.prototype.setAvailabilityTimeOffset=ql.prototype.vk;ql.prototype.usingPresentationStartTime=ql.prototype.Kk;ql.prototype.getSeekRangeEnd=ql.prototype.kb;ql.prototype.getSeekRangeStart=ql.prototype.xb;ql.prototype.getSafeSeekRangeStart=ql.prototype.sd;ql.prototype.getSegmentAvailabilityEnd=ql.prototype.td;ql.prototype.setUserSeekStart=ql.prototype.li;ql.prototype.getSegmentAvailabilityStart=ql.prototype.ud;ql.prototype.isDynamic=ql.prototype.ra;ql.prototype.isInProgress=ql.prototype.Uc;
ql.prototype.isLive=ql.prototype.isLive;ql.prototype.offset=ql.prototype.offset;ql.prototype.notifyMaxSegmentDuration=ql.prototype.Yj;ql.prototype.notifyMinSegmentStartTime=ql.prototype.Le;ql.prototype.getProgramDateTimeForTime=ql.prototype.qh;ql.prototype.getProgramDateTimeRegionForTime=ql.prototype.Tf;ql.prototype.setProgramDateTimeRegions=ql.prototype.gi;ql.prototype.getInitialProgramDateTime=ql.prototype.oj;ql.prototype.setInitialProgramDateTime=ql.prototype.di;
ql.prototype.isStartTimeLocked=ql.prototype.Oj;ql.prototype.lockStartTime=ql.prototype.Gh;ql.prototype.getMaxSegmentEndTime=ql.prototype.rj;ql.prototype.notifyPeriodDuration=ql.prototype.Zj;ql.prototype.notifySegments=ql.prototype.Rh;ql.prototype.notifyTimeRange=ql.prototype.$j;ql.prototype.getDelay=ql.prototype.jj;ql.prototype.setDelay=ql.prototype.ci;ql.prototype.getSegmentAvailabilityDuration=ql.prototype.ye;ql.prototype.setSegmentAvailabilityDuration=ql.prototype.ji;ql.prototype.setStatic=ql.prototype.Se;
ql.prototype.setClockOffset=ql.prototype.wk;ql.prototype.getPresentationStartTime=ql.prototype.xj;ql.prototype.setDuration=ql.prototype.qc;ql.prototype.setPresentationStartTime=ql.prototype.ei;ql.prototype.getMaxSegmentDuration=ql.prototype.qj;ql.prototype.getDuration=ql.prototype.getDuration;function rl(a){var b=this;this.l=a;this.i=new gb;this.h=new Set;this.j=(new Ke(function(){sl(b,!1)})).Xa();a.paused||this.j.Ka(.25);this.i.I(a,"playing",function(){b.j.Xa().Ka(.25)});this.i.I(a,"pause",function(){b.j.stop()});this.i.I(a,"seeked",function(){b.j.Xa();a.paused||b.j.Ka(.25)})}rl.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.j.stop();for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h.clear()};
function sl(a,b){var c=a.l.currentTime;a=t(a.h);for(var d=a.next();!d.done;d=a.next())d.value.l(c,b)};function tl(a){oj.call(this);this.h=new Map;this.i=a}ta(tl,oj);tl.prototype.release=function(){this.h.clear();oj.prototype.release.call(this)};function ul(a,b){var c=a.h.get(b);c||(c={Gd:[],uf:null,contentType:b},a.h.set(b,c));return c}function vl(a,b,c){var d=ul(a,b.contentType);wl(a,d);a={Vc:b,position:c};d=d.Gd;b=d.findIndex(function(e){return e.position>=c});b>=0?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
tl.prototype.l=function(a){for(var b=t(this.h.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.uf;a:{var e=c.Gd;for(var f=e.length-1;f>=0;f--){var g=e[f];if(g.position<=a){e=g.Vc;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&&!eb(d.roles,e.roles);(g||h||d)&&xl(this,a,e.contentType)&&(c.uf=e,d=new nj("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&xl(this,a,e.contentType)&&(c.uf=e,JSON.stringify(e),c=new nj("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function xl(a,b,c){return(a=a.i()[c])&&a.length>0&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function wl(a,b){if((a=a.i()[b.contentType])&&a.length>0){var c=a[0].start,d=a[a.length-1].end,e=b.Gd;b.Gd=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.Gd=[]}
function yl(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};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 zl(a){this.h=a;this.l=null;this.i=0;this.m=!1}q=zl.prototype;q.getNumReferences=function(){return this.h.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.m||(this.h=[],this.l&&this.l.stop(),this.l=null)};q.Uj=function(){this.m=!0};q.Qb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())a(c.value)};function rf(a){return a.h[0]||null}
q.find=function(a){var b=this.h.length-1;if(b<0)return null;if(a<this.h[0].startTime)return this.i;var c=db(this.h,function(e){return e.startTime<=a})-1;if(c<0)return null;var d=this.h[c];b=c<b?this.h[c+1].startTime:d.endTime;return a>=d.startTime&&a<b?c+this.i:null};q.get=function(a){if(this.h.length==0)return null;a-=this.i;return a<0||a>=this.h.length?null:this.h[a]};q.offset=function(a){if(!this.m)for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.offset(a)};
q.eg=function(a){if(!this.m&&a.length){var b=Math.round(a[0].startTime*1E3)/1E3,c=db(this.h,function(d){return Math.round(d.startTime*1E3)/1E3<b});this.h.length=c;this.h.push.apply(this.h,va(a))}};q.Cd=function(a,b){for(var c=Math.max(b,this.h.length>0?this.h[0].startTime:-Infinity),d=0;d<a.length&&a[d].endTime<=c;)d++;d>0&&(a=a.slice(d));this.eg(a);this.wb(b)};q.wb=function(a){if(!this.m){var b=db(this.h,function(c){return c.endTime<=a});b>0&&(this.i+=b,this.h=this.h.slice(b))}};
q.se=function(a,b,c){c=c===void 0?!1:c;if(!this.m){for(;this.h.length;)if(this.h[this.h.length-1].startTime>=b)this.h.pop();else break;var d=db(this.h,function(e){return e.endTime<=a});d>0&&(c||(this.i+=d),this.h=this.h.slice(d));this.h.length!=0&&(c=this.h[this.h.length-1],b=new ml(c.startTime,b,c.H,c.startByte,c.endByte,c.$,c.o,c.G,c.F,c.i,c.tilesLayout,c.D,c.h,c.status,c.aesKey),b.mimeType=c.mimeType,b.codecs=c.codecs,b.j=c.j,this.h[this.h.length-1]=b)}};
q.Lg=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Ke(function(){var d=b();d?c.h.push.apply(c.h,va(d)):(c.l.stop(),c.l=null)}),this.l.Ka(a))};zl.prototype[Symbol.iterator]=function(){return this.Eb(0)};
zl.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.i.length>0)for(var g=e.i.length-1;g>=0;--g){var h=e.i[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.i[g];if(!h.l)return Ua("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Al(this,d,f,c)};function Bl(a,b,c){a=new ml(a,a+b,function(){return c},0,null,null,a,a,a+b);return new zl([a])}
J("shaka.media.SegmentIndex",zl);zl.forSingleSegment=Bl;zl.prototype.getIteratorForTime=zl.prototype.Eb;zl.prototype.updateEvery=zl.prototype.Lg;zl.prototype.fit=zl.prototype.se;zl.prototype.evict=zl.prototype.wb;zl.prototype.mergeAndEvict=zl.prototype.Cd;zl.prototype.offset=zl.prototype.offset;zl.prototype.get=zl.prototype.get;zl.prototype.find=zl.prototype.find;zl.prototype.markImmutable=zl.prototype.Uj;zl.prototype.release=zl.prototype.release;zl.prototype.getNumEvicted=zl.prototype.getNumEvicted;
zl.prototype.getNumReferences=zl.prototype.getNumReferences;function Al(a,b,c,d){this.j=a;this.i=b;this.h=c;this.reverse=d}q=Al.prototype;q.cd=function(a){this.reverse=a};q.Si=function(){return this.i};q.current=function(){var a=this.j.get(this.i);a&&a.i.length>0&&a.u&&this.h>=a.i.length&&(this.i++,this.h=0,a=this.j.get(this.i));return a&&a.i.length>0?a.i[this.h]:a};
q.next=function(){var a=this.j.get(this.i);this.reverse?a&&a.i.length>0?(this.h--,this.h<0&&(this.i--,this.h=(a=this.j.get(this.i))&&a.i.length>0?a.i.length-1:0)):(this.i--,this.h=0):a&&a.i.length>0?(this.h++,a.u&&this.h==a.i.length&&(this.i++,this.h=0)):(this.i++,this.h=0);a=this.current();return{value:a,done:!a}};q.vg=function(){var a=this.current();if(a&&a.Bc&&!a.l&&(a=this.j.get(this.i))&&a.i.length>0)for(var b=a.i[this.h];b.l&&!(this.h<=0);)this.h--,b=a.i[this.h]};
J("shaka.media.SegmentIterator",Al);Al.prototype.resetToLastIndependent=Al.prototype.vg;Al.prototype.next=Al.prototype.next;Al.prototype.current=Al.prototype.current;Al.prototype.currentPosition=Al.prototype.Si;Al.prototype.setReverse=Al.prototype.cd;function Cl(){zl.call(this,[]);this.j=[]}ta(Cl,zl);q=Cl.prototype;q.clone=function(){var a=new Cl;a.j=this.j.slice();a.i=this.i;return a};q.release=function(){this.j=[]};q.Qb=function(a){for(var b=t(this.j),c=b.next();!c.done;c=b.next())c.value.Qb(a)};
function Dl(a,b){a=t(a.j);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.i,c=t(this.j),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 El(a,b){a=t(a.j);for(var c=a.next();!c.done&&c.value.find(b)==null;c=a.next());return-1}
q.get=function(a){for(var b=this.i,c=t(this.j),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};q.offset=function(){};q.eg=function(){};q.wb=function(a){if(this.j.length){var b=this.j[0];b.wb(a);b.getNumReferences()==0&&(this.j.shift(),this.i+=b.getNumEvicted(),b.release(),this.wb(a))}};q.Cd=function(){};q.se=function(){};q.Lg=function(){};J("shaka.media.MetaSegmentIndex",Cl);Cl.prototype.updateEvery=Cl.prototype.Lg;
Cl.prototype.fit=Cl.prototype.se;Cl.prototype.mergeAndEvict=Cl.prototype.Cd;Cl.prototype.evict=Cl.prototype.wb;Cl.prototype.merge=Cl.prototype.eg;Cl.prototype.offset=Cl.prototype.offset;Cl.prototype.get=Cl.prototype.get;Cl.prototype.find=Cl.prototype.find;Cl.prototype.forEachTopLevelReference=Cl.prototype.Qb;Cl.prototype.release=Cl.prototype.release;function Fl(a){return Gl.getOrInsertComputed(a,function(){var b,c;return(c=(b=self.ManagedMediaSource||self.MediaSource)==null?void 0:b.isTypeSupported(a))!=null?c:!1})}function Hl(){var a=self.ManagedMediaSource||self.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var Gl=new Map;function Il(a){var b=qe(a),c=b.split("/")[0];a=re(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Md:null,colorGamut:null,frameRate:null,timescale:null,drmInfos:[]}}
function Jl(a,b,c){function d(I){E=I.name;var U=I.reader;U.skip(24);var T=U.va(),Y=U.va();U.skip(50);r=String(T);u=String(Y);I.reader.Va()&&Vg(I)}function e(I){var U=kh(I.reader);v=U.channelCount;w=U.sampleRate;f(I.name);I.reader.Va()&&Vg(I)}function f(I){I=I.toLowerCase();switch(I){case "avc1":case "avc3":h.push(I+".42E01E");m=!0;break;case "hev1":case "hvc1":h.push(I+".1.6.L93.90");m=!0;break;case "dvh1":case "dvhe":h.push(I+".05.04");m=!0;break;case "vp09":h.push(I+".00.10.08");m=!0;break;case "av01":h.push(I+
".0.01M.08");m=!0;break;case "mp4a":g.push("mp4a.40.2");l=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(I);l=!0;break;case "apac":g.push("apac.31.00"),l=!0}}var g=[],h=[],k=[],l=!1,m=!1,n=!1,p=null,u=null,r=null,v=null,w=null,y=null,x=null,A=null,C=null,z=new Map,B=new Set,D=null,F=null,E,H=0,O=[],R=new Map,N=null,S=new Map;if(a&&b){C=tb(a);var L=tb(b);L=Qb(C,L)}else b?L=tb(b):a&&(L=tb(a));var P;(new Qg).ka([].concat(va(ah),va(bh)),Vg).O("tkhd",function(I){N=jh(I.reader,
I.version).trackId}).O("mdhd",function(I){I=hh(I.reader,I.version);p=I.language;N!==null&&R.set(N,I.timescale)}).O("stsd",Xg).O("tfhd",function(I){I=fh(I.reader,I.flags);I.Ob&&(H=I.Ob)}).O("trun",function(I){O=ih(I.reader,I.version,I.flags).nc}).box("mp4a",function(I){var U=kh(I.reader);v=U.channelCount;w=U.sampleRate;I.reader.Va()?Vg(I):f(I.name)}).box("esds",function(I){I=I.reader;for(var U="mp4a",T,Y;I.Va();){T=I.W();for(var fa=I.W();fa&128;)fa=I.W();if(T==3)I.va(),fa=I.W(),fa&128&&I.va(),fa&64&&
I.skip(I.W()),fa&32&&I.va();else if(T==4)Y=I.W(),I.skip(12);else if(T==5)break}Y&&(U+="."+oh(Y),T==5&&I.Va()&&(T=I.W(),Y=(T&248)>>3,Y===31&&I.Va()&&(Y=32+((T&7)<<3)+((I.W()&224)>>5)),U+="."+Y));g.push(U);l=!0}).ka(eh,e).ka([].concat(va(ch),["vp09","av01"]),d).box("avcC",function(I){var U=E||"";switch(E){case "dvav":U="avc3";break;case "dva1":U="avc1"}I=I.reader;I.skip(1);I=U+"."+oh(I.W())+oh(I.W())+oh(I.W());h.push(I);m=!0}).box("hvcC",function(I){var U=E||"";switch(E){case "dvh1":U="hvc1";break;
case "dvhe":U="hev1"}var T=I.reader;T.skip(1);I=T.W();var Y=["","A","B","C"][I>>6],fa=I&31,ja=T.R(),sa=(I&32)>>5?"H":"L";I=[T.W(),T.W(),T.W(),T.W(),T.W(),T.W()];T=T.W();for(var Ga=0,pa=0;pa<32;pa++){Ga|=ja&1;if(pa==31)break;Ga<<=1;ja>>=1}U=U+("."+Y+fa)+("."+oh(Ga,!0));U+="."+sa+T;Y="";for(fa=I.length;fa--;)if((sa=I[fa])||Y)Y="."+sa.toString(16).toUpperCase()+Y;U+=Y;h.push(U);m=!0}).box("dvcC",function(I){var U=E||"";switch(E){case "hvc1":U="dvh1";break;case "hev1":U="dvhe";break;case "avc1":U="dva1";
break;case "avc3":U="dvav";break;case "av01":U="dav1"}var T=I.reader;T.skip(2);I=T.W();T=T.W();h.push(U+"."+ph(I>>1&127)+"."+ph(I<<5&32|T>>3&31));m=!0}).box("dvvC",function(I){var U=E||"";switch(E){case "hvc1":U="dvh1";break;case "hev1":U="dvhe";break;case "avc1":U="dva1";break;case "avc3":U="dvav";break;case "av01":U="dav1"}var T=I.reader;T.skip(2);I=T.W();T=T.W();h.push(U+"."+ph(I>>1&127)+"."+ph(I<<5&32|T>>3&31));m=!0}).O("vpcC",function(I){var U=E||"",T=I.reader;I=T.W();var Y=T.W();T=T.W()>>4&
15;h.push(U+"."+ph(I)+"."+ph(Y)+"."+ph(T));m=!0}).box("av1C",function(I){var U=E||"";switch(E){case "dav1":U="av01"}var T=I.reader;T.skip(1);I=T.W();T=T.W();var Y=I>>>5,fa=(T&64)>>6;h.push(U+"."+Y+"."+ph(I&31)+(T>>>7?"H":"M")+"."+ph(Y===2&&fa?(T&32)>>5?12:10:fa?10:8)+"."+((T&16)>>4)+"."+((T&8)>>3)+((T&4)>>2)+(T&3)+"."+ph(1)+"."+ph(1)+"."+ph(1)+".0");m=!0}).ka(["wvtt","stpp"],function(I){k.push(I.name);n=!0}).box("c608",function(){S.set("CC1","CC1");N!==null&&R.delete(N)}).box("enca",e).box("encv",
d).box("sinf",Vg).box("frma",function(I){I=lh(I.reader).codec;f(I)}).box("colr",function(I){h=h.map(function(Y){if(Y.startsWith("av01.")){var fa=I.reader,ja=fa.Ia(),sa=fa.wa(4,!1);var Ga=String.fromCharCode(sa[0]);Ga+=String.fromCharCode(sa[1]);Ga+=String.fromCharCode(sa[2]);Ga+=String.fromCharCode(sa[3]);if(Ga==="nclx"){sa=fa.va();Ga=fa.va();var pa=fa.va(),kd=fa.W()>>7,Jb=Y.split(".");Jb.length==10&&(Jb[6]=ph(sa),Jb[7]=ph(Ga),Jb[8]=ph(pa),Jb[9]=String(kd),Y=Jb.join("."))}fa.seek(ja)}return Y});var U=
nh(I.reader),T=U.colorGamut;y=U.Md;x=T}).O("schm",function(I){D=Ug(I.reader.R())}).box("schi",Vg).O("tenc",function(I){F=mh(I.reader,I.version).defaultKID}).O("pssh",function(I){var U=tb(I.reader.i,-12,I.size),T=Pb(U);if(!B.has(T)&&(B.add(T),T=I.reader.wa(16,!1),T=Pb(T),P||(P=dc(!0)),T=P[T.toLowerCase()])){var Y=tc(T,"cenc",[{initDataType:"cenc",initData:U}]);if($b(T)){var fa=8;U=xb(U);var ja=U.getUint8(fa);fa+=20;ja>0&&(fa+=4+16*U.getUint32(fa));U=tb(U,fa+4);U=Qk(U);Y.licenseServerUri=U}if(I.version>
0)for(U=I.reader.R(),fa=0;fa<U;fa++)ja=I.reader.wa(16,!1),Y.keyIds.add(Pb(ja));z.set(T,Y)}}).parse(L,!0,!0);if(!g.length&&!h.length&&!k.length)return null;C=R.values().next().value;L=l&&!m;if(m&&!c&&b&&!S.size){c=new Qc("video/mp4");a&&c.init(a);try{Uc(c,b);for(var Q=t(c.h.getStreams()),M=Q.next();!M.done;M=Q.next()){var W=M.value;S.set(W,W)}}catch(I){}c.h.clear()}a=g.concat(h).concat(k);D==="cbcs"&&F&&!z.has("com.apple.fps")&&z.set("com.apple.fps",tc("com.apple.fps",D,null));b=t(z.values());for(Q=
b.next();!Q.done;Q=b.next())Q=Q.value,D&&(Q.encryptionScheme=D),F&&Q.keyIds.add(F);b="video";Q="video/mp4";n?(b="text",Q="application/mp4"):L&&(b="audio",Q="audio/mp4");if(b==="video"&&C!=null&&O.length){L=C;M=0;W=t(O);for(c=W.next();!c.done;c=W.next()){var ha=void 0;M+=(ha=c.value.bd)!=null?ha:H}M>0&&(A=L*O.length/M)}return{type:b,mimeType:Q,codecs:Kl(a).join(", "),language:p,height:u,width:r,channelCount:v,sampleRate:w,closedCaptions:S,Md:y,colorGamut:x,frameRate:A,timescale:C,drmInfos:Array.from(z.values())}}
function Kl(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=pe(d);b.has(e)||(c.push(d),b.add(e))}b=zc("audio",c);d=zc("video",c);a=zc(yc,c);d=Ll(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function Ll(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?Fl('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function Ml(a){var b=null;(new Qg).ka([].concat(va(ah),["sinf","schi"]),Vg).O("stsd",Xg).box("encv",Yg).box("enca",Zg).O("tenc",function(c){b=mh(c.reader,c.version).defaultKID}).parse(a,!0);return b}
function Nl(a,b,c){var d,e,f,g,h,k,l,m,n;return G(function(p){if(p.i==1)return d=b,d.cryptoKey?p.A(2):p.h(d.fetchKey(),3);if(b.blockCipherMode=="GCM"&&b.bitsKey==256){e=tb(a);if(e.byteLength<32)throw new K(2,4,4060);f=e.slice(0,16);g=e.slice(16);h={name:"AES-GCM",iv:f,tagLength:128};return p.return(window.crypto.subtle.decrypt(h,d.cryptoKey,g))}k=d.iv;if(!k)for(k=tb(new ArrayBuffer(16)),l=d.firstMediaSequenceNumber+c,m=k.byteLength-1;m>=0;m--)k[m]=l&255,l>>=8;b.blockCipherMode=="CBC"?n={name:"AES-CBC",
iv:k}:n={name:"AES-CTR",counter:k,length:64};return p.return(window.crypto.subtle.decrypt(n,d.cryptoKey,a))})};function Ol(){}function Pl(a,b){try{var c=Ql(a);return lj({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return jj(d)}}
function Ql(a){if(!a.startsWith("data:"))throw new K(2,1,1004,a);var b=a.substring(5),c=b.indexOf(",");if(c<0)throw new K(2,1,1004,a);a=b.substring(0,c);b=decodeURIComponent(b.substring(c+1));c=a.split(";");a=c[0];var d=!1;c.length>1&&c[c.length-1].toLowerCase()=="base64"&&(d=!0,c.pop());var e;d?e=Nb(b):e=Fb(b);return{data:e,contentType:a,Kg:c}}J("shaka.net.DataUriPlugin",Ol);Ol.parse=Pl;Aj("data",Pl);function Rl(a,b,c){var d,e,f,g,h,k;return G(function(l){switch(l.i){case 1:var m;if(d=(m=Sl.get(Tl(a)))!=null?m:"")return l.return(d);e=0;f=Ej([a],c);l.o(2);f.method="HEAD";return l.h(b.request(e,f).promise,4);case 4:g=l.j;d=g.headers["content-type"];l.u(3);break;case 2:h=l.m();if(!h||h.code!=1002&&h.code!=1001){l.A(3);break}f.method="GET";return l.h(b.request(e,f).promise,6);case 6:k=l.j,d=k.headers["content-type"];case 3:return l.return(d?d.toLowerCase().split(";").shift():"")}})}
function Tl(a){for(var b=a.length,c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d===63||d===35){b=c;break}}for(c=b-1;c>=0;c--){d=a.charCodeAt(c);if(d===46){if(c+1<b)return a.slice(c+1,b).toLowerCase();break}if(d===47)break}return""}function Ul(a,b,c,d,e){a=Ej(a,d,e);if(b!=0||c!=null)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a}
var Sl=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("cmfv","video/mp4").set("cmfa","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("opus","audio/opus").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac",
"audio/flac").set("wav","audio/wav").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").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 Vl(a){this.u=null;this.C=a;this.H=new pj;this.m=[];this.j=null;this.l=[];this.D=null;this.G=[];this.F=300;this.o=new Map;this.i=new Map;this.h=null;this.B="UNKNOWN"}Vl.prototype.configure=function(a){this.u=a};Vl.prototype.destroy=function(){this.C=this.u=null;this.m=[];this.j=null;this.l=[];this.G=[];this.o.clear();this.h!=null&&(this.h.stop(),this.h=null);return this.H.destroy()};Vl.prototype.setManifestType=function(a){this.B=a};
function Wl(a,b){var c,d,e,f,g,h,k;return G(function(l){if(l.i==1)return c=rj(a.m,[Xl(a,b)]),d=Ej(c,a.u.retryParameters),e=a.C.networkingEngine.request(8,d),qj(a.H,e),l.o(2),l.h(e.promise,4);if(l.i!=2)return f=l.j,g=Bb(f.data),h=JSON.parse(g),h.VERSION==1&&Yl(a,h,f.uri),l.u(0);if((k=l.m())&&k.code==7001)return l.return();a.h!=null&&(a.h.stop(),a.h=null);a.h=new Ke(function(){Wl(a,b)});a.h.ia(a.F);l.l()})}
function Xl(a,b){if(!a.l.length)return b;var c=new Map,d=a.D||a.l[0],e=Math.round(a.C.getBandwidthEstimate());a.B=="DASH"?(c.set("_DASH_pathway",d),c.set("_DASH_throughput",String(e))):a.B=="HLS"&&(c.set("_HLS_pathway",d),c.set("_HLS_throughput",String(e)));return yj(b,c)}function Yl(a,b,c){a.h!=null&&(a.h.stop(),a.h=null);var d=b["RELOAD-URI"]||c;a.h=new Ke(function(){Wl(a,d)});if(c=b.TTL)a.F=c;a.h.ia(a.F);a.l=b["PATHWAY-PRIORITY"]||[];a.G=b["PATHWAY-CLONES"]||[]}
function Zl(a,b,c,d){var e=a.o.get(b);e||(e=new Map);e.set(c,d);a.o.set(b,e)}Vl.prototype.banLocation=function(a){this.i.set(a,Date.now()+6E4)};
function $l(a,b){var c=c===void 0?!1:c;b=a.o.get(b)||new Map;for(var d=[],e=t(a.l),f=e.next(),g={};!f.done;g={Zc:void 0},f=e.next())if(g.Zc=f.value,f=b.get(g.Zc))d.push({kg:g.Zc,location:f});else if(f=a.G.find(function(k){return function(l){return l.$k==k.Zc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].Di?(f=vj(h,f["URI-REPLACEMENT"].Di),d.push({kg:g.Zc,location:f})):d.push({kg:g.Zc,location:h}))}e=Date.now();g=t(a.i.keys());for(f=g.next();!f.done;f=g.next())f=f.value,h=a.i.get(f),e>
h&&a.i.delete(f);d=d.filter(function(k){k=uj(k.location);for(var l=t(a.i.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes(k))return!1;return!0});d.length&&(a.D=d[0].kg);d=d.map(function(k){return k.location});if(!d.length&&a.j)for(e=t(a.j.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.D=a.j,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:rj(a.m,d)};function am(){var a=this;this.h=this.j=null;this.G=1;this.P=new Map;this.U=new Map;this.u=new Map;this.u.set("video",new Map);this.u.set("audio",new Map);this.u.set(yc,new Map);this.u.set("image",new Map);this.Vb=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return bm(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){return cm(a,b)}).set("com.microsoft.playready",function(b){var c=Uk(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";
c=="SAMPLE-AES"&&(d="cbcs");b=Uk(b,"URI");c=Ql(b.split("?")[0]);b=tb(c.data);var e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),f=b.length,g=12+e.length+4+f,h=new Uint8Array(g),k=xb(h),l=0;k.setUint32(l,g);l+=4;k.setUint32(l,1886614376);l+=4;k.setUint32(l,0);l+=4;h.set(e,l);l+=e.length;k.setUint32(l,f);h.set(b,l+4);d=tc("com.microsoft.playready",d,[{initDataType:"cenc",initData:h}],void 0,c.Kg);if(b=od(["<PLAYREADY>",Mb(b),"</PLAYREADY>"].join("\n")))b=Nb(wd(b)),b=Qk(b),
d.licenseServerUri=b;d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){return dm(a,b)});this.$a=new Set;this.l=new Map;this.m=null;this.H="";this.Ma=new fl;this.L=-1;this.sa=Infinity;this.Ya=new WeakMap;this.N=this.Yb=this.Za=!1;this.F=new Ke(function(){if(a.ea&&!a.h.continueLoadingWhenPaused&&(a.ba.mb(a.ea,"timeupdate"),a.ea.paused)){a.ba.Ja(a.ea,"timeupdate",function(){return em(a)});return}em(a)});this.B=fm;this.i=null;
this.Na=0;this.D=Infinity;this.La=this.Aa=this.Z=0;this.ma=new pj;this.J=new Map;this.K=new Map;this.Xb=new Map;this.eb=new Map;this.Ba=new Map;this.Ib=new Map;this.xa=new Map;this.Wb=this.oa=!1;this.Hb=new Qa(5);this.o=null;this.V=!0;this.ba=new gb;this.C=this.ea=null;this.Jb=function(){return!1};this.Ua=new Map;this.M=[];this.Fa=new Map}q=am.prototype;
q.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.h.updatePeriod&&a.updatePeriod>=0;this.h=a;b&&(this.Jb=b);this.o&&this.o.configure(this.h);c&&this.i&&this.i.presentationTimeline.ra()&&this.F.Xa()};q.start=function(a,b){var c=this,d;return G(function(e){return e.i==1?(c.j=b,c.oa=b.isLowLatencyMode(),e.h(gm(c,[a]).promise,2)):e.i!=3?(d=e.j,c.H=d.uri,e.h(hm(c,d.data),3)):e.return(c.i)})};
q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.ma&&(a.push(this.ma.destroy()),this.ma=null);this.h=this.j=null;this.$a.clear();this.i=null;this.l.clear();this.U.clear();this.K.clear();this.P.clear();this.Xb.clear();this.eb.clear();this.Ba.clear();this.Ib.clear();this.xa.clear();this.Ua.clear();this.o&&this.o.destroy();this.ba&&(this.ba.release(),this.ba=null);return Promise.all(a)};
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p,u,r;return G(function(v){if(v.i==1){if(!im(a))return v.return();b=[];c=Array.from(a.l.values());d=c.filter(function(w){return!w.stream.isAudioMuxedInVideo&&w.stream.segmentIndex});if(d.length===0)return v.return();a.D=Infinity;a.i.gapCount=0;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(jm(a,g));b.push(km(a));return v.h(Promise.all(b),2)}h=Array.from(a.Fa.values());k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.i.chapterStreams.includes(m)||
a.i.chapterStreams.push(m);lm(a,d.map(function(w){return w.stream}));n=d.some(function(w){return w.vd==0});d.length&&!n&&(mm(a,fm),nm(a));n&&nm(a);p=t(d);for(u=p.next();!u.done;u=p.next())r=u.value,r.stream.isAudioMuxedInVideo||!r.stream.segmentIndex||rf(r.stream.segmentIndex)||a.j.disableStream(r.stream);v.l()})};function om(a,b){return a.B==pm?a.u.get(b.type):b.He}
function jm(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H,O,R,N,S,L,P,Q,M,W,ha,I,U;return G(function(T){switch(T.i){case 1:if(b.stream.isAudioMuxedInVideo)return T.return();c=[];d=t(b.S());for(e=d.next();!e.done;e=d.next())f=e.value,g=new Map,b.ee&&(b.zb>=0&&g.set("_HLS_msn",String(b.zb)),b.Ab>=0&&g.set("_HLS_part",String(b.Ab))),b.fe?g.set("_HLS_skip","v2"):b.ge&&g.set("_HLS_skip","YES"),c.push(yj(f,g));T.o(2);return T.h(gm(a,c,!0).promise,4);case 4:h=T.j;T.u(3);break;case 2:throw k=
T.m(),a.j&&a.j.disableStream(b.stream),k;case 3:if(!b.stream.segmentIndex)return T.return();l=gl(a.Ma,h.data);if(l.type!=1)throw new K(2,4,4017);m=h.uri;m==h.originalUri||b.S().includes(m)||b.Oe.push(m);n=Xk(l.Y,"EXT-X-DEFINE");p=qm(a,n,m);u=b.stream;r=om(a,b);return T.h(rm(a,l,u.mimeType,b.S,p),5);case 5:v=T.j;w=v.keyIds;y=v.drmInfos;x=v.encrypted;A=v.Vg;u.encrypted||!x||A||(u.encrypted=!0);C=function(Y,fa){return Y.size===fa.size&&[].concat(va(Y)).every(function(ja){return fa.has(ja)})};C(u.keyIds,
w)||(u.keyIds=w,u.drmInfos=y,a.j.newDrmInfo(u));z=h.uri!==h.originalUri;B=sm(a,l,r,p,b.S,b.type,z,u.segmentIndex);D=B.segments;F=B.Dk;if(E=B.bandwidth)u.bandwidth=E;H=yl(u);O=t(D);for(R=O.next();!R.done;R=O.next())N=R.value,N.$&&(N.$.Vc=H);D.length&&u.segmentIndex.Cd(D,a.m.ud());F&&(S=$k(l.Y,"EXT-X-MEDIA-SEQUENCE",0),P=(L=Zk(l.Y,"EXT-X-SKIP"))?Number(X(L,"SKIPPED-SEGMENTS")):0,Q=tm(S,D,F),M=Q.zb,W=Q.Ab,b.zb=M+P,b.Ab=W,ha=r.get(S),u.segmentIndex.wb(ha));Lm(a,u,b.type);if(I=rf(u.segmentIndex))b.zc=
I.startTime,D.length&&(b.lc=D[D.length-1].endTime);if(U=Zk(l.Y,"EXT-X-ENDLIST"))b.vd=!0;Mm(a,l);Nm(a,l.Y,u.type,p,b.S);T.l()}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.o&&this.o.banLocation(a)};q.setMediaElement=function(a){this.ea=a};
function Om(a,b,c){c=c===void 0?!1:c;for(var d=a.L==-1,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=om(a,f);if(g=rf(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.L=Math.max(a.L,l));f.xf=l;break}}}}if(!(a.L<0))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Pm(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.L-d.xf,f>0&&(e.h.splice(0,f),e=rf(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
Qm(a,d,e)}
function Rm(a,b){if(a.sa==Infinity){b=t(b);for(var c=b.next();!c.done;c=b.next())c=rf(c.value.stream.segmentIndex),c!=null&&c.h!=null&&(a.sa=Math.min(a.sa,c.h))}b=a.sa;if(b!=Infinity){c=t(a.l.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Pm(a,d.type)){var e=d.stream.segmentIndex;if(e!=null){var f=rf(e);if(f)if(f.h==null)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.S(),"Expect AV sync issues!");else for(Qm(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Fg(b)}}}}
function Qm(a,b,c){if(!(Math.abs(c)<.001)){b.zc+=c;b.lc+=c;a=om(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.S()}}
function hm(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H,O,R,N,S,L,P,Q;return G(function(M){switch(M.i){case 1:c=Ac;d=gl(a.Ma,b);e=Xk(d.Y,"EXT-X-DEFINE");f=[];g=[];h=[];a.m=new ql(null,0);a.m.Se(!0);k=function(){return[a.H]};l=null;m=new Map;a.i={presentationTimeline:a.m,variants:f,textStreams:g,imageStreams:h,chapterStreams:[],offlineSessionIds:[],sequenceMode:a.h.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.h.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,
nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.C};if(d.type==1)return a.V=!1,z=Xk(d.Y,"EXT-X-DEFINE"),m=qm(a,z,a.H),l=c.qa,B="",D=new Map,F=a.H,M.h(Sm(a,a.G++,m,d,k,"",l,B,!0,"Media Playlist",null,D,null,!1,null,!1,"",F),7);Tm(a,e,a.P,a.H);n=Xk(d.Y,"EXT-X-MEDIA");p=Xk(d.Y,"EXT-X-STREAM-INF");u=Xk(d.Y,"EXT-X-IMAGE-STREAM-INF");r=Xk(d.Y,"EXT-X-I-FRAME-STREAM-INF");v=Xk(d.Y,"EXT-X-SESSION-KEY");w=Xk(d.Y,"EXT-X-SESSION-DATA");y=Xk(d.Y,"EXT-X-CONTENT-STEERING");a.M=Um(a,w);a.h.hls.chaptersUri&&
!a.M.includes(a.h.hls.chaptersUri)&&a.M.push(a.h.hls.chaptersUri);return M.h(Vm(a,y),4);case 4:return a.h.ignoreSupplementalCodecs||(p.push.apply(p,va(Wm(p,!0))),r.push.apply(r,va(Wm(r,!1)))),Xm(a,p),Ym(a,n),x=Zm(a,r),M.h($m(a,p,v,n,k,a.P,x),5);case 5:return f=M.j,g=an(a,n),A=t,M.h(Promise.all([bn(a,u,r),km(a)]),6);case 6:C=A(M.j);h=C.next().value;M.A(3);break;case 7:return E=M.j,a.l.set(a.H,E),E.stream&&(H=yl(E.stream),E.stream.segmentIndex.Qb(function(W){W.$&&(W.$.Vc=H)})),l=E.stream.type,O=!0,
a.h.disableAudio&&E.type=="audio"?O=!1:a.h.disableVideo&&E.type=="video"&&!E.stream.codecs.includes(",")&&(O=!1),O&&f.push({id:0,language:kc(B||"und"),disabledUntilTime:0,primary:!0,audio:E.type=="audio"?E.stream:null,video:E.type=="video"?E.stream:null,bandwidth:E.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}),a.h.hls.chaptersUri&&!a.M.includes(a.h.hls.chaptersUri)&&a.M.push(a.h.hls.chaptersUri),M.h(km(a),3);case 3:if(!a.j)throw new K(2,7,7001);cn(a,d);if(d.type!=
1){M.A(9);break}im(a)&&(dn(a,d),R=a.D,a.F.ia(R));N=Array.from(a.l.values());en(a,N);nm(a);return M.h(Nm(a,d.Y,l,m,k),9);case 9:a.i.variants=f;a.i.textStreams=g;a.i.imageStreams=h;a.i.chapterStreams=Array.from(a.Fa.values());a.i.startTime=a.C;fn(a);if(a.N||!a.h.hls.disableCodecGuessing){M.A(11);break}S=[];L=t(a.i.variants);for(P=L.next();!P.done;P=L.next())Q=P.value,Q.audio&&Q.audio.codecs===""&&S.push(Q.audio.createSegmentIndex()),Q.video&&Q.video.codecs===""&&S.push(Q.video.createSegmentIndex());
return M.h(Promise.all(S),11);case 11:a.j.makeTextStreamsForClosedCaptions(a.i),M.l()}})}
function fn(a){if(!a.J.size){for(var b=new Map,c=t(a.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.video&&d.video.closedCaptions){d=t(d.video.closedCaptions);for(var e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;b.set(e,f)}}if(b.size)for(a=t(a.i.variants),c=a.next();!c.done;c=a.next())c=c.value,c.video&&!c.video.closedCaptions&&(c.video.closedCaptions=new Map(b))}}
function gn(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C;return G(function(z){switch(z.i){case 1:d=Il(a.h.hls.mediaPlaylistFullMimeType);if(!b.length)return z.return(d);e=hn(a,b);f=e.segment;g=e.segmentIndex;h=f.S();if(k=Tl(h[0]))if(l=jn.get(k))return z.return(Il(l));return z.h(Promise.all([kn(a,f.$,0),kn(a,f,g)]),2);case 2:m=z.j;n=m[1].mimeType;p=m[0].data;u=m[1].data;r="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");v=["audio/mp4","video/mp4","video/iso.segment"];w=f.$||v.includes(n);
if(!w&&ni(tb(u))){var B=u,D=a.h.disableAudio,F=a.h.disableVideo,E=a.h.disableText;var H=tb(B);var O=(new ai).parse(H),R=O.qd();H=O.rh();var N=[],S=!1,L=!1;if(!D)switch(R.audio){case "aac":case "aac-loas":O.ib().length&&(N.push("mp4a.40.2"),S=!0);break;case "mp3":O.ib().length&&(N.push("mp4a.40.34"),S=!0);break;case "ac3":O.ib().length&&(N.push("ac-3"),S=!0);break;case "ec3":O.ib().length&&(N.push("ec-3"),S=!0);break;case "opus":O.ib().length&&(N.push("opus"),S=!0)}if(!F)switch(R.video){case "avc":H.codec?
N.push(H.codec):N.push("avc1.42E01E");L=!0;break;case "hvc":H.codec?N.push(H.codec):N.push("hvc1.1.6.L93.90");L=!0;break;case "av1":N.push("av01.0.01M.08"),L=!0}if(N.length){D=S&&!L;F=new Map;if(L&&!E){E=new Qc("video/mp2t");Uc(E,B);B=t(E.h.getStreams());for(L=B.next();!L.done;L=B.next())L=L.value,F.set(L,L);E.h.clear()}H={type:D?"audio":"video",mimeType:"video/mp2t",codecs:N.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,closedCaptions:F,Md:null,colorGamut:null,
frameRate:H.frameRate,timescale:null,drmInfos:[]}}else H=null;if(y=H)return z.return(y);z.A(3);break}if(!w&&!r.includes(k)){z.A(3);break}x=Jl(p,u,a.h.disableText);if(!x){z.A(3);break}if(!c||x.closedCaptions.size){z.A(6);break}A=ln(a,b,g);return z.h(mn(a,A,f.$,p),7);case 7:if(C=z.j)x.closedCaptions=C;case 6:return z.return(x);case 3:return n?z.return(Il(n)):z.return(d)}})}
function mn(a,b,c,d){var e,f,g,h;return G(function(k){switch(k.i){case 1:e=b.shift();if(!e)return k.return(null);if(e.segment.$==c){k.A(2);break}c=e.segment.$;return k.h(kn(a,c,0),3);case 3:f=k.j,d=f.data;case 2:return k.h(kn(a,e.segment,e.segmentIndex),4);case 4:return g=k.j,(h=Jl(d,g.data,a.h.disableText))&&h.closedCaptions.size?k.return(h.closedCaptions):k.return(mn(a,b,c,d))}})}
function ln(a,b,c){var d=b.length-1;d=a.B==pm?[Math.trunc(d*3/4),Math.trunc(d/4)]:[Math.trunc(d/2),d];a=[];b=b.map(function(g,h){return{segment:g,segmentIndex:h}}).filter(function(g){return g.segmentIndex!=c&&g.segment.Gb()!=2});d=t(d);for(var e=d.next(),f={};!e.done;f={mf:void 0},e=d.next())f.mf=e.value,b.length&&(b.sort(function(g){return function(h,k){return Math.abs(h.segmentIndex-g.mf)-Math.abs(k.segmentIndex-g.mf)}}(f)),a.push(b.shift()));return a}
function kn(a,b,c){var d,e,f,g,h,k;return G(function(l){switch(l.i){case 1:if(!b)return l.return({mimeType:null,data:null});d=Jj;e=Ul(b.S(),b.jc(),b.fc(),a.j.getStreamingRetryParameters());f=b instanceof ml?1:0;return l.h(nn(a,e,d,{type:f}).promise,2);case 2:g=l.j;h=g.data;if(!b.aesKey){l.A(3);break}return l.h(Nl(h,b.aesKey,c),4);case 4:h=l.j;case 3:return b instanceof ml?b.Id(h,!0):b.Id(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
function nm(a){if(a.B==pm){for(var b=Infinity,c=Infinity,d=t(a.l.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.lc),c=Math.min(c,e.zc));b=b-c||0;isNaN(a.h.availabilityWindowOverride)||(b=a.h.availabilityWindowOverride);a.m.ji(b)}else a.m.qc(on(a));if(!a.m.B)for(b=t(a.l.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||c.type!="audio"&&c.type!="video"||(c=rf(c.stream.segmentIndex))&&
c.h!=null&&a.m.di(c.h);a.m.Gh()}function qm(a,b,c){var d=new Map;Tm(a,b,d,c,!0);return d}function Tm(a,b,c,d,e){e=e===void 0?!1:e;b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=X(f,"NAME"),h=X(f,"VALUE"),k=X(f,"QUERYPARAM");g&&h&&c.getOrInsert(g,h);if(k){if(!l)var l=(new URL(d)).searchParams;(g=l.get(k))&&!c.has(g)&&c.set(k,g)}e&&(f=X(f,"IMPORT"))&&(k=a.P.get(f))&&c.set(f,k)}}
function pn(a,b){var c={};b=t(b);for(var d=b.next();!d.done;d=b.next()){d=d.value;if(a.o){var e=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");e=d.toString(e)}else e=d.toString();c[e]?c[e].push(d):c[e]=[d]}return c}
function Wm(a,b){var c=[];a=t(a);for(var d=a.next(),e={};!d.done;e={Eg:void 0},d=a.next())d=d.value,e.Eg=el(d),e.Eg&&(e=d.attributes.map(function(f){return function(g){var h=g.name,k=g.value;h=="CODECS"&&(k=f.Eg,b&&(g=g.value.split(","),g.length>1&&(g=wc("audio",g))&&(k+=","+g)));return new Wk(h,k)}}(e)),c.push(new Sk(d.id,d.name,e,null)));return c}
function Xm(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X(d,"AUDIO");c=X(d,"VIDEO");var f=X(d,"SUBTITLES");d=qn(a,d);if(f){var g=wc(yc,d);a.K.set(f,g);bb(d,g)}e&&(f=wc("audio",d),f||(f=a.h.hls.defaultAudioCodec),a.K.set(e,f));c&&(e=wc("video",d),e||(e=a.h.hls.defaultVideoCodec),a.K.set(c,e))}}
function Um(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=X(e,"DATA-ID");var f=X(e,"URI"),g=X(e,"LANGUAGE");e=X(e,"VALUE");var h=(new Map).set("id",d);f&&h.set("uri",al([a.H],f,a.P)[0]);g&&h.set("language",g);e&&h.set("value",e);d=="com.apple.hls.chapters"&&f&&c.push(h.get("uri"));d=new nj("sessiondata",h);if(a.j)a.j.onEvent(d)}return c}
function Vm(a,b){var c,d,e,f,g,h;return G(function(k){if(!a.j||!a.h)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=X(f,"PATHWAY-ID"),h=X(f,"SERVER-URI"),g&&h){a.o=new Vl(a.j);a.o.configure(a.h);a.o.m=[a.H];a.o.setManifestType("HLS");a.o.j=g;c=Wl(a.o,h);break}return k.h(c,0)})}
function an(a,b){var c=Yk(b,"SUBTITLES"),d=pn(a,c);b=[];if(!a.h.disableText)for(var e in d)try{b.push(rn(a,d[e],new Map).stream)}catch(g){if(!a.h.hls.ignoreTextStreamFailures)throw g;}e=t(c);for(c=e.next();!c.done;c=e.next())if(d=Uk(c.value,"GROUP-ID"),c=a.K.get(d))if(d=a.U.get(d)){d=t(d);for(var f=d.next();!f.done;f=d.next())f=f.value,f.stream.codecs=c,f.stream.mimeType=sn(yc,c)||tn(yc),un(f.stream)}return b.filter(function(g){return g})}
function un(a){var b=new Set([ie(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Qb(function(c){c.mimeType&&b.add(ie(c.mimeType,a.codecs))});a.fullMimeTypes=b}
function bn(a,b,c){var d,e;return G(function(f){if(f.i==1)return d=b.map(function(g){var h,k,l;return G(function(m){if(m.i==1){if(h=a.h.disableThumbnails)return m.return(null);m.o(2);return m.h(vn(a,g),4)}if(m.i!=2)return k=m.j,m.return(k.stream);l=m.m();if(a.h.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.h.disableThumbnails)return null;try{var h=wn(a,g);return h.stream.type!=="image"?null:h.stream}catch(k){if(a.h.hls.ignoreImageStreamFailures)return null;
throw k;}})),f.h(Promise.all(d),2);e=f.j;return f.return(e.filter(function(g){return g}))})}function km(a){var b,c,d,e;return G(function(f){if(a.h.disableChapters)return f.return();b=[];c=t(a.M);for(d=c.next();!d.done;d=c.next())e=d.value,b.push(xn(a,e));return f.h(Promise.all(b),0)})}
function xn(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z;return G(function(B){if(B.i==1)return c=Ej([b],a.h.retryParameters),B.h(nn(a,c,10).promise,2);d=B.j;e=Bb(d.data);f=JSON.parse(e);g=new Map;for(h=0;h<f.length;h++)if(k=f[h],k.titles){l=[];if(k.images)for(m=t(k.images),n=m.next();!n.done;n=m.next())if(p=n.value,p.url)for(u=al([d.uri],p.url),r=t(u),v=r.next();!v.done;v=r.next())w=v.value,y={type:p["image-category"],width:p["pixel-width"],height:p["pixel-height"],url:w},l.push(y);x=t(k.titles);
for(A=x.next();!A.done;A=x.next())C=A.value,z={id:"",title:C.title,startTime:k["start-time"],endTime:k["start-time"],images:l},k.duration?z.endTime+=k.duration:h+1<f.length&&(z.endTime=f[h+1]["start-time"]),g.getOrInsertComputed(C.language,function(){return[]}).push(z)}g.forEach(function(D,F){var E=[];D=t(D);for(var H=D.next();!H.done;H=D.next()){H=H.value;var O=new ml(H.startTime,H.endTime,function(){return[]},0,null,null,0,0,Infinity);O.Ag({title:H.title,images:H.images});E.push(O)}D=a.Fa.getOrInsertComputed(F,
function(){return Df({id:a.G++,mimeType:"text/plain",kind:"",language:F,originalLanguage:F,type:"chapter",external:!0})});D.segmentIndex?D.segmentIndex.Cd(E,a.m.ud()):D.segmentIndex=new zl(E)});B.l()})}function yn(a,b,c){b=b.filter(function(e){var f=X(e,"URI")||"";e=X(e,"TYPE");return e!="SUBTITLES"&&(f!=""||e=="AUDIO"||e=="VIDEO")});b=pn(a,b);for(var d in b)rn(a,b[d],c,!1)}
function Zm(a,b){return b.map(function(c){c=wn(a,c);return c.stream.type!=="video"?null:c.stream}).filter(function(c){return c})}
function $m(a,b,c,d,e,f,g){var h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H,O,R,N,S,L,P,Q,M,W,ha;return G(function(I){switch(I.i){case 1:h=[];k=new Set;if(a.h.ignoreDrmInfo||!(c.length>0)){I.A(2);break}l=t(c);m=l.next();n={};case 3:if(m.done){I.A(2);break}p=m.value;u=Uk(p,"METHOD");r=X(p,"KEYFORMAT")||"identity";v=null;if(u=="NONE"){I.A(4);break}if(zn(u)){n.$f=al(e(),Uk(p,"URI"),f);w=n.$f.sort().join("");a.Ba.getOrInsertComputed(w,function(U){return function(){return nn(a,Ej(U.$f,a.h.retryParameters),
6).promise}}(n));I.A(4);break}if(r=="identity")return I.h(An(a,p,"",e,null,f),12);y=a.Vb.get(r);if(!y){x=null;I.A(10);break}return I.h(y(p,"",null),11);case 11:x=I.j;case 10:v=x;I.A(6);break;case 12:v=I.j;case 6:if(v){if(v.keyIds)for(A=t(v.keyIds),C=A.next();!C.done;C=A.next())z=C.value,k.add(z);h.push(v)}case 4:n={$f:void 0};m=l.next();I.A(3);break;case 2:B=pn(a,b);D=[];for(F in B)E=B[F],H=E[0],O=Bn(H),R=Number(Uk(H,"BANDWIDTH"))||Number(X(H,"AVERAGE-BANDWIDTH")),N=X(H,"RESOLUTION"),S=t(N?N.split("x"):
[null,null]),L=S.next().value,P=S.next().value,Q=X(H,"VIDEO-RANGE"),(M=X(H,"REQ-VIDEO-LAYOUT"))&&M.includes(",")&&(W=M.split(",").filter(function(U){return U=="CH-STEREO"||U=="CH-MONO"}),M=W[0]),M=M||"CH-MONO",ha=Cn(a,E,d),D.push.apply(D,va(Dn(a,ha.audio,ha.video,R,L,P,O,Q,M,h,k,g)));return I.return(D.filter(function(U){return U!=null}))}})}
function Cn(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=new Set,g=new Set,h=t(b),k=h.next();!k.done;k=h.next()){var l=k.value;k=X(l,"AUDIO");var m=X(l,"VIDEO");if(k||m)l=X(l,"PATHWAY-ID"),k&&!f.has(k)&&(f.add(k),l&&e.set(k,l)),m&&!g.has(m)&&(g.add(m),l&&e.set(m,l))}var n=[].concat(va(f),va(g));n.length&&c.length&&(c=c.filter(function(u){return n.includes(Uk(u,"GROUP-ID"))}),yn(a,c,e));d.audio.push.apply(d.audio,va(En(a,f)));d.video.push.apply(d.video,va(En(a,g)));e=d.video.find(function(u){return u.stream.isAudioMuxedInVideo});
f=!1;var p=b.map(function(u){return Uk(u,"URI")});m=d.audio.find(function(u){return u&&u.S().find(function(r){return p.includes(r)})});g=qn(a,b[0]);c=wc("video",g);h=wc("audio",g);k=el(b[0]);e?(e="video",h&&c&&!d.audio.length&&(g=[[c,h].join()])):h&&!c?(e="audio",f=d.audio.length>0&&!d.audio.some(function(u){return u.stream.isAudioMuxedInVideo})):!d.audio.length&&!d.video.length&&h&&c?(e="video",g=[[c,h].join()]):d.audio.length&&m?(e="audio",f=!0):e=d.video.length&&!d.audio.length?"audio":"video";
f||(a=Fn(a,b,g,e,k),b=a.stream,f=e=="audio"?d.audio:d.video,g=f.find(function(u){return u.stream.isAudioMuxedInVideo}),b.type==e&&g?(e=g.stream,b.language=e.language,b.originalLanguage=e.originalLanguage,b.label=e.label,b.channelsCount=e.channelsCount,b.audioSamplingRate=e.audioSamplingRate,b.originalId=e.originalId,b.primary=e.primary,b.roles=e.roles,f.splice(f.indexOf(g),1,a)):(b.type=="audio"?d.audio:d.video).push(a));d.video=d.video.filter(function(u){return!u.stream.isAudioMuxedInVideo});return d}
function En(a,b){if(!b.size)return[];b=[].concat(va(b)).sort().join(",");return a.U.get(b)||[]}function qn(a,b){b=X(b,"CODECS")||"";a.N=b.length>0;a.N||a.h.hls.disableCodecGuessing||(b=[],a.h.disableVideo||b.push(a.h.hls.defaultVideoCodec),a.h.disableAudio||b.push(a.h.hls.defaultAudioCodec),b=b.join(","));return Kl(b.split(/\s*,\s*/))}function Gn(a){return(a=X(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function Hn(a){return(a=X(a,"SAMPLE-RATE"))?parseInt(a,10):null}
function Bn(a){return(a=X(a,"FRAME-RATE"))?parseFloat(a):null}function In(a){a=X(a,"CHANNELS");if(!a)return!1;a=a.split("/");return a.length!=2?!1:a[1]==="JOC"||a[1].includes("ATMOS")||a[1].includes("IMSA")}function Jn(a){a=Uk(a,"TYPE").toLowerCase();a=="subtitles"&&(a=yc);return a}
function Dn(a,b,c,d,e,f,g,h,k,l,m,n){for(var p=t(c),u=p.next();!u.done;u=p.next())Kn(u.value.stream,e,f,g,h,k,null);e=a.h.disableVideo;if(!c.length||e)c=[null];e&&(b=b.filter(function(y){return!y.stream.isAudioMuxedInVideo}));e=a.h.disableAudio;if(!b.length||e)b=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m,a.h.disableIFrames||Cf(k,n);k&&
!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);p=f?f.stream.drmInfos:null;u=r?r.stream.drmInfos:null;r=r?r.S().sort().join(","):"";var v=f?f.S().sort().join(","):"",w=[];h&&h.codecs&&w.push(h.codecs);k&&k.codecs&&w.push(k.codecs);r=[r,v,w.sort()].join("-");h&&k&&!Ub(p,u)||a.$a.has(r)||(h={id:a.G++,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(r))}return e}
function Ym(a,b){b=Yk(b,"CLOSED-CAPTIONS");a.V=b.length==0;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X(d,"LANGUAGE");c=kc(e||"und");e||(e=X(d,"NAME"))&&(c=e);e=Uk(d,"GROUP-ID");d=Uk(d,"INSTREAM-ID").replace("SERVICE","svc");a.J.get(e)||a.J.set(e,new Map);a.J.get(e).set(d,c)}}
function rn(a,b,c,d){d=d===void 0?!0:d;for(var e=[],f=[],g=new Map,h=t(b),k=h.next(),l={};!k.done;l={wh:void 0},k=h.next()){k=k.value;l.wh=++a.G;l=function(y){return function(){return"shaka://hls-muxed"+y.wh}}(l);var m=d?Uk(k,"URI"):X(k,"URI")||l();l=Uk(k,"GROUP-ID");e.push(m);f.push(l);g.set(l,m);(k=X(k,"PATHWAY-ID"))&&c.set(l,k)}d=f.sort().join(",");k=b[0];b="";h=Jn(k);h==yc&&(b=X(k,"CODECS")||"");if(!b)for(f=t(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.K.has(l)){b=a.K.get(l);break}l=el(k);
f=m=e.sort().join(",");h=="audio"&&d&&(f+=d);if(a.l.has(f))return a.l.get(f);var n=a.G++;if(a.o){g=t(g);for(var p=g.next();!p.done;p=g.next()){var u=t(p.value);p=u.next().value;u=u.next().value;(p=c.get(p))&&Zl(a.o,n,p,u)}}c=X(k,"LANGUAGE");g=X(k,"NAME");p=X(k,"DEFAULT")=="YES";u=h=="audio"?Gn(k):null;var r=h=="audio"?In(k):!1,v=X(k,"CHARACTERISTICS"),w=X(k,"FORCED")=="YES";k=h=="audio"?Hn(k):null;e=Ln(a,n,e,b,h,c,p,g,u,null,v,w,k,r,l,m);a.U.has(d)?a.U.get(d).push(e):a.U.set(d,[e]);a.l.set(f,e);return e}
function vn(a,b){var c,d,e,f,g,h,k,l,m,n,p,u;return G(function(r){if(r.i==1){c=Uk(b,"URI");d=X(b,"CODECS","jpeg")||"";e=el(b);if(a.l.has(c))return r.return(a.l.get(c));f=X(b,"LANGUAGE");g=X(b,"NAME");h=X(b,"CHARACTERISTICS");k=c;l=Ln(a,a.G++,[c],d,"image",f,!1,g,null,null,h,!1,null,!1,e,k);return(m=X(b,"RESOLUTION"))?r.h(l.stream.createSegmentIndex(),3):r.A(2)}if(r.i!=2){n=rf(l.stream.segmentIndex);if(p=n.tilesLayout)l.stream.width=Number(m.split("x")[0])*Number(p.split("x")[0]),l.stream.height=Number(m.split("x")[1])*
Number(p.split("x")[1]);l.stream.closeSegmentIndex()}if(u=X(b,"BANDWIDTH"))l.stream.bandwidth=Number(u);a.l.set(c,l);return r.return(l)})}
function wn(a,b){var c="video",d=Uk(b,"URI"),e=X(b,"CODECS")||"",f=el(b);e=="mjpg"&&(c="image");if(a.l.has(d))return a.l.get(d);var g=X(b,"LANGUAGE"),h=X(b,"NAME"),k=X(b,"CHARACTERISTICS");c=Ln(a,a.G++,[d],e,c,g,!1,h,null,null,k,!1,null,!1,f,d);c.stream.isIframe=!0;e=X(b,"RESOLUTION");f=t(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=X(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.l.set(d,c);return c}
function Fn(a,b,c,d,e){for(var f=a.G++,g=[],h=t(b),k=h.next();!k.done;k=h.next()){var l=k.value;k=Uk(l,"URI");l=X(l,"PATHWAY-ID");a.o&&l&&Zl(a.o,f,l,k);g.push(k)}h=g.sort().join(",")+c.sort().join(",");if(a.l.has(h))return a.l.get(h);k=g.join(",");a:{b=X(b[0],"CLOSED-CAPTIONS");if(d=="video"){if(a.h.disableText){a.V=!1;b=null;break a}if(b){if(b!="NONE"){b=a.J.get(b);break a}a.V=!1}else if(!b&&a.J.size)for(b=t(a.J.keys()),b=b.next();!b.done;b=b.next()){b=a.J.get(b.value);break a}}b=null}c=vc(d,c);
d=Ln(a,f,g,c,d,null,!1,null,null,b,null,!1,null,!1,e,k);a.l.set(h,d);return d}
function Ln(a,b,c,d,e,f,g,h,k,l,m,n,p,u,r,v){function w(B){var D,F,E,H,O,R,N,S,L,P,Q,M,W,ha,I,U,T,Y,fa,ja;return G(function(sa){switch(sa.i){case 1:return D=Ac,sa.o(2),sa.h(B.promise,4);case 4:F=sa.j;if(B.aborted)return sa.return();E=F.uri;E!=F.originalUri&&(H=A.S(),H.includes(E)||A.Oe.push(E));O=gl(a.Ma,F.data);if(O.type!=1)throw new K(2,4,4017);R=Xk(O.Y,"EXT-X-DEFINE");N=qm(a,R,E);S=!1;(!a.N&&a.h.hls.disableCodecGuessing||a.V&&e==D.qa&&!a.h.hls.disableClosedCaptionsDetection)&&O.segments.length>
0&&(a.V=!1,S=!0);L=!a.N&&a.h.hls.disableCodecGuessing;P=im(a);return sa.h(Sm(a,0,N,O,y,d,e,f,g,h,k,l,m,n,p,u,r,v,void 0,S,L),5);case 5:Q=sa.j;if(B.aborted)return sa.return();M=Q.stream;cn(a,O);im(a)&&!P&&dn(a,O);A.zc=Q.zc;A.lc=Q.lc;A.ge=Q.ge;A.fe=Q.fe;A.ee=Q.ee;A.vd=Q.vd;A.He=Q.He;A.zb=Q.zb;A.Ab=Q.Ab;x.segmentIndex=M.segmentIndex;x.encrypted=M.encrypted;x.drmInfos=M.drmInfos;x.keyIds=M.keyIds;x.mimeType=M.mimeType;x.bandwidth=x.bandwidth||M.bandwidth;x.codecs=x.codecs||M.codecs;x.closedCaptions=x.closedCaptions||
M.closedCaptions;fn(a);x.width=x.width||M.width;x.height=x.height||M.height;x.hdr=x.hdr||M.hdr;x.colorGamut=x.colorGamut||M.colorGamut;x.frameRate=x.frameRate||M.frameRate;x.language=="und"&&M.language!="und"&&(x.language=M.language);x.language=x.language||M.language;x.channelsCount=x.channelsCount||M.channelsCount;x.audioSamplingRate=x.audioSamplingRate||M.audioSamplingRate;un(x);A.type!=D.qa||Q.type!=D.X||a.N&&!je.includes(x.mimeType)||Mn(a,A,M);x.drmInfos.length&&a.j.newDrmInfo(x);W=!1;if(!l&&
x.closedCaptions||l&&x.closedCaptions&&l.size!=x.closedCaptions.size)W=!0;a.i&&W&&a.j.makeTextStreamsForClosedCaptions(a.i);e==D.Ra&&(ha=rf(M.segmentIndex))&&ha.$&&(x.mimeType="application/mp4",un(x));I=yl(x);x.segmentIndex.Qb(function(Ga){Ga.$&&(Ga.$.Vc=I)});Nn(a)&&(a.Yb?en(a,[A]):(a.Yb=!0,U=Array.from(a.l.values()),T=U.filter(function(Ga){return Ga.stream.segmentIndex}),en(a,T),nm(a),Y=a.D,Y>0&&a.F.ia(Y)));a.i&&(a.i.startTime=a.C);return sa.h(Nm(a,O.Y,x.type,N,y),6);case 6:sa.u(0);break;case 2:fa=
sa.m();x.closeSegmentIndex();if(fa.code===7001)return sa.return();ja=a.j.disableStream(x);if(!ja)throw fa;sa.l()}})}function y(){return a.o&&c.length>1?$l(a.o,b):A.Oe.concat(bl([a.H],c,a.P))}var x=On(a,d,e,f,g,h,k,l,m,n,p,u,r,v);c.some(function(B){return B.startsWith("shaka://hls-muxed")})&&(x.isAudioMuxedInVideo=!0,e=="audio"&&(x.mimeType="video/mp2t",un(x)));var A={stream:x,type:e,Oe:[],zc:0,lc:0,He:new Map,ge:!1,fe:!1,ee:!1,vd:!1,xf:-1,zb:-1,Ab:-1,S:y},C=null,z;x.createSegmentIndex=function(){if(C)return C;
if(x.isAudioMuxedInVideo)return x.segmentIndex=new zl([]),Promise.resolve();z=gm(a,A.S(),!0);return C=new Promise(function(B){B(w(z))})};x.closeSegmentIndex=function(){C&&!x.segmentIndex&&z.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);C=null};return A}
function Mn(a,b,c){var d=b.stream,e=c.type,f=b.type;a.B==pm&&(a.u.set(e,a.u.get(f)),a.u.set(f,new Map));b.type=e;d.type=e;d.codecs=wc(e,c.codecs.split(/\s*,\s*/))||"";un(d);if(a.i){b=t(a.i.variants);for(c=b.next();!c.done;c=b.next())c=c.value,e=="audio"&&c.video==d&&(c.video=null,c.audio||(c.audio=d,c.language=d.language));a.i.variants=a.i.variants.filter(function(g){return g.audio||g.video})}}
function on(a){var b=Infinity;a=t(a.l.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.lc));return b}function lm(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Qb(function(e){c.push(e)});a.m.Rh(c)}
function en(a,b){if(!im(a))for(var c=on(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.se(0,c);lm(a,b.map(function(f){return f.stream}));d=Array.from(a.l.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=a.B==pm&&!a.Za;c=!im(a)&&a.Za&&!(c&&e);a.h.hls.ignoreManifestProgramDateTime||d||c?Om(a,b,d):(Rm(a,b),a.h.hls.ignoreManifestProgramDateTimeForTypes.length>0&&
Om(a,b))}function Pm(a,b){return a.h.hls.ignoreManifestProgramDateTime?!0:a.h.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Nn(a){if(!a.i||!a.i.variants.length)return!1;var b=[],c=[];a=t(a.i.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 Sm(a,b,c,d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C){A=A===void 0?!0:A;C=C===void 0?!0:C;var z,B,D,F,E,H,O,R,N,S,L,P,Q,M,W,ha,I,U,T,Y,fa,ja,sa,Ga,pa,kd,Jb,Xc,Od,Kb,Ic,mc;return G(function(Wa){switch(Wa.i){case 1:z=g;B=d.segments||[];D=B.every(function(Bh){return Zk(Bh.Y,"EXT-X-GAP")?!0:!1});if(!B.length||D)throw new K(2,4,4053);Pn(a,d);im(a)&&Mm(a,d);F=a.B==pm?a.u.get(g):new Map;E=sm(a,d,F,c,e,g,!0,null);H=E.segments;O=E.bandwidth;if(x||g!=yc){Wa.A(2);break}return Wa.h(Qn(a,g,f,H),3);case 3:x=Wa.j,
f||x!="application/mp4"||!H[0]||H[0].$||(x="text/vtt"),f||x!="application/mp4"||(C=A=!0);case 2:P=L=S=N=R=null;if(!(H.length>0&&A)){Wa.A(4);break}Q=g=="video"&&!n&&!a.h.hls.disableClosedCaptionsDetection;return Wa.h(gn(a,H,Q),5);case 5:M=Wa.j,g!=M.type&&a.B==pm&&(a.u.set(M.type,a.u.get(g)),a.u.set(g,new Map)),g=M.type,M.type!="video"&&(h=M.language),m=M.channelCount,r=M.sampleRate,a.h.disableText||(n=M.closedCaptions),N=M.height,R=M.width,S=M.Md,L=M.colorGamut,P=M.frameRate,C&&(x=M.mimeType,f=M.codecs);
case 4:if(x){Wa.A(6);break}return Wa.h(Qn(a,g,f,H),7);case 7:x=Wa.j;case 6:return z=="video"&&je.includes(x)&&(g="audio"),Wa.h(rm(a,d,x,e,c),8);case 8:W=Wa.j;ha=W.drmInfos;I=W.keyIds;U=W.encrypted;T=W.Vg;if(U&&!ha.length&&!T)throw new K(2,4,4026);Y=On(a,f,g,h,k,l,m,n,p,u,r,v,w,y);Y.encrypted=U&&!T;Y.drmInfos=ha;Y.keyIds=I;Y.mimeType=x;O&&(Y.bandwidth=O);Zk(d.Y,"EXT-X-I-FRAMES-ONLY")&&(Y.isIframe=!0);un(Y);g=="video"&&(R||N||S||L)&&Kn(Y,R,N,P,S,null,L);im(a)&&Mm(a,d);fa=H[0].startTime;ja=H[H.length-
1];sa=ja.endTime;Ga=new zl(H);Y.segmentIndex=Ga;Lm(a,Y,g);kd=(pa=Zk(d.Y,"EXT-X-SERVER-CONTROL"))?Tk(pa,"CAN-SKIP-UNTIL")!=null:!1;Jb=!1;kd&&(Jb=pa?Tk(pa,"CAN-SKIP-DATERANGES")!=null:!1);Xc=pa?Tk(pa,"CAN-BLOCK-RELOAD")!=null:!1;Od=$k(d.Y,"EXT-X-MEDIA-SEQUENCE",0);Kb=tm(Od,H);Ic=Kb.zb;mc=Kb.Ab;return Wa.return({stream:Y,type:g,Oe:[],S:e,zc:fa,lc:sa,ge:kd,fe:Jb,ee:Xc,vd:!1,xf:-1,zb:Ic,Ab:mc,He:F})}})}
function tm(a,b,c){c=c===void 0?b.length:c;a=a+c-1;c=-1;if(!b.length)return a++,{zb:a,Ab:c};b=b[b.length-1];var d=b.i;if(!b.i.length)return a++,b.B&&(c=0),{zb:a,Ab:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{zb:a,Ab:c}}function Rn(a,b,c){if(!a||!b.has(c))return null;b=b.get(c);c=a.find(b);return c==null?null:(a=a.get(c))&&a.startTime==b?a:null}
function On(a,b,c,d,e,f,g,h,k,l,m,n,p,u){var r=sn(c,b)||tn(c),v=[];if(k){k=t(k.split(","));for(var w=k.next();!w.done;w=k.next())v.push(w.value)}k=void 0;w=null;c==yc?k=v.includes("public.accessibility.transcribes-spoken-dialog")&&v.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":v.includes("public.accessibility.describes-video")&&(w="visually impaired");v.length||k!=="subtitle"||v.push("subtitle");a={id:a.G++,originalId:u,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:r,codecs:b,supplementalCodecs:p,kind:c==yc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:kc(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:v,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:w,
external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null,isIframe:!1};un(a);return a}
function rm(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H,O,R,N,S,L,P,Q;return G(function(M){switch(M.i){case 1:f=new Map;if(!a.h.ignoreDrmInfo&&b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Xk(k.Y,"EXT-X-KEY"),m=null,l.length)for(m=Sn(a,b,k.Y,d,e),n=t(l),p=n.next();!p.done;p=n.next())u=p.value,f.set(u,m);v=r=!1;w=[];y=new Set;x=t(f);A=x.next();case 2:if(A.done){M.A(4);break}C=A.value;z=t(C);B=z.next().value;D=z.next().value;F=B;E=D;H=Uk(F,"METHOD");if(H==
"NONE"){M.A(3);break}r=!0;O=X(F,"KEYFORMAT")||"identity";R=null;if(zn(H)){v=!0;M.A(3);break}if(O=="identity")return M.h(An(a,F,c,d,E,e),11);N=a.Vb.get(O);if(!N){S=null;M.A(9);break}return M.h(N(F,c,E),10);case 10:S=M.j;case 9:R=S;M.A(6);break;case 11:R=M.j;case 6:if(R){if(R.keyIds)for(L=t(R.keyIds),P=L.next();!P.done;P=L.next())Q=P.value,y.add(Q);w.push(R)}case 3:A=x.next();M.A(2);break;case 4:return M.return({drmInfos:w,keyIds:y,encrypted:r,Vg:v})}})}
function Tn(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new K(2,4,4042);var f=Uk(b,"METHOD"),g=0,h=X(b,"IV","");if(f==="AES-256-GCM"){if(h)throw new K(2,4,4059);}else if(h){var k=Ob(h.substr(2));if(k.byteLength!=16)throw new K(2,4,4048);}else g=$k(c.Y,"EXT-X-MEDIA-SEQUENCE",0);var l=al(d(),Uk(b,"URI"),e),m=l.sort().join("");return a.eb.getOrInsertComputed(b.toString()+"-"+g+"-"+
m,function(){var n={bitsKey:128,blockCipherMode:"CBC",iv:k,firstMediaSequenceNumber:g};switch(f){case "AES-256":n.bitsKey=256;break;case "AES-256-CTR":n.bitsKey=256;n.blockCipherMode="CTR";break;case "AES-256-GCM":n.bitsKey=256,n.blockCipherMode="GCM"}n.fetchKey=function(){var p,u;return G(function(r){if(r.i==1)return r.h(a.Ba.getOrInsertComputed(m,function(){return nn(a,Ej(l,a.h.retryParameters),6).promise}),2);if(r.i!=3){p=r.j;if(!p.data||p.data.byteLength!=n.bitsKey/8)throw new K(2,4,4049);u={name:n.blockCipherMode===
"CBC"?"AES-CBC":n.blockCipherMode==="GCM"?"AES-GCM":"AES-CTR",length:n.bitsKey};return r.h(window.crypto.subtle.importKey("raw",p.data,u,!0,["decrypt"]),3)}n.cryptoKey=r.j;n.fetchKey=void 0;r.l()})};return n})}function cn(a,b){a.C==null&&(b=Zk(b.Y,"EXT-X-START"))&&(a.C=Number(Uk(b,"TIME-OFFSET")))}function Pn(a,b){var c=Zk(b.Y,"EXT-X-PLAYLIST-TYPE");b=Zk(b.Y,"EXT-X-ENDLIST");b=c&&c.value=="VOD"||b;c=c&&c.value=="EVENT"&&!b;c=!b&&!c;b?mm(a,fm):c?mm(a,pm):mm(a,Un)}
function Mm(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;e>=0;){var f=Zk(d[e].Y,"EXTINF");if(f){c=dl(f);break}e--}d=Zk(b.Y,"EXT-X-TARGETDURATION");if(!d)throw new K(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Zk(b.Y,"EXT-X-PART-INF"))a.Z=Number(Uk(e,"PART-TARGET"));b=Zk(b.Y,"EXT-X-SERVER-CONTROL");a.oa&&a.Z?(a.D=a.Wb?a.Z*5<=c?Math.min(a.Z,a.D):Math.min(c,a.D):Math.min(a.Z,a.D),a.La=b?Number(Uk(b,"PART-HOLD-BACK")):0):(a.D=Math.min(c,a.D),c=b?Tk(b,"HOLD-BACK"):null,
a.Aa=c?Number(c.value):0);a.Na=Math.max(d,a.Na)}function dn(a,b){var c=0;if(a.h.defaultPresentationDelay)c=a.h.defaultPresentationDelay;else if(a.La)c=a.La;else if(a.Aa)c=a.Aa;else for(var d=b.segments.length,e=d-Math.min(d,a.h.hls.liveSegmentsDelay);e<d;e++){var f=Zk(b.segments[e].Y,"EXTINF");c=f?c+dl(f):c+a.Na}a.C&&a.C<0&&(c=Math.min(-a.C,c),a.C+=c);a.m.ei(0);a.m.ci(c);a.m.Se(!1)}
function Sn(a,b,c,d,e){var f=Zk(c,"EXT-X-MAP");if(!f)return null;var g=Uk(f,"URI"),h=al(d(),g,e);g=[h.toString(),X(f,"BYTERANGE","")].join("-");return a.Xb.getOrInsertComputed(g,function(){for(var k=void 0,l=void 0,m=!1,n=t(c),p=n.next();!p.done;p=n.next())p=p.value,p.name=="EXT-X-KEY"?(m=Uk(p,"METHOD"),zn(m)&&p.id<f.id?(m=!1,k=Tn(a,p,b,d,e)):m=m!="NONE"):p.name=="EXT-X-BYTERANGE"&&p.id<f.id&&(l=p);return Vn(h,f,l,k,m)})}
function Vn(a,b,c,d,e){var f=0,g=null;b=X(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 kl(function(){return a},f,g,null,null,null,d,e)}
function Wn(a,b,c,d,e,f,g,h,k,l){var m=d.Y,n=Zk(m,"EXTINF"),p=0,u=0,r=null;d.h.length&&(a.i.isLowLatency=!0);var v=null;if(!a.h.hls.ignoreManifestProgramDateTime){var w=Zk(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=Ad(w.value),a.Za=!0)}var y=nl;Zk(m,"EXT-X-GAP")&&(a.i.gapCount++,y=2);if(!n){if(d.h.length==0)throw new K(2,4,4024,"EXTINF");if(!a.oa)return null}var x=[];w=!1;var A=null,C=!1,z=!1;if(a.oa&&d.h.length){p=b&&window.ReadableStream&&a.h.hls.allowLowLatencyByteRangeOptimization;for(var B=
v,D={},F=0;F<d.h.length;D={We:void 0,Fd:void 0},F++){var E=d.h[F],H=F==0?c:x[x.length-1],O=F==0?e:H.endTime,R=Number(X(E,"DURATION"))||a.Z;if(R){var N=O+R,S=0,L=null;E.name=="EXT-X-PRELOAD-HINT"?(S=(S=X(E,"BYTERANGE-START"))?Number(S):0,(H=X(E,"BYTERANGE-LENGTH"))?L=S+Number(H)-1:S&&(L=Number.MAX_SAFE_INTEGER)):(S=X(E,"BYTERANGE"),L=t(Xn(H,S)),S=L.next().value,L=L.next().value);D.Fd=X(E,"URI");if(D.Fd){H=nl;X(E,"GAP")=="YES"&&(a.i.gapCount++,H=2,C=!0);D.We=null;var P=function(M){return function(){M.We==
null&&(M.We=al(h(),M.Fd,f));return M.We}}(D);p&&S>=0&&L!=null&&(A=P,w=!0);O=new ml(O,N,P,S,L,b,0,0,Infinity,[],"",null,B,H,l);E.name=="EXT-X-PRELOAD-HINT"&&(O.cg(),z=!0);X(E,"INDEPENDENT")!="YES"&&F>0&&O.Kh();E=k;E||(x.length&&x[0].mimeType?E=x[0].mimeType:D.Fd&&(D=Tl(D.Fd),E=Yn.get(g).get(D)||null));E&&(O.mimeType=E,Zn.has(E)&&(O.$=null));x.push(O);B&&(B+=R)}}}}if(n){n=dl(n);if(n==0)return null;p=e+n}else if(x.length)p=x[x.length-1].endTime;else return null;w&&(C||x[0].startByte!=0?(w=!1,A=null):
x=[]);(n=Zk(m,"EXT-X-BYTERANGE"))?(r=t(Xn(c,n.value)),u=r.next().value,r=r.next().value):x.length&&(u=x[0].startByte,r=x[x.length-1].endByte);c="";n=null;g=="image"&&(c="1x1",g=Zk(m,"EXT-X-TILES"))&&(c=Uk(g,"LAYOUT"),(g=X(g,"DURATION"))&&(n=Number(g)));var Q=null;b=new ml(e,p,function(){if(A)return A();Q==null&&(Q=al(h(),d.i,f));return Q||[]},u,r,b,0,0,Infinity,x,c,n,v,y,l,x.length>0&&!!d.i);k&&(b.mimeType=k,Zn.has(k)&&(b.$=null));w&&(a.Wb=!0,b.Ih(),z&&b.cg());return b}
function Xn(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 Nm(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H,O,R,N,S,L,P,Q,M,W,ha,I,U;return G(function(T){f=Ac;if(c!=f.qa&&c!=f.X)return T.return();g=a.m.l;if(g==null||Pm(a,c))return T.return();h=Xk(b,"EXT-X-DATERANGE");h=h.filter(function(Y){return Tk(Y,"START-DATE")!=null}).sort(function(Y,fa){Y=Uk(Y,"START-DATE");fa=Uk(fa,"START-DATE");return Y<fa?-1:Y>fa?1:0});k=[];for(l=0;l<h.length;l++){m=h[l];try{if(n=Uk(m,"START-DATE"),p=Ad(n),!isNaN(p)){u=Math.max(0,p-g);r=null;if(v=X(m,"END-DATE"))if(w=
Ad(v),!isNaN(w)&&(r=w-g,r<0))continue;if(r==null&&(y=X(m,"DURATION")||X(m,"PLANNED-DURATION"))&&(x=parseFloat(y),isNaN(x)||(r=u+x),A=p-g+x,A<0))continue;C=X(m,"CLASS")||"com.apple.quicktime.HLS";z=X(m,"END-ON-NEXT")=="YES";if(r==null&&z){for(B=l+1;B<h.length;B++)if(D=X(h[B],"CLASS")||"com.apple.quicktime.HLS",C==D&&(F=Uk(h[B],"START-DATE"),E=Ad(F),!isNaN(E)&&E&&E>p)){r=Math.max(0,E-g);break}if(r==null)continue}H=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];O=[];R=t(m.attributes);for(N=
R.next();!N.done;N=R.next())if(S=N.value,!H.includes(S.name)){L=cl(S.value,d);if(S.name=="X-ASSET-URI"||S.name=="X-ASSET-LIST")L=al(e(),S.value,d)[0];P={key:S.name,description:"",data:L,mimeType:null,pictureType:null};O.push(P)}Q={schemeIdUri:C,value:"",startTime:u,endTime:r!=null?r:Infinity,id:Uk(m,"ID"),timescale:1,eventNode:null,urlParams:void 0,values:O};a.j.onTimelineRegionAdded(Q);if(O.length>1){M=a.j.onMetadata(C,u,r,O);W=!1;if(ha=O.find(function(Y){return Y.key=="CUE"}))I=ha.data,I.includes("PRE")&&
(W=!0);r==null||W||(U=void 0,U=a.i.startTime!=null?a.i.startTime:im(a)?a.i.presentationTimeline.kb():a.i.presentationTimeline.xb(),W=u<=U&&r>=U);W&&k.push(M)}}}catch(Y){}}return k.length?T.h(Promise.all(k),0):T.A(0)})}
function sm(a,b,c,d,e,f,g,h){function k(P){P=Tl(P);if(!P)return null;var Q=Yn.get(f).get(P);Q||(Q=jn.get(P));return Q}var l=b.segments,m=null,n=null,p=null,u=null,r=void 0,v=$k(b.Y,"EXT-X-DISCONTINUITY-SEQUENCE",-1),w=$k(b.Y,"EXT-X-MEDIA-SEQUENCE",0),y=Zk(b.Y,"EXT-X-SKIP"),x=y?Number(X(y,"SKIPPED-SEGMENTS")):0,A=w+x,C=0;a.B==pm&&c.has(A)&&(C=c.get(A));C===0&&a.B==pm&&c.size>0&&!c.has(A)&&a.m.i!=null&&(C=a.m.ud());var z=[];y=[];var B=null,D=null,F=[],E=0;if(!g&&h){E=l.length;for(var H=0;H<l.length;H++){A=
w+x+H;if(!c.has(A)){E=H;break}if(l[H].h.length){E=H;break}if(a.oa){var O=Zk(l[H].Y,"EXTINF");if(O&&(O=dl(O),(A=Rn(h,c,A))&&Math.abs(A.endTime-A.startTime-O)>.001)){E=H;break}}}E>0&&((B=Rn(h,c,w+x+E-1))?D=B:E=0)}H=D;!H&&h&&(H=Rn(h,c,w+x)||h.get(h.getNumEvicted()+h.getNumReferences()-1));for(h=0;h<l.length;h++){var R=l[h];(A=Zk(R.Y,"EXT-X-MAP"))&&A.id!==n&&(m=Sn(a,b,R.Y,e,d),n=A.id);A=R.i;O="";A&&(O=Tl(A));O!==u&&(p=k(A),u=O);var N=h==0?C:B.endTime;A=w+x+h;Zk(R.Y,"EXT-X-DISCONTINUITY")&&(v++,h>=E&&
B&&B.$&&(B.$.h=N));O=t(R.Y);for(var S=O.next();!S.done;S=O.next())S=S.value,S.name=="EXT-X-KEY"&&(zn(Uk(S,"METHOD"))?r=Tn(a,S,b,e,d):r=void 0);if(!(h<E)&&(O=g||!c.has(A),c.set(A,N),N=Wn(a,m,B,R,N,d,f,e,p,r))){if(B=$k(R.Y,"EXT-X-BITRATE"))F.push({bitrate:B,duration:N.endTime-N.startTime}),N.bandwidth=B;else if(N.endByte){if(R=ol(N))B=N.endTime-N.startTime,R=R*8/B/1E3,F.push({bitrate:R,duration:B}),N.bandwidth=R}else F.length&&(B=F[F.length-1],B.duration+=N.endTime-N.startTime,N.bandwidth=B.bitrate);
if(N.bandwidth)for(B=t(N.i),R=B.next();!R.done;R=B.next())R.value.bandwidth=N.bandwidth;B=N;N.j=v;Pm(a,f)&&a.L!=null&&A<a.L||(z.push(N),!O&&g||y.push(N))}}b=void 0;F.length&&(b=F.reduce(function(P,Q){return P+Q.duration},0),b=Math.round(F.reduce(function(P,Q){return P+Q.bitrate*Q.duration},0)/b*1E3));var L;if(F=!((L=D)==null||!L.h)||z.some(function(P){return P.h!=null}))for(L={},c=0;c<z.length;L={ve:void 0,ue:void 0,ae:void 0,Cc:void 0,kd:void 0},c++)if(L.Cc=z[c],L.Cc.h==null)for(L.ue=0,L.ve=c,d=
function(P){return function(){var Q=z[P.ve];if(Q){if(Q.h!=null)return Q.h+P.ue;P.ue-=Q.endTime-Q.startTime;P.ve+=1}return null}}(L),L.kd=0,L.ae=c,e=function(P){return function(){var Q=z[P.ae];if(Q){Q!=P.Cc&&(P.kd+=Q.endTime-Q.startTime);if(Q.h!=null)return Q.h+P.kd;--P.ae}else if(D&&D.h!=null)return D.h+(D.endTime-D.startTime)+P.kd;return null}}(L);L.Cc.h==null;)L.Cc.h=e(),L.Cc.h==null&&(L.Cc.h=d());if(F)for(L=0,d=D,H&&H.h!=null&&(c=a.Ya.get(H),c!=null&&(L=c-H.h)),H=t(z),c=H.next();!c.done;c=H.next()){c=
c.value;c.h!=null&&(a.Ya.set(c,c.h),d&&d.h!=null&&d.j!=c.j&&(d=c.h-(d.h+(d.endTime-d.startTime))-L,Math.abs(d)>1&&(L+=d)),c.h-=L);d=c.h;e=t(c.i);for(l=e.next();!l.done;l=e.next())l=l.value,l.h=d,d+=l.endTime-l.startTime;d=c}H=a.sa;if(F&&H!=Infinity&&!Pm(a,f))for(a=t(z),L=a.next();!L.done;L=a.next())L.value.Fg(H);return{segments:g?z:y,Dk:E+z.length,bandwidth:b}}
function Lm(a,b,c){if(c=="video"&&!Pm(a,c)&&b.segmentIndex){c=[];var d=null;b=t(b.segmentIndex);for(var e=b.next();!e.done;e=b.next())if((e=e.value)&&e.h!=null){var f=a.Ya.get(e);if(f!=null){var g=f-e.h;(d==null||Math.abs(g-d)>.001)&&c.push({start:e.startTime,mg:f});d=g}}a.m.gi(c)}}
function sn(a,b){if(a==yc){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 tn(a){return a==yc?"text/vtt":Yn.get(a).get("mp4")}function hn(a,b){a=a.B==pm?Math.trunc((b.length-1)/2):0;for(var c=b[a];c.Gb()==2&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function Qn(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,r,v,w;return G(function(y){switch(y.i){case 1:e=Jj;f=hn(a,d);g=f.segment;if(g.status==2)return y.return(tn(b));k=g.S();if(l=Tl(k[0]))if(m=Yn.get(b),(n=m.get(l))||(n=jn.get(l)))return y.return(n);if(h=sn(b,c))return y.return(h);u=1;r=Ej(k,a.j.getStreamingRetryParameters());y.o(2);r.method="HEAD";return y.h(nn(a,r,e,{type:u}).promise,4);case 4:v=y.j;p=v.headers["content-type"];y.u(3);break;case 2:w=y.m();if(!w||w.code!=1002&&w.code!=1001){y.A(3);break}r.method=
"GET";a.h.hls.allowRangeRequestsToGuessMimeType&&(r.headers.Range="bytes=0-0");return y.h(nn(a,r,e,{type:u}).promise,6);case 6:v=y.j,p=v.headers["content-type"];case 3:if(!p){y.A(7);break}h=p.toLowerCase().split(";")[0];if(!$n.includes(h)){y.A(8);break}if(v.data.byteLength){y.A(9);break}r.method="GET";return y.h(nn(a,r,e,{type:u}).promise,10);case 10:v=y.j;case 9:ni(tb(v.data))&&(h="video/mp2t");case 8:if(!$n.includes(h))return y.return(h);case 7:return y.return(tn(b))}})}
function Kn(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=d||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function gm(a,b,c){return nn(a,Ej(b,a.h.retryParameters),0,{type:c?2:3})}
function em(a){var b,c,d,e,f,g;return G(function(h){switch(h.i){case 1:if(!a.j)return h.return();h.o(2);b=Date.now();return h.h(a.update(),4);case 4:c=Date.now();im(a)&&(d=(c-b)/1E3,a.Hb.sample(1,d),e=a.h.updatePeriod>0?a.h.updatePeriod:a.D,f=Math.max(0,e-Ra(a.Hb)),isFinite(f)?a.F.ia(f):a.F.ia(1));h.u(3);break;case 2:g=h.m();if(!a.j)return h.return();if(a.h.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(g),h.return();g.severity=1;a.j.onError(g);a.F.ia(.1);case 3:if(!a.j)return h.return();
a.j.onManifestUpdated();h.l()}})}function im(a){return a.B!=fm}function mm(a,b){a.B=b;a.m&&a.m.Se(!im(a));im(a)||a.F.stop()}function nn(a,b,c,d){if(!a.ma)throw new K(2,7,7001);d||(d={});d.isPreload=a.Jb();b=a.j.networkingEngine.request(c,b,d);qj(a.ma,b);return b}function zn(a){return a=="AES-128"||a=="AES-256"||a=="AES-256-CTR"||a=="AES-256-GCM"}
function bm(a,b,c,d){var e,f,g,h,k,l;return G(function(m){if(m.i==1){if(c=="video/mp2t")throw new K(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new K(2,4,4041);e=Uk(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";e=="SAMPLE-AES"&&(g="cbcs");h=Uk(b,"URI");k=tc("com.apple.fps",g,null,h);var n=uj(h).replace(/-/g,"").toLowerCase();return(l=n.length===32&&/^[0-9a-f]+$/.test(n)?n:null)||!d?m.A(2):m.h(ao(a,d),3)}m.i!=2&&(l=m.j);l&&k.keyIds.add(l);
return m.return(k)})}function cm(a,b){var c=Uk(b,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c))return Promise.resolve(null);var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");c=Uk(b,"URI");var e=Ql(c.split("?")[0]);a=a.Ua.getOrInsertComputed(c.split("?")[0],function(){return tb(e.data)});d=tc("com.widevine.alpha",d,[{initDataType:"cenc",initData:a}],void 0,e.Kg);(b=X(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));return Promise.resolve(d)}
function dm(a,b){var c=Uk(b,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c))return Promise.resolve(null);var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");c=Uk(b,"URI");var e=Ql(c.split("?")[0]);a=a.Ua.getOrInsertComputed(c.split("?")[0],function(){return tb(e.data)});d=tc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:a}],void 0,e.Kg);(b=X(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));return Promise.resolve(d)}
function An(a,b,c,d,e,f){var g,h,k,l,m,n,p,u,r,v;return G(function(w){switch(w.i){case 1:if(c=="video/mp2t")throw new K(2,4,4040);g=Uk(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return w.return(null);k=al(d(),Uk(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Pb(Nb(k[0].split("data:text/plain;base64,").pop()));w.A(2);break}m=k.sort().join("");return w.h(a.Ib.getOrInsertComputed(m,function(){return nn(a,Ej(k,a.h.retryParameters),6).promise}),3);case 3:n=w.j,l=Pb(n.data);
case 2:p="00000000000000000000000000000000";if(!e){w.A(4);break}return w.h(ao(a,e),5);case 5:(u=w.j)&&(p=u);case 4:return r=new Map,r.set(p,l),v="cenc",g=="SAMPLE-AES"&&(v="cbcs"),w.return(uc(r,v))}})}function ao(a,b){var c,d,e,f;return G(function(g){if(g.i==1){c=null;if(a.xa.has(b))return c=a.xa.get(b),g.A(2);d=Ul(b.S(),b.jc(),b.fc(),a.j.getStreamingRetryParameters());e=Jj;return g.h(nn(a,d,e,{type:0}).promise,3)}g.i!=2&&(f=g.j,b.Id(f.data),c=Ml(f.data),a.xa.set(b,c));return g.return(c)})}
J("shaka.hls.HlsParser",am);
var jn=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),bo=(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"),co=(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"),eo=(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"),fo=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),Yn=(new Map).set("audio",bo).set("video",co).set("text",eo).set("image",fo),Zn=new Set(["video/mp2t"].concat(va(je))),
$n=["application/octet-stream","binary/octet-stream"],fm="VOD",Un="EVENT",pm="LIVE";Gc("application/x-mpegurl",function(){return new am});Gc("application/vnd.apple.mpegurl",function(){return new am});Gc("audio/x-mpegurl",function(){return new am});function go(a,b,c){c=c===void 0?!0:c;this.i=a;this.h=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}
go.prototype.add=function(a,b){var c=this.i;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&&!ho(d,e))&&cb(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||ho(c,d))&&cb(c.roles,d.roles)));return d?!1:(this.h.add(a),
!0)};go.prototype.values=function(){return this.h.values()};function ho(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(c){return pe(c)});b=b.codecs.split(",").map(function(c){return pe(c)});return cb(a,b)}J("shaka.media.AdaptationSet",go);function io(){this.h=jo;this.l=(new Map).set(jo,2).set(ko,1);this.j=0;this.i=-1}function lo(a,b){var c=a.h!==b;a.h=b;c&&b===jo&&(a.j=Date.now());return c}var ko=0,jo=1;function mo(){this.i=null;this.l=new Map;this.j=this.h=null}function no(a,b,c,d){var e;return G(function(f){if(f.i==1){e=tb(b);if(c)return a.j=e,f.return(oo(e));if(!a.j)return f.return(e);if(a.i===d)return f.A(2);a.i=d;a.h=po(a.i);return f.h(a.h,3)}f.i!=2&&(a.l=f.j,a.h=null);return f.return(qo(a,e,a.j))})}
mo.prototype.destroy=function(){var a=this;return G(function(b){switch(b.i){case 1:if(!a.h){b.A(2);break}b.o(3);return b.h(a.h,5);case 5:b.u(2);break;case 3:b.m();case 2:a.i=null,a.l.clear(),a.h=null,a.j=null,b.l()}})};
function po(a){var b,c,d,e,f,g,h,k,l;return G(function(m){if(m.i==1)return b=new Map,a.clearKeys?m.h(Promise.all([].concat(va(a.clearKeys.entries())).map(function(n){var p=t(n);n=p.next().value;p=p.next().value;p=Nb(p);var u=Nb(n);return Promise.all([crypto.subtle.importKey("raw",p,{name:"AES-CBC"},!1,["decrypt","encrypt"]),crypto.subtle.importKey("raw",p,{name:"AES-CTR"},!1,["decrypt"])]).then(function(r){var v=t(r);r=v.next().value;v=v.next().value;return{Pj:Pb(u),nf:r,le:v}})})),2):m.return(b);
c=m.j;d=t(c);for(e=d.next();!e.done;e=d.next())g=f=e.value,h=g.Pj,k=g.nf,l=g.le,b.set(h,{nf:k,le:l});return m.return(b)})}function qo(a,b,c){var d,e,f,g,h;return G(function(k){if(k.i==1)return d=ro(c),e=so(b,d),f=e.$i.map(function(l){var m=d.get(l.trackId)||d.values().next().value;return to(a,l,b,m)}),k.h(Promise.all(f),2);g=k.j;h=[b.slice(0,e.Yi)].concat(va(g));return k.return(Qb.apply(Ib,va(h)))})}
function oo(a){function b(h){e.push(function(){d.setUint32(h.start+4,1718773093,!1);c.fill(0,h.start+8,h.start+h.size)})}var c=tb(a).slice(),d=xb(c),e=[],f=-1;(new Qg).ka(ah,Vg).O("stsd",Xg).box("encv",function(h){f=h.start;Yg(h)}).box("enca",function(h){f=h.start;Zg(h)}).box("sinf",function(h){b(h);Vg(h)}).box("frma",function(h){var k=lh(h.reader).codec,l=f;l!==-1&&k&&e.push(function(){for(var m=0;m<4;++m)d.setUint8(l+4+m,k.charCodeAt(m))})}).O("sgpd",b).box("pssh",b).parse(c,!0);a=t(e);for(var g=
a.next();!g.done;g=a.next())g=g.value,g();return c}
function ro(a){var b=new Map,c=0;(new Qg).ka(["moov","mdia","minf","stbl"],Vg).box("trak",function(d){c=0;Vg(d)}).O("tkhd",function(d){c=jh(d.reader,d.version).trackId;b.getOrInsert(c,{defaultKID:"",encryptionScheme:"cenc",od:8,$b:null,oe:0,pe:0})}).O("stsd",Xg).box("encv",Yg).box("enca",Zg).box("sinf",Vg).O("schm",function(d){d=Ug(d.reader.R());var e=b.get(c);e&&(e.encryptionScheme=d.toLowerCase())}).box("schi",Vg).O("tenc",function(d){d=mh(d.reader,d.version);var e=b.get(c);e&&(e.defaultKID=d.defaultKID,
e.od=d.Ti,e.$b=d.$b,e.oe=d.oe,e.pe=d.pe)}).parse(a,!0);return b}
function so(a,b){function c(g){f&&f.lf.push({start:g.start,size:g.size})}var d=[],e=0,f=null;(new Qg).box("moof",function(g){d.length||(e=g.start);f={Wc:g.start,Oh:g.size,dg:-1,Bd:-1,bi:null,ti:0,trackId:0,wi:[],lf:[]};Vg(g)}).box("traf",Vg).O("tfhd",function(g){f&&(g=fh(g.reader,g.flags),f.trackId=g.trackId,f.ti=g.ac||0)}).O("trun",function(g){if(f){g=ih(g.reader,g.version,g.flags);g=t(g.nc);for(var h=g.next();!h.done;h=g.next())f.wi.push({size:h.value.sampleSize||f.ti})}}).O("senc",function(g){if(f){var h=
b.get(f.trackId);h&&(f.bi=qh(g.reader,g.flags,h.od,h.$b));c(g)}}).jh(["saiz","saio","sgpd","sbgp"],c).box("pssh",c).box("mdat",function(g){f&&(f.dg=g.start,f.Bd=g.size,d.push(f),f=null)}).parse(a);return{$i:d,Yi:e}}
function to(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A;return G(function(C){if(C.i==1){e=d.defaultKID;f=a.l.get(e);if(!f)return C.return(c.slice(b.Wc,b.dg+b.Bd));g=d.encryptionScheme;(h=b.bi)&&d.od!==8&&(k=c.subarray(b.Wc,b.Wc+b.Oh),(new Qg).ka(bh,Vg).O("senc",function(z){h=qh(z.reader,z.flags,d.od,d.$b)}).parse(k,!1));l=b.dg+8;m=c.subarray(l,l+b.Bd-8);return C.h(uo(m,b.wi.map(function(z){return z.size}),h,d,f,g),2)}n=C.j;p=c.slice(b.Wc,b.Wc+b.Oh);u=xb(p);if(b.lf)for(r=t(b.lf),v=r.next();!v.done;v=
r.next())w=v.value,y=w.start-b.Wc,y>=0&&y+w.size<=p.byteLength&&(u.setUint32(y+4,1718773093,!1),p.fill(0,y+8,y+w.size));x=8+n.byteLength;A=new Uint8Array(x);xb(A).setUint32(0,x,!1);A.set([109,100,97,116],4);A.set(n,8);return C.return(Qb(p,A))})}
function uo(a,b,c,d,e,f){var g,h,k,l,m,n,p,u,r,v;return G(function(w){if(w.i==1)return g=new Uint8Array(a.byteLength),h=0,k=b.map(function(y,x){var A=h;h+=y;y=a.subarray(A,A+y);if(c&&c.Qa[x]){x=c.Qa[x];var C=d.od===16?16:8,z=new Uint8Array(16);z.set(x.iv.slice(0,C),0);return f==="cenc"?vo(y,z,x.oi,e).then(function(B){return{offset:A,me:B}}):wo(y,d.$b||z,x.oi,d,e).then(function(B){return{offset:A,me:B}})}return f==="cbcs"&&d.$b?wo(y,d.$b,null,d,e).then(function(B){return{offset:A,me:B}}):Promise.resolve({offset:A,
me:y})}),w.h(Promise.all(k),2);l=w.j;m=t(l);for(n=m.next();!n.done;n=m.next())u=p=n.value,r=u.offset,v=u.me,g.set(v,r);return w.return(g)})}
function vo(a,b,c,d){var e,f,g,h,k,l,m,n,p,u;return G(function(r){switch(r.i){case 1:if(c&&c.length){r.A(2);break}e=rb;f=tb;return r.h(crypto.subtle.decrypt({name:"AES-CTR",counter:b,length:64},d.le,a),3);case 3:return r.return(f.call(e,r.j));case 2:return g=new Uint8Array(a.byteLength),k=h=0,l=c.map(function(v){var w=h;h+=v.nd;if(v.cc===0)return Promise.resolve({je:w,dh:v.nd,hh:h,Wi:0,vf:null});var y=b.slice();xo(y,k);var x=h;h+=v.cc;k+=Math.ceil(v.cc/16);return crypto.subtle.decrypt({name:"AES-CTR",
counter:y,length:64},d.le,a.subarray(x,x+v.cc)).then(function(A){return{je:w,dh:v.nd,hh:x,Wi:v.cc,vf:tb(A)}})}),r.h(Promise.all(l),4);case 4:m=r.j;n=t(m);for(p=n.next();!p.done;p=n.next())u=p.value,g.set(a.subarray(u.je,u.je+u.dh),u.je),u.vf&&g.set(u.vf,u.hh);return r.return(g)}})}
function wo(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,r,v,w;return G(function(y){if(y.i==1){f=d.oe;g=d.pe;f===0&&(f=1,g=0);h=new Uint8Array(a.byteLength);k=[];l=b;m=function(x,A){var C=x;x+=A;for(A={};C<x;A={Oc:void 0,Me:void 0,ie:void 0}){var z=Math.min(f*16,x-C);if(z>=16){var B=Math.floor(z/16)*16;A.Oc=C;A.Me=z-B;A.ie=C+B;k.push(yo(a.subarray(A.Oc,A.Oc+B),l,e.nf).then(function(D){return function(F){h.set(F,D.Oc);D.Me>0&&h.set(a.subarray(D.ie,D.ie+D.Me),D.ie)}}(A)));l=a.slice(A.Oc+B-16,A.Oc+B);C+=B+A.Me}else h.set(a.subarray(C,
C+z),C),C+=z;A=Math.min(g*16,x-C);A>0&&(h.set(a.subarray(C,C+A),C),C+=A)}};if(c&&c.length)for(n=0,p=t(c),u=p.next();!u.done;u=p.next())r=u.value,v=n,n+=r.nd,h.set(a.subarray(v,v+r.nd),v),r.cc>0&&(w=n,n+=r.cc,m(w,r.cc));else m(0,a.byteLength);return y.h(Promise.all(k),2)}return y.return(h)})}
function yo(a,b,c){var d,e,f,g,h,k,l,m;return G(function(n){if(n.i==1){if(!a||!a.byteLength||a.byteLength%16!==0)return n.return(new Uint8Array(0));d=a.byteLength/16;e=a.subarray((d-1)*16,d*16);f=e.map(function(p){return 16^p});g=new Uint8Array(16);return n.h(crypto.subtle.encrypt({name:"AES-CBC",iv:g},c,f),2)}if(n.i!=3)return h=n.j,k=new Uint8Array(h,0,16),l=new Uint8Array(a.byteLength+16),l.set(a,0),l.set(k,a.byteLength),n.h(crypto.subtle.decrypt({name:"AES-CBC",iv:b},c,l),3);m=n.j;return n.return(tb(m))})}
function xo(a,b){for(var c=15;c>=8&&b>0;c--)b+=a[c],a[c]=b&255,b>>>=8}function zo(a){if(!a)return!1;var b;return(b=window.crypto)!=null&&b.subtle&&Yb(a.keySystem)?!nb().sh():!1};function Ao(a){this.h=a=a===void 0?[]:a}
function Bo(a){var b=Co,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=nb().Hd()?"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":a.codecs.includes("avc1")?d=Do(a,"avc1","avcC"):a.codecs.includes("hvc1")&&(d=Do(a,"hvc1","hvcC"));break;case "audio":if(c=="mp3")a=Co(".mp3",Eo(a));else if(c=="ac-3"){c=Co("dac3",a.Wa);d="ac-3";var e=new Uint8Array([]);Fo(a.stream)&&(e=Go(a.stream,a.codecs),
d="enca");a=Co(d,Eo(a),c,e)}else if(c=="ec-3")c=Co("dec3",a.Wa),d="ec-3",e=new Uint8Array([]),Fo(a.stream)&&(e=Go(a.stream,a.codecs),d="enca"),a=Co(d,Eo(a),c,e);else if(c=="opus")c=Co("dOps",a.Wa),d="Opus",e=new Uint8Array([]),Fo(a.stream)&&(e=Go(a.stream,a.codecs),d="enca"),a=Co(d,Eo(a),c,e);else{if(a.Wa.byteLength>0)c=Co("esds",a.Wa);else{c=Co;d=a.id+1;e=a.stream.channelsCount||2;var f=a.stream.audioSamplingRate||44100,g=vc("audio",a.codecs.split(",")),h={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},k=h[f];if(g==="mp4a.40.5"||g==="mp4a.40.29")k=h[f*2];f=parseInt(g.split(".").pop(),10);g=Ho.value();Io(g,d,6);g[26]=f<<3|k>>>1;g[27]=k<<7|e<<3;c=c("esds",g)}d="mp4a";e=new Uint8Array([]);Fo(a.stream)&&(e=Go(a.stream,a.codecs),d="enca");a=Co(d,Eo(a),c,e)}d=a}a=Co("stsd",Jo.value(),d);return b("stbl",a,Ko.value(),Lo.value(),Mo.value(),No.value())}
function Do(a,b,c){var d=a.stream.width||0,e=a.stream.height||0,f=new Uint8Array([]);a.Wa.byteLength>0&&(f=Co(c,a.Wa));c=Oo.value();Io(c,d,24);Io(c,e,26);if(a.vc||a.Hc){d=a.vc||0;e=a.Hc||0;var g=Po("pasp",8);Qo(g,d,8);Qo(g,e,12);d=g}else d=new Uint8Array([]);e=new Uint8Array([]);Fo(a.stream)&&(e=Go(a.stream,a.codecs),b="encv");return Co(b,c,f,d,e)}function Eo(a){var b=a.stream.channelsCount||2;a=a.stream.audioSamplingRate||44100;var c=Ro.value();c[17]=b;Io(c,a,24);return c}
function So(a){var b=[];if(!Fo(a))return new Uint8Array([]);a=t(a.drmInfos);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.initData){c=t(c.initData);for(var d=c.next();!d.done;d=c.next())b.push(d.value.initData)}return Qb.apply(Ib,va(b))}
function Go(a,b){var c=Co,d=b.split(".")[0];b=Po("frma",4);Qo(b,To(d),8);d="cenc";var e=a.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);e=Uo.value();Qo(e,To(d),4);d=Co("schm",e);e=Co;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next()){f=h.value;h=new Uint8Array(f.length/2);for(var k=0;k<f.length/2;k+=1)h[k]=parseInt(String(f[k*2]+f[k*2+
1]),16);f=h}}a=Co("tenc",Vo.value(),f);return c("sinf",b,d,e("schi",a))}
function Wo(a){var b=[],c=0;a=t(a.h);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Co,f=d.data?d.data.sequenceNumber:0,g=Po("mfhd",8);Qo(g,f,12);f=g;var h,k=d.data?d.data.Qa:[];g=Po("sdtp",4+k.length);for(h=0;h<k.length;h++){var l=k[h].flags;g[h+12]=l.re<<4|l.De<<2|l.Ae}var m=g.length+32+20+8+16+8+8;k=Co;h=d.id+1;l=Xo.value();Qo(l,h,4);h=Co("tfhd",l);l=d.data?d.data.Ca:0;var n=Math.floor(l/(Yo+1)),p=Math.floor(l%(Yo+1));l=Po("tfdt",12);l[8]=1;Qo(l,n,12);Qo(l,p,16);var u=m;m=d.data?d.data.Qa:
[];n=m.length;var r=12+16*n;p=Po("trun",r);u+=8+r;p[8]=d.type==="video"?1:0;p[9]=0;p[10]=15;p[11]=1;Qo(p,n,12);Qo(p,u,16);for(u=0;u<n;u++){r=m[u];var v=r.flags,w=20+16*u;Qo(p,r.duration,w);Qo(p,r.size,w+4);p[w+8]=v.Yf<<2|v.re;p[w+9]=v.De<<6|v.Ae<<4|v.Zf;p[w+10]=v.qe&61440;p[w+11]=v.qe&15;Qo(p,r.hb,w+12)}g=k("traf",h,l,p,g);e=e("moof",f,g);d=d.data?d.data.Qa:[];f=0;g=t(d);for(k=g.next();!k.done;k=g.next())f+=k.value.data.byteLength;f=8+f;b.push({Vj:e,Qa:d,Bd:f});c+=e.byteLength+f}c=tb(new ArrayBuffer(c));
a=0;b=t(b);for(d=b.next();!d.done;d=b.next())for(f=d.value,d=f.Vj,e=f.Qa,f=f.Bd,c.set(d,a),a+=d.byteLength,Qo(c,f,a),c.set(Zo.value(),a+4),a+=8,d=t(e),e=d.next();!e.done;e=d.next())e=e.value,c.set(e.data,a),a+=e.data.byteLength;return c}function Qo(a,b,c){a[c]=b>>>24&255;a[c+1]=b>>>16&255;a[c+2]=b>>>8&255;a[c+3]=b&255}function Io(a,b,c){a[c]=b>>>8&255;a[c+1]=b&255}function To(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<(a.length-c-1)*8;return b}
function Co(a){for(var b=Ia.apply(1,arguments),c=0,d=t(b),e=d.next();!e.done;e=d.next())c+=e.value.byteLength;c=Po(a,c);d=8;for(e=0;e<b.length;e++)c.set(b[e],d),d+=b[e].byteLength;return c}function Po(a,b){var c=$o.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],$o.set(a,c));a=8+b;b=new Uint8Array(a);b[0]=a>>24&255;b[1]=a>>16&255;b[2]=a>>8&255;b[3]=a&255;b.set(c,4);return b}function Fo(a){return a.encrypted&&a.drmInfos.length>0}
var Yo=4294967295,$o=new Map,Zo=new mb(function(){return new Uint8Array([109,100,97,116])}),ap=new mb(function(){return new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,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])}),bp=new mb(function(){return new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,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,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])}),cp=new mb(function(){return new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}),dp=new mb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])}),Xo=new mb(function(){return new Uint8Array([0,0,0,58,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])}),Ho=new mb(function(){return new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,
0,0,0,0,0,0,0,0,0,0,5,2,0,0,6,1,2])}),Ro=new mb(function(){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0])}),Oo=new mb(function(){return 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,0,0,0,0,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])}),Vo=new mb(function(){return new Uint8Array([0,0,0,0,0,0,1,8])}),Uo=new mb(function(){return new Uint8Array([0,0,0,
0,0,0,0,0,0,1,0,0])}),ep=new mb(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])}),fp=new mb(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])}),gp=new mb(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),hp=new mb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),Jo=new mb(function(){return new Uint8Array([0,
0,0,0,0,0,0,1])}),ip=new mb(function(){var a=new Uint8Array([105,115,111,109]),b=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);return Co("ftyp",a,c,a,b)}),jp=new mb(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=Co("dref",a);return Co("dinf",a)}),Ko=new mb(function(){return Po("stts",8)}),Lo=new mb(function(){return Po("stsc",8)}),Mo=new mb(function(){return Po("stsz",12)}),No=new mb(function(){return Po("stco",8)});function kp(a){a=tb(a);var b=null;(new Qg).ka(ah,Vg).O("stsd",Xg).box("enca",function(c){b=c.reader.i;return Zg(c)}).box("sinf",Vg).box("frma",function(c){c.parser.stop();lh(c.reader).codec==="ec-3"&&b&&b.getUint16(16)!==2&&b.setUint16(16,2)}).parse(a);return a}function lp(a){a=tb(a);var b=null,c=-1;(new Qg).ka(ah,Vg).O("stsd",Xg).ka(["encv","hvc1"],function(d){b=d.reader.i;c=d.start;return Yg(d)}).box("dvvC",function(d){d.parser.stop();b.setUint32(d.start-c-4,1718773093)}).parse(a);return a}
function mp(a,b,c,d){var e=b=tb(b),f=!1,g,h=[],k=[];(new Qg).ka(ah,function(m){h.push(m);Vg(m)}).O("stsd",function(m){g=m;h.push(m);Xg(m)}).ka(["encv","enca"],function(m){f=!0;m.parser.stop()}).ka(dh,function(m){k.push({box:m,Ph:1701733238})}).ka([].concat(va(eh),["mp4a"]),function(m){k.push({box:m,Ph:1701733217})}).parse(b);if(f)return b;if(k.length==0||!g)throw $a(Pb(b)),new K(2,3,3019,c);k.reverse();c=t(k);for(var l=c.next();!l.done;l=c.next())l=l.value,e=np(a,e,g,l.box,h,l.Ph,d);e=op(a,e);return nb().ug(d)?
(a=new Uint8Array(b.byteLength+e.byteLength),a.set(e),a.set(b,e.byteLength),a):e}function pp(a){a=tb(a);var b=[];(new Qg).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(qp(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return Qb.apply(Ib,va(c))}
function qp(a){var b,c,d,e,f=[];(new Qg).ka(bh,function(m){f.push(m);Vg(m)}).O("tfhd",function(m){b=m;d=fh(m.reader,m.flags)}).O("trun",function(m){c=m;e=ih(m.reader,m.version,m.flags)}).parse(a);if(d&&d.yg!==2){var g=b.start+Wg(b)+4+(d.Yg!==null?8:0),h=xb(a);if(d.yg!==null)h.setUint32(g,2);else{rp(a,b.start,b.size+4);var k=h.getUint32(b.start+8);h.setUint32(b.start+8,k|2);e&&e.Zb!==null&&h.setInt32(c.start+Wg(c)+4,e.Zb+4);k=a.subarray(0,g);h=a.subarray(g);a=new Uint8Array(a.byteLength+4);a.set(k);
k=[];for(var l=3;l>=0;l--)k.push(2>>8*l&255);a.set(new Uint8Array(k),g);a.set(h,g+4);g=t(f);for(h=g.next();!h.done;h=g.next())h=h.value,rp(a,h.start,h.size+4)}}return a}
function np(a,b,c,d,e,f,g){var h=Go(a,d.name),k=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+h.byteLength);a.set(k,0);xb(a).setUint32(4,f);a.set(h,d.size);rp(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=nb().Ce(g)?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,rp(f,e.start,e.size+a.byteLength);a=xb(f,c.start);c=Wg(c);b=a.getUint32(c);a.setUint32(c,b+1);return f}
function op(a,b){a=So(a);if(a.byteLength===0)return b;var c=0,d=0;(new Qg).box("moov",function(h){c=h.start;d=h.size;h.parser.stop()}).parse(b);var e=c+d;rp(b,c,d+a.byteLength);var f=new Uint8Array(b.byteLength+a.byteLength),g=b.subarray(e);f.set(b.subarray(0,e));f.set(a,e);f.set(g,e+a.byteLength);return f}function rp(a,b,c){a=xb(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 sp(a){var b=tb(a),c=[];(new Qg).ka(ah,function(d){c.push({start:d.start,size:d.size});Vg(d)}).box("stsd",function(d){c.push({start:d.start,size:d.size});for(var e=xb(b,d.start),f=0;f<d.size-3;f++){var g=e.getUint32(f);g==1633889587?e.setUint32(f,1700998451):g==1684103987&&e.setUint32(f,1684366131)}}).parse(b);return b}
function tp(a){a=tb(a);var b=[],c=[],d=[],e=[],f=!1;(new Qg).box("moof",function(B){b.push(B);Vg(B)}).box("traf",function(B){c.push(B);Vg(B)}).O("tfhd",function(B){d.push(B)}).O("trun",function(B){e.push(B)}).ka(["senc","saiz","saio"],function(){f=!0}).parse(a,!1,!0);if(f||b.length!=1||c.length!=1||d.length!=1||e.length!=1)return a;var g=b[0],h=c[0],k=d[0],l=e[0],m=l.flags,n=fh(k.reader,k.flags),p=ih(l.reader,l.version,l.flags);if(n.Yg!=null||!(m&1)||p.Zb==null)return a;var u=g.start+g.size,r=xb(a);
if(u+8>a.byteLength||r.getUint32(u+4)!=1835295092)return a;r=r.getUint32(u);if(r==1)return a;r==0&&(r=a.byteLength-u);var v=a.byteLength-(u+8);if(v>=r-8)return a;for(var w=r=0,y=t(p.nc),x=y.next();!x.done;x=y.next()){x=x.value;x=x.sampleSize!=null?x.sampleSize:n.ac;if(x==null)return a;if(r+x>v)break;r+=x;w++}if(w!=1||w>=p.sampleCount)return a;y=(m&256)!=0;v=0;x=t(p.nc);for(var A=x.next();!A.done;A=x.next()){A=A.value;A=y?A.bd:n.Ob;if(A==null)return a;v+=A}x=Wg(l);A=l.start+x+4;A+=4;m&4&&(A+=4);var C=
0;m&256&&(C+=4);m&512&&(C+=4);m&1024&&(C+=4);m&2048&&(C+=4);m=(p.sampleCount-w)*C;C=A+w*C;if(C+m!=u)return a;C=a.slice(0,C);var z=xb(C);z.setUint32(l.start+x,w);z.setInt32(l.start+x+4,p.Zb-m);y?z.setUint32(A,v):(k=k.start+Wg(k)+4,n.yg!=null&&(k+=4),z.setUint32(k,v));rp(C,l.start,l.size-m);rp(C,h.start,h.size-m);rp(C,g.start,g.size-m);g=a.slice(u,u+8);rp(g,0,8+r);return Qb(C,g,a.subarray(u+8,u+8+r))};function up(a){return a.length==1&&a.end(0)-a.start(0)<1E-4}function vp(a){return!a||up(a)?null:a.length==1&&a.start(0)<0?0:a.length?a.start(0):null}function wp(a){return!a||up(a)?null:a.length?a.end(a.length-1):null}function xp(a,b){return!a||!a.length||up(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function yp(a,b){if(!a||!a.length||up(a))return 0;var c=0;a=t(zp(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 Ap(a,b){if(!a||!a.length||up(a))return 0;var c=0;a=t(zp(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;d<b&&(c+=Math.min(e,b)-d)}return c}function Bp(a,b,c){if(!a||!a.length||up(a))return null;a=zp(a).findIndex(function(d,e,f){return d.start>b&&(e==0||f[e-1].end-b<=c)});return a>=0?a:null}function zp(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 Cp(a,b,c,d,e){var f=this;this.B=d;this.J=e||function(){return a.playbackRate};this.h=a;this.F=b;this.i=c;this.m=new gb;this.u=!1;this.o=0;this.D=!1;this.H=this.G=0;this.l=Dp(this);this.C=!1;this.m.I(a,"waiting",function(){return Ep(f)});this.j=(new Ke(function(){Ep(f)})).Ka(this.i.gapJumpTimerTime)}Cp.prototype.release=function(){this.m&&(this.m.release(),this.m=null);this.j!=null&&(this.j.stop(),this.j=null);this.l&&(this.l.release(),this.l=null);this.h=this.F=this.B=null};
Cp.prototype.Xc=function(){this.C=!0;this.j&&this.j.Ka(this.i.gapJumpTimerTime);Ep(this)};
function Ep(a){if(a.h.readyState!=0){if(a.h.seeking){if(!a.u)return}else a.u=!1;if(!a.h.paused||a.h.currentTime==a.o&&(a.h.autoplay||a.h.currentTime!=a.o))if(!a.l||!Fp(a.l)){var b=a.h.currentTime,c=a.h.buffered,d=a.i.gapDetectionThreshold;if(!(a.J()<0)){d=Bp(c,b,d);if(d==null&&a.l&&!Fp(a.l))for(var e=zp(c),f=0;f<e.length-1;f++)if(Math.abs(b-e[f].end)<.1&&e[f+1].start>e[f].end){d=f+1;break}d==null||d==0&&!a.C||(e=c.start(d),(f=a.i.gapPadding)&&(e=Math.ceil((e+f)*100)/100),f=a.F.kb(),e>=f||e-b<.001||
(d!=0&&c.end(d-1),Gp(a,e),b==a.o&&(a.o=e),a.G++,a.B(new nj("gapjumped"))))}}}}function Gp(a,b){a.D=!0;a.m.Ja(a.h,"seeked",function(){a.D=!1});a.h.currentTime=b}
function Dp(a){if(!a.i.stallEnabled)return null;var b=a.i.stallThreshold,c=a.i.stallSkip;return new Hp(new Ip(a.h),b,function(d,e,f){var g;return G(function(h){if(h.i==1)return g=zp(a.h.buffered),g.length?c?(a.h.currentTime+=c,h.A(2)):h.h(a.h.play(),3):h.return();if(h.i!=2){if(!a.h)return h.return();a.h.pause();a.h.play()}f==0&&(a.H++,a.B(new nj("stalldetected")));h.l()})})}function Hp(a,b,c){this.j=a;this.B=Jp(a);this.i=a.h.currentTime;this.o=Date.now()/1E3;this.m=this.h=0;this.u=b;this.l=c}
Hp.prototype.release=function(){this.j&&this.j.release();this.l=this.j=null};function Fp(a){var b=a.j,c=Jp(b),d=b.h.currentTime,e=Date.now()/1E3;if(a.i!=d||a.B!=c)a.o=e,a.i=d,a.B=c,a.h=0;d=e-a.o;if(c=d>=a.u&&c&&a.h<3&&(a.h==0||e-a.m>=a.u))a.l&&a.l(a.i,d,a.h),a.h++,a.m=e,a.i=b.h.currentTime;return c}
function Ip(a){var b=this;this.h=a;this.i=new gb;this.j=!1;this.i.I(this.h,"audiofocuspaused",function(){b.j=!0});this.i.I(this.h,"audiofocusgranted",function(){b.j=!1});this.i.I(this.h,"audiofocuslost",function(){b.j=!0})}function Jp(a){if(a.h.paused||a.h.playbackRate==0||a.j||a.h.buffered.length==0)var b=!1;else a:{b=a.h.currentTime;a=t(zp(a.h.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}
Ip.prototype.release=function(){this.i&&this.i.release();this.i=null};function Kp(a,b,c){this.i=a;this.j=b;this.h=c}
function Lp(a,b){var c,d,e;return G(function(f){if(f.i==1)return f.h(Ze(a.h,b,a.i.drm.preferredKeySystems,a.i.drm.keySystemsMapping),2);a.i.streaming.dontChooseCodecs||(c=a.i.preferredVideo.map(function(g){return g.codec}).filter(Boolean),d=a.i.preferredAudio.map(function(g){return g.codec}).filter(Boolean),e=a.i.preferredText.map(function(g){return g.format}).filter(Boolean),We(b,c,d,a.i.preferredDecodingAttributes,e));if(!b.variants.some(xf))throw new K(2,4,4032);return f.return(Mp(a,b))})}
function Np(a,b){var c=a.i.restrictions;a=a.j;var d=!1;b=t(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Ye(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
function Mp(a,b){var c=Np(a,b);if(b){var d=a.h?a.h.ec():null;if(d&&a.h.B){for(var e=new Set,f=t(b.variants),g=f.next();!g.done;g=f.next())g=g.value,g.audio&&e.add(g.audio),g.video&&e.add(g.video);e=t(e);for(f=e.next();!f.done;f=e.next())Op(a,d.keySystem,f.value)}Pp(a,b)}return c}
function Op(a,b,c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){for(var e=t(d.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,ik(a.h,f.initDataType,f.initData);e=a.h;e.h&&(e.h.mediaTypes!==d.mediaTypes&&(e.h.mediaTypes=d.mediaTypes),Vb(d)&&(e.h=uk(e,e.h.keySystem,[e.h,d])))}}
function Pp(a,b){function c(l){if(l&&!h.has(l)&&(h.add(l),l.keyIds.size)){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=d[e?"00":m];n?Qp.includes(n)&&g.add(n):f.add(m)}}}var d=a.h?a.h.xe():{};a=Object.keys(d);var e=a.length&&a[0]=="00";a=!1;var f=new Set,g=new Set,h=new WeakSet;b=t(b.variants);for(var k=b.next();!k.done;k=b.next()){k=k.value;if(!k.allowedByApplication)a=!0;else if(k.allowedByKeySystem)return;c(k.audio);c(k.video)}a={hasAppRestrictions:a,missingKeys:Array.from(f),
restrictedKeyStatuses:Array.from(g)};throw new K(2,4,4012,a);}var Qp=["output-restricted","internal-error"];function Rp(a,b){this.h=a;this.B=b===void 0?"":b;this.l=!1;this.u=0;this.i=new Map;this.j=Sp++;this.m=this.o=!1}q=Rp.prototype;q.destroy=function(){for(var a=t(this.i.values()),b=a.next();!b.done;b=a.next())b=b.value,b.Ig.stop(),b.reject(new K(2,3,3018,"Worker transmuxer destroyed"));this.i.clear();this.m&&(Tp&&Tp.postMessage({cmd:"destroy",id:this.j}),Up.delete(this.j),this.m=!1,Up.size===0&&Tp&&(Tp.terminate(),Tp=null));this.h.destroy()};q.isSupported=function(a,b){return this.h.isSupported(a,b)};
q.convertCodecs=function(a,b){return this.h.convertCodecs(a,b)};q.getOriginalMimeType=function(){return this.h.getOriginalMimeType()};
q.transmux=function(a,b,c,d,e){var f=this,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F;return G(function(E){if(E.i==1){if(f.l)return E.return(f.h.transmux(a,b,c,d,e));if(!f.m){g=Vp(f.B);if(!g)return f.l=!0,E.return(f.h.transmux(a,b,c,d,e));Up.set(f.j,f);f.m=!0}h=Tp;if(!h)return f.l=!0,E.return(f.h.transmux(a,b,c,d,e));f.o||(k=f.h.getOriginalMimeType(),h.postMessage({cmd:"init",id:f.j,mimeType:k}),f.o=!0);l=f.u++;m={id:b.id,codecs:b.codecs,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,
height:b.height,width:b.width,language:b.language};n=c?{discontinuitySequence:c.j,startTime:c.startTime,endTime:c.endTime,uris:c.S()}:null;p=ub(Qb(a));u=Promise.withResolvers();r=u.promise;v=u.resolve;w=u.reject;y=!1;x=new Ke(function(){f.i.has(l)&&(f.i.delete(l),y=f.l=!0,v(null))});x.ia(30);f.i.set(l,{resolve:v,reject:w,Ig:x});try{h.postMessage({cmd:"transmux",id:f.j,reqId:l,data:p,streamProps:m,refProps:n,duration:d,contentType:e},[p])}catch(H){return x.stop(),f.i.delete(l),Wp(),E.return(f.h.transmux(a,
b,c,d,e))}return E.h(r,2)}A=E.j;if(y||A===null)return Va("Worker transmux unavailable; falling back to main-thread transmuxing"),E.return(f.h.transmux(a,b,c,d,e));if((C=A.streamMutations)&&Object.keys(C).length>0)for(z=t(Object.keys(C)),B=z.next();!B.done;B=z.next())D=B.value,b[D]=C[D];F=A.output;return F.type==="raw"?E.return(tb(F.data)):E.return({data:tb(F.data),init:F.init?tb(F.init):null})})};J("shaka.transmuxer.TransmuxerProxy",Rp);Rp.prototype.transmux=Rp.prototype.transmux;
Rp.prototype.getOriginalMimeType=Rp.prototype.getOriginalMimeType;Rp.prototype.convertCodecs=Rp.prototype.convertCodecs;Rp.prototype.isSupported=Rp.prototype.isSupported;Rp.prototype.destroy=Rp.prototype.destroy;var Sp=0,Tp=null,Up=new Map;
function Vp(a){if(Tp)return Tp;if(!nb().dd()||!a)return null;try{var b=new Worker(a);b.addEventListener("message",function(c){c=c.data;var d=c.cmd;if(d==="transmuxed"||d==="error"){var e=Up.get(c.id);if(e){var f=c.cmd;if(f==="transmuxed"||f==="error"){var g=c.reqId;if(d=e.i.get(g))d.Ig.stop(),e.i.delete(g),f==="error"?(c=c.error,d.reject(new (Function.prototype.bind.apply(K,[null,c.severity,c.category,c.code].concat(va(c.data)))))):d.resolve(c)}}}});b.addEventListener("error",function(){Wp()});return Tp=
b}catch(c){return null}}function Wp(){for(var a=t(Up.values()),b=a.next();!b.done;b=a.next()){b=b.value;b.l=!0;for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Ig.stop(),d.resolve(null);b.i.clear()}Tp=null;Up.clear()};function Xp(a,b,c){c=c===void 0?Number.EPSILON:c;if(a===b)return!0;a=Math.abs(a-b);return a<=c?!0:c!==Number.EPSILON?Math.abs(a-c)<=Number.EPSILON:!1};function Yp(a,b,c,d,e){var f=this;this.h=a;this.D=c;this.B=d;this.oa=b;this.l=new Map;this.F=new Map;this.Ma=new Map;this.i=null;this.La=!1;this.H=e||null;this.u=new Map;this.C=new gb;this.m=new Map;this.J=null;this.N=Promise.withResolvers();this.Fa="";this.eb=!1;this.Ba=!0;this.ma=!1;this.L=this.ea=null;this.j=Zp(this,this.N);this.Na=this.K=!1;this.G=new Nj(function(){return $p(f)});this.P=!1;this.Z="UNKNOWN";this.o=this.Za=this.$a=!1;this.Aa=null;this.Ua=new Map;this.sa=this.V=this.xa=this.U=null;
this.ba=Promise.withResolvers();var g=Li(nb(),this.h);g&&(this.ma=g.state!="disconnected",this.C.yb(g,["connect","connecting","disconnect"],function(){f.ma=g.state!="disconnected"}));this.Ya=!1;this.M=new Map}
function Zp(a,b){a.Ba=!0;if(window.ManagedMediaSource){a.L||(a.h.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.C.I(c,"startstreaming",function(){a.Ba=!0});a.C.I(c,"endstreaming",function(){a.Ba=!1})}else c=new MediaSource;a.C.Ja(c,"sourceopen",function(){URL.revokeObjectURL(a.Fa);b.resolve()});a.C.Ja(a.h,"playing",function(){a.eb=!0});a.Fa=aq(c);bq(a);a.B.useSourceElements?(a.ea=vi(a.Fa),a.h.appendChild(a.ea),a.L&&a.h.appendChild(a.L),a.h.load()):a.h.src=a.Fa;return c}
function cq(a,b,c){if(a.h&&window.ManagedMediaSource&&a.j&&a.B.useSourceElements){var d;((d=a.L)==null?void 0:d.parentElement)===a.h&&a.h.removeChild(a.L);a.L=vi(b,c);a.h.appendChild(a.L);a.h.disableRemotePlayback=!1}}
function dq(){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="av01.0.31M.10.0.111.09.16.09.0",video/mp4; codecs="av01.0.31M.10.0.112.09.18.09.0",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.03",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(va(je)),b=
{};nb();a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Ae(c))b[c]=!0;else if(Kc()){var d=qe(c),e=te(re(c),d);d=ie(d,e);b[c]=Fl(d)||(fe(d)?!0:!1)}else b[c]=Lc().canPlayType(c)!="";d=c.split(";")[0];b[d]=b[d]||b[c]}return b}q=Yp.prototype;q.destroy=function(){return this.G.destroy()};
function $p(a){var b,c,d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x;return G(function(A){if(A.i==1){b=[];c=t(a.u);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=t(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.u.set(l,h.slice(0,1)),k&&b.push(k.p.promise.catch(function(){})),m=t(h.slice(1)),n=m.next();!n.done;n=m.next())p=n.value,p.p.reject(new K(2,7,7003,void 0));a.i&&b.push(a.i.destroy());return A.h(Promise.all(b),2)}b=[];u=t(a.m.values());for(r=u.next();!r.done;r=u.next())v=r.value,v.destroy();w=t(a.M.values());
for(y=w.next();!y.done;y=w.next())x=y.value,b.push(x.destroy());a.C&&(a.C.release(),a.C=null);a.h&&(bq(a),a.h.load(),a.h.disableRemotePlayback=!1);a.h=null;a.ea=null;a.L=null;a.B=null;a.j=null;a.i=null;a.oa=null;a.l.clear();a.Ma.clear();a.M.clear();a.m.clear();a.J=null;a.u.clear();a.H=null;a.Ua.clear();a.D=null;return A.h(Promise.all(b),0)})}
function bq(a){if(a.h){a.h.removeAttribute("src");var b;((b=a.ea)==null?void 0:b.parentElement)===a.h&&a.h.removeChild(a.ea);var c;((c=a.L)==null?void 0:c.parentElement)===a.h&&a.h.removeChild(a.L)}}
q.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 G(function(n){if(n.i==1)return f=Ac,n.h(e.N.promise,2);if(n.i!=3){if(!eq(e)&&!fq(e))return n.A(3);Ua("Expected MediaSource to be open during init(); reopening the media source.");e.N=Promise.withResolvers();e.j=Zp(e,e.N);return n.h(e.N.promise,3)}e.P=b;e.Z=c;e.$a=d;e.Za=!e.P&&e.Z=="HLS"&&!e.$a;e.Ua.clear();e.U=null;e.xa=null;e.V=null;e.sa=null;e.ba=Promise.withResolvers();g=t(a.keys());
for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),gq(e,k,l,l.codecs),e.o?(e.u.set(f.X,[]),e.u.set(f.qa,[])):e.u.set(k,[]);(m=a.get(f.X))&&m.isAudioMuxedInVideo&&(e.o=!0);n.l()})};
function gq(a,b,c,d){b=="audio"&&d&&(d=te(d,c.mimeType));b=="video"&&d&&c.mimeType=="video/mp4"&&(d=ue(d,c.mimeType));var e=ie(c.mimeType,d);if(b==yc)hq(a,e,c.external);else{var f=a.B.forceTransmux;if(!Fl(e)||!a.P&&je.includes(e))f=!0;var g=ke(c.mimeType,d);if(f){f=wc("audio",(d||"").split(","));d=wc("video",(d||"").split(","));if(f&&d){a.o=!0;gq(a,"audio",c,f);gq(a,"video",c,d);return}if(d=fe(g))e=new Rp(d(),a.B.transmuxWorkerUrl),a.m.set(b,e),e=e.convertCodecs(b,g)}g=e+a.B.addExtraFeaturesToSourceBuffer(e);
Oj(a.G);try{var h=a.j.addSourceBuffer(g)}catch(l){throw new K(2,3,3015,l,"The mediaSource_ status was "+a.j.readyState+" expected 'open'",null);}a.P&&(h.mode=iq);a.C.I(h,"error",function(){var l=a.u.get(b)[0];l.p.reject(new K(2,3,3014,a.h.error?a.h.error.code:0,l.uri))});a.C.I(h,"updateend",function(){return jq(a,b)});a.l.set(b,h);a.F.set(b,e);a.Ma.set(b,!!c.drmInfos.length);c=a.D.ec();if(zo(c))a.M.set(b,new mo);else{var k;(k=a.M.get(b))==null||k.destroy();a.M.delete(b)}}}
q.configure=function(a){this.B=a;this.i&&(this.i.G=a.modifyCueCallback)};function kq(a){return a.Ba&&!a.ma&&!a.K}function hq(a,b,c){a.i||(a.i=new we(a.oa,a.Z),a.i&&(a.i.G=a.B.modifyCueCallback));var d=a.i;a=a.La;b=="application/cea-608"||b=="application/cea-708"?d.m=null:(d.m=ye.get(b)(),d.m.setManifestType(d.F),d.J=a,d.D=c)}function eq(a){return a.K?!1:a.j?a.j.readyState=="ended":!0}function fq(a){return a.K?!1:a.j?a.j.readyState=="closed":!0}
function lq(a,b){return a.l.size?b==yc?a.i.h:vp(mq(a,b)):null}function nq(a,b){return a.l.size?b==yc?a.i.i:wp(mq(a,b)):null}function oq(a,b,c){if(b==yc)return a=a.i,a.i==null||a.i<c?0:a.i-Math.max(c,a.h);a=mq(a,b);return yp(a,c)}function pq(a,b,c){if(b==yc)return a=a.i,a.h==null||a.h>c?0:Math.min(c,a.i)-a.h;a=mq(a,b);return Ap(a,c)}
q.dc=function(){var a={total:this.K?[]:zp(this.h.buffered),audio:zp(mq(this,"audio")),video:zp(mq(this,"video")),text:[]};if(this.i){var b=this.i.h,c=this.i.i;b!=null&&c!=null&&a.text.push({start:b,end:c})}return a};function mq(a,b){if(!qq(a))return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function rq(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=null,k=[],l=tb(c);if(je.includes(f))c=Mh(l),c.length&&d&&((g=c.find(function(v){return v.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof g.data=="number"&&(h=Math.round(g.data)/1E3),a.D.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 Qg;var m=e.emsgSchemeIdUris!=null&&e.emsgSchemeIdUris.length>0||a.B.dispatchAllEmsgBoxes,n=[];m&&l.O("emsg",
function(v){a:{var w=e.emsgSchemeIdUris;if(v.version===0){var y=v.reader.$c();var x=v.reader.$c();var A=v.reader.R();var C=v.reader.R();var z=v.reader.R();var B=v.reader.R();var D=d.startTime+C/A}else A=v.reader.R(),D=v.reader.Ne()/A+d.o,C=D-d.startTime,z=v.reader.R(),B=v.reader.R(),y=v.reader.$c(),x=v.reader.$c();v=v.reader.wa(v.reader.Oa()-v.reader.Ia(),!0);if(w&&w.includes(y)||a.B.dispatchAllEmsgBoxes)if(y=="urn:mpeg:dash:event:2012")a.D.dk();else{w=D;if(y!=="https://aomedia.org/emsg/ID3"||z!==
4294967295)w+=z/A;A={startTime:D,endTime:w,schemeIdUri:y,value:x,timescale:A,presentationTimeDelta:C,eventDuration:z,id:B,messageData:v};break a}A=null}A&&n.push(A)});var p=d.$.timescale;b=p&&!isNaN(p);var u=0,r=!1;b&&l.O("prft",function(v){var w=v.reader,y=v.version;w.R();v=w.R();var x=w.R();v=v*1E3+x/4294967296*1E3;y===0?w=w.R():(y=w.R(),w=w.R(),w=y*4294967296+w);v=(new Date(Date.UTC(1900,0,1,0,0,0,0)+v)).getTime();w=(new Map).set("detail",{wallClockTime:v,programStartDate:new Date(v-w/p*1E3)});
w=new nj("prft",w);a.D.onEvent(w)}).ka(bh,Vg).O("tfdt",function(v){r||(u=gh(v.reader,v.version).Ca/p,r=!0,m||v.parser.stop())});(m||b)&&l.parse(c,!1,g);r&&d.o==0&&(h=u);l=t(n);for(c=l.next();!c.done;c=l.next())sq(a,c.value,d,h)}else f.includes("/mp4")||f.includes("/webm")||!ni(l)||(k=a.Ua.getOrInsertComputed(b,function(){return new ai}),k.clearData(),k.Re(d.j),k.parse(l),l=hi(k,b),l!=null&&(h=l),k=k.getMetadata());return{timestamp:h,metadata:k}}
function sq(a,b,c,d){var e=Xp(b.startTime,c.startTime+b.presentationTimeDelta/b.timescale);d&&a.Z=="HLS"&&!e&&(c=-d+c.startTime,b.startTime+=c,b.endTime+=c);a.D.bk(b);!b.messageData||b.schemeIdUri!="https://aomedia.org/emsg/ID3"&&b.schemeIdUri!="https://developer.apple.com/streaming/emsg-id3"||(c=Mh(b.messageData),c.length&&(d=b.startTime,a.D.onMetadata([{cueTime:d,data:b.messageData,frames:c,dts:d,pts:d}],0,b.endTime)))}
function tq(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,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H,O,R,N,S,L,P,Q,M,W,ha,I,U,T,Y,fa;return G(function(ja){switch(ja.i){case 1:n=Ac;if(b!=n.Ra){ja.A(2);break}return ja.h(Be(a.i,c,d?d.startTime:null,d?d.endTime:null,d?d.S()[0]:null,d?d.j:-1),3);case 3:return ja.return({yc:null});case 2:if(l||!a.o){ja.A(4);break}return ja.h(tq(a,n.qa,c,d,e,f,g,h,k,!0),5);case 5:return p=ja.j,ja.h(tq(a,n.X,c,d,e,f,g,h,k,!0),6);
case 6:return u=ja.j,ja.return(p.yc!=null?p:u);case 4:if(!a.l.has(b))return ja.return({yc:null});r=a.l.get(b).timestampOffset;v=null;eq(a)&&uq(a,b,function(){var sa=a.l.get(b);if(eq(a)){var Ga=sa.buffered;Ga=Ga.length?Ga.end(Ga.length-1):0;sa.remove(Ga,Ga+.001)}else jq(a,b)},null);w=a.F.get(b);a.m.has(b)&&(w=a.m.get(b).getOriginalMimeType());if(!d){ja.A(7);break}y=rq(a,b,c,d,e,w,k);x=y.timestamp;A=y.metadata;if(x==null){ja.A(8);break}v=x;a.U==null&&b==n.qa&&(a.U=x,a.xa=d.startTime,a.V!=null&&(C=0,
a.xa==a.sa&&(C=a.U-a.V),a.ba.resolve(C)));a.V==null&&b==n.X&&(a.V=x,a.sa=d.startTime,a.U!=null&&(z=0,a.xa==a.sa&&(z=a.U-a.V),a.ba.resolve(z)));D=vq;F=b==n.X&&a.o&&!a.P&&a.U!=null&&a.l.has(n.qa)&&a.l.get(n.X).mode==D.Fi;if(!F){E=x;H=je;!a.P&&H.includes(a.F.get(b))&&(E=0);B=d.startTime-E;ja.A(9);break}O=a.l.get(n.qa).timestampOffset;return ja.h(a.ba.promise,10);case 10:R=ja.j,B=O+R;case 9:N=Math.abs(r-B),(N>=.001||g||h)&&(!k||B>0||!r)&&(r=B,a.Za&&(uq(a,b,function(){return wq(a,b)},null),uq(a,b,function(){return xq(a,
b,r)},null))),(S=b==n.qa||!a.l.has(n.qa))&&a.i&&(Ee(a.i,r,d.j),Fe(a.i,(w||"").includes("mp2t")));case 8:if(A.length)a.D.onMetadata(A,r,d?d.endTime:null);case 7:f&&b==n.qa&&(a.i||hq(a,"application/cea-608",!1),a.J||(L=w.split(";",1)[0],a.J=new Qc(L)),d?(P=Uc(a.J,c),P.length&&Je(a.i,P,r)):a.J.init(c,h,m));if(!a.m.has(b)){ja.A(11);break}return ja.h(a.m.get(b).transmux(c,e,d,a.j.duration,b),12);case 12:Q=ja.j,ArrayBuffer.isView(Q)?c=Q:(M=Q,M.init!=null&&(W=M.init,uq(a,b,function(){yq(a,b,W,r,e,!0)},d?
d.S()[0]:null)),c=M.data);case 11:c=zq(a,e,c,d,b);if(!a.M.has(b)){ja.A(13);break}ha=me(a.F.get(b))=="mp4";I=a.D.ec();if(!ha||!I){ja.A(13);break}U=d===null;T=a.M.get(b);return ja.h(no(T,c,U,I),15);case 15:c=ja.j;case 13:if(!d||!a.P||b==n.Ra){ja.A(16);break}if(!g&&!h){ja.A(16);break}Y=d.startTime;if(a.Z!="HLS"||a.o||b!=n.X||!a.l.has(n.qa)){ja.A(18);break}return ja.h(a.ba.promise,19);case 19:fa=ja.j,Math.abs(fa)>.15&&(Y-=fa);case 18:uq(a,b,function(){return wq(a,b)},null),uq(a,b,function(){return xq(a,
b,Y)},null);case 16:return ja.h(uq(a,b,function(){yq(a,b,c,r,e,!d)},d?d.S()[0]:null),20);case 20:return ja.return({yc:v})}})}function Aq(a,b){var c=nq(a,"video")||0;He(a.i,b,c)}function Bq(a){a.i&&He(a.i,"",0)}
q.remove=function(a,b,c,d){var e=this,f,g;return G(function(h){return h.i==1?(f=Ac,a==f.qa&&e.J&&(e.J.remove(d),g=e.i.h||0,e.i.remove(g,c,!0)),a==f.Ra?h.h(e.i.remove(b,c),0):c>b?h.h(uq(e,a,function(){return Cq(e,a,b,c)},null),5):h.A(0)):e.o?h.h(uq(e,f.X,function(){return Cq(e,f.X,b,c)},null),0):h.A(0)})};
function Dq(a,b){var c;return G(function(d){return d.i==1?(c=Ac,b==c.Ra?a.i?d.h(a.i.remove(0,Infinity),0):d.return():b===c.qa&&a.J&&a.i?d.h(a.i.remove(0,Infinity,!0),4):d.A(4)):d.i!=6?d.h(uq(a,b,function(){return Cq(a,b,0,a.j.duration)},null),6):a.o?d.h(uq(a,c.X,function(){return Cq(a,c.X,0,a.j.duration)},null),0):d.A(0)})}
q.flush=function(a){var b=this,c;return G(function(d){return d.i==1?(c=Ac,a==c.Ra?d.return():d.h(uq(b,a,function(){b.h.currentTime-=.001;jq(b,a)},null),2)):b.o?d.h(uq(b,c.X,function(){var e=c.X;b.h.currentTime-=.001;jq(b,e)},null),0):d.A(0)})};
function Eq(a,b,c,d,e,f,g,h,k){var l,m,n;return G(function(p){if(p.i==1){l=Ac;if(b==l.Ra)return f||Ee(a.i,c),Ge(a.i,d,e),p.return();m=[];return p.h(Fq(a,b,g,h,k),2)}n=p.j;n||(m.push(uq(a,b,function(){return wq(a,b)},null)),a.o&&m.push(uq(a,l.X,function(){return wq(a,l.X)},null)));f||(m.push(uq(a,b,function(){return xq(a,b,c)},null)),a.o&&m.push(uq(a,l.X,function(){return xq(a,l.X,c)},null)));if(d!=0||e!=Infinity)m.push(uq(a,b,function(){return Gq(a,b,d,e)},null)),a.o&&m.push(uq(a,l.X,function(){return Gq(a,
l.X,d,e)},null));return m.length?p.h(Promise.all(m),0):p.A(0)})}function Hq(a,b,c){var d,e;return G(function(f){if(f.i==1){d=Ac;if(b==d.Ra||!a.P||(e=nq(a,b))&&Math.abs(e-c)<.15)return f.return();uq(a,b,function(){return wq(a,b)},null);a.o&&uq(a,d.X,function(){return wq(a,d.X)},null);return f.h(uq(a,b,function(){return xq(a,b,c)},null),2)}return a.o?f.h(uq(a,d.X,function(){return xq(a,d.X,c)},null),0):f.A(0)})}
q.endOfStream=function(a){var b=this;return G(function(c){return c.h(Iq(b,function(){eq(b)||fq(b)||(a?b.j.endOfStream(a):b.j.endOfStream())}),0)})};q.qc=function(a){var b=this;return G(function(c){return c.h(Iq(b,function(){if(b.B.durationReductionEmitsUpdateEnd&&a<b.j.duration)for(var d=t(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:Promise.withResolvers(),uri:null};b.u.get(e).unshift(f)}b.j.duration=a;b.Aa=a}),0)})};q.getDuration=function(){return this.j.duration};
function Jq(a,b,c){G(function(d){if(!qq(a)||a.j.duration!==Infinity)return d.return();a.Ya=!0;return d.h(Iq(a,function(){qq(a)&&a.j.duration===Infinity&&a.j.setLiveSeekableRange(b,c)}),0)})}function Kq(a){G(function(b){if(!qq(a)||!a.Ya||a.j.duration!==Infinity)return b.return();a.Ya=!1;return b.h(Iq(a,function(){qq(a)&&a.j.duration===Infinity&&a.j.clearLiveSeekableRange()}),0)})}
function yq(a,b,c,d,e,f){f=f===void 0?!1:f;a.H&&Cc(a.H,c,d,e);d=f;d=d===void 0?!1:d;d=(new Map).set("data",c).set("contentType",b).set("isInitData",d);d=new nj("bufferappending",d);a.D.onEvent(d);a.l.get(b).appendBuffer(c)}function Cq(a,b,c,d){if(d<=c)jq(a,b);else{if(a.H){var e=a.H;b==="video"&&e.h&&e.h.flushBuffer(c,d)}a.l.get(b).remove(c,d)}}function wq(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;jq(a,b)}
function xq(a,b,c){c<0&&(c+=.001);a.l.get(b).timestampOffset=c;jq(a,b)}function Gq(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;jq(a,b)}function jq(a,b){if(a.K||a.G.h){var c=a.u.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.u.set(b,[]))}else if(c=a.u.get(b)[0])c.p.resolve(),Lq(a,b)}
function uq(a,b,c,d){Oj(a.G);c={start:c,p:Promise.withResolvers(),uri:d};a.u.get(b).push(c);a.u.get(b).length==1&&Mq(a,b);return c.p.promise}
function Iq(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C;return G(function(z){switch(z.i){case 1:Oj(a.G);c=[];d=Array.from(a.l.keys());e=new Map;f=t(d);g=f.next();for(h={};!g.done;h={ready:void 0},g=f.next())k=g.value,h.ready=Promise.withResolvers(),l={start:function(B){return function(){return B.ready.resolve()}}(h),p:h.ready,uri:null},m=a.u.get(k),m.push(l),c.push(h.ready.promise),e.set(k,l),m.length==1&&l.start();z.o(2);return z.h(Promise.all(c),4);case 4:z.u(3);break;case 2:n=z.m();if(a.G.h){p=
t(d);for(u=p.next();!u.done;u=p.next())r=u.value,v=a.u.get(r),e.has(r)&&bb(v,e.get(r));return z.return()}throw n;case 3:return z.o(5,6),z.h(b(),6);case 6:z.F();w=t(d);for(y=w.next();!y.done;y=w.next())x=y.value,Lq(a,x);z.G(0);break;case 5:throw A=z.m(),C=a.h.error?zb(a.h.error):"No error in the media element",new K(2,3,3015,A,C,null);}})}function Lq(a,b){a.u.get(b).shift();Mq(a,b)}
function Mq(a,b){var c=a.u.get(b)[0];if(c)try{c.start()}catch(d){d.name=="QuotaExceededError"?c.p.reject(new K(2,3,3017,b)):kq(a)?c.p.reject(new K(2,3,3015,d,a.h.error?zb(a.h.error):"No error in the media element",c.uri)):c.p.reject(new K(2,3,3024,b)),Lq(a,b)}}function Nq(a,b){a.oa=b;a.i&&(a.i.l=b)}
function zq(a,b,c,d,e){if(me(a.F.get(e))!="mp4")return c;var f=d===null,g=a.Ma.get(e),h=a.D.rd(),k=!1;d&&d.$&&(k=d.$.encrypted);d=d?d.S()[0]:null;var l=nb();a.B.correctEc3Enca&&f&&e==="audio"&&(c=kp(c));var m;if(m=f)if(l.Da()!="CHROMIUM")m=!1;else{m=null;var n=navigator.userAgent.match(/Chrome\/(\d+)/);n&&(m=parseInt(n[1],10));m=b.type==="video"&&m!=null&&m<94&&b.supplementalCodecs!=b.codecs&&/dvh1|dvhe/.test(b.supplementalCodecs)}m&&(c=lp(c));a.B.insertFakeEncryptionInInit&&g&&l.ad(h,e)&&(f?c=mp(b,
c,d,h):!k&&l.Yh(e)&&(c=pp(c)));f&&l.Hd()&&(c=sp(c));!f&&b.isIframe&&a.B.repairIFrames&&(c=tp(c));return c}function Oq(a,b,c,d){return uq(a,b,function(){if(b!==yc){a.F.get(b);var e=nb(),f=a.D.rd();e.fb(f)&&(a.m.has(b)&&(a.m.get(b).destroy(),a.m.delete(b)),d&&a.m.set(b,d),e=c+a.B.addExtraFeaturesToSourceBuffer(c),a.l.get(b).changeType(e),a.F.set(b,c));jq(a,b)}},null)}
function Pq(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F;return G(function(E){if(E.i==1){if(a.K||a.ma)return E.return();c=Ac;a.K=!0;a.o=!1;d=a.h.currentTime;e=a.h.autoplay;a.h.paused||(a.Na=!0);a.eb&&(a.h.autoplay=!1);E.K(2);a.C.Pa();f=t(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=t(a.M.values());for(l=k.next();!l.done;l=k.next())m=l.value,m.destroy();n=t(a.l.values());for(p=n.next();!p.done;p=n.next()){u=p.value;try{a.j.removeSourceBuffer(u)}catch(H){}}a.m.clear();
a.l.clear();a.M.clear();r=a.j.duration;a.N=Promise.withResolvers();a.j=Zp(a,a.N);return E.h(a.N.promise,4)}if(E.i!=2){!isNaN(r)&&r?a.j.duration=r:!isNaN(a.Aa)&&a.Aa&&(a.j.duration=a.Aa);v=Promise.withResolvers();w=a.j.sourceBuffers;y=b.size;x=0;A=function(){x++;x===y&&(v.resolve(),a.C.mb(w,"addsourcebuffer",A))};a.C.I(w,"addsourcebuffer",A);C=t(b.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=b.get(B),gq(a,B,D,D.codecs);(F=b.get(c.X))&&F.isAudioMuxedInVideo&&(a.o=!0);a.o&&!a.u.has(c.X)&&a.u.set(c.X,
[]);return E.h(v.promise,2)}E.F();a.K=!1;Oj(a.G);a.C.Ja(a.h,"loadedmetadata",function(){a.G.h||(a.h.currentTime=d)});a.C.Ja(a.h,"canplaythrough",function(){a.G.h||(a.h.autoplay=e,a.Na&&(a.Na=!1,a.h.play()))});return E.G(0)})}function Qq(a,b){return Iq(a,function(){return Pq(a,b)})}
function Rq(a,b,c,d){c=="video/mp4"&&(d=ue(d,c));var e=!1,f=wc("audio",(d||"").split(",")),g=wc("video",(d||"").split(",")),h=g;b=="audio"&&(h=f);h||(h=d);var k=ie(c,h),l=qe(a.F.get(b)),m=a.B.forceTransmux;!Fl(k)||!a.P&&je.includes(k)?m=!0:m||c==l||(m=!nb().Te()&&je.includes(c));if(m&&(h=ke(c,h),l=fe(h))){var n=new Rp(l(),a.B.transmuxWorkerUrl);f&&g&&(e=!0);k=n.convertCodecs(b,h)}!n&&b==="video"&&f&&(k=ie(c,d));a=ne(re(k));return{Lb:n,Ek:e,Zg:qe(k),codec:a,mimeType:k}}
function Sq(a,b,c,d,e){if(b==yc)return{type:Tq,Ke:c,Lb:null};var f=ne(re(a.F.get(b))),g=qe(a.F.get(b)),h=Rq(a,b,c,d),k=h.Lb,l=h.Ek,m=h.Zg,n=h.codec;h=h.mimeType;var p=!0;l&&a.F.has("audio")&&(c=Rq(a,"audio",c,d),d=ne(re(a.F.get("audio"))),p=qe(a.F.get("audio")),p=d==c.codec&&p==c.Zg,c.Lb&&c.Lb.destroy());if(f===n&&g===m&&p)return{type:Tq,Ke:h,Lb:k};f=!0;if(a.o&&!e.has("audio")||l&&k&&!a.m.has(b))f=!1;b=nb();e=a.D.rd();if(f&&a.B.codecSwitchingStrategy==="smooth"&&b.fb(e))return{type:Uq,Ke:h,Lb:k};
k&&k.destroy();return{type:Vq,Ke:h,Lb:null}}
function Fq(a,b,c,d,e){var f,g,h,k,l,m;return G(function(n){if(n.i==1){f=Ac;g=Sq(a,b,c,d,e);h=g.type;k=g.Lb;l=g.Ke;if(m=e.get(f.X))a.o=m.isAudioMuxedInVideo;if(h==Tq)return a.m.has(b)&&!k?(a.m.get(b).destroy(),a.m.delete(b)):!a.m.has(b)&&k?a.m.set(b,k):k&&(a.m.has(b)&&a.m.get(b).transmux!==k.transmux?(a.m.get(b).destroy(),a.m.set(b,k)):k.destroy()),n.return(!1);if(h==Uq)return n.h(Oq(a,b,l,k),3);if(h!=Vq)return n.A(3);k&&k.destroy();return n.h(Qq(a,e),3)}return n.return(!0)})}
function Wq(a,b,c,d,e){a=Sq(a,b,c,d,e);a.Lb&&a.Lb.destroy();return a.type==Vq}function qq(a){return!a.j||a.G.h||a.h.error||a.ma||a.K||fq(a)?!1:!0}var aq=window.URL.createObjectURL,iq="sequence",vq={vl:iq,Fi:"segments"},Tq="none",Vq="reset",Uq="changeType";function Xq(a){var b=this;this.h=a;this.l=!1;this.i=this.h.Uf();this.j=new Ke(function(){b.h.isPaused()||b.h.Wj(b.i*.25)})}Xq.prototype.release=function(){this.set(this.Pc());this.j&&(this.j.stop(),this.j=null);this.h=null};Xq.prototype.set=function(a){this.i=a;Yq(this)};Xq.prototype.Pc=function(){return this.h.Pc()};function Yq(a){a.j.stop();var b=a.l?0:a.i;if(b>=0&&b<=16)try{a.h.Uf()!=b&&a.h.ii(b);return}catch(c){}a.j.Ka(.25);a.h.Uf()!=0&&a.h.ii(0)};function Zq(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=$q.value().get(b),c.Ja(a,b,d))}var $q=new mb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function ar(a,b,c,d){var e=this;this.h=a;this.o=b;this.B=c;this.l=null;this.m=function(){e.l==null&&(e.l=d());return e.l};this.u=!1;this.i=new gb;this.j=new br(a);Zq(this.h,HTMLMediaElement.HAVE_METADATA,this.i,function(){cr(e,e.m())})}ar.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.j!=null&&(this.j.release(),this.j=null);this.o=function(){};this.h=null};function dr(a){return a.u?a.h.currentTime:a.m()}
function er(a,b){a.h.readyState>0?fr(a.j,b):(a.l=b,Zq(a.h,HTMLMediaElement.HAVE_METADATA,a.i,function(){cr(a,a.m())}))}function cr(a,b){Math.abs(a.h.currentTime-b)<.001?gr(a):(a.i.Ja(a.h,"seeking",function(){gr(a)}),fr(a.j,b))}function gr(a){a.u=!0;a.i.I(a.h,"seeking",function(){return a.o()});a.B(a.h.currentTime)}
function br(a){var b=this;this.h=a;this.o=10;this.l=this.m=this.j=0;this.i=new Ke(function(){b.j<=0?b.i.stop():b.h.currentTime!=b.m||b.h.currentTime===b.l?b.i.stop():(b.h.currentTime=b.l,b.j--)})}br.prototype.release=function(){this.i&&(this.i.stop(),this.i=null);this.h=null};function fr(a,b){a.m=a.h.currentTime;a.l=b;a.j=a.o;a.h.currentTime=b;a.i.Ka(.1)};function hr(a){this.h=a;this.j=!1;this.i=null;this.l=new gb}q=hr.prototype;q.ready=function(){function a(){if(b.i==null||b.i==0&&b.h.duration!=Infinity)b.j=!0;else{var c=b.h.currentTime,d=null;if(typeof b.i==="number")d=b.i;else if(b.i instanceof Date){var e=ir(b);e!==null&&(d=b.i.getTime()/1E3-e,d=jr(b,d))}d==null?b.j=!0:(d<0&&(d=Math.max(0,c+d)),c!=d?(b.l.Ja(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0)}}var b=this;Zq(this.h,HTMLMediaElement.HAVE_FUTURE_DATA,this.l,function(){a()})};
q.release=function(){this.l&&(this.l.release(),this.l=null);this.h=null};q.Ye=function(a){this.i=this.j?this.i:a};q.jd=function(){var a=this.j?this.h.currentTime:this.i;a instanceof Date&&(a=a.getTime()/1E3-(ir(this)||0),a=jr(this,a));return a||0};q.Qg=function(){return 0};q.Og=function(){return 0};q.Pg=function(){return!1};q.Qh=function(){};q.Ah=function(){var a=wp(this.h.buffered);return a!=null&&a>=this.h.duration-1};
function ir(a){return a.h.getStartDate&&(a=a.h.getStartDate().getTime(),!isNaN(a))?a/1E3:null}function jr(a,b){a=a.h.seekable;a.length>0&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
function kr(a,b,c,d,e,f,g){var h=this;this.i=a;this.h=b.presentationTimeline;this.m=c;this.B=e;this.u=null;this.j=new Cp(a,b.presentationTimeline,c,f,g);this.l=new ar(a,function(){a:{var k=h.j;k.u=!0;k.C=!1;k.j&&k.j.Ka(k.i.gapJumpTimerTime);Ep(k);var l=dr(h.l);k=lr(h,l);if(!Hl()&&Math.abs(k-l)>.001){l=!1;var m=nb().ai();if(m){var n=Date.now()/1E3;if(!h.u||h.u<n-m)h.u=n,l=!0}else l=!0;if(l){er(h.l,k);k=void 0;break a}}h.B();k=void 0}return k},function(k){var l=h.j;l.h.seeking&&!l.u&&(l.u=!0,l.o=k);
l.j&&l.j.Ka(l.i.gapJumpTimerTime);Ep(l)},function(){return mr(h,d)});this.o=new Ke(function(){if(h.i.readyState!=0&&!h.i.paused){var k=dr(h.l),l=h.h.xb(),m=h.h.kb();m-l<3&&(l=m-3);k<l&&(k=lr(h,k),h.i.currentTime=k)}})}q=kr.prototype;q.ready=function(){this.o.Ka(.25)};q.release=function(){this.l&&(this.l.release(),this.l=null);this.j&&(this.j.release(),this.j=null);this.o&&(this.o.stop(),this.o=null);this.i=this.l=this.h=this.m=null;this.B=function(){}};q.Ye=function(a){er(this.l,mr(this,a))};
q.jd=function(){var a=dr(this.l);return this.i.readyState>0&&!this.i.paused?nr(this,a):a};q.Qg=function(){return this.j.H};q.Og=function(){return this.j.G};q.Pg=function(){return this.j.D};function mr(a,b){b==null?b=a.h.ra()?a.h.kb():a.h.xb():b instanceof Date?b=b.getTime()/1E3-(a.h.l||a.h.i):b<0&&(b=a.h.kb()+b);return or(a,nr(a,b))}q.Qh=function(){this.j.Xc()};q.Ah=function(){if(this.h.ra()){var a=this.h.td(),b=wp(this.i.buffered);if(b!=null&&b>=a)return!0}return!1};
function or(a,b){var c=a.h.getDuration();return b>=c?c-a.m.durationBackoff:b}function lr(a,b){var c=a.m.rebufferingGoal,d=a.m.safeSeekOffset,e=a.h.xb(),f=a.h.kb(),g=a.h.getDuration();f-e<3&&(e=f-3);var h=a.h.sd(c),k=a.h.sd(d);c=a.h.sd(c+d);return b>=g?or(a,b):b>f?f-a.m.safeSeekEndOffset:b<e?a.h.isLive()&&a.m.returnToEndOfLiveWindowWhenOutside?f-a.m.safeSeekEndOffset:xp(a.i.buffered,k)?k:c:b>=h||xp(a.i.buffered,b)?b:c}function nr(a,b){var c=a.h.xb();if(b<c)return c;a=a.h.kb();return b>a?a:b};function pr(){this.i=this.h=null}pr.prototype.configure=function(a){this.h=a};pr.prototype.getConfiguration=function(){return this.h};
pr.prototype.create=function(a){a=qr(a,this.h.preferredAudio,this.h.audioCodec,this.h.activeAudioCodec);a:for(var b=t(this.h.preferredVideo),c=b.next();!c.done;c=b.next()){c=c.value;var d=a;if(c.role&&(d=rr(d,c.role),!d.length))continue;if(c.language&&(d=sr(d,c.language),!d.length))continue;if(c.label&&(d=tr(d,c.label),!d.length))continue;if(c.hdrLevel&&(d=ur(d,c.hdrLevel),!d.length))continue;if(c.layout&&(d=vr(d,c.layout),!d.length))continue;if(c.codec)if(c=wr(d,c.codec),c.length)d=c;else continue;
if(d.length){a=d;break a}}b=nb();c=this.h.keySystem;b=this.h.codecSwitchingStrategy=="smooth"&&b.fb(c);return this.i=new go(a[0],a,!b)};pr.prototype.getLastAdaptationSet=function(){return this.i};
function qr(a,b,c,d){b=t(b);for(var e=b.next(),f={};!e.done;f={Mc:void 0},e=b.next()){e=e.value;var g=a;if(e.language&&(g=xr(g,e.language),!g.length))continue;if(e.role&&(g=yr(g,e.role),!g.length))continue;if(e.label&&(g=zr(g,e.label),!g.length))continue;if(e.channelCount&&(g=Ar(g,e.channelCount),!g.length))continue;f.Mc=[];e.codec&&f.Mc.push(e.codec);c&&f.Mc.push(c);d&&f.Mc.push(d);var h=f.Mc.filter(function(m){return function(n,p){return m.Mc.indexOf(n)===p}}(f));if(h.length){f=!1;h=t(h);for(var k=
h.next();!k.done;k=h.next())if(k=Br(g,k.value),k.length){g=k;f=!0;break}if(!f&&e.codec)continue}if(e.spatialAudio!==void 0)if(e=Cr(g,e.spatialAudio),e.length)g=e;else continue;if(g.length)return g}var l=[];c&&l.push(c);d&&l.push(d);c=l.filter(function(m,n){return l.indexOf(m)===n});if(c.length)for(c=t(c),d=c.next();!d.done;d=c.next())if(d=Br(a,d.value),d.length){a=d;break}c=a.filter(function(m){return m.primary});return c.length?c:a}
function xr(a,b){b=kc(b);var c=sc(b,a.map(function(d){return rc(d)}));return c?a.filter(function(d){return c==rc(d)}):[]}function yr(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):c.audio.roles.length==0:!1})}function rr(a,b){return a.filter(function(c){return c.video?b?c.video.roles.includes(b):c.video.roles.length==0:!1})}function sr(a,b){var c=kc(b);return a.filter(function(d){return d.video&&d.video.language?kc(d.video.language)==c:!1})}
function zr(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function tr(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function Ar(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 ur(a,b){if(b=="AUTO"){var c=a.some(function(d){return d.video&&d.video.hdr&&d.video.hdr=="HLG"?!0:!1});b=nb().hc(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function vr(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Cr(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Br(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})}
function wr(a,b){return a.filter(function(c){return c.video&&c.video.codecs!=b?!1:!0})};function Dr(a){oj.call(this);this.h=new Map;this.j=a;this.i=null}ta(Dr,oj);Dr.prototype.release=function(){this.h.clear();this.i&&(this.i.stop(),this.i=null);oj.prototype.release.call(this)};function Er(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 nj("regionadd",new Map([["region",b]])),a.dispatchEvent(b),Fr(a))}
function Fr(a){a.i||(a.i=(new Ke(function(){for(var b=a.j(),c=t(a.h),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;e.endTime<b.start&&(a.h.delete(d),d=new nj("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.i&&(a.i.stop(),a.i=null)})).Ka(2))};function Gr(a,b,c,d,e,f){function g(h,k){return k.fastSwitching&&h.Bc&&h.yd?!1:!0}this.o=a;this.j=b;this.m=c;this.h=new Map;this.l=new Map;this.i=null;this.u=d;this.C=e||g;this.B=f||function(){return 1}}function Hr(a,b){a.m=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.h=b}
function Ir(a,b,c){c=c===void 0?!1:c;if(!a.j.segmentIndex)return Promise.resolve();a.i||(a.i=a.j.segmentIndex.Eb(b,!0,a.u));if(!a.i)return Promise.resolve();c&&a.i.next();b=[];c=Math.abs(a.B());for(c=Math.ceil(a.o*c);a.h.size<c;){var d=a.i.next().value;if(!d)break;var e=!0;d.isPreload()&&d.endByte!=null&&(e=!1);d.Gb()==2&&(e=!1);d.uc(!1)&&(e=!1);e&&d.$&&b.push(Jr(a,d.$));e&&!a.h.has(d)&&(e=new Kr(a.m),b.push(Lr(e,d,a.j)),a.h.set(d,e));if(!a.C(d,a.j))break}Mr(a);return Promise.all(b)}
function Jr(a,b){if(!a.j.segmentIndex||b.uc()||Array.from(a.l.keys()).some(function(e){return ll(e,b)}))return Promise.resolve();var c=new Kr(a.m),d=Lr(c,b,a.j);a.l.set(b,c);return d}function Nr(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Or(a,c)}function Pr(a,b){b=b===void 0?!0:b;Nr(a,a.h);b&&Nr(a,a.l);a.i=null}Gr.prototype.wb=function(a,b){b=b===void 0?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Or(this,d);b&&Mr(this)};
Gr.prototype.cd=function(a){this.u=a;this.i&&this.i.cd(a)};function Mr(a){if(a.h.size)for(var b=Array.from(a.h.keys()),c=t(a.l.keys()),d=c.next(),e={};!d.done;e={Wf:void 0},d=c.next())e.Wf=d.value,b.some(function(f){return function(g){return ll(g.$,f.Wf)}}(e))||Or(a,e.Wf)}function Qr(a,b){a.o=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Or(a,d)}Mr(a)}function Rr(a,b){b&&b!==a.j&&(Pr(a),a.j=b)}
function Or(a,b){var c=a.h;b instanceof kl&&(c=a.l);a=c.get(b);c.delete(b);a&&a.abort()}function Kr(a){this.h=a;this.Ed=this.Dg=null}function Lr(a,b,c){var d=[];a.Ed=a.h(b,c,function(e){var f;return G(function(g){if(!a.Dg)return d.push(e),g.return();f=e;d.length>0&&(d.push(e),f=Sb(d),d=[]);return g.h(a.Dg(f),0)})});return a.Ed.promise.catch(function(e){return e instanceof K&&e.code==7001?Promise.resolve():Promise.reject(e)})}Kr.prototype.abort=function(){this.Ed&&this.Ed.abort()};function Sr(a,b){var c=this;this.h=b;this.l=a;this.j=null;this.V=new Map;this.C=1;this.D=this.u=null;this.ea=0;this.i=new Map;this.J=!1;this.ma=null;this.F=!1;this.m=new Nj(function(){return Tr(c)});this.Z=Date.now()/1E3;this.o=new Map;this.ba={projection:null,hfov:null};this.sa=0;this.oa=Infinity;this.H=null;this.U=[];this.P=new gb;this.B=new Ke(function(){if(c.l&&c.h)if(c.l.presentationTimeline.ra()){var d=c.l.presentationTimeline.xb(),e=c.l.presentationTimeline.kb();e-d>1?Jq(c.h.T,d,e):Kq(c.h.T)}else Kq(c.h.T),
c.B&&c.B.stop();else c.B&&c.B.stop()});this.M=this.G=null;this.L=!1;this.N=new Ke(function(){var d=c.h.video;!d.ended&&c.G&&(c.M=c.G,c.L=!0,d.currentTime=c.G,c.G=null)});this.K=new gb}q=Sr.prototype;q.destroy=function(){return this.m.destroy()};
function Tr(a){var b,c,d,e,f,g,h,k,l,m,n;return G(function(p){if(p.i==1){(b=a.B)==null||b.stop();a.B=null;(c=a.P)==null||c.release();a.P=null;(d=a.N)==null||d.stop();a.N=null;(e=a.K)==null||e.release();a.K=null;f=[];g=t(a.i.values());for(h=g.next();!h.done;h=g.next())k=h.value,Ur(k),f.push(Vr(k)),k.aa&&(Pr(k.aa),k.aa=null);l=t(a.o.values());for(m=l.next();!m.done;m=l.next())n=m.value,Pr(n);return p.h(Promise.all(f),2)}a.i.clear();a.o.clear();a.h=null;a.l=null;a.j=null;a.G=null;p.l()})}
q.configure=function(a){this.j=a;this.ma=new fj({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.aa&&(Pr(b.aa),b.aa=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Pr(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(yc))&&
b.aa&&(Pr(b.aa),b.aa=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.aa&&(Pr(b.aa),b.aa=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.aa?(Qr(c.aa,a.segmentPrefetchLimit),a.segmentPrefetchLimit>0||(Pr(c.aa),c.aa=null)):a.segmentPrefetchLimit>0&&(c.aa=Wr(this,c.stream));a.disableAudioPrefetch||Xr(this)};function Yr(a,b,c){a.l.presentationTimeline.ra()||(a.sa=b,a.oa=c)}
q.start=function(a){var b=this;return G(function(c){if(c.i==1)return c.h(Zr(b,a||new Map),2);Oj(b.m);b.J=!0;c.l()})};function $r(a,b){var c,d,e,f,g,h,k;G(function(l){switch(l.i){case 1:return c=Ac,a.ea++,d=a.ea,l.o(2),l.h(Dq(a.h.T,c.Ra),4);case 4:l.u(3);break;case 2:if(e=l.m(),a.h)a.h.onError(e);case 3:f=ie(b.mimeType,b.codecs),hq(a.h.T,f,b.external),g=a.h.T.oa,(h=g.isTextVisible())&&a.ea==d&&(k=as(a,b),a.i.set(c.Ra,k),bs(a,k,0)),l.l()}})}
function cs(a){var b=a.i.get(yc);b&&(Ur(b),Vr(b).catch(function(){}),a.H=a.i.get(yc),a.i.delete(yc),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.D=null}
function ds(a,b){for(var c=a.h.Ta()<0,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.na&&e.na.cd(c),e.aa&&e.aa.cd(c),c&&(e.na=null,e.endOfStream=!1,e.za||e.bb||e.sb||e.rb||bs(a,e,0));d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.cd(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.mc&&(es(a,b,!1,0,!1),c.mc=d);else if(b=c.mc)c.mc=null,es(a,b,!0,0,!1)}
function fs(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.u=b;a.J&&(b.video&&es(a,b.video,c,d,e,f),b.audio&&es(a,b.audio,c,d,e,f))}function gs(a,b){G(function(c){if(c.i==1)return a.H=null,a.D=b,a.J?b.segmentIndex?c.A(2):c.h(b.createSegmentIndex(),2):c.return();es(a,b,!0,0,!1);c.l()})}function hs(a){var b=a.i.get(yc);b&&es(a,b.stream,!0,0,!0)}
function is(a,b){for(var c=t(a.V.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.V.delete(d))}}
function es(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=yc?g&&(g.mc&&(b.trickModeVideo?(g.mc=b,b=b.trickModeVideo):g.mc=null),g.stream!=b||e)&&(a.o.has(b)?g.aa=a.o.get(b):g.aa&&Rr(g.aa,b),b.type==yc&&g.stream!=b&&(e=ie(b.mimeType,b.codecs),hq(a.h.T,e,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&(g.za?a.V.getOrInsert("("+g.type+":"+g.stream.id+")",g.stream.closeSegmentIndex):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream=b,g.na=null,g.hf=
!!f,b.dependencyStream?g.bc=as(a,b.dependencyStream):g.bc=null,js(a),e&&(g.cb=null,g.Sb=null,g.Rb=null,b.isAudioMuxedInVideo&&(b=null,g.type==="video"?b=a.i.get("audio"):g.type==="audio"&&(b=a.i.get("video")),b&&(Vr(b).catch(function(){}),b.cb=null,b.Sb=null,b.Rb=null,ks(a,b),ls(a,b).catch(function(h){if(a.h)a.h.onError(h)})))),c?g.sb?g.ed=!0:g.za?(g.rb=!0,g.Lc=d,g.ed=!0):(Ur(g),ms(a,g,!0,d).catch(function(h){if(a.h)a.h.onError(h)})):g.za||g.bb||bs(a,g,0),ls(a,g).catch(function(h){if(a.h)a.h.onError(h)})):
$r(a,b)}
function ls(a,b){var c,d,e;return G(function(f){if(f.i==1){if(!b.operation)return f.return();c=b.stream;d=b.operation;return c.segmentIndex?f.A(2):f.h(c.createSegmentIndex(),2)}if(f.i!=4)return e=c.dependencyStream,!e||e.segmentIndex?f.A(4):f.h(e.createSegmentIndex(),4);if(b.operation!=d||b.stream!=c)return f.return();var g=a.h.Fb();var h=nq(a.h.T,b.type),k=b.stream.segmentIndex.find(ns(a,b,g)),l=k==null?null:b.stream.segmentIndex.get(k);k=l?ol(l):null;l&&!k&&(k=(l.endTime-l.getStartTime())*(b.stream.bandwidth||
a.u.bandwidth)/8);k?((l=l.$)&&(k+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=a.h.getBandwidthEstimate(),g=k*8/l<(h||0)-g-a.j.rebufferingGoal||b.operation.i.h>k?!0:!1):g=!0;g&&b.operation.abort();f.l()})}
q.Ec=function(){if(this.h){var a=this.h.Fb(),b=this.M!=null&&Xp(a,this.M,.1);this.M=null;b||(this.L=!1);for(var c=t(this.i.keys()),d=c.next();!d.done;d=c.next()){var e=d.value;d=this.i.get(e);var f;if(f=!b)f=this.h.T,e==yc?(f=f.i,f=f.h==null||f.i==null?!1:a>=f.h&&a<f.i):(f=mq(f,e),f=xp(f,a)),f=!f;if(f){this.Z=0;d.aa&&(d.aa.i=null);if(d.type==="audio"){f=t(this.o.values());for(var g=f.next();!g.done;g=f.next())g.value.i=null}d.na=null;(nq(this.h.T,e)!=null||d.za)&&ks(this,d);d.operation&&(d.operation.abort(),
d.operation=null);e===yc&&(e=this.h.T,e.J&&e.J.h.clear());d.Ec=!0}!b||d.sb||d.za||d.bb||bs(this,d,0)}os(this)&&ps(this)}};function ks(a,b){b.sb||b.rb||(b.za?(b.rb=!0,b.Lc=0):lq(a.h.T,b.type)==null?b.bb==null&&bs(a,b,0):(Ur(b),ms(a,b,!1,0).catch(function(c){if(a.h)a.h.onError(c)})))}
function Zr(a,b){var c,d,e,f,g,h,k,l;return G(function(m){if(m.i==1){if(!a.u)throw new K(2,5,5006);c=qs(a,!0);d=a.h.T;return m.h(d.init(c,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Oj(a.m);a.updateDuration().catch(function(){});e=t(c.keys());for(f=e.next();!f.done;f=e.next())if(g=f.value,h=c.get(g),!a.i.has(g)){k=as(a,h);if(l=b.get(h.id))Hr(l,function(n,p,u){return rs(n,p,u||null,a.j.retryParameters,a.h.Ac)}),k.aa=l;a.i.set(g,k);bs(a,k,0)}js(a);m.l()})}
function as(a,b){var c={stream:b,type:b.type,na:null,aa:Wr(a,b),Ea:null,cb:null,Ge:null,Sb:null,Rb:null,Ee:null,Fe:null,mc:null,endOfStream:!1,za:!1,bb:null,rb:!1,Lc:0,ed:!1,sb:!1,Ec:!0,hf:!1,pg:!1,Sc:!1,operation:null,bc:null};b.dependencyStream&&(c.bc=as(a,b.dependencyStream));return c}
function Wr(a,b){if(a.l.type=="MSF"||b.type==="video"&&a.j.disableVideoPrefetch||b.type==="audio"&&a.j.disableAudioPrefetch||b.type===yc&&(b.mimeType=="application/cea-608"||b.mimeType=="application/cea-708")||b.type===yc&&a.j.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.aa)&&b===c.j?c:a.j.segmentPrefetchLimit>0?new Gr(a.j.segmentPrefetchLimit,b,function(d,e,f){return rs(d,e,f||null,a.j.retryParameters,a.h.Ac)},a.h.Ta()<0,a.h.Bk,a.h.Ta):null}
function Xr(a){for(var b=a.j.segmentPrefetchLimit,c=a.j.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={qb:void 0},e=d.next())if(f.qb=e.value,f.qb.audio)if(a.o.has(f.qb.audio)){if(e=a.o.get(f.qb.audio),Qr(e,b),!(b>0&&c.some(function(h){return function(k){return jc(h.qb.audio.language,k)}}(f)))){var g=a.i.get(f.qb.audio.type);e!==(g&&g.aa)&&Pr(e);a.o.delete(f.qb.audio)}}else b<=0||!c.some(function(h){return function(k){return jc(h.qb.audio.language,k)}}(f))||!(e=Wr(a,f.qb.audio))||
(f.qb.audio.segmentIndex||f.qb.audio.createSegmentIndex(),a.o.set(f.qb.audio,e))}q.updateDuration=function(){var a=this,b,c;return G(function(d){if(d.i==1)return b=Hl(),c=a.l.presentationTimeline.getDuration(),a.P.Pa(),c<Infinity?(b&&(a.B&&a.B.stop(),Kq(a.h.T)),d.h(a.h.T.qc(c),0)):b?d.h(a.h.T.qc(Infinity),5):(a.h.T.qc(4294967296),d.A(0));a.B&&(a.B.Xa(),a.P.Ja(a.h.video,"timeupdate",function(){a.B.Xa().Ka(.5)}));return d.A(0)})};
function ss(a,b){var c,d,e,f,g,h,k,l,m,n,p,u;return G(function(r){switch(r.i){case 1:Oj(a.m);c=Ac;if(b.za||b.bb==null||b.sb)return r.return();b.bb=null;if(!b.rb){r.A(2);break}return r.h(ms(a,b,b.ed,b.Lc),3);case 3:return r.return();case 2:is(a,b);if(b.stream.segmentIndex){r.A(4);break}d=b.stream;e=b.stream.codecs;f=b.stream.mimeType;r.o(5);return r.h(b.stream.createSegmentIndex(),7);case 7:r.u(6);break;case 5:return g=r.m(),r.h(ts(a,b,g),8);case 8:return r.return();case 6:if(b.type!==c.Ra||e==b.stream.codecs&&
f==b.stream.mimeType||(h=ie(b.stream.mimeType,b.stream.codecs),hq(a.h.T,h,b.stream.external)),d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.za||b.bb||bs(a,b,0),r.return();case 4:if(!b.bc){r.A(9);break}if(b.bc.stream.segmentIndex){r.A(9);break}r.o(11);return r.h(b.bc.stream.createSegmentIndex(),13);case 13:r.u(9);break;case 11:r.m();case 9:r.o(14);k=us(a,b);k!=null&&(bs(a,b,k),b.Sc=!1);r.u(15);break;case 14:return l=r.m(),r.h(ts(a,b,l),16);case 16:return r.return();case 15:if(b.type===
c.Ra)return r.return();m=[];b.stream&&!b.stream.isAudioMuxedInVideo&&m.push(b);n=b.type===c.X?c.qa:c.X;(p=a.i.get(n))&&p.stream&&!p.stream.isAudioMuxedInVideo&&m.push(p);if(!a.J||!m.every(function(v){return v.endOfStream})){r.A(0);break}return r.h(a.h.T.endOfStream(),18);case 18:Oj(a.m),u=a.h.T.getDuration(),u!=0&&u<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.qc(u),r.l()}})}
function us(a,b){if(vs(b))return Aq(a.h.T,b.stream.originalId||""),null;b.type==yc&&Bq(a.h.T);if(b.stream.isAudioMuxedInVideo&&b.type=="audio")return null;if(b.type!=yc&&fq(a.h.T))return ws(a,!0),null;var c=a.j.updateIntervalSeconds/Math.max(1,Math.abs(a.h.Ta()));if(!kq(a.h.T)&&b.type!=yc)return c/2;var d=a.h.Fb(),e=a.h.Ta()<0;if(b.type==="audio")for(var f=t(a.o.keys()),g=f.next();!g.done;g=f.next())g=a.o.get(g.value),g.wb(d,!0),Ir(g,d);f=ns(a,b,d);var h=e?pq(a.h.T,b.type,d):oq(a.h.T,b.type,d);b.type==
"video"&&!a.i.has("audio")&&a.h.T.l.has("audio")&&(g=e?pq(a.h.T,"audio",d):oq(a.h.T,"audio",d),h=Math.min(h,g));g=Math.max(1,Math.max(a.j.rebufferingGoal,a.j.bufferingGoal)*a.C);var k=a.l.presentationTimeline.ra()?Infinity:a.l.presentationTimeline.getDuration()-f,l=nq(a.h.T,b.type);if(!e&&k<1E-6&&l)return b.endOfStream=!0,b.type=="video"&&((c=a.i.get(yc))&&vs(c)&&(c.endOfStream=!0),(c=a.i.get("audio"))&&c.stream.isAudioMuxedInVideo&&(c.endOfStream=!0)),null;b.endOfStream=!1;if(e){var m=a.l.presentationTimeline.xb();
if(l!=null&&f<=m+1E-6)return null}if(h>0&&a.j.stopFetchingOnPause&&a.h.video.paused||h>=g)return c/2;m=!b.na;h=xs(a,b,d,l);if(!h){if(!a.l.presentationTimeline.ra()&&k<1E-6)return b.endOfStream=!0,b.type=="video"&&(c=a.i.get(yc))&&vs(c)&&(c.endOfStream=!0),null;a=Infinity;(b=b.Ea)&&(a=b.endTime-b.startTime);return Math.min(a/2,c)}k=b.cb;l=h.$;k&&l&&ll(l,k)&&(k.h=l.h);k=!1;m&&b.hf&&(k=!0,b.hf=!1);m=Infinity;l=-Infinity;for(var n=t(a.i.values()),p=n.next();!p.done;p=n.next())p=p.value,vs(p)||p.stream.isAudioMuxedInVideo||
p.na&&!p.na.current()||(p=ns(a,p,d),m=Math.min(m,p),l=Math.max(l,p));if((e?l-f:f-m)>=a.l.presentationTimeline.j)return c;b.aa&&b.na&&!a.o.has(b.stream)&&(b.aa.wb(h.startTime+.001),Ir(b.aa,h.startTime).catch(function(){}));if(os(a)&&ys(a,b,h))return null;zs(a,b,d,h,k).catch(function(){});b.bc&&As(a,b.bc,d,g);return null}function ns(a,b,c){return b.Ea?a.h.Ta()<0?b.Ea.startTime:b.Ea.endTime:c}
function xs(a,b,c,d){if(b.na){var e=b.na.current();e&&b.Ea&&(c=b.Ea.endTime,Xp(b.Ea.startTime,e.startTime,.002)&&Xp(c,e.endTime,.002)&&(e=b.na.next().value));return e}if(b.Ea||d)return(e=a.h.Ta()<0)?(a=lq(a.h.T,b.type),c=b.Ea?b.Ea.startTime:null,c!=null&&(a==null||c<a)&&(a=c),c=a!=null?a-.001:d):c=b.Ea?b.Ea.endTime:d,b.stream.segmentIndex&&(b.na=b.stream.segmentIndex.Eb(c,!1,e)),b.na&&b.na.next().value;d=a.l.sequenceMode||os(a)||a.l.type==="MSF"?0:a.j.inaccurateManifestTolerance;var f=Math.max(c-
d,0),g=a.h.T.getDuration();Math.abs(f-g)<1&&(d=1,f=Math.max(c-d,0));g=a.h.Ta()<0;a=null;d&&(b.stream.segmentIndex&&(b.na=b.stream.segmentIndex.Eb(f,!1,g)),a=b.na&&b.na.next().value);a||(b.stream.segmentIndex&&(b.na=b.stream.segmentIndex.Eb(c,!1,g)),a=b.na&&b.na.next().value);for(;((e=a)==null?void 0:e.Gb())===2;)d=c=void 0,a=(d=(c=b.na)==null?void 0:c.next().value)!=null?d:null;return a}
function zs(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D;return G(function(F){switch(F.i){case 1:f=Ac;g=b.stream;h=b.na;b.za=!0;F.o(2);if(d.Gb()==2)throw new K(1,1,1011);return F.h(Bs(a,b,d,e),4);case 4:Oj(a.m);if(a.F)return F.return();k=g.mimeType=="video/mp4"||g.mimeType=="audio/mp4";l=window.ReadableStream;m=a.j.lowLatencyMode&&a.l.isLowLatency;n={yc:null};if(m&&l&&k&&(a.l.type!="HLS"||d.B))return r=new Uint8Array(0),w=v=!1,x=function(E){var H,O,R,N,S;return G(function(L){switch(L.i){case 1:if(v)return L.return();
w=!0;Oj(a.m);if(a.F)return L.return();L.o(2);r=Qb(r,E);H=!1;O=0;(new Qg).box("mdat",function(P){O=P.size+P.start;H=!0}).parse(r,!1,!0);if(!H){L.A(4);break}R=r.subarray(0,O);r=r.subarray(O);return L.h(Cs(a,b,c,g,d,R,!0,e),5);case 5:N=L.j,n.yc==null&&(n=N),b.aa&&b.na&&Ir(b.aa,d.startTime,!0);case 4:L.u(0);break;case 2:y=S=L.m(),L.l()}})},F.h(Ds(a,b,d,x),9);p=Ds(a,b,d);return F.h(p,7);case 7:u=F.j;Oj(a.m);if(a.F)return F.return();Oj(a.m);return b.rb?(b.za=!1,bs(a,b,0),F.return()):F.h(Cs(a,b,c,g,d,u,
!1,e),8);case 8:n=F.j;F.A(6);break;case 9:A=F.j;if(y)throw y;if(w){F.A(10);break}v=!0;Oj(a.m);return a.F?F.return():b.rb?(b.za=!1,bs(a,b,0),F.return()):F.h(Cs(a,b,c,g,d,A,!1,e),11);case 11:n=F.j;case 10:b.aa&&b.na&&Ir(b.aa,d.startTime,!0);case 6:Oj(a.m);if(a.F)return F.return();b.Ea=d;h.next();b.za=!1;b.pg=!1;C=a.h.T.dc();z=C[b.type];Za(JSON.stringify(z));b.rb||(B=null,b.type===f.qa?B=a.i.get(f.X):b.type===f.X&&(B=a.i.get(f.qa)),B&&B.type==f.X?a.h.Xc(d,b.stream,B.stream.isAudioMuxedInVideo,!1,n.yc):
a.h.Xc(d,b.stream,b.stream.codecs.includes(","),!1,n.yc));Ur(b);bs(a,b,0);F.u(0);break;case 2:D=F.m();Oj(a.m,D);if(a.F)return F.return();b.za=!1;if(D.code==7001)b.za=!1,Ur(b),bs(a,b,0),F.A(0);else if(b.type==f.Ra&&a.j.ignoreTextStreamFailures)a.i.delete(f.Ra),F.A(0);else{if(D.code==3017)return F.h(Es(a,b,D),0);b.Sc=!0;D.category==1&&b.aa&&Or(b.aa,d);D.severity=2;return F.h(ts(a,b,D),0)}}})}
function As(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,r,v,w;return G(function(y){switch(y.i){case 1:e=Ac;f=b.stream;for(k=(h=(g=f.segmentIndex)&&g.Eb(c))&&h.next().value;k&&a.U.includes(k.startTime);)k=h&&h.next().value;if(!k){y.A(0);break}l=k.$;if(!l||ll(l,b.cb)){y.A(3);break}b.cb=l;y.o(4);return y.h(Ds(a,b,l),6);case 6:m=y.j;if(!a.h)return y.return();var x=a.h.T;x.H&&Cc(x.H,m,0,f);a.U=[];y.u(3);break;case 4:throw n=y.m(),b.cb=null,n;case 3:if(b.Ea&&b.Ea==k){y.A(0);break}b.Ea=k;y.o(8);return y.h(Ds(a,b,k),
10);case 10:p=y.j;if(!a.h)return y.return();x=a.h.T;x.H&&Cc(x.H,p,0,f);a.U.push(k.startTime);y.u(9);break;case 8:throw u=y.m(),b.Ea=null,u;case 9:if(!a.h)return y.return();b.rb||(r=null,b.type===e.qa?r=a.i.get(e.X):b.type===e.X&&(r=a.i.get(e.qa)),r&&r.type==e.X?a.h.Xc(k,b.stream,r.stream.isAudioMuxedInVideo,!0,null):a.h.Xc(k,b.stream,b.stream.codecs.includes(","),!0,null));v=Math.max.apply(Math,[0].concat(va(a.U)));w=a.h.Fb();if(w+d>v)return y.h(As(a,b,k.startTime,d),0);y.A(0)}})}
function Es(a,b,c){var d,e,f,g,h,k,l,m,n,p,u;return G(function(r){switch(r.i){case 1:d=!1;e=t(a.i.values());for(f=e.next();!f.done;f=e.next())if(g=f.value,g!=b&&g.pg){d=!0;break}if(d){r.A(2);break}if(a.j.avoidEvictionOnQuotaExceededError){h=Fs(a,c);if(k=a.h.disableStream(b.stream,h))return r.return();bs(a,b,4);return r.return()}l=Math.round(100*a.C);if(l>20){a.C-=.2;r.A(3);break}if(l>4){a.C-=.04;r.A(3);break}m=Fs(a,c);n=a.h.disableStream(b.stream,m);if(!n){b.Sc=!0;a.F=!0;a.h.onError(c);r.A(5);break}a.C=
1;p=a.h.Fb();return r.h(Gs(a,b,p),5);case 5:return r.return();case 3:return b.pg=!0,u=a.h.Fb(),r.h(Gs(a,b,u),2);case 2:bs(a,b,4),r.l()}})}
function Bs(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C;return G(function(z){switch(z.i){case 1:e=Ac;f=b.Ea==null;g=[];h=Math.max(0,Math.max(c.G,a.sa)-.1);k=Math.min(c.F,a.oa)+.1;a.j.clampAppendWindowToDuration&&(l=a.l.presentationTimeline.getDuration(),l<Infinity&&(k=Math.min(k,l)));m=c.codecs||b.stream.codecs;n=pe(m);p=qe(c.mimeType||b.stream.mimeType);u=c.o;if(u==b.Ge&&h==b.Sb&&k==b.Rb&&n==b.Ee&&p==b.Fe){z.A(2);break}r=b.Ee&&b.Fe&&Wq(a.h.T,b.type,p,m,qs(a));if(!r){z.A(3);break}v=null;b.type===
e.qa?v=a.i.get(e.X):b.type===e.X&&(v=a.i.get(e.qa));if(!v){z.A(3);break}return z.h(Vr(v).catch(function(){}),5);case 5:v.cb=null,v.Sb=null,v.Rb=null,ks(a,v);case 3:return z.h(Hs(a,b,u,h,k,c,n,p),2);case 2:return ll(c.$,b.cb)||(b.cb=c.$,c.l&&c.$&&(w=Ds(a,b,c.$),y=function(){var B,D,F,E,H,O,R,N,S,L,P;return G(function(Q){switch(Q.i){case 1:return Q.o(2),Q.h(w,4);case 4:return B=Q.j,Oj(a.m),D=null,F=new Map,E={projection:null,hfov:null},b.stream&&(H=b.stream.videoLayout)&&(O=H.split("/"),O.includes("PROJ-RECT")?
E.projection="rect":O.includes("PROJ-EQUI")?E.projection="equi":O.includes("PROJ-HEQU")?E.projection="hequ":O.includes("PROJ-PRIM")?E.projection="prim":O.includes("PROJ-AIV")&&(E.projection="aiv")),R=new Qg,R.ka(["moov","trak","mdia"],Vg).O("mdhd",function(M){D=hh(M.reader,M.version).timescale}).O("hdlr",function(M){M=M.reader;M.skip(4);M=M.wa(4,!1);switch(String.fromCharCode(M[0],M[1],M[2],M[3])){case "soun":F.set(e.X,D);break;case "vide":F.set(e.qa,D)}D=null}),b.type!==e.qa||E.projection||R.ka(["minf",
"stbl"],Vg).O("stsd",Xg).ka([].concat(va(dh),["encv"]),Yg).ka(["vexu","proj"],Vg).O("prji",function(M){M=M.reader.$c();E.projection=M}).box("hfov",function(M){M=M.reader.R()/1E3;E.hfov=M}),R.parse(B,!0,!0),b.type===e.qa&&Is(a,E),F.has(b.type)?c.$.timescale=F.get(b.type):D!=null&&(c.$.timescale=D),N=b.stream.segmentIndex,N instanceof Cl&&(S=El(N,c.startTime)),L=b.stream.closedCaptions&&b.stream.closedCaptions.size>0,Q.h(a.h.$g(b.type,B),5);case 5:return Q.h(tq(a.h.T,b.type,B,null,b.stream,L,b.Ec,d,
!1,!1,S),6);case 6:Q.u(0);break;case 2:throw P=Q.m(),b.cb=null,P;}})},x=c.startTime,f&&(A=nq(a.h.T,b.type),A!=null&&(x=A)),a.h.ck(x,c.$),g.push(y()))),C=b.Ea?b.Ea.j:-1,c.j!=C&&g.push(Hq(a.h.T,b.type,c.startTime)),z.h(Promise.all(g),0)}})}
function Hs(a,b,c,d,e,f,g,h){var k,l,m,n,p;return G(function(u){switch(u.i){case 1:k=Ac;l=qs(a);u.o(2);b.Sb=d;b.Rb=e;g&&(b.Ee=g);h&&(b.Fe=h);b.Ge=c;m=a.l.sequenceMode||a.l.type=="HLS";n=null;b.type===k.qa?n=a.i.get(k.X):b.type===k.X&&(n=a.i.get(k.qa));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){u.A(4);break}return u.h(Eq(a.h.T,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return u.h(Eq(a.h.T,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),6);case 6:u.u(0);
break;case 2:throw p=u.m(),b.Sb=null,b.Rb=null,b.Ee=null,b.Fe=null,b.Ge=null,p;}})}
function Cs(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,p,u;return G(function(r){switch(r.i){case 1:return k=d.closedCaptions&&d.closedCaptions.size>0,a.j.shouldFixTimestampOffset&&(l=d.mimeType=="video/mp4"||d.mimeType=="audio/mp4",m=null,e.$&&(m=e.$.timescale),(n=l&&m&&d.type==="video"&&a.l.type=="DASH")&&(new Qg).ka(bh,Vg).O("tfdt",function(v){var w,y,x,A,C,z;return G(function(B){w=gh(v.reader,v.version);y=w.Ca;if(!y)return B.return();x=-y/m;A=Number(b.Ge)||0;if(!(A<x))return B.A(0);
C=b.Sb;z=b.Rb;return B.h(Hs(a,b,x,C,z,e),0)})}).parse(f,!1,g)),r.h(Gs(a,b,c),2);case 2:return Oj(a.m),p=b.Ec,b.Ec=!1,r.h(a.h.$g(b.type,f),3);case 3:return r.h(tq(a.h.T,b.type,f,e,d,k,p,h,g),4);case 4:return u=r.j,Oj(a.m),r.return(u)}})}
function Gs(a,b,c){var d,e,f,g,h,k,l,m,n,p;return G(function(u){if(u.i==1){a.H==b&&(a.H=null);d=b.stream.segmentIndex;d instanceof Cl&&(d.wb(a.l.presentationTimeline.ud()),e=[],Dl(d,function(){e.push(-1)}));f=Math.max(a.j.bufferBehind*a.C,a.l.presentationTimeline.j);g=lq(a.h.T,b.type);if(g==null)return u.return();h=c-g;k=a.j.evictionGoal;l=a.l.presentationTimeline.xb();m=a.l.presentationTimeline.kb();n=m-l;p=h-f;n>k&&(p=Math.max(h-f,l-k-g));return p<=k?u.return():u.h(a.h.T.remove(b.type,g,g+p,e),
2)}if(u.i!=4)return Oj(a.m),a.H?u.h(Gs(a,a.H,c),4):u.A(0);Oj(a.m);u.l()})}function vs(a){return a&&a.type==yc&&(a.stream.mimeType=="application/cea-608"||a.stream.mimeType=="application/cea-708")}
function Ds(a,b,c,d){var e,f,g,h,k;return G(function(l){switch(l.i){case 1:if(e=c.uc())return l.return(e);f=null;if(b.aa){var m=b.aa,n=m.h;c instanceof kl&&(n=m.l);n.has(c)?(m=n.get(c),d&&(m.Dg=d),f=m.Ed):f=null}f||(f=rs(c,b.stream,d||null,a.j.retryParameters,a.h.Ac));g=0;b.na&&(g=b.na.i);b.operation=f;return l.h(f.promise,2);case 2:h=l.j;b.operation=null;k=h.data;if(!c.aesKey){l.A(3);break}return l.h(Nl(k,c.aesKey,g),4);case 4:k=l.j;case 3:return l.return(k)}})}
function rs(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a instanceof ml?a:void 0,h=g?1:0;a=Ul(a.S(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(Jj,a,{type:h,stream:b,segment:g,isPreload:f})}
function ms(a,b,c,d){var e,f;return G(function(g){if(g.i==1)return b.rb=!1,b.ed=!1,b.Lc=0,b.sb=!0,b.Ea=null,b.na=null,b.aa&&!a.o.has(b.stream)&&Pr(b.aa,!1),d?(e=a.h.Fb(),f=a.h.T.getDuration(),g.h(a.h.T.remove(b.type,e+d,f),3)):g.h(Dq(a.h.T,b.type),4);if(g.i!=3)return Oj(a.m),c?g.h(a.h.T.flush(b.type),3):g.A(3);Oj(a.m);b.sb=!1;b.endOfStream=!1;b.za||b.bb||bs(a,b,0);g.l()})}
function bs(a,b,c){var d=b.type;if(d!=yc||a.i.has(d))b.bb=(new Ke(function(){var e;return G(function(f){if(f.i==1)return f.o(2),f.h(ss(a,b),4);if(f.i!=2)return f.u(0);e=f.m();if(a.h)a.h.onError(e);f.l()})})).ia(c)}function Ur(a){a.bb!=null&&(a.bb.stop(),a.bb=null)}function Vr(a){return G(function(b){return a.operation?b.h(a.operation.abort(),0):b.A(0)})}
function ts(a,b,c){var d,e,f,g,h,k,l,m,n,p;return G(function(u){switch(u.i){case 1:return c.code==3024?(b.za=!1,Ur(b),bs(a,b,0),u.return()):u.h(a.ma.attempt(),2);case 2:Oj(a.m);if(c.code!=3015&&c.code!=3014&&(c.category!==1||c.code==1003)){u.A(3);break}if(b.mc)return ds(a,!1),u.return();d=!1;if(c.code!=3015&&c.code!=3014){u.A(4);break}return u.h(ws(a,!0),5);case 5:d=u.j;e=t(a.i.values());for(f=e.next();!f.done;f=e.next())g=f.value,Ur(g);Oj(a.m);case 4:h=Fs(a,c),k=a.h.disableStream(b.stream,h),c.handled=
k||d,k&&(c.severity=1);case 3:if(c.handled||c.code!=1011){u.A(6);break}l=a.h.Fb();m=nq(a.h.T,b.type);for(n=xs(a,b,l,m);((p=n)==null?void 0:p.Gb())===2;)b.Ea=n,n=xs(a,b,l,m);if(!n){u.A(6);break}return u.h(Hq(a.h.T,b.type,n.startTime),8);case 8:return b.za=!1,b.Sc=!1,Ur(b),bs(a,b,0),u.return();case 6:if(!c.handled||c.code!=1011)a.h.onError(c);c.handled||a.j.failureCallback(c);u.l()}})}
function Fs(a,b){return a.j.maxDisabledTime===0&&b.code==1011?1:b.code==3014||b.code==3015?Infinity:a.j.maxDisabledTime}
function ws(a,b){b=b===void 0?!1:b;var c,d,e,f,g,h;return G(function(k){if(k.i==1){c=Date.now()/1E3;d=a.j.minTimeBetweenRecoveries;if(!b&&(!a.j.allowMediaSourceRecoveries||c-a.Z<d))return k.return(!1);a.Z=c;e=Ac;if(f=a.i.get(e.X))Ur(f),f.operation&&(f.operation.abort(),f.operation=null),f.cb=null,f.Sb=null,f.Rb=null,f.za=!1,f.rb=!1,f.Lc=0,f.ed=!1,f.sb=!1,f.na&&f.na.vg();if(g=a.i.get(e.qa))Ur(g),g.operation&&(g.operation.abort(),g.operation=null),g.cb=null,g.Sb=null,g.Rb=null,g.za=!1,g.rb=!1,g.Lc=
0,g.ed=!1,g.sb=!1,g.na&&g.na.vg();h=a.h.video.paused;return k.h(Qq(a.h.T,qs(a)),2)}!g||g.sb||g.za||g.bb||bs(a,g,0);!f||f.sb||f.za||f.bb||bs(a,f,0);h||a.h.video.play();return k.return(!0)})}function Is(a,b){if(a.ba.projection!=b.projection||a.ba.hfov!=b.hfov){if(b.projection!=null||b.hfov!=null){var c=(new Map).set("detail",b);c=new nj("spatialvideoinfo",c)}else c=new nj("nospatialvideoinfo");c.cancelable=!0;a.h.onEvent(c);a.ba=b}}
function os(a){if(a.j.crossBoundaryStrategy!=="keep")return!0;var b=nb(),c=a.h.rd();if(!b.fb(c))for(b=t(a.i.keys()),c=b.next();!c.done;c=b.next()){if(c=a.i.get(c.value),c.type!==Ac.Ra&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1)return!0}else if(!b.Te())for(b=t(a.i.keys()),c=b.next();!c.done;c=b.next())if(c=a.i.get(c.value),c.type!==Ac.Ra&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1){a=new Set;b=t(c.fullMimeTypes);for(c=b.next();!c.done;c=b.next())a.add(me(c.value));return a.size>
1}return!1}function js(a){a.K.Pa();os(a)&&a.K.yb(a.h.video,["waiting","timeupdate"],function(){ps(a)})}function ps(a){if(os(a)){a.N.stop();var b=a.h.Fb(),c=a.i.get("video")||a.i.get("audio");c&&(c=c.cb)&&c.h!==null&&(b=c.h-b,b<0||b>1||(a.G=c.h+.1,a.N.ia(b)))}}
function ys(a,b,c){if(b.type===yc)return!1;var d=b.cb;if(!d)return!1;var e=c.$,f=d.h!==e.h;c=f;a.j.crossBoundaryStrategy==="reset_to_encrypted"&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.j.crossBoundaryStrategy="keep"));a.j.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&d.encrypted==e.encrypted&&(c=!1);if(a.j.crossBoundaryStrategy==="keep"&&d.mimeType&&e.mimeType){var g=ne(re(d.mimeType)),h=ne(re(e.mimeType));d.mimeType==e.mimeType&&g==h&&(c=!1)}if(f=(g=(a.i.get("video")||a.i.get("audio"))===
b)&&f&&a.L)a.L=!1;g&&c&&(f||b.Ec)&&ws(a,!0).then(function(){var k=(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.h.onEvent(new nj("boundarycrossed",k))});return c}
function qs(a,b){function c(f){if(f.fullMimeTypes&&f.fullMimeTypes.size>1&&a.i.has(f.type)){var g=a.i.get(f.type),h=nq(a.h.T,g.type),k=a.h.Fb();(g=xs(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.u.audio;e&&(c(e),d.set("audio",e));if(e=a.u.video)c(e),d.set("video",e);b&&a.D&&d.set(yc,a.D);return d};function Js(){}
function Ks(a,b,c,d,e){var f=e in d,g=new Set(["__proto__","constructor","prototype"]);var h=f?c.constructor==Object&&Object.keys(d).length==0:c.constructor==Object&&Object.keys(c).length==0;for(var k=f||h,l=!0,m=t(Object.keys(b)),n=m.next();!n.done;n=m.next()){n=n.value;var p=e+"."+n,u=f?d[e]:c[n];g.has(n)?(Ua("Invalid config, dangerous key "+p),l=!1):k||n in c?b[n]===void 0?u===void 0||k?delete a[n]:a[n]=ld(u):h?a[n]=b[n]:u.constructor==Object&&b[n]&&b[n].constructor==Object?(a[n]||(a[n]=ld(u)),
n=Ks(a[n],b[n],u,d,p),l=l&&n):typeof b[n]!=typeof u||b[n]==null||typeof b[n]!="function"&&b[n].constructor!=u.constructor?(Ua("Invalid config, wrong type for "+p),l=!1):typeof c[n]=="function"&&c[n].length!=b[n].length?(Va("Unexpected number of arguments for "+p),a[n]=b[n]):a[n]=Array.isArray(a[n])?b[n].slice():b[n]:(Ua("Invalid config, unrecognized key "+p),l=!1)}return l}
function Ls(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 Ms(a,b){return a&&b}
function Ns(a,b){function c(f){for(var g=t(Object.keys(f)),h=g.next();!h.done;h=g.next())h=h.value,f[h]instanceof HTMLElement||(e(f[h])&&Object.keys(f[h]).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])?eb(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}J("shaka.util.ConfigUtils",Js);Js.getDifferenceFromConfigObjects=Ns;Js.convertToConfigObject=Ls;Js.mergeConfigObjects=Ks;function Os(){}
function Ps(){var a=Infinity,b=nb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:gj(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(g,h,k){"apple"===window.shakaMediaKeysPolyfill&&h=="skd"&&(h=k.serverCertificate,k=Jk(g),g=Kk(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,
minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE",renewalIntervalSec:0,failureCallback:function(g){return Ms([g])}},d="reload";b.fb("")&&(d="smooth");var e={trackSelectionCallback:function(g){return G(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return G(function(k){if(k.i==1)return navigator.storage&&navigator.storage.estimate?k.h(navigator.storage.estimate(),3):k.return(!0);
h=k.j;return k.return(h.usage+g<h.quota*.95)})},progressCallback:function(g,h){return Ms([g,h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:c,manifest:{retryParameters:gj(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,disableChapters:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,
ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:dc(!1,!0),manifestPreprocessorTXml:Qs,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:!1,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1,chaptersUri:""},msf:{fingerprintUri:"",namespaces:[],authorizationToken:"",subscribeFilterType:2,useFetchCatalog:!1,version:"auto",catalogPreprocessor:Rs}},streaming:{retryParameters:gj(),
failureCallback:function(g){return Ms([g])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!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,stopFetchingOnPause:!1,clampAppendWindowToDuration:!1,processSrcEqualMetadata:!0},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3,commonAccessTokenHeaderName:"cta-common-access-token"},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(g){return Ms([g],
"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(g,h,k){return Ms([g,h,k])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0,transmuxWorkerUrl:"",repairIFrames:!0},offline:e,abrFactory:function(){return new Ff},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(pr,[null].concat(va(Ia.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,droppedFramesThreshold:.15,droppedFramesInterval:2,droppedFramesBanDuration:30},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,
clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,droppedFrames:!0},preferredAudio:[{language:"",role:"",label:"",channelCount:2,codec:""}],preferredText:[],preferredVideo:[{label:"",role:"",language:"",codec:"",hdrLevel:"AUTO",layout:""}],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:{fontScaleFactor:1,positionArea:0,subtitleDelay:0,suspendRenderingWhenHidden:!0},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,eventTargets:[]},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,disableTrackingEvents:!1,disableSnapback:!1,interstitialPreloadAheadTime:10,disablePlayedLinearAdSkip:!1,disableTrackingForPlayedLinearAds:!1},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:Infinity,preloadPrevItem:!0,repeatMode:0},accessibility:{handleForcedSubtitlesAutomatically:!0,speechToText:{enabled:!1,
maxTextLength:140,processLocally:!1,languagesToTranslate:[]}}};e.trackSelectionCallback=function(g){var h,k;return G(function(l){h=f.preferredAudio.map(function(m){return m.language}).filter(Boolean);k=f.preferredVideo[0]&&f.preferredVideo[0].hdrLevel||"";return l.return(Ss(g,h,k))})};return b.Sa(f)}
function Ts(){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 Us(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 Ks(a,b,c||Ps(),d,"")}
function Vs(a){var b=a.preferredAudio[0],c=a.preferredVideo[0],d;a.language=(d=b==null?void 0:b.language)!=null?d:"";var e;a.role=(e=b==null?void 0:b.role)!=null?e:"";var f;a.channelCount=(f=b==null?void 0:b.channelCount)!=null?f:2;var g;a.spatialAudio=(g=b==null?void 0:b.spatialAudio)!=null?g:!1;var h;a.audioLabel=(h=b==null?void 0:b.label)!=null?h:"";var k;a.videoRole=(k=c==null?void 0:c.role)!=null?k:"";var l;a.hdrLevel=(l=c==null?void 0:c.hdrLevel)!=null?l:"";var m;a.videoLayout=(m=c==null?void 0:
c.layout)!=null?m:"";var n;a.videoLabel=(n=c==null?void 0:c.label)!=null?n:"";a.preferredAudioCodecs=a.preferredAudio.map(function(u){return u.codec}).filter(Boolean);var p;a.preferredAudioChannelCount=(p=b==null?void 0:b.channelCount)!=null?p:2}
function Ss(a,b,c){var d=c;d=="AUTO"&&(c=a.some(function(l){return l.hdr&&l.hdr=="HLG"?!0:!1}),d=nb().hc(c));var e=a.filter(function(l){return l.type!="variant"||l.hdr&&l.hdr!=d?!1:!0});c=[];var f=e.map(function(l){return l.language}),g=null;b=t(b);for(var h=b.next();!h.done&&!(g=sc(h.value,f));h=b.next());g&&(c=e.filter(function(l){return kc(l.language)==g}));c.length==0&&(c=e.filter(function(l){return l.primary}));c.length==0&&(e.map(function(l){return l.language}),c=e);var k=c.filter(function(l){return l.height&&
l.height<=480});k.length&&(k.sort(function(l,m){return m.height-l.height}),c=k.filter(function(l){return l.height==k[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(l,m){return l.bandwidth-m.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=yc&&c.type!="image"&&c.type!="chapter"||b.push(c);return b}function Qs(a){return Ms([a],a)}function Rs(a){return Ms([a],a)}J("shaka.util.PlayerConfiguration",Os);Os.mergeConfigObjects=Us;
Os.createDefaultForLL=Ts;Os.createDefault=Ps;function Ws(){this.h=null;this.i=[]}function Xs(a,b){var c=0;a.h&&a.h.state==b&&(c+=a.h.duration);a=t(a.i);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Ys(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.i),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.h&&c.push(b(a.h));return c};function Zs(){this.j=this.i=null;this.h=[]}function $s(a,b,c){a.j!=b&&(a.j=b,a.h.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function at(){this.F=this.ea=NaN;this.m="";this.j=this.Hh=this.C=this.D=this.M=this.G=this.B=this.o=this.L=this.u=this.H=this.i=this.Z=this.ba=this.P=this.U=this.V=NaN;this.N=0;this.J=this.K=NaN;this.h=new Ws;this.l=new Zs}function bt(a,b,c){a.V=b;a.U=c}function ct(a,b,c){a.ea=b;a.F=c}function dt(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function et(a,b){b>=0&&(a.B=b)}function ft(a,b){b>=0&&(a.G=b)}function gt(a,b){b>=0&&(a.M=b)}function ht(a,b){a.j=isNaN(a.j)?b:a.j+b}
function it(a){var b=a.ea,c=a.F,d=a.m,e=a.D,f=a.U,g=a.V,h=a.P,k=a.ba,l=a.Z,m=a.C,n=a.i,p=a.H,u=a.u,r=a.L,v=a.o,w=Xs(a.h,"playing"),y=Xs(a.h,"paused"),x=Xs(a.h,"buffering"),A=a.B,C=a.G,z=a.M,B=a.Hh,D=a.j,F=a.N,E=a.K,H=a.J,O=Ys(a.h),R=[];a=t(a.l.h);for(var N=a.next();!N.done;N=a.next())N=N.value,R.push({timestamp:N.timestamp,id:N.id,type:N.type,fromAdaptation:N.fromAdaptation,bandwidth:N.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:p,timeToFirstFrame:u,manifestTimeSeconds:r,drmTimeSeconds:v,playTime:w,pauseTime:y,bufferingTime:x,licenseTime:A,liveLatency:C,maxSegmentDuration:z,manifestSizeBytes:B,bytesDownloaded:D,nonFatalErrorCount:F,manifestPeriodCount:E,manifestGapCount:H,stateHistory:O,switchHistory:R}};function jt(a,b,c,d){oj.call(this);this.P=a;this.Z=b;this.Fa=d.networkingEngine;this.B=c;this.m=null;this.Ba=0;this.Ma=d.ke;this.J=d.Rj;this.Na=d.Sj;this.j=d.config;this.o=this.K=this.h=null;this.sa=!1;this.L=d.hk;this.xa=!1;this.l=null;this.ma=!1;this.C=null;this.D=new Map;this.Aa=!1;this.La=d.gk;this.ba=new at;this.oa=Promise.withResolvers();this.F=Promise.withResolvers();this.U=null;this.G=!1;this.ea=d.Ji;this.u=this.i=null;this.V=!1;this.N=[];this.M=[];this.H=!0}ta(jt,oj);
function kt(a,b,c){(a=b?a.M:a.N)?a.push(c):c()}function lt(a){if(a.M)for(var b=t(a.M),c=b.next();!c.done;c=b.next())c=c.value,c();a.M=null}function mt(a,b){a.U=b;a.V=!0;if(a.N){b=t(a.N);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.N=null}q=jt.prototype;q.getStartTime=function(){return this.B};q.Sf=function(){return this.Z};q.we=function(){return this.P};q.Rf=function(){return this.h};function nt(a){a.xa=!0;return a.L}q.getStats=function(){return this.ba};
function ot(a){a.ma=!0;return a.l}q.wj=function(){return this.i?of(this.i):null};q.vj=function(){return this.u?pf(this.u):null};function pt(a){a.Aa=!0;return a.D}
q.start=function(){var a=this;(function(){var b;return G(function(c){switch(c.i){case 1:return c.h(Promise.resolve(),2);case 2:return c.o(3),c.h(qt(a),5);case 5:rt(a);if("webkit"===window.shakaMediaKeysPolyfill){c.A(6);break}return c.h(st(a),7);case 7:rt(a);case 6:return c.h(tt(a),8);case 8:rt(a);if(!a.ea){c.A(9);break}return c.h(ut(a),10);case 10:rt(a);case 9:if(!a.ea||!a.l){c.A(11);break}return c.h(Bk(a.l),12);case 12:rt(a);case 11:a.F.resolve();c.u(0);break;case 3:b=c.m(),b instanceof K&&(b.code==
7001||b.code==7003)||a.F.reject(b),c.l()}})})()};q.dispatchEvent=function(a){return this.U?this.U.dispatchEvent(a):oj.prototype.dispatchEvent.call(this,a)};q.onError=function(a){a.severity===2&&(this.F.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new nj("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function rt(a){if(a.G)throw new K(2,7,7003);}function vt(a,b){a.dispatchEvent(new nj("onstatechange",(new Map).set("state",b)))}
function qt(a){var b,c,d,e,f,g;return G(function(h){switch(h.i){case 1:vt(a,"manifest-parser");a.o||(a.K=Nc(a.P,a.Z),a.o=a.K(),a.o.configure(a.j.manifest,function(){return a.H}));b=Date.now()/1E3;vt(a,"manifest");if(a.h){h.A(2);break}return h.h(a.o.start(a.P,a.Na),3);case 3:return a.h=h.j,wt(a.h),h.h(xt(a),2);case 2:return a.oa.resolve(),c=new nj("manifestparsed",void 0),h.h(Promise.resolve(),5);case 5:a.dispatchEvent(c);if(a.h.variants.length==0)throw new K(2,4,4036);wt(a.h);d=Np(a.J,a.h);if(!d){h.A(6);
break}e=new nj("trackschanged",void 0);return h.h(Promise.resolve(),7);case 7:rt(a),a.dispatchEvent(e);case 6:f=Date.now()/1E3,g=f-b,g>=0&&(a.ba.L=g),h.l()}})}
function st(a,b){var c,d,e,f,g;return G(function(h){switch(h.i){case 1:if(!a.h||a.l)return h.return();vt(a,"drm-engine");a.Ba=Date.now()/1E3;a.l=a.Ma();a.J.h=a.l;a.l.configure(a.j.drm,function(){return a.H});c=yf(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.ra());return h.h(Zj(a.l,c,a.h.offlineSessionIds,d),2);case 2:rt(a);if(!b){h.A(3);break}return h.h(a.l.Mb(b),4);case 4:rt(a);case 3:return a.m&&(e=a.m.getConfiguration(),e.keySystem=yt(a),a.m.configure(e)),h.h(Lp(a.J,
a.h),5);case 5:f=h.j;if(!f){h.A(0);break}g=new nj("trackschanged",void 0);return h.h(Promise.resolve(),7);case 7:a.dispatchEvent(g),h.l()}})}q.configure=function(a,b){a=Ls(a,b);Us(this.j,a);zt(this)};q.getConfiguration=function(){return ld(this.j)};
function xt(a){var b;return G(function(c){a.m||(a.m=a.j.adaptationSetCriteriaFactory(),b={preferredAudio:a.j.preferredAudio,preferredVideo:a.j.preferredVideo,language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:a.j.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:yt(a)},Vs(b),a.m.configure(b));if(a.i||
!a.h.variants.length||a.h.variants.length!=1&&a.h.type!="HLS")return c.A(0);a.i=At(a);return a.i?c.h(Bt(a.i),0):c.A(0)})}function tt(a){return G(function(b){if(b.i==1)return!a.i||a.h.variants.includes(a.i)?b.A(0):b.h(Ct(a.i),3);a.i=At(a);return a.i?b.h(Bt(a.i),0):b.A(0)})}
function ut(a){var b,c,d,e,f;return G(function(g){!a.i&&(b=At(a))&&(a.i=b);if(!a.i)return g.A(0);c=a.h.presentationTimeline.isLive();d=[];e=a.i;e.video&&d.push(Dt(a,e.video,c));e.audio&&d.push(Dt(a,e.audio,c));if(f=Et(a,e))d.push(Dt(a,f,c)),a.u=f;return g.h(Promise.all(d),0)})}
function At(a){if(!a.C){var b=a.j.abrFactory;a.C=b();a.C.configure(a.j.abr)}b=a.h.isLowLatency&&a.j.streaming.lowLatencyMode;var c=yf(a.h.variants);c=a.m.create(c);a.C.setVariants(Array.from(c.values()),b);return a.C.chooseVariant(!0)}
function Et(a,b){for(var c=null,d=t(a.j.preferredText),e=d.next();!e.done;e=d.next())if(e=e.value,e.language&&(e=zf(a.h.textStreams,e.language,e.role,e.forced),e.length)){c=e[0];break}!c&&(b==null?0:b.audio)&&a.j.accessibility.handleForcedSubtitlesAutomatically&&(a=zf(a.h.textStreams,b.audio.language,"",!0),a.length&&(c=a[0]));return c}
function Dt(a,b,c){var d,e,f,g,h;return G(function(k){if(k.i==1)return d=a.j.streaming.segmentPrefetchLimit||2,e=new Gr(d,b,function(l,m,n){return rs(l,m,n||null,a.j.streaming.retryParameters,a.Fa,a.H)},!1),a.D.set(b.id,e),b.segmentIndex?k.A(2):k.h(b.createSegmentIndex(),2);f=typeof a.B==="number"?a.B:0;g=b.segmentIndex.Eb(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=rf(b.segmentIndex));return h?c?h.$?k.h(Jr(e,h.$),0):k.A(0):k.h(Ir(e,h.startTime),0):k.A(0)})}
function zt(a){var b,c,d,e,f,g,h,k,l,m,n,p,u;G(function(r){if(r.i==1){if(!a.i)return r.return();b=a.h.presentationTimeline.isLive();c=[];d=function(v){v&&(a.D.has(v.id)&&(Pr(a.D.get(v.id)),a.D.delete(v.id)),v.segmentIndex&&v.closeSegmentIndex&&c.push(v.closeSegmentIndex()))};e=function(){var v=a.i;v=t([v.video,v.audio]);for(var w=v.next();!w.done;w=v.next())d(w.value);a.u=null};f=function(){d(a.u);a.u=null};g=a.m.getConfiguration();h={preferredAudio:a.j.preferredAudio,preferredVideo:a.j.preferredVideo,
language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:a.j.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:yt(a)};Vs(h);nd(g)!=nd(h)&&(a.m.configure(h),e(),a.i=At(a));a.i?(k=Et(a,a.i))?k!=a.u&&(f(),a.u=k):f():f();return r.h(Promise.all(c),2)}l=[];if(a.i){m=a.i;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=
n.next())u=p.value,l.push(Dt(a,u,b));a.u&&l.push(Dt(a,a.u,b))}return r.h(Promise.all(l),0)})}function Bt(a){var b,c,d,e;return G(function(f){b=[];c=t([a.video,a.audio]);for(d=c.next();!d.done;d=c.next())(e=d.value)&&!e.segmentIndex&&b.push(e.createSegmentIndex());return b.length>0?f.h(Promise.all(b),0):f.A(0)})}
function Ct(a){var b,c,d,e;return G(function(f){b=[];c=t([a.video,a.audio]);for(d=c.next();!d.done;d=c.next())(e=d.value)&&e.segmentIndex&&e.closeSegmentIndex&&b.push(e.closeSegmentIndex());return b.length>0?f.h(Promise.all(b),0):f.A(0)})}q.Lk=function(){return this.F.promise};
q.destroy=function(){var a=this,b,c,d;return G(function(e){if(e.i==1)return a.G=!0,!a.o||a.sa?e.A(2):e.h(a.o.stop(),2);if(e.i!=4)return a.C&&a.C.release(),a.L&&!a.xa&&a.L.release(),!a.l||a.ma?e.A(4):e.h(a.l.destroy(),4);if(a.D.size>0&&!a.Aa)for(b=t(a.D.values()),c=b.next();!c.done;c=b.next())d=c.value,Pr(d);e.l()})};function yt(a){return Xb(a.l?a.l.ec():null)}
function wt(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))}J("shaka.media.PreloadManager",jt);jt.prototype.destroy=jt.prototype.destroy;jt.prototype.waitForFinish=jt.prototype.Lk;jt.prototype.getPrefetchedTextTrack=jt.prototype.vj;jt.prototype.getPrefetchedVariantTrack=jt.prototype.wj;function Ft(a){oj.call(this);this.h=a;this.i=null}ta(Ft,oj);Ft.prototype.release=function(){this.h=null;oj.prototype.release.call(this)};Ft.prototype.l=function(a){if(this.h&&(a=this.h.Tf(a))){var b=a.mg-a.start;this.i!=null&&Math.abs(b-this.i)>.5&&this.dispatchEvent(new nj("change",new Map([["programDateTime",new Date(a.mg*1E3)],["timestamp",a.start]])));this.i=b}};function Gt(a,b){oj.call(this);var c=this;this.j=a;this.m=b;this.h=new Map;this.o=[{Jc:null,Ic:Ht,xc:function(d,e){return It(c,"enter",d,e)}},{Jc:Jt,Ic:Ht,xc:function(d,e){return It(c,"enter",d,e)}},{Jc:Kt,Ic:Ht,xc:function(d,e){return It(c,"enter",d,e)}},{Jc:Ht,Ic:Jt,xc:function(d,e){return It(c,"exit",d,e)}},{Jc:Ht,Ic:Kt,xc:function(d,e){return It(c,"exit",d,e)}},{Jc:Jt,Ic:Kt,xc:function(d,e){e?It(c,"skip",d,e):(It(c,"enter",d,e),It(c,"exit",d,e))}},{Jc:Kt,Ic:Jt,xc:function(d,e){return It(c,"skip",
d,e)}}];this.i=new gb;this.i.I(this.j,"regionremove",function(d){c.h.delete(d.region)})}ta(Gt,oj);Gt.prototype.release=function(){this.j=null;this.h.clear();this.i.release();this.i=null;oj.prototype.release.call(this)};
Gt.prototype.l=function(a,b){if(!this.m||a!=0){this.m=!1;for(var c=t(this.j.h.values()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.h.get(d),f=a<d.startTime?Jt:a>d.endTime?Kt:Ht;this.h.set(d,f);for(var g=t(this.o),h=g.next();!h.done;h=g.next())h=h.value,h.Jc==e&&h.Ic==f&&h.xc(d,b)}}};function It(a,b,c,d){b=new nj(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Jt=1,Ht=2,Kt=3;function Lt(){}Lt.prototype.parse=function(a){function b(h,k){k&&d.push({key:h,description:"",data:k,mimeType:null,pictureType:null})}function c(h,k){return Bb(a.subarray(e+h,e+h+k)).replace(/\0/g,"").trim()}var d=[],e=a.length-128;if(e<0||a[e]!==84||a[e+1]!==65||a[e+2]!==71)return d;b("TIT2",c(3,30));b("TPE1",c(33,30));b("TALB",c(63,30));b("TYER",c(93,4));var f="",g=null;a[e+125]===0?(f=c(97,28),g=a[e+126]):f=c(97,30);b("COMM",f);g!==null&&b("TRCK",String(g));b("TCON",String(a[e+127]));return d};
J("shaka.metadata.Id3V1Utils",Lt);Lt.prototype.parse=Lt.prototype.parse;for(var Mt=t(je),Nt=Mt.next();!Nt.done;Nt=Mt.next())Dh(Nt.value,function(){return new Lt});function Ot(){}Ot.prototype.parse=function(a){var b=[];(new Qg).ka(["moov","udta"],Vg).O("meta",Vg).box("ilst",function(c){for(;c.reader.Va()&&!(c.reader.Oa()-c.reader.Ia()<8);){var d=c.reader.R(),e=Ug(c.reader.R());if(d<8)break;d=c.reader.wa(Math.min(d-8,c.reader.Oa()-c.reader.Ia()),!1);(e=e==="----"?Pt(d):Qt(e,d))&&b.push(e)}}).parse(a);return b};
function Pt(a){var b="",c="",d=null;(new Qg).O("mean",function(e){b=Bb(e.reader.wa(e.reader.Oa()-e.reader.Ia(),!1))}).O("name",function(e){c=Bb(e.reader.wa(e.reader.Oa()-e.reader.Ia(),!1))}).O("data",function(e){d=Rt(e)}).parse(a);return d&&c?{key:c,data:d.data,description:b?"Domain: "+b:"",mimeType:d.mimeType,pictureType:d.pictureType}:null}
function Qt(a,b){var c=St.get(a)||a,d=null;(new Qg).O("data",function(e){e=Rt(e,a);d={key:c,data:e.data,description:"",mimeType:e.mimeType,pictureType:e.pictureType}}).parse(b);return d}
function Rt(a,b){b=b===void 0?"":b;a.reader.skip(4);var c=a.reader.wa(a.reader.Oa()-a.reader.Ia(),!1);if((b==="trkn"||b==="disk")&&c.length>=6)return a=xb(c),c=a.getUint16(2,!1),a=a.getUint16(4,!1),{data:a>0?c+"/"+a:""+c,mimeType:null,pictureType:null};switch(a.flags){case 13:return{data:ub(c),mimeType:"image/jpeg",pictureType:3};case 14:return{data:ub(c),mimeType:"image/png",pictureType:3};case 21:a=xb(c);switch(c.length){case 1:a=a.getInt8(0);break;case 2:a=a.getInt16(0,!1);break;case 3:a=c[0]<<
16|c[1]<<8|c[2];a&8388608&&(a|=-16777216);break;case 4:a=a.getInt32(0,!1);break;default:for(a=0,c=t(c),b=c.next();!b.done;b=c.next())a=a<<8|b.value}return{data:a,mimeType:null,pictureType:null};default:return{data:Bb(c).replace(/\0/g,""),mimeType:null,pictureType:null}}}J("shaka.metadata.IlstUtils",Ot);Ot.prototype.parse=Ot.prototype.parse;
var St=(new Map).set("\u00a9nam","TIT2").set("\u00a9ART","TPE1").set("aART","TPE2").set("\u00a9alb","TALB").set("\u00a9gen","TCON").set("\u00a9day","TDRC").set("\u00a9wrt","TEXT").set("trkn","TRCK").set("disk","TPOS").set("\u00a9cmt","COMM").set("covr","APIC").set("cprt","TCOP").set("\u00a9too","TENC").set("tmpo","TBPM").set("cpil","TCMP");Dh("audio/mp4",function(){return new Ot});function Tt(){}
Tt.prototype.parse=function(a){if(a.length>=4&&a[0]==102&&a[1]==76&&a[2]==97&&a[3]==67){for(var b=[],c=4;c+4<=a.length;){var d=a[c],e=!!(d&128),f=d&127;d=a[c+1]<<16|a[c+2]<<8|a[c+3];c+=4;if(c+d>a.length)break;var g=a.subarray(c,c+d);f==4&&b.push.apply(b,va(Ut(g)));if(f==6){try{var h=new Hg(g,0),k=h.R(),l=h.R(),m=Bb(h.wa(l,!0)),n=h.R(),p=Bb(h.wa(n,!0));h.skip(16);var u=h.R(),r=h.wa(u,!0);var v={key:"APIC",data:ub(r),description:p,mimeType:m,pictureType:k}}catch(w){v=null}(f=v)&&b.push(f)}c+=d;if(e)break}return b}return a.length>=
4&&a[0]==79&&a[1]==103&&a[2]==103&&a[3]==83&&(b=Bb(a),c=b.indexOf("OpusTags"),c<0&&(c=b.indexOf("vorbis")),c>=0)?Ut(a.subarray(c+8)):[]};function Ut(a){var b=[];try{var c=new Hg(a,Ig),d=c.R();c.skip(d);var e=c.R();for(a=0;a<e;a++){var f=c.R(),g=Bb(c.wa(f,!1)),h=g.indexOf("=");if(!(h<0)){var k=g.substring(0,h).toUpperCase();b.push({key:Vt[k]||k,data:g.substring(h+1),description:"",mimeType:null,pictureType:null})}}}catch(l){}return b}J("shaka.metadata.VorbisUtils",Tt);Tt.prototype.parse=Tt.prototype.parse;
var Vt={TITLE:"TIT2",ARTIST:"TPE1",ALBUM:"TALB",ALBUMARTIST:"TPE2",TRACKNUMBER:"TRCK",DISCNUMBER:"TPOS",DATE:"TDRC",GENRE:"TCON",COMMENT:"COMM",DESCRIPTION:"TIT3",COPYRIGHT:"TCOP",COMPOSER:"TCOM",LYRICS:"USLT",ISRC:"TSRC"};Dh("audio/flac",function(){return new Tt});Dh("audio/ogg",function(){return new Tt});Dh("audio/vorbis",function(){return new Tt});Dh("audio/opus",function(){return new Tt});function Wt(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=Eb(b)}catch(h){}throw new K(1,1,1001,d,c,f,a,g,e||d);};function Xt(){}
function Yt(a,b,c,d,e,f){var g=new Zt;try{Rj(b.headers).forEach(function(m,n){g.append(n,m)})}catch(m){return jj(new K(1,1,1002,a,m,c))}var h=new $t,k={ah:!1,ui:!1};a=au(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 ij(a,function(){k.ah=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new Ke(function(){k.ui=!0;h.abort()});l.ia(b/
1E3);a.finally(function(){l.stop()})}return a}
function au(a,b,c,d,e,f,g,h,k){var l,m,n,p,u,r,v,w,y,x,A,C,z,B,D;return G(function(F){switch(F.i){case 1:return l=bu,m=cu,p=new ArrayBuffer(0),r=u=0,v={},w=Date.now(),F.o(2),F.h(l(a,d),4);case 4:n=F.j;v=du(n.headers);g(v);if(d.method=="HEAD"){F.A(5);break}x=(y=n.headers.get("Content-Length"))?parseInt(y,10):0;if(!n.body)return F.h(n.arrayBuffer(),9);A=n.clone().body.getReader();C=function(E){function H(){var O,R,N,S;return G(function(L){switch(L.i){case 1:return L.o(2),L.h(A.read(),4);case 4:O=L.j;
L.u(3);break;case 2:return L.m(),L.return();case 3:if(O.done){L.A(5);break}u+=O.value.byteLength;if(!h){L.A(5);break}return L.h(h(O.value),5);case 5:R=Date.now();N=u-r;if(R-w>100&&N>=k||O.done)S=O.done?0:x-u,f(R-w,N,S),r=u,w=R;O.done?E.close():(E.enqueue(O.value),H());L.l()}})}H()};new m({start:C});return F.h(n.arrayBuffer(),8);case 8:p=F.j;F.A(5);break;case 9:p=F.j,z=Date.now(),f(z-w,p.byteLength,0);case 5:b.headers.Range&&(B=b.headers.Range.replace("bytes=","").split("-").filter(function(E){return E}).map(function(E){return parseInt(E,
10)}),B.length==2&&p.byteLength!=B[1]-B[0]+1&&Va("Payload length does not match range requested bytes",b,n));F.u(3);break;case 2:D=F.m();if(e.ah)throw new K(1,1,7001,a,c);if(e.ui)throw new K(1,1,1003,a,c);throw new K(1,1,1002,a,D,c);case 3:return F.return(Wt(v,p,n.status,a,n.url,b,c))}})}function du(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
function eu(){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)}J("shaka.net.HttpFetchPlugin",Xt);Xt.isSupported=eu;Xt.parse=Yt;var bu=window.fetch,$t=window.AbortController,cu=window.ReadableStream,Zt=window.Headers;eu()&&(Aj("http",Yt,2,!0),Aj("https",Yt,2,!0),Aj("blob",Yt,2,!0));function fu(){}
function gu(a,b,c,d,e,f){var g=new hu,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 p={};g.onabort=function(){n(new K(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var r=g.getAllResponseHeaders().trim().split("\r\n"),v={};r=t(r);for(var w=r.next();!w.done;w=r.next()){w=w.value;var y=w.indexOf(": ");y!==-1&&(v[w.slice(0,
y).toLowerCase()]=w.slice(y+2))}p=v;e(p)}};g.onload=function(){var r=g.response;try{var v=Wt(p,r,g.status,a,g.responseURL,b,c);m(v)}catch(w){n(w)}};g.onerror=function(r){n(new K(1,1,1002,a,r,c))};g.ontimeout=function(){n(new K(1,1,1003,a,c))};g.onprogress=function(r){var v=Date.now(),w=f.minBytesForProgressEvents||0,y=r.loaded-k;if(v-h>100&&y>=w||r.lengthComputable&&r.loaded==r.total)d(v-h,y,g.readyState==4?0:r.total-r.loaded),k=r.loaded,h=v};for(var u in b.headers)try{g.setRequestHeader(u.toLowerCase(),
b.headers[u])}catch(r){throw new K(1,1,1002,a,r,c);}g.send(b.body)});return new ij(l,function(){g.abort();return Promise.resolve()})}J("shaka.net.HttpXHRPlugin",fu);fu.parse=gu;var hu=window.XMLHttpRequest;Aj("http",gu,1,!0);Aj("https",gu,1,!0);Aj("blob",gu,1,!0);for(var iu={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",ase:"American Sign Language",bfi:"British Sign Language",bzs:"Brazilian Sign Language",csn:"Colombian Sign Language",dse:"Dutch Sign Language",dsl:"Danish Sign Language",fsl:"French Sign Language",
gsg:"German Sign Language",gss:"Greek Sign Language",isg:"Irish Sign Language",ise:"Italian Sign Language",jsl:"Japanese Sign Language",mfs:"Mexican Sign Language",ncs:"Nicaraguan Sign Language",nsl:"Norwegian Sign Language",psr:"Portuguese Sign Language",sfb:"French Belgian Sign Language",sfs:"South African Sign Language",sgg:"Swiss German Sign Language",ssp:"Spanish Sign Language",swl:"Swedish Sign Language",vgt:"Flemish Sign Language"},ju=t(Object.keys(iu)),ku=ju.next();!ku.done;ku=ju.next()){var lu=
ku.value;iu[lu.toLowerCase()]=iu[lu]};function mu(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return mu(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=Vd,e=a.fontStyle==Wd,f=a.textDecoration.includes(Xd);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;e==""&&b&&(e=b.color);d="";(e=nu(e))&&(d+="."+e);e=a.backgroundColor;e==""&&b&&(e=b.backgroundColor);(b=nu(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
k=k.next().value;return"<"+h+(k===void 0?"":k)+">"+g+"</"+h+">"},a.payload)}
function nu(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 ou(a,b){var c=[];a=t(pu(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,va(ou(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=mu(d,b);c.push(e)}return c}
function pu(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={qf:void 0},c=a.next())d.qf=c.value,b.some(function(e){return function(f){return Md(e.qf,f)}}(d))||b.push(d.qf);return b}
function qu(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 ru(a,b){var c=ou(b),d=[];b=a.cues?Array.from(a.cues):[];c=t(c);for(var e=c.next(),f={};!e.done;f={Tc:void 0},e=c.next())f.Tc=e.value,!b.some(function(g){return function(h){return h.startTime==g.Tc.startTime&&h.endTime==g.Tc.endTime&&h.text==g.Tc.payload}}(f))&&f.Tc.payload&&(e=qu(f.Tc))&&d.push(e);b=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-
d.indexOf(h)});b=t(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function su(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 Hu(a){function b(d){d.line=c.line;d.lineAlign=c.lineAlign;d.position=c.position;d.positionAlign=c.positionAlign;d.size=c.size;d.displayAlign=c.displayAlign;d.region=c.region;d=t(d.nestedCues);for(var e=d.next();!e.done;e=d.next())b(e.value)}var c=new Bd(0,0,"");b(a)};function Iu(a){var b=this;this.i=a;this.u=new gb;this.o=new gb;this.l=this.C=null;this.h=new Map;this.j=-1;this.B=!1;this.m=null;this.u.I(a,"loaded",function(){return Ju(b)});Ju(this)}q=Iu.prototype;q.configure=function(a){this.C=a};q.remove=function(a,b){if(!this.i)return!1;var c=Ku(this);c&&su(c,function(d){return d.startTime<b&&d.endTime>a});return!0};
q.append=function(a){var b=Ku(this);if(b){var c,d,e=(d=(c=this.C)==null?void 0:c.subtitleDelay)!=null?d:0;a=e!==0?a.map(function(f){f=f.clone();f.startTime=Math.max(0,f.startTime+e);f.endTime=Math.max(0,f.endTime+e);return f}):a;ru(b,a)}};q.destroy=function(){this.i&&(this.l&&Lu(this),this.i=null);var a;(a=this.m)==null||a.stop();this.m=null;var b;(b=this.u)==null||b.release();this.u=null;var c;(c=this.o)==null||c.release();this.o=null;return Promise.resolve()};q.isTextVisible=function(){return this.B};
q.setTextVisibility=function(a){this.B=a;var b=Ku(this);b?b.mode!=="disabled"&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a)):this.i&&this.i.Qf()===Mu&&Nu(this,a)};q.setTextLanguage=function(){};function Lu(a){var b;(b=a.m)==null||b.stop();a.m=null;var c;(c=a.o)==null||c.Pa();b=t(a.h.values());for(c=b.next();!c.done;c=b.next())c.value.remove();a.h.clear();a.j=-1;a.l=null}
function Ou(a){var b=new Map,c=a.i.ob();c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;if(a.h.has(d.id)){var e=a;var f=e.h.get(d.id);d.active||f.track.mode==="disabled"||(f.track.mode="disabled");e.h.delete(d.id);e=f}else{e=a;f=e.l.ownerDocument.createElement("track");var g=nb();g=d.forced&&g.Da()==="WEBKIT"?"forced":d.kind==="caption"?"captions":"subtitles";f.kind=g;f.label=Pu(d);var h=void 0;g=d.language?d.language in iu?d.language:(h=qc(d.language))!=null?h:"und":"und";f.srclang=g;f.src=
"data:,WEBVTT";f.track.mode="disabled";e.l.appendChild(f);e=f}b.set(d.id,e);d.active&&(a.j=d.id)}c=t(a.h.values());for(d=c.next();!d.done;d=c.next())d.value.remove();a.h=b;a.j<=-1||(a.h.has(a.j)?(b=a.h.get(a.j).track,b.mode==="disabled"&&(b.mode=a.B?"showing":"hidden")):a.j=-1)}
function Qu(a){if(!a.m){var b=a.l;a.m=(new Ke(function(){a.m=null;if(a.l===b){a:{var c=-1;if(a.h.has(a.j)){var d=a.h.get(a.j).track.mode;if(d==="showing"){c=a.j;break a}d==="hidden"&&(c=a.j)}d=t(a.h.keys());for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=a.h.get(e);if(f.track.mode==="showing"){c=e;break a}c<0&&f.track.mode==="hidden"&&(c=e)}}d=a.h.get(c);e=t(a.h.values());for(f=e.next();!f.done;f=e.next())f=f.value,f!==d&&f.track.mode!=="disabled"&&(f.track.mode="disabled");a.j!==c&&(a.j=c,
Ru(a,c))}})).ia(0)}}function Ku(a){return a.h.has(a.j)?a.h.get(a.j).track:null}function Nu(a,b){a=Array.from(a.i.Qc().textTracks).filter(function(c){return["captions","subtitles","forced"].includes(c.kind)});if(b)!a.some(function(c){return c.mode==="showing"})&&(b=a.find(function(c){return c.mode==="hidden"}))&&(b.mode="showing");else for(b=t(a),a=b.next();!a.done;a=b.next())a=a.value,a.mode==="showing"&&(a.mode="hidden")}
function Ru(a,b){if(b>-1){var c=a.i.ob().find(function(d){return d.id===b});if(c){a.i.Fc(c);return}}a.i.Fc(null)}function Ju(a){!a.l&&a.i&&a.i.Qf()===Su&&(a.l=a.i.Qc(),a.u.Ja(a.i,"unloading",function(){return Lu(a)}),a.o.I(a.i,"textchanged",function(){return Ou(a)}),a.o.I(a.l.textTracks,"change",function(){return Qu(a)}),Ou(a))}
function Pu(a){if(a.label)return a.label;if(a.language){var b=qc(a.language);if(window.Intl&&"DisplayNames"in Intl)try{var c=(new Intl.DisplayNames(a.language,{type:"language",languageDisplay:"standard"})).of(a.language);if(c&&c.toLowerCase()!=a.language.toLowerCase())return c.charAt(0).toUpperCase()+c.slice(1)}catch(e){}if(c=iu[a.language])return c;if(c=b&&iu[b])return b===a.language?c:c+" ("+a.language+")"}var d;b=String((d=a.originalTextId)!=null?d:"");return a.language&&a.language!==a.originalTextId?
b+" ("+a.language+")":b}J("shaka.text.NativeTextDisplayer",Iu);Iu.prototype.setTextLanguage=Iu.prototype.setTextLanguage;Iu.prototype.setTextVisibility=Iu.prototype.setTextVisibility;Iu.prototype.isTextVisible=Iu.prototype.isTextVisible;Iu.prototype.destroy=Iu.prototype.destroy;Iu.prototype.append=Iu.prototype.append;Iu.prototype.remove=Iu.prototype.remove;Iu.prototype.configure=Iu.prototype.configure;var Su=2,Mu=3;function Tu(a){var b=this;this.m=a;this.u=null;this.l=new gb;this.J=Uu.value();this.h=null;this.B=!1;this.C=new Vu;this.L=new Ke(function(){Wu(b)});this.K=1E15;this.G=Xu(this);this.j=[this.G];this.F=this.H=this.i=this.o=null;this.D=new Yu(this.C,this.L,function(c){if(b.B&&b.h){var d=b.u.maxTextLength;if(!(c.length<=d)){for(d=c.length-d;d>0&&c[d-1]!==" ";)d--;c="..."+c.slice(d).trimStart()}var e;(e=b.i)!=null&&e.i&&(e.h||(e.h=document.createElement("span"),e.h.setAttribute("translate","no"),e.h.style.backgroundColor=
"rgba(0,0,0,0.8)",e.h.style.padding="0px 5px",e.h.style.margin="2.5% 5%",e.i.appendChild(e.h)),e.h.textContent=c)}},function(){var c;(c=b.i)!=null&&c.h&&(c.h.textContent="")})}q=Tu.prototype;q.configure=function(a){this.u=a;Zu(this)};q.release=function(){this.o=null;this.l.Pa();$u(this);this.m=null;this.l.release();var a;(a=this.i)==null||a.release();this.h&&this.h.parentElement&&(this.h.remove(),this.h=null)};
q.enable=function(a){var b=this;this.J&&(this.h||(this.h=av(this)),this.h&&(this.i||(this.i=new bv(this.h)),this.B&&a.id==this.o||(this.B=!0,this.o=a.id,this.l.I(this.m,"audiotrackschanged",function(){Wu(b)}),a=this.m.Qc(),this.l.I(a,"seeking",function(){Wu(b)}),this.l.I(a,"pause",function(){$u(b,!1)}),this.l.I(a,"play",function(){Wu(b)}),a.paused||Wu(this))))};
q.disable=function(){if(this.B){this.B=!1;this.o=null;this.l.Pa();$u(this);var a;(a=this.i)==null||a.release();this.i=null;this.C.release();this.D.release()}};q.isSupported=function(){if(!this.J)return!1;this.h||(this.h=av(this));return this.h?!0:!1};q.ob=function(){if(!this.isSupported())return[];for(var a=t(this.j),b=a.next();!b.done;b=a.next())b=b.value,b.active=b.id==this.o;return this.j};
function Wu(a){var b,c,d,e,f,g,h,k;G(function(l){switch(l.i){case 1:(b=a.i)!=null&&b.h&&(b.h.textContent="");c=a.m.getAudioTracks();if(!c.length)return l.return();d=cv(a);if(!d)return l.return();e=c.find(function(m){return m.active});f="en";e&&e.language&&e.language!="und"&&(f=e.language);g=a.j.find(function(m){return m.id==a.o});h="";g&&g.language&&g.language!="und"&&(h=g.language);if(!a.D.isActive()||a.H!==f||a.F===h){l.A(2);break}a.F=h;return l.h(dv(a.C,f,h),3);case 3:return l.return();case 2:return $u(a),
l.o(4),l.h(dv(a.C,f,h),6);case 6:l.u(5);break;case 4:if(k=l.m(),k.name=="NotSupportedError")return l.return();case 5:return l.h(a.D.start(d,f,a.u.processLocally),7);case 7:a.H=f,a.F=h,l.l()}})}function $u(a,b){a.D.stop(b===void 0?!0:b)}
function cv(a){var b=a.m.Qc();return b?ev.getOrInsertComputed(b,function(){var c=new (window.AudioContext||window.webkitAudioContext),d=c.createMediaElementSource(b),e=c.createMediaStreamDestination();d.connect(e);d.connect(c.destination);var f=e.stream.getAudioTracks()[0];return{Gl:c,Vl:d,Ol:e,Li:f}}).Li:null}
function av(a){a=a.m.Yb;if(!a)return null;var b=document.createElement("div");b.classList.add("shaka-speech-to-text-container");b.style.textAlign="center";b.style.display="flex";b.style.flexDirection="column";b.style.alignItems="center";b.style.justifyContent="flex-end";a.appendChild(b);return b}
function Zu(a){var b=a.j.map(function(e){return e.language}).filter(function(e){return e});if(!cb(a.u.languagesToTranslate,b)&&"Translator"in window){a.j=a.j.filter(function(e){if(e.id==a.G.id||a.u.languagesToTranslate.includes(e.language))return!0;e.id==a.o&&a.disable();return!1});b=t(a.u.languagesToTranslate);for(var c=b.next(),d={};!c.done;d={ag:void 0},c=b.next())d.ag=c.value,c=a.j.find(function(e){return function(f){return f.language==e.ag}}(d)),c||(c=Xu(a),c.language=d.ag,a.j.push(c));b=new nj("textchanged");
a.m.dispatchEvent(b)}}function Xu(a){return{id:a.K++,active:!1,type:yc,bandwidth:0,language:"",label:null,kind:null,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:!1,originalTextId:null,originalLanguage:"speech-to-text"}}
var ev=new Map,Uu=new mb(function(){var a=document.body.appendChild(document.createElement("iframe"));var b=a.contentWindow;b=b.SpeechRecognition||b.webkitSpeechRecognition;if(!b)return a.remove(),!1;b=new b;a.remove();try{return b.start(0),b.stop(),!1}catch(c){return c.name=="TypeError"}});function bv(a){this.i=a;this.h=null}bv.prototype.release=function(){this.i&&xi(this.i);this.h=null};function Yu(a,b,c,d){this.o=a;this.j=b;this.B=c;this.u=d;this.i=new gb;this.m=null;this.h=0;this.l=!1}
Yu.prototype.start=function(a,b,c){var d=this,e,f,g,h,k;return G(function(l){switch(l.i){case 1:d.stop();d.h++;e=d.h;d.l=!0;f=window.SpeechRecognition||window.webkitSpeechRecognition;g=new f;d.m=g;g.lang=b;g.continuous=!0;g.interimResults=!0;if(!(c&&"install"in f&&"available"in f)){l.A(2);break}l.o(3);return l.h(f.available({langs:[b],processLocally:!0}),5);case 5:h=l.j;switch(h){case "available":g.processLocally=!0;break;case "downloading":case "downloadable":return l.A(6);default:return l.return()}l.A(7);
break;case 6:return l.h(f.install({langs:[b],processLocally:!0}),8);case 8:g.processLocally=!0;l.A(7);break;case 7:l.u(2);break;case 3:l.m();case 2:if(e!==d.h)return l.return();k=!1;d.i.I(g,"start",function(){e===d.h&&d.j.ia(5)});d.i.I(g,"result",function(m){var n,p,u,r;return G(function(v){if(v.i==1){if(e!==d.h)return v.return();n=m;p="";for(u=n.resultIndex;u<n.results.length;u++)p+=n.results[u][0].transcript;return v.h(fv(d.o,p),2)}r=v.j;if(r===null||e!==d.h)return v.return();d.B(r);d.j.ia(.75);
v.l()})});d.i.I(g,"error",function(m){e===d.h&&(k=!0,d.u(),m.error=="network"&&d.j.ia(30))});d.i.I(g,"end",function(){d.l&&e===d.h&&(k||d.start(a,b,c))});g.start(a);l.l()}})};Yu.prototype.stop=function(a){a=a===void 0?!0:a;this.h++;this.l=!1;this.i.Pa();this.j.stop();this.m&&(this.m.stop(),this.m=null);a&&this.u()};Yu.prototype.release=function(){this.stop();this.o.release()};Yu.prototype.isActive=function(){return this.l};function Vu(){this.i=this.h=null;this.o=this.m=0;this.l=this.j=null}
function dv(a,b,c){var d,e,f;return G(function(g){if(g.i==1){if(a.j===b&&a.l===c&&a.h)return g.return();a.release();a.m++;d=a.m;if(!(c&&b!=c&&"Translator"in window))return g.return();a.i=new AbortController;g.o(2);return g.h(Translator.create({sourceLanguage:b,targetLanguage:c,signal:a.i.signal}),4)}if(g.i!=2){e=g.j;if(d!==a.m)return e.destroy(),g.return();a.h=e;a.j=b;a.l=c;return g.u(0)}f=g.m();if(f.name=="NotSupportedError")throw f;g.l()})}
function fv(a,b){var c,d;return G(function(e){if(e.i==1){if(!a.h)return e.return(b);a.o++;c=a.o;e.o(2);return e.h(a.h.translate(b),4)}if(e.i!=2)return d=e.j,c!==a.o?e.return(null):e.return(d);e.m();return e.return(null)})}Vu.prototype.release=function(){var a;(a=this.i)==null||a.abort();this.i=null;var b;(b=this.h)==null||b.destroy();this.l=this.j=this.h=null};function gv(){}q=gv.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};q.setTextLanguage=function(){};J("shaka.text.StubTextDisplayer",gv);gv.prototype.setTextLanguage=gv.prototype.setTextLanguage;gv.prototype.setTextVisibility=gv.prototype.setTextVisibility;gv.prototype.isTextVisible=gv.prototype.isTextVisible;gv.prototype.destroy=gv.prototype.destroy;gv.prototype.append=gv.prototype.append;
gv.prototype.remove=gv.prototype.remove;gv.prototype.configure=gv.prototype.configure;function hv(a){var b=this;this.D=!1;this.j=[];this.U=a;this.m=a.Qc();this.l=a.Yb;this.H=null;this.J=!1;this.V=!0;this.G=this.u=this.C=null;this.M=!1;this.h=document.createElement("div");this.h.classList.add("shaka-text-container");this.h.style.textAlign="center";this.h.style.display="flex";this.h.style.flexDirection="column";this.h.style.alignItems="center";this.h.style.justifyContent="flex-end";this.F=new Ke(function(){iv(b);jv(b)});jv(this);this.o=new Ke(function(){kv(b)});this.B=new Map;this.i=
new gb;this.i.I(document,"fullscreenchange",function(){iv(b,!0)});this.i.I(this.m,"seeking",function(){iv(b,!0);jv(b)});this.i.yb(this.m,["play","playing","pause","waiting"],function(){jv(b)});this.i.I(this.U,"ratechange",function(){jv(b)});this.i.I(this.m,"resize",function(){var c=b.m,d=c.videoWidth;c=c.videoHeight;d&&c?b.H=d/c:b.H=null});this.P=!1;this.L=null;"ResizeObserver"in window&&(this.L=new ResizeObserver(function(){b.P||(b.P=!0,requestAnimationFrame(function(){b.P=!1;b.h&&b.h.parentElement&&
b.D&&iv(b,!0)}))}),this.L.observe(this.l));this.K=new Map;this.N=null;"IntersectionObserver"in window&&(this.N=new IntersectionObserver(function(c){c.length&&(c=c[c.length-1],b.V=c.isIntersecting&&c.intersectionRatio>0,b.o.ia(.25))},{root:null,threshold:[.01]}),this.N.observe(this.l));this.i.I(document,"visibilitychange",function(){b.o.Xa()});this.i.I(document,"fullscreenchange",function(){b.o.Xa()});this.i.yb(this.m,["enterpictureinpicture","leavepictureinpicture"],function(){b.o.Xa()});"documentPictureInPicture"in
window&&this.i.I(window.documentPictureInPicture,"enter",function(c){b.o.Xa();b.i.Ja(c.window,"pagehide",function(){b.o.Xa()})});a=this.m;(a.webkitPresentationMode||a.webkitSupportsFullscreen)&&this.i.I(a,"webkitpresentationmodechanged",function(){b.o.Xa()});kv(this)}q=hv.prototype;q.configure=function(a){this.C=a;jv(this);kv(this);iv(this,!0)};q.yk=function(a,b){this.u=Object.assign({},a);this.G=new Bd(Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,b);iv(this,!0)};
q.Pi=function(){if(this.u||this.G)this.G=this.u=null,this.M=!1,iv(this,!0)};q.append=function(a){var b=[].concat(va(this.j));a=t(pu(a));for(var c=a.next(),d={};!c.done;d={rf:void 0},c=a.next())d.rf=c.value,b.some(function(e){return function(f){return Md(f,e.rf)}}(d))||this.j.push(d.rf);this.j.length&&jv(this);iv(this)};
q.destroy=function(){if(!this.h)return Promise.resolve();this.h.parentElement&&this.l.removeChild(this.h);this.h=null;this.D=!1;this.j=[];this.G=this.u=null;this.M=!1;var a;(a=this.F)==null||a.stop();this.F=null;var b;(b=this.o)==null||b.stop();this.o=null;this.B.clear();var c;(c=this.i)==null||c.release();this.i=null;var d;(d=this.L)==null||d.disconnect();this.L=null;var e;(e=this.N)==null||e.disconnect();this.N=null;return Promise.resolve()};
q.remove=function(a,b){if(!this.h)return!1;var c=this.j.length;this.j=this.j.filter(function(d){return d.startTime<a||d.endTime>=b});iv(this,c>this.j.length);this.j.length||jv(this);return!0};q.isTextVisible=function(){return this.D};q.setTextVisibility=function(a){(this.D=a)?(this.h.parentElement||this.l.appendChild(this.h),iv(this,!0)):this.h.parentElement&&this.l.removeChild(this.h)};q.setTextLanguage=function(a){a&&a!="und"?this.h.setAttribute("lang",a):this.h.setAttribute("lang","")};
function jv(a){if(a.F)if(!a.j.length||a.J||a.m.paused)a.F.stop();else{var b,c,d=(c=(b=a.u||a.C)==null?void 0:b.subtitleDelay)!=null?c:0;b=a.m.currentTime-d;c=1;d=lv(a,a.j,b);d!=null&&a.m.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA&&(c=Math.min(c,Math.max(0,d-b)));a.F.ia(Math.max(mv,c/(Math.abs(a.U.Ta())||1)))}}
function lv(a,b,c){function d(g){g>c&&(e==null||g<e)&&(e=g)}var e=null;b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,d(f.startTime),d(f.endTime),f.nestedCues.length&&(f=lv(a,f.nestedCues,c),f!=null&&d(f));return e}
function kv(a){var b=a.m,c=!1;window.documentPictureInPicture&&window.documentPictureInPicture.window?c=!0:document.pictureInPictureElement===b&&(c=!0);var d=!1;document.fullscreenEnabled&&document.fullscreenElement===a.l?d=!0:b.webkitSupportsFullscreen&&(d=b.webkitDisplayingFullscreen);b=document.visibilityState==="visible";var e,f;(f=(e=a.C)==null?void 0:e.suspendRenderingWhenHidden)!=null&&!f||c||d||b&&a.V?a.J&&(a.J=!1,jv(a),requestAnimationFrame(function(){a.h&&a.h.parentElement&&a.D&&iv(a)})):
a.J||(a.J=!0,a.F&&a.F.stop())}function nv(a,b){for(;b!=null;){if(b==a.h)return!0;b=b.parentElement}return!1}function ov(a,b,c){var d=b,e=a.B.get(b)||null;if(!e&&c&&c.positionArea!=0){c=t(a.B.keys());for(var f=c.next();!f.done;f=c.next())f=f.value,Md(b,f)&&(d=f,e=a.B.get(f))}return{key:d,Wh:e}}
function pv(a,b,c,d,e){var f=a.u||a.C,g=!1,h=[],k=[];b=t(b);for(var l=b.next();!l.done;l=b.next()){l=l.value;e.push(l);var m=ov(a,l,f),n=m.key;m=m.Wh;var p=l.startTime<=d&&l.endTime>d,u=m?m.Bi:null;m&&(h.push(m.tf),m.Dc&&h.push(m.Dc),p||(g=!0,a.B.delete(n),m=null));p&&(k.push(l),m?nv(a,u)||(g=!0):(qv(a,l,e),m=a.B.get(n),u=m.Bi,g=!0));l.nestedCues.length>0&&u&&pv(a,l.nestedCues,u,d,e);e.pop()}if(g){d=t(h);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);k.sort(function(r,
v){return r.startTime!=v.startTime?r.startTime-v.startTime:r.endTime-v.endTime});k=t(k);for(d=k.next();!d.done;d=k.next())d=ov(a,d.value,f).Wh,d.Dc?(d.Dc.contains(c)&&d.Dc.removeChild(c),c.appendChild(d.Dc),d.Dc.appendChild(d.tf)):c.appendChild(d.tf)}}function rv(a,b,c){return b.some(function(d){return d.startTime<=c&&d.endTime>c&&sv(a,d)})}function sv(a,b){return!!b.payload.replace(/[\u00a0\u200B]/g," ").trim()||!!b.backgroundImage||b.nestedCues.some(function(c){return sv(a,c)})}
function iv(a,b){b=b===void 0?!1:b;if(a.h&&!a.J){var c=a.u||a.C,d,e=(d=c==null?void 0:c.subtitleDelay)!=null?d:0;d=a.m.currentTime-e;e=!!a.G&&!rv(a,a.j,d);e!=a.M&&(b=!0,a.M=e);e&&(b=!0);var f=a.D||e;f?a.h.parentElement||a.l.appendChild(a.h):a.h.parentElement&&a.l.removeChild(a.h);if(!f||b){b=t(a.K.values());for(var g=b.next();!g.done;g=b.next())xi(g.value);xi(a.h);a.B.clear();a.K.clear()}f&&(b=e&&a.G?[a.G]:a.j,c&&c.positionArea!=0&&(b=b.map(function(h){var k=a.u||a.C;h=h.clone();Hu(h);h.region=tv.value();
switch(k.positionArea){case 1:h.textAlign="left";h.displayAlign="before";break;case 2:h.textAlign=Dd;h.displayAlign="before";break;case 3:h.textAlign="right";h.displayAlign="before";break;case 4:h.textAlign="left";h.displayAlign="center";break;case 5:h.textAlign=Dd;h.displayAlign="center";break;case 6:h.textAlign="right";h.displayAlign="center";break;case 7:h.textAlign="left";h.displayAlign=Id;break;case 8:h.textAlign=Dd;h.displayAlign=Id;break;case 9:h.textAlign="right",h.displayAlign=Id}return h})),
pv(a,b,a.h,d,[]))}}
function qv(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"&&uv(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.H===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==ad?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==ad?"%":"px")+"-"+g.regionAnchorX+"x"+g.regionAnchorY;if(a.K.has(c))c=a.K.get(c);else{e=document.createElement("span");var k=
g.heightUnits==ad?"%":"px",l=g.widthUnits==ad?"%":"px",m=g.viewportAnchorUnits==ad?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,p=g.width;g.heightUnits===2&&(n=g.height*5.33,k="%");g.widthUnits===2&&(p=g.width*h,l="%");e.style.height=n+k;e.style.width=p+l;g.viewportAnchorUnits===2?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.H===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*p/100,e.style.top=h+"%",e.style.left=
k+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*p/100+m);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=vv(b.displayAlign);a.K.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.B.set(b,{tf:f,Bi:e,Dc:c})}function wv(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Cd?c:a==="left"||a==="start"&&b===Ed||a==="end"&&b==="rtl"?"line-left":a==="right"||a==="start"&&b==="rtl"||a==="end"&&b===Ed?"line-right":"center"}
function uv(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=xv(c.linePadding,c,a.l);f.paddingRight=xv(c.linePadding,c,a.l);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
"url('"+c.backgroundImage.replace(/['"()\\]/g,"")+"')",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=yv(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="flex-start";else if(c.textAlign=="right"||c.textAlign=="end")f.width="100%",f.alignItems="flex-end";f.justifyContent=vv(c.displayAlign)}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;d=(d=a.u||
a.C)?d.fontScaleFactor:1;if(d!==1||c.fontSize)f.fontSize=xv(c.fontSize||"1em",c,a.l,d);d=c.line;d!=null&&(g=c.lineInterpretation,g==Gd&&(g=1,h=16,a.H&&a.H<1&&(h=32),d=d<0?100+d/h*100:d/h*100),g==1&&(f.position="absolute",c.writingMode==Fd?(f.width="100%",c.lineAlign==Hd?f.top=d+"%":c.lineAlign=="end"&&(f.bottom=100-d+"%")):c.writingMode=="vertical-lr"?(f.height="100%",c.lineAlign==Hd?f.left=d+"%":c.lineAlign=="end"&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Hd?f.right=d+"%":c.lineAlign==
"end"&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=wv(c);a=="line-left"?(f.cssFloat="left",c.position!==null&&(f.position="absolute",c.writingMode==Fd?(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==Fd?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):c.position!==null&&c.position!=50&&(f.position="absolute",c.writingMode==Fd?(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==Fd?f.width=c.size+"%":f.height=c.size+"%")}
function xv(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 yv(a,b){for(var c=a.length-1;c>=0;c--){var d=b(a[c]);if(d||d===0)return d}return null}
function vv(a){switch(a){case "before":return"flex-start";case "center":return"center";default:return"flex-end"}}J("shaka.text.UITextDisplayer",hv);hv.prototype.setTextLanguage=hv.prototype.setTextLanguage;hv.prototype.setTextVisibility=hv.prototype.setTextVisibility;hv.prototype.isTextVisible=hv.prototype.isTextVisible;hv.prototype.remove=hv.prototype.remove;hv.prototype.destroy=hv.prototype.destroy;hv.prototype.append=hv.prototype.append;hv.prototype.clearTextStylePreview=hv.prototype.Pi;
hv.prototype.setTextStylePreview=hv.prototype.yk;hv.prototype.configure=hv.prototype.configure;var mv=1/60,tv=new mb(function(){var a=new $c;a.id="shaka-custom-region";a.height=90;a.width=90;a.viewportAnchorX=5;a.viewportAnchorY=5;return a});function zv(a,b){function c(g){var h=[];switch(g.textAlign){case "left":h.push("align:left");break;case "right":h.push("align:right");break;case Dd:h.push("align:middle");break;case "start":h.push("align:start");break;case "end":h.push("align:end")}switch(g.writingMode){case "vertical-lr":h.push("vertical:lr");break;case "vertical-rl":h.push("vertical:rl")}return h.length?" "+h.join(" "):""}function d(g){for(var h=g,k=t(b),l=k.next();!l.done;l=k.next())l=l.value,l.end&&l.start<g&&(h+=l.end-l.start);
g=Math.floor(h/3600);k=Math.floor(h/60%60);l=Math.floor(h%60);h=Math.floor(h*1E3%1E3);return(g<10?"0":"")+g+":"+(k<10?"0":"")+k+":"+(l<10?"0":"")+l+"."+(h<100?h<10?"00":"0":"")+h}var e=ou(a);a="WEBVTT\n\n";e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,a+=d(f.startTime)+" --\x3e "+d(f.endTime)+c(f)+"\n",a+=f.payload+"\n\n";return a}J("shaka.text.WebVttGenerator",function(){});/*
 @license
 Copyright 2024 Streaming Video Technology Alliance
 SPDX-License-Identifier: Apache-2.0
*/
var Av=["cen","e","h","ts"];var Bv="ab bg bl br bs bsa bsd bsda cdn cid cs d dfa dl ec lab lb ltc msd mtp nor nr ot pb pr pt rtp sf sid sn st sta su tab tb tbl tpb v".split(" ");var Cv="cmsdd cmsds rc smrt ttfb ttfbb ttlb url".split(" ");var Dv="bl br bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" ");var Ev=new Map([["ps","sta"],["pr","pr"],["c","cid"],["b","bg"],["bc","br"]]);function Fv(a,b){Array.isArray(a)&&(a=a.map(function(c){return c instanceof Fv?c:new Fv(c)}));this.value=a;this.Tb=b}function Gv(a){this.description=a}function Hv(a,b){var c=Error;a=Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":typeof a==="object"?JSON.stringify(a):String(a);return c('failed to serialize "'+a+'" as '+b,{cause:void 0})}
function Iv(a,b){if(a<0)return-Iv(-a,b);b=Math.pow(10,b);return Math.abs(a*b%1-.5)<Number.EPSILON?(a=Math.floor(a*b),(a%2===0?a:a+1)/b):Math.round(a*b)/b}function Jv(a){if(a<-999999999999999||999999999999999<a)throw Hv(a,"Integer");return a.toString()}var Kv=/[\x00-\x1f\x7f]+/;function Lv(a){a=a.description||a.toString().slice(7,-1);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(a)===!1)throw Hv(a,"Token");return a}
function Mv(a){switch(typeof a){case "number":if(!Number.isFinite(a))throw Hv(a,"Bare Item");if(Number.isInteger(a))a=Jv(a);else{var b=Iv(a,3);if(Math.floor(Math.abs(b)).toString().length>12)throw Hv(a,"Decimal");a=b.toString();a=a.includes(".")?a:a+".0"}return a;case "string":if(Kv.test(a))throw Hv(a,"String");return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"';case "symbol":return Lv(a);case "boolean":if(typeof a!=="boolean")throw Hv(a,"Boolean");return a?"?1":"?0";case "object":if(a instanceof
Date)return"@"+Jv(a.getTime()/1E3);if(a instanceof Uint8Array){if(ArrayBuffer.isView(a)===!1)throw Hv(a,"Byte Sequence");return":"+btoa(String.fromCharCode.apply(String,va(a)))+":"}if(a instanceof Gv)return Lv(a);default:throw Hv(a,"Bare Item");}}function Nv(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw Hv(a,"Key");return a}function Ov(a){return a==null?"":Object.entries(a).map(function(b){var c=t(b);b=c.next().value;c=c.next().value;return c===!0?";"+Nv(b):";"+Nv(b)+"="+Mv(c)}).join("")}
function Pv(a){return a instanceof Fv?Mv(a.value)+Ov(a.Tb):Mv(a)}
function Qv(a){var b={Ai:!1};b=b===void 0?{Ai:!0}:b;if(typeof a!=="object"||a==null)throw Hv(a,"Dict");a=a instanceof Map?a.entries():Object.entries(a);b=b.Ai?" ":"";return Array.from(a).map(function(c){c=t(c);var d=c.next().value;c=c.next().value;c instanceof Fv===!1&&(c=new Fv(c));d=Nv(d);c.value===!0?d+=Ov(c.Tb):(d+="=",Array.isArray(c.value)?(c="("+c.value.map(Pv).join(" ")+")"+Ov(c.Tb),c=d+c):c=d+Pv(c),d=c);return d}).join(","+b)};function Rv(a,b){try{var c=new URL(a)}catch(f){return a}b=new URL(b);if(c.origin!==b.origin)return a;a=c.pathname.split("/").slice(1);b=b.pathname.split("/").slice(1,-1);for(var d=Math.min(a.length,b.length),e=0;e<d&&a[e]===b[e];e++)a.shift(),b.shift();for(;b.length;)b.shift(),a.unshift("..");return a.join("/")+c.search+c.hash}function Sv(a){a=new URL(a);return a.origin+a.pathname.substring(0,a.pathname.lastIndexOf("/")+1)};function Tv(a){return a instanceof Fv?new Fv(Math.round(a.value),a.Tb):Math.round(a)}function Uv(a){return Array.isArray(a)?a.map(Tv):Tv(a)}function Vv(a,b){if(Array.isArray(a))return a.map(function(c){return Vv(c,b)});if(a instanceof Fv&&typeof a.value==="string")return new Fv(Vv(a.value,b),a.Tb);b.ld&&(a=Rv(a,Sv(b.ld)));return b.version===1?encodeURIComponent(a):a}function Wv(a){return a instanceof Fv?new Fv(Math.round(a.value/100)*100,a.Tb):Math.round(a/100)*100}
function Xv(a){return Array.isArray(a)?a.map(Wv):Wv(a)}var Yv={br:Uv,d:Uv,bl:Xv,dl:Xv,mtp:Xv,nor:function(a,b){var c=a;b.version>=2&&(a instanceof Fv&&typeof a.value==="string"?c=new Fv([a]):typeof a==="string"&&(c=[a]));return Vv(c,b)},rtp:Xv,tb:Uv};var Zv=new Set("ab bl br bsa bsd bsda lab lb mtp pb tab tb tbl tpb".split(" "));var $v=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;var aw=new Set(Bv);function bw(a){return aw.has(a)||$v.test(a)};var cw=new Set(Cv);var dw=new Set(Av);var ew=new Set(Dv);function fw(a){return ew.has(a)||$v.test(a)};var gw=new Set(["ot","sf","st","e","sta"]);function hw(a){return typeof a==="number"?Number.isFinite(a):a!=null&&a!==""&&a!==!1};var iw={},jw=(iw.event=function(a){return bw(a)||cw.has(a)||dw.has(a)},iw.request=bw,iw);function kw(a,b){if(Array.isArray(a)){var c;b&&(c=a.find(function(d){return d&&d.Tb&&d.Tb.ot===b}));c||(c=a[0]);return kw(c)}return a instanceof Fv?a.value:a}
function lw(a){for(var b={},c=t(Object.entries(a)),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;e==null?b[d]=e:d==="nor"?(d=(Array.isArray(e)?e:[e])[0],d instanceof Fv?(b.nor=d.value,(d=d.Tb)&&d.r&&(b.nrr=d.r)):b.nor=d):Zv.has(d)?b[d]=kw(e,a.ot):b[d]=e}return b}
function mw(a,b){b=b||{};var c={};if(a==null||typeof a!=="object")return c;var d=b.version||a.v||2,e=b.sg||"request";a=d===1?lw(a):a;var f=d===1?fw:jw[e],g=Object.keys(a).filter(f);a.e&&a.e!=="rr"&&(g=g.filter(function(m){return!cw.has(m)}));f=b.filter;typeof f==="function"&&(g=g.filter(f));if(f=e==="event"){var h=a.e;g.includes("e")||h==null||g.push("e");g.includes("ts")||g.push("ts");g.includes("cen")||a.cen==null||h!=="ce"||g.push("cen");(h=h?Ev.get(h):void 0)&&a[h]!=null&&!g.includes(h)&&g.push(h)}if(g.length===
0)return c;d>1&&!g.includes("v")&&g.push("v");e={version:d,sg:e,ld:b.ld};g.sort();g=t(g);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h],l=b.Zi&&b.Zi[h]||Yv[h];typeof l==="function"&&(k=l(k,e));if(h==="v")if(d===1)continue;else k=d;if(h!=="pr"||k!==1||f&&a.e==="pr")if(f&&h==="ts"&&!Number.isFinite(k)&&(k=Date.now()),l=f&&k===!1&&h==="bg"&&a.e==="b",hw(k)||l)gw.has(h)&&typeof k==="string"&&(k=new Gv(k)),c[h]=k}return c};var nw={Fl:"CMCD-Object",br:"CMCD-Object",d:"CMCD-Object",Rl:"CMCD-Object",Sl:"CMCD-Object",ot:"CMCD-Object",Yl:"CMCD-Object",tb:"CMCD-Object",$l:"CMCD-Object",bl:"CMCD-Request",Ll:"CMCD-Request",Pl:"CMCD-Request",dl:"CMCD-Request",ltc:"CMCD-Request",mtp:"CMCD-Request",nor:"CMCD-Request",nrr:"CMCD-Request",Ul:"CMCD-Request",sn:"CMCD-Request",Ck:"CMCD-Request",su:"CMCD-Request",Zl:"CMCD-Request",cid:"CMCD-Session",msd:"CMCD-Session",sf:"CMCD-Session",sid:"CMCD-Session",st:"CMCD-Session",v:"CMCD-Session",
bg:"CMCD-Status",bs:"CMCD-Status",Hl:"CMCD-Status",Il:"CMCD-Status",Jl:"CMCD-Status",Kl:"CMCD-Status",Ql:"CMCD-Status",Tl:"CMCD-Status",pr:"CMCD-Status",pt:"CMCD-Status",rtp:"CMCD-Status"};function ow(a){return Object.keys(a).reduce(function(b,c){var d=a[c];d&&d.forEach(function(e){return b[e]=c});return b},{})};function pw(a,b,c){var d=new Set(b.Pb||[]);return{version:b.version||2,sg:a,filter:function(e){return d.has(e)},ld:c}}function qw(a,b){if(a===b)return!0;if(a.length!==b.length)return!1;for(var c=0;c<a.length;c++){var d=a[c],e=b[c];if(d!==e){if(typeof d==="number"||typeof e==="number")return!1;var f=e;if(d.value!==f.value)return!1;e=d.params;d=f.params;f=e&&Object.keys(e)[0];var g=d&&Object.keys(d)[0];if(f!==g||f&&g&&e&&d&&e[f]!==d[g])return!1}}return!0}function rw(a){return a}
for(var sw=function(){var a=[];Ev.forEach(function(b,c){b==="br"?a.push({event:c,pd:b,wf:function(d,e){return d===void 0||e===void 0?d===e:qw(d,e)},ni:function(d){return d.slice()}}):a.push({event:c,pd:b,wf:Object.is,ni:rw})});return a}(),tw=new Map,uw=t(sw),vw=uw.next();!vw.done;vw=uw.next()){var ww=vw.value;tw.set(ww.event,ww)}
function xw(a,b){this.B=performance.timeOrigin||performance.timing&&performance.timing.fetchStart||Date.now()-performance.now();this.h={};var c=a.version||2,d=a.eventTargets||[],e=a.sid||crypto.randomUUID(),f=a.Jg||"query",g=[];d=t(d);for(var h=d.next();!h.done;h=d.next())(h=h.value)&&h.url&&h.events&&h.events.length&&g.push({version:h.version||2,Pb:h.Pb?[].concat(h.Pb):[],url:h.url,events:[].concat(h.events),interval:h.interval!=null?h.interval:30,batchSize:h.batchSize||1});this.i=Object.assign({},
a,{version:c,Jg:f,sid:e,cid:a.cid,Pb:a.Pb,eventTargets:g});this.l=NaN;this.j=new Map;this.o={sn:0,Dd:!1};this.u=b;this.m={};this.h={cid:this.i.cid,sid:this.i.sid,v:this.i.version};a=t(this.i.eventTargets||[]);for(b=a.next();!b.done;b=a.next())this.j.set(b.value,{Xf:void 0,sn:0,Dd:!1,queue:[]})}xw.prototype.start=function(){var a=this;this.j.forEach(function(b,c){yw(b);if(c.interval!==0&&c.events&&c.events.includes("t")){var d=function(){zw(a,b,c,"t");Aw(a)};b.Xf=setInterval(d,c.interval*1E3);d()}})};
xw.prototype.stop=function(a){(a===void 0?0:a)&&this.flush();this.j.forEach(function(b){yw(b)})};xw.prototype.flush=function(){Aw(this,!0)};function Bw(a,b){b.sid&&b.sid!==a.h.sid&&Cw(a);b.msd&&!isNaN(b.msd)&&(a.l=b.msd);a.h=Object.assign({},a.h,b,{msd:void 0});for(var c=t(sw),d=c.next();!d.done;d=c.next())d=d.value,d.pd in b&&!d.wf(a.h[d.pd],a.m[d.pd])&&Dw(a,d.event)}
function Dw(a,b,c){var d=c||{};if(c=tw.get(b)){var e=c.pd,f=d[e];f!==void 0&&(a.h[e]=f);f=a.h[e];if(f===void 0||c.wf(f,a.m[e]))return;a.m[e]=c.ni(f)}a.j.forEach(function(g,h){zw(a,g,h,b,d)});Aw(a)}function zw(a,b,c,d,e){e=e||{};c.events&&c.events.includes(d)&&(c=Object.assign({},a.h,e,{e:d,ts:e.ts!=null?e.ts:Date.now(),sn:b.sn++}),isNaN(a.l)||b.Dd||(c.msd=a.l,b.Dd=!0),b.queue.push(c))}
function Ew(a,b,c){var d=b.customData||{};b=Object.assign({},b,{headers:Object.assign({},b.headers||{}),eh:Object.assign({},d,{cmcd:{}})});if(!a.i.Pb||!a.i.Pb.length||!b.url)return b;d=new URL(b.url);c=Object.assign({},a.h,c||{},{sn:a.o.sn++});var e=pw("request",a.i,b.url);isNaN(a.l)||a.o.Dd||(c.msd=a.l,a.o.Dd=!0);var f=b.eh.cmcd=mw(c,e);switch(a.i.Jg){case "query":if(a=Qv(f))d.searchParams.set("CMCD",a),b.url=d.toString();break;case "headers":a=Object;d=a.assign;c=b.headers;var g={};var h=e.Ml;e=
{};if(f){var k=Object.keys(f);h=h?ow(h):{};k=t(k);for(var l=k.next();!l.done;l=k.next()){l=l.value;var m=nw[l]||h[l]||"CMCD-Request";(e[m]||(e[m]={}))[l]=f[l]}}f=t(Object.entries(e));for(e=f.next();!e.done;e=f.next())h=t(e.value),e=h.next().value,h=h.next().value,(h=Qv(h))&&(g[e]=h);d.call(a,c,g)}return b}
function Aw(a,b){b=b===void 0?!1:b;var c=!1;a.j.forEach(function(d,e){var f=d.queue;if(f.length&&(!(f.length<e.batchSize)||b)){var g=f.splice(0,b?f.length:e.batchSize);Fw(a,e,g).catch(function(){d.queue.unshift.apply(d.queue,va(g))});c=c||f.length>0}});c&&Aw(a)}
function Fw(a,b,c){var d,e,f;return G(function(g){if(g.i==1)return d=pw("event",b),g.h(a.u({url:b.url,method:"POST",headers:{"Content-Type":"application/cmcd"},body:c.map(function(h){h?(h=mw(h,d),h=Qv(h)):h="";return h}).join("\n")+"\n"}),2);e=g.j;f=e.status;if(f===410)Gw(a,b);else if(f===429||f>499&&f<600)throw Error("Event report failed with status "+f);g.l()})}function yw(a){clearInterval(a.Xf);a.Xf=void 0}function Gw(a,b){var c=a.j.get(b);c&&(yw(c),a.j.delete(b))}
function Cw(a){a.j.forEach(function(b){b.sn=0});a.o.sn=0;a.m={}};var Hw=/CMCD=[^&#]+/;function Iw(a,b,c){b?(b?(b?(b=mw(b,c),b=Qv(b)):b="",b=encodeURIComponent(b)):b="",b="CMCD="+b):b="";if(!b)return a;if(Hw.test(a))return a.replace(Hw,b);c=a.includes("?")?"&":"?";return a+c+b};function Jw(a,b){this.l=a;this.m=b;this.o=this.h=this.i=null;this.C=void 0;this.u=new Map;this.j=new gb;this.B=0}Jw.prototype.setMediaElement=function(a){this.i=a;Kw(this)};Jw.prototype.configure=function(a){var b=this.m;this.m=a;if(this.h){var c=b&&a.enabled&&(b.sessionId!==a.sessionId||b.contentId!==a.contentId||b.version!==a.version||b.useHeaders!==a.useHeaders||b.eventTargets!==a.eventTargets);(b&&b.enabled&&!a.enabled||c)&&Lw(this)}Kw(this)};
function Lw(a){a.h&&(a.h.stop(!0),a.h=null);a.o=null;a.C=void 0;a.u.clear();a.B=0;a.j.Pa()}function Mw(a,b){a.h&&(a.B=b,a.i&&a.i.autoplay&&(b=a.i.play())&&b.catch(function(){a.B=0}))}
function Nw(a,b,c){if(!a.h)return b;try{var d=Ow(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="a";break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e="av";break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "audio/x-mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e="m";break a}e=
void 0}d.ot=e;d.su=!0;return Iw(b,d,Pw(a,b))}catch(f){return Xa("CMCD_SRC_ERROR","Could not generate src CMCD data.",f),b}}function Kw(a){if(!a.h&&a.m&&a.m.enabled&&a.i){var b=Qw(a.m);a.h=new xw(b,Rw(a));a.h.start();Sw(a)}}
function Qw(a){a.sessionId||(a.sessionId=window.crypto.randomUUID());var b=a.includeKeys&&a.includeKeys.length?a.includeKeys:Tw(a.version);b={sid:a.sessionId,cid:a.contentId,Jg:a.useHeaders?"headers":"query",Pb:b,version:a.version===2?2:1};var c=a.eventTargets;c&&c.length&&(b.eventTargets=c.filter(function(d){return d.enabled!==!1&&d.url&&d.events&&d.events.length}).map(function(d){var e=d.includeKeys&&d.includeKeys.length?d.includeKeys:Tw(d.version||a.version);return{url:d.url,events:d.events,interval:d.interval,
batchSize:d.batchSize,Pb:e,version:2}}));return b}function Tw(a){return a===2||a===2?Array.from(new Set([].concat(Bv,Cv,Av))):[].concat(Dv)}function Rw(a){return function(b){var c,d,e,f,g,h;return G(function(k){if(k.i==1)return c=Mj,d=gj(),e=b.url,f=Ej([e],d),f.method=b.method||"POST",f.headers=b.headers||{},f.body=Fb(b.body),k.o(2),g=a.l.L,k.h(g.request(c.Uk,f).promise,4);if(k.i!=2)return k.return({status:200});h=k.m();return k.return({status:h&&h.status?h.status:0})})}}
function Uw(a,b){a.h&&a.o!==b&&(a.o=b,Bw(a.h,{Ck:b}))}
function Vw(a,b,c){try{var d={url:b.uris[0],headers:Object.assign({},b.headers||{}),eh:{}},e=Ew(a.h,d,c),f=e.headers||{},g=Object.keys(d.headers).length;if(Object.keys(f).length>g){b.headers||(b.headers={});for(var h=t(Object.keys(f)),k=h.next();!k.done;k=h.next()){var l=k.value;l in d.headers||(b.headers[l]=f[l])}}var m=e.url;if(m&&m!==d.url)if(b.uris.length===1)b.uris=[m];else{a=null;try{a=(new URL(m)).searchParams.get("CMCD")}catch(p){}if(a!=null){var n=a;b.uris=b.uris.map(function(p){if(p.includes("offline:"))return p;
try{var u=new URL(p);u.searchParams.set("CMCD",n);return u.toString()}catch(r){return p}})}}}catch(p){Xa("CMCD_REQUEST_ERROR","Could not apply CMCD data to request.",p)}}function Ww(a){return(a=a.m.eventTargets)?a.some(function(b){return b.enabled!==!1&&b.events&&b.events.includes("rr")}):!1}function Ow(a){return{v:a.m.version,sid:a.m.sessionId,cid:a.m.contentId,sf:a.C,mtp:a.l.getBandwidthEstimate()/1E3}}
function Pw(a,b){var c={};if(b&&!b.includes("offline:"))try{c.ld=(new URL(b)).origin}catch(d){}a.m.version!=null&&(c.version=a.m.version);c.sg="request";return c}
function Sw(a){a.j.I(a.i,"pause",function(){Uw(a,"a")});a.j.I(a.i,"playing",function(){Uw(a,"p");a.h&&a.B&&(Bw(a.h,{msd:Date.now()-a.B}),a.B=0)});a.j.I(a.i,"seeking",function(){Uw(a,"k")});a.j.I(a.i,"ended",function(){Uw(a,"e")});a.j.I(a.i,"volumechange",function(){a.h&&a.i&&Dw(a.h,a.i.muted?"m":"um")});a.j.I(a.l,"buffering",function(c){Uw(a,c.buffering?"r":"p")});a.j.I(a.l,"adaptation",function(){if(a.h&&a.l){var c=a.l.kc().find(function(d){return d.active});c&&c.bandwidth&&Bw(a.h,{br:[c.bandwidth/
1E3]})}});a.j.I(a.l,"error",function(){Uw(a,"f");a.h&&Dw(a.h,"e")});a.j.I(document,"fullscreenchange",function(){a.h&&Dw(a.h,document.fullscreenElement?"pe":"pc")});var b=a.i;(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&a.j.I(b,"webkitpresentationmodechanged",function(){a.h&&(b.webkitPresentationMode?Dw(a.h,b.webkitPresentationMode!=="inline"?"pe":"pc"):b.webkitSupportsFullscreen&&Dw(a.h,b.webkitDisplayingFullscreen?"pe":"pc"))});a.j.I(a.i,"enterpictureinpicture",function(){a.h&&Dw(a.h,
"pe")});a.j.I(a.i,"leavepictureinpicture",function(){a.h&&Dw(a.h,"pc")});"documentPictureInPicture"in window&&a.j.I(window.documentPictureInPicture,"enter",function(c){a.h&&(Dw(a.h,"pe"),a.j.Ja(c.window,"pagehide",function(){a.h&&Dw(a.h,"pc")}))});a.j.I(document,"visibilitychange",function(){a.h&&Bw(a.h,{bg:document.hidden})});a.j.I(a.l,"complete",function(){Uw(a,"e")})}
function Xw(a){if(a.type===0)return"i";if(a=a.stream){var b=a.type;if(b=="video")return a.codecs&&a.codecs.includes(",")?"av":"v";if(b=="audio")return"a";if(b=="text")return a.mimeType==="application/mp4"?"tt":"c"}}function Yw(a,b){b=a.l.dc()[b];if(!b.length)return NaN;var c=a.i?a.i.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:NaN}
function Zw(a,b){b=a.l.dc()[b];if(!b.length)return 0;var c=a.i?a.i.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:0}function $w(a,b){var c=a.l.kc();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.type==="variant"&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case "v":return a.videoBandwidth||NaN;case "a":return a.audioBandwidth||NaN;default:return a.bandwidth}}
J("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",xl:"s",OTHER:"o"});J("shaka.util.CmcdManager.EventType",{Tk:"bc",kl:"ps",fl:"pr",ERROR:"e",Al:"t",Vk:"c",Sk:"b",cl:"m",Cl:"um",il:"pe",hl:"pc",rl:"rr",Pk:"as",Ok:"ae",Nk:"abs",Mk:"abe",wl:"sk",Wk:"ce"});J("shaka.util.CmcdManager.PlayerState",{zl:"s",jl:"p",ul:"k",ql:"r",PAUSED:"a",El:"w",Xk:"e",Yk:"f",ol:"q",ll:"d"});function ax(a){this.i=a;this.h=null}q=ax.prototype;q.configure=function(a){this.i=a};q.oh=function(){return this.i.enabled&&this.i.applyMaximumSuggestedBitrate&&this.h&&this.h.has(bx)?this.h.get(bx)*1E3:null};q.mh=function(){return this.i.enabled&&this.h&&this.h.has(cx)?this.h.get(cx)*1E3:null};q.zj=function(){return this.i.enabled&&this.h&&this.h.has(dx)?this.h.get(dx):null};q.Aj=function(){return this.i.enabled&&this.h&&this.h.has(ex)?this.h.get(ex):null};
q.getBandwidthEstimate=function(a){var b=this.mh();if(!b)return a;var c=this.i.estimatedThroughputWeightRatio;return c>0&&c<=1?a*(1-c)+b*c:a};function fx(a){return a?a.toLowerCase()==="false"?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}J("shaka.util.CmsdManager",ax);ax.prototype.getBandwidthEstimate=ax.prototype.getBandwidthEstimate;ax.prototype.getRoundTripTime=ax.prototype.Aj;ax.prototype.getResponseDelay=ax.prototype.zj;ax.prototype.getEstimatedThroughput=ax.prototype.mh;
ax.prototype.getMaxBitrate=ax.prototype.oh;var cx="etp",bx="mb",dx="rd",ex="rtt";function gx(){this.h=null;this.i=[]}function hx(a,b){return G(function(c){if(c.i==1)return a.h?c.h(new Promise(function(d){return a.i.push(d)}),2):c.A(2);a.h=b;c.l()})}gx.prototype.release=function(){this.i.length>0?this.i.shift()():this.h=null};function ix(a){this.h=a;this.j=this.i=null}ix.prototype.start=function(a,b){function c(e,f){d.h&&d.j===c&&a(e,f);d.h&&d.j===c&&!b&&(d.i=d.h.requestVideoFrameCallback(c))}var d=this;b=b===void 0?!1:b;jx(this);if(!(this.h&&"requestVideoFrameCallback"in this.h))return!1;this.j=c;this.i=this.h.requestVideoFrameCallback(c);return!0};ix.prototype.release=function(){jx(this);this.h=null};
function jx(a){if(a.i!==null){var b,c;(b=a.h)==null||(c=b.cancelVideoFrameCallback)==null||c.call(b,a.i);a.i=null}a.j=null};function Z(a,b,c){b=b===void 0?null:b;oj.call(this);var d=this;this.m=kx;this.i=null;this.Yb=b;this.Ma=!1;this.Wd=new gb;this.Od=new gb;this.o=new gb;this.Jb=new gb;this.fd=new gb;this.G=this.H=this.C=this.L=null;this.Yd=0;this.Aa=new gx;this.U=this.V=this.ma=this.j=this.Wb=this.J=this.l=this.Nd=this.ba=this.Ug=this.La=this.M=this.Za=this.xa=this.Xb=this.Z=this.Ya=this.N=this.Hb=null;this.oa=!1;this.Qd=this.B=null;this.Xd=1E9;this.Vd=[];this.Vb=new Map;this.Ud=[];this.Ze=-1;this.h=lx(this);this.df=
Ts();this.ea=null;this.$d=-1;this.Ib=null;this.Na={width:Infinity,height:Infinity};this.Pd=new Kp(this.h,this.Na,null);this.Sd=[];this.u=null;this.P=this.h.adaptationSetCriteriaFactory();b={preferredAudio:this.h.preferredAudio,preferredVideo:this.h.preferredVideo,language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:this.h.mediaSource.codecSwitchingStrategy,
audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:this.keySystem()};Vs(b);this.P.configure(b);var e;this.Td=((e=this.h.preferredText[0])==null?void 0:e.language)||"";var f;this.bf=((f=this.h.preferredText[0])==null?void 0:f.role)||"";var g;this.$e=((g=this.h.preferredText[0])==null?void 0:g.forced)||!1;this.gd=[];c&&c(this);this.M=new Jw(this,this.h.cmcd);this.La=new ax(this.h.cmsd);this.L=mx(this);this.Ba=this.Fa=this.Ua=this.D=null;this.gf=!1;this.cf=[];this.ef=new Ke(function(){return G(function(h){if(h.i==
1)return d.Fa?h.h(d.Mb(d.Ba,!0),3):h.A(0);if(h.i!=4)return h.h(d.load(d.Fa),4);d.gf?d.Ba.pause():d.Ba.play();d.Fa=null;d.gf=!1;h.l()})});nx&&(this.D=nx(this),this.D.configure(this.h.ads),this.fd.I(this.D,"ad-content-pause-requested",function(h){var k,l;return G(function(m){if(m.i==1){d.ef.stop();if(d.Fa)return m.A(0);d.Ba=d.i;d.gf=d.xd();k=h.saveLivePosition||!1;l=!0;d.isLive()&&(l=k);return m.h(d.gh(!0,l),3)}d.Fa=m.j;m.l()})}),this.fd.I(this.D,"ad-content-resume-requested",function(h){h=h.offset||
0;if(d.Fa){var k=d.Fa;k.B&&h&&(typeof k.B==="number"?k.B+=h:k.B.setTime(k.B.getTime()+h*1E3))}d.ef.ia(.1)}),this.fd.I(this.D,"ad-content-attach-requested",function(){return G(function(h){if(h.i==1)return d.i||!d.Ba?h.A(0):h.h(d.Mb(d.Ba,!0),3);d.Ba=null;h.l()})}));ox&&(this.Ua=ox(this),this.Ua.configure(this.h.queue));this.Wd.I(window,"online",function(){px(d);d.xg()});this.Rd=new Ke(function(){for(var h=Date.now()/1E3,k=!1,l=!0,m=t(d.j.variants),n=m.next();!n.done;n=m.next())n=n.value,n.disabledUntilTime>
0&&n.disabledUntilTime<=h&&(n.disabledUntilTime=0,k=!0),n.disabledUntilTime>0&&(l=!1);l&&d.Rd.stop();k&&qx(d,!1,void 0,!1,!1)});this.K=this.F=this.eb=null;this.hd=new Set;this.sa=null;this.Rg=new pj;this.Zd=null;a&&(Va("Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Mb(a,!0))}ta(Z,oj);function rx(a){a.ba!=null&&(Ec(a.ba),a.ba.release(),a.ba=null)}
function sx(a,b,c){c||b.lcevc.enabled?(rx(a),a.ba==null&&(a.ba=new Bc(a.i,a.Ug,b.lcevc,c),a.H&&(a.H.H=a.ba))):rx(a)}function tx(a,b){return new nj(a,b)}q=Z.prototype;
q.destroy=function(){var a=this,b;return G(function(c){switch(c.i){case 1:if(a.m==ux)return c.return();rx(a);b=a.detach();a.m=ux;return c.h(b,2);case 2:return c.h(a.fh(),3);case 3:a.Wd&&(a.Wd.release(),a.Wd=null);a.Od&&(a.Od.release(),a.Od=null);a.o&&(a.o.release(),a.o=null);a.Jb&&(a.Jb.release(),a.Jb=null);a.fd&&(a.fd.release(),a.fd=null);a.Qd=null;a.h=null;a.u=null;a.Yb=null;a.M=null;a.La=null;if(!a.L){c.A(4);break}return c.h(a.L.destroy(),5);case 5:a.L=null;case 4:a.B&&(a.B.release(),a.B=null),
a.Ua&&(a.Ua.destroy(),a.Ua=null),a.K&&(a.K.release(),a.K=null),a.sa&&(a.sa.release(),a.sa=null),oj.prototype.release.call(a),c.l()}})};function vx(a,b){a.dispatchEvent(tx("onstatechange",(new Map).set("state",b)))}
q.Mb=function(a,b){b=b===void 0?!0:b;var c=this,d,e,f;return G(function(g){switch(g.i){case 1:if(c.m==ux)throw new K(2,7,7E3);d=c.i&&c.i==a;if(!c.i||c.i==a){g.A(2);break}return g.h(c.detach(),2);case 2:return g.h(wx(c,"attach"),4);case 4:if(g.j)return g.return();g.o(5,6);d||(vx(c,"attach"),e=function(){var h=xx(c,!1);h&&yx(c,h)},c.Od.I(a,"error",e),c.i=a,c.M&&c.M.setMediaElement(a));nb();if(!b||!Kc()||c.H){g.A(6);break}return g.h(zx(c),6);case 6:g.F();c.Aa.release();g.G(0);break;case 5:return f=g.m(),
g.h(c.detach(),10);case 10:throw f;}})};q.Ki=function(a){this.Ug=a};q.detach=function(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c=this;return G(function(d){if(d.i==1){if(c.m==ux)throw new K(2,7,7E3);return d.h(c.Ld(!1,a,b),2)}if(d.i!=3)return d.h(wx(c,"detach"),3);if(d.j)return d.return();try{c.i&&(c.Od.Pa(),c.i=null),vx(c,"detach"),c.D&&!a&&c.D.release()}finally{c.Aa.release()}d.l()})};
function wx(a,b){var c;return G(function(d){return d.i==1?(c=++a.Yd,d.h(hx(a.Aa,b),2)):c!=a.Yd?(a.Aa.release(),d.return(!0)):d.return(!1)})}
q.Ld=function(a,b,c){a=a===void 0?!0:a;b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C;return G(function(z){switch(z.i){case 1:return d.m!=ux&&(d.m=kx),z.h(wx(d,"unload"),2);case 2:if(z.j)return z.return();z.K(3);d.oa=!1;vx(d,"unload");rx(d);e=d.gd.map(function(B){return B()});d.gd=[];return z.h(Promise.all(e),5);case 5:f=(new Map).set("isSwitchingContent",c);d.dispatchEvent(tx("unloading",f));d.Xb&&(d.Xb.release(),d.Xb=null);d.xa&&(d.xa.release(),d.xa=null);d.Za&&
(d.Za.release(),d.Za=null);d.i&&(d.o.Pa(),d.Jb.Pa());d.Rd.stop();d.Hb&&(d.Hb.release(),d.Hb=null);d.Ya&&(d.Ya.stop(),d.Ya=null);if(!d.J){z.A(6);break}return z.h(d.J.stop(),7);case 7:d.J=null,d.Wb=null;case 6:d.B&&d.B.stop();if(!d.l){z.A(8);break}return z.h(d.l.destroy(),9);case 9:d.l=null;case 8:d.N&&(d.N.release(),d.N=null);d.G&&(d.G.release(),d.G=null);if("webkit"!==window.shakaMediaKeysPolyfill||!d.C){z.A(10);break}return z.h(d.C.destroy(),11);case 11:d.C=null;case 10:if(!d.H){z.A(12);break}return z.h(d.H.destroy(),
13);case 13:d.H=null;case 12:if(d.D&&!b)d.D.onAssetUnload();d.Fa&&!b&&(d.Fa.destroy(),d.Fa=null);b||d.ef.stop();d.M&&Lw(d.M);d.La&&(d.La.h=null);if(!d.F){z.A(14);break}return z.h(d.F.destroy(),15);case 15:d.F=null;case 14:return d.Ma=!1,d.K&&d.K.disable(),d.hd.clear(),d.sa&&(d.sa.release(),d.sa=null),z.h(d.Rg.destroy(),16);case 16:if(d.i){g=t(d.cf);for(h=g.next();!h.done;h=g.next())k=h.value,k.src.startsWith("blob:")&&URL.revokeObjectURL(k.src),k.remove();d.cf=[];wi(d.i)&&d.i.load()}if(!d.C){z.A(17);
break}return z.h(d.C.destroy(),18);case 18:d.C=null;case 17:d.eb&&d.ma!=d.eb.we()&&(d.eb.G||d.eb.destroy(),d.eb=null);d.ma=null;d.V=null;d.Z=null;if(d.j){l=t(d.j.variants);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t([n.audio,n.video]),u=p.next();!u.done;u=p.next())(r=u.value)&&r.segmentIndex&&r.segmentIndex.release();v=t(d.j.textStreams);for(w=v.next();!w.done;w=v.next())y=w.value,y.segmentIndex&&y.segmentIndex.release()}d.h&&d.h.streaming.clearDecodingCache&&(hf.clear(),hc.clear());d.j=null;
d.u=new at;d.Tg=null;d.Ib=null;d.ea=null;d.$d=-1;d.Vd=[];x=t(d.Vb.values());for(A=x.next();!A.done;A=x.next())C=A.value,C.stop();d.Vb.clear();d.Ud=[];d.Ze=-1;d.L&&d.L.bh();d.Zd&&(URL.revokeObjectURL(d.Zd),d.Zd=null);Ax(d);case 3:z.F();d.Aa.release();z.G(4);break;case 4:nb();if(a&&Kc()&&!d.H&&d.i)return z.h(zx(d),0);z.A(0)}})};q.Jk=function(a){this.U=a};
q.load=function(a,b,c){b=b===void 0?null:b;var d=this,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A;return G(function(C){switch(C.i){case 1:if(d.m==ux)throw new K(2,7,7E3);if(d.i||!d.Ba){C.A(2);break}return C.h(d.Mb(d.Ba,!0),3);case 3:d.Ba=null;case 2:e=null;f="";c=(g=c)==null?void 0:g.toLowerCase();if(a instanceof jt){if(a.G)throw new K(2,7,7006);e=a;f=e.we()||""}else f=a||"";return C.h(hx(d.Aa,"load"),4);case 4:d.Aa.release();if(!d.i)throw new K(2,7,7002);if(!d.ma){C.A(5);break}d.ma=f;return C.h(d.Ld(!1,!1,!0),
5);case 5:d.M&&Kw(d.M);h=++d.Yd;k=function(){return G(function(z){if(z.i==1)return d.Yd==h?z.A(0):e?z.h(e.destroy(),3):z.A(3);throw new K(2,7,7E3);})};l=function(z,B){return G(function(D){switch(D.i){case 1:return D.K(2),D.h(hx(d.Aa,B),4);case 4:return D.h(k(),5);case 5:return D.h(z(),6);case 6:return D.h(k(),7);case 7:e&&d.h&&(e.j=d.h);case 2:D.F(),d.Aa.release(),D.G(0)}})};C.o(7,8);b==null&&e&&(b=e.getStartTime());d.U=b;d.oa=!1;d.dispatchEvent(tx("loading"));if(e){c=e.Sf();C.A(10);break}if(c){C.A(10);
break}return C.h(l(function(){return G(function(z){if(z.i==1)return z.h(Bx(d,f),2);c=z.j;z.l()})},"guessMimeType_"),10);case 10:m=!!e;if(e){mt(e,d);d.u=e.getStats();C.A(13);break}return C.h(Cx(d,f,b,c,!0,d.h),14);case 14:(e=C.j)?(e.H=!1,mt(e,d),d.u=e.getStats(),e.start(),e.F.promise.catch(function(){})):d.u=new at;case 13:n=!e;p=Date.now()/1E3;d.u=e?e.getStats():new at;d.ma=f;d.V=c||null;Ax(d);u=function(){var z=d.i?d.i.buffered:null;return{start:vp(z)||0,end:wp(z)||0}};d.xa=new Dr(u);d.xa.addEventListener("regionadd",
function(z){Dx(d,z.region,"metadataadded")});if(n)return C.h(l(function(){return G(function(z){return z.h(Ex(d,c),0)})},"initializeSrcEqualsDrmInner_"),25);d.Za=new Dr(u);return C.h(l(function(){return G(function(z){if(z.i==1)return z.h(Promise.race([e.oa.promise,e.F.promise]),2);d.Wb=e.K;var B=e;B.sa=!0;d.J=B.o;d.j=e.Rf();z.l()})},"waitForFinish"),17);case 17:if(d.H){C.A(18);break}return C.h(l(function(){return G(function(z){return z.h(zx(d),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return C.h(l(function(){return G(function(z){return z.h(e.F.promise,
0)})},"waitForFinish"),20);case 20:d.h=e.getConfiguration();d.Pd=e.J;d.J&&d.J.setMediaElement&&d.i&&d.J.setMediaElement(d.i);d.Xb=nt(e);d.Nd=e.La;if(r=e.m)d.P=r;m&&d.i&&d.i.nodeName==="AUDIO"&&(Fx(d),d.configure("manifest.disableVideo",!0));if(e.l){C.A(21);break}return C.h(l(function(){return G(function(z){return z.h(st(e,d.i),0)})},"drmEngine_.init"),21);case 21:return d.C=ot(e),C.h(l(function(){return G(function(z){return z.h(d.C.Mb(d.i),0)})},"drmEngine_.attach"),23);case 23:return d.P&&(v=d.P.getConfiguration(),
v.keySystem=d.keySystem(),d.P.configure(v)),w=d.h.abrFactory,d.B&&d.Qd==w||(d.Qd=w,d.B&&d.B.release(),d.B=w(),d.B.configure(d.h.abr)),y=pt(e),x=e.i,C.h(l(function(){return G(function(z){return z.h(Gx(d,p,x,y),0)})},"loadInner_"),24);case 24:lt(e);d.V&&nb().ri()&&se(d.V)&&cq(d.H,d.ma,d.V);C.A(16);break;case 25:return C.h(l(function(){return G(function(z){return z.h(Hx(d,p,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(tx("loaded"));case 8:C.F();if(!e){C.A(27);break}return C.h(e.destroy(),
27);case 27:d.eb=null;C.G(0);break;case 7:A=C.m();if(!A||A.code==7E3){C.A(29);break}return C.h(d.Ld(!1),29);case 29:throw A;}})};function Fx(a){for(var b=t(a.j.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.j.variants=a.j.variants.filter(function(d){return d.audio})}
q.Gk=function(a,b,c,d){a=a===void 0?!0:a;b=b===void 0?!1:b;c=c===void 0?!1:c;d=d===void 0?!1:d;var e=this,f;return G(function(g){return g.i==1?g.h(Ix(e,c),2):g.i!=3?(f=g.j,g.h(e.Ld(a,b,d),3)):g.return(f)})};q.gh=function(a,b,c){a=a===void 0?!1:a;b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this,e;return G(function(f){return f.i==1?f.h(Ix(d,b),2):f.i!=3?(e=f.j,f.h(d.detach(a,c),3)):f.return(e)})};
function Ix(a,b){b=b===void 0?!1:b;var c,d,e;return G(function(f){if(f.i==1){c=null;if(!(a.j&&a.J&&a.Wb&&a.ma&&a.h))return f.A(2);d=a.i.currentTime;b||(d=null);return f.h(Jx(a,a.ma,d,a.V,a.h,!0,!1),3)}if(f.i!=2){c=f.j;a.Sd.push(c);a.J&&a.J.setMediaElement&&a.J.setMediaElement(null);if(e=a.l?a.l.u:null)c.i=e;var g=c,h=a.J,k=a.Wb;g.h=a.j;g.o=h;g.K=k;c.m=a.P;c.start();a.j=null;a.J=null;a.Wb=null;a.B=null;a.Qd=null}return f.return(c)})}
q.preload=function(a,b,c,d,e){b=b===void 0?null:b;e=e===void 0?!1:e;var f=this,g,h,k,l;return G(function(m){if(m.i==1)return c=(g=c)==null?void 0:g.toLowerCase(),h=lx(f),Us(h,d||f.h,lx(f)),m.h(Cx(f,a,b,c,!1,h),2);if(k=m.j)k.start();else{l=new K(2,7,7005);if(e)throw l;yx(f,l)}return m.return(k)})};q.fh=function(){var a=this,b,c,d,e;return G(function(f){b=[];c=t(a.Sd);for(d=c.next();!d.done;d=c.next())e=d.value,e.G||b.push(e.destroy());a.Sd=[];return f.h(Promise.all(b),0)})};
function Cx(a,b,c,d,e,f){e=e===void 0?!1:e;var g,h,k,l;return G(function(m){if(m.i==1)return d?m.A(2):m.h(Bx(a,b),3);m.i!=2&&(d=m.j);if(g=Kx(a,d))return m.return(null);h=f||a.h;k=!1;e&&a.i&&a.i.nodeName==="AUDIO"&&(k=!0);l=Jx(a,b,c,d||null,h,!e,k);l=e?l.then(function(n){n.H=!1;return n}):l.then(function(n){a.Sd.push(n);return n});return m.return(l)})}
function Jx(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,p,u,r,v,w,y,x,A,C,z;return G(function(B){if(B.i==1){h=null;k=ld(e);g&&(k.manifest.disableVideo=!0);l=function(){return h.V&&h.G?null:h};m=function(){return l()?l().getConfiguration():a.h};if(a.Na.width!=Infinity||a.Na.height!=Infinity||a.h.ignoreHardwareResolution)return B.A(2);n=nb();return B.h(n.Db(),3)}B.i!=2&&(p=B.j,a.Na.width=p.width,a.Na.height=p.height);u=new Kp(k,a.Na,null);r={networkingEngine:a.L,filter:function(D){var F,
E;return G(function(H){if(H.i==1)return H.h(Lp(u,D),2);if(H.i!=4){F=H.j;if(!F)return H.A(0);E=tx("trackschanged");return H.h(Promise.resolve(),4)}h.dispatchEvent(E);H.l()})},makeTextStreamsForClosedCaptions:function(D){for(var F=new Set,E=t(D.textStreams),H=E.next();!H.done;H=E.next())H=H.value,H.mimeType!="application/cea-608"&&H.mimeType!="application/cea-708"||F.add(H.originalId);E=t(D.variants);for(H=E.next();!H.done;H=E.next())if((H=H.value.video)&&H.closedCaptions)for(var O=t(H.closedCaptions.keys()),
R=O.next();!R.done;R=O.next())if(R=R.value,!F.has(R)){var N=R.startsWith("CC")?"application/cea-608":"application/cea-708",S=new Cl,L=H.closedCaptions.get(R);N=Df({id:a.Xd++,originalId:R,segmentIndex:S,mimeType:N,kind:"caption",language:L,originalLanguage:L,type:yc,roles:H.roles});D.textStreams.push(N);F.add(R)}},onTimelineRegionAdded:function(D){Er(h.L,D)},onEvent:function(D){return h.dispatchEvent(D)},onError:function(D){return h.onError(D)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},
updateDuration:function(){a.l&&h.V&&a.l.updateDuration()},newDrmInfo:function(D){var F=h.l,E=F?F.ec():null;E&&F.B&&Op(u,E.keySystem,D)},onManifestUpdated:function(){var D=(new Map).set("isLive",a.isLive()).set("isInProgress",a.Uc());h.dispatchEvent(tx("manifestupdated",D));kt(h,!1,function(){if(a.D)a.D.onManifestUpdated(a.ra())})},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},onMetadata:function(D,F,E,H){var O=D;if(D=="com.apple.hls.interstitial"||D=="com.apple.hls.overlay")O=
"com.apple.quicktime.HLS";var R={type:O,startTime:F,endTime:E,values:H};D=new Promise(function(L){kt(h,!1,function(){return G(function(P){switch(P.i){case 1:if(!a.D){P.A(0);break}if(!a.i){P.A(3);break}P.o(4);return P.h(a.D.onHLSMetadata(R),6);case 6:P.u(3);break;case 4:P.m();case 3:L(),P.l()}})})});H=t(H);for(var N=H.next(),S={};!N.done;S={lg:void 0},N=H.next())S.lg=N.value,S.lg.name!="ID"&&kt(h,!1,function(L){return function(){Lx(a,F,E,O,L.lg)}}(S));return D},disableStream:function(D){return a.disableStream(D,
a.h.streaming.maxDisabledTime)},addFont:function(D,F){return a.addFont(D,F)},getStreamingRetryParameters:function(){return a.h.streaming.retryParameters},onSegmentReceived:function(D,F){kt(h,!1,function(){var E;(E=a.B)==null||E.segmentDownloaded(D,F,!0)})}};v=new Dr(function(){return a.ab()});v.addEventListener("regionadd",function(D){var F=D.region;Mx(a,"timelineregionadded",F,h);kt(h,!1,function(){if(a.D)a.D.onDASHMetadata(F)})});w=null;k.streaming.observeQualityChanges&&(w=new tl(function(){return a.dc()}),
w.addEventListener("qualitychange",function(D){Nx(a,D.quality,D.position)}),w.addEventListener("audiotrackchange",function(D){Nx(a,D.quality,D.position,!0)}));y=!0;x={Ac:a.L,onError:function(D){return h.onError(D)},Sh:function(D){kt(h,!0,function(){a.C&&Ox(a,D)})},onExpirationUpdated:function(D,F){var E=tx("expirationupdated");h.dispatchEvent(E);if((E=h.o)&&E.onExpirationUpdated)E.onExpirationUpdated(D,F)},onEvent:function(D){h.dispatchEvent(D);if(D.type=="drmsessionupdate"&&y){y=!1;D=Date.now()/
1E3-h.Ba;var F=a.u||h.getStats();D>=0&&(F.o=D);a.ba&&Ec(a.ba)}}};A=mx(a,l);Dj(a.L,A);C=function(){return a.ke(x)};z={config:k,Sj:r,hk:v,gk:w,ke:C,Rj:u,networkingEngine:A,Ji:f};h=new jt(b,d,c,z);return B.return(h)})}function Bx(a,b){var c,d,e,f;return G(function(g){if(g.i==1)return c=a.h.manifest.retryParameters,g.h(Rl(b,a.L,c),2);d=g.j;se(d)?(e=nb(),e.Da()==="WEBKIT"&&(d="application/vnd.apple.mpegurl")):d==="video/quicktime"&&(f=nb(),f.Da()==="CHROMIUM"&&(d="video/mp4"));return g.return(d)})}
function Kx(a,b){if(!Kc(nb()))return!0;if(b){if((a.i||Lc()).canPlayType(b)=="")return!1;if(!Kc(nb())||!Hc.has(b))return!0;if(se(b))return nb().Da()==="WEBKIT"&&(a.h.drm.servers["com.apple.fps"]||a.h.drm.servers["com.apple.fps.1_0"])?a.h.streaming.useNativeHlsForFairPlay:a.h.streaming.preferNativeHls;if(b==="application/dash+xml"||b==="video/vnd.mpeg.dash.mpd")return a.h.streaming.preferNativeDash}return!1}
function Px(a,b){var c=a.h.textDisplayFactory;a.Tg!==c||(b===void 0?0:b)?(b=a.F,a.F=c(a),a.F.configure(a.h.textDisplayer),b?(a.F.setTextVisibility(b.isTextVisible()),b.destroy().catch(function(){})):a.F.setTextVisibility(a.Ma),a.H&&Nq(a.H,a.F),a.Tg=c,a.l&&hs(a.l)):a.F&&a.F.configure(a.h.textDisplayer)}
function zx(a){var b,c,d;return G(function(e){if(e.i==1)return nb(),vx(a,"media-source"),a.h.mediaSource.useSourceElements&&wi(a.i),Px(a),b=Qx(a.i,a.F,{rd:function(){return a.keySystem()},onMetadata:function(f,g,h){f=t(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&typeof k.cueTime=="number"&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=t(k.frames),p=n.next();!p.done;p=n.next())Lx(a,l,m,"org.id3",p.value);if(a.D)a.D.onHlsTimedMetadata(k,l)}},bk:function(f){a.Za&&Er(a.Za,
{schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},dk:function(){a.J&&a.J.update&&a.J.update()},ec:function(){return a.drmInfo()}},a.ba,a.h.mediaSource),c=a.h.manifest,d=c.segmentRelativeVttTiming,b.La=d,e.h(b.N.promise,2);a.H=b;e.l()})}
function Rx(a,b){a.N=new Xq({Uf:function(){return b.playbackRate},Pc:function(){return b.defaultPlaybackRate},ii:function(c){b.playbackRate=c},Wj:function(c){var d=b.currentTime;if(xp(b.buffered,d)&&!(b.readyState<=HTMLMediaElement.HAVE_CURRENT_DATA)){var e=d+c,f=a.ab();if(e<f.start)d!==f.start&&(b.currentTime=f.start);else if(e>f.end)d!==f.end&&(b.currentTime=f.end);else{if(c<0)for(c=zp(b.buffered),d=c.length-1;d>=0;d--)if(e>=c[d].start){e>c[d].end&&(e=Math.max(c[d].start,c[d].end-.5));break}b.currentTime=
e}}},isPaused:function(){return b.paused}})}
function Sx(a,b,c){a.o.yb(b,["playing","pause","ended"],function(){Tx(a)});a.o.I(b,"ratechange",function(){Ux(a)});var d=Li(nb(),b);d&&(a.o.I(d,"connect",function(){a.l&&d.state=="connected"&&Vx(a);Wx(a)}),a.o.I(d,"connecting",function(){return Wx(a)}),a.o.I(d,"disconnect",function(){return G(function(f){if(f.i==1)return a.l&&d.state=="disconnected"?f.h(ws(a.l),3):f.A(2);f.i!=2&&Vx(a);Wx(a);f.l()})}));b.audioTracks&&a.o.yb(b.audioTracks,["addtrack","removetrack","change"],function(){Wx(a)});b.videoTracks&&
a.o.yb(b.videoTracks,["addtrack","removetrack","change"],function(){Wx(a)});(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&a.o.I(b,"webkitpresentationmodechanged",function(){a.Yb&&Px(a,!0)});if(b.textTracks){var e=function(){a.m===Xx&&a.F instanceof Iu&&Vx(a);Wx(a)};a.o.I(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Yx(a,f);break;case "chapters":Zx(a,f);break;default:e()}});a.o.yb(b.textTracks,["removetrack","change"],e)}b.preload!="none"&&(a.o.Ja(b,
"loadedmetadata",function(){var f=a.u,g=Date.now()/1E3-c;g>=0&&(f.H=g)}),a.yh()||(a.sa=new ix(b),a.sa.start(function(){a.sa.release();a.sa=null;var f=a.u,g=Date.now()/1E3-c;g>=0&&(f.u=g)},!0)||a.o.Ja(b,"loadeddata",function(){var f=a.u,g=Date.now()/1E3-c;g>=0&&(f.u=g)})))}
function Gx(a,b,c,d){var e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H,O,R,N,S,L,P,Q;return G(function(M){switch(M.i){case 1:vx(a,"load");e=a.i;Rx(a,e);Sx(a,e,b);"onchange"in window.screen&&a.o.I(window.screen,"change",function(){if(a.P.getConfiguration){var W=a.P.getConfiguration();W.preferredVideo.some(function(ha){return ha.hdrLevel=="AUTO"})?$x(a):a.h.preferredVideo.some(function(ha){return ha.hdrLevel=="AUTO"})&&a.h.abr.enabled&&(W.preferredVideo=a.h.preferredVideo,Vs(W),a.P.configure(W),$x(a))}});
f=!1;g=t(a.j.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=Dc(l));sx(a,a.h,f);a.Td=a.h.preferredText[0]&&a.h.preferredText[0].language||"";a.bf=a.h.preferredText[0]&&a.h.preferredText[0].role||"";a.$e=((m=a.h.preferredText[0])==null?void 0:m.forced)||!1;ay(a.j.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(W,ha,I){a.j&&a.l&&W!=a.l.u&&by(a,W,!0,ha===void 0?!1:ha,I===void 0?0:I)},function(W,ha){var I,U=(I=a.l)==null?void 0:
I.u;(W=U&&U[W])&&a.disableStream(W,ha)});a.B.setMediaElement(e);a.B.setCmsdManager(a.La);a.l=cy(a);a.l.configure(a.h.streaming);a.m=dy;a.dispatchEvent(tx("streaming"));n=c;case 2:u=a.l.u;u||(r=ey(a,!0),c||(n=r));v=[];p=u||n;w=t([p.video,p.audio]);for(y=w.next();!y.done;y=w.next())(x=y.value)&&!x.segmentIndex&&(v.push(x.createSegmentIndex()),x.dependencyStream&&v.push(x.dependencyStream.createSegmentIndex()));if(!(v.length>0)){M.A(4);break}return M.h(Promise.all(v),4);case 4:if(!p||p.disabledUntilTime!=
0){M.A(2);break}$x(a);if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(p);a.j.isLowLatency&&(a.h.streaming.lowLatencyMode?a.configure(a.df):Va("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."));a.M&&Mw(a.M,b*1E3);ay(a.j.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);Yr(a.l,a.h.playRangeStart,a.h.playRangeEnd);return M.h(fy(a),7);
case 7:a.oa=!0;a.dispatchEvent(tx("canupdatestarttime"));A=function(W){a.G=gy(a,W);a.Hb=hy(a,W);iy(a,e,!1)};a.h.streaming.startAtSegmentBoundary||(C=a.U,C==null&&a.j.startTime&&(C=a.j.startTime),A(C));if(u){M.A(8);break}if(!a.h.streaming.startAtSegmentBoundary){M.A(9);break}z=a.j.presentationTimeline;a.U instanceof Date&&(D=z.l||z.i,F=a.U.getTime()/1E3-D,F!=null&&(B=F));B==null&&(B=typeof a.U==="number"?a.U:a.isLive()?Infinity:a.i.currentTime);a.U==null&&a.j.startTime&&(B=a.j.startTime);E=z.xb();
H=z.kb();B<E?B=E:B>H&&(B=H);return M.h(jy(n,B),10);case 10:O=M.j,A(O);case 9:by(a,n,!0,!1,0);case 8:a.G.ready();R=a.ob().find(function(W){return W.active});if(!R){if(N=ky(a,n))$s(a.u.l,N,!0),N?(a.Ma=!0,a.F.setTextVisibility(!0)):(a.Ma=!1,a.F.setTextVisibility(!1));N&&a.Ma&&(gs(a.l,N),ly(a))}return M.h(a.l.start(d),11);case 11:a.h.abr.enabled&&(a.B.enable(),my(a));Wx(a);a.j.variants.some(function(W){return W.primary});if((S=a.ra())&&(a.h.streaming.liveSync&&a.h.streaming.liveSync.enabled||a.j.serviceDescription||
a.h.streaming.liveSync.panicMode)||a.h.streaming.vodDynamicPlaybackRate)L=function(){return ny(a)},a.o.I(e,"timeupdate",L);S||(P=function(){return oy(a)},a.o.I(e,"timeupdate",P),oy(a),a.j.nextUrl&&(a.h.streaming.preloadNextUrlWindow>0&&(Q=function(){var W;return G(function(ha){if(ha.i==1){W=a.ab().end-a.i.currentTime;if(isNaN(W)||!(W<=a.h.streaming.preloadNextUrlWindow))return ha.A(0);a.o.mb(e,"timeupdate",Q);return ha.h(a.preload(a.j.nextUrl),4)}a.eb=ha.j;ha.l()})},a.o.I(e,"timeupdate",Q)),a.o.I(e,
"ended",function(){a.load(a.eb||a.j.nextUrl)})));if(a.D)a.D.onManifestUpdated(S);M.l()}})}
function Ex(a,b){var c,d,e;return G(function(f){return f.i==1?(c=Date.now()/1E3,d=!0,a.C=a.ke({Ac:a.L,onError:function(g){yx(a,g)},Sh:function(){},onExpirationUpdated:function(){var g=tx("expirationupdated");a.dispatchEvent(g)},onEvent:function(g){a.dispatchEvent(g);if(g.type=="drmsessionupdate"&&d){d=!1;g=a.u;var h=Date.now()/1E3-c;h>=0&&(g.o=h)}}}),a.C.configure(a.h.drm),e=Ef([b]),a.C.ba=!0,f.h(Zj(a.C,[e],[]),2)):f.h(a.C.Mb(a.i),0)})}
function Hx(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H,O,R,N,S;return G(function(L){switch(L.i){case 1:vx(a,"src-equals");d=a.i;a.G=new hr(d);e=!1;a.gd.push(function(){e=!0});a.dispatchEvent(tx("canupdatestarttime"));a.U!=null&&a.G.Ye(a.U);a.Hb=py(a,a.U||0);Rx(a,d);iy(a,d,!0);d.textTracks&&(Px(a),f=function(P){if(!(a.F instanceof Iu)){var Q=qy(a).find(function(M){return M.mode!=="disabled"});Q&&(Q.mode=P?"showing":"hidden")}},a.o.I(d,"enterpictureinpicture",function(){return f(!0)}),
a.o.I(d,"leavepictureinpicture",function(){return f(!1)}),g=nb(),(h=Li(g,d))?a.o.yb(h,["connect","connecting","disconnect"],function(){f(!1)}):"webkitCurrentPlaybackTargetIsWireless"in d&&a.o.I(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){return f(!1)}),k=d,(k.webkitPresentationMode||k.webkitSupportsFullscreen)&&a.o.I(k,"webkitpresentationmodechanged",function(){k.webkitPresentationMode?f(k.webkitPresentationMode!=="inline"):k.webkitSupportsFullscreen&&f(k.webkitDisplayingFullscreen)}));
Sx(a,d,b);l=Nw(a.M,a.ma,c);if(!(a.V&&a.h.streaming.processSrcEqualMetadata&&Ch(a.V))){L.A(2);break}n=!1;p=a.h.streaming.retryParameters;u=Ej([l],p);r=a.L.request(0,u);qj(a.Rg,r);v=function(P){P.request===u&&(P=P.headers,!P["content-length"]||P["icy-br"]||P["icy-description"]||P["icy-genre"]||P["icy-name"]||P["icy-url"])&&(n=!0,r.abort())};a.addEventListener("downloadheadersreceived",v);L.o(3,4);return L.h(r.promise,6);case 6:w=L.j,m=tb(w.data),y=new Blob([w.data],{type:a.V}),l=URL.createObjectURL(y),
a.Zd=l;case 4:L.F();a.removeEventListener("downloadheadersreceived",v);L.G(2);break;case 3:x=L.m();if(!n)throw x;L.A(4);break;case 2:!l.includes("#t=")&&(a.h.playRangeStart>0||isFinite(a.h.playRangeEnd))&&(l+="#t=",a.h.playRangeStart>0&&(l+=a.h.playRangeStart),isFinite(a.h.playRangeEnd)&&(l+=","+a.h.playRangeEnd));if(!a.H){L.A(7);break}return L.h(a.H.destroy(),8);case 8:a.H=null;case 7:return wi(d),d.src=l,A=nb(),A.Ha()=="TV"&&d.load(),d.preload!="none"&&!d.autoplay&&se(c)&&A.Da()==="WEBKIT"&&d.load(),
a.m=Xx,a.dispatchEvent(tx("streaming")),C=function(){return new Promise(function(P){var Q=new Ke(P);a.o.I(d.textTracks,"change",function(){return Q.ia(.5)});Q.ia(.5)})},z=Promise.withResolvers(),Zq(d,HTMLMediaElement.HAVE_METADATA,a.o,function(){return G(function(P){if(P.i==1)return a.G.ready(),a.V&&se(a.V)?P.h(C(),3):(z.resolve(),P.A(0));z.resolve();P.l()})}),Zq(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var P,Q,M,W,ha;return G(function(I){if(I.i==1)return I.h(C(),2);if(e)return I.return();
ry(a);P=qy(a);P.some(function(U){return U.mode==="showing"})&&(a.Ma=!0,a.F.setTextVisibility(!0));if(!(a.F instanceof Iu))for(Q=!1,M=t(P),W=M.next();!W.done;W=M.next())ha=W.value,ha.mode!=="disabled"&&(Q?(ha.mode="disabled",Va("Found more than one enabled text track, disabling it",ha)):(sy(a,ha),Q=!0));ty(a);I.l()})}),d.error?z.reject(xx(a)):d.preload=="none"&&(Va('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.'),
z.resolve()),a.o.Ja(d,"error",function(){z.reject(xx(a))}),L.h(Te(a.h.streaming.loadTimeout,z.promise),9);case 9:if((B=a.ra())&&(a.h.streaming.liveSync&&a.h.streaming.liveSync.enabled||a.h.streaming.liveSync.panicMode)||a.h.streaming.vodDynamicPlaybackRate)D=function(){return ny(a)},a.o.I(d,"timeupdate",D);B||(F=function(){return oy(a)},a.o.I(d,"timeupdate",F),oy(a));a.D&&(a.D.onManifestUpdated(B),B&&(E=a.ab().end,a.o.I(d,"progress",function(){var P=a.ab().end;E!=P&&(a.D.onManifestUpdated(a.ra()),
E=P)})));if(a.V&&m&&(H=zh(m,a.V),H.length))for(O=a.i.duration,R=t(H),N=R.next();!N.done;N=R.next())S=N.value,Lx(a,0,O,"org.id3",S);return L.h(fy(a),10);case 10:a.oa=!0,L.l()}})}function ry(a){var b=a.h.preferredAudio;if(b.length&&a.i&&a.i.audioTracks){var c=a.kc();b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,d.language&&(d=zf(c,d.language,d.role,!1)[0])){a.zg(d);break}}}
function ty(a){var b=a.ob();if(!b.some(function(e){return e.active})){for(var c=t(a.h.preferredText),d=c.next();!d.done;d=c.next())if(d=d.value,d.language&&(d=zf(b,d.language,d.role,d.forced),d.length)){a.Fc(d[0]);return}if(a.i&&a.i.audioTracks&&a.h.accessibility.handleForcedSubtitlesAutomatically&&(c=Array.from(a.i.audioTracks).find(function(e){return e.enabled}))&&(b=zf(b,c.language,"",!0),b.length)){a.Fc(b[0]);return}a.Fc(null)}}
function Yx(a,b){if(b.kind=="metadata"){b.mode="hidden";var c=function(){if(b.cues){for(var e=[],f=t(b.cues),g=f.next(),h={};!g.done;h={ub:void 0},g=f.next())h.ub=g.value,h.ub.startTime!=null&&"type"in h.ub&&(g=e.find(function(k){return function(l){return l.startTime==k.ub.startTime&&l.endTime==k.ub.endTime}}(h)),g||(g={type:h.ub.type,startTime:h.ub.startTime,endTime:h.ub.endTime,values:[]},e.push(g)),h.ub.value&&h.ub.value.key=="X-AD-CREATIVE-SIGNALING"&&(g.type="urn:svta:advertising-wg:ad-creative-signaling"),
g.values.push(h.ub.value));e=t(e);for(f=e.next();!f.done;f=e.next())f=f.value,a.D&&(f.values.some(function(k){return k.key=="X-ASSET-URI"||k.key=="X-ASSET-LIST"})&&(h=f.startTime==0&&!a.ra(),f.values.push({key:"CUE",description:"",data:h?"ONCE,PRE":"ONCE",mimeType:null,pictureType:null})),a.D.onHLSMetadata(f))}};a.o.I(b,"cuechange",function(){if(b.activeCues)for(var e=t(b.activeCues),f=e.next();!f.done;f=e.next())if(f=f.value,Lx(a,f.startTime,f.endTime,f.type,f.value),a.D)a.D.onCueMetadataChange(f.value);
c()});c();var d=(new Ke(function(){var e=uy(a);e=t(e);for(var f=e.next();!f.done;f=e.next())f.value.mode="hidden"})).Xa().ia(.5);a.gd.push(function(){d.stop()})}}function Dx(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(tx(c,b))}function Lx(a,b,c,d,e){a.xa&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),Er(a.xa,b))}
function Zx(a,b){if(b&&b.kind=="chapters"){b.mode="hidden";var c=(new Ke(function(){b.mode="hidden"})).Xa().ia(.5);a.gd.push(function(){c.stop()})}}q.kk=function(){for(var a=this.Aa;a.h;)a.release()};q.ke=function(a){return new Uj(a)};
function mx(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?kt(b(),!0,f):f()}b||(b=function(){return null});var e=new zj(function(f,g,h,k,l){d(function(){a.B&&a.B.segmentDownloaded(f,g,h,k,l)})},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(tx("downloadheadersreceived",g));d(function(){if(a.La){var k=a.La;if(k.i.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;l<n.length;l++){var p=n[l].split("=");
m.set(p[0],fx(p[1]))}}catch(y){}if(m=f["cmsd-dynamic"]){a:{try{var u=new Map,r=m.split(";");for(m=1;m<r.length;m++){var v=r[m].split("=");u.set(v[0],fx(v[1]))}var w=u;break a}catch(y){w=null;break a}w=void 0}w&&(k.h=w)}}}})},function(f,g,h,k){f=(new Map).set("requestType",f).set("request",g).set("context",h).set("response",k);c(tx("downloadcompleted",f))},function(f,g,h,k,l,m){f=(new Map).set("requestType",f).set("request",g).set("context",h).set("error",k).set("httpResponseCode",l).set("aborted",
m);c(tx("downloadfailed",f))},function(f,g,h){d(function(){if(a.M){var k=a.M,l=h;l=l===void 0?{}:l;if(k.h)if(g.method==="HEAD")Vw(k,g,{});else switch(f){case 0:if(l.type){a:{switch(l.type){case 4:l="d";break a;case 3:case 2:l="h";break a}l=void 0}l&&l!==k.C&&(k.C=l,Bw(k.h,{sf:l,st:k.l.isLive()?"l":"v"}))}Vw(k,g,{ot:"m",su:k.o===null});break;case Jj:var m=l,n=g.uris[0],p=m.segment;l=0;p&&(l=p.endTime-p.startTime);l={d:l*1E3,st:k.l.isLive()?"l":"v"};l.ot=Xw(m);var u=l.ot==="v"||l.ot==="a"||l.ot==="av"||
l.ot==="tt";if(m=m.stream){var r=k.l.Ta();if(u){var v=Yw(k,m.type);Number.isFinite(v)&&(l.bl=v);l.ot!=="tt"&&(v=Zw(k,m.type),l.dl=r?v/Math.abs(r):v)}m.bandwidth&&(l.br=m.bandwidth/1E3);m.segmentIndex&&p&&((r=m.segmentIndex.Eb(p.endTime,!0,r<0))&&(r=r.next().value)&&r!=p&&(n&&!eb(p.S(),r.S())&&(l.nor=r.S()[0]),!r.startByte&&!r.endByte||p.startByte==r.startByte&&p.endByte==r.endByte||(n=r.startByte+"-",r.endByte&&(n+=r.endByte),l.nrr=n)),n=k.l.Ta()||1,r=Zw(k,m.type)||500,p=(m=m.bandwidth)?m*(p.endTime-
p.startTime)/1E3/(r/n/1E3)*k.m.rtpSafetyFactor:NaN,Number.isFinite(p)&&(l.rtp=p))}u&&l.ot!=="tt"&&(p=$w(k,l.ot)/1E3,Number.isFinite(p)&&(l.tb=p));k.l.isLive()&&(p=vy(k.l))&&(l.ltc=p);l.su=k.o===null||k.o==="r";k.u.has(g)&&k.u.delete(g);k.u.set(g,Date.now());Vw(k,g,l);break;case 2:case 5:case 6:Vw(k,g,{ot:"k"});break;case 4:Vw(k,g,{ot:"o"})}}})},function(f,g,h,k){(f=b()?b().o:a.J)&&f.banLocation&&f.banLocation(k)},function(f,g){if(g.data){var h=g.data.byteLength,k=b()?b().getStats():a.u;k&&(ht(k,h),
f===0&&(k.Hh=h));h=a.M;if(h.h&&f===Jj&&(f=h.u.get(g.originalRequest),h.u.delete(g.originalRequest),Ww(h)))try{var l=g.originalUri||g.uri;if(l.includes("CMCD="))try{var m=new URL(l);m.searchParams.delete("CMCD");var n=m.toString()}catch(z){n=l}else n=l;l={url:n};g.status!=null&&(l.rc=g.status);g.originalRequest&&g.originalRequest.timeToFirstByte!=null&&(l.ttfb=g.originalRequest.timeToFirstByte);g.timeMs!=null&&(l.ttlb=g.timeMs);f!=null&&(l.ts=f);g.headers&&g.headers["CMSD-Static"]&&(l.cmsds=btoa(g.headers["CMSD-Static"]));
g.headers&&g.headers["CMSD-Dynamic"]&&(l.cmsdd=btoa(g.headers["CMSD-Dynamic"]));var p=h.h,u={request:{url:n},status:g.status||0};g=l||{};var r=u.request||{},v=u.status,w=u.resourceTiming||null,y=g.url!=null?g.url:r.url;if(y){var x=new URL(y);x.searchParams.delete("CMCD");var A={url:x.toString(),rc:v};w&&(w.startTime!=null&&(A.ts=Math.round(p.B+w.startTime),w.responseStart!=null&&(A.ttfb=Math.round(w.responseStart-w.startTime))),w.duration!=null&&(A.ttlb=Math.round(w.duration)));var C=r.customData||
{};Dw(p,"rr",Object.assign({},C.cmcd!=null?C.cmcd:{},A,g))}}catch(z){Xa("CMCD_RESPONSE_ERROR","Could not apply CMCD data to response.",z)}}});e.configure(a.h.networking);return e}function gy(a,b){return new kr(a.i,a.j,a.h.streaming,b,function(){a.Hb&&sl(a.Hb,!a.G.Pg());a.l&&a.l.Ec();a.Z&&wy(a,"seeking")},function(c){return a.dispatchEvent(c)},function(){return a.Ta()})}
function hy(a,b){var c=a.ra()||typeof b==="number"&&b>0;b=new Gt(a.Xb,c);b.addEventListener("enter",function(g){g=g.region;Mx(a,"timelineregionenter",g);xy(a,g)});b.addEventListener("exit",function(g){Mx(a,"timelineregionexit",g.region)});b.addEventListener("skip",function(g){var h=g.region;g.seeking||(Mx(a,"timelineregionenter",h),Mx(a,"timelineregionexit",h))});var d=new Gt(a.xa,c);d.addEventListener("enter",function(g){Dx(a,g.region,"metadata")});c=new Gt(a.Za,c);c.addEventListener("enter",function(g){g=
(new Map).set("detail",g.region.emsg);a.dispatchEvent(tx("emsg",g))});var e=new Ft(a.j.presentationTimeline);e.addEventListener("change",function(g){a.dispatchEvent(tx("timelinechange",new Map([["programDateTime",g.programDateTime],["timestamp",g.timestamp]])))});var f=new rl(a.i);f.h.add(b);f.h.add(d);f.h.add(c);f.h.add(e);a.Nd&&f.h.add(a.Nd);return f}
function py(a,b){b=new Gt(a.xa,b instanceof Date||b>0);b.addEventListener("enter",function(d){Dx(a,d.region,"metadata")});var c=new rl(a.i);c.h.add(b);return c}
function iy(a,b,c){a.Z=new io;lo(a.Z,ko);yy(a);Ax(a);a.Ya=new Ke(function(){wy(a)});a.h.streaming.rebufferingGoal&&a.Ya.Ka(.25);a.o.I(b,"waiting",function(){return wy(a,"waiting")});a.o.I(b,"canplaythrough",function(){return wy(a,"canplaythrough")});a.o.I(b,"playing",function(){return wy(a,"playing")});a.o.I(b,"seeked",function(){return wy(a,"seeked")});a.o.I(b,"timeupdate",function(){return wy(a,"timeupdate")});c&&(a.o.I(b,"progress",function(){return wy(a,"progress")}),a.o.I(b,"stalled",function(){return wy(a,
"stalled")}))}function yy(a){var b=a.h.streaming.rebufferingGoal;a.Z.l.set(jo,Math.min(.5,b/2)).set(ko,b)}
function wy(a,b){if(a.h.streaming.rebufferingGoal){b=a.H?eq(a.H):!1;b=a.xd()||b||a.G.Ah();var c=a.Ta()<0?Ap(a.i.buffered,a.i.currentTime):yp(a.i.buffered,a.i.currentTime),d=a.Z,e=d.l.get(d.h);lo(d,b||c>=e&&c>0?jo:ko)&&Ax(a)}else if(b){c=a.Z;d=a.i.currentTime;e=c.i;c.i=d;var f=void 0;switch(b){case "seeking":case "waiting":c.i=-1;f=ko;break;case "canplaythrough":case "playing":case "seeked":f=jo;break;case "timeupdate":e>=0&&d-e>.01&&(f=jo)}f!==void 0&&lo(c,f)&&Ax(a)}}
function Qx(a,b,c,d,e){return new Yp(a,b,c,e,d)}
function cy(a){return new Sr(a.j,{Fb:function(){return a.G?a.G.jd():0},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},Ta:function(){return a.Ta()},video:a.i,T:a.H,Ac:a.L,onError:function(b){return yx(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Xc:function(b,c,d,e,f){var g=b.startTime,h=b.endTime,k=c.type;if(k!=yc){if(a.G){a.G.Qh();var l=lq(a.H,k);!a.ra()&&a.i.paused&&!a.i.seeking&&!a.H.K&&l!=null&&l>0&&a.G.jd()<l&&!Xp(a.G.jd(),l,.001)&&a.G.Ye(l)}wy(a)}d=(new Map).set("start",
g).set("end",h).set("contentType",k).set("isMuxed",d).set("isDependency",e).set("mediaTimestamp",f);a.dispatchEvent(tx("segmentappended",d));a.B&&c.fastSwitching&&b.Bc&&b.yd&&a.B.trySuggestStreams()},ck:function(b,c){(c=c.Vc)&&a.Nd&&vl(a.Nd,c,b)},$g:function(b,c){var d=a.C;if(d.i.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new Tj(tb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(c==0)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=
b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;ik(d,"cenc",c);d=d.m.promise}}else d=Promise.resolve();return d},disableStream:function(b,c){return a.disableStream(b,c)},Bk:function(b,c){return a.h.abr.enabled&&c.fastSwitching&&b.Bc&&b.yd?!1:!0},rd:function(){return a.keySystem()}})}
q.configure=function(a,b){var c=this.getConfiguration();arguments.length==2&&typeof a=="string"&&(a=Ls(a,b));a.manifest&&a.manifest.dash&&"disableXlinkProcessing"in a.manifest.dash&&(qi("manifest.dash.disableXlinkProcessing configuration","It is now automatically detected if the manifest has Xlink."),delete a.manifest.dash.disableXlinkProcessing);a.textDisplayer&&"captionsUpdatePeriod"in a.textDisplayer&&(qi("textDisplayer.captionsUpdatePeriod configuration","Captions are now updated based on the cue timings, so this configuration is no longer needed."),
delete a.textDisplayer.captionsUpdatePeriod);zy(a);var d=Us(this.h,a,lx(this));Ay(this,c);return d};q.Ri=function(a){this.df=a};
function Ay(a,b){a.Pd=new Kp(a.h,a.Na,a.C);if(a.J){var c=ld(a.h.manifest);a.i&&a.i.nodeName==="AUDIO"&&(c.disableVideo=!0);a.J.configure(c)}a.C&&a.C.configure(a.h.drm);if(a.l){a.l.configure(a.h.streaming);try{a.m!=ux&&Mp(a.Pd,a.j)&&Wx(a)}catch(e){yx(a,e)}a.B&&$x(a);c=a.l.u;!c||c.allowedByApplication&&c.allowedByKeySystem||qx(a)}a.L&&a.L.configure(a.h.networking);a.H&&(a.H.configure(a.h.mediaSource),a.H.La=a.h.manifest.segmentRelativeVttTiming);a.F&&Px(a);a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?
a.B.enable():a.B.disable(),my(a));a.Z&&yy(a);a.Ya&&(a.h.streaming.rebufferingGoal?a.Ya.Ka(.25):a.Ya.stop());a.j&&ay(a.j.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.D&&a.D.configure(a.h.ads);a.M&&a.M.configure(a.h.cmcd);a.La&&a.La.configure(a.h.cmsd);a.Ua&&a.Ua.configure(a.h.queue);c=a.m==dy||a.m==Xx;a.h.accessibility.speechToText.enabled?a.K?a.K.configure(a.h.accessibility.speechToText):(a.K=new Tu(a),a.K.configure(a.h.accessibility.speechToText),c&&Vx(a)):a.K&&(a.K.release(),a.K=
null,c&&Vx(a));if(a.m==dy&&a.P.getConfiguration){c=a.P.getConfiguration();var d=!1;nd(b.preferredVideo)!=nd(a.h.preferredVideo)&&(c.preferredVideo=a.h.preferredVideo,d=!0);nd(b.preferredAudio)!=nd(a.h.preferredAudio)&&(c.preferredAudio=a.h.preferredAudio,d=!0);d&&(Vs(c),a.P.configure(c),qx(a))}b=tx("configurationchanged");a.dispatchEvent(b)}q.getConfiguration=function(){var a=lx(this);Us(a,this.h,lx(this));return a};q.ij=function(){return this.df};
q.tj=function(){var a=lx(this);Us(a,this.h,lx(this));return Ns(this.h,lx(this))};q.kh=function(){if(this.i){var a=this.i.buffered.length;a=a?this.i.buffered.end(a-1):0;var b=Math.min(this.i.currentTime+this.h.streaming.bufferingGoal,this.ab().end);if(a>=b)return 1;if(!(a<=this.i.currentTime)&&a<b)return(a-this.i.currentTime)/(b-this.i.currentTime)}return 0};q.lk=function(){var a=this.getConfiguration(),b;for(b in this.h)delete this.h[b];Us(this.h,lx(this),lx(this));Ay(this,a)};q.Qf=function(){return this.m};
q.nh=function(){return this.j?this.j.type:null};q.Qc=function(){return this.i};q.sj=function(){return this.L};q.we=function(){return this.ma};q.Sf=function(){return this.V};q.cj=function(){var a;return Array.from(((a=this.xa)==null?void 0:a.h.values())||[])};q.bj=function(){var a;return Array.from(((a=this.Za)==null?void 0:a.h.values())||[])};q.ej=function(){var a;return Array.from(((a=this.Xb)==null?void 0:a.h.values())||[])};q.aj=function(){return this.D?this.D:null};
q.yj=function(){return this.Ua?this.Ua:null};q.isLive=function(){return this.j&&!this.ya()?this.j.presentationTimeline.isLive():this.i&&(this.i.src||this.ya())?this.i.duration==Infinity:!1};q.Uc=function(){return this.j?this.j.presentationTimeline.Uc():!1};q.ra=function(){return this.isLive()||this.Uc()};
q.yh=function(){if(this.j&&!this.ya()){var a=this.j.variants;return a.length?!a[0].video:!1}return this.i&&(this.i.src||this.ya())?this.i.videoTracks?this.i.videoTracks.length==0:this.i.videoHeight==0:!1};q.Eh=function(){if(this.j&&!this.ya()){var a=this.j.variants;if(!a.length)return!1;a=a[0];return a.audio||!a.video?!1:!a.video.codecs.includes(",")}return this.i&&(this.i.src||this.ya())&&this.i.audioTracks?this.i.audioTracks.length==0:!1};
q.ab=function(){if(this.j&&!this.ya()){if(!this.oa&&this.j.type=="HLS")return{start:0,end:0};var a=this.j.presentationTimeline;return{start:a.xb(),end:a.kb()}}if(this.i&&(this.i.src||this.ya())&&(a=this.i.seekable)&&a.length){var b=this.h?this.h.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.h?this.h.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};q.Hj=function(){this.ra()&&(this.i.currentTime=this.ab().end)};q.Kj=function(){return this.oa};
q.keySystem=function(){return Xb(this.drmInfo())};q.drmInfo=function(){return this.C?this.C.ec():null};q.Pf=function(){return this.C?this.C.Pf():Infinity};q.Of=function(){return this.C?this.C.Of():[]};q.rg=function(a){this.C&&this.C.rg(a)};q.wg=function(a,b){var c=this,d;return G(function(e){return e.i==1?c.C?e.h(c.C.wg(a,b),3):e.A(2):e.i!=2?(d=e.j,e.return(d)):e.return(!1)})};q.xe=function(){return this.C?this.C.xe():{}};q.Bh=function(){return this.Z?this.Z.h==ko:!!this.ma};
q.Ta=function(){return this.i?this.N?this.N.i:1:0};q.Mg=function(a){this.m==dy&&this.l&&ds(this.l,a)};q.Kd=function(a,b){b=b===void 0?!0:b;if(a==0)Va("A trick play rate of 0 is unsupported!");else{var c=this.i.playbackRate,d=this.N.i;this.N.set(a);this.m==dy&&(this.B.playbackRateChanged(a),this.Mg(b&&a!=1));By(this,a);c===0&&this.i.playbackRate===0&&a!=d&&Ux(this)}};q.md=function(){var a=this.N.Pc();this.m==Xx&&this.N.set(a);this.m==dy&&(this.N.set(a),this.B.playbackRateChanged(a),this.Mg(!1));this.Jb.Pa()};
q.kc=function(){if(this.j&&!this.ya()){for(var a=this.l?this.l.u:null,b=[],c=0,d=t(this.j.variants),e=d.next();!e.done;e=d.next())if(e=e.value,xf(e)){var f=of(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.i&&this.i.audioTracks){var g=Cy(this);a=Array.from(this.i.audioTracks);return a.length?a.map(function(h){return wf(h,g)}):g?[wf(null,g)]:[]}return[]};
q.ob=function(){if(this.j){if(this.ya())return[];for(var a=this.l?this.l.D:null,b=[],c=t(this.j.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=pf(d);e.active=d==a;b.push(e)}this.K&&b.push.apply(b,va(this.K.ob()));return b}if(this.i&&this.i.src&&this.i.textTracks){a=qy(this);var f=this.F.isTextVisible();a=a.map(function(g){return vf(g,f)});this.K&&a.push.apply(a,va(this.K.ob()));return a}return[]};q.nj=function(){var a=this.Vd;this.j&&(a=this.j.imageStreams);return a.map(function(b){return qf(b)})};
q.dj=function(a){var b=this,c,d;return G(function(e){if(e.i==1)return e.h(Dy(b,a),2);c=e.j;if(!c)return e.return(null);d=[];c.segmentIndex.Qb(function(f){var g=Ey(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.columns,k=(f.m-f.startTime)/h,l=0;l<h;l++){var m=Fy(f,c,f.startTime+l*k,g);if(!m)break;d.push(m)}});return e.return(d)})};function Ey(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
q.Dj=function(a,b){var c=this,d,e,f,g;return G(function(h){if(h.i==1)return h.h(Dy(c,a),2);d=h.j;if(!d)return h.return(null);e=d.segmentIndex.find(b);if(e==null)return h.return(null);f=d.segmentIndex.get(e);return(g=Ey(f.tilesLayout||d.tilesLayout))?h.return(Fy(f,d,b,g)):h.return(null)})};
function Dy(a,b){var c,d,e;return G(function(f){if(f.i==1){if(a.m!=dy&&a.m!=Xx)return f.return(null);c=a.Vd;a.j&&(c=a.j.imageStreams);d=c[0];if(!d)return f.return(null);b!=null&&(d=c.find(function(g){return g.id==b}));return d?d.segmentIndex?f.A(2):f.h(d.createSegmentIndex(),2):f.return(null)}d.closeSegmentIndex&&(a.Vb.has(d)||(e=new Ke(function(){d&&(d.closeSegmentIndex(),a.Vb.delete(d))}),a.Vb.set(d,e)),a.Vb.get(d).ia(5));return f.return(d)})}
function Fy(a,b,c,d){var e=a.S();if(!e.length)return null;var f=b.width||0,g=b.height||0,h=f/d.columns,k=g/d.rows,l=d.columns*d.rows,m=a.m-a.startTime;m=a.D||m/l;var n=a.startTime,p=0,u=0;l>1&&(u=Math.floor((c-a.startTime)/m+1E-4),n=a.startTime+u*m,p=u%d.columns*h,u=Math.floor(u/d.columns)*k);if(n>=a.endTime||Xp(n,a.endTime,1E-4))return null;d=!1;if(c=a.thumbnailSprite)d=!0,k=c.height,p=c.positionX,u=c.positionY,h=c.width;return{segment:a,imageHeight:g,imageWidth:f,height:k,positionX:p,positionY:u,
startTime:n,duration:m,uris:e,startByte:a.jc(),endByte:a.fc(),width:h,sprite:d,mimeType:a.mimeType||b.mimeType,codecs:a.codecs||b.codecs}}
q.Fc=function(a){var b=this,c=!1;this.K&&a&&(c=this.K.ob().includes(a));this.K&&!c&&this.K.disable();if(!a||c)this.K&&c&&a&&this.K.enable(a),Vx(this),Gy(this,!1);else{c=function(){var d=b.j.textStreams.find(function(e){return e.id==a.id});d?d!=b.l.D&&($s(b.u.l,d,!1),gs(b.l,d),Vx(b),ly(b),b.Td=d.language,Gy(b,!0)):b.ya()};if(this.j&&this.G&&(c(),!this.ya()))return;(function(){if(b.i&&b.i.textTracks){var d=qy(b),e=d.find(function(h){return tf(h)===a.id});if(e){if(b.F instanceof Iu){d=t(d);for(var f=
d.next();!f.done;f=d.next()){f=f.value;var g=f===e?b.Ma?"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",b.o.mb(d,"cuechange"),b.F.remove(0,Infinity)),e&&sy(b,e));Vx(b);ly(b);Gy(b,!0)}}})()}};
function sy(a,b){a.o.I(b,"cuechange",function(){a.F.remove(0,Math.max(0,a.i.currentTime-a.h.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.i.duration,vttOffset:0,isMpegTs:!1},d=[],e=Array.from(b.activeCues||[]);e=t(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(f.endTime===Infinity||f.endTime<f.startTime)f=null;else{var g=new Bd(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?
Gd: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=ad,g.region.width=f.region.width,g.region.widthUnits=ad);Nd(g);f=g}f&&((g=a.h.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.F.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
q.zg=function(a,b,c){function d(){var f=e.j.variants.find(function(h){return h.id==a.id});if(f){if(xf(f)){var g=e.l.u;e.h.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)&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.ya()?by(e,f,!1,!1,0):by(e,f,!1,b||!1,c||0);f=
{preferredAudio:[{language:f.language||"",role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",label:f.audio&&f.audio.label||"",channelCount:f.audio&&f.audio.channelsCount||0,codec:f.audio&&f.audio.codecs||"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1}],preferredVideo:[{label:f.video&&f.video.label||"",role:f.video&&f.video.roles&&f.video.roles[0]||"",language:f.video&&f.video.language||"",codec:f.video&&f.video.codecs||"",hdrLevel:f.video&&f.video.hdr||"",layout:f.video&&f.video.videoLayout||
""}],language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:e.h.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,keySystem:e.keySystem()};Vs(f);e.P.configure(f);$x(e)}}else e.ya()}var e=
this;b=b===void 0?!1:b;c=c===void 0?0:c;if(this.j&&this.G&&(d(),!this.ya()))return;(function(){if(a.originalAudioId&&e.i&&e.i.audioTracks){var f=Array.from(e.i.audioTracks);f=t(f);for(var g=f.next();!g.done;g=f.next())if(g=g.value,tf(g)==a.id){Hy(e,g);break}}})()};
q.rk=function(a,b){function c(){var f=e.P.getConfiguration();f.audioCodec=a.codecs||"";f.preferredAudio=[{language:a.language,role:a.roles[0]||"",label:a.label||"",channelCount:a.channelsCount||0,codec:"",spatialAudio:a.spatialAudio}];var g=e.l.u;if(g=g&&g.audio)f.activeAudioCodec=g.codecs||"",f.activeAudioChannelCount=g.channelsCount||0,d(g.language,a.language);Vs(f);e.P.configure(f);qx(e,!0,b,!1,!1)}function d(f,g){if(f!=g&&e.h.accessibility.handleForcedSubtitlesAutomatically){var h=e.ob(),k=h.find(function(m){return m.active}),
l=k?kc(k.language):null;f=kc(f);g=kc(g);if(!k||l==f&&l!=g&&k.forced)h=zf(h,g,"",!0),h.length&&e.Fc(h[0])}}var e=this;b=b===void 0?0:b;if(this.j&&this.G&&(c(),!this.ya()))return;(function(){if(e.i&&e.i.audioTracks){var f=kc(a.language),g=Array.from(e.i.audioTracks),h=null,k=null;g=t(g);for(var l=g.next();!l.done;l=g.next()){l=l.value;var m=l.language||"und";h||l.label!=a.label||kc(m)!=f||l.kind!=a.roles[0]||(h=l);l.enabled&&(k=l)}h&&(k&&d(k.language,h.language),Hy(e,h))}})()};
q.getAudioTracks=function(){if(this.j&&!this.ya()){var a=this.kc();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.m!=dy||this.ya()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&(f.audioCodec||je.includes(f.audioMimeType||""))}));if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=[e.language,e.originalLanguage,e.label||"",(e.audioRoles||[]).join(","),e.channelsCount,e.spatialAudio,e.audioCodec||
"",e.accessibilityPurpose||""].join("_");e={active:e.active,language:e.language,label:e.label,mimeType:e.audioMimeType,codecs:e.audioCodec,primary:e.primary,roles:e.audioRoles||[],accessibilityPurpose:e.accessibilityPurpose,channelsCount:e.channelsCount,audioSamplingRate:e.audioSamplingRate,spatialAudio:e.spatialAudio,originalLanguage:e.originalLanguage};a.has(d)?!a.get(d).active&&e.active&&a.set(d,e):a.set(d,e)}return Array.from(a.values())}return this.i&&this.i.audioTracks?Array.from(this.i.audioTracks).map(function(f){var g=
f.language;g={active:f.enabled,language:kc(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&&(f.kind=="description"&&(g.accessibilityPurpose="visually impaired"),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}):[]};
q.tk=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?0:c;var d=this.kc();if(d.length){var e=d.find(function(g){return g.active});if(e){d=d.filter(function(g){return(g.videoBandwidth||g.bandwidth)==a.bandwidth&&g.width==a.width&&g.height==a.height&&g.frameRate==a.frameRate&&g.pixelAspectRatio==a.pixelAspectRatio&&g.hdr==a.hdr&&g.colorGamut==a.colorGamut&&g.videoLayout==a.videoLayout&&g.videoMimeType==a.mimeType&&g.videoCodec==a.codecs&&eb(g.videoRoles,a.roles)&&(g.videoLanguage||"und")==(a.language||
"und")&&g.videoLabel==a.label});var f;d.length==1?f=d[0]:f=d.find(function(g){return g.audioId===e.audioId});f||(f=d.find(function(g){return g.language==e.language&&g.label===e.label&&g.channelsCount===e.channelsCount&&g.spatialAudio===e.spatialAudio&&g.audioMimeType===e.audioMimeType&&ne(g.audioCodec||"")===ne(e.audioCodec||"")&&eb(g.audioRoles,e.audioRoles)}));f&&!f.active&&this.zg(f,b,c)}}};
q.getVideoTracks=function(){if(this.m==Xx||this.ya())return[];var a=this.kc();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.Eh()||(c=a.filter(function(f){return f.videoCodec&&f.audioGroupId===b.audioGroupId&&f.originalAudioId===b.originalAudioId?f.audioId===b.audioId?!0:f.language===b.language&&f.label===b.label&&f.channelsCount===b.channelsCount&&f.spatialAudio===b.spatialAudio&&f.audioMimeType===b.audioMimeType&&ne(f.audioCodec||"")===ne(b.audioCodec||
"")&&eb(f.audioRoles,b.audioRoles):!1}));if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalVideoId;e||d.videoId==null||(e=String(d.videoId));e&&a.set(e,{active:d.active,language:d.videoLanguage||"und",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())};q.hj=function(){var a=this.Ud;this.j&&(a=this.j.chapterStreams);a=a.map(function(c){return sf(c)});var b=Iy(this);b.length&&a.push.apply(a,va(b.map(function(c){return{id:tf(c),type:"chapter",bandwidth:0,language:kc(c.language||"und")}})));return a};
q.gj=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,p,u,r;return G(function(v){switch(v.i){case 1:c=Jy(b,a);if(c.length)return v.return(c);d=b.Ud;b.j&&(d=b.j.chapterStreams);if(!d.length)return v.return([]);e=kc(a);f=d.filter(function(w){return kc(w.language)==e});if(!f.length)return v.return([]);g=[];h=new Set;k=t(f);l=k.next();m={};case 2:if(l.done){v.A(4);break}n=l.value;if(n.segmentIndex){v.A(5);break}return v.h(n.createSegmentIndex(),5);case 5:m.wc=0;p=void 0;b.isLive()&&((p=b.j)==null?void 0:p.type)===
"HLS"&&(u=b.j.presentationTimeline,r=void 0,m.wc=Math.max(0,(r=u.l)!=null?r:u.i));n.segmentIndex.Qb(function(w){return function(y){var x=y.getMetadata();if(x){var A=x.title,C=y.startTime+"-"+y.endTime+"-"+A;w.wc>0&&y.endTime-w.wc<0&&(w.wc=0);y={id:C,title:A,startTime:Math.max(0,y.startTime-w.wc),endTime:Math.max(0,y.endTime-w.wc),images:x.images};h.has(C)||(g.push(y),h.add(C))}}}(m));m={wc:void 0};l=k.next();v.A(2);break;case 4:return v.return(g)}})};
function Jy(a,b){a=Iy(a);if(!a.length)return[];var c=kc(b),d=a.filter(function(h){return kc(h.language)==c});if(!d||!d.length)return[];b=[];a=new Set;d=t(d);for(var e=d.next();!e.done;e=d.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&f!=""||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime,images:[]};a.has(f)||(b.push(g),a.add(f))}}return b}
function qy(a){return Array.from(a.i.textTracks).filter(function(b){return b.kind!="metadata"&&b.kind!="chapters"&&b.label!="Shaka Player TextTrack"})}function uy(a){return Array.from(a.i.textTracks).filter(function(b){return b.kind=="metadata"})}function Iy(a){return a.i&&a.i.textTracks?Array.from(a.i.textTracks).filter(function(b){return b.kind=="chapters"}):[]}
function Gy(a,b){b=!!b;a.Ma!=b&&(a.Ma=b,a.m==dy?(a.F.setTextVisibility(b),b?a.l.D||(b=zf(a.j.textStreams,a.Td,a.bf,a.$e),b.length>0&&(gs(a.l,b[0]),Vx(a),ly(a))):cs(a.l)):a.i&&a.i.src&&a.i.textTracks&&a.F.setTextVisibility(b))}
q.uj=function(){if(this.G)var a=this.G.jd();else{if(this.U==null)return new Date;if(this.U instanceof Date)return this.U;a=this.U}if(this.j&&!this.ya()){var b=this.j.presentationTimeline,c=b.qh(a);return c!=null?new Date(c*1E3):new Date((b.i+a)*1E3)}return this.i&&this.i.getStartDate?(b=this.i.getStartDate(),b instanceof Date&&!isNaN(b.getTime())?new Date(b.getTime()+a*1E3):null):null};
q.ph=function(){if(this.j&&!this.ya()){var a=this.j.presentationTimeline;a=a.l||a.i;return a===null?null:new Date(a*1E3)}return this.i&&this.i.getStartDate?(a=this.i.getStartDate(),a instanceof Date&&!isNaN(a.getTime())?a:null):null};q.ye=function(){return this.isLive()?this.j?this.j.presentationTimeline.ye():null:null};q.dc=function(){if(this.m==dy)return this.H.dc();var a={total:[],audio:[],video:[],text:[]};this.m==Xx&&(a.total=zp(this.i.buffered));return a};
function vy(a){if(!a.i||!a.i.currentTime)return null;var b=a.ph();return b?Math.floor(Date.now()-(b.getTime()+a.i.currentTime*1E3)):null}q.getBandwidthEstimate=function(){return this.B?this.B.getBandwidthEstimate():NaN};
q.getStats=function(){if(this.m!=dy&&this.m!=Xx)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,timeToFirstFrame: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:[]};Tx(this);var a=this.i,b=a.currentTime/a.duration;isNaN(b)||this.ra()||dt(this.u,Math.round(100*b));this.G&&(this.u.Z=this.G.Og(),this.u.ba=this.G.Qg());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),bt(this.u,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.u.P=Number(b.corruptedVideoFrames));et(this.u,this.C?sk(this.C):NaN);ct(this.u,a.videoWidth||NaN,a.videoHeight||NaN);this.u.m="";this.ra()&&(a=vy(this),a!=null&&ft(this.u,
a/1E3));b=this.kc().find(function(e){return e.active});a=this.ob().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.u.D=d}b.width&&b.height&&ct(this.u,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.u.m=b)}this.m!=dy||this.ya()||(this.j&&(this.u.K=this.j.periodCount,this.u.J=this.j.gapCount,this.j.presentationTimeline&&gt(this.u,this.j.presentationTimeline.j)),a=this.B.getBandwidthEstimate(),
this.u.C=a);this.m==Xx&&ht(this.u,NaN);return it(this.u)};
q.Hi=function(a,b,c,d,e,f,g){var h=this;g=g===void 0?!1:g;var k=function(){var l,m,n,p,u,r,v,w,y,x,A,C;return G(function(z){switch(z.i){case 1:if(h.m!=dy&&h.m!=Xx)throw new K(1,7,7004);c!="subtitles"&&c!="captions"&&Va("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.A(2);break}return z.h(Ky(h,a),3);case 3:d=z.j;case 2:l=[];h.D&&(l=h.D.getCuePoints());if(h.m!=Xx){z.A(4);break}m=nb();g&&m.Da()==="WEBKIT"&&(c="forced");return z.h(Ly(h,a,b,c,d,f||"",l),
5);case 5:n=z.j;if(n.track)return Wx(h),Vx(h),z.return(vf(n.track,h.F.isTextVisible()));throw new K(1,2,2012);case 4:p=Ac;u=h.ab();r=u.end-u.start;h.j&&(r=h.j.presentationTimeline.getDuration());if(r==Infinity)throw new K(1,4,4033);if(!l.length){z.A(6);break}return z.h(My(h,a),7);case 7:v=z.j,w=Ny(h,v,d,l),y=new Blob([w],{type:"text/vtt"}),a=aq(y),d="text/vtt";case 6:x=Df({id:h.Xd++,segmentIndex:Bl(0,r,[a]),mimeType:d||"",codecs:e||"",kind:c,language:b,originalLanguage:b,label:f||null,type:p.Ra,forced:!!g,
external:!0});A=ie(x.mimeType,x.codecs);C=Ae(A);if(!C)throw new K(2,2,2014,d);h.j.textStreams.push(x);Wx(h);Vx(h);return z.return(pf(x))}})}();this.oa||Oy(this,k);return k};
q.Ii=function(a,b){var c=this,d=function(){var e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z;return G(function(B){switch(B.i){case 1:if(c.m!=dy&&c.m!=Xx)throw new K(1,7,7004);if(b){B.A(2);break}return B.h(Ky(c,a),3);case 3:b=B.j;case 2:if(b!="text/vtt")throw new K(1,2,2017,a);e=Ac;f=c.ab();g=f.end-f.start;c.j&&(g=c.j.presentationTimeline.getDuration());if(g==Infinity)throw new K(1,4,4045);return B.h(My(c,a),4);case 4:h=B.j;k=ze(b);if(!k)throw new K(2,2,2014,b);l=k();m={periodStart:0,segmentStart:0,segmentEnd:g,
vttOffset:0,isMpegTs:!1};n=tb(h);p=l.parseMedia(n,m,a,[]);u=[];r=t(p);v=r.next();for(w={};!v.done;w={Ve:void 0,Nc:void 0},v=r.next())w.Nc=v.value,w.Ve=null,y=function(D){return function(){D.Ve==null&&(D.Ve=rj([a],[D.Nc.payload]));return D.Ve||[]}}(w),x=new ml(w.Nc.startTime,w.Nc.endTime,y,0,null,null,0,0,Infinity),w.Nc.payload.includes("#xywh")&&(A=w.Nc.payload.split("#xywh=")[1].split(","),A.length===4&&x.ki({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],
10)})),u.push(x);C=b;if(!u.length){B.A(5);break}return B.h(Ky(c,u[0].S()[0]),6);case 6:C=B.j;case 5:return z=Df({id:c.Xd++,segmentIndex:new zl(u),mimeType:C||"",kind:"",language:"und",type:e.Ei,tilesLayout:"1x1",external:!0}),c.m==Xx?c.Vd.push(z):c.j.imageStreams.push(z),Wx(c),B.return(qf(z))}})}();this.oa||Oy(this,d);return d};
q.Gi=function(a,b,c){var d=this,e=function(){var f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C;return G(function(z){switch(z.i){case 1:if(d.m!=dy&&d.m!=Xx)throw new K(1,7,7004);if(c){z.A(2);break}return z.h(Ky(d,a),3);case 3:c=z.j;case 2:f=Ac;g=d.ab();h=g.end-g.start;d.j&&(h=d.j.presentationTimeline.getDuration());if(h==Infinity)throw new K(1,4,4055);k=ze(c);if(!k)throw new K(2,2,2014,c);return z.h(My(d,a),4);case 4:l=z.j;m=k();n={periodStart:0,segmentStart:0,segmentEnd:h,vttOffset:0,isMpegTs:!1};p=tb(l);u=m.parseMedia(p,
n,a,[]);r=[];v=t(u);for(w=v.next();!w.done;w=v.next())y=w.value,x=new ml(y.startTime,y.endTime,function(){return[]},0,null,null,0,0,Infinity),A={title:y.payload,images:[]},x.Ag(A),r.push(x);C=Df({id:d.Xd++,segmentIndex:new zl(r),mimeType:"text/plain",kind:"",language:b,originalLanguage:b,type:f.Ci,external:!0});d.m==dy?d.j.chapterStreams.push(C):d.Ud.push(C);Wx(d);return z.return(sf(C))}})}();this.oa||Oy(this,e);return e};
function Ky(a,b){var c;return G(function(d){switch(d.i){case 1:return d.o(2),d.h(Rl(b,a.L,a.h.streaming.retryParameters),4);case 4:c=d.j;d.u(3);break;case 2:d.m();case 3:if(c)return d.return(c);throw new K(1,2,2011,b);}})}
function Ly(a,b,c,d,e,f,g){var h,k,l,m;return G(function(n){if(n.i==1)return e!="text/vtt"||g.length?n.h(My(a,b),3):n.A(2);n.i!=2&&(h=n.j,k=Ny(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=aq(l),e="text/vtt");m=document.createElement("track");var p=a.M,u=b;if(p.h)try{var r=Ow(p);r.ot="c";r.su=!0;var v=Iw(u,r,Pw(p,u))}catch(w){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),v=u}else v=u;m.src=v;m.label=f;m.kind=d;m.srclang=c;a.i.getAttribute("crossorigin")||a.i.setAttribute("crossorigin",
"anonymous");a.i.appendChild(m);a.cf.push(m);return n.return(m)})}function My(a,b){var c,d,e,f;return G(function(g){if(g.i==1){c=Jj;d=a.h.streaming.retryParameters;e=Ej([b],d);e.method="GET";var h=a.M;h.h&&Vw(h,e,{ot:"c",su:!0});return g.h(a.L.request(c,e).promise,2)}f=g.j;return g.return(f.data)})}
function Ny(a,b,c,d){var e=ze(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.i.duration,vttOffset:0,isMpegTs:!1},b=tb(b),b=c.parseMedia(b,a,null,[]),zv(b,d);throw new K(2,2,2014,c);}q.xk=function(a,b){this.Na.width=a;this.Na.height=b};q.xg=function(a){if(this.m==dy){var b=this.l;a=a===void 0?.1:a;if(b.m.h)b=!1;else if(b.F)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Sc||d.za||d.bb||(d.Sc=!1,bs(b,d,a));b=!0}}else b=!1;return b};
q.Rf=function(){Va("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.j};q.pj=function(){return this.Wb};
q.lj=function(){var a={video:null,audio:null,text:null};if(this.m!=dy)return a;var b=this.l.u,c=this.i.currentTime;b=t([b.video,b.audio,this.l.D]);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);var f=void 0,g=void 0,h=void 0,k=void 0,l=void 0,m=void 0,n={codecs:(k=(f=e)==null?void 0:f.codecs)!=null?k:d.codecs,mimeType:(l=(g=e)==null?void 0:g.mimeType)!=null?l:d.mimeType,bandwidth:(m=(h=e)==null?void 0:h.bandwidth)!=null?m:
d.bandwidth};d.type=="video"?(n.width=d.width,n.height=d.height,a.video=n):d.type=="audio"?a.audio=n:d.type==yc&&(a.text=n)}return a};
function lx(a){var b=Ps();b.streaming.failureCallback=function(c){if(a.ra()){var d=null;c.code==1001||c.code==1002?(d=1,a.h.streaming.lowLatencyMode&&(d=.1)):c.code==1003&&(d=.1);d!=null&&(c.severity=1,a.xg(d))}};b.textDisplayFactory=function(c){if(a.Yb){var d=a.i;d=d.webkitDisplayingFullscreen||d.webkitPresentationMode&&d.webkitPresentationMode!="inline"?!1:!0}else d=!1;return d?new hv(c):"track"in document.createElement("track")?new Iu(c):new gv};return b}q.Ak=function(a){this.Yb=a};
function jy(a,b){var c,d,e,f,g;return G(function(h){if(h.i==1)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return G(function(u){if(u.i==1)return k?k.segmentIndex?u.A(2):u.h(k.createSegmentIndex(),2):u.return(null);n=(m=k.segmentIndex.Eb(l))?m.next().value:null;if(!n)return u.return(null);p=n.startTime;return u.return(p)})},h.h(e(c,b),2);if(h.i!=3)return f=h.j,h.h(e(d,b),3);g=h.j;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 Ax(a){var b=a.Bh();if(a.u&&a.Z&&a.G){if(a.h.streaming.rebufferingGoal==0){var c=a.N;c.l=!1;Yq(c)}else c=a.N,c.l=b,Yq(c);a.M&&Uw(a.M,b?"r":"p");Tx(a);c=a.h.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.h.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.$d<c){c=a.h.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.h.streaming.liveSync.targetLatencyTolerance,e=a.h.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.ea&&(a.ea=Math.min(a.ea+ ++a.$d*e,c-d))}}b=
(new Map).set("buffering",b);a.dispatchEvent(tx("buffering",b))}function Ux(a){var b=a.i.playbackRate;b==0?(b=a.Ta(),b!==0&&b!==1&&(b=tx("ratechange"),a.dispatchEvent(b))):(a.N&&(a.N.set(b),a.m==dy&&a.B.playbackRateChanged(b),By(a,b)),b=tx("ratechange"),a.dispatchEvent(b))}
function By(a,b){a.Jb.Pa();a.Jb.I(a.i,"timeupdate",function(){var c=a.i.currentTime,d=a.ab(),e=a.ra(),f=e?a.h.streaming.safeSeekOffset:0;b>0?e&&b>1&&Math.floor(c)>=Math.floor(d.end)&&a.md():Math.floor(c)<=Math.floor(d.start+f)&&a.md()})}
function Tx(a){if(a.u&&a.Z){var b=a.u.h,c="playing";a.Z.h==ko?c="buffering":a.xd()?c="ended":a.i.paused&&(c="paused");var d=c;if(b.h==null)b.h={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.h.duration=e-b.h.timestamp;b.h.state==d?b=!1:(b.i.push(b.h),b.h={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(tx("statechanged",c)))}}
function ny(a){var b=a.i.playbackRate,c=a.ra();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.kh();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Kd(d,!1):e==1&&b!==a.N.Pc()&&a.md()}if(c&&(c=a.ab(),Number.isFinite(c.end)&&!(a.i.currentTime<c.start||a.i.paused))){d=a.h.streaming.liveSync.targetLatencyTolerance;e=a.h.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.h.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
if(a.h.streaming.liveSync&&a.h.streaming.liveSync.enabled){var g=a.h.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.h.streaming.liveSync.maxPlaybackRate;var m=a.h.streaming.liveSync.minPlaybackRate}else a.j&&a.j.serviceDescription&&(g=a.j.serviceDescription.targetLatency,a.j.serviceDescription.targetLatency!=null?h=a.j.serviceDescription.targetLatency+d:a.j.serviceDescription.maxLatency!=null&&(h=a.j.serviceDescription.maxLatency),a.j.serviceDescription.targetLatency!=null?
k=Math.max(0,a.j.serviceDescription.targetLatency-d):a.j.serviceDescription.minLatency!=null&&(k=a.j.serviceDescription.minLatency),l=a.j.serviceDescription.maxPlaybackRate||a.h.streaming.liveSync.maxPlaybackRate,m=a.j.serviceDescription.minPlaybackRate||a.h.streaming.liveSync.minPlaybackRate);a.ea||typeof g!=="number"||(a.ea=g);var n=a.h.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Ib&&a.ea!==null&&typeof g==="number"&&a.$d<n&&Date.now()-a.Ib>f*1E3&&(f=a.h.streaming.liveSync.dynamicTargetLatency.minLatency,
a.ea=Math.max(a.ea-(g-f)/2,f+d),a.Ib=Date.now());e&&a.ea!==null&&(h=a.ea+d,k=a.ea-d);g=c.end-a.i.currentTime;d=0;a.m==Xx&&(e=a.i.buffered,e.length>0&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.h.streaming.liveSync.panicMode;e=a.h.streaming.liveSync.panicThreshold*1E3;f=Date.now()-a.Z.j;c&&!m&&(m=a.h.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Kd(m,!1):h!=void 0&&l&&g-d>h?(b!=l&&a.Kd(l,!1),a.Ib=null):k!=void 0&&m&&g-d<k?(b!=m&&a.Kd(m,!1),a.Ib=null):b!==a.N.Pc()&&(a.md(),a.Ib=Date.now())}}
function Py(a,b,c){return(Xp(b,c,.01)||c>b)&&a.Ze<b?(a.Ze=b,!0):!1}function oy(a){if(a.i){var b=a.ab();b=b.end-b.start;b=b>0?a.i.currentTime/b:0;if(!isNaN(b)){b*=100;if(Py(a,0,b))var c=tx("started");else if(Py(a,25,b))c=tx("firstquartile");else if(Py(a,50,b))c=tx("midpoint");else if(Py(a,75,b))c=tx("thirdquartile");else{if(Py(a,100,b)||b>100)c=tx("complete");a.h&&a.h.playRangeEnd!=Infinity&&a.xd()&&a.i.pause()}c&&a.dispatchEvent(c)}}}
function $x(a){try{Pp(a.Pd,a.j)}catch(d){return yx(a,d),!1}var b=a.j.isLowLatency&&a.h.streaming.lowLatencyMode,c=yf(a.j.variants);c=a.P.create(c);a=a.B.setVariants(Array.from(c.values()),b);return typeof a=="boolean"?a:!0}function ey(a,b){b=b===void 0?!1:b;if($x(a)){if(!a.h.abr.enabled){var c=a.P.getLastAdaptationSet();if(c&&(c=Array.from(c.values()),c.length)){var d=a.l.u;if(d&&d.video&&(c=c.find(function(e){return e.video==d.video})))return c}}return a.B.chooseVariant(b)}return null}
function ky(a,b){var c=null,d=zf(a.j.textStreams,a.Td,a.bf,a.$e);d.length&&(c=d[0]);!c&&b.audio&&a.h.accessibility.handleForcedSubtitlesAutomatically&&(d=zf(a.j.textStreams,b.audio.language,"",!0),d.length&&(c=d[0]));return c}function qx(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=ey(a);f&&by(a,f,e,b,c,d)}
function by(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a.l.u;if(b==g)d&&fs(a.l,b,d,e,!0);else{var h=a.u.l;h.i!=b&&(h.i=b,h.h.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));fs(a.l,b,d,e,f,c);d=null;g&&(d=of(g));g=of(b);g.active=!0;if(a.ba&&(e=a.ba,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.nh()){case "DASH":h=1;break;case "HLS":h=0}e.h&&(e.h.setLevelSwitching(b.id,
!0),e.h.setContainerFormat(f),e.h.setStreamingFormat(h))}c?(c=(new Map).set("oldTrack",d).set("newTrack",g),c=tx("adaptation",c),Qy(a,c)):Ry(a,d,g);Sy(a,d,g)}}function Hy(a,b){var c=Array.from(a.i.audioTracks).find(function(e){return e.enabled});b.enabled=!0;if(c){b.id!==c.id&&(c.enabled=!1);var d=Cy(a);c=wf(c,d);b=wf(b,d);Ry(a,c,b);Sy(a,c,b)}}function Cy(a){return a.i&&a.i.videoTracks?Array.from(a.i.videoTracks).find(function(b){return b.selected}):null}
function Wx(a){var b=tx("trackschanged");Qy(a,b);Ty(a)}function Ry(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=tx("variantchanged",b);Qy(a,b)}function Sy(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&Ty(a)}function Ty(a){var b=tx("audiotrackschanged");Qy(a,b)}function Vx(a){var b=tx("textchanged");Qy(a,b)}function my(a){a.h.abr.enabled||px(a);var b=(new Map).set("newStatus",a.h.abr.enabled);Qy(a,tx("abrstatuschanged",b))}
function ly(a){var b=a.ob().find(function(c){return c.active});b&&a.F&&a.F.setTextLanguage(b.language)}function px(a,b){b=b===void 0?!0:b;if(a.m==dy){a.Rd.stop();for(var c=t(a.j.variants),d=c.next();!d.done;d=c.next())d=d.value,isFinite(d.disabledUntilTime)&&(d.disabledUntilTime=0);b&&$x(a)}}
q.disableStream=function(a,b){if(!this.h.abr.enabled||this.m===ux||!navigator.onLine||b==0||!this.j)return!1;if(this.j.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?a.type=="audio"?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.j.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.Rd.Ka(1);b=this.dc().video.reduce(function(h,
k){return h+k.end-k.start},0);qx(this,!1,b,!0,!1);return!0}return!1};
function yx(a,b){var c,d,e,f,g;return G(function(h){switch(h.i){case 1:if(a.m==ux)return h.return();b.severity===1&&a.u.N++;if(!a.j||!a.l||b.handled||b.code!=3016&&b.code!=3014&&b.code!=3015&&b.code!=3024&&b.code!=3018){h.A(2);break}c=yf(a.j.variants);if(!(c.length>1||a.oa)){h.A(2);break}d=nb();if(d.Da()==="WEBKIT"&&b.code==3016)return h.return();h.o(4);return h.h(ws(a.l),6);case 6:if(e=h.j)return f=tx("mediasourcerecovered"),a.dispatchEvent(f),h.return();h.u(2);break;case 4:h.m();case 2:b.severity===
2&&px(a,!1),g=tx("error",(new Map).set("detail",b)),a.dispatchEvent(g),g.defaultPrevented&&(b.handled=!0),h.l()}})}q.addFont=function(a,b){return Ji(a,b)};function Mx(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,eventNode:c.eventNode,urlParams:c.urlParams,values:c.values});d.dispatchEvent(tx(b,a))}
function xy(a,b){if(b.schemeIdUri==="urn:mpeg:dash:event:callback:2015"&&b.eventNode){var c=wd(b.eventNode);c&&(c=c.trim())&&(c=wj(c,b.urlParams),a.L.request(13,Ej([c],gj())).promise.catch(function(){}))}}
function Nx(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(tx(d?"audiotrackchanged":"mediaqualitychanged",b))}
function xx(a,b){b=b===void 0?!0:b;if(!a.i.error)return b?new K(2,3,3016):null;a=zb(a.i.error);var c=a.code;return b||c!==MediaError.MEDIA_ERR_ABORTED?new K(2,3,3016,c,a.Xi,a.message):null}
function Ox(a,b){if(a.l){var c=tx("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=Rj(a.h.drm.clearKeys),g=function(r,v){r.allowedByKeySystem=!0;v=t(v);for(var w=v.next();!w.done;w=v.next())if(w=w.value,(w=b[e?"00":w])||a.C.H)r.allowedByKeySystem=r.allowedByKeySystem&&!!w&&!Qp.includes(w)},h=t(a.j.variants),k=h.next();!k.done;k=h.next()){k=k.value;var l=Bf(k);l=t(l);
for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=k.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!f.size&&a.j.type=="HLS")for(var p=t(m.drmInfos),u=p.next();!u.done;u=p.next())u=u.value,u.keySystem==d&&(u.keyIds.size?g(k,u.keyIds):g(k,m.keyIds));else g(k,m.keyIds);n!=k.allowedByKeySystem&&(c=!0)}}}c&&(Wx(a),(c=a.l.u)&&!c.allowedByKeySystem?qx(a):$x(a))}}function ay(a,b,c){b>0&&(a.ra()||a.li(b));b=a.getDuration();c<b&&(a.ra()||a.qc(c))}
function Qy(a,b){G(function(c){if(c.i==1)return c.h(Promise.resolve(),2);a.m!=ux&&a.dispatchEvent(b);c.l()})}q.ya=function(){if(!this.i)return!1;var a=Li(nb(),this.i);return a?a.state!="disconnected":!1};q.xd=function(){return!this.i||this.i.ended?!0:this.oa&&!this.ra()&&this.i.currentTime>=this.ab().end};
function zy(a){function b(g,h){Va(g,"has been deprecated. Please use",h,"instead.")}var c={preferredAudioLanguage:"language",preferredAudioRole:"role",preferredAudioLabel:"label",preferredAudioChannelCount:"channelCount",preferSpatialAudio:"spatialAudio"};if(Object.keys(c).some(function(g){return g in a})){var d={language:"",role:"",label:"",channelCount:0,codec:""};c=t(Object.entries(c));for(var e=c.next();!e.done;e=c.next()){var f=t(e.value);e=f.next().value;f=f.next().value;e in a&&(b(e,"preferredAudio"),
d[f]=a[e],delete a[e])}a.preferredAudio||(a.preferredAudio=[d])}"preferredAudioCodecs"in a&&(b("preferredAudioCodecs","preferredAudio"),d=a.preferredAudioCodecs,Array.isArray(d)&&d.length&&(a.preferredAudio||(a.preferredAudio=d.map(function(g){return{language:"",role:"",label:"",channelCount:0,codec:g}}))),delete a.preferredAudioCodecs);c={preferredTextLanguage:"language",preferredTextRole:"role",preferForcedSubs:"forced"};if(Object.keys(c).some(function(g){return g in a})){d={language:"",role:"",
format:""};c=t(Object.entries(c));for(e=c.next();!e.done;e=c.next())f=t(e.value),e=f.next().value,f=f.next().value,e in a&&(b(e,"preferredText"),d[f]=a[e],delete a[e]);a.preferredText||(a.preferredText=[d])}"preferredTextFormats"in a&&(b("preferredTextFormats","preferredText"),d=a.preferredTextFormats,Array.isArray(d)&&d.length&&(a.preferredText||(a.preferredText=d.map(function(g){return{language:"",role:"",format:g}}))),delete a.preferredTextFormats);c={preferredVideoLabel:"label",preferredVideoRole:"role",
preferredVideoHdrLevel:"hdrLevel",preferredVideoLayout:"layout"};if(Object.keys(c).some(function(g){return g in a})){d={label:"",role:"",language:"",codec:"",hdrLevel:"",layout:""};c=t(Object.entries(c));for(e=c.next();!e.done;e=c.next())f=t(e.value),e=f.next().value,f=f.next().value,e in a&&(b(e,"preferredVideo"),d[f]=a[e],delete a[e]);a.preferredVideo||(a.preferredVideo=[d])}"preferredVideoCodecs"in a&&(b("preferredVideoCodecs","preferredVideo"),d=a.preferredVideoCodecs,Array.isArray(d)&&d.length&&
(a.preferredVideo||(a.preferredVideo=d.map(function(g){return{label:"",role:"",language:"",codec:g,hdrLevel:"",layout:""}}))),delete a.preferredVideoCodecs)}function Oy(a,b){a.hd.add(b);b.finally(function(){return a.hd.delete(b)})}function fy(a){return G(function(b){return a.hd.size?b.h(Promise.all([].concat(va(a.hd))),0):b.return()})}J("shaka.Player",Z);Z.prototype.isEnded=Z.prototype.xd;Z.prototype.isRemotePlayback=Z.prototype.ya;Z.prototype.addFont=Z.prototype.addFont;
Z.prototype.setVideoContainer=Z.prototype.Ak;Z.prototype.getFetchedPlaybackInfo=Z.prototype.lj;Z.prototype.getManifestParserFactory=Z.prototype.pj;Z.prototype.getManifest=Z.prototype.Rf;Z.prototype.retryStreaming=Z.prototype.xg;Z.prototype.setMaxHardwareResolution=Z.prototype.xk;Z.prototype.addChaptersTrack=Z.prototype.Gi;Z.prototype.addThumbnailsTrack=Z.prototype.Ii;Z.prototype.addTextTrackAsync=Z.prototype.Hi;Z.prototype.getStats=Z.prototype.getStats;Z.prototype.getBufferedInfo=Z.prototype.dc;
Z.prototype.getSegmentAvailabilityDuration=Z.prototype.ye;Z.prototype.getPresentationStartTimeAsDate=Z.prototype.ph;Z.prototype.getPlayheadTimeAsDate=Z.prototype.uj;Z.prototype.getChaptersAsync=Z.prototype.gj;Z.prototype.getChaptersTracks=Z.prototype.hj;Z.prototype.getVideoTracks=Z.prototype.getVideoTracks;Z.prototype.selectVideoTrack=Z.prototype.tk;Z.prototype.getAudioTracks=Z.prototype.getAudioTracks;Z.prototype.selectAudioTrack=Z.prototype.rk;Z.prototype.selectVariantTrack=Z.prototype.zg;
Z.prototype.selectTextTrack=Z.prototype.Fc;Z.prototype.getThumbnails=Z.prototype.Dj;Z.prototype.getAllThumbnails=Z.prototype.dj;Z.prototype.getImageTracks=Z.prototype.nj;Z.prototype.getTextTracks=Z.prototype.ob;Z.prototype.getVariantTracks=Z.prototype.kc;Z.prototype.cancelTrickPlay=Z.prototype.md;Z.prototype.trickPlay=Z.prototype.Kd;Z.prototype.useTrickPlayTrackIfAvailable=Z.prototype.Mg;Z.prototype.getPlaybackRate=Z.prototype.Ta;Z.prototype.isBuffering=Z.prototype.Bh;Z.prototype.getKeyStatuses=Z.prototype.xe;
Z.prototype.retryLicensing=Z.prototype.wg;Z.prototype.renewLicense=Z.prototype.rg;Z.prototype.getActiveSessionsMetadata=Z.prototype.Of;Z.prototype.getExpiration=Z.prototype.Pf;Z.prototype.drmInfo=Z.prototype.drmInfo;Z.prototype.keySystem=Z.prototype.keySystem;Z.prototype.isFullyLoaded=Z.prototype.Kj;Z.prototype.goToLive=Z.prototype.Hj;Z.prototype.seekRange=Z.prototype.ab;Z.prototype.isVideoOnly=Z.prototype.Eh;Z.prototype.isAudioOnly=Z.prototype.yh;Z.prototype.isDynamic=Z.prototype.ra;
Z.prototype.isInProgress=Z.prototype.Uc;Z.prototype.isLive=Z.prototype.isLive;Z.prototype.getQueueManager=Z.prototype.yj;Z.prototype.getAdManager=Z.prototype.aj;Z.prototype.getAllTimelineRegions=Z.prototype.ej;Z.prototype.getAllEmsgRegions=Z.prototype.bj;Z.prototype.getAllMetadataRegions=Z.prototype.cj;Z.prototype.getMimeType=Z.prototype.Sf;Z.prototype.getAssetUri=Z.prototype.we;Z.prototype.getNetworkingEngine=Z.prototype.sj;Z.prototype.getMediaElement=Z.prototype.Qc;Z.prototype.getManifestType=Z.prototype.nh;
Z.prototype.getLoadMode=Z.prototype.Qf;Z.prototype.resetConfiguration=Z.prototype.lk;Z.prototype.getBufferFullness=Z.prototype.kh;Z.prototype.getNonDefaultConfiguration=Z.prototype.tj;Z.prototype.getConfigurationForLowLatency=Z.prototype.ij;Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.configurationForLowLatency=Z.prototype.Ri;Z.prototype.configure=Z.prototype.configure;Z.prototype.releaseAllMutexes=Z.prototype.kk;Z.prototype.destroyAllPreloads=Z.prototype.fh;
Z.prototype.preload=Z.prototype.preload;Z.prototype.detachAndSavePreload=Z.prototype.gh;Z.prototype.unloadAndSavePreload=Z.prototype.Gk;Z.prototype.load=Z.prototype.load;Z.prototype.updateStartTime=Z.prototype.Jk;Z.prototype.unload=Z.prototype.Ld;Z.prototype.detach=Z.prototype.detach;Z.prototype.attachCanvas=Z.prototype.Ki;Z.prototype.attach=Z.prototype.Mb;
Z.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return G(function(k){switch(k.i){case 1:b={};if(!a){k.A(2);break}return k.h(Ek(),3);case 3:b=k.j;case 2:return c=Jc(),d=dq(),e=nb(),k.h(e.Db(),4);case 4:return f=k.j,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=Uy,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};
Z.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;nb();return Kc()?!0:Lc().canPlayType("application/x-mpegurl")!=""};Z.setQueueManagerFactory=function(a){ox=a};Z.setAdManagerFactory=function(a){nx=a};Z.registerSupportPlugin=function(a,b){Uy.set(a,b)};Z.prototype.destroy=Z.prototype.destroy;var ux=0,kx=1,dy=2,Xx=3;
Z.LoadMode={DESTROYED:ux,NOT_LOADED:kx,MEDIA_SOURCE:dy,SRC_EQUALS:Xx};Z.version="v5.2.8";var Vy=["5","2"];ri=new function(a){this.h=a;this.j=si;this.i=ti}(new pi(Number(Vy[0]),Number(Vy[1])));var Uy=new Map,nx=null,ox=null;function Wy(){}function Xy(a,b){a={priority:b||0,callback:a};for(b=0;b<Yy.length;b++)if(Yy[b].priority<a.priority){Yy.splice(b,0,a);return}Yy.push(a)}J("shaka.polyfill",Wy);Wy.register=Xy;Wy.installAll=function(){for(var a=t(Yy),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Va("Error installing polyfill!",c)}}};var Yy=[];function Zy(a,b,c){this.h=a;this.j=b||null;this.i=c||null;this.keySystem=a.keySystem}Zy.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.j;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;return a};Zy.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};function $y(a){if(ac(a))return"cbcs";if(Zb(a)||$b(a)||Yb(a)||a==="com.huawei.wiseplay")return"cenc";Va("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function az(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 bz(a,b){return!a||a==b||(a=="cbcs"||a=="cbcs-1-9")&&nb().Gc()?!0:!1};function cz(){}var dz;function ez(){nb().Ue()&&!dz&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(dz=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=fz,navigator.emeEncryptionSchemePolyfilled=!0)}
function fz(a,b){var c=this,d,e;return G(function(f){if(f.i==1)return f.h(dz.call(c,a,b),2);d=f.j;if(e=az(d))return navigator.requestMediaKeySystemAccess=dz,f.return(d);navigator.requestMediaKeySystemAccess=gz;return f.return(gz.call(c,a,b))})}
function gz(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,u,r;return G(function(v){if(v.i==1){d=$y(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=hz(h.videoCapabilities,d),l=hz(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 v.h(dz.call(c,a,e),2)}p=v.j;r=u=null;e[0]&&(e[0].videoCapabilities&&(u=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(r=e[0].audioCapabilities[0].encryptionScheme));return v.return(new Zy(p,u,r))})}function hz(a,b){return a?a.filter(function(c){return bz(c.encryptionScheme,b)}):a}Wy.EmeEncryptionScheme=cz;cz.install=ez;Xy(ez);function iz(){}function jz(){"getOrInsert"in Map.prototype||(Map.prototype.getOrInsert=kz);"getOrInsertComputed"in Map.prototype||(Map.prototype.getOrInsertComputed=lz);"getOrInsert"in WeakMap.prototype||(WeakMap.prototype.getOrInsert=kz);"getOrInsertComputed"in WeakMap.prototype||(WeakMap.prototype.getOrInsertComputed=lz)}function kz(a,b){this.has(a)||this.set(a,b);return this.get(a)}function lz(a,b){this.has(a)||this.set(a,b(a));return this.get(a)}Wy.Map=iz;iz.install=jz;Xy(jz);function mz(){}var nz;function oz(){nb().Ue()&&!nz&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(nz=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=pz,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
function pz(a){var b=this,c,d,e;return G(function(f){switch(f.i){case 1:return f.h(nz.call(b,a),2);case 2:c=f.j;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=az(d))return navigator.mediaCapabilities.decodingInfo=nz,f.return(c);navigator.mediaCapabilities.decodingInfo=qz;if(d){f.A(3);break}return f.h(rz(a),4);case 4:return c.keySystemAccess=f.j,f.return(c);case 3:return f.return(qz.call(b,a))}})}
function qz(a){var b=this,c,d,e,f,g,h,k;return G(function(l){switch(l.i){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=$y(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},bz(d,g)&&bz(c,g))?l.h(nz.call(b,a),2):l.return(h);case 2:k=l.j;if(k.keySystemAccess){k.keySystemAccess=new Zy(k.keySystemAccess,c,d);l.A(3);break}if(!a.keySystemConfiguration){l.A(3);
break}return l.h(rz(a),5);case 5:k.keySystemAccess=l.j;case 3:return l.return(k)}})}
function rz(a){var b,c;return G(function(d){if(d.i==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 d.h(navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.j;return d.return(c)})}Wy.MCapEncryptionScheme=mz;mz.install=oz;Xy(oz,-2);function sz(){}function tz(){nb().Kb()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),sz.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=uz)}
function uz(a){var b,c,d,e,f,g,h,k,l,m,n;return G(function(p){switch(p.i){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};nb();c=a.video;d=a.audio;if(a.type!="media-source"){if(a.type=="file"){if(c&&(e=c.contentType,f=Lc().canPlayType(e)!="",!f)||d&&(g=d.contentType,h=Lc().canPlayType(g)!="",!h))return p.return(b)}else return p.return(b);p.A(2);break}if(!Kc())return p.return(b);if(!c){p.A(3);break}return p.h(vz(c),4);case 4:if(k=p.j,!k)return p.return(b);case 3:if(!d){p.A(2);
break}return p.h(wz(d),6);case 6:if(l=p.j,!l)return p.return(b);case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return p.h(xz(c,d,m),8);case 8:if(n=p.j)b.supported=!0,b.keySystemAccess=n;case 7:return p.return(b)}})}function vz(a){var b,c,d;return G(function(e){return e.i==1?(b=nb(),c=b.Ha(),c!=="CAST"?e.A(2):e.h(yz(a),3)):e.i!=2?(d=e.j,e.return(d)):e.return(Fl(a.contentType))})}
function wz(a){var b,c,d,e,f;return G(function(g){switch(g.i){case 1:b=nb();c=b.Ha();d=a.contentType;if(c!=="CAST"||!a.spatialRendering){g.A(2);break}d+="; spatialRendering=true";if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)){g.A(2);break}e=!1;f=zz;if(f.has(d)){e=f.get(d);g.A(4);break}return g.h(cast.__platform__.canDisplayType(d),5);case 5:e=g.j,f.set(d,e);case 4:return g.return(e);case 2:return g.return(Fl(d))}})}
function xz(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,r;return G(function(v){switch(v.i){case 1:d=[];e=[];f=[];c.audio&&(g={robustness:c.audio.robustness||"",contentType:b.contentType},nb().Mh()&&b.contentType.includes('codecs="ac-3"')&&(g.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(g.encryptionScheme=c.audio.encryptionScheme,f.push(c.audio.encryptionScheme)),d.push(g));c.video&&(h={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(h.encryptionScheme=
c.video.encryptionScheme,f.push(c.video.encryptionScheme)),e.push(h));k={initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(k.audioCapabilities=d);e.length&&(k.videoCapabilities=e);l=a?a.contentType:"";m=b?b.contentType:"";n=qe(l)+";"+pe(l);p=qe(m)+";"+pe(m);u=c.keySystem;r=null;v.o(2);var w=bc(n,p,u,f);if(hc.has(w)){w=bc(n,p,u,f);r=hc.get(w)||null;v.A(4);break}return v.h(navigator.requestMediaKeySystemAccess(c.keySystem,
[k]),5);case 5:w=r=v.j;var y=bc(n,p,u,f);hc.set(y,w);case 4:v.u(3);break;case 2:v.m();case 3:return v.return(r)}})}
function yz(a){var b,c,d,e,f;return G(function(g){if(g.i==1){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(Fl(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=zz;return f.has(b)?(e=f.get(b),g.A(2)):g.h(cast.__platform__.canDisplayType(b),3)}g.i!=2&&(e=g.j,f.set(b,e));return g.return(e)})}Wy.MediaCapabilities=sz;sz.install=tz;sz.originalMcap=null;var zz=new Map;Xy(tz,-1);function Az(){this.size=0;this.h=void 0}q=Az.prototype;q.Gb=function(){return this.h};q.forEach=function(a){this.h&&a(this.h,fc.value())};q.get=function(a){if(this.has(a))return this.h};q.has=function(a){var b=fc.value();return this.h&&sb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Az.prototype[Symbol.iterator]=function(){return[][Symbol.iterator]()};function Bz(){}function Cz(){var a=nb(),b=a.Da()==="WEBKIT"?a.ua():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(b<=12?(Dz(),Ez()):b<=15&&Dz());a=t(a.Xh());for(b=a.next();!b.done;b=a.next())Fz(b.value);(window.MediaSource||window.ManagedMediaSource)&&Gz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Hz()}
function Dz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function Ez(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function Gz(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return me(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return me(c)!="mp2t"&&b(c)}}}
function Fz(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return pe(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return pe(d)!=a&&c(d)}}}
function Hz(){var a=MediaSource.isTypeSupported;nb().pi()&&(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)})}Wy.MediaSource=Bz;Bz.install=Cz;Xy(Cz);function Iz(){}var Jz,Kz,Lz,Mz,Nz,Oz;
function Pz(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=Qz){if(a===void 0?0:a)Jz=!0,Kz=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Lz=HTMLMediaElement.prototype.setMediaKeys,Mz=window.MediaKeys,Nz=window.MediaKeySystemAccess,Oz=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Rz;window.MediaKeys=Sz;window.MediaKeySystemAccess=
Tz;navigator.requestMediaKeySystemAccess=Uz;window.shakaMediaKeysPolyfill=Qz;hf.clear();hc.clear()}}function Uz(a,b){try{var c=new Tz(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Rz(a){var b=this.mediaKeys;b&&b!=a&&Vz(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Vz(a,this):Promise.resolve()}
function Wz(a){a=tb(a.initData);if(xb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cb(a.subarray(4),!0);a=Fb(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=ub(a);this.dispatchEvent(b)}Wy.PatchedMediaKeysApple=Iz;
Iz.uninstall=function(){window.shakaMediaKeysPolyfill==Qz&&Jz&&(Jz=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Kz),HTMLMediaElement.prototype.setMediaKeys=Lz,window.MediaKeys=Mz,window.MediaKeySystemAccess=Nz,navigator.requestMediaKeySystemAccess=Oz,Kz=Oz=Lz=Nz=Mz=null,window.shakaMediaKeysPolyfill="",hf.clear(),hc.clear())};Iz.install=Pz;
function Tz(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if(c.persistentState=="required")b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.h=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
Tz.prototype.createMediaKeys=function(){var a=new Sz(this.keySystem);return Promise.resolve(a)};Tz.prototype.getConfiguration=function(){return this.h};function Sz(a){this.i=new WebKitMediaKeys(a);this.h=new gb}Sz.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary")throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Xz(this.i,a)};Sz.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function Vz(a,b){a.h.Pa();if(!b)return Promise.resolve();a.h.I(b,"webkitneedkey",Wz);try{return Zq(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.i)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Sz.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function Xz(a){oj.call(this);this.j=null;this.o=a;this.h=this.i=null;this.l=new gb;this.m=Promise.withResolvers();this.sessionId="";this.expiration=NaN;this.keyStatuses=new Az;this.onkeystatuseschange=null}ta(Xz,oj);da.Object.defineProperties(Xz.prototype,{closed:{configurable:!0,enumerable:!0,get:function(){return this.m.promise}}});q=Xz.prototype;
q.generateRequest=function(a,b){var c=this;this.i=Promise.withResolvers();try{var d=this.o.createSession("video/mp4",tb(b));this.j=d;this.sessionId=d.sessionId||"";this.l.I(this.j,"webkitkeymessage",function(e){c.i&&(c.i.resolve(),c.i=null);e=(new Map).set("messageType",c.keyStatuses.Gb()==void 0?"license-request":"license-renewal").set("message",ub(e.message));e=new nj("message",e);c.dispatchEvent(e)});this.l.I(d,"webkitkeyadded",function(){c.h&&(Yz(c,"usable"),c.h.resolve(),c.h=null)});this.l.I(d,
"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(c.i!=null)c.i.reject(e),c.i=null;else if(c.h!=null)c.h.reject(e),c.h=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Yz(c,"output-not-allowed");break;default:Yz(c,"internal-error")}});Yz(this,"status-pending")}catch(e){this.i.reject(e)}return this.i.promise};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
q.update=function(a){this.h=Promise.withResolvers();try{this.j.update(tb(a))}catch(b){this.h.reject(b)}return this.h.promise};q.close=function(){try{this.j.close(),this.m.resolve(),this.l.Pa()}catch(a){this.m.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
function Yz(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.h=b;b=new nj("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}var Qz="apple";Xy(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||Pz())});function Zz(){}function $z(){if(window.MediaKeys){var a=nb();MediaKeys.prototype.setServerCertificate&&a.Jd()||(MediaKeys.prototype.setServerCertificate=aA)}}function aA(){return Promise.resolve(!1)}Wy.PatchedMediaKeysCert=Zz;Zz.install=$z;Xy($z);function bA(){}
function cA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)dA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=eA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=fA;window.MediaKeys=gA;window.MediaKeySystemAccess=hA;window.shakaMediaKeysPolyfill=iA}}
function jA(a){var b=dA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function eA(a,b){try{var c=new hA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function fA(a){var b=this.mediaKeys;b&&b!=a&&kA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&kA(a,this);return Promise.resolve()}Wy.PatchedMediaKeysWebkit=bA;bA.install=cA;
function hA(a,b){this.h=this.keySystem=a;var c=!1;a=="org.w3.clearkey"&&(this.h="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.h)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.h)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.h)||e.canPlayType("video/webm",this.h));f.persistentState=="required"&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.i=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;}hA.prototype.createMediaKeys=function(){var a=new gA(this.h);return Promise.resolve(a)};hA.prototype.getConfiguration=function(){return this.i};function gA(a){this.m=a;this.i=null;this.h=new gb;this.j=[];this.l=new Map}
function kA(a,b){a.i=b;a.h.Pa();var c=dA;b&&(a.h.I(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=ub(d.initData);a.i.dispatchEvent(e)}),a.h.I(b,c+"keymessage",function(d){var e=lA(a,d.sessionId);e&&(d=(new Map).set("messageType",e.keyStatuses.Gb()==void 0?"licenserequest":"licenserenewal").set("message",d.message),d=new nj("message",d),e.i&&(e.i.resolve(),e.i=null),e.dispatchEvent(d))}),a.h.I(b,c+"keyadded",function(d){(d=lA(a,d.sessionId))&&d.ready()}),
a.h.I(b,c+"keyerror",function(d){var e=lA(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.i?(d.systemCode==45&&(f.message="Unsupported session type."),e.i.reject(f),e.i=null):d.sessionId&&e.h?(e.h.reject(f),e.h=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?mA(e,"output-restricted"):f==1?mA(e,"expired"):mA(e,"internal-error"))}}))}
gA.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.i||document.createElement("video");b.src||(b.src="about:blank");a=new nA(b,this.m,a);this.j.push(a);return a};gA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};gA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function lA(a,b){var c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null}function nA(a,b,c){oj.call(this);this.m=a;this.u=!1;this.h=this.i=null;this.l=b;this.o=c;this.j=Promise.withResolvers();this.sessionId="";this.expiration=NaN;this.keyStatuses=new Az;this.onkeystatuseschange=null}ta(nA,oj);da.Object.defineProperties(nA.prototype,{closed:{configurable:!0,enumerable:!0,get:function(){return this.j.promise}}});q=nA.prototype;
q.ready=function(){mA(this,"usable");this.h&&this.h.resolve();this.h=null};
function oA(a,b,c){if(a.u)return Promise.reject(Error("The session is already initialized."));a.u=!0;try{if(a.o=="persistent-license")if(c)var d=tb(Fb("LOAD_SESSION|"+c));else{var e=Fb("PERSISTENT|");d=Qb(e,b)}else d=tb(b)}catch(g){return Promise.reject(g)}a.i=Promise.withResolvers();var f=jA("generateKeyRequest");try{a.m[f](a.l,d)}catch(g){if(g.name!="InvalidStateError")return a.i=null,Promise.reject(g);(new Ke(function(){try{a.m[f](a.l,d)}catch(h){a.i.reject(h),a.i=null}})).ia(.01)}return a.i.promise}
function pA(a,b,c){if(a.h)a.h.promise.then(function(){return pA(a,b,c)}).catch(function(){return pA(a,b,c)});else{a.h=b;if(a.l=="webkit-org.w3.clearkey"){var d=Bb(c);var e=JSON.parse(d);e.keys[0].kty!="oct"&&(a.h.reject(Error("Response is not a valid JSON Web Key Set.")),a.h=null);d=Nb(e.keys[0].k);e=Nb(e.keys[0].kid)}else d=tb(c),e=null;var f=jA("addKey");try{a.m[f](a.l,d,e,a.sessionId)}catch(g){a.h.reject(g),a.h=null}}}
function mA(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.h=b;b=new nj("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}q.generateRequest=function(a,b){return oA(this,b,null)};q.load=function(a){return this.o=="persistent-license"?oA(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=Promise.withResolvers();pA(this,b,a);return b.promise};
q.close=function(){if(this.o!="persistent-license"){if(!this.sessionId)return this.j.reject(Error("The session is not callable.")),this.j.promise;var a=jA("cancelKeyRequest");try{this.m[a](this.l,this.sessionId)}catch(b){}}this.j.resolve();return this.j.promise};q.remove=function(){return this.o!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};var dA="",iA="webkit";Xy(cA);function qA(){}function rA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=sA))}function sA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Wy.RandomUUID=qA;qA.install=rA;Xy(rA);function tA(){}function uA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:vA})}function vA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Wy.Symbol=tA;tA.install=uA;Xy(uA);function wA(){}function xA(){for(var a=t([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),b=a.next();!b.done;b=a.next()){b=b.value;var c=void 0;(c=b.prototype).indexOf!=null||(c.indexOf=Array.prototype.indexOf);c=void 0;(c=b.prototype).lastIndexOf!=null||(c.lastIndexOf=Array.prototype.lastIndexOf);c=void 0;(c=b.prototype).includes!=null||(c.includes=Array.prototype.includes)}}Wy.TypedArray=wA;wA.install=xA;Xy(xA);function yA(){}function zA(){window.URLSearchParams||(window.URLSearchParams=AA);!window.URL||!window.URL.prototype||"searchParams"in window.URL.prototype||Object.defineProperty(window.URL.prototype,"searchParams",{get:BA,enumerable:!0,configurable:!0})}
function BA(){var a=this,b=CA.get(a);if(!b){b=new window.URLSearchParams(a.search);var c=function(){var g=b.toString();a.search=g?"?"+g:""},d=b.append;b.append=function(g,h){d.call(this,g,h);c()};var e=b.delete;b.delete=function(g){e.call(this,g);c()};var f=b.set;b.set=function(g,h){f.call(this,g,h);c()};CA.set(a,b)}return b}Wy.URLSearchParams=yA;yA.install=zA;var CA=new WeakMap;
function AA(a){this.h=[];if(typeof a==="string"){if(a.startsWith("?")&&(a=a.substring(1)),a){a=t(a.split("&"));for(var b=a.next();!b.done;b=a.next()){var c=b.value.split("=");b=decodeURIComponent(c[0].replace(/\+/g," "));c=c.length>1?decodeURIComponent(c[1].replace(/\+/g," ")):"";this.append(b,c)}}}else if(Array.isArray(a))for(a=t(a),b=a.next();!b.done;b=a.next())b=b.value,this.append(b[0],b[1]);else if(a)for(b in a)this.append(b,a[b])}q=AA.prototype;
q.append=function(a,b){this.h.push([String(a),String(b)])};q.get=function(a){a=String(a);for(var b=t(this.h),c=b.next();!c.done;c=b.next())if(c=c.value,c[0]===a)return c[1];return null};q.has=function(a){var b=String(a);return this.h.some(function(c){return c[0]===b})};q.set=function(a,b){a=String(a);b=String(b);for(var c=!1,d=0;d<this.h.length;d++)this.h[d][0]===a&&(c?(this.h.splice(d,1),d--):(this.h[d][1]=b,c=!0));c||this.append(a,b)};
q.toString=function(){return this.h.map(function(a){return encodeURIComponent(a[0]).replace(/%20/g,"+")+"="+encodeURIComponent(a[1]).replace(/%20/g,"+")}).join("&")};q.entries=function(){var a=0,b=this.h.map(function(d){return[d[0],d[1]]}),c={next:function(){return a<b.length?{value:b[a++],done:!1}:{value:void 0,done:!0}}};c[Symbol.iterator]=function(){return c};return c};
q.keys=function(){var a=0,b=this.h,c={next:function(){return a<b.length?{value:b[a++][0],done:!1}:{value:void 0,done:!0}}};c[Symbol.iterator]=function(){return c};return c};q.values=function(){var a=0,b=this.h,c={next:function(){return a<b.length?{value:b[a++][1],done:!1}:{value:void 0,done:!0}}};c[Symbol.iterator]=function(){return c};return c};q.forEach=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c=c.value,a(c[1],c[0],this)};AA.prototype[Symbol.iterator]=function(){return this.entries()};
Xy(zA);function DA(){}function EA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Wy.VideoPlayPromise=DA;DA.install=EA;Xy(EA);function FA(){}function GA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.requestVideoFrameCallback&&window.requestAnimationFrame&&a.getVideoPlaybackQuality&&(a.requestVideoFrameCallback=HA,a.cancelVideoFrameCallback=IA)}}function JA(a){var b=KA.get(a);b||(b={Xj:1,Kc:new Map,presentedFrames:0},KA.set(a,b));return b}
function HA(a){function b(g){if(d.Kc.has(e)){var h=c.getVideoPlaybackQuality().totalVideoFrames||0;h!==d.presentedFrames?(d.presentedFrames=h,h={presentationTime:g,expectedDisplayTime:g,mediaTime:c.currentTime,presentedFrames:h,width:c.videoWidth,height:c.videoHeight,processingDuration:0},d.Kc.delete(e),a(g,h)):(g=window.requestAnimationFrame(b),d.Kc.set(e,g))}}var c=this,d=JA(c),e=d.Xj++,f=window.requestAnimationFrame(b);d.Kc.set(e,f);return e}
function IA(a){var b=KA.get(this);if(b){var c=b.Kc.get(a);c!=null&&(window.cancelAnimationFrame(c),b.Kc.delete(a))}}Wy.VideoFrameCallback=FA;FA.install=GA;var KA=new WeakMap;Xy(GA,-2);function LA(){}function MA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||typeof Lc().webkitDroppedFrameCount==="number")&&(a.getVideoPlaybackQuality=NA)}}function NA(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Wy.VideoPlaybackQuality=LA;LA.install=MA;Xy(MA);function OA(){}function PA(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(b==3)a=QA;else if(b==6)a=RA;else{try{var c=!!QA(1,2,"")}catch(d){c=!1}c&&(a=QA)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function QA(a,b,c){return new window.TextTrackCue(a,b,c)}function RA(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Wy.VTTCue=OA;OA.install=PA;Xy(PA);function SA(){this.h="UNKNOWN"}SA.prototype.parseInit=function(){};SA.prototype.setManifestType=function(a){this.h=a};
SA.prototype.parseMedia=function(a,b,c,d){var e=Bb(a);a=[];if(e=="")return a;var f=od(e,"tt",!0);if(!f)throw new K(2,2,2005,"Failed to parse TTML.");e=xd(f,"body")[0];if(!e)return[];var g=zd(f,TA,"frameRate"),h=zd(f,TA,"subFrameRate"),k=zd(f,TA,"frameRateMultiplier"),l=zd(f,TA,"tickRate"),m=zd(f,TA,"cellResolution"),n=f.attributes["xml:space"]||"default",p=zd(f,UA,"extent");if(n!="default"&&n!="preserve")throw new K(2,2,2005,"Invalid xml:space value: "+n);n=n=="default";g=new VA(g,h,k,l);m=WA(m);
h=xd(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return v!="\n"});k=xd(f,"style");f=xd(f,"region");l=[];for(var u=t(f),r=u.next();!r.done;r=u.next())(r=XA(this,r.value,k,p))&&l.push(r);if(vd(e,"p").length)throw new K(2,2,2001,"<p> can only be inside <div> in TTML");p=t(vd(e,"div"));for(u=p.next();!u.done;u=p.next())if(vd(u.value,"span").length)throw new K(2,2,2001,"<span> can only be inside <p> in TTML");if(b=YA(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 YA(a,b,c,d,e,f,g,h,k,l,m,n,p,u){var r=m;if(ud(b)){if(!n)return null;var v={tagName:"span",children:[wd(b)],attributes:{},parent:null}}else v=b;for(var w=null,y=t(ZA),x=y.next();!x.done&&!(w=$A(v,"backgroundImage",e,"#",x.value)[0]);x=y.next());y=null;x=zd(v,ZA,"backgroundImage");var A=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(x&&A.test(x)){y=parseInt(x.split(":").pop(),10)-1;if(y>=u.length)return null;y=u[y]}else p&&x&&!x.startsWith("#")&&(x=(new URL(x,p)).toString())&&
(y=x);if(b.tagName=="p"||w||y)n=!0;b=n;x=(v.attributes["xml:space"]||(k?"default":"preserve"))=="default";A=v.children.every(ud);k=[];if(!A)for(var C=t(v.children),z=C.next();!z.done;z=C.next())(z=YA(a,z.value,c,d,e,f,g,h,x,l,v,n,p,u))&&k.push(z);e=m!=null;p=wd(v);p=v.children.length&&p&&/\S/.test(p);C=v.attributes.begin||v.attributes.end||v.attributes.dur;if(!(C||p||v.tagName=="br"||k.length!=0||e&&!x))return null;u=aB(v,d);p=u.start;for(u=u.end;r&&r.tagName&&r.tagName!="tt";)u=bB(r,d,p,u),p=u.start,
u=u.end,r=r.parent;p==null&&(p=0);p+=c.periodStart;u=u==null?Infinity:u+c.periodStart;a.h!=="HLS"&&(p=Math.max(p,c.segmentStart),u=Math.min(u,c.segmentEnd));if(!C&&k.length>0)for(p=Infinity,u=0,c=t(k),d=c.next();!d.done;d=c.next())d=d.value,p=Math.min(p,d.startTime),u=Math.max(u,d.endTime);if(v.tagName=="br")return a=new Bd(p,u,""),a.lineBreak=!0,a;c="";A&&(c=Hb(wd(v)||""),x&&(c=c.replace(/\s+/g," ")));c=new Bd(p,u,c);c.nestedCues=k;n||(c.isContainer=!0);l&&(c.cellResolution=l);l=$A(v,"region",g,
"")[0];if(v.attributes.region&&l&&l.attributes["xml:id"]){var B=l.attributes["xml:id"];c.region=h.filter(function(D){return D.id==B})[0]}h=l;m&&e&&!v.attributes.region&&!v.attributes.style&&(h=$A(m,"region",g,"")[0]);cB(a,c,v,h,w,y,f,b,k.length==0);return c}
function XA(a,b,c,d){var e=new $c,f=b.attributes["xml:id"];if(!f)return null;e.id=f;f=null;d&&(f=dB.exec(d)||eB.exec(d));d=f?Number(f[1]):null;f=f?Number(f[2]):null;var g,h=fB(a,b,c,"extent");if(h){var k=(g=dB.exec(h))||eB.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?ad:0,e.heightUnits=g||f!=null?ad:0)}if(a=fB(a,b,c,"origin"))if(k=(g=dB.exec(a))||eB.exec(a),k!=null)e.viewportAnchorX=Number(k[1]),
e.viewportAnchorY=Number(k[2]),g?h||(e.width=100-e.viewportAnchorX,e.widthUnits=ad,e.height=100-e.viewportAnchorY,e.heightUnits=ad):(f!=null&&(e.viewportAnchorY=e.viewportAnchorY*100/f),d!=null&&(e.viewportAnchorX=e.viewportAnchorX*100/d)),e.viewportAnchorUnits=g||d!=null?ad:0;return e}function gB(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 cB(a,b,c,d,e,f,g,h,k){h=h||k;hB(a,c,d,g,"direction",h)=="rtl"&&(b.direction="rtl");k=hB(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=Ed);(k=hB(a,c,d,g,"textAlign",!0))?(b.positionAlign=iB.get(k),b.lineAlign=jB.get(k),b.textAlign=Yd[k.toUpperCase()]):b.textAlign=Dd;if(k=hB(a,c,d,g,"displayAlign",!0))b.displayAlign=Zd[k.toUpperCase()];if(k=hB(a,c,d,g,"color",h))b.color=gB(k);
if(k=hB(a,c,d,g,"backgroundColor",h))b.backgroundColor=gB(k);if(k=hB(a,c,d,g,"border",h))b.border=k;if(k=hB(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=hB(a,c,d,g,"fontWeight",h))&&k=="bold"&&(b.fontWeight=Vd);k=hB(a,c,d,g,"wrapOption",h);b.wrapLine=k&&k=="noWrap"?!1:!0;(k=hB(a,c,d,g,"lineHeight",h))&&k.match(kB)&&(b.lineHeight=k);(k=hB(a,c,d,g,"fontSize",h))&&(k.match(kB)||k.match(lB))&&(b.fontSize=k);if(k=hB(a,c,d,g,"fontStyle",h))b.fontStyle=be[k.toUpperCase()];e?(f=e.attributes.imageType||e.attributes.imagetype,k=e.attributes.encoding,e=wd(e).trim(),f=="PNG"&&k=="Base64"&&e&&
(b.backgroundImage="data:image/png;base64,"+e)):f&&(b.backgroundImage=f);if(e=hB(a,c,d,g,"textOutline",h))e=e.split(" "),e[0].match(kB)?b.textStrokeColor=b.color:(b.textStrokeColor=gB(e[0]),e.shift()),e[0]&&e[0].match(kB)?b.textStrokeWidth=e[0]:b.textStrokeColor="";(e=hB(a,c,d,g,"letterSpacing",h))&&e.match(kB)&&(b.letterSpacing=e);(e=hB(a,c,d,g,"linePadding",h))&&e.match(kB)&&(b.linePadding=e);if(e=hB(a,c,d,g,"opacity",h))b.opacity=parseFloat(e);(e=fB(a,d,g,"textDecoration"))&&mB(b,e);(e=nB(a,c,
g,"textDecoration"))&&mB(b,e);if(e=hB(a,c,d,g,"textCombine",h))b.textCombineUpright=e;switch(hB(a,c,d,g,"ruby",h)){case "container":b.rubyTag="ruby";break;case "text":b.rubyTag="rt"}}
function mB(a,b){function c(e,f){var g=a.textDecoration.includes(e);f&&!g?a.textDecoration.push(e):!f&&g&&bb(a.textDecoration,e)}b=t(b.split(" "));for(var d=b.next();!d.done;d=b.next())switch(d.value){case "underline":c(Xd,!0);break;case "noUnderline":c(Xd,!1);break;case "lineThrough":c("line-through",!0);break;case "noLineThrough":c("line-through",!1);break;case "overline":c("overline",!0);break;case "noOverline":c("overline",!1)}}
function hB(a,b,c,d,e,f){f=f===void 0?!0:f;return(b=nB(a,b,d,e))?b:f?fB(a,c,d,e):null}function fB(a,b,c,d){if(!b)return null;var e=zd(b,UA,d);return e?e:oB(a,b,c,d)}function nB(a,b,c,d){var e=zd(b,UA,d);return e?e:oB(a,b,c,d)}function oB(a,b,c,d){b=$A(b,"style",c,"");for(var e=null,f=0;f<b.length;f++){var g=yd(b[f],"urn:ebu:tt:style",d);g||(g=zd(b[f],UA,d));g||(g=nB(a,b[f],c,d));g&&(e=g)}return e}
function $A(a,b,c,d,e){var f=[];if(!a||c.length<1)return f;var g=a;for(a=null;!a&&!(a=e?yd(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}function bB(a,b,c,d){a=aB(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 aB(a,b){var c=pB(a.attributes.begin,b),d=pB(a.attributes.end,b);a=pB(a.attributes.dur,b);d==null&&a!=null&&(d=c+a);return{start:c,end:d}}
function pB(a,b){var c=null;if(qB.test(a)){a=qB.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.i;e+=f/b.frameRate;c=e+d*60+c*3600}else if(rB.test(a))c=sB(rB,a);else if(tB.test(a))c=sB(tB,a);else if(uB.test(a))a=uB.exec(a),c=Number(a[1])/b.frameRate;else if(vB.test(a))a=vB.exec(a),c=Number(a[1])/b.h;else if(wB.test(a))c=sB(wB,a);else if(a)throw new K(2,2,2001,"Could not parse cue time range in TTML");return c}
function sB(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 WA(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}J("shaka.text.TtmlTextParser",SA);SA.prototype.parseMedia=SA.prototype.parseMedia;SA.prototype.setManifestType=SA.prototype.setManifestType;SA.prototype.parseInit=SA.prototype.parseInit;
function VA(a,b,c,d){this.frameRate=Number(a)||30;this.i=Number(b)||1;this.h=Number(d);this.h==0&&(this.h=a?this.frameRate*this.i:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var dB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,lB=/^(\d{1,4}(?:\.\d+)?|100)%$/,kB=/^(\d+px|\d+em|\d*\.?\d+c)$/,eB=/^(\d+)px (\d+)px$/,qB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,rB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,tB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,uB=/^(\d*(?:\.\d*)?)f$/,vB=/^(\d*(?:\.\d*)?)t$/,wB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),jB=(new Map).set("left",Hd).set("center","center").set("right",
"end").set("start",Hd).set("end","end"),iB=(new Map).set("left","line-left").set("center","center").set("right","line-right").set("start","line-left").set("end","line-right"),TA=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],UA=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],ZA=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];xe("application/ttml+xml",function(){return new SA});function xB(){this.h=new SA}xB.prototype.parseInit=function(a){var b=!1;(new Qg).ka(ah,Vg).O("stsd",Xg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new K(2,2,2007);};xB.prototype.setManifestType=function(a){this.h.setManifestType(a)};
xB.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new Qg).ka(bh,Vg).O("tfhd",function(y){e=fh(y.reader,y.flags).ac}).O("trun",function(y){y=ih(y.reader,y.version,y.flags);y=t(y.nc);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,A=x.R(),C=-1,z=0;z<A;z++){var B=x.R();C+=B;B=x.va();for(var D=[],F=0;F<B;F++)y.version==1?D.push(x.R()):D.push(x.va()),x.W(),x.W(),x.R();g.set(C,D)}}).box("mdat",$g(function(y){f.push(y)},
!1)).parse(a,!1);if(f.length==0)throw new K(2,2,2007);a=Qb.apply(Ib,va(f));for(var k=0,l=0;l<h.length;l++){var m=tb(a,k,h[l]);k+=h[l];var n=g.get(l),p=[];if(n&&n.length){for(var u=tb(m,0,n[0]),r=n[0],v=1;v<n.length;v++){var w=tb(m,r,n[v]);w=Lb(w);p.push("data:image/png;base64,"+w);r+=n[v]}m=u}d=d.concat(this.h.parseMedia(m,b,c,p))}return d};J("shaka.text.Mp4TtmlParser",xB);xB.prototype.parseMedia=xB.prototype.parseMedia;xB.prototype.setManifestType=xB.prototype.setManifestType;
xB.prototype.parseInit=xB.prototype.parseInit;xe('application/mp4; codecs="stpp"',function(){return new xB});xe('application/mp4; codecs="stpp.ttml"',function(){return new xB});xe('application/mp4; codecs="stpp.ttml.im1i"',function(){return new xB});xe('application/mp4; codecs="stpp.ttml.im1t"',function(){return new xB});xe('application/mp4; codecs="stpp.ttml.im2i"',function(){return new xB});xe('application/mp4; codecs="stpp.ttml.im2t"',function(){return new xB});
xe('application/mp4; codecs="stpp.ttml.etd1"',function(){return new xB});xe('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new xB});xe('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new xB});xe('application/mp4; codecs="stpp.TTML.im1t"',function(){return new xB});function yB(){this.h="UNKNOWN"}yB.prototype.parseInit=function(){};yB.prototype.setManifestType=function(a){this.h=a};
yB.prototype.parseMedia=function(a,b){a=Bb(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 K(2,2,2E3);a=b.vttOffset;if(this.h=="HLS"&&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 K(2,2,2E3);d=(d=d[1])?hd(new dd(d)):null;if(d==null)throw new K(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}b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())e=e.value,/^Region:/.test(e)&&(e=zB(e),b.push(e));d=new Map;Pd(d);e=[];c=t(c.slice(1));for(var f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((f.length!=1||f[0])&&!AB.test(f[0])&&f[0]=="STYLE"){for(var g=[],h=-1,k=1;k<f.length;k++)f[k].includes("::cue")&&(g.push([]),h=g.length-1),h!=-1&&(g[h].push(f[k]),f[k].includes("}")&&(h=-1));g=t(g);for(h=g.next();!h.done;h=g.next()){var l=
h.value;h="global";(k=l[0].match(/\((.*)\)/))&&(h=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(h))||(l=new Bd(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var u=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=u;break;case "color":m=!0;l.color=u;break;case "font-family":m=!0;l.fontFamily=u;break;case "font-size":m=!0;l.fontSize=u;break;
case "font-weight":if(parseInt(u,10)>=700||u=="bold")m=!0,l.fontWeight=Vd;break;case "font-style":switch(u){case "normal":m=!0;l.fontStyle=Kd;break;case "italic":m=!0;l.fontStyle=Wd;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(u);break;case "text-combine-upright":m=!0;l.textCombineUpright=u;break;case "text-shadow":m=!0;l.textShadow=u;break;case "white-space":m=!0,l.wrapLine=u!="noWrap"}}}m&&d.set(h,l)}}(f=BB(f,a,b,d))&&e.push(f)}return e};
function zB(a){a=new dd(a);var b=new $c;fd(a);gd(a,/[ \t]+/gm);ed(a,function(c){var d;(d=/^id=(.*)$/.exec(c))?b.id=d[1]:(d=/^width=(\d{1,2}|100)%$/.exec(c))?b.width=Number(d[1]):(d=/^lines=(\d+)$/.exec(c))?(b.height=Number(d[1]),b.heightUnits=2):(d=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(c))?(b.regionAnchorX=Number(d[1]),b.regionAnchorY=Number(d[2])):(d=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(c))?(b.viewportAnchorX=Number(d[1]),b.viewportAnchorY=Number(d[2])):/^scroll=up$/.exec(c)&&
(b.scroll="up")});return b}
function BB(a,b,c,d){if(a.length==1&&!a[0]||AB.test(a[0])||a[0]=="STYLE"||a[0]=="REGION")return null;var e=null,f=0;a[0].includes("--\x3e")||(e=a[0],f=1);var g=new dd(a[f]),h=hd(g),k=gd(g,/[ \t]+--\x3e[ \t]+/g),l=hd(g);if(h==null||k==null||l==null)return Va("Failed to parse VTT time code. Cue skipped:",e,a),null;h+=b;l+=b;h<0&&(h=0);b="";for(k=f+1;k<a.length;k++)k>f+1&&(b+="\n"),b+=a[k];b=b.trim();if(d.has("global")){var m=d.get("global").clone();m.startTime=h;m.endTime=l;m.payload=b}else m=new Bd(h,
l,b);gd(g,/[ \t]+/gm);ed(g,function(n){CB(m,n,c)});Nd(m,d);e!=null&&(m.id=e);return m}
function CB(a,b,c){var d;if(d=DB.exec(b))b=d[1],b=="middle"?a.textAlign=Dd:a.textAlign=Yd[b.toUpperCase()];else if(d=EB.exec(b))a.writingMode=d[1]=="lr"?"vertical-lr":"vertical-rl";else if(d=FB.exec(b))a.size=Number(d[1]);else if(d=GB.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":Cd);else if(d=HB.exec(b)){if(b=IB(c,d[1]))a.region=b}else a:{if(c=JB.exec(b))a.lineInterpretation=
1;else if(c=KB.exec(b))a.lineInterpretation=Gd;else break a;a.line=Number(c[1]);c[2]&&(a.lineAlign=ae[c[2].toUpperCase()])}}function IB(a,b){return(a=a.find(function(c){return c.id==b}))?a:null}J("shaka.text.VttTextParser",yB);yB.prototype.parseMedia=yB.prototype.parseMedia;yB.prototype.setManifestType=yB.prototype.setManifestType;yB.prototype.parseInit=yB.prototype.parseInit;
var AB=/^NOTE($|[ \t])/,DB=/^align:(start|middle|center|end|left|right)$/,EB=/^vertical:(lr|rl)$/,FB=/^size:([\d.]+)%$/,GB=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/,HB=/^region:(.*)$/,JB=/^line:([\d.]+)%(?:,(start|end|center))?$/,KB=/^line:(-?\d+)(?:,(start|end|center))?$/;xe("text/vtt",function(){return new yB});xe('text/vtt; codecs="vtt"',function(){return new yB});xe('text/vtt; codecs="wvtt"',function(){return new yB});function LB(){this.h=null}LB.prototype.parseInit=function(a){var b=this,c=!1;(new Qg).ka(ah,Vg).O("mdhd",function(d){d=hh(d.reader,d.version);b.h=d.timescale}).O("stsd",Xg).box("wvtt",function(){c=!0}).parse(a);if(!this.h)throw new K(2,2,2008);if(!c)throw new K(2,2,2008);};LB.prototype.setManifestType=function(){};
LB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.h)throw new K(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Qg).ka(bh,Vg).O("tfdt",function(A){g=!0;c=gh(A.reader,A.version).Ca}).O("tfhd",function(A){l=fh(A.reader,A.flags).Ob}).O("trun",function(A){h=!0;d=ih(A.reader,A.version,A.flags).nc}).box("mdat",$g(function(A){k=!0;e=A},!1)).parse(a,!1);if(!k&&!g&&!h)throw new K(2,2,2008);a=c;for(var m=new Hg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=p.value;var u=p.bd||l,r=
p.Qe?c+p.Qe:a;a=r+(u||0);var v=0;do{var w=m.R();v+=w;var y=m.R(),x=null;Ug(y)=="vttc"?w>8&&(x=m.wa(w-8,!1)):m.skip(w-8);u&&x&&(w=MB(x,b.periodStart+r/this.h,b.periodStart+a/this.h),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(Ne)};function MB(a,b,c){var d,e,f;(new Qg).box("payl",$g(function(g){d=Bb(g)},!1)).box("iden",$g(function(g){e=Bb(g)},!1)).box("sttg",$g(function(g){f=Bb(g)},!1)).parse(a);return d?NB(d,e,f,b,c):null}
function NB(a,b,c,d,e){var f=new Bd(d,e,a);Nd(f);b&&(f.id=b);c&&ed(new dd(c),function(g){CB(f,g,[])});return f}J("shaka.text.Mp4VttParser",LB);LB.prototype.parseMedia=LB.prototype.parseMedia;LB.prototype.setManifestType=LB.prototype.setManifestType;LB.prototype.parseInit=LB.prototype.parseInit;xe('application/mp4; codecs="wvtt"',function(){return new LB});function OB(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)?{wd:c,ha:a}:null}function PB(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 QB(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 RB(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 SB(a){this.m=a;this.frameIndex=0;this.j=new Map;this.l=null}SB.prototype.destroy=function(){this.j.clear()};SB.prototype.getOriginalMimeType=function(){return this.m};function TB(a,b){a=Mh(a);return a.length&&(a=a.find(function(c){return c.description==="com.apple.streaming.transportStreamTimestamp"}))?a.data:b}
function UB(a,b,c,d){c=a.j.getOrInsertComputed(c.id+"_"+d.j,function(){if(b.h.length===0)throw Error("StreamInfos must have elements");var f=[];for(var g=t(b.h),h=g.next();!h.done;h=g.next()){var k=f,l=k.push,m=h.value;h=Co;var n=m.id+1,p=m.stream.width||0,u=m.stream.height||0;m.type=="audio"&&(u=p=0);var r=m.duration*m.timescale,v=Math.floor(r/(Yo+1));r=Math.floor(r%(Yo+1));var w=bp.value();Qo(w,n,20);Qo(w,v,28);Qo(w,r,32);Io(w,p,88);Io(w,u,92);n=Co("tkhd",w);p=m;m=Co;v=p.duration*p.timescale;u=
Math.floor(v/(Yo+1));v=Math.floor(v%(Yo+1));r=p.stream.language;r=r.charCodeAt(0)-96<<10|r.charCodeAt(1)-96<<5|r.charCodeAt(2)-96;w=cp.value();Qo(w,p.timescale,20);Qo(w,u,24);Qo(w,v,28);Io(w,r,32);u=Co("mdhd",w);v=new Uint8Array([]);switch(p.type){case "video":v=ep.value();break;case "audio":v=fp.value()}v=Co("hdlr",v);a:{switch(p.type){case "video":p=Co("minf",Co("vmhd",gp.value()),jp.value(),Bo(p));break a;case "audio":p=Co("minf",Co("smhd",hp.value()),jp.value(),Bo(p));break a}p=new Uint8Array([])}m=
m("mdia",u,v,p);h=h("trak",n,m);l.call(k,h)}g=b.h[0];k=Co;l=k.apply;n=g.duration*g.timescale;h=Math.floor(n/(Yo+1));n=Math.floor(n%(Yo+1));m=ap.value();Qo(m,g.timescale,20);Qo(m,h,24);Qo(m,n,28);h=["moov",Co("mvhd",m)];n=h.concat;f=va(f);m=[];p=t(b.h);for(r=p.next();!r.done;r=p.next())u=m,v=u.push,r=r.value.id+1,w=dp.value(),Qo(w,r,4),r=Co("trex",w),v.call(u,r);m=Co.apply(Ao,["mvex"].concat(va(m)));f=l.call(k,Ao,n.call(h,f,[m,So(g.stream)]));g=ip.value();k=new Uint8Array(g.byteLength+f.byteLength);
k.set(g);k.set(f,g.byteLength);return k});d=a.l!==c;var e=Wo(b);a.l=c;a.frameIndex++;return{data:e,init:d?c:null}}J("shaka.transmuxer.BaseTransmuxer",SB);SB.prototype.getOriginalMimeType=SB.prototype.getOriginalMimeType;SB.prototype.destroy=SB.prototype.destroy;var VB=Object.freeze({Yf:0,De:0,Ae:0,qe:0,re:2,Zf:0}),WB=Object.freeze({Yf:0,De:0,Ae:0,qe:0,re:2,Zf:0}),XB=Object.freeze({Yf:0,De:0,Ae:0,qe:0,re:1,Zf:1});function YB(){SB.apply(this,arguments)}ta(YB,SB);YB.prototype.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/aac"?Fl(this.convertCodecs("audio",a)):!1};YB.prototype.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(re(b)||"mp4a.40.2")+'"':b};
YB.prototype.transmux=function(a,b,c,d){var e=tb(a);a=Nh(e);for(var f=a.length;f<e.length&&!QB(e,f);f++);var g=TB(a,c.endTime*1E3);a=PB(e,f);if(!a)return Promise.reject(new K(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=a.sampleRate;b.channelsCount=a.channelCount;for(var h=[];f<e.length;){var k=OB(e,f);if(!k)return Promise.reject(new K(2,3,3018,c?c.S()[0]:null));var l=k.wd+k.ha;f+l<=e.length&&h.push({data:e.subarray(f+k.wd,f+l),size:k.ha,duration:1024,hb:0,flags:VB});f+=l}e=a.sampleRate;f=Math.floor(g*
e/1E3);d={id:b.id,type:"audio",codecs:a.codec,timescale:e,duration:d,Wa:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,Ca:f,Qa:h},stream:b};return Promise.resolve(UB(this,new Ao([d]),b,c))};J("shaka.transmuxer.AacTransmuxer",YB);YB.prototype.transmux=YB.prototype.transmux;YB.prototype.convertCodecs=YB.prototype.convertCodecs;YB.prototype.isSupported=YB.prototype.isSupported;de("audio/aac",function(){return new YB("audio/aac")},1);function ZB(a,b,c){if(b+8>a.length||a[b]!==11||a[b+1]!==119)return!1;var d=a[b+4]>>6;if(d>=3)return!1;var e=a[b+4]&63,f=[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][e*3+d]*2;if(b+f>a.length)return!1;var g=a[b+6]>>5,h=0;g===2?h+=2:(g&1&&g!==1&&(h+=2),g&4&&(h+=2));h=(a[b+6]<<8|a[b+7])>>12-h&1;var k=a[b+5]&7;a=new Uint8Array([d<<6|a[b+5]>>3<<1|k>>2,(k&3)<<6|g<<3|h<<2|e>>4,e<<4&224]);c.sampleRate=[48E3,44100,32E3][d];c.channelCount=[2,1,2,3,3,4,4,5][g]+h;c.Nb=a;c.ha=f;return!0};function $B(){SB.apply(this,arguments)}ta($B,SB);$B.prototype.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ac3"?Fl(this.convertCodecs("audio",a)):!1};$B.prototype.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ac3"?nb().Hd()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};
$B.prototype.transmux=function(a,b,c,d){a=tb(a);for(var e=Nh(a),f=e.length;f<a.length;f++){a:{var g=a;var h=f;if(g[h]===11&&g[h+1]===119){var k=0,l=5;h+=l;for(var m,n;l>0;){n=g[h];var p=Math.min(l,8),u=8-p;m=4278190080>>>24+u<<u;m=(n&m)>>u;k=k?k<<p|m:m;h+=1;l-=p}if(k<16){g=!0;break a}}g=!1}if(g)break}e=TB(e,c.endTime*1E3);g=0;h=new Uint8Array([]);k=[];for(l={sampleRate:0,channelCount:0,Nb:new Uint8Array(0),ha:0};f<a.length;){if(!ZB(a,f,l))return Promise.reject(new K(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=
l.sampleRate;b.channelsCount=l.channelCount;g=l.sampleRate;h=l.Nb;k.push({data:a.subarray(f,f+l.ha),size:l.ha,duration:1536,hb:0,flags:VB});f+=l.ha}return Promise.resolve(UB(this,new Ao([{id:b.id,type:"audio",codecs:"ac-3",timescale:g,duration:d,Wa:h,data:{sequenceNumber:this.frameIndex,Ca:Math.floor(e*g/1E3),Qa:k},stream:b}]),b,c))};J("shaka.transmuxer.Ac3Transmuxer",$B);$B.prototype.transmux=$B.prototype.transmux;$B.prototype.convertCodecs=$B.prototype.convertCodecs;$B.prototype.isSupported=$B.prototype.isSupported;
de("audio/ac3",function(){return new $B("audio/ac3")},1);function aC(a,b,c){if(b+8>a.length||(a[b]<<8|a[b+1]<<0)!==2935)return!1;var d=new Qh(a.subarray(b+2));Sh(d,2);Sh(d,3);var e=Th(d,11)+1<<1,f=Th(d,2);if(f==3){f=Th(d,2);f=[24E3,22060,16E3][f];var g=3}else f=[48E3,44100,32E3][f],g=Th(d,2);var h=Th(d,3),k=Th(d,1);d=Th(d,5);if(b+e>a.byteLength)return!1;a=Math.floor(e*f/([1,2,3,6][g]*16));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,f<<6|d<<1|0,0|h<<1|k<<0,0]);c.sampleRate=f;c.channelCount=[2,1,2,3,3,4,4,5][h]+k;c.Nb=a;c.ha=e;return!0};function bC(){SB.apply(this,arguments)}ta(bC,SB);bC.prototype.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ec3"?Fl(this.convertCodecs("audio",a)):!1};bC.prototype.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':b};
bC.prototype.transmux=function(a,b,c,d){a=tb(a);for(var e=Nh(a),f=e.length;f<a.length&&(a[f]<<8|a[f+1]<<0)!==2935;f++);e=TB(e,c.endTime*1E3);for(var g=0,h=new Uint8Array([]),k=[],l={sampleRate:0,channelCount:0,Nb:new Uint8Array(0),ha:0};f<a.length;){if(!aC(a,f,l))return Promise.reject(new K(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;g=l.sampleRate;h=l.Nb;k.push({data:a.subarray(f,f+l.ha),size:l.ha,duration:1536,hb:0,flags:VB});f+=l.ha}return Promise.resolve(UB(this,
new Ao([{id:b.id,type:"audio",codecs:"ec-3",timescale:g,duration:d,Wa:h,data:{sequenceNumber:this.frameIndex,Ca:Math.floor(e*g/1E3),Qa:k},stream:b}]),b,c))};J("shaka.transmuxer.Ec3Transmuxer",bC);bC.prototype.transmux=bC.prototype.transmux;bC.prototype.convertCodecs=bC.prototype.convertCodecs;bC.prototype.isSupported=bC.prototype.isSupported;de("audio/ec3",function(){return new bC("audio/ec3")},1);function cC(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 Qh(b.data),d=Yh(c);Yh(c);Yh(c);Vh(c);if(dC.includes(d)&&(d=V(c),d===3&&Sh(c,1),Vh(c),Vh(c),Sh(c,1),Xh(c))){d=d!==3?8:12;for(var e=0;e<d;e++)Xh(c)&&(e<6?Zh(c,16):Zh(c,64))}Vh(c);d=V(c);if(d===0)V(c);else if(d===1)for(Sh(c,1),Vh(c),Vh(c),d=V(c),e=0;e<d;e++)Vh(c);Vh(c);Sh(c,1);var f=V(c),g=V(c),h=Th(c,1);h===0&&Sh(c,1);Sh(c,1);var k=0,l=0,m=0,n=0;
Xh(c)&&(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(Xh(c)&&Xh(c)){var p=Yh(c),u=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];p>0&&p<=16?(d=u[p-1],e=r[p-1]):p===255&&(d=Th(c,16),e=Th(c,16))}c=(2-h)*(g+1)*16-m*2-n*2;f=(f+1)*16-k*2-l*2;b=b.fullData;k=b.byteLength;a=a.fullData;l=a.byteLength;g=0;h=new Uint8Array(11+k+l);h[g++]=1;h[g++]=b[1];h[g++]=b[2];h[g++]=b[3];h[g++]=255;h[g++]=225;h[g++]=k>>>8&255;h[g++]=k&255;h.set(b,g);g+=k;h[g++]=1;h[g++]=l>>>8&255;
h[g++]=l&255;h.set(a,g);return{height:c,width:f,Ng:h,vc:d,Hc:e}}
function eC(a){function b(v){e={data:g,frame:!1,isKeyframe:!1,pts:v.pts,dts:v.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var v=e.nalus.length*4,w=t(e.nalus),y=w.next();!y.done;y=w.next())v+=y.value.fullData.byteLength;v=new Uint8Array(v);w=0;y=t(e.nalus);for(var x=y.next();!x.done;x=y.next()){x=x.value;var A=x.fullData.byteLength;v[w]=A>>24&255;v[w+1]=A>>16&255;v[w+2]=A>>8&255;v[w+3]=A&255;v.set(x.fullData,w+4);w+=4+A}e.data=v;d.push(e)}}for(var d=[],e=null,f=!1,g=new Uint8Array(0),
h=0;h<a.length;h++){var k=a[h],l=k.nalus,m=!1;e&&l.length&&!f&&(c(),b(k));l=t(k.nalus);for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=!1;switch(n.type){case 1:var u=!1;p=!0;var r=n.data;m&&r.length>4&&(r=$h(new Qh(r)),r===2||r===4||r===7||r===9)&&(u=!0);u&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(k);e.frame=!0;e.isKeyframe=u;break;case 5:p=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(k);e.frame=!0;e.isKeyframe=!0;break;case 6:p=!0;break;case 7:m=p=!0;break;case 8:p=!0;break;case 9:f=
p=!0;e&&e.frame&&(c(),e=null);e||b(k);break;case 12:p=!0;break;default:p=!1}e&&p&&e.nalus.push(n)}}c();return d}var dC=[100,110,122,244,44,83,86,118,128,138,139,134];function fC(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=gC(b.fullData);a=hC(c.fullData);var f=iC(d.fullData);b=jC(b.fullData,c.fullData,d.fullData,{gg:e.gg,Gg:e.Gg,Mf:a.Mf,Nf:a.Nf,Gf:a.Gf,Lf:a.Lf,Hf:a.Hf,If:a.If,Jf:a.Jf,Kf:a.Kf,Af:a.Af,Bf:a.Bf,Cf:a.Cf,Df:a.Df,Ef:a.Ef,Ff:a.Ff,Ie:a.Ie,pf:a.pf,kf:a.kf,jf:a.jf,ig:f.ig,zf:a.zf,yf:a.yf});return{height:a.height,width:a.width,
Ng:b,vc:a.qk,Hc:a.pk}}function gC(a){var b=new Qh(a,!0);Yh(b);Yh(b);Th(b,4);Th(b,2);Th(b,6);a=Th(b,3);b=Xh(b);return{gg:a+1,Gg:b}}
function hC(a){a=new Qh(a,!0);Yh(a);Yh(a);var b=0,c=0,d=0,e=0;Th(a,4);var f=Th(a,3);Xh(a);for(var g=Th(a,2),h=Th(a,1),k=Th(a,5),l=Yh(a),m=Yh(a),n=Yh(a),p=Yh(a),u=Yh(a),r=Yh(a),v=Yh(a),w=Yh(a),y=Yh(a),x=Yh(a),A=Yh(a),C=[],z=[],B=0;B<f;B++)C.push(Xh(a)),z.push(Xh(a));if(f>0)for(B=f;B<8;B++)Th(a,2);for(B=0;B<f;B++)C[B]&&Th(a,88),z[B]&&Yh(a);V(a);C=V(a);C==3&&Th(a,1);z=V(a);B=V(a);Xh(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var D=V(a),F=V(a),E=V(a);if(Xh(a))for(var H=0;H<=f;H++)V(a),V(a),V(a);else V(a),
V(a),V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(Xh(a)&&Xh(a))for(H=0;H<4;H++)for(var O=0;O<(H===3?2:6);O++)if(Xh(a)){var R=Math.min(64,1<<4+(H<<1));H>1&&Wh(a);for(var N=0;N<R;N++)Wh(a)}else V(a);Xh(a);Xh(a);Xh(a)&&(Yh(a),V(a),V(a),Xh(a));H=V(a);for(R=O=0;R<H;R++)if(N=!1,R!==0&&(N=Xh(a)),N){R===H&&V(a);Xh(a);V(a);for(var S=N=0;S<=O;S++){var L=Xh(a),P=!1;L||(P=Xh(a));(L||P)&&N++}O=N}else{S=V(a);N=V(a);O=S+N;for(L=0;L<S;L++)V(a),Xh(a);for(S=0;S<N;S++)V(a),Xh(a)}if(Xh(a))for(H=V(a),O=0;O<H;O++){for(R=0;R<
E+4;R++)Th(a,1);Th(a,1)}H=E=1;O=!0;R=1;S=N=0;Xh(a);Xh(a);if(Xh(a)){if(Xh(a)){L=Yh(a);P=[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];L>0&&L<=16?(E=P[L-1],H=Q[L-1]):L===255&&(E=Th(a,16),H=Th(a,16))}Xh(a)&&Xh(a);Xh(a)&&(Th(a,3),Xh(a),Xh(a)&&(Yh(a),Yh(a),Yh(a)));Xh(a)&&(V(a),V(a));Xh(a);Xh(a);Xh(a);if(L=Xh(a))Vh(a),Vh(a),Vh(a),Vh(a);if(Xh(a)&&(R=Th(a,32),N=Th(a,32),Xh(a)&&V(a),Xh(a))){Q=!1;L=Xh(a);P=Xh(a);if(L||P){if(Q=Xh(a))Yh(a),Th(a,5),Xh(a),Th(a,
5);Th(a,4);Th(a,4);Q&&Th(a,4);Th(a,5);Th(a,5);Th(a,5)}for(var M=0;M<=f;M++){O=Xh(a);var W=!0,ha=1;O||(W=Xh(a));var I=!1;W?V(a):I=Xh(a);I||(ha=V(a)+1);if(L){for(W=0;W<ha;W++)V(a),V(a),Q&&(V(a),V(a));Xh(a)}if(P){for(W=0;W<ha;W++)V(a),V(a),Q&&(V(a),V(a));Xh(a)}}}Xh(a)&&(Xh(a),Xh(a),Xh(a),S=V(a),V(a),V(a),V(a),V(a))}return{Gf:A,Mf:g,Nf:h,Lf:k,Hf:l,If:m,Jf:n,Kf:p,Af:u,Bf:r,Cf:v,Df:w,Ef:y,Ff:x,Ie:S,pf:C,kf:D,jf:F,width:z-(b+c)*(C===1||C===2?2:1),height:B-(d+e)*(C===1?2:1),qk:E,pk:H,zf:N/R,yf:O}}
function iC(a){var b=new Qh(a,!0);Yh(b);Yh(b);V(b);V(b);Xh(b);Xh(b);Th(b,3);Xh(b);Xh(b);V(b);V(b);Wh(b);Xh(b);Xh(b);Xh(b)&&V(b);Wh(b);Wh(b);Xh(b);Xh(b);Xh(b);Xh(b);a=Xh(b);b=Xh(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{ig:c}}
function jC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Mf&3)<<6|(d.Nf?1:0)<<5|d.Lf&31;e[2]=d.Hf;e[3]=d.If;e[4]=d.Jf;e[5]=d.Kf;e[6]=d.Af;e[7]=d.Bf;e[8]=d.Cf;e[9]=d.Df;e[10]=d.Ef;e[11]=d.Ff;e[12]=d.Gf;e[13]=240|(d.Ie&3840)>>8;e[14]=d.Ie&255;e[15]=252|d.ig&3;e[16]=252|d.pf&3;e[17]=248|d.kf&7;e[18]=248|d.jf&7;e[19]=0;e[20]=parseInt(d.zf,10);e[21]=((d.yf?1:0)&3)<<6|(d.gg&7)<<3|(d.Gg?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,a[d].byteLength>>8,a[d].byteLength&255]),b),b+=5,e.set(a[d],b),b+=a[d].byteLength;return e};function kC(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=lC[(c===3?3-d:d===3?3:4)*14+e-1]*1E3;f=mC[(c===3?0:c===2?1:2)*3+f];c=nC[c][d];var h=oC[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,nk:c*8*h}}return null}
function pC(a,b){return a[b]===255&&(a[b+1]&224)===224&&(a[b+1]&6)!==0}function qC(a,b){if(b+1<a.length&&pC(a,b)){var c=kC(a,b),d=4;c&&c.ha&&(d=c.ha);b+=d;return b===a.length||b+1<a.length&&pC(a,b)}return!1}
var lC=[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],mC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],nC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],oC=[0,1,1,4];function rC(){SB.apply(this,arguments)}ta(rC,SB);rC.prototype.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/mpeg"?Fl(this.convertCodecs("audio",a)):!1};rC.prototype.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':b};
rC.prototype.transmux=function(a,b,c,d){for(var e=tb(a),f=Nh(e).length;f<e.length&&!qC(e,f);f++);var g;for(a=[];f<e.length;){var h=kC(e,f);if(!h)return Promise.reject(new K(2,3,3018,c?c.S()[0]:null));g||(g=h);f+h.ha<=e.length&&a.push({data:e.subarray(f,f+h.ha),size:h.ha,duration:1152,hb:0,flags:VB});f+=h.ha}if(!g)return Promise.reject(new K(2,3,3018,c?c.S()[0]:null));e=g.nk*9E4/g.sampleRate*this.frameIndex;d={id:b.id,type:"audio",codecs:"mp3",timescale:g.sampleRate,duration:d,Wa:new Uint8Array([]),
data:{sequenceNumber:this.frameIndex,Ca:e,Qa:a},stream:b};return Promise.resolve(UB(this,new Ao([d]),b,c))};J("shaka.transmuxer.Mp3Transmuxer",rC);rC.prototype.transmux=rC.prototype.transmux;rC.prototype.convertCodecs=rC.prototype.convertCodecs;rC.prototype.isSupported=rC.prototype.isSupported;de("audio/mpeg",function(){return new rC("audio/mpeg")},1);function sC(a){this.i=a;this.h=null}q=sC.prototype;q.destroy=function(){};q.isSupported=function(a){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var b=re(a).split(","),c=wc("audio",b);b=wc("video",b);return!c||b||ne(c)!="mp3"?!1:Fl(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.i};
q.transmux=function(a,b,c,d,e){this.h?this.h.clearData():this.h=new ai;this.h.Re(c.j);a=tb(a);a=this.h.parse(a);if(a.qd().audio!="mp3"||e!="audio")return Promise.reject(new K(2,3,3018,c?c.S()[0]:null));c=new Uint8Array([]);e=t(a.ib());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=kC(a,b))?(b+d.ha<=a.length&&(c=Qb(c,a.subarray(b,b+d.ha))),b+=d.ha):b++;return Promise.resolve(c)};J("shaka.transmuxer.MpegTsTransmuxer",sC);sC.prototype.transmux=sC.prototype.transmux;
sC.prototype.getOriginalMimeType=sC.prototype.getOriginalMimeType;sC.prototype.convertCodecs=sC.prototype.convertCodecs;sC.prototype.isSupported=sC.prototype.isSupported;sC.prototype.destroy=sC.prototype.destroy;de("video/mp2t",function(){return new sC("video/mp2t")},2);function tC(a){if(a.length<1)return 960;var b=a[0],c=b&3;b=uC[b>>3&31];if(c===0)a=1;else if(c===1||c===2)a=2;else{if(a.length<2)return b;a=a[1]&63;if(a===0)return b}return b*a}var uC=[480,960,1920,2880,480,960,1920,2880,480,960,1920,2880,480,960,480,960,120,240,480,960,120,240,480,960,120,240,480,960,120,240,480,960];function vC(a){SB.call(this,a);this.i=this.h=null}ta(vC,SB);vC.prototype.destroy=function(){SB.prototype.destroy.call(this);this.i&&this.i.destroy()};vC.prototype.isSupported=function(a,b){if(!wC(a))return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=re(c).split(",");c=wc("audio",d);d=wc("video",d);if(c&&(c=ne(c),!xC.includes(c))||d&&(c=ne(d),!yC.includes(c)))return!1;if(b)return Fl(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Fl(b)||Fl(a)};
function wC(a){a=a.toLowerCase().split(";")[0];return a=="video/mp2t"||a=="audio/mp2t"}vC.prototype.convertCodecs=function(a,b){return wC(b)?(b=re(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return te(c,"audio/mp4")}).map(ve).join(","),a=="audio"?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};
vC.prototype.transmux=function(a,b,c,d,e){var f=tb(a);if(e=="audio"&&!ni(f)){for(var g=Nh(f),h=g.length;h<f.length;h++)if(qC(f,h))return Promise.reject(new K(2,3,3018,c?c.S()[0]:null));for(h=g.length;h<f.length;h++)if(QB(f,h))return this.i||(this.i=new YB("audio/aac")),this.i.transmux(a,b,c,d,e);return Promise.reject(new K(2,3,3018,c?c.S()[0]:null))}this.h?this.h.clearData():this.h=new ai;this.h.Re(c.j);var k=this.h.parse(f),l=[],m=k.qd();try{var n=null;if(e=="video"){switch(m.video){case "avc":var p=
[],u=null,r=k.Rc(),v=eC(r);if(!v.length)throw new K(2,3,3023,c?c.S()[0]:null);for(var w=0;w<v.length;w++){var y=v[w];u==null&&(u=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;p.push({data:y.data,size:y.data.byteLength,duration:x,hb:Math.round((y.pts||0)-(y.dts||0)),flags:y.isKeyframe?WB:XB})}for(var A=[],C=t(r),z=C.next();!z.done;z=C.next())A.push.apply(A,va(z.value.nalus));var B=cC(A);if(!B||u==null)throw new K(2,3,
3018,c?c.S()[0]:null);b.height=b.height||B.height;b.width=b.width||B.width;n={id:b.id,type:"video",codecs:"avc1",timescale:9E4,duration:d,Wa:B.Ng,vc:B.vc,Hc:B.Hc,data:{sequenceNumber:this.frameIndex,Ca:u,Qa:p},stream:b};break;case "hvc":var D=[],F=null,E=[],H=k.Rc(),O=new Uint8Array(0),R=!1;if(!H.length)throw new K(2,3,3023,c?c.S()[0]:null);for(var N=0;N<H.length;N++){var S=H[N],L=S.nalus;E.push.apply(E,va(L));for(var P=!1,Q=[],M=0,W=!1,ha=t(L),I=ha.next();!I.done;I=ha.next()){var U=I.value;switch(U.type){case 1:case 0:var T=
W=!0;break;case 19:case 20:case 21:P=T=W=!0;break;case 32:case 33:case 34:T=!0;break;case 35:W=T=!0;break;case 39:case 40:T=!0;break;default:T=!1}W&&T&&(Q.push(U.fullData),M+=U.fullData.byteLength)}if(Q.length){M+=4*Q.length;for(var Y=new Uint8Array(M),fa=0,ja=t(Q),sa=ja.next();!sa.done;sa=ja.next()){var Ga=sa.value,pa=Ga.byteLength;Y[fa]=pa>>24&255;Y[fa+1]=pa>>16&255;Y[fa+2]=pa>>8&255;Y[fa+3]=pa&255;Y.set(Ga,fa+4);fa+=pa+4}O=Y;R=P;var kd=!0}else kd=!1;if(kd){F==null&&S.dts!=null&&(F=S.dts);var Jb=
void 0;Jb=N+1<H.length?(H[N+1].dts||0)-(S.dts||0):H.length>1?(S.dts||0)-(H[N-1].dts||0):(c.endTime-c.startTime)*9E4;D.push({data:O,size:O.byteLength,duration:Jb,hb:Math.round((S.pts||0)-(S.dts||0)),flags:R?WB:XB})}}var Xc=fC(E);if(!Xc||F==null)throw new K(2,3,3018,c?c.S()[0]:null);b.height=b.height||Xc.height;b.width=b.width||Xc.width;n={id:b.id,type:"video",codecs:"hvc1",timescale:9E4,duration:d,Wa:Xc.Ng,vc:Xc.vc,Hc:Xc.Hc,data:{sequenceNumber:this.frameIndex,Ca:F,Qa:D},stream:b}}n&&(l.push(n),n=
null)}if(e=="audio"){switch(m.audio){case "aac":for(var Od=[],Kb,Ic=null,mc=null,Wa=null,Bh=t(k.ib()),um=Bh.next();!um.done;um=Bh.next()){var Ai=um.value,cc=Ai.data;if(cc){var Rb=0;if(mc==-1&&Wa)cc=Qb(Wa,Ai.data),mc=null;else if(mc!=null&&Wa){Rb=Math.max(0,mc);var tu=Qb(Wa,cc.subarray(0,Rb));Od.push({data:tu,size:tu.byteLength,duration:1024,hb:0,flags:VB});mc=Wa=null}Kb=PB(cc,Rb);if(!Kb)throw new K(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=Kb.sampleRate;b.channelsCount=Kb.channelCount;Ic==null&&
Ai.pts!==null&&(Ic=Ai.pts);for(;Rb<cc.length;){var Oe=OB(cc,Rb);if(!Oe){Wa=cc.subarray(Rb,cc.length);mc=-1;break}var lg=Oe.wd+Oe.ha;mc=Math.max(0,Rb+lg-cc.length);mc!=0?Wa=cc.subarray(Rb+Oe.wd,Rb+lg):Rb+lg<=cc.length&&Od.push({data:cc.subarray(Rb+Oe.wd,Rb+lg),size:Oe.ha,duration:1024,hb:0,flags:VB});Rb+=lg}}}if(!Kb||Ic==null){Ic=c.startTime*9E4;var vm=wc("audio",b.codecs.split(","));if(!vm||!b.channelsCount||!b.audioSamplingRate)throw new K(2,3,3018,c?c.S()[0]:null);Kb={sampleRate:b.audioSamplingRate,
channelCount:b.channelsCount,codec:vm};var wm=RB(vm,b.channelsCount);if(!wm)throw new K(2,3,3018,c?c.S()[0]:null);for(var cD=Ic+(c.endTime-c.startTime)*9E4,uu=Ic;uu<cD;)Od.push({data:wm,size:wm.byteLength,duration:1024,hb:0,flags:VB}),uu+=1024/Kb.sampleRate*9E4}var vu=Kb.sampleRate,dD=Ic/9E4*vu;n={id:b.id,type:"audio",codecs:Kb.codec,timescale:vu,duration:d,Wa:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,Ca:dD,Qa:Od},stream:b};break;case "ac3":for(var wu=[],Bi=0,xm=new Uint8Array([]),Ci=
null,rd={sampleRate:0,channelCount:0,Nb:new Uint8Array(0),ha:0},xu=t(k.ib()),ym=xu.next();!ym.done;ym=xu.next()){var zm=ym.value,Am=zm.data;Ci==null&&zm.pts!==null&&(Ci=zm.pts);for(var Pe=0;Pe<Am.length;)ZB(Am,Pe,rd)?(b.audioSamplingRate=rd.sampleRate,b.channelsCount=rd.channelCount,Bi=rd.sampleRate,xm=rd.Nb,wu.push({data:Am.subarray(Pe,Pe+rd.ha),size:rd.ha,duration:1536,hb:0,flags:VB}),Pe+=rd.ha):Pe++}if(Bi==0||xm.byteLength==0||Ci==null)throw new K(2,3,3018,c?c.S()[0]:null);n={id:b.id,type:"audio",
codecs:"ac-3",timescale:Bi,duration:d,Wa:xm,data:{sequenceNumber:this.frameIndex,Ca:Ci/9E4*Bi,Qa:wu},stream:b};break;case "ec3":for(var yu=[],Di=0,Bm=new Uint8Array([]),Ei=null,sd={sampleRate:0,channelCount:0,Nb:new Uint8Array(0),ha:0},zu=t(k.ib()),Cm=zu.next();!Cm.done;Cm=zu.next()){var Dm=Cm.value,Em=Dm.data;Ei==null&&Dm.pts!==null&&(Ei=Dm.pts);for(var Qe=0;Qe<Em.length;)aC(Em,Qe,sd)?(b.audioSamplingRate=sd.sampleRate,b.channelsCount=sd.channelCount,Di=sd.sampleRate,Bm=sd.Nb,yu.push({data:Em.subarray(Qe,
Qe+sd.ha),size:sd.ha,duration:1536,hb:0,flags:VB}),Qe+=sd.ha):Qe++}if(Di==0||Bm.byteLength==0||Ei==null)throw new K(2,3,3018,c?c.S()[0]:null);n={id:b.id,type:"audio",codecs:"ec-3",timescale:Di,duration:d,Wa:Bm,data:{sequenceNumber:this.frameIndex,Ca:Ei/9E4*Di,Qa:yu},stream:b};break;case "mp3":for(var Au=[],Fi,Gi=null,Bu=t(k.ib()),Fm=Bu.next();!Fm.done;Fm=Bu.next()){var Gm=Fm.value,mg=Gm.data;if(mg){Gi==null&&Gm.pts!==null&&(Gi=Gm.pts);for(var $d=0;$d<mg.length;){var Re=kC(mg,$d);Re?(Fi||(Fi=Re),$d+
Re.ha<=mg.length&&Au.push({data:mg.subarray($d,$d+Re.ha),size:Re.ha,duration:1152,hb:0,flags:VB}),$d+=Re.ha):$d++}}}if(!Fi||Gi==null)throw new K(2,3,3018,c?c.S()[0]:null);var Cu=Fi.sampleRate,eD=Gi/9E4*Cu;n={id:b.id,type:"audio",codecs:"mp3",timescale:Cu,duration:d,Wa:new Uint8Array([]),data:{sequenceNumber:this.frameIndex,Ca:eD,Qa:Au},stream:b};break;case "opus":var Du=[],Hi=null,Mc=k.K;if(!Mc)throw new K(2,3,3018,c?c.S()[0]:null);var lb=[];switch(Mc.Mi){case 1:case 2:lb=[0];break;case 0:lb=[255,
1,1,0,1];break;case 128:lb=[255,2,0,0,1];break;case 3:lb=[1,2,1,0,2,1];break;case 4:lb=[1,2,2,0,1,2,3];break;case 5:lb=[1,3,2,0,4,1,2,3];break;case 6:lb=[1,4,2,0,4,1,2,3,5];break;case 7:lb=[1,4,2,0,4,1,2,3,5,6];break;case 8:lb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:lb=[1,1,2,0,1];break;case 131:lb=[1,1,3,0,1,2];break;case 132:lb=[1,1,4,0,1,2,3];break;case 133:lb=[1,1,5,0,1,2,3,4];break;case 134:lb=[1,1,6,0,1,2,3,4,5];break;case 135:lb=[1,1,7,0,1,2,3,4,5,6];break;case 136:lb=[1,1,8,0,1,2,3,4,5,6,7]}var Eu=
new Uint8Array([0,Mc.channelCount,0,0,Mc.sampleRate>>>24&255,Mc.sampleRate>>>17&255,Mc.sampleRate>>>8&255,Mc.sampleRate>>>0&255,0,0].concat(va(lb)));for(var Fu=Mc.sampleRate,Gu=t(k.ib()),Hm=Gu.next();!Hm.done;Hm=Gu.next()){var Im=Hm.value,Se=Im.data;Hi==null&&Im.pts!==null&&(Hi=Im.pts);for(var ng=0;ng<Se.length;){for(var fD=(Se[ng+1]&16)!==0,gD=(Se[ng+1]&8)!==0,bd=ng+2,Ii=0;Se[bd]===255;)Ii+=255,bd+=1;Ii+=Se[bd];bd+=1;bd+=fD?2:0;bd+=gD?2:0;var Jm=Se.slice(bd,bd+Ii);Du.push({data:Jm,size:Jm.byteLength,
duration:tC(Jm),hb:0,flags:VB});ng=bd+Ii}}if(Eu.byteLength==0||Hi==null)throw new K(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=Mc.sampleRate;b.channelsCount=Mc.channelCount;n={id:b.id,type:"audio",codecs:"opus",timescale:Fu,duration:d,Wa:Eu,data:{sequenceNumber:this.frameIndex,Ca:Hi/9E4*Fu,Qa:Du},stream:b}}n&&l.push(n)}}catch(Km){return Km&&Km.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(Km)}return l.length?Promise.resolve(UB(this,new Ao(l),b,c)):Promise.reject(new K(2,3,3018,
c?c.S()[0]:null))};J("shaka.transmuxer.TsTransmuxer",vC);vC.prototype.transmux=vC.prototype.transmux;vC.prototype.convertCodecs=vC.prototype.convertCodecs;vC.prototype.isSupported=vC.prototype.isSupported;vC.prototype.destroy=vC.prototype.destroy;var xC=["aac","ac-3","ec-3","mp3","opus"],yC=["avc","hevc"];de("video/mp2t",function(){return new vC("video/mp2t")},3);de("audio/mp2t",function(){return new vC("audio/mp2t")},3);function zC(a){this.h=new Uint8Array(a);xb(this.h);this.i=0}zC.prototype.Ia=function(){return this.i};zC.prototype.Oa=function(){return this.i};zC.prototype.seek=function(a){if(a>this.h.length)throw new K(2,3,3025);this.i=a};zC.prototype.skip=function(a){var b=this.i+a;b<=this.h.length||(b=new Uint8Array(Math.max(this.h.length*2,b)),b.set(this.h),this.h=b,xb(this.h));this.i+=a};J("shaka.util.DataViewWriter",zC);zC.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:1};function AC(){this.o=[];this.i=[];this.h=[];this.l=[];this.j=[];this.u=!1;this.m=new Set;this.B=(new Map).set("audio",this.i).set("video",this.h).set(yc,this.l).set("image",this.j)}q=AC.prototype;q.release=function(){for(var a=t(this.i.concat(this.h,this.l,this.j)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.i=[];this.h=[];this.l=[];this.j=[];this.o=[];this.u=!1;this.m.clear();this.B.clear()};q.Gj=function(){return this.o};q.Bj=function(){return this.l.slice()};
q.mj=function(){return this.j};q.Ui=function(a,b){if(a){var c=this.B.get(a.type)||[];c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;BC(d,a);d=CC(d);d=t(d);for(var e=d.next();!e.done;e=d.next())BC(e.value,a)}a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};function BC(a,b){var c;a.matchedStreams=(c=a.matchedStreams)==null?void 0:c.filter(function(d){return d!==b})}function DC(a,b){return new Map(a.map(function(c){return[b(c),c]}))}
function EC(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=DC(h.audioStreams,FC);var k=DC(h.videoStreams,GC),l=DC(h.textStreams,HC);h=DC(h.imageStreams,IC);if(b){var m=JC(yc);l.set(HC(m),m);m=JC("image");h.set(IC(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Xg:c,zi:d,si:e,xh:f}}
q.Qi=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H,O,R,N,S,L,P,Q,M,W;return G(function(ha){if(ha.i==1){e=Ac;if(!b&&a.length==1)return f=EC(a,!1),g=f.Xg,h=f.zi,k=f.si,l=f.xh,d.i=Array.from(g[0].values()),d.h=Array.from(h[0].values()),d.l=Array.from(k[0].values()),d.j=Array.from(l[0].values()),ha.A(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)u=a[p],d.m.has(u.id)||(d.m.add(u.id),n==-1&&(n=p));if(n==-1)return ha.return();r=EC(a,!0);v=r.Xg;w=r.zi;y=r.si;x=
r.xh;return ha.h(Promise.all([KC(d,d.i,v,n,m),KC(d,d.h,w,n,m),KC(d,d.l,y,n,m),KC(d,d.j,x,n,m)]),2)}A=0;C=[];if(d.h.length&&d.i.length)for(O=t(d.i),R=O.next();!R.done;R=O.next())for(N=R.value,S=t(d.h),L=S.next();!L.done;L=S.next())P=L.value,Q=Wb(N.drmInfos,P.drmInfos),N.drmInfos.length&&P.drmInfos.length&&!Q.length||(M=(N.bandwidth||0)+(P.bandwidth||0),N.dependencyStream&&(M+=N.dependencyStream.bandwidth||0),P.dependencyStream&&(M+=P.dependencyStream.bandwidth||0),W=A++,C.push({id:W,language:N.language,
disabledUntilTime:0,primary:N.primary,audio:N,video:P,bandwidth:M,drmInfos:Q,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(z=d.h.length?d.h:d.i,B=t(z),D=B.next();!D.done;D=B.next())F=D.value,E=A++,H=F.bandwidth||0,F.dependencyStream&&(H+=F.dependencyStream.bandwidth||0),C.push({id:E,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==e.X?F:null,video:F.type==e.qa?F:null,bandwidth:H,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
d.o=C;ha.l()})};
function KC(a,b,c,d,e){var f=LC,g=MC,h,k,l,m,n,p,u,r,v,w,y,x,A,C,z,B,D,F,E,H;return G(function(O){switch(O.i){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){O.A(4);break}n=m.value;return O.h(NC(a,n,c,d,g,h,e),5);case 5:p=O.j;if(!p)throw new K(2,4,4037);m=l.next();O.A(2);break;case 4:u=t(h);for(r=u.next();!r.done;r=u.next())for(v=r.value,w=t(v),y=w.next();!y.done;y=w.next())x=y.value,(A=OC(a,b,x,c,f,g,h))&&b.push(A);C=t(h);
for(z=C.next();!z.done;z=C.next())for(B=z.value,D=t(B),F=D.next(),E={};!F.done;E={Cg:void 0},F=D.next())if(E.Cg=F.value,!PC(E.Cg)&&(H=b.some(function(R){return function(N){return QC(R.Cg,N)}}(E))))throw new K(2,4,4037);return O.return(b)}})}function NC(a,b,c,d,e,f,g){return G(function(h){if(h.i==1)return RC(a,c,b,g>0),b.matchedStreams?b.segmentIndex?h.h(SC(b,d+g),2):h.A(2):h.return(!1);TC(b,d,e,f,g);return h.return(!0)})}
function SC(a,b){var c,d,e,f,g,h,k,l,m,n;return G(function(p){if(p.i==1){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)for(f=d[e],c.push(f.createSegmentIndex()),g=CC(f),h=t(g),k=h.next();!k.done;k=h.next())l=k.value,l.segmentIndex||c.push(l.createSegmentIndex());return p.h(Promise.all(c),2)}if(a.segmentIndex instanceof Cl)for(m=b;m<d.length;m++)n=d[m],n.segmentIndex&&a.segmentIndex.j.push(n.segmentIndex);p.l()})}
function OC(a,b,c,d,e,f,g){if(PC(c))return null;var h=e(c);RC(a,d,h);h.createSegmentIndex&&(h.createSegmentIndex=function(){return G(function(k){if(h.segmentIndex)return k.A(0);h.segmentIndex=new Cl;return k.h(SC(h,0),0)})},h.closeSegmentIndex=function(){h.segmentIndex&&(h.segmentIndex.release(),h.segmentIndex=null);if(h.matchedStreams)for(var k=t(h.matchedStreams),l=k.next();!l.done;l=k.next()){l=l.value;var m;if(m=l.segmentIndex){a:{m=t(b);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n!==
h&&n.segmentIndex&&n.matchedStreams&&n.matchedStreams.includes(l)){m=!0;break a}m=!1}m=!m}m&&(l.segmentIndex.release(),l.segmentIndex=null)}});if(!h.matchedStreams||!h.matchedStreams.length)return null;TC(h,0,f,g,0);return h}
function TC(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"&&pc(a.language,g.language)==0&&(h=!1);if(h&&((h=d[b-e])&&h.delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function LC(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 UC(a,b){a||(a=[]);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,a.includes(c)||a.push(c);return a}
function MC(a,b){a.roles=UC(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=UC(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var c=t(b.keyIds),d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.originalId==null?a.originalId=b.originalId:(c=b.originalId||"")&&!a.originalId.endsWith(c)&&(a.originalId+=","+c);c=Wb(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new K(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||
(a.closedCaptions=new Map),c=t(b.closedCaptions),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));c=t(VC);for(d=c.next();!d.done;d=c.next())WC(a,b,d.value)}
function WC(a,b,c){var d=b[c]||null,e=a[c]||null;d?(e||(e=LC(d),e.matchedStreams=[],e.createSegmentIndex=function(){var f,g,h,k;return G(function(l){switch(l.i){case 1:if(e.segmentIndex)return l.return();f=new Cl;g=t(e.matchedStreams);h=g.next();case 2:if(h.done){l.A(4);break}k=h.value;if(k.segmentIndex){l.A(5);break}return l.h(k.createSegmentIndex(),5);case 5:f.j.push(k.segmentIndex);h=g.next();l.A(2);break;case 4:e.segmentIndex=f,l.l()}})},a[c]=e),e.matchedStreams.push(d),MC(e,d)):e&&(e.matchedStreams.push(b),
MC(e,b))}function RC(a,b,c,d){d=(d===void 0?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=XC(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function XC(a,b,c){var d={audio:FC,video:GC,text:HC,image:IC}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return QC(l,m)},video:function(l,m){return QC(l,m)},text:YC,image:ZC}[c.type];for(var g={audio:$C,video:aD,text:bD,image:hD}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.u&&!PC(e)&&b.delete(d(e));return e}
function iD(a,b){return a.mimeType!=b.mimeType?!1:jD(a.codecs)===jD(b.codecs)}q.zk=function(a){this.u=a};function QC(a,b){return a.drmInfos&&!Ub(a.drmInfos,b.drmInfos)?!1:!0}function YC(a,b){return b.language?a.forced!==b.forced||pc(a.language,b.language)==0||b.kind!=a.kind?!1:!0:!0}function ZC(){return!0}
function $C(a,b,c){var d=kD(a,b,c);if(d===lD)return!0;if(d===mD)return!1;d=pc(a.language,b.language);var e=pc(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=nD(a.channelsCount,b.channelsCount,c.channelsCount);if(d==lD)return!0;if(d==mD)return!1;d=nD(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==lD?!0:d==mD?!1:a.bandwidth&&oD(a.bandwidth,b.bandwidth,c.bandwidth)==lD?!0:!1}
function aD(a,b,c){var d=kD(a,b,c);if(d===lD)return!0;if(d===mD)return!1;d=nD(a.width*a.height,b.width*b.height,c.width*c.height);if(d==lD)return!0;if(d==mD)return!1;if(a.frameRate){d=nD(a.frameRate,b.frameRate,c.frameRate);if(d==lD)return!0;if(d==mD)return!1}return a.bandwidth&&oD(a.bandwidth,b.bandwidth,c.bandwidth)==lD?!0:!1}
function bD(a,b,c){var d=pc(a.language,b.language),e=pc(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 hD(a,b,c){return nD(a.width*a.height,b.width*b.height,c.width*c.height)==lD?!0:!1}function JC(a){return Df({originalId:"",segmentIndex:new zl([]),type:a})}
function nD(a,b,c){if(b==a&&a!=c)return mD;if(c==a&&a!=b)return lD;if(b>a){if(c<=a||c-a<b-a)return lD;if(c-a>b-a)return mD}else{if(c>a)return mD;if(a-c<a-b)return lD;if(a-c>a-b)return mD}return pD}function kD(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 mD;if(!d&&e)return lD;b=iD(a,b);a=iD(a,c);return b&&!a?mD:!b&&a?lD:pD}function oD(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?lD:b<a?mD:pD}
function PC(a){switch(a.type){case yc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function GC(a){var b,c;return qD([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,(c=(b=a.dependencyStream)==null?void 0:b.baseOriginalId)!=null?c:a.baseOriginalId,Array.from(a.keyIds)])}
function FC(a){var b,c;return qD([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,(c=(b=a.dependencyStream)==null?void 0:b.baseOriginalId)!=null?c:a.baseOriginalId,Array.from(a.keyIds)])}function HC(a){return qD([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function IC(a){return qD([a.width,a.codecs,a.mimeType])}function qD(a){return JSON.stringify(a)}
function jD(a){return rD.getOrInsertComputed(a,function(){return ne(a)})}function CC(a){for(var b=[],c=t(VC),d=c.next();!d.done;d=c.next())(d=a[d.value])&&b.push(d);return b}J("shaka.util.PeriodCombiner",AC);AC.prototype.setUseStreamOnce=AC.prototype.zk;AC.prototype.combinePeriods=AC.prototype.Qi;AC.prototype.deleteStream=AC.prototype.Ui;AC.prototype.getImageStreams=AC.prototype.mj;AC.prototype.getTextStreams=AC.prototype.Bj;AC.prototype.getVariants=AC.prototype.Gj;
var VC=["trickModeVideo","dependencyStream"],lD=1,pD=0,mD=-1,rD=new Map;[].concat(Dv,Bv,Cv,Av).filter(function(a,b,c){return c.indexOf(a)===b});}).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