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

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

 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 Ah(a,b){this.j=a;if(b===void 0?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)d>=2&&a[d]==3&&a[d-1]==0&&a[d-2]==0||(b[c]=a[d],c++);this.j=Q(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Bh(a){var b=a.j.byteLength-a.i,c=Math.min(4,a.i);if(c!==0){for(var d=0,e=0;e<c;e++)d=d<<8|a.j[b+e];a.h=d<<(4-c)*8;a.g=c*8;a.i-=c}}function Ch(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=c*8;a.g-=c;Bh(a)}a.h<<=b;a.g-=b}
function Dh(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;a.g>0?a.h<<=c:a.i>0&&Bh(a);c=b-c;return c>0?d<<c|Dh(a,c):d}function Eh(a){for(var b=0;a.g===0;){if(a.i===0)return b;Bh(a)}for(;;){var c=Math.clz32(a.h);c>a.g&&(c=a.g);b+=c;a.h<<=c;a.g-=c;if(a.g>0||a.i===0)break;Bh(a)}return b}function Fh(a){Ch(a,1+Eh(a))}function T(a){var b=Eh(a);return Dh(a,b+1)-1}function Gh(a){a=T(a);return 1&a?1+a>>>1:-1*(a>>>1)}function V(a){return Dh(a,1)===1}function Hh(a){return Dh(a,8)}
function Ih(a,b){for(var c=8,d=8,e=0;e<b;e++)d!==0&&(d=Gh(a),d=(c+d+256)%256),c=d===0?c:d}function Jh(a){Hh(a);T(a);return T(a)}K("shaka.util.ExpGolomb",Ah);function Kh(){}function Lh(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 Mh(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 Nh(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 Oh(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if(a.type==="APIC"){if(a.size<2||a.data[0]!==3)return null;var c=a.data.subarray(1).indexOf(0);if(c===-1)return null;var d=jc(Q(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(f===-1)return null;var g=jc(Q(a.data,3+c,f)),h;d==="--\x3e"?h=jc(Q(a.data,4+c+f)):h=Rb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if(a.type==="TXXX"){if(a.size<2||a.data[0]!==3)return null;
d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=jc(Q(a.data,1,d));a=jc(Q(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="WXXX"){if(a.size<2||a.data[0]!==3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=jc(Q(a.data,1,d));a=jc(Q(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="PRIV"){if(a.size<2)return null;c=a.data.indexOf(0);if(c===-1)return null;c=jc(Q(a.data,0,c));b.description=c;c=="com.apple.streaming.transportStreamTimestamp"?
(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Rb(a.data.subarray(c.length+1)),b.data=a);return b}if(a.type[0]==="T"){if(a.size<2||a.data[0]!==3)return null;a=jc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return a.type[0]==="W"?(a=jc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Rb(a.data),b):null}
function Ph(a){for(var b=0,c=[];Lh(a,b);){var d=Nh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Nh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Oh(e))&&c.push(f);b+=e.size+10}Mh(a,b)&&(b+=10)}return c}function Qh(a,b){for(var c=b=b===void 0?0:b,d=0;Lh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Nh(a,b+6),Mh(a,b+10)&&(d+=10),b+=d;return d>0?a.subarray(c,c+d):new Uint8Array([])}K("shaka.util.Id3Utils",Kh);Kh.getID3Data=Qh;
Kh.getID3Frames=Ph;function Rh(){this.L=null;this.M=!1;this.C=this.O=null;this.D=[];this.j=[];this.g=[];this.G=this.I=null;this.l=[];this.i=[];this.h=[];this.J=null;this.o=[];this.m=[];this.F=this.K=this.A=this.B=null}p=Rh.prototype;p.clearData=function(){this.D=[];this.j=[];this.g=[];this.l=[];this.i=[];this.h=[];this.o=[];this.m=[]};p.re=function(a){this.F!=null&&this.F!=a&&(this.A=this.B=null);this.F=a};
p.parse=function(a){if(a.length<564)return this;for(var b=Math.max(0,Sh(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,Yd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(m>0)for(var n=h+5,q=m;q>2;){var u=f[n+1]+2;switch(f[n]){case 5:var t=n+2;t=f[t]<<24|f[t+1]<<16|f[t+2]<<8|f[t+3];g.audio==-1&&t===1332770163?(g.audio=l,g.audioCodec="opus"):g.video==-1&&t===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"&&(t=null,f[n+2]===128&&(t=f[n+3]),t!=null&&(this.K={channelCount:(t&15)===0?2:t&15,Bh:t,sampleRate:48E3}))}n+=u;q-=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.Yd==-1&&(g.Yd=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.O=f.video,this.C=f.videoCodec);f.audio!=-1&&(this.I=f.audio,this.G=f.audioCodec);f.Yd!=-1&&(this.J=f.Yd);d&&!this.M&&(d=!1,e=b-188);this.M=!0;break;case this.O:h=a.subarray(h,e+188);f?(this.j.push(this.D.length),this.D.push(h)):this.j.length&&this.D.push(h);break;case this.I:h=a.subarray(h,e+188);f?(this.i.push(this.l.length),this.l.push(h)):this.i.length&&this.l.push(h);break;case this.J:h=a.subarray(h,
e+188);f?(this.m.push(this.o.length),this.o.push(h)):this.m.length&&this.o.push(h);break;default:d=!0}}return this};function Th(a,b,c){return zc(a,b[c],c+1<b.length?b[c+1]:a.length)}
function Uh(a,b){if((b[0]<<16|b[1]<<8|b[2])!==1)return null;var c=b[4]<<8|b[5];if(c&&c>b.byteLength-6)return null;var d=null,e=null,f=b[7];if(f&192){var g=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2;a.B==null&&(a.B=g);d=Vh(g,a.B);e=a.B=d;f&64&&(e=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,a.A==null&&(a.A=e),e=d!=g?Vh(e,a.A):e);a.A=e}a=b[8]+9;return b.byteLength<=a?null:{data:b.subarray(a),packetLength:c,pts:d,
dts:e,nalus:[]}}p.Ri=function(a){vb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Bf(a,{fd:null,state:null})};
p.Bf=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;this.C=="hvc"&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0,n=this.C==="hvc";f==-1&&(l=0,m=n?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var q=a[h++];if(f)if(f===1)f=q?0:2;else if(q)if(q==1){q=h-f-1;if(l>=0)k.push({data:a.subarray(l+e,q),fullData:a.subarray(l,q),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.fd)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)),q>0&&(q=a.subarray(0,q),f.data=yc(f.data,q),f.fullData=yc(f.fullData,q),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=q?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.fd&&(c=k.length?k[k.length-1]:b.fd)&&(c.data=yc(c.data,a),c.fullData=yc(c.fullData,a));b.state=f;return k};
p.getMetadata=function(){for(var a=[],b=0;b<this.m.length;b++){var c=Th(this.o,this.m,b);(c=Uh(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Ph(c.data),dts:c.dts,pts:c.pts})}return a};
p.ab=function(){if(this.i.length&&!this.h.length)for(var a=0;a<this.i.length;a++){var b=Th(this.l,this.i,a),c=Uh(this,b),d=this.h.length?this.h[this.h.length-1]:null;c&&c.pts!=null&&c.dts!=null&&(!d||d.pts!=c.pts&&d.dts!=c.dts)?this.h.push(c):this.h.length&&(b=c?c.data:b)&&(d=this.h[this.h.length-1],d.data=yc(d.data,b))}return this.h};
p.Dc=function(a){a=a===void 0?!0:a;if(this.j.length&&!this.g.length){for(var b=0;b<this.j.length;b++){var c=Th(this.D,this.j,b),d=Uh(this,c),e=this.g.length?this.g[this.g.length-1]:null;d&&d.pts!=null&&d.dts!=null&&(!e||e.pts!=d.pts&&e.dts!=d.dts)?this.g.push(d):this.g.length&&(c=d?d.data:c)&&(e=this.g[this.g.length-1],e.data=yc(e.data,c))}if(a){b={fd:null,state:null};e=[];c=r(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.Bf(d,b),d.nalus.length&&(e.push(d),b.fd=d.nalus[d.nalus.length-
1]);this.g=e}}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if(a=="audio"){a=null;var b=this.ab();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return a=="video"?(a=null,b=this.Dc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.Zc=function(){return{audio:this.G,video:this.C}};p.Wd=function(){for(var a=[],b=r(this.Dc()),c=b.next();!c.done;c=b.next())a.push.apply(a,G(c.value.nalus));return a};
p.ui=function(){vb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.nf();return{height:a.height,width:a.width}};p.nf=function(){return this.C=="hvc"?Wh(this):Xh(this)};function Yh(a){var b=a.Dc();return b.length>1&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(Math.abs(1/(b-a)*9E4)):null}
function Xh(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Wd();if(!c.length)return b;c=c.find(function(u){return u.type==7});if(!c)return b;c=new Ah(c.data);var d=Hh(c),e=Hh(c),f=Hh(c);Fh(c);if(Zh.includes(d)){var g=T(c);g===3&&Ch(c,1);Fh(c);Fh(c);Ch(c,1);if(V(c)){g=g!==3?8:12;for(var h=0;h<g;h++)V(c)&&(h<6?Ih(c,16):Ih(c,64))}}Fh(c);g=T(c);if(g===0)T(c);else if(g===1)for(Ch(c,1),Fh(c),Fh(c),g=T(c),h=0;h<g;h++)Fh(c);Fh(c);Ch(c,1);g=T(c);h=T(c);var k=Dh(c,1);k===0&&Ch(c,1);Ch(c,1);
var l=0,m=0,n=0,q=0;V(c)&&(l=T(c),m=T(c),n=T(c),q=T(c));b.height=String((2-k)*(h+1)*16-n*2-q*2);b.width=String((g+1)*16-l*2-m*2);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Yh(a);return b}
function Wh(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Wd();if(!c.length)return b;c=c.find(function(H){return H.type==33});if(!c)return b;var d=new Ah(c.fullData,!0);Hh(d);Hh(d);Dh(d,4);var e=Dh(d,3);V(d);var f=Dh(d,2),g=Dh(d,1),h=Dh(d,5),k=Dh(d,32);c=Hh(d);for(var l=Hh(d),m=Hh(d),n=Hh(d),q=Hh(d),u=Hh(d),t=Hh(d),v=[],w=[],x=0;x<e;x++)v.push(V(d)),w.push(V(d));if(e>0)for(x=e;x<8;x++)Dh(d,2);for(x=0;x<e;x++)v[x]&&Dh(d,88),w[x]&&Hh(d);T(d);e=T(d);e==3&&Dh(d,1);v=T(d);w=T(d);var y=
x=0,z=0,B=0;V(d)&&(x+=T(d),y+=T(d),z+=T(d),B+=T(d));b.width=String(v-(x+y)*(e===1||e===2?2:1));b.height=String(w-(z+B)*(e===1?2:1));d=function(H){for(var E=0,C=0;C<32;C++)E|=(H>>C&1)<<31-C;return E>>>0}(k);g=g==1?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+t;u&&(f+="."+u.toString(16).toUpperCase());q&&(f+="."+q.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Yh(a);return b}function Vh(a,b){var c=1;for(a>b&&(c=-1);Math.abs(b-a)>4294967296;)a+=c*8589934592;return a}function $h(a){return Sh(a)<0?!1:!0}function Sh(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}K("shaka.util.TsParser",Rh);Rh.syncOffset=Sh;Rh.probe=$h;Rh.prototype.getVideoInfo=Rh.prototype.nf;Rh.prototype.getVideoResolution=Rh.prototype.ui;
Rh.prototype.getVideoNalus=Rh.prototype.Wd;Rh.prototype.getCodecs=Rh.prototype.Zc;Rh.prototype.getStartTime=Rh.prototype.getStartTime;Rh.prototype.getVideoData=Rh.prototype.Dc;Rh.prototype.getAudioData=Rh.prototype.ab;Rh.prototype.getMetadata=Rh.prototype.getMetadata;Rh.prototype.parseNalus=Rh.prototype.Bf;Rh.prototype.parseAvcNalus=Rh.prototype.Ri;Rh.prototype.parse=Rh.prototype.parse;Rh.prototype.setDiscontinuitySequence=Rh.prototype.re;Rh.prototype.clearData=Rh.prototype.clearData;
Rh.Timescale=9E4;var Zh=[100,110,122,244,44,83,86,118,128,138,139,134];function ai(){this.g=null}ai.prototype.init=function(){};ai.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Rh;var b=[];a=Q(a);if(!$h(a))return b;a=this.g.parse(a);var c=a.Zc(),d=a.Wd();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=r(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&d.time!=null)for(var e=r(Zg(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
K("shaka.cea.TsCeaParser",ai);bd("video/mp2t",function(){return new ai});K("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});K("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});K("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function bi(){}K("shaka.dependencies",bi);bi.has=function(a){return ci.has(a)};bi.add=function(a,b){if(!di[a])throw Error(a+" is not supported");a==ni?vb("mux.js","mux.js is no longer used in Shaka Player."):ci.set(a,function(){return b})};var ni="muxjs",di={Cj:ni,ISOBoxer:"ISOBoxer"};bi.Allowed=di;var ci=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function oi(){}function pi(a,b){var c=document.createElement("source");c.src=a;c.type=b===void 0?"":b;return c}function qi(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 ri(a){for(;a.firstChild;)a.removeChild(a.firstChild)}
function Uc(){if(si)return si;ti||(ti=new Se(function(){si=null}));(si=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(si=document.createElement("video"));ti.ma(1);return si}
function ui(a,b){var c,d,e,f,g;return I(function(h){if(h.h==1)return"fonts"in document&&"FontFace"in window?h.g(document.fonts.ready,2):h.return();if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();m.done===!1;)l.push(m.value),m=k.next();return l};d=r(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&f.display==="swap")return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);h.j()})}
K("shaka.util.Dom",oi);oi.removeAllChildren=ri;oi.clearSourceFromVideo=qi;var ti=null,si=null;function vi(){this.j=new ob(function(){for(var a=navigator.userAgent.toLowerCase(),b=r([{type:"VR",Gf:/oculus|quest/},{type:"TV",Gf:/smart[ _]?tv|android ?tv/},{type:"MOBILE",Gf:/iphone|ipad|ipod|android/}]),c=b.next();!c.done;c=b.next())if(c=c.value,c.Gf.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.l=new ob(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 Tc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=vi.prototype;p.Hb=function(){return!!navigator.mediaCapabilities};p.Ma=function(){return this.j.value()};p.Aa=function(){return this.l.value()};p.Nc=function(){return!1};p.Hf=function(){return!1};
p.Zd=function(){return!1};p.Qg=function(){return!1};p.kd=function(){return!1};p.vc=function(){return!0};p.eb=function(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType};p.md=function(){return!0};p.Ug=function(){return 0};p.Mb=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.fh=function(){return!1};p.Nf=function(){return!1};
p.La=function(a){var b=this.Ma();if(b==="TV"||b==="CONSOLE"||b==="CAST")a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.Pg=function(){return[]};p.Cc=function(a){return window.matchMedia!==void 0&&(window.matchMedia("(color-gamut: p3)").matches||window.matchMedia("(dynamic-range: high)").matches)?a?"HLG":"PQ":"SDR"};p.jh=function(){return!1};p.Gg=function(){return!1};p.oe=function(){return!1};p.ve=function(){return!0};p.Hg=function(){return!1};
p.ih=function(){return!0};p.uc=function(){return!1};p.xf=function(a){return a==="com.apple.fps"};p.ue=function(){return!0};p.toString=function(){return"Device: "+this.pb()+" v"+this.ra()+"; Type: "+this.Ma()};function wi(){vi.call(this);this.g=new ob(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.h=new ob(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}pa(wi,vi);p=wi.prototype;p.ra=function(){return this.g.value()[0]};p.pb=function(){return"Apple Browser"};
p.Ma=function(){return this.h.value()};p.Aa=function(){return"WEBKIT"};p.Hb=function(){return!1};p.Nc=function(a,b){return!xi(this)&&b==="audio"};p.Zd=function(){return!xi(this)};p.Qg=function(a){return!xi(this)&&a==="audio"};p.La=function(a){vi.prototype.La.call(this,a);a.abr.minTimeToSwitch=.5;return a};p.jh=function(){return!0};p.ue=function(){return!1};function xi(a){a=a.g.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"))&&(sb=function(){return new wi});function yi(){if(!zi())throw Error("Not a Chromecast device!");vi.call(this);this.h=new ob(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.g=new ob(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?Ai:a.includes("fuchsia")?Bi:Ci})}pa(yi,vi);p=yi.prototype;p.ra=function(){return this.h.value()};p.pb=function(){return"Chromecast with "+this.g.value()};
p.Ma=function(){return"CAST"};p.Aa=function(){return"CHROMIUM"};p.Hb=function(){return vi.prototype.Hb.call(this)&&this.g.value()!==Ci};p.eb=function(){return vi.prototype.eb.call(this)&&this.g.value()!==Ci};p.Ug=function(){switch(this.g.value()){case Ai:return 0;case Bi:return 3;default:return 1}};
p.Mb=function(){var a,b,c,d,e;return I(function(f){switch(f.h){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};f.m(2);if(!(c=a)){f.u(4);break}return f.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.i;case 4:if(c){b.width=3840;b.height=2160;f.u(6);break}if(!(d=a)){f.u(7);break}return f.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:d=
f.i;case 7:d&&(b.width=1920,b.height=1080);case 6:f.o(3);break;case 2:e=f.l(),Xa("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};p.La=function(a){vi.prototype.La.call(this,a);a.streaming.stallSkip=0;return a};p.uc=function(){return!0};function zi(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var Ai="Android",Bi="Fuchsia",Ci="Linux";zi()&&(sb=function(){return new yi});function Di(){vi.call(this);var a=this;this.i=new ob(function(){var b=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return b?parseInt(b[2],10):null});this.g=new ob(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.h=new ob(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?
navigator.platform.toLowerCase().includes("win32"):!1});this.A=new ob(function(){return vi.prototype.eb.call(a)?navigator.userAgent.match(/Edge?\//)?!a.h.value():!0:!1});this.o=new ob(function(){return navigator.userAgent.includes("sony.hbbtv.tv")});this.m=new ob(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":navigator.userAgent.includes("Android")?!0:!1})}pa(Di,vi);p=Di.prototype;p.ra=function(){return this.i.value()};
p.pb=function(){return this.g.value()};p.Nc=function(a){return bc(a)?this.g.value()==="Edge"&&this.h.value():!1};p.Hf=function(){return this.g.value()==="Edge"&&this.h.value()};p.Zd=function(){return this.g.value()==="Edge"&&this.h.value()};p.eb=function(){return this.A.value()};
p.La=function(a){vi.prototype.La.call(this,a);if(this.h.value())switch(this.g.value()){case "Firefox":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case "Chrome":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}this.m.value()&&(a.drm.defaultAudioRobustnessForWidevine="",a.drm.defaultVideoRobustnessForWidevine="");
return a};p.oe=function(){return this.g.value()==="Edge"||this.o.value()};p.uc=function(){if(this.Aa()==="GECKO"){var a=this.ra();return a!==null?a>=100:vi.prototype.uc.call(this)}return vi.prototype.uc.call(this)};p.xf=function(a){return this.Aa()==="GECKO"?a.startsWith("com.microsoft.playready.recommendation"):vi.prototype.xf.call(this,a)};tb=function(){return new Di};function Ei(){vi.apply(this,arguments)}pa(Ei,vi);p=Ei.prototype;p.ra=function(){return null};p.pb=function(){return"Hisense"};p.Ma=function(){return"TV"};p.Hb=function(){return!1};p.eb=function(){return!1};p.Mb=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}b==null&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};
p.La=function(a){vi.prototype.La.call(this,a);a.streaming.stallSkip=0;return a};if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))sb=function(){return new Ei};function Fi(){vi.call(this);this.g=new ob(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}pa(Fi,vi);p=Fi.prototype;p.pb=function(){return"PlayStation"};p.Ma=function(){return"CONSOLE"};p.Aa=function(){return"WEBKIT"};p.ra=function(){return this.g.value()};p.Hb=function(){return!1};p.vc=function(){return!1};p.eb=function(){return!1};p.Nf=function(){return this.ra()===4};
p.Mb=function(){var a,b,c,d,e;return I(function(f){switch(f.h){case 1:return a={width:1920,height:1080},b=!1,f.m(2),f.g(window.msdk.device.getDisplayInfo(),4);case 4:c=f.i;b=c.resolution==="4K";f.o(3);break;case 2:return f.l(),f.m(5),f.g(window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.i;b=d.resolution==="4K";f.o(3);break;case 5:e=f.l(),Ya("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
p.La=function(a){vi.prototype.La.call(this,a);this.ra()===4&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};p.oe=function(){return this.ra()===4};p.ve=function(){return this.ra()!==4};navigator.userAgent.includes("PlayStation")&&(sb=function(){return new Fi});function Gi(){vi.call(this);var a=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=a?parseInt(a[1],10):null;this.h=a?parseInt(a[2],10):null}pa(Gi,vi);p=Gi.prototype;p.ra=function(){return this.g};p.pb=function(){return"Tizen"};p.Aa=function(){return"CHROMIUM"};p.Ma=function(){return"TV"};p.Nc=function(){return!0};p.kd=function(){return this.ra()===3};p.Hb=function(){return!1};p.vc=function(){var a=this.ra();return a!==null?a>=4:vi.prototype.vc.call(this)};p.eb=function(){return!1};
p.md=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:vi.prototype.md.call(this)};
p.Mb=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){Ya("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.La=function(a){vi.prototype.La.call(this,a);a.drm.ignoreDuplicateInitData=this.ra()!==2;this.ra()===3&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};p.Pg=function(){var a=[];this.g!==null&&this.g<5&&a.push("opus");return a};
p.Cc=function(a){try{if(webapis.avinfo.isHdrTvSupport())return a?"HLG":"PQ"}catch(b){return vi.prototype.Cc.call(this,a)}return"SDR"};p.Gg=function(){return!0};p.Hg=function(){return this.ra()===3};navigator.userAgent.includes("Tizen")&&(sb=function(){return new Gi});function Hi(){vi.apply(this,arguments)}pa(Hi,vi);Hi.prototype.ra=function(){return null};Hi.prototype.pb=function(){return"Vizio"};Hi.prototype.Ma=function(){return"TV"};Hi.prototype.Hb=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(sb=function(){return new Hi});function Ii(){vi.call(this);this.i=new ob(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")});this.h=new ob(function(){return navigator.userAgent.includes("SOPOpenBrowser")});this.g=new ob(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})}pa(Ii,vi);p=Ii.prototype;p.ra=function(){return this.g.value()};
p.pb=function(){return"WebKit STB"};p.Ma=function(){return"TV"};p.Aa=function(){return"WEBKIT"};p.Hb=function(){return!1};p.vc=function(){var a=this.g.value();return a!==null?a>=15:!0};p.Nc=function(){return this.h.value()};p.Mb=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.ve=function(){return!this.i.value()};p.ue=function(){return!1};
if(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))sb=function(){return new Ii};function Ji(){vi.call(this);var a=this;this.h=Ki();this.g=null;try{var b=new PalmServiceBridge;b.onservicecallback=function(c){c=JSON.parse(c);var d,e,f,g;a.g=(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){Ya("WebOS: getConfigs call failed",c)}}
pa(Ji,vi);p=Ji.prototype;p.ra=function(){return this.h};p.pb=function(){return"WebOS"};p.Ma=function(){return"TV"};p.Aa=function(){return"CHROMIUM"};p.Hb=function(){return!1};p.vc=function(){var a=this.ra();return a!==null?a>3:vi.prototype.vc.call(this)};p.eb=function(){return!1};p.md=function(){var a=this.ra();return a!==null?a>3:vi.prototype.md.call(this)};
p.Mb=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){Ya("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.La=function(a){vi.prototype.La.call(this,a);this.ra()===3&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};
p.Cc=function(a){return this.g==null?(Ya("WebOS: getConfigs call haven't finished"),vi.prototype.Cc.call(this,a)):this.g?a?"HLG":"PQ":"SDR"};function Ki(){var a=null,b=navigator.userAgent.match(/Chrome\/(\d+)/);b&&(a=parseInt(b[1],10));switch(a){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}p.ih=function(){return!1};p.uc=function(){var a=this.ra();return a!==null?a>=6:vi.prototype.uc.call(this)};
if(navigator.userAgent.includes("Web0S")){var Li=new Ji;sb=function(){return Li}};function Mi(){vi.call(this);this.g=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=a?parseInt(a[1],10):null}pa(Mi,vi);p=Mi.prototype;p.ra=function(){return this.h};p.pb=function(){return"Xbox"};p.Ma=function(){return"CONSOLE"};p.Aa=function(){return this.g?"EDGE":"CHROMIUM"};p.Nc=function(){return!0};p.Hf=function(){return!0};p.Zd=function(){return!0};p.fh=function(){return this.g};
p.Mb=function(){var a={width:1920,height:1080},b=Ni();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){Ya("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
p.La=function(a){vi.prototype.La.call(this,a);a.drm.parseInbandPsshEnabled=this.g;a.drm.preferredKeySystems.push("com.microsoft.playready");this.g&&(a.streaming.gapPadding=.01);return a};p.oe=function(){return!0};function Ni(){var a=null;try{a=typeof Windows!=="undefined"?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||Ni()!==null)sb=function(){return new Mi};function Oi(a,b){var c=Pi();this.l=a.maxAttempts==null?c.maxAttempts:a.maxAttempts;this.j=a.baseDelay==null?c.baseDelay:a.baseDelay;this.o=a.fuzzFactor==null?c.fuzzFactor:a.fuzzFactor;this.m=a.backoffFactor==null?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=b===void 0?!1:b)this.g=1}
function Qi(a){var b,c;return I(function(d){if(d.h==1){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new R(2,7,1010);b=a.g;a.g++;if(b==0)return d.return();c=a.h*(1+(Math.random()*2-1)*a.o);return d.g(new Promise(function(e){(new Se(e)).ma(c/1E3)}),2)}a.h*=a.m;d.j()})}function Pi(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ri(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ri.prototype.resolve=function(){};Ri.prototype.reject=function(){};function Si(a,b){this.promise=a;this.i=b;this.g=null}function Ti(a){return new Si(Promise.reject(a),function(){return Promise.resolve()})}function Ui(){var a=Promise.reject(new R(2,7,7001));a.catch(function(){});return new Si(a,function(){return Promise.resolve()})}function Vi(a){return new Si(Promise.resolve(a),function(){return Promise.resolve()})}function Wi(a){return new Si(a,function(){return a.catch(function(){})})}Si.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
Si.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};Si.prototype.wb=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Xi(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ri;f.catch(function(){});var g=new R(2,7,7001);this.promise.then(c(!0),c(!1));return new Si(f,function(){return d()})};
function Xi(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()}}}fa.Object.defineProperties(Si.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}});K("shaka.util.AbortableOperation",Si);Si.prototype.chain=Si.prototype.wb;Si.prototype["finally"]=Si.prototype.finally;
Si.all=function(a){return new Si(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})};Si.prototype.abort=Si.prototype.abort;Si.notAbortable=Wi;Si.completed=Vi;Si.aborted=Ui;Si.failed=Ti;function Yi(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
Yi.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Yi.prototype.stopImmediatePropagation=function(){this.g=!0};Yi.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",Yi);function Zi(){this.Oa=new ib;this.Zf=this}Zi.prototype.addEventListener=function(a,b){this.Oa&&this.Oa.push(a,b)};Zi.prototype.removeEventListener=function(a,b){this.Oa&&this.Oa.remove(a,b)};Zi.prototype.dispatchEvent=function(a){if(!this.Oa)return!0;var b=this.Oa.get(a.type)||[],c=this.Oa.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Zf;a.currentTarget=this.Zf;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
Zi.prototype.release=function(){this.Oa=null};function $i(){this.g=[]}function aj(a,b){a.g.push(b.finally(function(){eb(a.g,b)}))}$i.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function bj(a,b,c,d,e,f,g){Zi.call(this);this.i=null;this.j=!1;this.A=new $i;this.g=new Set;this.h=new Set;this.o=a||null;this.m=b||null;this.B=c||null;this.C=d||null;this.D=e||null;this.G=f||null;this.F=g||null;this.l=new Map}pa(bj,Zi);p=bj.prototype;p.configure=function(a){this.i=a};function cj(a,b,c,d){d=d===void 0?!1:d;c=c||dj;var e=ej.get(a);(!e||c>=e.priority)&&ej.set(a,{priority:c,ke:b,Si:d})}
function fj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=r(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.Vi=function(a){this.g.add(a)};p.mj=function(a){this.g.delete(a)};p.Ch=function(){this.g.clear()};p.Wi=function(a){this.h.add(a)};p.nj=function(a){this.h.delete(a)};p.Dh=function(){this.h.clear()};p.ig=function(){this.l.clear()};
function gj(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:c===void 0?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();Zi.prototype.release.call(this);return this.A.destroy()};
p.request=function(a,b,c){var d=this,e=new hj;if(this.j){var f=Promise.reject(new R(2,7,7001));f.catch(function(){});return new ij(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?qd(b.retryParameters):Pi();b.uris=qd(b.uris);f=jj(this,a,b,c);var g=f.wb(function(){return kj(d,a,b,c,new Oi(b.retryParameters,!1),0,null,e)}),h=g.wb(function(q){return lj(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.wb(function(q){var u=Date.now()-m,t=q.response;t.timeMs+=l;t.timeMs+=u;q.xi||!d.o||t.fromCache||b.method=="HEAD"||a!=mj||d.o(t.timeMs,t.data.byteLength,nj(c),b,c);d.F&&d.F(a,t,c);return t},function(q){q&&(q.severity=2);throw q;});f=new ij(n.promise,function(){return n.abort()},e);aj(this.A,f);return f};
function jj(a,b,c,d){function e(h){f=f.wb(function(){c.body&&(c.body=Rb(c.body));return h(b,c,d)})}var f=Vi(void 0);a.D&&e(a.D);a=r(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.wb(void 0,function(h){if(h instanceof R&&h.code==7001)throw h;throw new R(2,1,1006,h);})}
function kj(a,b,c,d,e,f,g,h){a.i.forceHTTP&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.i.forceHTTPS&&(c.uris[f]=c.uris[f].replace("http://","https://"));f>0&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new Ab(c.uris[f]),l=k.Gb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),Bb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=ej.get(l))?l.ke:null;if(!n)return Ti(new R(2,1,1E3,k));var q=l.Si;(k=a.l.get(k.gb))&&(c.headers["common-access-token"]=k);var u=null,t=null,v=!1,w=!1,x;return Wi(Qi(e)).wb(function(){if(a.j)return Ui();
x=Date.now();var y=0;c.requestStartTime=Date.now();var z=n(c.uris[f],c,b,function(E,C,A){u&&u.stop();t&&t.ma(H/1E3);a.o&&b==mj&&(y++,c.packetNumber=y,a.o(E,C,nj(d),c,d),m=!0,h.g=A)},function(E){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.m&&a.m(E,c,b)},{minBytesForProgressEvents:a.i.minBytesForProgressEvents});if(!q)return z;var B=c.retryParameters.connectionTimeout;B&&(u=new Se(function(){v=!0;z.abort()}),u.ma(B/1E3));var H=c.retryParameters.stallTimeout;H&&(t=new Se(function(){v=!0;z.abort()}));
return z}).wb(function(y){u&&u.stop();t&&t.stop();y.timeMs==void 0&&(y.timeMs=Date.now()-x);var z=y.headers["common-access-token"];if(z){var B=new Ab(y.uri);a.l.set(B.gb,z)}z={response:y,xi:m};!w&&a.m&&a.m(y.headers,c,b);a.B&&a.B(c,y);return z},function(y){u&&u.stop();t&&t.stop();if(a.C){var z=null,B=0;y instanceof R&&(z=y,y.code==1001&&(B=y.data[1]));a.C(c,z,B,v)}if(a.j)return Ui();v&&(y=new R(1,1,1003,c.uris[f],b));if(y instanceof R){if(y.code==7001)throw y;if(y.code==1010)throw g;if(y.severity==
1){z=(new Map).set("error",y);z=new Yi("retry",z);z.cancelable=!0;a.dispatchEvent(z);if(z.defaultPrevented)throw y;f=(f+1)%c.uris.length;return kj(a,b,c,d,e,f,y,h)}}throw y;})}
function lj(a,b,c,d){var e=Vi(void 0);a=r(a.h);for(var f=a.next(),g={};!f.done;g={Rg:void 0},f=a.next())g.Rg=f.value,e=e.wb(function(h){return function(){var k=c.response;k.data&&(k.data=Rb(k.data));return(0,h.Rg)(b,k,d)}}(g));return e.wb(function(){return c},function(h){var k=2;if(h instanceof R){if(h.code==7001)throw h;k=h.severity}throw new R(k,1,1007,h);})}function nj(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.mc)return!1}return!0}K("shaka.net.NetworkingEngine",bj);
bj.prototype.request=bj.prototype.request;bj.prototype.destroy=bj.prototype.destroy;bj.makeRequest=gj;bj.defaultRetryParameters=function(){return Pi()};bj.prototype.clearCommonAccessTokenMap=bj.prototype.ig;bj.prototype.clearAllResponseFilters=bj.prototype.Dh;bj.prototype.unregisterResponseFilter=bj.prototype.nj;bj.prototype.registerResponseFilter=bj.prototype.Wi;bj.prototype.clearAllRequestFilters=bj.prototype.Ch;bj.prototype.unregisterRequestFilter=bj.prototype.mj;
bj.prototype.registerRequestFilter=bj.prototype.Vi;bj.unregisterScheme=function(a){ej.delete(a)};bj.registerScheme=cj;bj.prototype.configure=bj.prototype.configure;function hj(){this.g=0}bj.NumBytesRemainingClass=hj;function ij(a,b,c){Si.call(this,a,b);this.h=c}pa(ij,Si);bj.PendingRequest=ij;var mj=1;bj.RequestType={MANIFEST:0,SEGMENT:mj,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9};
bj.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var dj=3;bj.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:dj};var ej=new Map;function oj(a){this.g=!1;this.h=new Ri;this.i=a}oj.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function pj(a,b){if(a.g){if(b instanceof R&&b.code==7003)throw b;throw new R(2,7,7003,b);}};function qj(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function rj(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function sj(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function tj(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function uj(a){var b=this;this.g=[];this.data=[];(new $g).boxes(["moov","moof"],eh).ea("pssh",function(c){if(!(c.version>1)){var d=Q(c.reader.h,-12,c.size);b.data.push(d);c=c.reader.sb(16,!1);b.g.push(xc(c))}}).parse(a)};function vj(a){var b=this;this.D=a;this.j=this.B=null;this.O=!1;this.J=0;this.g=null;this.o=new jb;this.i=new Map;this.U=[];this.C=new Map;this.K=!1;this.l=new Ri;this.h=null;this.A=function(c){c.severity==2&&b.l.reject(c);a.onError(c)};this.Y=new Map;this.ka=new Map;this.L=new Se(function(){return wj(b)});this.ha=!1;this.M=[];this.na=!1;this.F=new Se(function(){xj(b)});this.l.catch(function(){});this.m=new oj(function(){return yj(b)});this.$=!1;this.G=this.I=null;this.R=function(){return!1}}p=vj.prototype;
p.destroy=function(){return this.m.destroy()};function yj(a){var b;return I(function(c){switch(c.h){case 1:return a.o.release(),a.o=null,a.l.reject(),a.F.stop(),a.F=null,a.L.stop(),a.L=null,c.g(zj(a),2);case 2:if(!a.j){c.u(3);break}c.m(4);return c.g(a.j.setMediaKeys(null),6);case 6:c.o(5);break;case 4:b=c.l(),Ya("DrmEngine.destroyNow_ exception",b);case 5:a.j=null;case 3:a.g=null,a.B=null,a.C=new Map,a.h=null,a.A=function(){},a.D=null,a.$=!1,a.I=null,c.j()}})}
p.configure=function(a,b){this.h=a;b&&(this.R=b);this.F&&this.O&&this.g&&this.F.Da(this.h.updateExpirationTime)};function Aj(a,b,c,d){d=d===void 0?!0:d;a.C=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next())a.C.set(e.value,{initData:null,initDataType:null});c=r(a.h.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.C.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.ha=a.C.size>0;return Bj(a,b,d)}
function Bj(a,b,c){var d,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y,z,B;return I(function(H){if(H.h==1){Cj(a.h.clearKeys,b);d=b.some(function(E){return E.video&&E.video.drmInfos.length||E.audio&&E.audio.drmInfos.length?!0:!1});e=sj(a.h.servers);f=sj(a.h.advanced||{});!d&&c&&Dj(b,e);g=new WeakSet;h=r(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Ej(l),n=r(m),q=n.next();!q.done;q=n.next())u=q.value,g.has(u)||(g.add(u),Fj(u,e,f,a.h.keySystemsMapping));t=function(E,C){var A=[];E=r(E);for(var F=E.next();!F.done;F=
E.next()){F=F.value;var D=F[C]||f.has(F.keySystem)&&f.get(F.keySystem)[C]||"";D==""&&ac(F.keySystem)&&(C=="audioRobustness"?D=[a.h.defaultAudioRobustnessForWidevine]:C=="videoRobustness"&&(D=[a.h.defaultVideoRobustnessForWidevine]));if(typeof D==="string")A.push(F);else if(Array.isArray(D)){D.length===0&&(D=[""]);D=r(D);for(var J=D.next();!J.done;J=D.next()){var L={};A.push(Object.assign({},F,(L[C]=J.value,L)))}}}return A};v=new WeakSet;w=r(b);for(x=w.next();!x.done;x=w.next())y=x.value,y.video&&
!v.has(y.video)&&(y.video.drmInfos=t(y.video.drmInfos,"videoRobustness"),y.video.drmInfos=t(y.video.drmInfos,"audioRobustness"),v.add(y.video)),y.audio&&!v.has(y.audio)&&(y.audio.drmInfos=t(y.audio.drmInfos,"videoRobustness"),y.audio.drmInfos=t(y.audio.drmInfos,"audioRobustness"),v.add(y.audio));return H.g(sf(b,a.ha,a.$,a.h.preferredKeySystems),2)}pj(a.m);z=d||e.size>0;if(!z)return a.O=!0,H.return(Promise.resolve());B=Gj(a,b);return H.return(d?B:B.catch(function(){}))})}
function Hj(a){var b;return I(function(c){switch(c.h){case 1:if(a.j.mediaKeys)return c.return();if(!a.I){c.u(2);break}return c.g(a.I,3);case 3:return pj(a.m),c.return();case 2:return c.m(4),a.I=a.j.setMediaKeys(a.B),c.g(a.I,6);case 6:c.o(5);break;case 4:b=c.l(),a.A(new R(2,6,6003,b.message));case 5:pj(a.m),c.j()}})}function Ij(a,b){return I(function(c){if(c.h==1)return c.g(Hj(a),2);Jj(a,b.initDataType,Q(b.initData));c.j()})}
p.Kb=function(a){var b=this,c,d;return I(function(e){if(e.h==1){if(b.j===a)return e.return();if(!b.B)return b.o.Na(a,"encrypted",function(){b.A(new R(2,6,6010))}),e.return();b.j=a;b.h.delayLicenseRequestUntilPlayed&&b.o.Na(b.j,"play",function(){for(var f=r(b.M),g=f.next();!g.done;g=f.next())Kj(b,g.value);b.na=!0;b.M=[]});b.j.remote?(b.o.H(b.j.remote,"connect",function(){return zj(b)}),b.o.H(b.j.remote,"connecting",function(){return zj(b)}),b.o.H(b.j.remote,"disconnect",function(){return zj(b)})):
"webkitCurrentPlaybackTargetIsWireless"in b.j&&b.o.H(b.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return zj(b)});b.G=b.g?b.g.initData.find(function(f){return f.initData.length>0})||null:null;c=b.g.keySystem;return(d=qb().xf(c))||!b.G&&b.g.keySystem==="com.apple.fps"&&!b.C.size?e.u(2):e.g(Hj(b),2)}Lj(b).catch(function(){});!d&&(b.G||b.C.size||b.h.parseInbandPsshEnabled)||b.o.H(b.j,"encrypted",function(f){return Ij(b,f)});e.j()})};
function Mj(a){var b,c,d,e,f;return I(function(g){switch(g.h){case 1:if(!a.B||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=gj([a.g.serverCertificateUri],a.h.retryParameters);g.m(3);c=a.D.lc.request(5,b,{isPreload:a.R()});return g.g(c.promise,5);case 5:d=g.i;a.g.serverCertificate=Q(d.data);g.o(4);break;case 3:throw e=g.l(),new R(2,6,6017,e);case 4:if(a.m.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
g.m(6);return g.g(a.B.setServerCertificate(a.g.serverCertificate),8);case 8:g.o(0);break;case 6:throw f=g.l(),new R(2,6,6004,f.message);}})}
function Lj(a){var b,c,d,e,f;return I(function(g){if(g.h==1){if(!a.C.size)return g.u(2);a.C.forEach(function(h,k){Nj(a,k,h)});return g.g(a.l,3)}if(g.h!=2){b=a.g&&a.g.keyIds||new Set([]);if(b.size>0&&Oj(a))return g.return(a.l);a.K=!1;a.l=new Ri;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=r(c);for(e=d.next();!e.done;e=d.next())f=e.value,Jj(a,f.initDataType,f.initData);Pj(a)&&a.l.resolve();return g.return(a.l)})}
function Jj(a,b,c){if(c.length){try{c=a.h.initDataTransform(c,b,a.g)}catch(g){b=g;g instanceof R||(b=new R(2,6,6016,g));a.A(b);return}if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Qb(c,e.value.initData))return;var f=!1;a.C.forEach(function(g){!f&&Qb(c,g.initData)&&(f=!0)});if(f)return}a.K=!0;a.i.size>0&&Pj(a)&&(a.l.resolve(),a.K=!1,a.l=new Ri,a.l.catch(function(){}));Qj(a,b,c,a.g.sessionType)}}
p.gf=function(){var a=this,b=this.i.keys();b=qj(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.hf=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};function Rj(a){return a.J?a.J:NaN}p.Td=function(){return tj(this.ka)};
function Gj(a,b){var c,d,e,f,g,h,k;return I(function(l){switch(l.h){case 1:c=new Map;d=Sj(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new R(2,6,6020);throw new R(2,6,6001);}pj(a.m);l.m(2);d.getConfiguration();e=a.h.keySystemsMapping[d.keySystem]||d.keySystem;a.g=Tj(a,e,c.get(e));if(!a.g.licenseServerUri)throw new R(2,6,6012,a.g.keySystem);return l.g(d.createMediaKeys(),4);case 4:f=l.i;pj(a.m);a.B=f;if(!(a.h.minHdcpVersion!=""&&"getStatusForPolicy"in a.B)){l.u(5);break}l.m(6);return l.g(a.B.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
8);case 8:g=l.i;if(g!="usable")throw new R(2,6,6018);pj(a.m);l.o(5,2);break;case 6:h=l.l(2);if(h instanceof R)throw h;throw new R(2,6,6019,h.message);case 5:return a.O=!0,a.F.Da(a.h.updateExpirationTime),l.g(Mj(a),9);case 9:pj(a.m);l.o(0);break;case 2:k=l.l();pj(a.m,k);a.g=null;if(k instanceof R)throw k;throw new R(2,6,6002,k.message);}})}
function Sj(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){e=r(Ej(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(c.size==1&&c.has(""))throw new R(2,6,6E3);d=a.h.preferredKeySystems;d.length||(e=sj(a.h.servers),e.size==1&&(d=Array.from(e.keys())));e=r(d);var g=e.next();for(f={};!g.done;f={Og:void 0},g=e.next()){f.Og=g.value;g=r(b);for(var h=g.next();!h.done;h=g.next())if(h=h.value.decodingInfos.find(function(n){return function(q){return q.supported&&
q.keySystemAccess!=null&&q.keySystemAccess.keySystem==n.Og}}(f)))return h.keySystemAccess}e=r([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=r(b),h=g.next();!h.done;h=g.next()){h=r(h.value.decodingInfos);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.supported&&k.keySystemAccess){var l=k.keySystemAccess.keySystem;if(!d.includes(l)){var m=c.get(l);!m&&a.h.keySystemsMapping[l]&&(m=c.get(a.h.keySystemsMapping[l]));l=r(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
f)return k.keySystemAccess}}}return null}function Uj(a){Pj(a)&&a.l.resolve()}function Vj(a,b){(new Se(function(){b.loaded=!0;Uj(a)})).ma(Wj)}
function Nj(a,b,c){var d,e,f,g,h,k,l;I(function(m){switch(m.h){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new R(2,6,6005,n.message),a.A(e),m.return(Promise.reject(e))}a.o.H(d,"message",function(n){Xj(a)?a.M.push(n):Kj(a,n)});a.o.H(d,"keystatuseschange",function(n){return Yj(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,zf:Infinity,Jb:null,type:"persistent-license"};a.i.set(d,f);m.m(2);return m.g(d.load(b),4);case 4:return g=m.i,pj(a.m),g||(a.i.delete(d),
h=a.h.persistentSessionOnlinePlayback?1:2,a.A(new R(h,6,6013)),f.loaded=!0),Vj(a,f),Uj(a),m.return(d);case 2:k=m.l(),pj(a.m,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.A(new R(l,6,6005,k.message)),f.loaded=!0,Uj(a);case 3:return m.return(Promise.resolve())}})}
function Qj(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.A(new R(2,6,6005,f.message));return}a.o.H(e,"message",function(f){Xj(a)?a.M.push(f):Kj(a,f)});a.o.H(e,"keystatuseschange",function(f){return Yj(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,zf:Infinity,Jb:null,type:d});a.h.logLicenseExchange&&uc(c);e.generateRequest(b,c).catch(function(f){if(!a.m.g){a.i.delete(e);var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;h<0&&(h+=4294967296);h="0x"+h.toString(16)}a.A(new R(2,6,6006,
f.message,f,h))}})}function Xj(a){return a.j?a.h.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.na:a.h.delayLicenseRequestUntilPlayed}function Zj(a){return I(function(b){return b.h==1?!a.K||Xj(a)?b.u(0):b.g(a.l,3):b.g(Promise.all(a.U.map(function(c){return c.promise})),0)})}
function Kj(a,b){var c,d,e,f,g,h,k,l,m,n,q,u,t,v,w,x;I(function(y){switch(y.h){case 1:c=b.target;a.h.logLicenseExchange&&uc(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];b.messageType=="individualization-request"&&f&&f.individualizationServer&&(e=f.individualizationServer);g=gj([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&
f.headers)for(h in f.headers)g.headers[h]=f.headers[h];if(Zb(a.g.keySystem)){var z=g,B=a.g;try{var H=mc(z.body);if(H){var E=JSON.parse(H);E.type||(E.type=B.sessionType,z.body=nc(JSON.stringify(E)))}}catch(C){}}if(bc(a.g.keySystem))if(z=kc(g.body,!0,!0),z.includes("PlayReadyKeyMessage")){z=td(z,"PlayReadyKeyMessage");B=Ad(z,"HttpHeader");B=r(B);for(H=B.next();!H.done;H=B.next())E=H.value,H=Ad(E,"name")[0],E=Ad(E,"value")[0],g.headers[zd(H)]=zd(E);z=Ad(z,"Challenge")[0];g.body=vc(zd(z))}else g.headers["Content-Type"]=
"text/xml; charset=utf-8";k=Date.now();y.m(2);m=a.D.lc.request(2,g,{isPreload:a.R()});a.U.push(m);return y.g(m.promise,4);case 4:l=y.i;eb(a.U,m);y.o(3);break;case 2:n=y.l();if(a.m.g)return y.return();q={sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType};u=new R(2,6,6007,n,q);a.i.size==1?(a.A(u),d&&d.Jb&&d.Jb.reject(u)):(d&&d.Jb&&d.Jb.reject(u),a.i.delete(c),Pj(a)&&(a.l.resolve(),a.L.ma(.1)));return y.return();case 3:if(a.m.g)return y.return();a.J+=(Date.now()-
k)/1E3;a.h.logLicenseExchange&&uc(l.data);y.m(5);return y.g(c.update(l.data),7);case 7:y.o(6);break;case 5:return v=(t=y.l())&&t.message||String(t),w=new R(2,6,6008,v),a.A(w),d&&d.Jb&&d.Jb.reject(w),y.return();case 6:if(a.m.g)return y.return();x=new Yi("drmsessionupdate");a.D.onEvent(x);d&&(d.Jb&&d.Jb.resolve(),Vj(a,d));y.j()}})}
function Yj(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if(typeof g=="string"){var h=g;g=f;f=h}h=qb();if(bc(a.g.keySystem)&&g.byteLength==16&&h.oe()){h=Ub(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}f!="status-pending"&&(c.loaded=!0);f=="expired"&&(d=!0);g=xc(g).slice(0,32);a.Y.set(g,f)});var e=b.expiration-Date.now();(e<0||d&&e<1E3)&&c&&!c.Jb&&(a.i.delete(b),ak(b));Pj(a)&&(a.l.resolve(),
a.L.ma(bk))}function wj(a){var b=a.Y,c=a.ka;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return d=="expired"})&&a.A(new R(2,6,6014));a.D.Lg(tj(c))}
function ck(){var a,b,c,d,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y,z,B,H,E,C,A,F,D,J,L;return I(function(P){if(P.h==1){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&
window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b={};c=r(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return P.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];
m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};q=[null,"cenc","cbcs"];u=new Map;t=qb();v=function(O,N,M){var S,U,da,aa,Ka,ua,qa,xa,ka,La,za,Na,Oa;return I(function(la){switch(la.h){case 1:return la.m(2),la.g(N.createMediaKeys(),5);case 5:S=la.i;case 4:la.o(3);break;case 2:return la.l(),la.return();case 3:da=(U=N.getConfiguration().sessionTypes)?U.includes("persistent-license"):
!1;t.Hg()&&(da=!1);aa=N.getConfiguration().videoCapabilities;Ka=N.getConfiguration().audioCapabilities;ua={persistentState:da,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};u.get(O)?ua=u.get(O):u.set(O,ua);(qa=aa[0].encryptionScheme)&&!ua.encryptionSchemes.includes(qa)&&ua.encryptionSchemes.push(qa);(xa=aa[0].robustness)&&!ua.videoRobustnessLevels.includes(xa)&&ua.videoRobustnessLevels.push(xa);(ka=Ka[0].robustness)&&!ua.audioRobustnessLevels.includes(ka)&&
ua.audioRobustnessLevels.push(ka);if(!(M&&"getStatusForPolicy"in S)){la.u(0);break}La=r(f);za=La.next();case 7:if(za.done){la.u(0);break}Na=za.value;if(ua.minHdcpVersions.includes(Na)){la.u(8);break}return la.g(S.getStatusForPolicy({minHdcpVersion:Na}),10);case 10:if(Oa=la.i,Oa=="usable")ua.minHdcpVersions.includes(Na)||ua.minHdcpVersions.push(Na);else{la.u(0);break}case 8:za=La.next(),la.u(7)}})};w=function(O,N,M,S,U){U=U===void 0?!1:U;var da,aa,Ka,ua,qa,xa,ka,La,za,Na,Oa;return I(function(la){switch(la.h){case 1:la.m(2);
da=qd(n);aa=r(da.videoCapabilities);for(Ka=aa.next();!Ka.done;Ka=aa.next())ua=Ka.value,ua.encryptionScheme=N,ua.robustness=M;qa=r(da.audioCapabilities);for(xa=qa.next();!xa.done;xa=qa.next())ka=xa.value,ka.encryptionScheme=N,ka.robustness=S;La=qd(da);La.persistentState="required";La.sessionTypes=["persistent-license"];za=[La,da];Oa=qb();return Oa.Ma()=="MOBILE"?la.g(Ye(5,navigator.requestMediaKeySystemAccess(O,za)),7):la.g(navigator.requestMediaKeySystemAccess(O,za),6);case 6:Na=la.i;la.u(5);break;
case 7:Na=la.i;case 5:return la.g(v(O,Na,U),8);case 8:la.o(0);break;case 2:la.l(),la.j()}})};x=function(O){return qb().Aa()==="WEBKIT"&&Zb(O)?!1:!0};y=[];z=r(a);for(B=z.next();!B.done;B=z.next())if(H=B.value,u.set(H,null),x(H)){E=!0;C=r(q);for(A=C.next();!A.done;A=C.next())F=A.value,y.push(w(H,F,"","",E)),E=!1;D=r(k[H]||[]);for(J=D.next();!J.done;J=D.next())L=J.value,y.push(w(H,null,L,"")),y.push(w(H,null,"",L))}return P.g(Promise.all(y),2)}return P.return(tj(u))})}
function ak(a){return I(function(b){if(b.h==1)return b.m(2),b.g(Ye(dk,Promise.all([a.close().catch(function(){}),a.closed])),4);if(b.h!=2)return b.o(0);b.l();b.j()})}
function zj(a){var b;return I(function(c){b=Array.from(a.i.entries());a.i.clear();return c.g(Promise.all(b.map(function(d){d=r(d);var e=d.next().value;var f=d.next().value;return I(function(g){if(g.h==1)return g.m(2),a.C.has(e.sessionId)||f.type!=="persistent-license"||a.h.persistentSessionOnlinePlayback?g.g(ak(e),5):g.g(e.remove(),5);if(g.h!=2)return g.o(0);g.l();g.j()})})),0)})}function Ej(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function xj(a){a.i.forEach(function(b,c){var d=b.zf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.zf=e)})}function Pj(a){a=a.i.values();return rj(a,function(b){return b.loaded})}function Oj(a){for(var b=r(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if(a.Y.get(c.value)!=="usable")return!1;return!0}
function Dj(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=r(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
function Tj(a,b,c){var d=[],e=[],f=[],g=[],h=[],k=new Set,l=new Set;ek(c,d,e,g,f,h,k,l);a=a.ha?"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=r(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 ek(a,b,c,d,e,f,g,h){var k=[];a=r(a);for(var l=a.next(),m={};!l.done;m={Ea:void 0},l=a.next()){m.Ea=l.value;b.includes(m.Ea.encryptionScheme)||b.push(m.Ea.encryptionScheme);Zb(m.Ea.keySystem)&&m.Ea.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ea.licenseServerUri)||k.push(m.Ea.licenseServerUri):c.includes(m.Ea.licenseServerUri)||c.push(m.Ea.licenseServerUri);e.includes(m.Ea.serverCertificateUri)||e.push(m.Ea.serverCertificateUri);m.Ea.serverCertificate&&(d.some(function(u){return function(t){return Qb(t,
u.Ea.serverCertificate)}}(m))||d.push(m.Ea.serverCertificate));if(m.Ea.initData){l=r(m.Ea.initData);for(var n=l.next(),q={};!n.done;q={pf:void 0},n=l.next())q.pf=n.value,f.some(function(u){return function(t){var v=u.pf;return t.keyId&&t.keyId==v.keyId?!0:t.initDataType==v.initDataType&&Qb(t.initData,v.initData)}}(q))||f.push(q.pf)}if(m.Ea.keyIds)for(l=r(m.Ea.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ea.keySystemUris&&h)for(m=r(m.Ea.keySystemUris),l=m.next();!l.done;l=m.next())h.add(l.value)}if(k.length==
1)c.push(k[0]);else if(k.length>0){b=[];k=r(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,G(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
function Fj(a,b,c,d){var e=a.keySystem;if(e&&(!Zb(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 Cj(a,b){a=sj(a);if(a.size!=0){a=Cc(a);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var dk=1,Wj=5,bk=.5;function fk(){}function gk(a){a=mc(a);return(new Ab(a)).gb}function hk(a,b,c){function d(h){Ub(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Q(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new R(2,6,6015);var e;typeof b=="string"?e=oc(b,!0):e=b;a=mc(a);a=oc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function ik(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=mc(a).split("skd://").pop();return hk(a,c,b)}
function jk(a,b){a===2&&(a=b.drmInfo)&&cc(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}K("shaka.drm.FairPlay",fk);
fk.commonFairPlayResponse=function(a,b){if(a===2&&(a=b.originalRequest.drmInfo)&&cc(a.keySystem)){try{var c=jc(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=Rb(vc(c)))}};fk.muxFairPlayRequest=function(a,b){jk(a,b)};
fk.expressplayFairPlayRequest=function(a,b){if(a===2){var c=b.drmInfo;c&&cc(c.keySystem)&&jk(a,b)}};fk.conaxFairPlayRequest=function(a,b){jk(a,b)};fk.ezdrmFairPlayRequest=function(a,b){jk(a,b)};fk.verimatrixFairPlayRequest=function(a,b){a===2&&(a=b.drmInfo)&&cc(a.keySystem)&&(a=Q(b.body),a=uc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=nc("spc="+a))};fk.muxInitDataTransform=function(a,b,c){return ik(a,b,c)};
fk.expressplayInitDataTransform=function(a,b,c){return ik(a,b,c)};fk.conaxInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=mc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(c.length*2);d=Tb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return hk(a,d,b)};fk.ezdrmInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=mc(a).split(";").pop();return hk(a,c,b)};
fk.verimatrixInitDataTransform=function(a,b,c){return ik(a,b,c)};fk.initDataTransform=hk;fk.defaultGetContentId=gk;fk.isFairPlaySupported=function(){var a;return I(function(b){if(b.h==1)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},b.m(2),b.g(navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(b.h!=2)return b.return(!0);b.l();return b.return(!1)})};function kk(a){var b=0,c=Ub(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=Q(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function lk(a){a=vc(zd(a));a=kk(a).filter(function(b){return b.type===mk})[0];if(!a)return null;a=kc(a.value,!0);return(a=td(a,"WRMHEADER"))?a:null}var mk=1;function nk(a,b,c){this.type=a;this.V=b;this.segments=c||null}function ok(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=d===void 0?null:d}ok.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 pk(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function qk(a,b){return a.attributes.find(function(c){return c.name===b})||null}function W(a,b,c){return(a=qk(a,b))?a.value:c||null}function rk(a,b){a=qk(a,b);if(!a)throw new R(2,4,4023,b);return a.value}function sk(a,b,c){c=c===void 0?[]:c;this.V=b;this.h=a;this.g=c}function tk(a,b){this.name=a;this.value=b};function uk(a,b){return a.filter(function(c){return c.name==b})}function vk(a,b){return a.filter(function(c){return rk(c,"TYPE")==b})}function wk(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function xk(a,b,c){c=c===void 0?0:c;return(a=wk(a,b))?Number(a.value):c}function yk(a,b,c){return b?zk(a,[b],c):[]}function zk(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return Ak(e,c)}));return Ac(a,d)}
function Ak(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new R(2,4,4039,e);}}return a}function Bk(a){a=a.value;var b=a.indexOf(",");return Number(b===-1?a:a.substring(0,b))};function Ck(){this.g=0}
function Dk(a,b){var c=jc(b).trim().split(/[\r\n]+/);if(!c[0].startsWith("#EXTM3U"))throw new R(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=Ek(a,h);d||(Fk.has(h.name)?(b=1,d=!0):h.name=="EXT-X-STREAM-INF"||h.name=="EXT-X-MEDIA"?d=!0:Gk.has(h.name)&&(b=1,d=!0));if(Gk.has(h.name)){if(b!=1)throw new R(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=Ek(f,m),Fk.has(m.name)?e.push(m):m.name=="EXT-X-MAP"?k=m:m.name=="EXT-X-PART"?l.push(m):m.name=="EXT-X-PRELOAD-HINT"?W(m,"TYPE")=="PART"?l.push(m):W(m,"TYPE")=="MAP"&&(m.name="EXT-X-MAP",k=m):h.push(m);else if(!m.startsWith("#")||m.startsWith("#EXT"))m=m.trim(),k&&h.push(k),h=new sk(m,h,l),d<a.length?a[d++]=h:(a.push(h),d++),h=[],l=[]}l.length&&(k&&h.push(k),c=new sk("",h,l),d<a.length?a[d++]=c:(a.push(c),d++));return new nk(b,e,d<a.length?a.slice(0,d):a)}e.push(h);
h.name=="EXT-X-STREAM-INF"&&(h.attributes.push(new tk("URI",k)),f=!0)}}return new nk(b,e)}
function Ek(a,b){a=a.g++;var c=b.indexOf(":"),d=c===-1?b.substring(1):b.substring(1,c);if(!d.startsWith("EXT"))throw new R(2,4,4016,b);b=c===-1?null:b.substring(c+1);if(b===null)a=new ok(a,d,[]);else if(b.indexOf("=")===-1)a=new ok(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 tk(g,h))}a=new ok(a,d,c,e)}return a}var Fk=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(" ")),Gk=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 Hk(a,b,c,d,e,f,g,h){this.N=a;this.startByte=b;this.endByte=c;this.Hc=d===void 0?null:d;this.timescale=e===void 0?null:e;this.h=f===void 0?null:f;this.aesKey=g===void 0?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=h===void 0?!1:h}Hk.prototype.Zb=function(){return this.startByte};Hk.prototype.Yb=function(){return this.endByte};Hk.prototype.ld=function(a){this.h=a};Hk.prototype.hc=function(){return this.h};
function Ik(a,b){return a===b?!0:a&&b?a.Zb()==b.Zb()&&a.Yb()==b.Yb()&&hb(a.N().sort(),b.N().sort())&&Qb(a.hc(),b.hc()):a==b}K("shaka.media.InitSegmentReference",Hk);Hk.prototype.getEndByte=Hk.prototype.Yb;Hk.prototype.getStartByte=Hk.prototype.Zb;
function X(a,b,c,d,e,f,g,h,k,l,m,n,q,u,t,v){l=l===void 0?[]:l;u=u===void 0?Jk:u;this.startTime=a;this.l=this.endTime=b;this.G=c;this.startByte=d;this.endByte=e;this.Z=f;this.m=g;this.F=h;this.D=k;this.g=l;this.tilesLayout=m===void 0?"":m;this.C=n===void 0?null:n;this.h=q===void 0?null:q;this.status=u;this.preload=!1;this.j=!0;this.A=!1;this.aesKey=t===void 0?null:t;this.thumbnailSprite=null;this.i=-1;this.o=v===void 0?!1:v;this.ed=this.mc=!1;a=r(this.g);for(b=a.next();!b.done;b=a.next())b.value.Fg();
this.o&&this.g.length&&this.g[this.g.length-1].Dg();this.B=this.bandwidth=this.mimeType=this.codecs=null;this.I=!1}p=X.prototype;p.N=function(){return this.G()};p.getStartTime=function(){return this.startTime};p.Sh=function(){return this.endTime};p.Zb=function(){return this.startByte};p.Yb=function(){return this.endByte};
function Kk(a){if(a.endByte)return a.endByte+1-a.startByte;if(a.bandwidth){var b=a.bandwidth*(a.endTime-a.startTime);if(!isNaN(b)&&b>0)return b}if(a.g.length>0&&a.o)for(a=r(a.g),a=a.next();!a.done;a=a.next()){Kk(a.value);break}return null}p.si=function(){return this.tilesLayout};p.ri=function(){return this.C};p.Bb=function(){return this.status};p.Ii=function(){this.status=Lk};p.vf=function(){this.preload=!0};p.isPreload=function(){return this.preload};p.Eg=function(){this.j=!1};p.Ci=function(){return this.j};
p.Fg=function(){this.mc=!0};p.Ei=function(){return this.mc};p.Dg=function(){this.ed=!0};p.Di=function(){return this.ed};p.Cg=function(){this.A=!0};p.zi=function(){return this.A};p.dh=function(a){this.thumbnailSprite=a};p.oi=function(){return this.thumbnailSprite};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.l+=a;for(var b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.l+=a};
p.Qf=function(a){this.h==null?Xa("Sync attempted without sync time!"):(a=this.h-a-this.startTime,Math.abs(a)>=.001&&this.offset(a))};p.ld=function(a,b){this.B=a;this.I=b===void 0?!1:b};p.hc=function(a){var b=this.B;(a===void 0||a)&&this.I&&(this.B=null);return b};K("shaka.media.SegmentReference",X);X.prototype.getSegmentData=X.prototype.hc;X.prototype.setSegmentData=X.prototype.ld;X.prototype.syncAgainst=X.prototype.Qf;X.prototype.offset=X.prototype.offset;X.prototype.getThumbnailSprite=X.prototype.oi;
X.prototype.setThumbnailSprite=X.prototype.dh;X.prototype.hasByterangeOptimization=X.prototype.zi;X.prototype.markAsByterangeOptimization=X.prototype.Cg;X.prototype.isLastPartial=X.prototype.Di;X.prototype.markAsLastPartial=X.prototype.Dg;X.prototype.isPartial=X.prototype.Ei;X.prototype.markAsPartial=X.prototype.Fg;X.prototype.isIndependent=X.prototype.Ci;X.prototype.markAsNonIndependent=X.prototype.Eg;X.prototype.isPreload=X.prototype.isPreload;X.prototype.markAsPreload=X.prototype.vf;
X.prototype.markAsUnavailable=X.prototype.Ii;X.prototype.getStatus=X.prototype.Bb;X.prototype.getTileDuration=X.prototype.ri;X.prototype.getTilesLayout=X.prototype.si;X.prototype.getEndByte=X.prototype.Yb;X.prototype.getStartByte=X.prototype.Zb;X.prototype.getEndTime=X.prototype.Sh;X.prototype.getStartTime=X.prototype.getStartTime;X.prototype.getUris=X.prototype.N;var Jk=0,Lk=1;X.Status={sj:Jk,Aj:Lk,xj:2};function Y(a,b,c){this.i=a;this.D=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.J=!1;this.I=0;this.F=c===void 0?!0:c;this.G=0;this.A=!1;this.m=a}p=Y.prototype;p.getDuration=function(){return this.l};p.Zh=function(){return this.h};p.Zg=function(a){this.i=a};p.cc=function(a){this.l=a};p.gi=function(){return this.i};p.fj=function(a){this.B=a};p.se=function(a){a&&!this.C&&(this.J=!0);this.C=a};p.ah=function(a){this.o=a};p.Ud=function(){return this.o};
p.Xg=function(a){this.D=a};p.Rh=function(){return this.D};p.Ni=function(a,b){if(a.length!=0){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(a.length!=0){var d=a[a.length-1].end+b;this.je(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);this.i!=null&&this.F&&!this.A&&(this.i=c-this.g-this.h)}}};
p.Kg=function(a){if(a.length!=0){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=r(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.je(b);this.g=Math.max(this.g,c);this.i!=null&&this.F&&!this.A&&(this.i=d-this.g-this.h)}};p.Mi=function(a,b){this.je(a);b==Infinity||this.ba()||(this.g=Math.max(this.g,b))};p.$h=function(){return this.g};p.Ag=function(){this.A=!0};
p.Fi=function(){return this.A};p.Yg=function(a){this.m=a};p.Wh=function(){return this.m};p.je=function(a){this.j==null?this.j=a:this.J||(this.j=Math.min(this.j,a))};p.Li=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){this.j!=null&&(this.j+=a);this.g!=null&&(this.g+=a)};p.ba=function(){return this.l==Infinity&&!this.C};p.Gc=function(){return this.l!=Infinity&&!this.C};p.Vd=function(){return Math.max(this.I,this.ad()-this.o)};p.eh=function(a){this.I=a};
p.ad=function(){return this.ba()||this.Gc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l};p.$c=function(a){var b=Math.max(this.j,this.I);return this.o==Infinity?Math.ceil(b*1E3)/1E3:Math.max(b,Math.min(this.ad()-this.o+a,this.ib()))};p.Nb=function(){return this.$c(0)};p.ib=function(){return Math.max(0,this.ad()-(this.ba()||this.Gc()?this.D:0))};p.pj=function(){return this.i==null||this.g!=null&&this.F?!1:!0};
p.ej=function(a){this.G=a};p.Mh=function(){return this.G};K("shaka.media.PresentationTimeline",Y);Y.prototype.getAvailabilityTimeOffset=Y.prototype.Mh;Y.prototype.setAvailabilityTimeOffset=Y.prototype.ej;Y.prototype.usingPresentationStartTime=Y.prototype.pj;Y.prototype.getSeekRangeEnd=Y.prototype.ib;Y.prototype.getSeekRangeStart=Y.prototype.Nb;Y.prototype.getSafeSeekRangeStart=Y.prototype.$c;Y.prototype.getSegmentAvailabilityEnd=Y.prototype.ad;Y.prototype.setUserSeekStart=Y.prototype.eh;
Y.prototype.getSegmentAvailabilityStart=Y.prototype.Vd;Y.prototype.isInProgress=Y.prototype.Gc;Y.prototype.isLive=Y.prototype.ba;Y.prototype.offset=Y.prototype.offset;Y.prototype.notifyMaxSegmentDuration=Y.prototype.Li;Y.prototype.notifyMinSegmentStartTime=Y.prototype.je;Y.prototype.getInitialProgramDateTime=Y.prototype.Wh;Y.prototype.setInitialProgramDateTime=Y.prototype.Yg;Y.prototype.isStartTimeLocked=Y.prototype.Fi;Y.prototype.lockStartTime=Y.prototype.Ag;Y.prototype.getMaxSegmentEndTime=Y.prototype.$h;
Y.prototype.notifyPeriodDuration=Y.prototype.Mi;Y.prototype.notifySegments=Y.prototype.Kg;Y.prototype.notifyTimeRange=Y.prototype.Ni;Y.prototype.getDelay=Y.prototype.Rh;Y.prototype.setDelay=Y.prototype.Xg;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Ud;Y.prototype.setSegmentAvailabilityDuration=Y.prototype.ah;Y.prototype.setStatic=Y.prototype.se;Y.prototype.setClockOffset=Y.prototype.fj;Y.prototype.getPresentationStartTime=Y.prototype.gi;Y.prototype.setDuration=Y.prototype.cc;
Y.prototype.setPresentationStartTime=Y.prototype.Zg;Y.prototype.getMaxSegmentDuration=Y.prototype.Zh;Y.prototype.getDuration=Y.prototype.getDuration;function Mk(a){var b=this;this.j=a;this.h=new jb;this.g=new Set;this.i=(new Se(function(){Nk(b,!1)})).Ub();a.paused||this.i.Da(.25);this.h.H(a,"playing",function(){b.i.Ub().Da(.25)});this.h.H(a,"pause",function(){b.i.stop()});this.h.H(a,"seeked",function(){b.i.Ub();a.paused||b.i.Da(.25)})}Mk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
function Nk(a,b){var c=a.j.currentTime;a=r(a.g);for(var d=a.next();!d.done;d=a.next())d.value.j(c,b)};function Ok(a){Zi.call(this);this.g=new Map;this.h=a}pa(Ok,Zi);Ok.prototype.release=function(){this.g.clear();Zi.prototype.release.call(this)};function Pk(a,b){var c=a.g.get(b);c||(c={jd:[],Me:null,contentType:b},a.g.set(b,c));return c}function Qk(a,b,c){var d=Pk(a,b.contentType);Rk(a,d);a={Hc:b,position:c};d=d.jd;b=d.findIndex(function(e){return e.position>=c});b>=0?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
Ok.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Me;a:{var e=c.jd;for(var f=e.length-1;f>=0;f--){var g=e[f];if(g.position<=a){e=g.Hc;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&&!hb(d.roles,e.roles);(g||h||d)&&Sk(this,a,e.contentType)&&(c.Me=e,d=new Yi("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Sk(this,a,e.contentType)&&(c.Me=e,JSON.stringify(e),c=new Yi("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function Sk(a,b,c){return(a=a.h()[c])&&a.length>0&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Rk(a,b){if((a=a.h()[b.contentType])&&a.length>0){var c=a[0].start,d=a[a.length-1].end,e=b.jd;b.jd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.jd=[]}
function Tk(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 Uk(a){this.g=a;this.j=null;this.i=0;this.l=!1}p=Uk.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.l||(this.g=[],this.j&&this.j.stop(),this.j=null)};p.Ji=function(){this.l=!0};p.yb=function(a){for(var b=r(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Hf(a){return a.g[0]||null}
p.find=function(a){var b=this.g.length-1;if(b<0)return null;if(a<this.g[0].startTime)return this.i;var c=gb(this.g,function(e){return e.startTime<=a})-1;if(c<0)return null;var d=this.g[c];b=c<b?this.g[c+1].startTime:d.endTime;return a>=d.startTime&&a<b?c+this.i:null};p.get=function(a){if(this.g.length==0)return null;a-=this.i;return a<0||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.l)for(var b=r(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
p.wf=function(a){if(!this.l&&a.length){var b=Math.round(a[0].startTime*1E3)/1E3,c=gb(this.g,function(d){return Math.round(d.startTime*1E3)/1E3<b});this.g.length=c;this.g.push.apply(this.g,G(a))}};p.fe=function(a,b){for(var c=Math.max(b,this.g.length>0?this.g[0].startTime:-Infinity),d=0;d<a.length&&a[d].endTime<=c;)d++;d>0&&(a=a.slice(d));this.wf(a);this.ob(b)};p.ob=function(a){if(!this.l){var b=gb(this.g,function(c){return c.endTime<=a});b>0&&(this.i+=b,this.g=this.g.slice(b))}};
p.Pd=function(a,b,c){c=c===void 0?!1:c;if(!this.l){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;var d=gb(this.g,function(e){return e.endTime<=a});d>0&&(c||(this.i+=d),this.g=this.g.slice(d));this.g.length!=0&&(c=this.g[this.g.length-1],b=new X(c.startTime,b,c.G,c.startByte,c.endByte,c.Z,c.m,c.F,c.D,c.g,c.tilesLayout,c.C,c.h,c.status,c.aesKey),b.mimeType=c.mimeType,b.codecs=c.codecs,b.i=c.i,this.g[this.g.length-1]=b)}};
p.Uf=function(a,b){var c=this;this.l||(this.j&&this.j.stop(),this.j=new Se(function(){var d=b();d?c.g.push.apply(c.g,G(d)):(c.j.stop(),c.j=null)}),this.j.Da(a))};Uk.prototype[Symbol.iterator]=function(){return this.zb(0)};
Uk.prototype.zb=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this.find(a);if(d==null)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&e.g.length>0)for(var g=e.g.length-1;g>=0;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.j;)g--,h=e.g[g];if(!h.j)return Xa("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Vk(this,d,f,c)};function Wk(a,b,c){a=new X(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Uk([a])}
K("shaka.media.SegmentIndex",Uk);Uk.forSingleSegment=Wk;Uk.prototype.getIteratorForTime=Uk.prototype.zb;Uk.prototype.updateEvery=Uk.prototype.Uf;Uk.prototype.fit=Uk.prototype.Pd;Uk.prototype.evict=Uk.prototype.ob;Uk.prototype.mergeAndEvict=Uk.prototype.fe;Uk.prototype.offset=Uk.prototype.offset;Uk.prototype.get=Uk.prototype.get;Uk.prototype.find=Uk.prototype.find;Uk.prototype.markImmutable=Uk.prototype.Ji;Uk.prototype.release=Uk.prototype.release;Uk.prototype.getNumEvicted=Uk.prototype.getNumEvicted;
Uk.prototype.getNumReferences=Uk.prototype.getNumReferences;function Vk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=Vk.prototype;p.Pc=function(a){this.reverse=a};p.Gh=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&a.g.length>0&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&a.g.length>0?a.g[this.g]:a};
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&a.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(a=this.i.get(this.h))&&a.g.length>0?a.g.length-1:0)):(this.h--,this.g=0):a&&a.g.length>0?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.If=function(){var a=this.current();if(a&&a.mc&&!a.j&&(a=this.i.get(this.h))&&a.g.length>0)for(var b=a.g[this.g];b.j&&!(this.g<=0);)this.g--,b=a.g[this.g]};
K("shaka.media.SegmentIterator",Vk);Vk.prototype.resetToLastIndependent=Vk.prototype.If;Vk.prototype.next=Vk.prototype.next;Vk.prototype.current=Vk.prototype.current;Vk.prototype.currentPosition=Vk.prototype.Gh;Vk.prototype.setReverse=Vk.prototype.Pc;function Xk(){Uk.call(this,[]);this.h=[]}pa(Xk,Uk);p=Xk.prototype;p.clone=function(){var a=new Xk;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){this.h=[]};p.yb=function(a){for(var b=r(this.h),c=b.next();!c.done;c=b.next())c.value.yb(a)};
function Yk(a,b){a=r(a.h);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.find=function(a){for(var b=this.i,c=r(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(e!=null)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function Zk(a,b){a=r(a.h);for(var c=a.next();!c.done&&c.value.find(b)==null;c=a.next());return-1}
p.get=function(a){for(var b=this.i,c=r(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};p.offset=function(){};p.wf=function(){};p.ob=function(a){if(this.h.length){var b=this.h[0];b.ob(a);b.getNumReferences()==0&&(this.h.shift(),this.i+=b.getNumEvicted(),b.release(),this.ob(a))}};p.fe=function(){};p.Pd=function(){};p.Uf=function(){};K("shaka.media.MetaSegmentIndex",Xk);Xk.prototype.updateEvery=Xk.prototype.Uf;
Xk.prototype.fit=Xk.prototype.Pd;Xk.prototype.mergeAndEvict=Xk.prototype.fe;Xk.prototype.evict=Xk.prototype.ob;Xk.prototype.merge=Xk.prototype.wf;Xk.prototype.offset=Xk.prototype.offset;Xk.prototype.get=Xk.prototype.get;Xk.prototype.find=Xk.prototype.find;Xk.prototype.forEachTopLevelReference=Xk.prototype.yb;Xk.prototype.release=Xk.prototype.release;function $k(a){if(al.has(a))return al.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),al.set(a,b),b):!1}function bl(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var al=new Map;function cl(a){var b=De(a),c=b.split("/")[0];a=Ee(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,qd:null,colorGamut:null,frameRate:null,timescale:null}}
function dl(a,b,c){function d(A){y=A.name;var F=A.reader;F.skip(24);var D=F.ua(),J=F.ua();F.skip(50);q=String(D);n=String(J);A.reader.Sa()&&eh(A)}function e(A){var F=oh(A.reader);u=F.channelCount;t=F.sampleRate;f(A.name)}function f(A){A=A.toLowerCase();switch(A){case "avc1":case "avc3":h.push(A+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(A+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(A+".05.04");l=!0;break;case "vp09":h.push(A+".00.10.08");l=!0;break;case "av01":h.push(A+".0.01M.08");
l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(A);k=!0;break;case "apac":g.push("apac.31.00"),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,q=null,u=null,t=null,v=null,w=null,x=null,y;(new $g).box("moov",eh).box("trak",eh).box("mdia",eh).ea("mdhd",function(A){A=mh(A.reader,A.version);m=A.language;x=A.timescale}).box("minf",eh).box("stbl",eh).ea("stsd",gh).box("mp4a",function(A){var F=oh(A.reader);u=F.channelCount;t=F.sampleRate;
A.reader.Sa()?eh(A):f(A.name)}).box("esds",function(A){A=A.reader;for(var F="mp4a",D,J;A.Sa();){D=A.T();for(var L=A.T();L&128;)L=A.T();if(D==3)A.ua(),L=A.T(),L&128&&A.ua(),L&64&&A.skip(A.T()),L&32&&A.ua();else if(D==4)J=A.T(),A.skip(12);else if(D==5)break}J&&(F+="."+rh(J),D==5&&A.Sa()&&(D=A.T(),J=(D&248)>>3,J===31&&A.Sa()&&(J=32+((D&7)<<3)+((A.T()&224)>>5)),F+="."+J));g.push(F);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("apac",e).box("avc1",d).box("avc3",d).box("hev1",
d).box("hvc1",d).box("dva1",d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09",d).box("av01",d).box("avcC",function(A){var F=y||"";switch(y){case "dvav":F="avc3";break;case "dva1":F="avc1"}A=A.reader;A.skip(1);A=F+"."+rh(A.T())+rh(A.T())+rh(A.T());h.push(A);l=!0}).box("hvcC",function(A){var F=y||"";switch(y){case "dvh1":F="hvc1";break;case "dvhe":F="hev1"}var D=A.reader;D.skip(1);A=D.T();var J=["","A","B","C"][A>>6],L=A&31,P=D.S(),O=(A&32)>>5?"H":"L";A=[D.T(),D.T(),D.T(),D.T(),D.T(),D.T()];D=
D.T();for(var N=0,M=0;M<32;M++){N|=P&1;if(M==31)break;N<<=1;P>>=1}F=F+("."+J+L)+("."+rh(N,!0));F+="."+O+D;J="";for(L=A.length;L--;)if((O=A[L])||J)J="."+O.toString(16).toUpperCase()+J;F+=J;h.push(F);l=!0}).box("dvcC",function(A){var F=y||"";switch(y){case "hvc1":F="dvh1";break;case "hev1":F="dvhe";break;case "avc1":F="dva1";break;case "avc3":F="dvav";break;case "av01":F="dav1"}var D=A.reader;D.skip(2);A=D.T();D=D.T();h.push(F+"."+sh(A>>1&127)+"."+sh(A<<5&32|D>>3&31));l=!0}).box("dvvC",function(A){var F=
y||"";switch(y){case "hvc1":F="dvh1";break;case "hev1":F="dvhe";break;case "avc1":F="dva1";break;case "avc3":F="dvav";break;case "av01":F="dav1"}var D=A.reader;D.skip(2);A=D.T();D=D.T();h.push(F+"."+sh(A>>1&127)+"."+sh(A<<5&32|D>>3&31));l=!0}).ea("vpcC",function(A){var F=y||"",D=A.reader;A=D.T();var J=D.T();D=D.T()>>4&15;h.push(F+"."+sh(A)+"."+sh(J)+"."+sh(D));l=!0}).box("av1C",function(A){var F=y||"";switch(y){case "dav1":F="av01"}var D=A.reader;D.skip(1);A=D.T();D=D.T();var J=A>>>5,L=(D&64)>>6;
h.push(F+"."+J+"."+sh(A&31)+(D>>>7?"H":"M")+"."+sh(J===2&&L?(D&32)>>5?12:10:L?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+sh(1)+"."+sh(1)+"."+sh(1)+".0");l=!0}).box("enca",ih).box("encv",hh).box("sinf",eh).box("frma",function(A){A=ph(A.reader).codec;f(A)}).box("colr",function(A){h=h.map(function(J){if(J.startsWith("av01.")){var L=A.reader,P=L.Va(),O=L.sb(4,!1);var N=String.fromCharCode(O[0]);N+=String.fromCharCode(O[1]);N+=String.fromCharCode(O[2]);N+=String.fromCharCode(O[3]);if(N===
"nclx"){O=L.ua();N=L.ua();var M=L.ua(),S=L.T()>>7,U=J.split(".");U.length==10&&(U[6]=sh(O),U[7]=sh(N),U[8]=sh(M),U[9]=String(S),J=U.join("."))}L.seek(P)}return J});var F=qh(A.reader),D=F.colorGamut;v=F.qd;w=D}).parse(a||b,!0,!0);if(!g.length&&!h.length)return null;var z=k&&!l,B=new Map;if(l&&!c){c=new Yc("video/mp4");a&&c.init(a);try{ad(c,b);for(var H=r(c.g.getStreams()),E=H.next();!E.done;E=H.next()){var C=E.value;B.set(C,C)}}catch(A){}c.g.clear()}return{type:z?"audio":"video",mimeType:z?"audio/mp4":
"video/mp4",codecs:el(g.concat(h)).join(", "),language:m,height:n,width:q,channelCount:u,sampleRate:t,closedCaptions:B,qd:v,colorGamut:w,frameRate:null,timescale:x}}function el(a){var b=new Set,c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Ce(d);b.has(e)||(c.push(d),b.add(e))}b=Jc("audio",c);d=Jc("video",c);a=Jc(Ic,c);d=fl(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function fl(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?$k('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function gl(a){var b=null;(new $g).box("moov",eh).box("trak",eh).box("mdia",eh).box("minf",eh).box("stbl",eh).ea("stsd",gh).box("encv",hh).box("enca",ih).box("sinf",eh).box("schi",eh).ea("tenc",function(c){c=c.reader;c.T();c.T();c.T();c.T();c=c.sb(16,!1);b=xc(c)}).parse(a,!0);return b}
function hl(a,b,c){var d,e,f,g,h;return I(function(k){if(k.h==1)return d=b,d.cryptoKey?k.u(2):k.g(d.fetchKey(),3);e=d.iv;if(!e)for(e=Q(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;g>=0;g--)e[g]=f&255,f>>=8;b.blockCipherMode=="CBC"?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function il(){}function jl(a,b){try{var c=kl(a);return Vi({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return Ti(d)}}
function kl(a){if(!a.startsWith("data:"))throw new R(2,1,1004,a);var b=a.substring(5),c=b.indexOf(",");if(c<0)throw new R(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=vc(b):e=nc(b);return{data:e,contentType:a,Tf:c}}K("shaka.net.DataUriPlugin",il);il.parse=jl;cj("data",jl);function ll(a,b,c){var d,e,f,g,h,k,l;return I(function(m){switch(m.h){case 1:d=ml(a);if(e=nl.get(d))return m.return(e);f=0;g=gj([a],c);m.m(2);g.method="HEAD";return m.g(b.request(f,g).promise,4);case 4:h=m.i;e=h.headers["content-type"];m.o(3);break;case 2:k=m.l();if(!k||k.code!=1002&&k.code!=1001){m.u(3);break}g.method="GET";return m.g(b.request(f,g).promise,6);case 6:l=m.i,e=l.headers["content-type"];case 3:return m.return(e?e.toLowerCase().split(";").shift():"")}})}
function ml(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 ol(a,b,c,d,e){a=gj(a,d,e);if(b!=0||c!=null)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a}
var nl=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv",
"text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function pl(a){this.o=null;this.B=a;this.G=new $i;this.l=[];this.i=null;this.j=[];this.C=null;this.F=[];this.D=300;this.m=new Map;this.h=new Map;this.g=null;this.A="UNKNOWN"}pl.prototype.configure=function(a){this.o=a};pl.prototype.destroy=function(){this.B=this.o=null;this.l=[];this.i=null;this.j=[];this.F=[];this.m.clear();this.g!=null&&(this.g.stop(),this.g=null);return this.G.destroy()};pl.prototype.setManifestType=function(a){this.A=a};
function ql(a,b){var c,d,e,f,g,h,k;return I(function(l){if(l.h==1)return c=Ac(a.l,[rl(a,b)]),d=gj(c,a.o.retryParameters),e=a.B.networkingEngine.request(8,d),aj(a.G,e),l.m(2),l.g(e.promise,4);if(l.h!=2)return f=l.i,g=jc(f.data),h=JSON.parse(g),h.VERSION==1&&sl(a,h,f.uri),l.o(0);if((k=l.l())&&k.code==7001)return l.return();a.g!=null&&(a.g.stop(),a.g=null);a.g=new Se(function(){ql(a,b)});a.g.ma(a.D);l.j()})}
function rl(a,b){if(!a.j.length)return b;b=new Ab(b);var c=a.C||a.j[0],d=Math.round(a.B.getBandwidthEstimate()),e=b.g;a.A=="DASH"?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):a.A=="HLS"&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ob(e);e.Wc&&Eb(b,e);return b.toString()}
function sl(a,b,c){a.g!=null&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Se(function(){ql(a,d)});if(c=b.TTL)a.D=c;a.g.ma(a.D);a.j=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}function tl(a,b,c,d){var e=a.m.get(b);e||(e=new Map);e.set(c,d);a.m.set(b,e)}pl.prototype.banLocation=function(a){this.h.set(a,Date.now()+6E4)};
function ul(a,b){var c=c===void 0?!1:c;b=a.m.get(b)||new Map;for(var d=[],e=r(a.j),f=e.next(),g={};!f.done;g={Kc:void 0},f=e.next())if(g.Kc=f.value,f=b.get(g.Kc))d.push({Cf:g.Kc,location:f});else if(f=a.F.find(function(k){return function(l){return l.uj==k.Kc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].qh?(h=new Ab(h),Cb(h,f["URI-REPLACEMENT"].qh),d.push({Cf:g.Kc,location:h.toString()})):d.push({Cf:g.Kc,location:h}))}e=Date.now();g=r(a.h.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
h=a.h.get(f),e>h&&a.h.delete(f);d=d.filter(function(k){for(var l=r(a.h.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new Ab(k.location)).gb))return!1;return!0});d.length&&(a.C=d[0].Cf);d=d.map(function(k){return k.location});if(!d.length&&a.i)for(e=r(a.i.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.i,d.push(g);if(!d.length)for(b=r(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Ac(a.l,d)};function vl(){var a=this;this.g=this.h=null;this.F=1;this.C=new Map;this.K=new Map;this.D=new Map;this.D.set("video",new Map);this.D.set("audio",new Map);this.D.set(Ic,new Map);this.D.set("image",new Map);this.Eb=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return wl(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){var c=rk(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=rk(b,"URI");c=kl(e.split("?")[0]);
e=e.split("?")[0];if(!a.M.has(e)){var f=Q(c.data);a.M.set(e,f)}d=Bc("com.widevine.alpha",d,[{initDataType:"cenc",initData:a.M.get(e)}],void 0,c.Tf);(b=W(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b}).set("com.microsoft.playready",function(b){var c=rk(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");b=rk(b,"URI");c=kl(b.split("?")[0]);b=Q(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=Ub(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=Bc("com.microsoft.playready",d,[{initDataType:"cenc",initData:h}],void 0,c.Tf);if(b=td(["<PLAYREADY>",uc(b),"</PLAYREADY>"].join("\n"))){try{var m=lk(b);if(m)c:{for(var n=r(Ad(m,"DATA")),q=n.next();!q.done;q=n.next()){var u=q.value;if(u.children)for(var t=r(u.children),
v=t.next();!v.done;v=t.next()){var w=v.value;if(w.tagName=="LA_URL"){var x=zd(w);break c}}}x=""}else x="";var y=x}catch(z){y=""}d.licenseServerUri=y}y=Promise.resolve(d)}else y=Promise.resolve(null);return y}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=rk(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=rk(b,"URI");c=kl(e.split("?")[0]);e=e.split("?")[0];if(!a.M.has(e)){var f=Q(c.data);a.M.set(e,f)}d=Bc("com.huawei.wiseplay",
d,[{initDataType:"cenc",initData:a.M.get(e)}],void 0,c.Tf);(b=W(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.Xa=new Set;this.j=new Map;this.m=null;this.G="";this.Oa=new Ck;this.L=-1;this.na=Infinity;this.ka=this.Tb=this.Wa=!1;this.B=new Se(function(){if(a.$&&!a.g.continueLoadingWhenPaused&&(a.Y.jb(a.$,"timeupdate"),a.$.paused)){a.Y.Na(a.$,"timeupdate",function(){return xl(a)});return}xl(a)});this.Fa=yl;this.i=null;this.Ra=0;
this.A=Infinity;this.Ha=this.Ga=this.U=0;this.ha=new $i;this.I=new Map;this.J=new Map;this.Ca=new Map;this.va=new Map;this.O=new Map;this.xa=new Map;this.ya=new Map;this.Sb=this.za=!1;this.Cb=new Sa(5);this.l=null;this.R=!0;this.Y=new jb;this.o=this.$=null;this.Db=function(){return!1};this.M=new Map}p=vl.prototype;
p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.Db=b);this.l&&this.l.configure(this.g);c&&this.i&&this.i.presentationTimeline.ba()&&this.B.Ub()};p.start=function(a,b){var c=this,d;return I(function(e){return e.h==1?(c.h=b,c.za=b.isLowLatencyMode(),e.g(zl(c,[a]).promise,2)):e.h!=3?(d=e.i,c.G=d.uri,e.g(Al(c,d.data),3)):e.return(c.i)})};
p.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.ha&&(a.push(this.ha.destroy()),this.ha=null);this.g=this.h=null;this.Xa.clear();this.i=null;this.j.clear();this.K.clear();this.J.clear();this.C.clear();this.Ca.clear();this.va.clear();this.O.clear();this.xa.clear();this.ya.clear();this.M.clear();this.l&&this.l.destroy();this.Y&&(this.Y.release(),this.Y=null);return Promise.all(a)};
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m;return I(function(n){if(n.h==1){if(!Bl(a))return n.return();b=[];c=Array.from(a.j.values());d=c.filter(function(q){return!q.stream.isAudioMuxedInVideo&&q.stream.segmentIndex});if(d.length===0)return n.return();a.A=Infinity;a.i.gapCount=0;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Cl(a,g));return n.g(Promise.all(b),2)}Vl(a,d.map(function(q){return q.stream}));h=d.some(function(q){return q.bd==0});d.length&&!h&&(Wl(a,yl),Xl(a));h&&Xl(a);
k=r(d);for(l=k.next();!l.done;l=k.next())m=l.value,m.stream.isAudioMuxedInVideo||!m.stream.segmentIndex||Hf(m.stream.segmentIndex)||a.h.disableStream(m.stream);n.j()})};function Yl(a,b){return Bl(a)?a.D.get(b.type):b.ee}
function Cl(a,b){var c,d,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y,z,B,H,E,C,A,F,D,J,L,P,O,N,M,S,U,da,aa,Ka,ua;return I(function(qa){switch(qa.h){case 1:if(b.stream.isAudioMuxedInVideo)return qa.return();c=[];d=r(b.N());for(e=d.next();!e.done;e=d.next())f=e.value,g=new Ab(f),h=g.g,b.Jd&&(b.qb>=0&&h.add("_HLS_msn",String(b.qb)),b.rb>=0&&h.add("_HLS_part",String(b.rb))),b.Kd&&h.add("_HLS_skip","YES"),c.push(g.toString());qa.m(2);return qa.g(zl(a,c,!0).promise,4);case 4:k=qa.i;qa.o(3);break;case 2:throw l=qa.l(),
a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return qa.return();m=Dk(a.Oa,k.data);if(m.type!=1)throw new R(2,4,4017);n=k.uri;n==k.originalUri||b.N().includes(n)||b.me.push(n);q=uk(m.V,"EXT-X-DEFINE");u=Zl(a,q,n);t=b.stream;v=Yl(a,b);return qa.g($l(a,m,t.mimeType,b.N,u),5);case 5:w=qa.i;x=w.keyIds;y=w.drmInfos;z=w.encrypted;B=w.cg;t.encrypted||!z||B||(t.encrypted=!0);H=function(xa,ka){return xa.size===ka.size&&[].concat(G(xa)).every(function(La){return ka.has(La)})};H(t.keyIds,
x)||(t.keyIds=x,t.drmInfos=y,a.h.newDrmInfo(t));E=am(a,m,v,u,b.N,b.type);C=E.segments;if(A=E.bandwidth)t.bandwidth=A;F=Tk(t);D=r(C);for(J=D.next();!J.done;J=D.next())L=J.value,L.Z&&(L.Z.Hc=F);t.segmentIndex.fe(C,a.m.Vd());C.length&&(P=xk(m.V,"EXT-X-MEDIA-SEQUENCE",0),N=(O=wk(m.V,"EXT-X-SKIP"))?Number(W(O,"SKIPPED-SEGMENTS")):0,M=bm(P,C),S=M.qb,U=M.rb,b.qb=S+N,b.rb=U,da=v.get(P),t.segmentIndex.ob(da));if(aa=Hf(t.segmentIndex))b.kc=aa.startTime,Ka=C[C.length-1],b.ac=Ka.endTime;if(ua=wk(m.V,"EXT-X-ENDLIST"))b.bd=
!0;cm(a,m);dm(a,m.V,t.type,u,b.N);qa.j()}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.l&&this.l.banLocation(a)};p.setMediaElement=function(a){this.$=a};
function em(a,b,c){c=c===void 0?!1:c;for(var d=a.L==-1,e=r(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=Yl(a,f);if(g=Hf(g)){h=r(h);for(var k=h.next();!k.done;k=h.next()){k=r(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.L=Math.max(a.L,l));f.Oe=l;break}}}}if(!(a.L<0))for(b=r(b),d=b.next();!d.done;d=b.next())if(d=d.value,fm(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.L-d.Oe,f>0&&(e.g.splice(0,f),e=Hf(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
gm(a,d,e)}
function hm(a,b){if(a.na==Infinity){b=r(b);for(var c=b.next();!c.done;c=b.next())c=Hf(c.value.stream.segmentIndex),c!=null&&c.h!=null&&(a.na=Math.min(a.na,c.h))}b=a.na;if(b!=Infinity){c=r(a.j.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!fm(a,d.type)){var e=d.stream.segmentIndex;if(e!=null){var f=Hf(e);if(f)if(f.h==null)Xa("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.N(),"Expect AV sync issues!");else for(gm(a,d,f.h-b-f.startTime),d=r(e),e=d.next();!e.done;e=d.next())e.value.Qf(b)}}}}
function gm(a,b,c){if(!(Math.abs(c)<.001)){b.kc+=c;b.ac+=c;a=Yl(a,b);for(var d=r(a),e=d.next();!e.done;e=d.next()){var f=r(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.N()}}
function Al(a,b){var c,d,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y,z,B,H,E,C,A,F,D,J,L,P,O,N,M,S,U,da,aa,Ka,ua,qa,xa,ka,La,za,Na;return I(function(Oa){switch(Oa.h){case 1:c=Kc;d=Dk(a.Oa,b);e=uk(d.V,"EXT-X-DEFINE");f=[];g=[];h=[];a.m=new Y(null,0);a.m.se(!0);k=function(){return[a.G]};l=null;m=new Map;a.i={presentationTimeline:a.m,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",
serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.o};if(d.type==1)return a.R=!1,S=uk(d.V,"EXT-X-DEFINE"),m=Zl(a,S,a.G),l=c.oa,U="",da=new Map,Oa.g(im(a,a.F++,m,d,k,"",l,U,!0,"Media Playlist",null,da,null,!1,null,!1),7);jm(a,e);n=uk(d.V,"EXT-X-MEDIA");q=uk(d.V,"EXT-X-STREAM-INF");u=uk(d.V,"EXT-X-IMAGE-STREAM-INF");t=uk(d.V,"EXT-X-I-FRAME-STREAM-INF");v=uk(d.V,"EXT-X-SESSION-KEY");w=uk(d.V,"EXT-X-SESSION-DATA");x=uk(d.V,"EXT-X-CONTENT-STEERING");km(a,w);return Oa.g(lm(a,
x),4);case 4:if(!a.g.ignoreSupplementalCodecs){y=[];z=r(q);B=z.next();for(H={};!B.done;H={gh:void 0},B=z.next())if(E=B.value,C=W(E,"SUPPLEMENTAL-CODECS"))H.gh=C.split(/\s*,\s*/).map(function(la){return la.split("/")[0]}),A=E.attributes.map(function(la){return function(cb){var Va=cb.name,pc=cb.value;Va=="CODECS"&&(pc=la.gh.join(","),cb=cb.value.split(","),cb.length>1&&(cb=Gc("audio",cb))&&(pc+=","+cb));return new tk(Va,pc)}}(H)),y.push(new ok(E.id,E.name,A,null));q.push.apply(q,G(y));F=[];D=r(t);J=
D.next();for(L={};!J.done;L={hh:void 0},J=D.next())if(P=J.value,O=W(P,"SUPPLEMENTAL-CODECS"))L.hh=O.split(/\s*,\s*/).map(function(la){return la.split("/")[0]}),N=P.attributes.map(function(la){return function(cb){var Va=cb.name;cb=cb.value;Va=="CODECS"&&(cb=la.hh.join(","));return new tk(Va,cb)}}(L)),F.push(new ok(P.id,P.name,N,null));t.push.apply(t,G(F))}mm(a,q);nm(a,n);M=om(a,t);return Oa.g(pm(a,q,v,n,k,a.C,M),5);case 5:return f=Oa.i,g=qm(a,n),Oa.g(rm(a,u,t),6);case 6:h=Oa.i;Oa.u(3);break;case 7:aa=
Oa.i,a.j.set(a.G,aa),aa.stream&&(Ka=Tk(aa.stream),aa.stream.segmentIndex.yb(function(la){la.Z&&(la.Z.Hc=Ka)})),l=aa.stream.type,ua=!0,a.g.disableAudio&&aa.type=="audio"?ua=!1:a.g.disableVideo&&aa.type=="video"&&!aa.stream.codecs.includes(",")&&(ua=!1),ua&&f.push({id:0,language:af(U||"und"),disabledUntilTime:0,primary:!0,audio:aa.type=="audio"?aa.stream:null,video:aa.type=="video"?aa.stream:null,bandwidth:aa.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new R(2,
7,7001);sm(a,d);d.type==1&&(Bl(a)&&(tm(a,d),qa=a.A,a.B.ma(qa)),xa=Array.from(a.j.values()),um(a,xa),Xl(a),dm(a,d.V,l,m,k));a.i.variants=f;a.i.textStreams=g;a.i.imageStreams=h;a.i.startTime=a.o;if(a.ka||!a.g.hls.disableCodecGuessing){Oa.u(8);break}ka=[];La=r(a.i.variants);for(za=La.next();!za.done;za=La.next())Na=za.value,Na.audio&&Na.audio.codecs===""&&ka.push(Na.audio.createSegmentIndex()),Na.video&&Na.video.codecs===""&&ka.push(Na.video.createSegmentIndex());return Oa.g(Promise.all(ka),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.i),
Oa.j()}})}
function vm(a,b){var c,d,e,f,g,h,k,l,m,n,q,u,t,v,w,x;return I(function(y){if(y.h==1){c=cl(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return y.return(c);d=wm(a,b);e=d.segment;f=d.segmentIndex;g=e.N();if(h=ml(g[0]))if(k=xm.get(h))return y.return(cl(k));return y.g(Promise.all([ym(a,e.Z,0),ym(a,e,f)]),2)}l=y.i;m=l[1].mimeType;n=l[0].data;q=l[1].data;u="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");t=["audio/mp4","video/mp4","video/iso.segment"];v=e.Z||t.includes(m);if(!v&&$h(Q(q))){var z=
q,B=a.g.disableAudio,H=a.g.disableVideo,E=a.g.disableText;var C=Q(z);var A=(new Rh).parse(C),F=A.Zc();C=A.nf();var D=[],J=!1,L=!1;if(!B)switch(F.audio){case "aac":case "aac-loas":A.ab().length&&(D.push("mp4a.40.2"),J=!0);break;case "mp3":A.ab().length&&(D.push("mp4a.40.34"),J=!0);break;case "ac3":A.ab().length&&(D.push("ac-3"),J=!0);break;case "ec3":A.ab().length&&(D.push("ec-3"),J=!0);break;case "opus":A.ab().length&&(D.push("opus"),J=!0)}if(!H)switch(F.video){case "avc":C.codec?D.push(C.codec):
D.push("avc1.42E01E");L=!0;break;case "hvc":C.codec?D.push(C.codec):D.push("hvc1.1.6.L93.90");L=!0;break;case "av1":D.push("av01.0.01M.08"),L=!0}if(D.length){B=J&&!L;H=new Map;if(L&&!E){E=new Yc("video/mp2t");ad(E,z);z=r(E.g.getStreams());for(L=z.next();!L.done;L=z.next())L=L.value,H.set(L,L);E.g.clear()}C={type:B?"audio":"video",mimeType:"video/mp2t",codecs:D.join(", "),language:null,height:C.height,width:C.width,channelCount:null,sampleRate:null,closedCaptions:H,qd:null,colorGamut:null,frameRate:C.frameRate,
timescale:null}}else C=null;if(w=C)return y.return(w)}else if(v||u.includes(h))if(x=dl(n,q,a.g.disableText))return y.return(x);return m?y.return(cl(m)):y.return(c)})}
function ym(a,b,c){var d,e,f,g,h,k;return I(function(l){switch(l.h){case 1:if(!b)return l.return({mimeType:null,data:null});d=mj;e=ol(b.N(),b.Zb(),b.Yb(),a.g.retryParameters);f=b instanceof X?1:0;return l.g(zm(a,e,d,{type:f}).promise,2);case 2:g=l.i;h=g.data;if(!b.aesKey){l.u(3);break}return l.g(hl(h,b.aesKey,c),4);case 4:h=l.i;case 3:return b instanceof X?b.ld(h,!0):b.ld(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
function Xl(a){if(Bl(a)){if(a.Fa==Am){for(var b=Infinity,c=Infinity,d=r(a.j.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.ac),c=Math.min(c,e.kc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.m.ah(b)}}else a.m.cc(Bm(a));if(!a.m.A)for(b=r(a.j.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||c.type!="audio"&&c.type!="video"||(c=Hf(c.stream.segmentIndex))&&
c.h!=null&&a.m.Yg(c.h);a.m.Ag()}function jm(a,b){var c=(new Ab(a.G)).g;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"QUERYPARAM");d&&f&&(a.C.has(d)||a.C.set(d,f));e&&(d=c.get(e)[0])&&!a.C.has(d)&&a.C.set(e,d)}}
function Zl(a,b,c){c=(new Ab(c)).g;var d=new Map;b=r(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=W(f,"NAME"),h=W(f,"VALUE");e=W(f,"QUERYPARAM");f=W(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.C.get(f))&&d.set(f,e)}return d}
function mm(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"AUDIO");c=W(d,"VIDEO");var f=W(d,"SUBTITLES");d=Cm(a,d);if(f){var g=Gc(Ic,d);a.J.set(f,g);eb(d,g)}e&&(f=Gc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.J.set(e,f));c&&(e=Gc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.J.set(c,e))}}
function km(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"DATA-ID");c=W(d,"URI");var f=W(d,"LANGUAGE");d=W(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",yk([a.G],c,a.C)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new Yi("sessiondata",e);if(a.h)a.h.onEvent(c)}}
function lm(a,b){var c,d,e,f,g,h;return I(function(k){if(!a.h||!a.g)return k.return();d=r(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=W(f,"PATHWAY-ID"),h=W(f,"SERVER-URI"),g&&h){a.l=new pl(a.h);a.l.configure(a.g);a.l.l=[a.G];a.l.setManifestType("HLS");a.l.i=g;c=ql(a.l,h);break}return k.g(c,0)})}
function qm(a,b){var c=vk(b,"SUBTITLES"),d={};b=r(c);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=pk(e,!a.l);d[f]?d[f].push(e):d[f]=[e]}b=[];if(!a.g.disableText)for(var g in d)try{b.push(Dm(a,d[g],new Map).stream)}catch(h){if(!a.g.hls.ignoreTextStreamFailures)throw h;}g=r(c);for(c=g.next();!c.done;c=g.next())if(d=rk(c.value,"GROUP-ID"),c=a.J.get(d))if(d=a.K.get(d))for(d=r(d),e=d.next();!e.done;e=d.next())e=e.value,e.stream.codecs=c,e.stream.mimeType=Em(Ic,c)||Fm(Ic),Gm(e.stream);return b.filter(function(h){return h})}
function Gm(a){var b=new Set([qe(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.yb(function(c){c.mimeType&&b.add(qe(c.mimeType,a.codecs))});a.fullMimeTypes=b}
function rm(a,b,c){var d,e;return I(function(f){if(f.h==1)return d=b.map(function(g){var h,k,l;return I(function(m){if(m.h==1){if(h=a.g.disableThumbnails)return m.return(null);m.m(2);return m.g(Hm(a,g),4)}if(m.h!=2)return k=m.i,m.return(k.stream);l=m.l();if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Im(a,g);return h.stream.type!=="image"?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
throw k;}})),f.g(Promise.all(d),2);e=f.i;return f.return(e.filter(function(g){return g}))})}function Jm(a,b,c){b=b.filter(function(h){var k=W(h,"URI")||"";h=W(h,"TYPE");return h!="SUBTITLES"&&(k!=""||h=="AUDIO")});var d={};b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=pk(e,!a.l);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Dm(a,d[g],c,!1)}function om(a,b){return b.map(function(c){c=Im(a,c);return c.stream.type!=="video"?null:c.stream}).filter(function(c){return c})}
function pm(a,b,c,d,e,f,g){var h,k,l,m,n,q,u,t,v,w,x,y,z,B,H,E,C,A,F,D,J,L,P,O,N,M,S,U,da,aa,Ka,ua,qa,xa,ka,La;return I(function(za){switch(za.h){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(c.length>0)){za.u(2);break}l=r(c);m=l.next();case 3:if(m.done){za.u(2);break}n=m.value;q=rk(n,"METHOD");u=W(n,"KEYFORMAT")||"identity";t=null;if(q=="NONE"){za.u(4);break}if(Km(q)){v=yk(e(),rk(n,"URI"),f);w=v.sort().join("");a.O.has(w)||(x=gj(v,a.g.retryParameters),y=zm(a,x,6).promise,a.O.set(w,y));za.u(4);break}if(u==
"identity")return za.g(Lm(a,n,"",e,null,f),12);z=a.Eb.get(u);if(!z){B=null;za.u(10);break}return za.g(z(n,"",null),11);case 11:B=za.i;case 10:t=B;za.u(6);break;case 12:t=za.i;case 6:if(t){if(t.keyIds)for(H=r(t.keyIds),E=H.next();!E.done;E=H.next())C=E.value,k.add(C);h.push(t)}case 4:m=l.next();za.u(3);break;case 2:A={};F=r(b);for(D=F.next();!D.done;D=F.next())J=D.value,L=pk(J,!a.l),A[L]?A[L].push(J):A[L]=[J];P=[];for(O in A)N=A[O],M=N[0],S=W(M,"FRAME-RATE"),U=Number(rk(M,"BANDWIDTH"))||Number(W(M,
"AVERAGE-BANDWIDTH")),da=W(M,"RESOLUTION"),aa=r(da?da.split("x"):[null,null]),Ka=aa.next().value,ua=aa.next().value,qa=W(M,"VIDEO-RANGE"),(xa=W(M,"REQ-VIDEO-LAYOUT"))&&xa.includes(",")&&(ka=xa.split(",").filter(function(Na){return Na=="CH-STEREO"||Na=="CH-MONO"}),xa=ka[0]),xa=xa||"CH-MONO",La=Mm(a,N,d),P.push.apply(P,G(Nm(a,La.audio,La.video,U,Ka,ua,S,qa,xa,h,k,g)));return za.return(P.filter(function(Na){return Na!=null}))}})}
function Mm(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=r(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=W(m,"AUDIO");var n=W(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=W(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(c=c.filter(function(t){return f.includes(rk(t,"GROUP-ID"))}),Jm(a,c,e));c=(e=f.sort().join(","))&&a.K.has(e)?a.K.get(e):[];g?d.audio.push.apply(d.audio,G(c)):h&&d.video.push.apply(d.video,G(c));h=!1;var u=b.map(function(t){return rk(t,
"URI")});g=d.audio.find(function(t){return t&&t.N().find(function(v){return u.includes(v)})});c=Cm(a,b[0]);k=Gc("video",c);(l=Gc("audio",c))&&!k?(g="audio",h=d.audio.length>0&&!d.audio.some(function(t){return t.stream.isAudioMuxedInVideo})):!d.audio.length&&!d.video.length&&l&&k?(g="video",c=[[k,l].join()]):d.audio.length&&g?(g="audio",h=!0):g=d.video.length&&!d.audio.length?"audio":"video";h||(b=Om(a,b,c,g),e&&a.g.enableAudioGroups&&(b.stream.groupId=e),b.stream.type=="audio"&&g==="audio"&&d.audio.some(function(t){return t.stream.isAudioMuxedInVideo})&&
(a=d.audio[0].stream,b.stream.language=a.language,b.stream.channelsCount=a.channelsCount,b.stream.label=a.label,b.stream.audioSamplingRate=a.audioSamplingRate,b.stream.originalId=a.originalId,b.stream.originalLanguage=a.originalLanguage),d[b.stream.type]=[b]);return d}
function Cm(a,b){b=W(b,"CODECS")||"";a.ka=b.length>0;a.ka||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),b=b.join(","));return el(b.split(/\s*,\s*/))}function Pm(a){return(a=W(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function Qm(a){return(a=W(a,"SAMPLE-RATE"))?parseInt(a,10):null}
function Rm(a){a=W(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 Sm(a){a=rk(a,"TYPE").toLowerCase();a=="subtitles"&&(a=Ic);return a}
function Nm(a,b,c,d,e,f,g,h,k,l,m,n){for(var q=r(c),u=q.next();!u.done;u=q.next())Tm(u.value.stream,e,f,g,h,k,null);e=a.g.disableVideo;if(!c.length||e)c=[null];e&&(b=b.filter(function(x){return!x.stream.isAudioMuxedInVideo}));e=a.g.disableAudio;if(!b.length||e)b=[null];e=[];b=r(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=r(c),h=g.next();!h.done;h=g.next()){var t=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=t?t.stream:null)k.drmInfos=l,k.keyIds=m,a.g.disableIFrames||Vf(k,n);k&&
!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);q=f?f.stream.drmInfos:null;u=t?t.stream.drmInfos:null;t=t?t.N().sort().join(","):"";var v=f?f.N().sort().join(","):"",w=[];h&&h.codecs&&w.push(h.codecs);k&&k.codecs&&w.push(k.codecs);t=[t,v,w.sort()].join("-");h&&k&&!Wb(q,u)||a.Xa.has(t)||(h={id:a.F++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Xa.add(t))}return e}
function nm(a,b){b=vk(b,"CLOSED-CAPTIONS");a.R=b.length==0;b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"LANGUAGE");c=af(e||"und");e||(e=W(d,"NAME"))&&(c=e);e=rk(d,"GROUP-ID");d=rk(d,"INSTREAM-ID").replace("SERVICE","svc");a.I.get(e)||a.I.set(e,new Map);a.I.get(e).set(d,c)}}
function Dm(a,b,c,d){d=d===void 0?!0:d;for(var e=[],f=[],g=new Map,h=r(b),k=h.next(),l={};!k.done;l={sg:void 0},k=h.next()){k=k.value;l.sg=++a.F;l=function(v){return function(){return"shaka://hls-muxed"+v.sg}}(l);var m=d?rk(k,"URI"):W(k,"URI")||l();l=rk(k,"GROUP-ID");e.push(m);f.push(l);g.set(l,m);(k=W(k,"PATHWAY-ID"))&&c.set(l,k)}d=f.sort().join(",");k=b[0];b="";h=Sm(k);if(h==Ic)b=W(k,"CODECS")||"";else for(f=r(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.J.has(l)){b=a.J.get(l);break}f=e.sort().join(",");
h=="audio"&&d&&(f+=d);if(a.j.has(f))return a.j.get(f);l=a.F++;if(a.l)for(g=r(g),m=g.next();!m.done;m=g.next()){var n=r(m.value);m=n.next().value;n=n.next().value;(m=c.get(m))&&tl(a.l,l,m,n)}c=W(k,"LANGUAGE");g=W(k,"NAME");m=W(k,"DEFAULT")=="YES";n=h=="audio"?Pm(k):null;var q=h=="audio"?Rm(k):!1,u=W(k,"CHARACTERISTICS"),t=W(k,"FORCED")=="YES";k=h=="audio"?Qm(k):null;e=Um(a,l,e,b,h,c,m,g,n,null,u,t,k,q);e.stream&&a.g.enableAudioGroups&&(e.stream.groupId=d);a.K.has(d)?a.K.get(d).push(e):a.K.set(d,[e]);
a.j.set(f,e);return e}
function Hm(a,b){var c,d,e,f,g,h,k,l,m,n;return I(function(q){if(q.h==1){c=rk(b,"URI");d=W(b,"CODECS","jpeg")||"";if(a.j.has(c))return q.return(a.j.get(c));e=W(b,"LANGUAGE");f=W(b,"NAME");g=W(b,"CHARACTERISTICS");h=Um(a,a.F++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=W(b,"RESOLUTION"))?q.g(h.stream.createSegmentIndex(),3):q.u(2)}if(q.h!=2){l=Hf(h.stream.segmentIndex);if(m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
Number(m.split("x")[1]);h.stream.closeSegmentIndex()}if(n=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.j.set(c,h);return q.return(h)})}
function Im(a,b){var c="video",d=rk(b,"URI"),e=W(b,"CODECS")||"";e=="mjpg"&&(c="image");if(a.j.has(d))return a.j.get(d);var f=W(b,"LANGUAGE"),g=W(b,"NAME"),h=W(b,"CHARACTERISTICS");c=Um(a,a.F++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=W(b,"RESOLUTION");f=r(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=W(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.j.set(d,c);return c}
function Om(a,b,c,d){for(var e=a.F++,f=[],g=r(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=rk(k,"URI");k=W(k,"PATHWAY-ID");a.l&&k&&tl(a.l,e,k,h);f.push(h)}g=f.sort().join(",")+c.sort().join(",");if(a.j.has(g))return a.j.get(g);h=f.join(",");a:{b=W(b[0],"CLOSED-CAPTIONS");if(d=="video"){if(a.g.disableText){a.R=!1;b=null;break a}if(b){if(b!="NONE"){b=a.I.get(b);break a}a.R=!1}else if(!b&&a.I.size)for(b=r(a.I.keys()),b=b.next();!b.done;b=b.next()){b=a.I.get(b.value);break a}}b=null}c=Dc(d,c);d=
Um(a,e,f,c,d,null,!1,h,null,b,null,!1,null,!1);a.j.set(g,d);return d}
function Um(a,b,c,d,e,f,g,h,k,l,m,n,q,u){function t(B){var H,E,C,A,F,D,J,L,P,O,N,M,S,U,da,aa,Ka,ua,qa,xa;return I(function(ka){switch(ka.h){case 1:return H=Kc,ka.m(2),ka.g(B.promise,4);case 4:E=ka.i;if(B.aborted)return ka.return();C=E.uri;C!=E.originalUri&&(A=x.N(),A.includes(C)||x.me.push(C));F=Dk(a.Oa,E.data);if(F.type!=1)throw new R(2,4,4017);D=uk(F.V,"EXT-X-DEFINE");J=Zl(a,D,C);L=!1;(!a.ka&&a.g.hls.disableCodecGuessing||a.R&&e==H.oa&&!a.g.hls.disableClosedCaptionsDetection)&&F.segments.length>
0&&(a.R=!1,L=!0);P=!a.ka&&a.g.hls.disableCodecGuessing;O=Bl(a);return ka.g(im(a,0,J,F,v,d,e,f,g,h,k,l,m,n,q,u,void 0,L,P),5);case 5:N=ka.i;if(B.aborted)return ka.return();M=N.stream;sm(a,F);Bl(a)&&!O&&tm(a,F);x.kc=N.kc;x.ac=N.ac;x.Kd=N.Kd;x.Jd=N.Jd;x.bd=N.bd;x.ee=N.ee;x.qb=N.qb;x.rb=N.rb;w.segmentIndex=M.segmentIndex;w.encrypted=M.encrypted;w.drmInfos=M.drmInfos;w.keyIds=M.keyIds;w.mimeType=M.mimeType;w.bandwidth=w.bandwidth||M.bandwidth;w.codecs=w.codecs||M.codecs;w.closedCaptions=w.closedCaptions||
M.closedCaptions;w.width=w.width||M.width;w.height=w.height||M.height;w.hdr=w.hdr||M.hdr;w.colorGamut=w.colorGamut||M.colorGamut;w.frameRate=w.frameRate||M.frameRate;w.language=="und"&&M.language!="und"&&(w.language=M.language);w.language=w.language||M.language;w.channelsCount=w.channelsCount||M.channelsCount;w.audioSamplingRate=w.audioSamplingRate||M.audioSamplingRate;Gm(w);w.drmInfos.length&&a.h.newDrmInfo(w);S=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)S=!0;
a.i&&S&&a.h.makeTextStreamsForClosedCaptions(a.i);e==H.Ka&&(U=Hf(M.segmentIndex))&&U.Z&&(w.mimeType="application/mp4",Gm(w));da=Tk(w);w.segmentIndex.yb(function(La){La.Z&&(La.Z.Hc=da)});Vm(a)&&(a.Tb?um(a,[x]):(a.Tb=!0,aa=Array.from(a.j.values()),Ka=aa.filter(function(La){return La.stream.segmentIndex}),um(a,Ka),Xl(a),ua=a.A,ua>0&&a.B.ma(ua)));dm(a,F.V,w.type,J,v);a.i&&(a.i.startTime=a.o);ka.o(0);break;case 2:qa=ka.l();w.closeSegmentIndex();if(qa.code===7001)return ka.return();xa=a.h.disableStream(w);
if(!xa)throw qa;ka.j()}})}function v(){return a.l&&c.length>1?ul(a.l,b):x.me.concat(zk([a.G],c,a.C))}var w=Wm(a,d,e,f,g,h,k,l,m,n,q,u);c.some(function(B){return B.startsWith("shaka://hls-muxed")})&&(w.isAudioMuxedInVideo=!0,w.mimeType="video/mp2t",Gm(w));var x={stream:w,type:e,me:[],kc:0,ac:0,ee:new Map,Kd:!1,Jd:!1,bd:!1,Oe:-1,qb:-1,rb:-1,N:v},y=null,z;w.createSegmentIndex=function(){if(y)return y;if(w.isAudioMuxedInVideo)return w.segmentIndex=new Uk([]),Promise.resolve();z=zl(a,x.N(),!0);return y=
new Promise(function(B){B(t(z))})};w.closeSegmentIndex=function(){y&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);y=null};return x}function Bm(a){var b=Infinity;a=r(a.j.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.ac));return b}
function Vl(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.yb(function(e){c.push(e)});a.m.Kg(c)}
function um(a,b){if(!Bl(a))for(var c=Bm(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Pd(0,c);Vl(a,b.map(function(f){return f.stream}));d=Array.from(a.j.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=Bl(a)&&!a.Wa;c=!Bl(a)&&a.Wa&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?em(a,b,d):(hm(a,b),a.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&em(a,
b))}function fm(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Vm(a){if(!a.i||!a.i.variants.length)return!1;var b=[],c=[];a=r(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 im(a,b,c,d,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y){x=x===void 0?!0:x;y=y===void 0?!0:y;var z,B,H,E,C,A,F,D,J,L,P,O,N,M,S,U,da,aa,Ka,ua,qa,xa,ka,La,za,Na,Oa,la,cb;return I(function(Va){switch(Va.h){case 1:z=d.segments||[];B=z.every(function(pc){return wk(pc.V,"EXT-X-GAP")?!0:!1});if(!z.length||B)throw new R(2,4,4053);Xm(a,d);Bl(a)&&cm(a,d);H=Bl(a)?a.D.get(g):new Map;E=am(a,d,H,c,e,g);C=E.segments;A=E.bandwidth;P=L=J=D=F=null;if(!(C.length>0&&x)){Va.u(2);break}return Va.g(vm(a,C),3);case 3:O=Va.i,g!=
O.type&&Bl(a)&&(a.D.set(O.type,a.D.get(g)),a.D.set(g,new Map)),g=O.type,h=O.language,m=O.channelCount,t=O.sampleRate,a.g.disableText||(n=O.closedCaptions),D=O.height,F=O.width,J=O.qd,L=O.colorGamut,P=O.frameRate,y&&(w=O.mimeType,f=O.codecs);case 2:if(w){Va.u(4);break}return Va.g(Ym(a,g,f,C),5);case 5:w=Va.i,g!=Ic||f||w!="application/mp4"||!C[0]||C[0].Z||(w="text/vtt");case 4:return Va.g($l(a,d,w,e,c),6);case 6:N=Va.i;M=N.drmInfos;S=N.keyIds;U=N.encrypted;da=N.cg;if(U&&!M.length&&!da)throw new R(2,
4,4026);aa=Wm(a,f,g,h,k,l,m,n,q,u,t,v);aa.encrypted=U&&!da;aa.drmInfos=M;aa.keyIds=S;aa.mimeType=w;A&&(aa.bandwidth=A);Gm(aa);g=="video"&&(F||D||J||L)&&Tm(aa,F,D,P,J,null,L);Bl(a)&&cm(a,d);Ka=C[0].startTime;ua=C[C.length-1];qa=ua.endTime;xa=new Uk(C);aa.segmentIndex=xa;La=(ka=wk(d.V,"EXT-X-SERVER-CONTROL"))?qk(ka,"CAN-SKIP-UNTIL")!=null:!1;za=ka?qk(ka,"CAN-BLOCK-RELOAD")!=null:!1;Na=xk(d.V,"EXT-X-MEDIA-SEQUENCE",0);Oa=bm(Na,C);la=Oa.qb;cb=Oa.rb;return Va.return({stream:aa,type:g,me:[],N:e,kc:Ka,ac:qa,
Kd:La,Jd:za,bd:!1,Oe:-1,qb:la,rb:cb,ee:H})}})}function bm(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{qb:a,rb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.A&&(c=0),{qb:a,rb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{qb:a,rb:c}}
function Wm(a,b,c,d,e,f,g,h,k,l,m,n){var q=Em(c,b)||Fm(c),u=[];if(k){k=r(k.split(","));for(var t=k.next();!t.done;t=k.next())u.push(t.value)}t=void 0;k=null;c==Ic?t=u.includes("public.accessibility.transcribes-spoken-dialog")&&u.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":u.includes("public.accessibility.describes-video")&&(k="visually impaired");u.length||t!=="subtitle"||u.push("subtitle");t=null;c!="video"&&(t=f);a={id:a.F++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:q,codecs:b,kind:c==Ic?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:af(d||"und"),originalLanguage:d,label:t,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:u,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:k,external:!1,
fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};Gm(a);return a}
function $l(a,b,c,d,e){var f,g,h,k,l,m,n,q,u,t,v,w,x,y,z,B,H,E,C,A,F,D,J,L,P,O,N,M,S;return I(function(U){switch(U.h){case 1:f=new Map;if(!a.g.ignoreDrmInfo&&b.segments)for(g=r(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=uk(k.V,"EXT-X-KEY"),m=null,l.length)for(m=Zm(a,b,k.V,d,e),n=r(l),q=n.next();!q.done;q=n.next())u=q.value,f.set(u,m);v=t=!1;w=[];x=new Set;y=r(f);z=y.next();case 2:if(z.done){U.u(4);break}B=z.value;H=r(B);E=H.next().value;C=H.next().value;A=E;F=C;D=rk(A,"METHOD");if(D==
"NONE"){U.u(3);break}t=!0;J=W(A,"KEYFORMAT")||"identity";L=null;if(Km(D)){v=!0;U.u(3);break}if(J=="identity")return U.g(Lm(a,A,c,d,F,e),11);P=a.Eb.get(J);if(!P){O=null;U.u(9);break}return U.g(P(A,c,F),10);case 10:O=U.i;case 9:L=O;U.u(6);break;case 11:L=U.i;case 6:if(L){if(L.keyIds)for(N=r(L.keyIds),M=N.next();!M.done;M=N.next())S=M.value,x.add(S);w.push(L)}case 3:z=y.next();U.u(2);break;case 4:return U.return({drmInfos:w,keyIds:x,encrypted:t,cg:v})}})}
function $m(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ya("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new R(2,4,4042);var f=0,g=W(b,"IV","");if(g){var h=wc(g.substr(2));if(h.byteLength!=16)throw new R(2,4,4048);}else f=xk(c.V,"EXT-X-MEDIA-SEQUENCE",0);var k=yk(d(),rk(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.va.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(rk(b,
"METHOD")){case "AES-256":m.bitsKey=256;break;case "AES-256-CTR":m.bitsKey=256,m.blockCipherMode="CTR"}m.fetchKey=function(){var n,q,u,t;return I(function(v){if(v.h==1)return a.O.has(l)||(n=gj(k,a.g.retryParameters),q=zm(a,n,6).promise,a.O.set(l,q)),v.g(a.O.get(l),2);if(v.h!=3){u=v.i;if(!u.data||u.data.byteLength!=m.bitsKey/8)throw new R(2,4,4049);t={name:m.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:m.bitsKey};return v.g(window.crypto.subtle.importKey("raw",u.data,t,!0,["decrypt"]),3)}m.cryptoKey=
v.i;m.fetchKey=void 0;v.j()})};a.va.set(c,m)}return a.va.get(c)}function sm(a,b){a.o==null&&(b=wk(b.V,"EXT-X-START"))&&(a.o=Number(rk(b,"TIME-OFFSET")))}function Xm(a,b){var c=wk(b.V,"EXT-X-PLAYLIST-TYPE");b=wk(b.V,"EXT-X-ENDLIST");b=c&&c.value=="VOD"||b;c=c&&c.value=="EVENT"&&!b;c=!b&&!c;b?Wl(a,yl):c?Wl(a,Am):Wl(a,an)}
function cm(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;e>=0;){var f=wk(d[e].V,"EXTINF");if(f){c=Bk(f);break}e--}d=wk(b.V,"EXT-X-TARGETDURATION");if(!d)throw new R(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=wk(b.V,"EXT-X-PART-INF"))a.U=Number(rk(e,"PART-TARGET"));b=wk(b.V,"EXT-X-SERVER-CONTROL");a.za&&a.U?(a.A=a.Sb?a.U*5<=c?Math.min(a.U,a.A):Math.min(c,a.A):Math.min(a.U,a.A),a.Ha=b?Number(rk(b,"PART-HOLD-BACK")):0):(a.A=Math.min(c,a.A),c=b?qk(b,"HOLD-BACK"):null,
a.Ga=c?Number(c.value):0);a.Ra=Math.max(d,a.Ra)}function tm(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Ha)c=a.Ha;else if(a.Ga)c=a.Ga;else for(var d=b.segments.length,e=d-Math.min(d,a.g.hls.liveSegmentsDelay);e<d;e++){var f=wk(b.segments[e].V,"EXTINF");c=f?c+Bk(f):c+a.Ra}a.o&&a.o<0&&(c=Math.min(-a.o,c),a.o+=c);a.m.Zg(0);a.m.Xg(c);a.m.se(!1)}
function Zm(a,b,c,d,e){var f=wk(c,"EXT-X-MAP");if(!f)return null;var g=rk(f,"URI"),h=yk(d(),g,e);g=[h.toString(),W(f,"BYTERANGE","")].join("-");if(!a.Ca.has(g)){var k=void 0,l=null,m=!1;c=r(c);for(var n=c.next();!n.done;n=c.next())n=n.value,n.name=="EXT-X-KEY"?(m=rk(n,"METHOD"),Km(m)&&n.id<f.id?(m=!1,k=$m(a,n,b,d,e)):m=m!="NONE"):n.name=="EXT-X-BYTERANGE"&&n.id<f.id&&(l=n);b=bn(h,f,l,k,m);a.Ca.set(g,b)}return a.Ca.get(g)}
function bn(a,b,c,d,e){var f=0,g=null;b=W(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(f=b.split("@"),g=Number(f[0]),f=Number(f[1]),g=f+g-1,d&&(c=g+1-f,c%16&&(g+=16-c%16)));return new Hk(function(){return a},f,g,null,null,null,d,e)}
function cn(a,b,c,d,e,f,g,h,k,l){var m=d.V,n=wk(m,"EXTINF"),q=0,u=0,t=null;d.g.length&&(a.i.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=wk(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=Dd(w.value),a.Wa=!0)}var x=Jk;wk(m,"EXT-X-GAP")&&(a.i.gapCount++,x=2);if(!n){if(d.g.length==0)throw new R(2,4,4024,"EXTINF");if(!a.za)return null}var y=[];w=!1;var z=null,B=!1,H=!1;if(a.za&&d.g.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var E=
v,C={},A=0;A<d.g.length;C={xe:void 0,hd:void 0},A++){var F=d.g[A],D=A==0?c:y[y.length-1],J=A==0?e:D.endTime,L=Number(W(F,"DURATION"))||a.U;if(L){var P=J+L,O=0,N=null;F.name=="EXT-X-PRELOAD-HINT"?(O=(O=W(F,"BYTERANGE-START"))?Number(O):0,(D=W(F,"BYTERANGE-LENGTH"))?N=O+Number(D)-1:O&&(N=Number.MAX_SAFE_INTEGER)):(O=W(F,"BYTERANGE"),N=r(dn(D,O)),O=N.next().value,N=N.next().value);C.hd=W(F,"URI");if(C.hd){D=Jk;W(F,"GAP")=="YES"&&(a.i.gapCount++,D=2,B=!0);C.xe=null;var M=function(U){return function(){U.xe==
null&&(U.xe=yk(h(),U.hd,f));return U.xe}}(C);q&&O>=0&&N!=null&&(z=M,w=!0);J=new X(J,P,M,O,N,b,0,0,Infinity,[],"",null,E,D,l);F.name=="EXT-X-PRELOAD-HINT"&&(J.vf(),H=!0);W(F,"INDEPENDENT")!="YES"&&A>0&&J.Eg();F=k;F||(y.length&&y[0].mimeType?F=y[0].mimeType:C.hd&&(C=ml(C.hd),F=en.get(g).get(C)||null));F&&(J.mimeType=F,fn.has(F)&&(J.Z=null));y.push(J);E&&(E+=L)}}}}if(n){n=Bk(n);if(n==0)return null;q=e+n}else if(y.length)q=y[y.length-1].endTime;else return null;w&&(B||y[0].startByte!=0?(w=!1,z=null):
y=[]);(n=wk(m,"EXT-X-BYTERANGE"))?(t=r(dn(c,n.value)),u=t.next().value,t=t.next().value):y.length&&(u=y[0].startByte,t=y[y.length-1].endByte);c="";n=null;g=="image"&&(c="1x1",g=wk(m,"EXT-X-TILES"))&&(c=rk(g,"LAYOUT"),(g=W(g,"DURATION"))&&(n=Number(g)));var S=null;b=new X(e,q,function(){if(z)return z();S==null&&(S=yk(h(),d.h,f));return S||[]},u,t,b,0,0,Infinity,y,c,n,v,x,l,y.length>0&&!!d.h);k&&(b.mimeType=k,fn.has(k)&&(b.Z=null));w&&(a.Sb=!0,b.Cg(),H&&b.vf());return b}
function dn(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 dm(a,b,c,d,e){if(c=="video"||c=="audio"){var f=a.m.m;if(f!=null&&!fm(a,c))for(b=uk(b,"EXT-X-DATERANGE"),b=b.filter(function(D){return qk(D,"START-DATE")!=null}).sort(function(D,J){D=rk(D,"START-DATE");J=rk(J,"START-DATE");return D<J?-1:D>J?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=rk(g,"START-DATE"),k=Dd(h);if(!isNaN(k)){var l=Math.max(0,k-f),m=null,n=W(g,"END-DATE");if(n){var q=Dd(n);if(!isNaN(q)&&(m=q-f,m<0))continue}if(m==null){var u=W(g,"DURATION")||W(g,"PLANNED-DURATION");if(u){var t=
parseFloat(u);isNaN(t)||(m=l+t);if(k-f+t<0)continue}}var v=W(g,"CLASS")||"com.apple.quicktime.HLS",w=W(g,"END-ON-NEXT")=="YES";if(m==null&&w){for(var x=c+1;x<b.length;x++){var y=W(b[x],"CLASS")||"com.apple.quicktime.HLS";if(v==y){var z=rk(b[x],"START-DATE"),B=Dd(z);if(!isNaN(B)&&B&&B>k){m=Math.max(0,B-f);break}}}if(m==null)continue}x=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var H=[],E=r(g.attributes),C=E.next();!C.done;C=E.next()){var A=C.value;if(!x.includes(A.name)){var F=
Ak(A.value,d);if(A.name=="X-ASSET-URI"||A.name=="X-ASSET-LIST")F=yk(e(),A.value,d)[0];H.push({key:A.name,description:"",data:F,mimeType:null,pictureType:null})}}if(H.length>1)a.h.onMetadata(v,l,m,H)}}catch(D){}}}}
function am(a,b,c,d,e,f){function g(D){D=ml(D);if(!D)return null;var J=en.get(f).get(D);J||(J=xm.get(D));return J}var h=b.segments,k=null,l=null,m=null,n=null,q=void 0,u=xk(b.V,"EXT-X-DISCONTINUITY-SEQUENCE",-1),t=xk(b.V,"EXT-X-MEDIA-SEQUENCE",0),v=wk(b.V,"EXT-X-SKIP"),w=v?Number(W(v,"SKIPPED-SEGMENTS")):0,x=t+w,y=0;Bl(a)&&c.has(x)&&(y=c.get(x));y===0&&a.Fa==Am&&c.size>0&&!c.has(x)&&a.m.i!=null&&(y=a.m.Vd());var z=[],B=null;v=[];for(var H=0;H<h.length;H++){var E=h[H];(x=wk(E.V,"EXT-X-MAP"))&&x.id!==
l&&(k=Zm(a,b,E.V,e,d),l=x.id);x=E.h;var C="";x&&(C=ml(x));C!==n&&(m=g(x),n=C);C=H==0?y:B.endTime;x=t+w+H;wk(E.V,"EXT-X-DISCONTINUITY")&&(u++,B&&B.Z&&(B.Z.g=C));for(var A=r(E.V),F=A.next();!F.done;F=A.next())F=F.value,F.name=="EXT-X-KEY"&&(Km(rk(F,"METHOD"))?q=$m(a,F,b,e,d):q=void 0);c.set(x,C);if(C=cn(a,k,B,E,C,d,f,e,m,q)){if(B=xk(E.V,"EXT-X-BITRATE"))v.push({bitrate:B,duration:C.endTime-C.startTime}),C.bandwidth=B;else if(C.endByte){if(E=Kk(C))B=C.endTime-C.startTime,E=E*8/B/1E3,v.push({bitrate:E,
duration:B}),C.bandwidth=E}else v.length&&(B=v[v.length-1],B.duration+=C.endTime-C.startTime,C.bandwidth=B.bitrate);if(C.bandwidth)for(B=r(C.g),E=B.next();!E.done;E=B.next())E.value.bandwidth=C.bandwidth;B=C;C.i=u;fm(a,f)&&a.L!=null&&x<a.L||z.push(C)}}b=void 0;v.length&&(b=v.reduce(function(D,J){return D+J.duration},0),b=Math.round(v.reduce(function(D,J){return D+J.bitrate*J.duration},0)/b*1E3));if(v=z.some(function(D){return D.h!=null}))for(c={},d=0;d<z.length;c={Rd:void 0,Qd:void 0,Gd:void 0,nc:void 0,
Fd:void 0},d++)if(c.nc=z[d],c.nc.h==null)for(c.Qd=0,c.Rd=d,e=function(D){return function(){var J=z[D.Rd];if(J){if(J.h!=null)return J.h+D.Qd;D.Qd-=J.endTime-J.startTime;D.Rd+=1}return null}}(c),c.Fd=0,c.Gd=d,h=function(D){return function(){var J=z[D.Gd];if(J){J!=D.nc&&(D.Fd+=J.endTime-J.startTime);if(J.h!=null)return J.h+D.Fd;--D.Gd}return null}}(c);c.nc.h==null;)c.nc.h=h(),c.nc.h==null&&(c.nc.h=e());if(v)for(c=r(z),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=r(e.g),h=e.next();!h.done;h=e.next())h=
h.value,h.h=d,d+=h.endTime-h.startTime;c=a.na;if(v&&c!=Infinity&&!fm(a,f))for(a=r(z),v=a.next();!v.done;v=a.next())v.value.Qf(c);return{segments:z,bandwidth:b}}function Em(a,b){if(a==Ic){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 Fm(a){return a==Ic?"text/vtt":en.get(a).get("mp4")}
function wm(a,b){a=Bl(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];c.Bb()==2&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function Ym(a,b,c,d){var e,f,g,h,k,l,m,n,q,u,t,v,w;return I(function(x){switch(x.h){case 1:e=mj;f=wm(a,d);g=f.segment;if(g.status==2)return x.return(Fm(b));k=g.N();if(l=ml(k[0]))if(m=en.get(b),(n=m.get(l))||(n=xm.get(l)))return x.return(n);if(h=Em(b,c))return x.return(h);u=1;t=gj(k,a.g.retryParameters);x.m(2);t.method="HEAD";return x.g(zm(a,t,e,{type:u}).promise,4);case 4:v=x.i;q=v.headers["content-type"];x.o(3);break;case 2:w=x.l();if(!w||w.code!=1002&&w.code!=1001){x.u(3);break}t.method="GET";a.g.hls.allowRangeRequestsToGuessMimeType&&
(t.headers.Range="bytes=0-0");return x.g(zm(a,t,e,{type:u}).promise,6);case 6:v=x.i,q=v.headers["content-type"];case 3:if(!q){x.u(7);break}h=q.toLowerCase().split(";")[0];if(h!="application/octet-stream"){x.u(8);break}if(v.data.byteLength){x.u(9);break}t.method="GET";return x.g(zm(a,t,e,{type:u}).promise,10);case 10:v=x.i;case 9:$h(Q(v.data))&&(h="video/mp2t");case 8:if(h!="application/octet-stream")return x.return(h);case 7:return x.return(Fm(b))}})}
function Tm(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function zl(a,b,c){return zm(a,gj(b,a.g.retryParameters),0,{type:c?2:3})}
function xl(a){var b,c,d,e,f,g;return I(function(h){switch(h.h){case 1:if(!a.h)return h.return();h.m(2);b=Date.now();return h.g(a.update(),4);case 4:c=Date.now();Bl(a)&&(d=(c-b)/1E3,a.Cb.sample(1,d),e=a.g.updatePeriod>0?a.g.updatePeriod:a.A,f=Math.max(0,e-Ta(a.Cb)),isFinite(f)?a.B.ma(f):a.B.ma(1));h.o(3);break;case 2:g=h.l();if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.B.ma(.1);case 3:if(!a.h)return h.return();
a.h.onManifestUpdated();h.j()}})}function Bl(a){return a.Fa!=yl}function Wl(a,b){a.Fa=b;a.m&&a.m.se(!Bl(a));Bl(a)||a.B.stop()}function zm(a,b,c,d){if(!a.ha)throw new R(2,7,7001);d||(d={});d.isPreload=a.Db();b=a.h.networkingEngine.request(c,b,d);aj(a.ha,b);return b}function Km(a){return a=="AES-128"||a=="AES-256"||a=="AES-256-CTR"}
function wl(a,b,c,d){var e,f,g,h,k,l;return I(function(m){if(m.h==1){if(c=="video/mp2t")throw new R(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new R(2,4,4041);e=rk(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";e=="SAMPLE-AES"&&(g="cbcs");h=rk(b,"URI");k=Bc("com.apple.fps",g,null,h);var n=(new Ab(h)).gb.replace(/-/g,"").toLowerCase();return(l=n.length===32&&/^[0-9a-f]+$/.test(n)?n:null)||!d?m.u(2):m.g(gn(a,d),3)}m.h!=2&&(l=m.i);l&&k.keyIds.add(l);
return m.return(k)})}
function Lm(a,b,c,d,e,f){var g,h,k,l,m,n,q,u,t,v,w,x;return I(function(y){switch(y.h){case 1:if(c=="video/mp2t")throw new R(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new R(2,4,4041);g=rk(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return y.return(null);k=yk(d(),rk(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=xc(vc(k[0].split("data:text/plain;base64,").pop()));y.u(2);break}m=k.sort().join("");a.xa.has(m)||(n=gj(k,a.g.retryParameters),q=zm(a,n,6).promise,
a.xa.set(m,q));return y.g(a.xa.get(m),3);case 3:u=y.i,l=xc(u.data);case 2:t="00000000000000000000000000000000";if(!e){y.u(4);break}return y.g(gn(a,e),5);case 5:(v=y.i)&&(t=v);case 4:return w=new Map,w.set(t,l),x="cenc",g=="SAMPLE-AES"&&(x="cbcs"),y.return(Cc(w,x))}})}
function gn(a,b){var c,d,e,f;return I(function(g){if(g.h==1){c=null;if(a.ya.has(b))return c=a.ya.get(b),g.u(2);d=ol(b.N(),b.Zb(),b.Yb(),a.g.retryParameters);e=mj;return g.g(zm(a,d,e,{type:0}).promise,3)}g.h!=2&&(f=g.i,b.ld(f.data),c=gl(f.data),a.ya.set(b,c));return g.return(c)})}K("shaka.hls.HlsParser",vl);
var xm=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),hn=(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"),jn=(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"),kn=(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"),ln=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),en=(new Map).set("audio",hn).set("video",jn).set("text",kn).set("image",ln),fn=new Set(["video/mp2t"].concat(G(re))),
yl="VOD",an="EVENT",Am="LIVE";Qc("application/x-mpegurl",function(){return new vl});Qc("application/vnd.apple.mpegurl",function(){return new vl});Qc("audio/x-mpegurl",function(){return new vl});function mn(a,b,c){c=c===void 0?!0:c;this.h=a;this.g=new Set([a]);b=b||[];a=r(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}
mn.prototype.add=function(a,b){var c=this.h;b=b===void 0?!0:b;var d;if(!(d=!!c.audio!=!!a.audio||!!c.video!=!!a.video||c.language!=a.language)&&(d=c.audio&&a.audio)){d=c.audio;var e=a.audio;d=!(!((!d.channelsCount||!e.channelsCount||d.channelsCount>2||e.channelsCount>2)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!nn(d,e))&&fb(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||nn(c,d))&&fb(c.roles,d.roles)));return d?!1:(this.g.add(a),
!0)};mn.prototype.values=function(){return this.g.values()};function nn(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(c){return Ce(c)});b=b.codecs.split(",").map(function(c){return Ce(c)});return fb(a,b)}K("shaka.media.AdaptationSet",mn);function on(){this.g=pn;this.j=(new Map).set(pn,2).set(qn,1);this.i=0;this.h=-1}function rn(a,b){var c=a.g!==b;a.g=b;c&&b===pn&&(a.i=Date.now());return c}var qn=0,pn=1;function sn(a){this.g=a=a===void 0?[]:a}
function tn(a){if(a.g.length===0)throw Error("StreamInfos must have elements");for(var b=[],c=r(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=un;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;g.type=="audio"&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(vn+1));m=Math.floor(m%(vn+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(G(wn(h,4)),[0,0,0,0],G(wn(n,4)),G(wn(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],G(wn(k,2)),[0,0],G(wn(l,2)),[0,0]));h=un("tkhd",h);k=un;n=g.duration*g.timescale;l=Math.floor(n/(vn+1));n=Math.floor(n%(vn+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(G(wn(g.timescale,4)),G(wn(l,4)),G(wn(n,4)),G(wn(m,2)),[0,0]));l=un("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=xn.value();break;case "audio":m=yn.value()}n=un("hdlr",
m);a:{switch(g.type){case "video":g=un("minf",un("vmhd",zn.value()),An.value(),Bn(g));break a;case "audio":g=un("minf",un("smhd",Cn.value()),An.value(),Bn(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}c=a.g[0];e=un;f=e.apply;g=c.duration*c.timescale;d=Math.floor(g/(vn+1));g=Math.floor(g%(vn+1));d=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(G(wn(c.timescale,4)),G(wn(d,4)),G(wn(g,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]));d=["moov",un("mvhd",d)];g=d.concat;b=G(b);h=[];a=r(a.g);for(n=a.next();!n.done;n=a.next())k=h,l=k.push,n=new Uint8Array([0,0,0,0].concat(G(wn(n.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),n=un("trex",n),l.call(k,n);a=un.apply(sn,["mvex"].concat(G(h)));a=f.call(e,sn,g.call(d,b,[a,Dn(c.stream)]));b=En.value();c=new Uint8Array(b.byteLength+a.byteLength);c.set(b);c.set(a,b.byteLength);
return c}
function Bn(a){var b=un,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=qb().kd()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;d=a.stream.height||0;if(a.Ja.byteLength>0)var e=un("avcC",a.Ja);else{e=un;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.mb.length;n++){var q=Fn(a.mb[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),
f+=q.length+2}}g.length>0&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(G(wn(c,2)),G(wn(d,2)),[0,72,0,0,0,72,
0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Gn(a);g=new Uint8Array([]);Hn(a.stream)&&(g=In(a.stream,a.codecs),d="encv");d=un(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),a.Ja.byteLength>0&&(c=un("hvcC",a.Ja)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(G(wn(d,2)),G(wn(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,
100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Gn(a),g=new Uint8Array([]),Hn(a.stream)&&(g=In(a.stream,a.codecs),e="encv"),d=un(e,d,c,h,g));break;case "audio":if(c=="mp3")a=un(".mp3",Jn(a));else if(c=="ac-3")c=un("dac3",a.qa),d="ac-3",e=new Uint8Array([]),Hn(a.stream)&&(e=In(a.stream,a.codecs),d="enca"),a=un(d,Jn(a),c,e);else if(c=="ec-3")c=un("dec3",a.qa),d="ec-3",e=new Uint8Array([]),Hn(a.stream)&&(e=In(a.stream,a.codecs),d="enca"),
a=un(d,Jn(a),c,e);else if(c=="opus")c=un("dOps",a.qa),d="Opus",e=new Uint8Array([]),Hn(a.stream)&&(e=In(a.stream,a.codecs),d="enca"),a=un(d,Jn(a),c,e);else{if(a.qa.byteLength>0)c=un("esds",a.qa);else{c=un;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Dc("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if(k==="mp4a.40.5"||k==="mp4a.40.29")h=l[g*2];g=parseInt(k.split(".").pop(),10);d=
new Uint8Array([0,0,0,0,3,25].concat(G(wn(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);Hn(a.stream)&&(e=In(a.stream,a.codecs),d="enca");a=un(d,Jn(a),c,e)}d=a}a=un("stsd",Kn.value(),d);return b("stbl",a,un("stts",Ln.value()),un("stsc",Mn.value()),un("stsz",Nn.value()),un("stco",On.value()))}
function Gn(a){if(!a.Pa&&!a.Qa)return new Uint8Array([]);var b=a.Qa;a=new Uint8Array([].concat(G(wn(a.Pa,4)),G(wn(b,4))));return un("pasp",a)}function Jn(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(G(wn(a.stream.audioSamplingRate||44100,2)),[0,0]))}
function Dn(a){var b=[];if(!Hn(a))return new Uint8Array([]);a=r(a.drmInfos);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.initData){c=r(c.initData);for(var d=c.next();!d.done;d=c.next())b.push(d.value.initData)}return yc.apply(rc,G(b))}
function In(a,b){var c=un;b=new Uint8Array([].concat(G(wn(Pn(b.split(".")[0]),4))));b=un("frma",b);var d="cenc";var e=a.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(G(wn(Pn(d),4)),[0,1,0,0]));d=un("schm",d);e=un;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=r(a.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=r(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Fn(h.value)}a=new Uint8Array([0,0,0,0,
0,0,1,8]);f=un("tenc",a,f);return c("sinf",b,d,e("schi",f))}
function Qn(a){var b=[];a=r(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b,e=d.push;var f=un;var g=new Uint8Array([0,0,0,0].concat(G(wn(c.data?c.data.sequenceNumber:0,4))));g=un("mfhd",g);var h;var k=c.data?c.data.cb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Od<<4|m.$d<<2|m.Xd}k=un("sdtp",l);var n=k.length+32+20+8+16+8+8;l=un;h=new Uint8Array([0,0,0,58].concat(G(wn(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=un("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
0;var q=Math.floor(m%(vn+1));m=new Uint8Array([1,0,0,0].concat(G(wn(Math.floor(m/(vn+1)),4)),G(wn(q,4))));m=un("tfdt",m);var u=n;n=c.data?c.data.cb:[];q=n.length;var t=12+16*q,v=new Uint8Array(t);u+=8+t;v.set([c.type==="video"?1:0,0,15,1].concat(G(wn(q,4)),G(wn(u,4))),0);for(u=0;u<q;u++){var w=n[u];t=wn(w.duration,4);var x=wn(w.size,4),y=w.flags;w=wn(w.$a,4);v.set([].concat(G(t),G(x),[y.rf<<2|y.Od,y.$d<<6|y.Xd<<4|y.tf,y.Nd&61440,y.Nd&15],G(w)),12+16*u)}n=un("trun",v);k=l("traf",h,m,n,k);f=f("moof",
g,k);e.call(d,f,Rn(c))}return yc.apply(rc,G(b))}function Rn(a){a=(a.data?a.data.cb:[]).map(function(b){return b.data});return un.apply(sn,["mdat"].concat(G(a)))}function wn(a,b){var c=[];for(--b;b>=0;b--)c.push(a>>8*b&255);return c}function Fn(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[c*2]+a[c*2+1]),16);return b}function Pn(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<(a.length-c-1)*8;return b}
function un(a){var b=Ga.apply(1,arguments),c=Sn.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Sn.set(a,c));for(var d=8,e=b.length-1;e>=0;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}function Hn(a){return a.encrypted&&a.drmInfos.length>0}
var vn=4294967295,Sn=new Map,xn=new ob(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])}),yn=new ob(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])}),Ln=new ob(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),Mn=new ob(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),On=new ob(function(){return new Uint8Array([0,
0,0,0,0,0,0,0])}),Nn=new ob(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),zn=new ob(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),Cn=new ob(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),Kn=new ob(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),En=new ob(function(){var a=new Uint8Array([105,115,111,109]),b=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);return un("ftyp",a,c,a,b)}),An=new ob(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=un("dref",a);return un("dinf",a)});function Tn(a){a=Q(a);var b=null;(new $g).boxes(["moov","trak","mdia","minf","stbl"],eh).ea("stsd",gh).box("enca",function(c){b=c.reader.h;return ih(c)}).box("sinf",eh).box("frma",function(c){c.parser.stop();ph(c.reader).codec==="ec-3"&&b&&b.getUint16(16)!==2&&b.setUint16(16,2)}).parse(a);return a}
function Un(a,b,c){var d=b=Q(b),e=!1,f,g=[],h=[];(new $g).boxes(["moov","trak","mdia","minf","stbl"],function(l){g.push(l);eh(l)}).ea("stsd",function(l){f=l;g.push(l);gh(l)}).boxes(["encv","enca"],function(l){e=!0;l.parser.stop()}).boxes("dvav dva1 dvh1 dvhe dvc1 dvi1 hev1 hvc1 avc1 avc3".split(" "),function(l){h.push({box:l,Ig:1701733238})}).boxes("ac-3 ec-3 ac-4 Opus fLaC mp4a".split(" "),function(l){h.push({box:l,Ig:1701733217})}).parse(b);if(e)return b;if(h.length==0||!f)throw bb(xc(b)),new R(2,
3,3019,c);h.reverse();c=r(h);for(var k=c.next();!k.done;k=c.next())k=k.value,d=Vn(a,d,f,k.box,g,k.Ig);d=Wn(a,d);return qb().Hf()?(a=new Uint8Array(b.byteLength+d.byteLength),a.set(d),a.set(b,d.byteLength),a):d}function Xn(a){a=Q(a);var b=[];(new $g).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(Yn(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return yc.apply(rc,G(c))}
function Yn(a){var b,c,d,e,f=[];(new $g).boxes(["moof","traf"],function(m){f.push(m);eh(m)}).ea("tfhd",function(m){b=m;d=kh(m.reader,m.flags)}).ea("trun",function(m){c=m;e=nh(m.reader,m.version,m.flags)}).parse(a);if(d&&d.Tg!==2){var g=b.start+fh(b)+4+(d.Ah!==null?8:0),h=Ub(a);if(d.Tg!==null)h.setUint32(g,2);else{Zn(a,b.start,b.size+4);var k=h.getUint32(b.start+8);h.setUint32(b.start+8,k|2);e&&e.Ne!==null&&h.setInt32(c.start+fh(c)+4,e.Ne+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=r(f);for(h=g.next();!h.done;h=g.next())h=h.value,Zn(a,h.start,h.size+4)}}return a}
function Vn(a,b,c,d,e,f){var g=In(a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Ub(a).setUint32(4,f);a.set(g,d.size);Zn(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=qb().Zd()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=r(e);for(e=b.next();!e.done;e=b.next())e=e.value,Zn(f,e.start,e.size+a.byteLength);a=Ub(f,c.start);c=fh(c);b=a.getUint32(c);a.setUint32(c,b+1);return f}
function Wn(a,b){a=Dn(a);if(a.byteLength===0)return b;var c=0,d=0;(new $g).box("moov",function(h){c=h.start;d=h.size;h.parser.stop()}).parse(b);var e=c+d;Zn(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 Zn(a,b,c){a=Ub(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 $n(a){var b=Q(a),c=[];(new $g).boxes(["moov","trak","mdia","minf","stbl"],function(d){c.push({start:d.start,size:d.size});eh(d)}).box("stsd",function(d){c.push({start:d.start,size:d.size});for(var e=Ub(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 ao(a){return a.length==1&&a.end(0)-a.start(0)<1E-4}function bo(a){return!a||ao(a)?null:a.length==1&&a.start(0)<0?0:a.length?a.start(0):null}function co(a){return!a||ao(a)?null:a.length?a.end(a.length-1):null}function eo(a,b){return!a||!a.length||ao(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function fo(a,b){if(!a||!a.length||ao(a))return 0;var c=0;a=r(go(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 ho(a,b,c){if(!a||!a.length||ao(a))return null;a=go(a).findIndex(function(d,e,f){return d.start>b&&(e==0||f[e-1].end-b<=c)});return a>=0?a:null}function go(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 io(a,b,c,d){var e=this;this.A=d;this.g=a;this.D=b;this.h=c;this.l=new jb;this.o=!1;this.m=0;this.C=!1;this.G=this.F=0;this.j=jo(this);this.B=!1;this.l.H(a,"waiting",function(){return ko(e)});this.i=(new Se(function(){ko(e)})).Da(this.h.gapJumpTimerTime)}io.prototype.release=function(){this.l&&(this.l.release(),this.l=null);this.i!=null&&(this.i.stop(),this.i=null);this.j&&(this.j.release(),this.j=null);this.g=this.D=this.A=null};
io.prototype.Ic=function(){this.B=!0;this.i&&this.i.Da(this.h.gapJumpTimerTime);ko(this)};
function ko(a){if(a.g.readyState!=0){if(a.g.seeking){if(!a.o)return}else a.o=!1;if(!a.g.paused||a.g.currentTime==a.m&&(a.g.autoplay||a.g.currentTime!=a.m))if(!a.j||!lo(a.j)){var b=a.g.currentTime,c=a.g.buffered,d=ho(c,b,a.h.gapDetectionThreshold);if(d==null&&a.j&&!lo(a.j))for(var e=go(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.B||(e=c.start(d),(f=a.h.gapPadding)&&(e=Math.ceil((e+f)*100)/100),e>=a.D.ib()||e-b<.001||(d!=0&&c.end(d-1),mo(a,
e),b==a.m&&(a.m=e),a.F++,a.A(new Yi("gapjumped"))))}}}function mo(a,b){a.C=!0;a.l.Na(a.g,"seeked",function(){a.C=!1});a.g.currentTime=b}function jo(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new no(new oo(a.g),b,function(){var d;return I(function(e){if(e.h==1)return d=go(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.u(2)):e.g(a.g.play(),3):e.return();if(e.h!=2){if(!a.g)return e.return();a.g.pause();a.g.play()}a.G++;a.A(new Yi("stalldetected"));e.j()})})}
function no(a,b,c){this.h=a;this.m=po(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.o=b;this.j=c}no.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function lo(a){var b=a.h,c=po(b),d=b.g.currentTime,e=Date.now()/1E3;if(a.g!=d||a.m!=c)a.l=e,a.g=d,a.m=c,a.i=!1;d=e-a.l;if(c=d>=a.o&&c&&!a.i)a.j&&a.j(a.g,d),a.i=!0,a.g=b.g.currentTime;return c}
function oo(a){var b=this;this.g=a;this.h=new jb;this.i=!1;this.h.H(this.g,"audiofocuspaused",function(){b.i=!0});this.h.H(this.g,"audiofocusgranted",function(){b.i=!1});this.h.H(this.g,"audiofocuslost",function(){b.i=!0})}function po(a){if(a.g.paused||a.g.playbackRate==0||a.i||a.g.buffered.length==0)var b=!1;else a:{b=a.g.currentTime;a=r(go(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b}
oo.prototype.release=function(){this.h&&this.h.release();this.h=null};function qo(a,b,c){this.h=a;this.i=b;this.g=c}function ro(a,b){return I(function(c){if(c.h==1)return c.g(nf(a.g,b,a.h.drm.preferredKeySystems,a.h.drm.keySystemsMapping),2);a.h.streaming.dontChooseCodecs||kf(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes,a.h.preferredTextFormats);if(!b.variants.some(Mf))throw new R(2,4,4032);return c.return(so(a,b))})}
function to(a,b){var c=a.h.restrictions;a=a.i;var d=!1;b=r(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=mf(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
function so(a,b){var c=to(a,b);if(b){var d=a.g?a.g.g:null;if(d&&a.g.B){for(var e=new Set,f=r(b.variants),g=f.next();!g.done;g=f.next())g=g.value,g.audio&&e.add(g.audio),g.video&&e.add(g.video);e=r(e);for(f=e.next();!f.done;f=e.next())uo(a,d.keySystem,f.value)}vo(a,b)}return c}
function uo(a,b,c){c=r(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){for(var e=r(d.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,Jj(a.g,f.initDataType,f.initData);e=a.g;e.g&&(e.g.mediaTypes!==d.mediaTypes&&(e.g.mediaTypes=d.mediaTypes),Xb(d)&&(e.g=Tj(e,e.g.keySystem,[e.g,d])))}}
function vo(a,b){function c(l){if(l&&!h.has(l)&&(h.add(l),l.keyIds.size)){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=d[e?"00":m];n?wo.includes(n)&&g.add(n):f.add(m)}}}var d=a.g?a.g.Td():{};a=Object.keys(d);var e=a.length&&a[0]=="00";a=!1;var f=new Set,g=new Set,h=new WeakSet;b=r(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 R(2,4,4012,a);}var wo=["output-restricted","internal-error"];function xo(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 yo(a,b,c,d,e){var f=this;this.g=a;this.O=c;this.B=d;this.ka=b;this.l=new Map;this.D=new Map;this.Ga=new Map;this.h=null;this.Fa=!1;this.C=e||null;this.m=new Map;this.A=new jb;this.j=new Map;this.J=null;this.L=new Ri;this.Ca="";this.Xa=!1;this.za=!0;this.M=!1;this.K=this.$=null;this.i=zo(this,this.L);this.Ha=this.G=!1;this.F=new oj(function(){return Ao(f)});this.I=!1;this.R="UNKNOWN";this.Ra=this.Wa=!1;this.Oa=new Ri;this.o=!1;this.ya=null;this.ha=new Map;this.va=this.U=this.xa=this.Y=null;
this.na=new Ri;this.g.remote&&(this.M=this.g.remote.state!="disconnected",this.A.H(this.g.remote,"connect",function(){f.M=f.g.remote.state!="disconnected"}),this.A.H(this.g.remote,"connecting",function(){f.M=f.g.remote.state!="disconnected"}),this.A.H(this.g.remote,"disconnect",function(){f.M=f.g.remote.state!="disconnected"}))}
function zo(a,b){a.za=!0;if(window.ManagedMediaSource){a.K||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.A.H(c,"startstreaming",function(){a.za=!0});a.A.H(c,"endstreaming",function(){a.za=!1})}else c=new MediaSource;a.A.Na(c,"sourceopen",function(){URL.revokeObjectURL(a.Ca);b.resolve()});a.A.Na(a.g,"playing",function(){a.Xa=!0});a.Ca=Bo(c);Co(a);a.B.useSourceElements?(a.$=pi(a.Ca),a.g.appendChild(a.$),a.K&&a.g.appendChild(a.K),a.g.load()):a.g.src=a.Ca;return c}
function Do(a,b,c){if(a.g&&window.ManagedMediaSource&&a.i&&a.B.useSourceElements){var d;((d=a.K)==null?void 0:d.parentElement)===a.g&&a.g.removeChild(a.K);a.K=pi(b,c);a.g.appendChild(a.K);a.g.disableRemotePlayback=!1}}
function Eo(){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(G(re)),b=
{};qb();a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Ke(c))b[c]=!0;else if(Tc()){var d=De(c),e=zf(Ee(c),d);d=qe(d,e);b[c]=$k(d)||(ke(d)?!0:!1)}else b[c]=Uc().canPlayType(c)!="";d=c.split(";")[0];b[d]=b[d]||b[c]}return b}p=yo.prototype;p.destroy=function(){return this.F.destroy()};
function Ao(a){var b,c,d,e,f,g,h,k,l,m,n,q,u,t,v;return I(function(w){if(w.h==1){b=[];c=r(a.m);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=r(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.m.set(l,h.slice(0,1)),k&&b.push(k.p.catch(We)),m=r(h.slice(1)),n=m.next();!n.done;n=m.next())q=n.value,q.p.reject(new R(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return w.g(Promise.all(b),2)}u=r(a.j.values());for(t=u.next();!t.done;t=u.next())v=t.value,v.destroy();a.A&&(a.A.release(),a.A=null);a.g&&(Co(a),
a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.$=null;a.K=null;a.B=null;a.i=null;a.h=null;a.ka=null;a.l.clear();a.Ga.clear();a.j.clear();a.J=null;a.m.clear();a.C=null;a.ha.clear();a.O=null;w.j()})}function Co(a){if(a.g){a.g.removeAttribute("src");var b;((b=a.$)==null?void 0:b.parentElement)===a.g&&a.g.removeChild(a.$);var c;((c=a.K)==null?void 0:c.parentElement)===a.g&&a.g.removeChild(a.K)}}
p.init=function(a,b,c,d){b=b===void 0?!1:b;c=c===void 0?"UNKNOWN":c;d=d===void 0?!1:d;var e=this,f,g,h,k,l,m;return I(function(n){if(n.h==1)return f=Kc,n.g(e.L,2);if(n.h!=3){if(!Fo(e)&&!Go(e))return n.u(3);Xa("Expected MediaSource to be open during init(); reopening the media source.");e.L=new Ri;e.i=zo(e,e.L);return n.g(e.L,3)}e.I=b;e.R=c;e.Wa=d;e.Ra=!e.I&&e.R=="HLS"&&!e.Wa;e.ha.clear();e.Y=null;e.xa=null;e.U=null;e.va=null;e.na=new Ri;g=r(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=
a.get(k),Ho(e,k,l,l.codecs),e.o?(e.m.set(f.W,[]),e.m.set(f.oa,[])):e.m.set(k,[]);(m=a.get(f.W))&&m.isAudioMuxedInVideo&&(e.o=!0);n.j()})};
function Ho(a,b,c,d){b=="audio"&&d&&(d=zf(d,c.mimeType));b=="video"&&d&&c.mimeType=="video/mp4"&&(d=Af(d));var e=qe(c.mimeType,d);if(b==Ic)Io(a,e,a.I,c.external);else{var f=a.B.forceTransmux;if(!$k(e)||!a.I&&re.includes(e))f=!0;var g=xe(c.mimeType,d);if(f){f=Gc("audio",(d||"").split(","));d=Gc("video",(d||"").split(","));if(f&&d){a.o=!0;Ho(a,"audio",c,f);Ho(a,"video",c,d);return}if(d=ke(g))e=d(),a.j.set(b,e),e=e.convertCodecs(b,g)}g=e+a.B.addExtraFeaturesToSourceBuffer(e);pj(a.F);try{var h=a.i.addSourceBuffer(g)}catch(k){throw new R(2,
3,3015,k,"The mediaSource_ status was "+a.i.readyState+" expected 'open'",null);}a.I&&(h.mode=Jo);a.A.H(h,"error",function(){var k=a.m.get(b)[0];k.p.reject(new R(2,3,3014,a.g.error?a.g.error.code:0,k.uri))});a.A.H(h,"updateend",function(){return Ko(a,b)});a.l.set(b,h);a.D.set(b,e);a.Ga.set(b,!!c.drmInfos.length)}}p.configure=function(a){this.B=a;this.h&&(this.h.C=a.modifyCueCallback)};function Lo(a){return a.za&&!a.M&&!a.G}
function Io(a,b,c,d){a.h||(a.h=new Ge(a.ka),a.h&&(a.h.C=a.B.modifyCueCallback));var e=a.h,f=a.Fa;a=a.R;b=="application/cea-608"||b=="application/cea-708"?e.i=null:(e.i=Ie.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):vb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):vb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.F=f,e.B=d)}
function Fo(a){return a.G?!1:a.i?a.i.readyState=="ended":!0}function Go(a){return a.G?!1:a.i?a.i.readyState=="closed":!0}function Mo(a,b){return a.l.size?b==Ic?a.h.g:bo(No(a,b)):null}function Oo(a,b){return a.l.size?b==Ic?a.h.h:co(No(a,b)):null}function Po(a,b,c){if(b==Ic)return a=a.h,a.h==null||a.h<c?0:a.h-Math.max(c,a.g);a=No(a,b);return fo(a,c)}
p.Xb=function(){var a={total:this.G?[]:go(this.g.buffered),audio:go(No(this,"audio")),video:go(No(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;b!=null&&c!=null&&a.text.push({start:b,end:c})}return a};function No(a,b){if(a.G||a.M||Go(a))return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function Qo(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=null,k=[],l=Q(c);if(re.includes(f))c=Ph(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.O.onMetadata([{cueTime:d.startTime,data:l,frames:c,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.Z){l=new $g;var m=e.emsgSchemeIdUris!=null&&e.emsgSchemeIdUris.length>0||a.B.dispatchAllEmsgBoxes,n=[];m&&l.ea("emsg",
function(v){a:{var w=e.emsgSchemeIdUris;if(v.version===0){var x=v.reader.Mc();var y=v.reader.Mc();var z=v.reader.S();var B=v.reader.S();var H=v.reader.S();var E=v.reader.S();var C=d.startTime+B/z}else z=v.reader.S(),C=v.reader.le()/z+d.m,B=C-d.startTime,H=v.reader.S(),E=v.reader.S(),x=v.reader.Mc(),y=v.reader.Mc();v=v.reader.sb(v.reader.getLength()-v.reader.Va(),!0);if(w&&w.includes(x)||a.B.dispatchAllEmsgBoxes)if(x=="urn:mpeg:dash:event:2012")a.O.Qi();else{w=C;if(x!=="https://aomedia.org/emsg/ID3"||
H!==4294967295)w+=H/z;z={startTime:C,endTime:w,schemeIdUri:x,value:y,timescale:z,presentationTimeDelta:B,eventDuration:H,id:E,messageData:v};break a}z=null}z&&n.push(z)});var q=d.Z.timescale;b=q&&!isNaN(q);var u=0,t=!1;b&&l.ea("prft",function(v){var w=v.reader,x=v.version;w.S();v=w.S();var y=w.S();v=v*1E3+y/4294967296*1E3;x===0?w=w.S():(x=w.S(),w=w.S(),w=x*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/q*1E3)});
w=new Yi("prft",w);a.O.onEvent(w)}).boxes(["moof","traf"],eh).ea("tfdt",function(v){t||(u=lh(v.reader,v.version).baseMediaDecodeTime/q,t=!0,m||v.parser.stop())});(m||b)&&l.parse(c,!1,g);t&&d.m==0&&(h=u);l=r(n);for(c=l.next();!c.done;c=l.next())Ro(a,c.value,d,h)}else f.includes("/mp4")||f.includes("/webm")||!$h(l)||(a.ha.has(b)||a.ha.set(b,new Rh),k=a.ha.get(b),k.clearData(),k.re(d.i),k.parse(l),l=k.getStartTime(b),l!=null&&(h=l),k=k.getMetadata());return{timestamp:h,metadata:k}}
function Ro(a,b,c,d){var e=xo(b.startTime,c.startTime+b.presentationTimeDelta/b.timescale);d&&a.R=="HLS"&&!e&&(c=-d+c.startTime,b.startTime+=c,b.endTime+=c);a.O.Oi(b);!b.messageData||b.schemeIdUri!="https://aomedia.org/emsg/ID3"&&b.schemeIdUri!="https://developer.apple.com/streaming/emsg-id3"||(c=Ph(b.messageData),c.length&&(d=b.startTime,a.O.onMetadata([{cueTime:d,data:b.messageData,frames:c,dts:d,pts:d}],0,b.endTime)))}
function So(a,b,c,d,e,f,g,h,k,l,m){g=g===void 0?!1:g;h=h===void 0?!1:h;k=k===void 0?!1:k;l=l===void 0?!1:l;var n,q,u,t,v,w,x,y,z,B,H,E,C,A,F,D,J,L,P,O,N;return I(function(M){switch(M.h){case 1:n=Kc;if(b!=n.Ka){M.u(2);break}if(a.R!="HLS"){M.u(3);break}return M.g(a.Oa,4);case 4:q=M.i,a.h.A=q;case 3:return M.g(Le(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.N()[0]:null),5);case 5:return M.return();case 2:if(l||!a.o){M.u(6);break}return M.g(So(a,n.W,c,d,e,f,g,h,k,!0),7);case 7:return M.g(So(a,n.oa,c,
d,e,f,g,h,k,!0),8);case 8:return M.return();case 6:if(!a.l.has(b))return M.return();u=a.l.get(b).timestampOffset;t=a.D.get(b);a.j.has(b)&&(t=a.j.get(b).getOriginalMimeType());if(d&&(v=Qo(a,b,c,d,e,t,k),w=v.timestamp,x=v.metadata,w!=null&&(a.Y==null&&b==n.oa&&(a.Y=w,a.xa=d.startTime,a.U!=null&&(y=0,a.xa==a.va&&(y=a.Y-a.U),a.na.resolve(y))),a.U==null&&b==n.W&&(a.U=w,a.va=d.startTime,a.Y!=null&&(z=0,a.xa==a.va&&(z=a.Y-a.U),a.na.resolve(z))),B=w,H=re,!a.I&&H.includes(a.D.get(b))&&(B=0),E=d.startTime-
B,C=Math.abs(u-E),(C>=.001||g||h)&&(!k||E>0||!u)&&(u=E,a.Ra&&(To(a,b,function(){return Uo(a,b)},null),To(a,b,function(){return Vo(a,b,u)},null))),(A=b==n.oa||!a.l.has(n.oa))&&a.Oa.resolve(u)),x.length))a.O.onMetadata(x,u,d?d.endTime:null);f&&b==n.oa&&(a.h||Io(a,"application/cea-608",a.I,!1),a.J||(F=t.split(";",1)[0],a.J=new Yc(F)),d?(D=ad(a.J,c),D.length&&Re(a.h,D,u)):a.J.init(c,h,m));if(!a.j.has(b)){M.u(9);break}return M.g(a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:J=M.i,ArrayBuffer.isView(J)?
c=J:(L=J,L.init!=null&&(P=L.init,To(a,b,function(){a.C&&Mc(a.C,P,u,e);a.l.get(b).appendBuffer(P)},d?d.N()[0]:null)),c=L.data);case 9:c=Wo(a,e,c,d,b);if(!d||!a.I||b==n.Ka){M.u(11);break}if(!g&&!h){M.u(11);break}O=d.startTime;if(a.R!="HLS"||a.o||b!=n.W||!a.l.has(n.oa)){M.u(13);break}return M.g(a.na,14);case 14:N=M.i,Math.abs(N)>.15&&(O-=N);case 13:To(a,b,function(){return Uo(a,b)},null),To(a,b,function(){return Vo(a,b,O)},null);case 11:return M.g(To(a,b,function(){var S=c;a.C&&Mc(a.C,S,u,e);a.l.get(b).appendBuffer(S)},
d?d.N()[0]:null),15);case 15:M.j()}})}function Xo(a,b){var c=Oo(a,"video")||0;Pe(a.h,b,c)}function Yo(a){a.h&&Pe(a.h,"",0)}p.remove=function(a,b,c,d){var e=this,f,g;return I(function(h){return h.h==1?(f=Kc,a==f.oa&&e.J&&(e.J.remove(d),g=e.h.g||0,e.h.remove(g,c,!0)),a==f.Ka?h.g(e.h.remove(b,c),0):c>b?h.g(To(e,a,function(){return Zo(e,a,b,c)},null),5):h.u(0)):e.o?h.g(To(e,f.W,function(){return Zo(e,f.W,b,c)},null),0):h.u(0)})};
function $o(a,b){var c;return I(function(d){return d.h==1?(c=Kc,b==c.Ka?a.h?d.g(a.h.remove(0,Infinity),0):d.return():b===c.oa&&a.J&&a.h?d.g(a.h.remove(0,Infinity,!0),4):d.u(4)):d.h!=6?d.g(To(a,b,function(){return Zo(a,b,0,a.i.duration)},null),6):a.o?d.g(To(a,c.W,function(){return Zo(a,c.W,0,a.i.duration)},null),0):d.u(0)})}
p.flush=function(a){var b=this,c;return I(function(d){return d.h==1?(c=Kc,a==c.Ka?d.return():d.g(To(b,a,function(){b.g.currentTime-=.001;Ko(b,a)},null),2)):b.o?d.g(To(b,c.W,function(){var e=c.W;b.g.currentTime-=.001;Ko(b,e)},null),0):d.u(0)})};
function ap(a,b,c,d,e,f,g,h,k){var l,m,n;return I(function(q){if(q.h==1){l=Kc;if(b==l.Ka)return f||(a.h.A=c),Oe(a.h,d,e),q.return();m=[];return q.g(bp(a,b,g,h,k),2)}n=q.i;n||(m.push(To(a,b,function(){return Uo(a,b)},null)),a.o&&m.push(To(a,l.W,function(){return Uo(a,l.W)},null)));f||(m.push(To(a,b,function(){return Vo(a,b,c)},null)),a.o&&m.push(To(a,l.W,function(){return Vo(a,l.W,c)},null)));if(d!=0||e!=Infinity)m.push(To(a,b,function(){return cp(a,b,d,e)},null)),a.o&&m.push(To(a,l.W,function(){return cp(a,
l.W,d,e)},null));return m.length?q.g(Promise.all(m),0):q.u(0)})}function dp(a,b,c){var d,e;return I(function(f){if(f.h==1){d=Kc;if(b==d.Ka)return f.return();b==d.oa&&(a.Oa=new Ri);if(!a.I||(e=Oo(a,b))&&Math.abs(e-c)<.15)return f.return();To(a,b,function(){return Uo(a,b)},null);a.o&&To(a,d.W,function(){return Uo(a,d.W)},null);return f.g(To(a,b,function(){return Vo(a,b,c)},null),2)}return a.o?f.g(To(a,d.W,function(){return Vo(a,d.W,c)},null),0):f.u(0)})}
p.endOfStream=function(a){var b=this;return I(function(c){return c.g(ep(b,function(){Fo(b)||Go(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.cc=function(a){var b=this;return I(function(c){return c.g(ep(b,function(){if(b.B.durationReductionEmitsUpdateEnd&&a<b.i.duration)for(var d=r(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:new Ri,uri:null};b.m.get(e).unshift(f)}b.i.duration=a;b.ya=a}),0)})};p.getDuration=function(){return this.i.duration};
function fp(a,b,c){I(function(d){return a.F.g||a.g.error||a.M||a.G||Fo(a)||Go(a)?d.return():d.g(ep(a,function(){Fo(a)||Go(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function gp(a){I(function(b){return a.F.g||a.g.error||a.M||a.G||Fo(a)||Go(a)?b.return():b.g(ep(a,function(){Fo(a)||Go(a)||a.i.clearLiveSeekableRange()}),0)})}function Zo(a,b,c,d){if(d<=c)Ko(a,b);else{if(a.C){var e=a.C;b==="video"&&e.g&&e.g.flushBuffer(c,d)}a.l.get(b).remove(c,d)}}
function Uo(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;Ko(a,b)}function Vo(a,b,c){c<0&&(c+=.001);a.l.get(b).timestampOffset=c;Ko(a,b)}function cp(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;Ko(a,b)}
function Ko(a,b){if(a.G||a.F.g){var c=a.m.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.m.set(b,[]))}else if(c=a.m.get(b)[0])c.p.resolve(),hp(a,b)}function To(a,b,c,d){pj(a.F);c={start:c,p:new Ri,uri:d};a.m.get(b).push(c);a.m.get(b).length==1&&ip(a,b);return c.p}
function ep(a,b){var c,d,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y,z;return I(function(B){switch(B.h){case 1:pj(a.F);c=[];d=Array.from(a.l.keys());e=new Map;f=r(d);g=f.next();for(h={};!g.done;h={ready:void 0},g=f.next())k=g.value,h.ready=new Ri,l={start:function(H){return function(){return H.ready.resolve()}}(h),p:h.ready,uri:null},m=a.m.get(k),m.push(l),c.push(h.ready),e.set(k,l),m.length==1&&l.start();B.m(2);return B.g(Promise.all(c),4);case 4:B.o(3);break;case 2:n=B.l();if(a.F.g){q=r(d);for(u=q.next();!u.done;u=
q.next())t=u.value,v=a.m.get(t),e.has(t)&&eb(v,e.get(t));return B.return()}throw n;case 3:return B.m(5,6),B.g(b(),6);case 6:B.F();w=r(d);for(x=w.next();!x.done;x=w.next())y=x.value,hp(a,y);B.G(0);break;case 5:throw z=B.l(),new R(2,3,3015,z,a.g.error||"No error in the media element",null);}})}function hp(a,b){a.m.get(b).shift();ip(a,b)}
function ip(a,b){var c=a.m.get(b)[0];if(c)try{c.start()}catch(d){d.name=="QuotaExceededError"?c.p.reject(new R(2,3,3017,b)):Lo(a)?c.p.reject(new R(2,3,3015,d,a.g.error||"No error in the media element",c.uri)):c.p.reject(new R(2,3,3024,b)),hp(a,b)}}function jp(a,b){a.ka=b;a.h&&(a.h.l=b)}
function Wo(a,b,c,d,e){if(ze(a.D.get(e))!="mp4")return c;var f=d===null,g=a.Ga.get(e),h=a.O.Xh(),k=!1;d&&d.Z&&(k=d.Z.encrypted);d=d?d.N()[0]:null;var l=qb();a.B.correctEc3Enca&&f&&e==="audio"&&(c=Tn(c));a.B.insertFakeEncryptionInInit&&g&&l.Nc(h,e)&&(f?c=Un(b,c,d):!k&&l.Qg(e)&&(c=Xn(c)));f&&l.kd()&&(c=$n(c));return c}
function kp(a,b,c,d){return To(a,b,function(){if(b!==Ic){a.D.get(b);if(qb().eb()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.B.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.D.set(b,c)}Ko(a,b)}},null)}
function lp(a,b){var c,d,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y,z,B,H;return I(function(E){if(E.h==1){if(a.G||a.M)return E.return();c=Kc;a.G=!0;a.o=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.Ha=!0);a.Xa&&(a.g.autoplay=!1);E.J(2);a.A.bb();f=r(a.j.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=r(a.l.values());for(l=k.next();!l.done;l=k.next()){m=l.value;try{a.i.removeSourceBuffer(m)}catch(C){}}a.j.clear();a.l.clear();n=a.i.duration;a.L=new Ri;a.i=zo(a,a.L);return E.g(a.L,4)}if(E.h!=
2){!isNaN(n)&&n?a.i.duration=n:!isNaN(a.ya)&&a.ya&&(a.i.duration=a.ya);q=new Ri;u=a.i.sourceBuffers;t=b.size;v=0;w=function(){v++;v===t&&(q.resolve(),a.A.jb(u,"addsourcebuffer",w))};a.A.H(u,"addsourcebuffer",w);x=r(b.keys());for(y=x.next();!y.done;y=x.next())z=y.value,B=b.get(z),Ho(a,z,B,B.codecs);(H=b.get(c.W))&&H.isAudioMuxedInVideo&&(a.o=!0);a.o&&!a.m.has(c.W)&&a.m.set(c.W,[]);return E.g(q,2)}E.F();a.G=!1;pj(a.F);a.A.Na(a.g,"loadedmetadata",function(){a.F.g||(a.g.currentTime=d)});a.A.Na(a.g,"canplaythrough",
function(){a.F.g||(a.g.autoplay=e,a.Ha&&(a.Ha=!1,a.g.play()))});return E.G(0)})}function mp(a,b){return ep(a,function(){return lp(a,b)})}
function np(a,b,c,d){var e=!1,f=Gc("audio",(d||"").split(",")),g=Gc("video",(d||"").split(",")),h=g;b=="audio"&&(h=f);h||(h=d);var k=qe(c,h),l=De(a.D.get(b)),m=a.B.forceTransmux;!$k(k)||!a.I&&re.includes(k)?m=!0:m||c==l||(m=!qb().ue()&&re.includes(c));if(m&&(a=xe(c,h),h=ke(a))){var n=h();f&&g&&(e=!0);k=n.convertCodecs(b,a)}!n&&b==="video"&&f&&(k=qe(c,d));b=Ae(Ee(k));return{Ib:n,kj:e,fg:De(k),codec:b,mimeType:k}}
function op(a,b,c,d,e){if(b==Ic)return{type:pp,ie:c,Ib:null};var f=Ae(Ee(a.D.get(b))),g=De(a.D.get(b)),h=np(a,b,c,d),k=h.Ib,l=h.kj,m=h.fg,n=h.codec;h=h.mimeType;var q=!0;l&&a.D.has("audio")&&(c=np(a,"audio",c,d),d=Ae(Ee(a.D.get("audio"))),q=De(a.D.get("audio")),q=d==c.codec&&q==c.fg,c.Ib&&c.Ib.destroy());if(f===n&&g===m&&q)return{type:pp,ie:h,Ib:k};f=!0;if(a.o&&!e.has("audio")||l&&k&&!a.j.has(b))f=!1;b=qb();if(f&&a.B.codecSwitchingStrategy==="smooth"&&b.eb())return{type:qp,ie:h,Ib:k};k&&k.destroy();
return{type:rp,ie:h,Ib:null}}
function bp(a,b,c,d,e){var f,g,h,k,l,m;return I(function(n){if(n.h==1){f=Kc;g=op(a,b,c,d,e);h=g.type;k=g.Ib;l=g.ie;if(m=e.get(f.W))a.o=m.isAudioMuxedInVideo;if(h==pp)return a.j.has(b)&&!k?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&k?a.j.set(b,k):k&&(a.j.has(b)&&a.j.get(b).transmux!==k.transmux?(a.j.get(b).destroy(),a.j.set(b,k)):k.destroy()),n.return(!1);if(h==qp)return n.g(kp(a,b,l,k),3);if(h!=rp)return n.u(3);k&&k.destroy();return n.g(mp(a,e),3)}return n.return(!0)})}
function sp(a,b,c,d,e){a=op(a,b,c,d,e);a.Ib&&a.Ib.destroy();return a.type==rp}var Bo=window.URL.createObjectURL,Jo="sequence",pp="none",rp="reset",qp="changeType";function tp(a){var b=this;this.g=a;this.j=!1;this.h=this.g.mf();this.i=new Se(function(){b.g.isPaused()||b.g.Ki(b.h*.25)})}tp.prototype.release=function(){this.set(this.Bc());this.i&&(this.i.stop(),this.i=null);this.g=null};tp.prototype.set=function(a){this.h=a;up(this)};tp.prototype.Bc=function(){return this.g.Bc()};function up(a){a.i.stop();var b=a.j?0:a.h;if(b>=0&&b<=16)try{a.g.mf()!=b&&a.g.$g(b);return}catch(c){}a.i.Da(.25);a.g.mf()!=0&&a.g.$g(0)};function vp(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=wp.value().get(b),c.Na(a,b,d))}var wp=new ob(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function xp(a,b,c,d){var e=this;this.g=a;this.m=b;this.A=c;this.l=null;this.j=function(){e.l==null&&(e.l=d());return e.l};this.o=!1;this.h=new jb;this.i=new yp(a);vp(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){zp(e,e.j())})}xp.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i!=null&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Ap(a){return a.o?a.g.currentTime:a.j()}
function Bp(a,b){a.g.readyState>0?Cp(a.i,b):vp(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){zp(a,a.j())})}function zp(a,b){Math.abs(a.g.currentTime-b)<.001?Dp(a):(a.h.Na(a.g,"seeking",function(){Dp(a)}),Cp(a.i,a.g.currentTime&&a.g.currentTime!=0?a.g.currentTime:b))}function Dp(a){a.o=!0;a.h.H(a.g,"seeking",function(){return a.m()});a.A(a.g.currentTime)}
function yp(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Se(function(){b.i<=0?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}yp.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Cp(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Da(.1)};function Ep(a){this.g=a;this.i=!1;this.h=null;this.j=new jb}p=Ep.prototype;p.ready=function(){function a(){if(b.h==null||b.h==0&&b.g.duration!=Infinity)b.i=!0;else{var c=b.g.currentTime,d=null;if(typeof b.h==="number")d=b.h;else if(b.h instanceof Date){var e=Fp(b);e!==null&&(d=b.h.getTime()/1E3-e,d=Gp(b,d))}d==null?b.i=!0:(d<0&&(d=Math.max(0,c+d)),c!=d?(b.j.Na(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;vp(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){a()})};
p.release=function(){this.j&&(this.j.release(),this.j=null);this.g=null};p.ze=function(a){this.h=this.i?this.h:a};p.Uc=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(Fp(this)||0),a=Gp(this,a));return a||0};p.Yf=function(){return 0};p.Wf=function(){return 0};p.Xf=function(){return!1};p.Jg=function(){};p.vg=function(){var a=co(this.g.buffered);return a!=null&&a>=this.g.duration-1};
function Fp(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null}function Gp(a,b){a=a.g.seekable;a.length>0&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
function Hp(a,b,c,d,e,f){var g=this;this.h=a;this.g=b.presentationTimeline;this.l=c;this.A=e;this.o=null;this.i=new io(a,b.presentationTimeline,c,f);this.j=new xp(a,function(){a:{var h=g.i;h.o=!0;h.B=!1;h.i&&h.i.Da(h.h.gapJumpTimerTime);ko(h);var k=Ap(g.j);h=Ip(g,k);if(!bl()&&Math.abs(h-k)>.001){k=!1;var l=qb().Ug();if(l){var m=Date.now()/1E3;if(!g.o||g.o<m-l)g.o=m,k=!0}else k=!0;if(k){Bp(g.j,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.i;k.g.seeking&&!k.o&&(k.o=!0,k.m=h);k.i&&
k.i.Da(k.h.gapJumpTimerTime);ko(k)},function(){return Jp(g,d)});this.m=new Se(function(){if(g.h.readyState!=0&&!g.h.paused){var h=Ap(g.j),k=g.g.Nb(),l=g.g.ib();l-k<3&&(k=l-3);h<k&&(h=Ip(g,h),g.h.currentTime=h)}})}p=Hp.prototype;p.ready=function(){this.m.Da(.25)};p.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.m&&(this.m.stop(),this.m=null);this.h=this.j=this.g=this.l=null;this.A=function(){}};p.ze=function(a){Bp(this.j,Jp(this,a))};
p.Uc=function(){var a=Ap(this.j);return this.h.readyState>0&&!this.h.paused?Kp(this,a):a};p.Yf=function(){return this.i.G};p.Wf=function(){return this.i.F};p.Xf=function(){return this.i.C};function Jp(a,b){b==null?b=a.g.getDuration()<Infinity?a.g.Nb():a.g.ib():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):b<0&&(b=a.g.ib()+b);return Lp(a,Kp(a,b))}p.Jg=function(){this.i.Ic()};p.vg=function(){if(this.g.ba()){var a=this.g.ad(),b=co(this.h.buffered);if(b!=null&&b>=a)return!0}return!1};
function Lp(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ip(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.Nb(),f=a.g.ib(),g=a.g.getDuration();f-e<3&&(e=f-3);var h=a.g.$c(c),k=a.g.$c(d);c=a.g.$c(c+d);return b>=g?Lp(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?a.g.ba()&&a.l.returnToEndOfLiveWindowWhenOutside?f-a.l.safeSeekEndOffset:eo(a.h.buffered,k)?k:c:b>=h||eo(a.h.buffered,b)?b:c}function Kp(a,b){var c=a.g.Nb();if(b<c)return c;a=a.g.ib();return b>a?a:b};function Mp(){this.h=this.g=null}Mp.prototype.configure=function(a){this.g=a};Mp.prototype.getConfiguration=function(){return this.g};
Mp.prototype.create=function(a){var b;if(this.g.language){var c=Np(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(f){return f.primary}),b=b.length?b:a);a=Op(b,this.g.role);a.length&&(b=a);a=Pp(b,this.g.videoRole);a.length&&(b=a);this.g.videoLayout&&(a=Qp(b,this.g.videoLayout),a.length&&(b=a));this.g.hdrLevel&&(a=Rp(b,this.g.hdrLevel),a.length&&(b=a));var d=[this.g.channelCount,this.g.preferredAudioChannelCount];a=d.filter(function(f,g){return f&&d.indexOf(f)===g});if(a.length)for(a=r(a),
c=a.next();!c.done;c=a.next())if(c=Sp(b,c.value),c.length){b=c;break}this.g.audioLabel&&(a=Tp(b,this.g.audioLabel),a.length&&(b=a));this.g.videoLabel&&(a=Up(b,this.g.videoLabel),a.length&&(b=a));a=Vp(b,this.g.spatialAudio);a.length&&(b=a);var e=[this.g.audioCodec,this.g.activeAudioCodec].concat(G(this.g.preferredAudioCodecs));a=e.filter(function(f,g){return f&&e.indexOf(f)===g});if(a.length)for(a=r(a),c=a.next();!c.done;c=a.next())if(c=Wp(b,c.value),c.length){b=c;break}a=qb();a=this.g.codecSwitchingStrategy==
"smooth"&&a.eb();return this.h=new mn(b[0],b,!a)};Mp.prototype.getLastAdaptationSet=function(){return this.h};function Np(a,b){b=af(b);var c=hf(b,a.map(function(d){return gf(d)}));return c?a.filter(function(d){return c==gf(d)}):[]}function Op(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):c.audio.roles.length==0:!1})}function Pp(a,b){return a.filter(function(c){return c.video?b?c.video.roles.includes(b):c.video.roles.length==0:!1})}
function Tp(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Up(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function Sp(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 Rp(a,b){if(b=="AUTO"){var c=a.some(function(d){return d.video&&d.video.hdr&&d.video.hdr=="HLG"?!0:!1});b=qb().Cc(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function Qp(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Vp(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Wp(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Xp(a){Zi.call(this);this.h=new Map;this.i=a;this.g=null}pa(Xp,Zi);Xp.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);Zi.prototype.release.call(this)};function Yp(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 Yi("regionadd",new Map([["region",b]])),a.dispatchEvent(b),Zp(a))}
function Zp(a){a.g||(a.g=(new Se(function(){for(var b=a.i(),c=r(a.h),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;e.endTime<b.start&&(a.h.delete(d),d=new Yi("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).Da(2))};function $p(a,b,c,d,e){function f(g,h){return h.fastSwitching&&g.mc&&g.ed?!1:!0}this.m=a;this.i=b;this.l=c;this.g=new Map;this.j=new Map;this.h=null;this.o=d;this.A=e||f}function aq(a,b){a.l=b;a=r(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
function bq(a,b,c){c=c===void 0?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.h||(a.h=a.i.segmentIndex.zb(b,!0,a.o));if(!a.h)return Promise.resolve();c&&a.h.next();for(b=[];a.g.size<a.m;){c=a.h.next().value;if(!c)break;var d=!0;c.isPreload()&&c.endByte!=null&&(d=!1);c.Bb()==2&&(d=!1);c.hc(!1)&&(d=!1);d&&c.Z&&b.push(cq(a,c.Z));d&&!a.g.has(c)&&(d=new dq(a.l),b.push(eq(d,c,a.i)),a.g.set(c,d));if(!a.A(c,a.i))break}fq(a);return Promise.all(b)}
function cq(a,b){if(!a.i.segmentIndex||b.hc()||Array.from(a.j.keys()).some(function(e){return Ik(e,b)}))return Promise.resolve();var c=new dq(a.l),d=eq(c,b,a.i);a.j.set(b,c);return d}function gq(a,b){b=r(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&hq(a,c)}function iq(a){gq(a,a.g);gq(a,a.j);a.h=null}$p.prototype.ob=function(a,b){b=b===void 0?!1:b;for(var c=r(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&hq(this,d);b&&fq(this)};
$p.prototype.Pc=function(a){this.o=a;this.h&&this.h.Pc(a)};function fq(a){if(a.g.size)for(var b=Array.from(a.g.keys()),c=r(a.j.keys()),d=c.next(),e={};!d.done;e={qf:void 0},d=c.next())e.qf=d.value,b.some(function(f){return function(g){return Ik(g.Z,f.qf)}}(e))||hq(a,e.qf)}function jq(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&hq(a,d)}fq(a)}function kq(a,b){b&&b!==a.i&&(iq(a),a.i=b)}
function hq(a,b){var c=a.g;b instanceof Hk&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function dq(a){this.g=a;this.gd=this.Pf=null}function eq(a,b,c){var d=new Uint8Array(0);a.gd=a.g(b,c,function(e){return I(function(f){if(f.h==1)return d.byteLength>0?d=yc(d,e):d=e,a.Pf?f.g(a.Pf(d),3):f.u(0);d=new Uint8Array(0);f.j()})});return a.gd.promise.catch(function(e){return e instanceof R&&e.code==7001?Promise.resolve():Promise.reject(e)})}dq.prototype.abort=function(){this.gd&&this.gd.abort()};function lq(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.L=new Map;this.C=1;this.B=this.o=null;this.Y=0;this.h=new Map;this.M=!1;this.$=null;this.D=!1;this.l=new oj(function(){return mq(c)});this.R=Date.now()/1E3;this.m=new Map;this.U={projection:null,hfov:null};this.ka=0;this.ha=Infinity;this.G=null;this.O=[];this.A=new Se(function(){if(c.j&&c.g)if(c.j.presentationTimeline.ba()){var d=c.j.presentationTimeline.Nb(),e=c.j.presentationTimeline.ib();e-d>1?fp(c.g.P,d,e):gp(c.g.P)}else gp(c.g.P),
c.A&&c.A.stop();else c.A&&c.A.stop()});this.I=null;this.J=!1;this.K=new Se(function(){var d=c.g.video;!d.ended&&c.I&&(c.J=!0,d.currentTime=c.I,c.I=null)});this.F=new jb}p=lq.prototype;p.destroy=function(){return this.l.destroy()};
function mq(a){var b,c,d,e,f,g,h;return I(function(k){if(k.h==1){a.A&&a.A.stop();a.A=null;a.K&&a.K.stop();a.K=null;a.F&&(a.F.release(),a.F=null);b=[];c=r(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,nq(e),b.push(oq(e)),e.X&&(iq(e.X),e.X=null);f=r(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,iq(h);return k.g(Promise.all(b),2)}a.h.clear();a.m.clear();a.g=null;a.j=null;a.i=null;a.I=null;k.j()})}
p.configure=function(a){this.i=a;this.$=new Oi({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.h.get("audio");b&&b.X&&(iq(b.X),b.X=null);b=r(this.m.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,iq(this.m.get(c)),this.m.delete(c)}a.disableTextPrefetch&&(b=this.h.get(Ic))&&
b.X&&(iq(b.X),b.X=null);a.disableVideoPrefetch&&(b=this.h.get("video"))&&b.X&&(iq(b.X),b.X=null);b=r(this.h.keys());for(c=b.next();!c.done;c=b.next())c=this.h.get(c.value),c.X?(jq(c.X,a.segmentPrefetchLimit),a.segmentPrefetchLimit>0||(iq(c.X),c.X=null)):a.segmentPrefetchLimit>0&&(c.X=pq(this,c.stream));a.disableAudioPrefetch||qq(this)};function rq(a,b,c){a.j.presentationTimeline.ba()||(a.ka=b,a.ha=c)}
p.start=function(a){var b=this;return I(function(c){if(c.h==1)return c.g(sq(b,a||new Map),2);pj(b.l);b.M=!0;c.j()})};function tq(a,b){var c,d,e,f,g,h,k;I(function(l){switch(l.h){case 1:return c=Kc,a.Y++,d=a.Y,l.m(2),l.g($o(a.g.P,c.Ka),4);case 4:l.o(3);break;case 2:if(e=l.l(),a.g)a.g.onError(e);case 3:f=qe(b.mimeType,b.codecs),Io(a.g.P,f,a.j.sequenceMode,b.external),g=a.g.P.ka,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.Y==d&&(k=uq(a,b),a.h.set(c.Ka,k),vq(a,k,0)),l.j()}})}
function wq(a){var b=a.h.get(Ic);b&&(nq(b),oq(b).catch(function(){}),a.G=a.h.get(Ic),a.h.delete(Ic),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.B=null}
function xq(a,b){for(var c=a.g.hb()<0,d=r(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ia&&e.ia.Pc(c),e.X&&e.X.Pc(c);d=r(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.Pc(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.bc&&(yq(a,b,!1,0,!1),c.bc=d);else if(b=c.bc)c.bc=null,yq(a,b,!0,0,!1)}
function zq(a,b,c,d,e,f){c=c===void 0?!1:c;d=d===void 0?0:d;e=e===void 0?!1:e;f=f===void 0?!1:f;a.o=b;a.M&&(b.video&&yq(a,b.video,c,d,e,f),b.audio&&yq(a,b.audio,c,d,e,f))}function Aq(a,b){I(function(c){if(c.h==1)return a.G=null,a.B=b,a.M?b.segmentIndex?c.u(2):c.g(b.createSegmentIndex(),2):c.return();yq(a,b,!0,0,!1);c.j()})}function Bq(a){var b=a.h.get(Ic);b&&yq(a,b.stream,!0,0,!0)}
function Cq(a,b){for(var c=r(a.L.entries()),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.L.delete(d))}}
function yq(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Ic?g&&(g.bc&&(b.trickModeVideo?(g.bc=b,b=b.trickModeVideo):g.bc=null),g.stream!=b||e)&&(a.m.has(b)?g.X=a.m.get(b):g.X&&kq(g.X,b),b.type==Ic&&g.stream!=b&&(e=qe(b.mimeType,b.codecs),Io(a.g.P,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ba?(e="("+g.type+":"+g.stream.id+")",a.L.has(e)||a.L.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,
g.stream=b,g.ia=null,g.Fe=!!f,b.dependencyStream?g.Wb=uq(a,b.dependencyStream):g.Wb=null,Dq(a),e&&(g.Ya=null,g.Qb=null,g.Pb=null,b.isAudioMuxedInVideo&&(b=null,g.type==="video"?b=a.h.get("audio"):g.type==="audio"&&(b=a.h.get("video")),b&&(oq(b).catch(function(){}),b.Ya=null,b.Qb=null,b.Pb=null,Eq(a,b),Fq(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.xb?g.Rc=!0:g.Ba?(g.ub=!0,g.zc=d,g.Rc=!0):(nq(g),Gq(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ba||g.Za||vq(a,g,0),Fq(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
tq(a,b)}
function Fq(a,b){var c,d,e;return I(function(f){if(f.h==1){if(!b.Ia)return f.return();c=b.stream;d=b.Ia;return c.segmentIndex?f.u(2):f.g(c.createSegmentIndex(),2)}if(f.h!=4)return e=c.dependencyStream,!e||e.segmentIndex?f.u(4):f.g(e.createSegmentIndex(),4);if(b.Ia!=d||b.stream!=c)return f.return();var g=a.g.Ab();var h=Oo(a.g.P,b.type),k=b.stream.segmentIndex.find(b.wa?b.wa.endTime:g),l=k==null?null:b.stream.segmentIndex.get(k);k=l?Kk(l):null;l&&!k&&(k=(l.endTime-l.getStartTime())*(b.stream.bandwidth||a.o.bandwidth)/
8);k?((l=l.Z)&&(k+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=a.g.getBandwidthEstimate(),g=k*8/l<(h||0)-g-a.i.rebufferingGoal||b.Ia.h.g>k?!0:!1):g=!0;g&&b.Ia.abort();f.j()})}
p.sc=function(){if(this.g){for(var a=this.g.Ab(),b=r(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e;if(e=!this.J)e=this.g.P,d==Ic?(e=e.h,e=e.g==null||e.h==null?!1:a>=e.g&&a<e.h):(e=No(e,d),e=eo(e,a)),e=!e;if(e){this.R=0;c.X&&(c.X.h=null);if(c.type==="audio"){e=r(this.m.values());for(var f=e.next();!f.done;f=e.next())f.value.h=null}c.ia=null;(Oo(this.g.P,d)!=null||c.Ba)&&Eq(this,c);c.Ia&&(c.Ia.abort(),c.Ia=null);d===Ic&&(d=this.g.P,d.J&&d.J.g.clear());c.sc=!0}!this.J||
c.xb||c.Ba||c.Za||vq(this,c,0)}Hq(this)&&Iq(this)}};function Eq(a,b){b.xb||b.ub||(b.Ba?(b.ub=!0,b.zc=0):Mo(a.g.P,b.type)==null?b.Za==null&&vq(a,b,0):(nq(b),Gq(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function sq(a,b){var c,d,e,f,g,h,k,l;return I(function(m){if(m.h==1){if(!a.o)throw new R(2,5,5006);c=Jq(a,!0);d=a.g.P;return m.g(d.init(c,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}pj(a.l);a.updateDuration();e=r(c.keys());for(f=e.next();!f.done;f=e.next())g=f.value,h=c.get(g),a.h.has(g)||(k=uq(a,h),b.has(h.id)&&(l=b.get(h.id),aq(l,function(n,q,u){return Kq(n,q,u||null,a.i.retryParameters,a.g.lc)}),k.X=l),a.h.set(g,k),vq(a,k,0));Dq(a);m.j()})}
function uq(a,b){var c={stream:b,type:b.type,ia:null,X:pq(a,b),wa:null,Ya:null,ce:null,Qb:null,Pb:null,ae:null,be:null,bc:null,endOfStream:!1,Ba:!1,Za:null,ub:!1,zc:0,Rc:!1,xb:!1,sc:!0,Fe:!1,Ff:!1,Ec:!1,Ia:null,Wb:null};b.dependencyStream&&(c.Wb=uq(a,b.dependencyStream));return c}
function pq(a,b){if(b.type==="video"&&a.i.disableVideoPrefetch||b.type==="audio"&&a.i.disableAudioPrefetch||b.type===Ic&&(b.mimeType=="application/cea-608"||b.mimeType=="application/cea-708")||b.type===Ic&&a.i.disableTextPrefetch)return null;if(a.m.has(b))return a.m.get(b);var c=a.h.get(b.type);return(c=c&&c.X)&&b===c.i?c:a.i.segmentPrefetchLimit>0?new $p(a.i.segmentPrefetchLimit,b,function(d,e,f){return Kq(d,e,f||null,a.i.retryParameters,a.g.lc)},a.g.hb()<0,a.g.jj):null}
function qq(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=r(a.j.variants),e=d.next(),f={};!e.done;f={kb:void 0},e=d.next())if(f.kb=e.value,f.kb.audio)if(a.m.has(f.kb.audio)){if(e=a.m.get(f.kb.audio),jq(e,b),!(b>0&&c.some(function(h){return function(k){return $e(h.kb.audio.language,k)}}(f)))){var g=a.h.get(f.kb.audio.type);e!==(g&&g.X)&&iq(e);a.m.delete(f.kb.audio)}}else b<=0||!c.some(function(h){return function(k){return $e(h.kb.audio.language,k)}}(f))||!(e=pq(a,f.kb.audio))||
(f.kb.audio.segmentIndex||f.kb.audio.createSegmentIndex(),a.m.set(f.kb.audio,e))}p.updateDuration=function(){var a=bl(),b=this.j.presentationTimeline.getDuration();b<Infinity?(a&&(this.A&&this.A.stop(),gp(this.g.P)),this.g.P.cc(b)):a?(this.A&&this.A.Da(.5),this.g.P.cc(Infinity)):this.g.P.cc(4294967296)};
function Lq(a,b){var c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.h){case 1:pj(a.l);c=Kc;if(b.Ba||b.Za==null||b.xb)return n.return();b.Za=null;if(!b.ub){n.u(2);break}return n.g(Gq(a,b,b.Rc,b.zc),3);case 3:return n.return();case 2:Cq(a,b);if(b.stream.segmentIndex){n.u(4);break}d=b.stream;n.m(5);return n.g(b.stream.createSegmentIndex(),7);case 7:n.o(6);break;case 5:return e=n.l(),n.g(Mq(a,b,e),8);case 8:return n.return();case 6:if(d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.Ba||
b.Za||vq(a,b,0),n.return();case 4:if(!b.Wb){n.u(9);break}if(b.Wb.stream.segmentIndex){n.u(9);break}n.m(11);return n.g(b.Wb.stream.createSegmentIndex(),13);case 13:n.o(9);break;case 11:n.l();case 9:n.m(14);f=Nq(a,b);f!=null&&(vq(a,b,f),b.Ec=!1);n.o(15);break;case 14:return g=n.l(),n.g(Mq(a,b,g),16);case 16:return n.return();case 15:if(b.type===c.Ka)return n.return();h=[];b.stream&&!b.stream.isAudioMuxedInVideo&&h.push(b);k=b.type===c.W?c.oa:c.W;(l=a.h.get(k))&&l.stream&&!l.stream.isAudioMuxedInVideo&&
h.push(l);if(!a.M||!h.every(function(q){return q.endOfStream})){n.u(0);break}return n.g(a.g.P.endOfStream(),18);case 18:pj(a.l),m=a.g.P.getDuration(),m!=0&&m<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.cc(m),n.j()}})}
function Nq(a,b){if(Oq(b))return Xo(a.g.P,b.stream.originalId||""),null;b.type==Ic&&Yo(a.g.P);if(b.stream.isAudioMuxedInVideo&&b.type=="audio")return null;if(b.type!=Ic&&Go(a.g.P))return Pq(a,!0),null;var c=a.i.updateIntervalSeconds/Math.max(1,Math.abs(a.g.hb()));if(!Lo(a.g.P)&&b.type!=Ic)return c/2;var d=a.g.Ab();if(b.type==="audio")for(var e=r(a.m.keys()),f=e.next();!f.done;f=e.next())f=a.m.get(f.value),f.ob(d,!0),bq(f,d);e=b.wa?b.wa.endTime:d;var g=Po(a.g.P,b.type,d);f=Math.max(1,Math.max(a.i.rebufferingGoal,
a.i.bufferingGoal)*a.C);var h=a.j.presentationTimeline.getDuration()-e,k=Oo(a.g.P,b.type);if(h<1E-6&&k)return b.endOfStream=!0,b.type=="video"&&((c=a.h.get(Ic))&&Oq(c)&&(c.endOfStream=!0),(c=a.h.get("audio"))&&c.stream.isAudioMuxedInVideo&&(c.endOfStream=!0)),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.ia;k=Qq(a,b,d,k);if(!k)return a=Infinity,(b=b.wa)&&(a=b.endTime-b.startTime),Math.min(a/2,c);g=b.Ya;var l=k.Z;g&&l&&Ik(l,g)&&(g.g=l.g);g=!1;h&&b.Fe&&(g=!0,b.Fe=!1);h=Infinity;l=r(a.h.values());for(var m=
l.next();!m.done;m=l.next())m=m.value,Oq(m)||m.stream.isAudioMuxedInVideo||m.ia&&!m.ia.current()||(h=Math.min(h,m.wa?m.wa.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;b.X&&b.ia&&!a.m.has(b.stream)&&(b.X.ob(k.startTime+.001),bq(b.X,k.startTime).catch(function(){}));if(Hq(a)&&Rq(a,b,k))return null;Sq(a,b,d,k,g).catch(function(){});b.Wb&&Tq(a,b.Wb,d,f);return null}
function Qq(a,b,c,d){if(b.ia){var e=b.ia.current();e&&b.wa&&(c=b.wa.endTime,xo(b.wa.startTime,e.startTime,.002)&&xo(c,e.endTime,.002)&&(e=b.ia.next().value));return e}if(b.wa||d)return e=b.wa?b.wa.endTime:d,c=a.g.hb()<0,b.stream.segmentIndex&&(b.ia=b.stream.segmentIndex.zb(e,!1,c)),b.ia&&b.ia.next().value;d=a.j.sequenceMode||Hq(a)?0:a.i.inaccurateManifestTolerance;var f=Math.max(c-d,0),g=a.g.P.getDuration();Math.abs(f-g)<1&&(d=1,f=Math.max(c-d,0));g=a.g.hb()<0;a=null;d&&(b.stream.segmentIndex&&(b.ia=
b.stream.segmentIndex.zb(f,!1,g)),a=b.ia&&b.ia.next().value);a||(b.stream.segmentIndex&&(b.ia=b.stream.segmentIndex.zb(c,!1,g)),a=b.ia&&b.ia.next().value);for(;((e=a)==null?void 0:e.Bb())===2;)d=c=void 0,a=(d=(c=b.ia)==null?void 0:c.next().value)!=null?d:null;return a}
function Sq(a,b,c,d,e){var f,g,h,k,l,m,n,q,u,t,v,w,x,y,z,B,H,E;return I(function(C){switch(C.h){case 1:f=Kc;g=b.stream;h=b.ia;b.Ba=!0;C.m(2);if(d.Bb()==2)throw new R(1,1,1011);return C.g(Uq(a,b,d,e),4);case 4:pj(a.l);if(a.D)return C.return();k=g.mimeType=="video/mp4"||g.mimeType=="audio/mp4";l=window.ReadableStream;if((m=a.i.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&(a.j.type!="HLS"||d.A))return u=new Uint8Array(0),v=t=!1,x=function(A){var F,D,J,L;return I(function(P){switch(P.h){case 1:if(t)return P.return();
v=!0;pj(a.l);if(a.D)return P.return();P.m(2);u=yc(u,A);F=!1;D=0;(new $g).box("mdat",function(O){D=O.size+O.start;F=!0}).parse(u,!1,!0);if(!F){P.u(4);break}J=u.subarray(0,D);u=u.subarray(D);return P.g(Vq(a,b,c,g,d,J,!0,e),5);case 5:b.X&&b.ia&&bq(b.X,d.startTime,!0);case 4:P.o(0);break;case 2:w=L=P.l(),P.j()}})},C.g(Wq(a,b,d,x),9);n=Wq(a,b,d);return C.g(n,7);case 7:q=C.i;pj(a.l);if(a.D)return C.return();pj(a.l);return b.ub?(b.Ba=!1,vq(a,b,0),C.return()):C.g(Vq(a,b,c,g,d,q,!1,e),6);case 9:y=C.i;if(w)throw w;
if(v){C.u(10);break}t=!0;pj(a.l);return a.D?C.return():b.ub?(b.Ba=!1,vq(a,b,0),C.return()):C.g(Vq(a,b,c,g,d,y,!1,e),10);case 10:b.X&&b.ia&&bq(b.X,d.startTime,!0);case 6:pj(a.l);if(a.D)return C.return();b.wa=d;h.next();b.Ba=!1;b.Ff=!1;z=a.g.P.Xb();B=z[b.type];ab(JSON.stringify(B));b.ub||(H=null,b.type===f.oa?H=a.h.get(f.W):b.type===f.W&&(H=a.h.get(f.oa)),H&&H.type==f.W?a.g.Ic(d,b.stream,H.stream.isAudioMuxedInVideo,!1):a.g.Ic(d,b.stream,b.stream.codecs.includes(","),!1));nq(b);vq(a,b,0);C.o(0);break;
case 2:E=C.l();pj(a.l,E);if(a.D)return C.return();b.Ba=!1;if(E.code==7001)b.Ba=!1,nq(b),vq(a,b,0),C.u(0);else if(b.type==f.Ka&&a.i.ignoreTextStreamFailures)a.h.delete(f.Ka),C.u(0);else{if(E.code==3017)return C.g(Xq(a,b,E),0);b.Ec=!0;E.category==1&&b.X&&hq(b.X,d);E.severity=2;return C.g(Mq(a,b,E),0)}}})}
function Tq(a,b,c,d){var e,f,g,h,k,l,m,n,q,u,t,v,w;return I(function(x){switch(x.h){case 1:e=Kc;f=b.stream;for(k=(h=(g=f.segmentIndex)&&g.zb(c))&&h.next().value;k&&a.O.includes(k.startTime);)k=h&&h.next().value;if(!k){x.u(0);break}l=k.Z;if(!l||Ik(l,b.Ya)){x.u(3);break}b.Ya=l;x.m(4);return x.g(Wq(a,b,l),6);case 6:m=x.i;if(!a.g)return x.return();var y=a.g.P;y.C&&Mc(y.C,m,0,f);a.O=[];x.o(3);break;case 4:throw n=x.l(),b.Ya=null,n;case 3:if(b.wa&&b.wa==k){x.u(0);break}b.wa=k;x.m(8);return x.g(Wq(a,b,k),
10);case 10:q=x.i;if(!a.g)return x.return();y=a.g.P;y.C&&Mc(y.C,q,0,f);a.O.push(k.startTime);x.o(9);break;case 8:throw u=x.l(),b.wa=null,u;case 9:if(!a.g)return x.return();b.ub||(t=null,b.type===e.oa?t=a.h.get(e.W):b.type===e.W&&(t=a.h.get(e.oa)),t&&t.type==e.W?a.g.Ic(k,b.stream,t.stream.isAudioMuxedInVideo,!0):a.g.Ic(k,b.stream,b.stream.codecs.includes(","),!0));v=Math.max.apply(Math,[0].concat(G(a.O)));w=a.g.Ab();if(w+d>v)return x.g(Tq(a,b,k.startTime,d),0);x.u(0)}})}
function Xq(a,b,c){var d,e,f,g,h,k,l,m,n,q,u;return I(function(t){switch(t.h){case 1:d=!1;e=r(a.h.values());for(f=e.next();!f.done;f=e.next())if(g=f.value,g!=b&&g.Ff){d=!0;break}if(d){t.u(2);break}if(a.i.avoidEvictionOnQuotaExceededError){h=Yq(a,c);if(k=a.g.disableStream(b.stream,h))return t.return();vq(a,b,4);return t.return()}l=Math.round(100*a.C);if(l>20){a.C-=.2;t.u(3);break}if(l>4){a.C-=.04;t.u(3);break}m=Yq(a,c);n=a.g.disableStream(b.stream,m);if(!n){b.Ec=!0;a.D=!0;a.g.onError(c);t.u(5);break}a.C=
1;q=a.g.Ab();return t.g(Zq(a,b,q),5);case 5:return t.return();case 3:return b.Ff=!0,u=a.g.Ab(),t.g(Zq(a,b,u),2);case 2:vq(a,b,4),t.j()}})}
function Uq(a,b,c,d){var e,f,g,h,k,l,m,n,q,u,t,v,w,x,y,z;return I(function(B){switch(B.h){case 1:e=Kc;f=b.wa==null;g=[];h=Math.max(0,Math.max(c.F,a.ka)-.1);k=Math.min(c.D,a.ha)+.1;l=c.codecs||b.stream.codecs;m=Ce(l);n=De(c.mimeType||b.stream.mimeType);q=c.m;if(q==b.ce&&h==b.Qb&&k==b.Pb&&m==b.ae&&n==b.be){B.u(2);break}u=b.ae&&b.be&&sp(a.g.P,b.type,n,l,Jq(a));if(!u){B.u(3);break}t=null;b.type===e.oa?t=a.h.get(e.W):b.type===e.W&&(t=a.h.get(e.oa));if(!t){B.u(3);break}return B.g(oq(t).catch(function(){}),
5);case 5:t.Ya=null,t.Qb=null,t.Pb=null,Eq(a,t);case 3:return B.g($q(a,b,q,h,k,c,m,n),2);case 2:return Ik(c.Z,b.Ya)||(b.Ya=c.Z,c.j&&c.Z&&(v=Wq(a,b,c.Z),w=function(){var H,E,C,A,F,D,J,L,P,O,N;return I(function(M){switch(M.h){case 1:return M.m(2),M.g(v,4);case 4:return H=M.i,pj(a.l),E=null,C=new Map,A={projection:null,hfov:null},b.stream&&(F=b.stream.videoLayout)&&(D=F.split("/"),D.includes("PROJ-RECT")?A.projection="rect":D.includes("PROJ-EQUI")?A.projection="equi":D.includes("PROJ-HEQU")?A.projection=
"hequ":D.includes("PROJ-PRIM")?A.projection="prim":D.includes("PROJ-AIV")&&(A.projection="hequ")),J=new $g,J.box("moov",eh).box("trak",eh).box("mdia",eh).ea("mdhd",function(S){E=mh(S.reader,S.version).timescale}).ea("hdlr",function(S){S=S.reader;S.skip(4);S=S.sb(4,!1);switch(String.fromCharCode(S[0],S[1],S[2],S[3])){case "soun":C.set(e.W,E);break;case "vide":C.set(e.oa,E)}E=null}),b.type!==e.oa||A.projection||J.box("minf",eh).box("stbl",eh).ea("stsd",gh).boxes("encv avc1 avc3 hev1 hvc1 dvav dva1 dvh1 dvhe dvc1 dvi1".split(" "),
hh).box("vexu",eh).box("proj",eh).ea("prji",function(S){S=S.reader.Mc();A.projection=S}).box("hfov",function(S){S=S.reader.S()/1E3;A.hfov=S}),J.parse(H,!0,!0),b.type===e.oa&&ar(a,A),C.has(b.type)?c.Z.timescale=C.get(b.type):E!=null&&(c.Z.timescale=E),L=b.stream.segmentIndex,L instanceof Xk&&(P=Zk(L,c.startTime)),O=b.stream.closedCaptions&&b.stream.closedCaptions.size>0,M.g(a.g.gg(b.type,H),5);case 5:return M.g(So(a.g.P,b.type,H,null,b.stream,O,b.sc,d,!1,!1,P),6);case 6:M.o(0);break;case 2:throw N=
M.l(),b.Ya=null,N;}})},x=c.startTime,f&&(y=Oo(a.g.P,b.type),y!=null&&(x=y)),a.g.Pi(x,c.Z),g.push(w()))),z=b.wa?b.wa.i:-1,c.i!=z&&g.push(dp(a.g.P,b.type,c.startTime)),B.g(Promise.all(g),0)}})}
function $q(a,b,c,d,e,f,g,h){var k,l,m,n,q;return I(function(u){switch(u.h){case 1:k=Kc;l=Jq(a);u.m(2);b.Qb=d;b.Pb=e;g&&(b.ae=g);h&&(b.be=h);b.ce=c;m=a.j.sequenceMode||a.j.type=="HLS";n=null;b.type===k.oa?n=a.h.get(k.W):b.type===k.W&&(n=a.h.get(k.oa));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){u.u(4);break}return u.g(ap(a.g.P,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return u.g(ap(a.g.P,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),6);case 6:u.o(0);
break;case 2:throw q=u.l(),b.Qb=null,b.Pb=null,b.ae=null,b.be=null,b.ce=null,q;}})}
function Vq(a,b,c,d,e,f,g,h){g=g===void 0?!1:g;h=h===void 0?!1:h;var k,l,m,n,q;return I(function(u){switch(u.h){case 1:return k=d.closedCaptions&&d.closedCaptions.size>0,a.i.shouldFixTimestampOffset&&(l=d.mimeType=="video/mp4"||d.mimeType=="audio/mp4",m=null,e.Z&&(m=e.Z.timescale),(n=l&&m&&d.type==="video"&&a.j.type=="DASH")&&(new $g).box("moof",eh).box("traf",eh).ea("tfdt",function(t){var v,w,x,y,z,B;return I(function(H){v=lh(t.reader,t.version);w=v.baseMediaDecodeTime;if(!w)return H.return();x=
-w/m;y=Number(b.ce)||0;if(!(y<x))return H.u(0);z=b.Qb;B=b.Pb;return H.g($q(a,b,x,z,B,e),0)})}).parse(f,!1,g)),u.g(Zq(a,b,c),2);case 2:return pj(a.l),q=b.sc,b.sc=!1,u.g(a.g.gg(b.type,f),3);case 3:return u.g(So(a.g.P,b.type,f,e,d,k,q,h,g),4);case 4:pj(a.l),u.j()}})}
function Zq(a,b,c){var d,e,f,g,h,k,l,m,n;return I(function(q){if(q.h==1){a.G==b&&(a.G=null);d=b.stream.segmentIndex;d instanceof Xk&&(d.ob(a.j.presentationTimeline.Vd()),e=[],Yk(d,function(){e.push(-1)}));f=Math.max(a.i.bufferBehind*a.C,a.j.presentationTimeline.h);g=Mo(a.g.P,b.type);if(g==null)return q.return();h=c-g;k=a.i.evictionGoal;l=a.j.presentationTimeline.Nb();m=a.j.presentationTimeline.ib();n=h-f;m-l>k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():q.g(a.g.P.remove(b.type,g,g+n,e),2)}if(q.h!=
4)return pj(a.l),a.G?q.g(Zq(a,a.G,c),4):q.u(0);pj(a.l);q.j()})}function Oq(a){return a&&a.type==Ic&&(a.stream.mimeType=="application/cea-608"||a.stream.mimeType=="application/cea-708")}
function Wq(a,b,c,d){var e,f,g,h,k;return I(function(l){switch(l.h){case 1:if(e=c.hc())return l.return(e);f=null;if(b.X){var m=b.X,n=m.g;c instanceof Hk&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Pf=d),f=m.gd):f=null}f||(f=Kq(c,b.stream,d||null,a.i.retryParameters,a.g.lc));g=0;b.ia&&(g=b.ia.h);b.Ia=f;return l.g(f.promise,2);case 2:h=l.i;b.Ia=null;k=h.data;if(!c.aesKey){l.u(3);break}return l.g(hl(k,c.aesKey,g),4);case 4:k=l.i;case 3:return l.return(k)}})}
function Kq(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a instanceof X?a:void 0,h=g?1:0;a=ol(a.N(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(mj,a,{type:h,stream:b,segment:g,isPreload:f})}
function Gq(a,b,c,d){var e,f;return I(function(g){if(g.h==1)return b.ub=!1,b.Rc=!1,b.zc=0,b.xb=!0,b.wa=null,b.ia=null,b.X&&!a.m.has(b.stream)&&iq(b.X),d?(e=a.g.Ab(),f=a.g.P.getDuration(),g.g(a.g.P.remove(b.type,e+d,f),3)):g.g($o(a.g.P,b.type),4);if(g.h!=3)return pj(a.l),c?g.g(a.g.P.flush(b.type),3):g.u(3);pj(a.l);b.xb=!1;b.endOfStream=!1;b.Ba||b.Za||vq(a,b,0);g.j()})}
function vq(a,b,c){var d=b.type;if(d!=Ic||a.h.has(d))b.Za=(new Se(function(){var e;return I(function(f){if(f.h==1)return f.m(2),f.g(Lq(a,b),4);if(f.h!=2)return f.o(0);e=f.l();if(a.g)a.g.onError(e);f.j()})})).ma(c)}function nq(a){a.Za!=null&&(a.Za.stop(),a.Za=null)}function oq(a){return I(function(b){return a.Ia?b.g(a.Ia.abort(),0):b.u(0)})}
function Mq(a,b,c){var d,e,f,g,h;return I(function(k){switch(k.h){case 1:return c.code==3024?(b.Ba=!1,nq(b),vq(a,b,0),k.return()):k.g(Qi(a.$),2);case 2:pj(a.l);if(c.category===1&&c.code!=1003){if(b.bc)return xq(a,!1),k.return();d=Yq(a,c);c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(c.handled||c.code!=1011){k.u(3);break}e=a.g.Ab();f=Oo(a.g.P,b.type);for(g=Qq(a,b,e,f);((h=g)==null?void 0:h.Bb())===2;)b.wa=g,g=Qq(a,b,e,f);if(!g){k.u(3);break}return k.g(dp(a.g.P,b.type,g.startTime),
5);case 5:return b.Ba=!1,b.Ec=!1,nq(b),vq(a,b,0),k.return();case 3:if(!c.handled||c.code!=1011)a.g.onError(c);c.handled||a.i.failureCallback(c);k.j()}})}function Yq(a,b){return a.i.maxDisabledTime===0&&b.code==1011?1:a.i.maxDisabledTime}
function Pq(a,b){b=b===void 0?!1:b;var c,d,e,f,g,h;return I(function(k){if(k.h==1){c=Date.now()/1E3;d=a.i.minTimeBetweenRecoveries;if(!b&&(!a.i.allowMediaSourceRecoveries||c-a.R<d))return k.return(!1);a.R=c;e=Kc;if(f=a.h.get(e.W))nq(f),f.Ia&&(f.Ia.abort(),f.Ia=null),f.Ya=null,f.Qb=null,f.Pb=null,f.Ba=!1,f.ub=!1,f.zc=0,f.Rc=!1,f.xb=!1,f.ia&&f.ia.If();if(g=a.h.get(e.oa))nq(g),g.Ia&&(g.Ia.abort(),g.Ia=null),g.Ya=null,g.Qb=null,g.Pb=null,g.Ba=!1,g.ub=!1,g.zc=0,g.Rc=!1,g.xb=!1,g.ia&&g.ia.If();h=a.g.video.paused;
return k.g(mp(a.g.P,Jq(a)),2)}!g||g.xb||g.Ba||g.Za||vq(a,g,0);!f||f.xb||f.Ba||f.Za||vq(a,f,0);h||a.g.video.play();return k.return(!0)})}function ar(a,b){if(a.U.projection!=b.projection||a.U.hfov!=b.hfov){if(b.projection!=null||b.hfov!=null){var c=(new Map).set("detail",b);c=new Yi("spatialvideoinfo",c)}else c=new Yi("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.U=b}}
function Hq(a){if(a.i.crossBoundaryStrategy!=="keep")return!0;var b=qb();if(!b.eb()){b=r(a.h.keys());for(var c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==Kc.Ka&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1)return!0}else if(!b.ue())for(b=r(a.h.keys()),c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==Kc.Ka&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1){a=new Set;b=r(c.fullMimeTypes);for(c=b.next();!c.done;c=b.next())a.add(ze(c.value));return a.size>1}return!1}
function Dq(a){a.F.bb();Hq(a)&&(a.F.H(a.g.video,"waiting",function(){return Iq(a)}),a.F.H(a.g.video,"timeupdate",function(){return Iq(a)}))}function Iq(a){if(Hq(a)){a.K.stop();var b=a.g.Ab(),c=a.h.get("video")||a.h.get("audio");c&&(c=c.Ya)&&c.g!==null&&(b=c.g-b,b<0||b>1||(a.I=c.g+.1,a.K.ma(b)))}}
function Rq(a,b,c){if(b.type===Ic)return!1;var d=b.Ya;if(!d)return!1;var e=c.Z;c=d.g!==e.g;a.i.crossBoundaryStrategy==="reset_to_encrypted"&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.i.crossBoundaryStrategy="keep"));a.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&d.encrypted==e.encrypted&&(c=!1);if(a.i.crossBoundaryStrategy==="keep"&&d.mimeType&&e.mimeType){var f=Ae(Ee(d.mimeType)),g=Ae(Ee(e.mimeType));d.mimeType==e.mimeType&&f==g&&(c=!1)}(a.h.get("video")||a.h.get("audio"))===b&&
c&&(a.J||b.sc)&&(a.J=!1,Pq(a,!0).then(function(){var h=(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.g.onEvent(new Yi("boundarycrossed",h))}));return c}
function Jq(a,b){function c(f){if(f.fullMimeTypes&&f.fullMimeTypes.size>1&&a.h.has(f.type)){var g=a.h.get(f.type),h=Oo(a.g.P,g.type),k=a.g.Ab();(g=Qq(a,g,k,h))&&g.codecs&&g.mimeType&&(f.codecs=g.codecs,f.mimeType=g.mimeType)}}b=b===void 0?!1:b;var d=new Map,e=a.o.audio;e&&(c(e),d.set("audio",e));if(e=a.o.video)c(e),d.set("video",e);b&&a.B&&d.set(Ic,a.B);return d};function br(){}
function cr(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=r(Object.keys(b)),n=m.next();!n.done;n=m.next()){n=n.value;var q=e+"."+n,u=f?d[e]:c[n];g.has(n)?(Xa("Invalid config, dangerous key "+q),l=!1):k||n in c?b[n]===void 0?u===void 0||k?delete a[n]:a[n]=qd(u):h?a[n]=b[n]:u.constructor==Object&&b[n]&&b[n].constructor==Object?(a[n]||(a[n]=qd(u)),
n=cr(a[n],b[n],u,d,q),l=l&&n):typeof b[n]!=typeof u||b[n]==null||typeof b[n]!="function"&&b[n].constructor!=u.constructor?(Xa("Invalid config, wrong type for "+q),l=!1):typeof c[n]=="function"&&c[n].length!=b[n].length?(Ya("Unexpected number of arguments for "+q),a[n]=b[n]):a[n]=Array.isArray(a[n])?b[n].slice():b[n]:(Xa("Invalid config, unrecognized key "+q),l=!1)}return l}
function dr(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 er(a,b){return a&&b}
function fr(a,b){function c(f){for(var g=r(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&Object.keys(f[h]).length===0)delete f[h];else{var k=f[h];Array.isArray(k)&&k.length===0?delete f[h]:typeof f[h]=="function"?delete f[h]:e(f[h])&&(c(f[h]),Object.keys(f[h]).length===0&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])||
(h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),Object.keys(l).length>0||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?fb(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}K("shaka.util.ConfigUtils",br);br.getDifferenceFromConfigObjects=fr;br.convertToConfigObject=dr;br.mergeConfigObjects=cr;function gr(){}
function hr(){var a=Infinity,b=qb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:Pi(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&k=="skd"&&(k=l.serverCertificate,l=gk(h),h=hk(h,l,k));return h},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,
minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},d="reload";b.eb()&&(d="smooth");var e={retryParameters:Pi(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,
ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:ir,manifestPreprocessorTXml:jr,sequenceMode:!1,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],
mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:b.vc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:ir,manifestPreprocessorTXml:jr,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
f={trackSelectionCallback:function(h){return I(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return I(function(l){if(l.h==1)return navigator.storage&&navigator.storage.estimate?l.g(navigator.storage.estimate(),3):l.return(!0);k=l.i;return l.return(k.usage+h<k.quota*.95)})},progressCallback:function(h,k){return er([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:Pi(),failureCallback:function(h){return er([h])},rebufferingGoal:0,
bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],
disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,
loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(h){return er([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k,l){return er([h,k,l])},dispatchAllEmsgBoxes:!1,
useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new Yf},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(Mp,[null].concat(G(Ga.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,
minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!1},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredAudioRole:"",preferredVideoRole:"",
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,
playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,
disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:Infinity,preloadPrevItem:!0,repeatMode:0}};f.trackSelectionCallback=function(h){return I(function(k){return k.return(kr(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.La(g)}
function lr(){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 mr(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 cr(a,b,c||hr(),d,"")}
function kr(a,b,c){var d=c;d=="AUTO"&&(c=a.some(function(h){return h.hdr&&h.hdr=="HLG"?!0:!1}),d=qb().Cc(c));var e=a.filter(function(h){return h.type!="variant"||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=hf(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return af(h.language)==f}));c.length==0&&(c=e.filter(function(h){return h.primary}));c.length==0&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&h.height<=480});g.length&&(g.sort(function(h,k){return k.height-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=r(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ic&&c.type!="image"||b.push(c);return b}function ir(a){return er([a],a)}function jr(a){return er([a],a)}K("shaka.util.PlayerConfiguration",gr);gr.mergeConfigObjects=mr;gr.createDefaultForLL=lr;gr.createDefault=hr;function nr(){this.g=null;this.h=[]}function or(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function pr(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function qr(){this.i=this.h=null;this.g=[]}function rr(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function sr(){this.C=this.$=NaN;this.l="";this.j=this.Bg=this.A=this.B=this.K=this.D=this.o=this.m=this.J=this.F=this.i=this.U=this.Y=this.M=this.O=this.R=NaN;this.L=0;this.G=this.I=NaN;this.g=new nr;this.h=new qr}function tr(a,b,c){a.R=b;a.O=c}function ur(a,b,c){a.$=b;a.C=c}function vr(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function wr(a,b){b>=0&&(a.o=b)}function xr(a,b){b>=0&&(a.D=b)}function yr(a,b){b>=0&&(a.K=b)}function zr(a,b){a.j=isNaN(a.j)?b:a.j+b}
function Ar(a){var b=a.$,c=a.C,d=a.l,e=a.B,f=a.O,g=a.R,h=a.M,k=a.Y,l=a.U,m=a.A,n=a.i,q=a.F,u=a.J,t=a.m,v=or(a.g,"playing"),w=or(a.g,"paused"),x=or(a.g,"buffering"),y=a.o,z=a.D,B=a.K,H=a.Bg,E=a.j,C=a.L,A=a.I,F=a.G,D=pr(a.g),J=[];a=r(a.h.g);for(var L=a.next();!L.done;L=a.next())L=L.value,J.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:b,height:c,currentCodecs:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,corruptedFrames:h,
stallsDetected:k,gapsJumped:l,estimatedBandwidth:m,completionPercent:n,loadLatency:q,manifestTimeSeconds:u,drmTimeSeconds:t,playTime:v,pauseTime:w,bufferingTime:x,licenseTime:y,liveLatency:z,maxSegmentDuration:B,manifestSizeBytes:H,bytesDownloaded:E,nonFatalErrorCount:C,manifestPeriodCount:A,manifestGapCount:F,stateHistory:D,switchHistory:J}};function Br(a,b,c,d){Zi.call(this);this.M=a;this.Y=b;this.Ca=d.networkingEngine;this.m=c;this.B=null;this.za=0;this.Ga=d.Ld;this.F=d.Gi;this.Ha=d.Hi;this.g=d.config;this.l=this.G=this.h=null;this.va=!1;this.I=d.Ui;this.xa=!1;this.j=null;this.ka=!1;this.o=null;this.L=new Map;this.ya=!1;this.Fa=d.Ti;this.$=new sr;this.na=new Ri;this.A=new Ri;this.O=null;this.C=!1;this.ha=d.xh;this.U=this.i=null;this.R=!1;this.K=[];this.J=[];this.D=!0}pa(Br,Zi);function Cr(a,b,c){(a=b?a.J:a.K)?a.push(c):c()}
function Dr(a){if(a.J)for(var b=r(a.J),c=b.next();!c.done;c=b.next())c=c.value,c();a.J=null}function Er(a,b){a.O=b;a.R=!0;if(a.K){b=r(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}p=Br.prototype;p.getStartTime=function(){return this.m};p.Sd=function(){return this.M};p.kf=function(){return this.h};function Fr(a){a.xa=!0;return a.I}p.getStats=function(){return this.$};function Gr(a){a.ka=!0;return a.j}p.ei=function(){return this.i?Ef(this.i):null};
p.di=function(){return this.U?Ff(this.U):null};function Hr(a){a.ya=!0;return a.L}
p.start=function(){var a=this;(function(){var b;return I(function(c){switch(c.h){case 1:return c.g(Promise.resolve(),2);case 2:return c.m(3),c.g(Ir(a),5);case 5:Jr(a);if("webkit"===window.shakaMediaKeysPolyfill){c.u(6);break}return c.g(Kr(a),7);case 7:Jr(a);case 6:return c.g(Lr(a),8);case 8:Jr(a);if(!a.ha){c.u(9);break}return c.g(Mr(a),10);case 10:Jr(a);case 9:if(!a.ha||!a.j){c.u(11);break}return c.g(Zj(a.j),12);case 12:Jr(a);case 11:a.A.resolve();c.o(0);break;case 3:b=c.l(),b instanceof R&&(b.code==
7001||b.code==7003)||a.A.reject(b),c.j()}})})()};p.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):Zi.prototype.dispatchEvent.call(this,a)};p.onError=function(a){a.severity===2&&(this.A.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new Yi("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Jr(a){if(a.C)throw new R(2,7,7003);}function Nr(a,b){a.dispatchEvent(new Yi("onstatechange",(new Map).set("state",b)))}
function Ir(a){var b,c,d,e,f,g;return I(function(h){switch(h.h){case 1:Nr(a,"manifest-parser");a.l||(a.G=Vc(a.M,a.Y),a.l=a.G(),a.l.configure(a.g.manifest,function(){return a.D}));b=Date.now()/1E3;Nr(a,"manifest");if(a.h){h.u(2);break}return h.g(a.l.start(a.M,a.Ha),3);case 3:return a.h=h.i,Or(a.h),h.g(Pr(a),2);case 2:return a.na.resolve(),c=new Yi("manifestparsed",void 0),h.g(Promise.resolve(),5);case 5:a.dispatchEvent(c);if(a.h.variants.length==0)throw new R(2,4,4036);Or(a.h);d=to(a.F,a.h);if(!d){h.u(6);
break}e=new Yi("trackschanged",void 0);return h.g(Promise.resolve(),7);case 7:Jr(a),a.dispatchEvent(e);case 6:f=Date.now()/1E3,g=f-b,g>=0&&(a.$.J=g),h.j()}})}
function Kr(a,b){var c,d,e,f;return I(function(g){switch(g.h){case 1:if(!a.h||a.j)return g.return();Nr(a,"drm-engine");a.za=Date.now()/1E3;a.j=a.Ga();a.F.g=a.j;a.j.configure(a.g.drm,function(){return a.D});c=Nf(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.ba());return g.g(Aj(a.j,c,a.h.offlineSessionIds,d),2);case 2:Jr(a);if(!b){g.u(3);break}return g.g(a.j.Kb(b),4);case 4:Jr(a);case 3:return g.g(ro(a.F,a.h),5);case 5:e=g.i;if(!e){g.u(0);break}f=new Yi("trackschanged",
void 0);return g.g(Promise.resolve(),7);case 7:a.dispatchEvent(f),g.j()}})}p.configure=function(a,b){a=dr(a,b);mr(this.g,a)};p.getConfiguration=function(){return qd(this.g)};
function Pr(a){return I(function(b){a.B||(a.B=a.g.adaptationSetCriteriaFactory(),a.B.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredAudioRole,videoRole:a.g.preferredVideoRole,channelCount:0,hdrLevel:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,audioLabel:a.g.preferredAudioLabel,videoLabel:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,
preferredAudioCodecs:a.g.preferredAudioCodecs,preferredAudioChannelCount:a.g.preferredAudioChannelCount}));if(a.i||!a.h.variants.length||a.h.variants.length!=1&&a.h.type!="HLS")return b.u(0);a.i=Qr(a);return a.i?b.g(Rr(a.i),0):b.u(0)})}function Lr(a){return I(function(b){if(b.h==1)return!a.i||a.h.variants.includes(a.i)?b.u(0):b.g(Sr(a.i),3);a.i=Qr(a);return a.i?b.g(Rr(a.i),0):b.u(0)})}
function Mr(a){var b,c,d,e,f;return I(function(g){!a.i&&(b=Qr(a))&&(a.i=b);if(!a.i)return g.u(0);c=a.h.presentationTimeline.ba();d=[];e=a.i;e.video&&d.push(Tr(a,e.video,c));e.audio&&d.push(Tr(a,e.audio,c));(f=Of(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&Wf(e.audio,f,a.g)&&(d.push(Tr(a,f,c)),a.U=f);return g.g(Promise.all(d),0)})}
function Qr(a){if(!a.o){var b=a.g.abrFactory;a.o=b();a.o.configure(a.g.abr)}b=Nf(a.h.variants);b=a.B.create(b);a.o.setVariants(Array.from(b.values()));return a.o.chooseVariant(!0)}
function Tr(a,b,c){var d,e,f,g,h;return I(function(k){if(k.h==1)return d=a.g.streaming.segmentPrefetchLimit||2,e=new $p(d,b,function(l,m,n){return Kq(l,m,n||null,a.g.streaming.retryParameters,a.Ca,a.D)},!1),a.L.set(b.id,e),b.segmentIndex?k.u(2):k.g(b.createSegmentIndex(),2);f=typeof a.m==="number"?a.m:0;g=b.segmentIndex.zb(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=Hf(b.segmentIndex));return h?c?h.Z?k.g(cq(e,h.Z),0):k.u(0):k.g(bq(e,h.startTime),0):k.u(0)})}
function Rr(a){var b,c,d,e;return I(function(f){b=[];c=r([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.g(Promise.all(b),0):f.u(0)})}function Sr(a){var b,c,d,e;return I(function(f){b=[];c=r([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.g(Promise.all(b),0):f.u(0)})}p.qj=function(){return this.A};
p.destroy=function(){var a=this,b,c,d;return I(function(e){if(e.h==1)return a.C=!0,!a.l||a.va?e.u(2):e.g(a.l.stop(),2);if(e.h!=4)return a.o&&a.o.release(),a.I&&!a.xa&&a.I.release(),!a.j||a.ka?e.u(4):e.g(a.j.destroy(),4);if(a.L.size>0&&!a.ya)for(b=r(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,iq(d);e.j()})};function Or(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))}K("shaka.media.PreloadManager",Br);
Br.prototype.destroy=Br.prototype.destroy;Br.prototype.waitForFinish=Br.prototype.qj;Br.prototype.getPrefetchedTextTrack=Br.prototype.di;Br.prototype.getPrefetchedVariantTrack=Br.prototype.ei;function Ur(a,b){Zi.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{yc:null,xc:Vr,jc:function(d,e){return Wr(c,"enter",d,e)}},{yc:Xr,xc:Vr,jc:function(d,e){return Wr(c,"enter",d,e)}},{yc:Yr,xc:Vr,jc:function(d,e){return Wr(c,"enter",d,e)}},{yc:Vr,xc:Xr,jc:function(d,e){return Wr(c,"exit",d,e)}},{yc:Vr,xc:Yr,jc:function(d,e){return Wr(c,"exit",d,e)}},{yc:Xr,xc:Yr,jc:function(d,e){e?Wr(c,"skip",d,e):(Wr(c,"enter",d,e),Wr(c,"exit",d,e))}},{yc:Yr,xc:Xr,jc:function(d,e){return Wr(c,"skip",
d,e)}}];this.h=new jb;this.h.H(this.i,"regionremove",function(d){c.g.delete(d.region)})}pa(Ur,Zi);Ur.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Zi.prototype.release.call(this)};
Ur.prototype.j=function(a,b){if(!this.l||a!=0){this.l=!1;for(var c=r(this.i.h.values()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Xr:a>d.endTime?Yr:Vr;this.g.set(d,f);for(var g=r(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.yc==e&&h.xc==f&&h.jc(d,b)}}};function Wr(a,b,c,d){b=new Yi(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Xr=1,Vr=2,Yr=3;function Zr(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=mc(b)}catch(h){}throw new R(c==401||c==403?2:1,1,1001,d,c,f,a,g,e||d);};function $r(){}
function as(a,b,c,d,e,f){var g=new bs;try{sj(b.headers).forEach(function(m,n){g.append(n,m)})}catch(m){return Ti(new R(1,1,1002,a,m,c))}var h=new cs,k={hg:!1,mh:!1};a=ds(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 Si(a,function(){k.hg=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new Se(function(){k.mh=!0;h.abort()});l.ma(b/
1E3);a.finally(function(){l.stop()})}return a}
function ds(a,b,c,d,e,f,g,h,k){var l,m,n,q,u,t,v,w,x,y,z,B,H,E,C;return I(function(A){switch(A.h){case 1:return l=es,m=fs,q=new ArrayBuffer(0),t=u=0,v={},w=Date.now(),A.m(2),A.g(l(a,d),4);case 4:n=A.i;v=gs(n.headers);g(v);if(d.method=="HEAD"){A.u(5);break}y=(x=n.headers.get("Content-Length"))?parseInt(x,10):0;if(!n.body)return A.g(n.arrayBuffer(),9);z=n.clone().body.getReader();B=function(F){function D(){var J,L,P,O;return I(function(N){switch(N.h){case 1:return N.m(2),N.g(z.read(),4);case 4:J=N.i;
N.o(3);break;case 2:return N.l(),N.return();case 3:if(J.done){N.u(5);break}u+=J.value.byteLength;if(!h){N.u(5);break}return N.g(h(J.value),5);case 5:L=Date.now();P=u-t;if(L-w>100&&P>=k||J.done)O=J.done?0:y-u,f(L-w,P,O),t=u,w=L;J.done?F.close():(F.enqueue(J.value),D());N.j()}})}D()};new m({start:B});return A.g(n.arrayBuffer(),8);case 8:q=A.i;A.u(5);break;case 9:q=A.i,H=Date.now(),f(H-w,q.byteLength,0);case 5:b.headers.Range&&(E=b.headers.Range.replace("bytes=","").split("-").filter(function(F){return F}).map(function(F){return parseInt(F,
10)}),E.length==2&&q.byteLength!=E[1]-E[0]+1&&Ya("Payload length does not match range requested bytes",b,n));A.o(3);break;case 2:C=A.l();if(e.hg)throw new R(1,1,7001,a,c);if(e.mh)throw new R(1,1,1003,a,c);throw new R(1,1,1002,a,C,c);case 3:return A.return(Zr(v,q,n.status,a,n.url,b,c))}})}function gs(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
function hs(){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)}K("shaka.net.HttpFetchPlugin",$r);$r.isSupported=hs;$r.parse=as;var es=window.fetch,cs=window.AbortController,fs=window.ReadableStream,bs=window.Headers;hs()&&(cj("http",as,2,!0),cj("https",as,2,!0),cj("blob",as,2,!0));function is(){}
function js(a,b,c,d,e,f){var g=new ks,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;var q={};g.onabort=function(){n(new R(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var t=g.getAllResponseHeaders().trim().split("\r\n"),v={};t=r(t);for(var w=t.next();!w.done;w=t.next()){w=w.value;var x=w.indexOf(": ");x!==-1&&(v[w.slice(0,
x).toLowerCase()]=w.slice(x+2))}q=v;e(q)}};g.onload=function(){var t=g.response;try{var v=Zr(q,t,g.status,a,g.responseURL,b,c);m(v)}catch(w){n(w)}};g.onerror=function(t){n(new R(1,1,1002,a,t,c))};g.ontimeout=function(){n(new R(1,1,1003,a,c))};g.onprogress=function(t){var v=Date.now(),w=f.minBytesForProgressEvents||0,x=t.loaded-k;if(v-h>100&&x>=w||t.lengthComputable&&t.loaded==t.total)d(v-h,x,g.readyState==4?0:t.total-t.loaded),k=t.loaded,h=v};for(var u in b.headers)try{g.setRequestHeader(u.toLowerCase(),
b.headers[u])}catch(t){throw new R(1,1,1002,a,t,c);}g.send(b.body)});return new Si(l,function(){g.abort();return Promise.resolve()})}K("shaka.net.HttpXHRPlugin",is);is.parse=js;var ks=window.XMLHttpRequest;cj("http",js,1,!0);cj("https",js,1,!0);cj("blob",js,1,!0);/*
 @license
 Copyright 2013 Ali Al Dallal

 Licensed under the MIT license.

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

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

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
*/
for(var ls={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"},ms=r(Object.keys(ls)),ns=ms.next();!ns.done;ns=ms.next()){var os=ns.value;ls[os.toLowerCase()]=ls[os]};function Fs(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Fs(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=ae,e=a.fontStyle==be,f=a.textDecoration.includes(ce);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;e==""&&b&&(e=b.color);d="";(e=Gs(e))&&(d+="."+e);e=a.backgroundColor;e==""&&b&&(e=b.backgroundColor);(b=Gs(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=r(h);h=k.next().value;
k=k.next().value;return"<"+h+(k===void 0?"":k)+">"+g+"</"+h+">"},a.payload)}
function Gs(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 Hs(a,b){var c=[];a=r(Is(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,G(Hs(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Fs(d,b);c.push(e)}return c}
function Is(a){var b=[];a=r(a);for(var c=a.next(),d={};!c.done;d={Je:void 0},c=a.next())d.Je=c.value,b.some(function(e){return function(f){return Sd(e.Je,f)}}(d))||b.push(d.Je);return b}
function Js(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 Ks(a,b){var c=Hs(b),d=[];b=a.cues?Array.from(a.cues):[];c=r(c);for(var e=c.next(),f={};!e.done;f={Fc:void 0},e=c.next())f.Fc=e.value,!b.some(function(g){return function(h){return h.startTime==g.Fc.startTime&&h.endTime==g.Fc.endTime&&h.text==g.Fc.payload?!0:!1}}(f))&&f.Fc.payload&&(e=Js(f.Fc))&&d.push(e);b=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-
d.indexOf(h)});b=r(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function Ls(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 Ms(a){var b=this;this.i=a;this.l=new jb;this.j=null;this.h=new Map;this.g=-1;this.A=!1;this.m=null;this.C=function(){var c;(c=b.m)==null||c.stop();b.m=null;b.l.jb(b.i,"textchanged",b.o);b.l.jb(b.j.textTracks,"change",b.B);c=r(b.h.values());for(var d=c.next();!d.done;d=c.next())d.value.remove();b.h.clear();b.g=-1;b.j=null};this.o=function(){var c=new Map,d=b.i.$b();d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;if(b.h.has(e.id)){var f=b.h.get(e.id);e.active||f.track.mode==="disabled"||
(f.track.mode="disabled");b.h.delete(e.id)}else{var g=f=b.j.ownerDocument.createElement("track");var h=qb();h=e.forced&&h.Aa()==="WEBKIT"?"forced":e.kind==="caption"?"captions":"subtitles";g.kind=h;g=f;h=void 0;if(e.label)h=e.label;else if(e.language)if(e.language in ls)h=ls[e.language];else{var k=ff(e.language);k in ls&&(h=ls[k]+" ("+e.language+")")}h||(h=e.originalTextId,e.language&&e.language!==e.originalTextId&&(h+=" ("+e.language+")"));g.label=h;e.language?e.language in ls?f.srclang=e.language:
(g=ff(e.language),h=void 0,f.srclang=(h=g)!=null?h:"und"):f.srclang="und";f.src="data:,WEBVTT";f.track.mode="disabled";b.j.appendChild(f)}c.set(e.id,f);e.active&&(b.g=e.id)}d=r(b.h.values());for(e=d.next();!e.done;e=d.next())e.value.remove();b.g>-1&&(c.has(b.g)?(d=c.get(b.g).track,d.mode==="disabled"&&(d.mode=b.A?"showing":"hidden")):b.g=-1);b.h=c};this.B=function(){if(!b.m){var c=b.j;b.m=(new Se(function(){b.m=null;if(b.j===c){var d=-1,e=!1;if(b.h.has(b.g)){var f=b.h.get(b.g);f.track.mode==="showing"?
(d=b.g,e=!0):f.track.mode==="hidden"&&(d=b.g)}if(!e)for(e=r(b.h),f=e.next();!f.done;f=e.next()){var g=r(f.value);f=g.next().value;g=g.next().value;if(g.track.mode==="showing"){d=f;break}else d<0&&g.track.mode==="hidden"&&(d=f)}e=r(b.h);for(f=e.next();!f.done;f=e.next())g=r(f.value),f=g.next().value,g=g.next().value,f!==d&&g.track.mode!=="disabled"&&(g.track.mode="disabled");b.g!==d&&(b.g=d,d>-1&&b.i.Mf({id:d}));b.i.bh(d>-1&&b.h.get(d).track.mode==="showing")}})).ma(0)}};this.l.H(a,"loaded",function(){return b.enableTextDisplayer()});
this.enableTextDisplayer()}p=Ms.prototype;p.configure=function(){};p.remove=function(a,b){if(this.i)this.h.has(this.g)&&Ls(this.h.get(this.g).track,function(c){return c.startTime<b&&c.endTime>a});else return!1;return!0};p.append=function(a){this.h.has(this.g)&&Ks(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.C(),this.i=null);var a;(a=this.m)==null||a.stop();this.m=null;var b;(b=this.l)==null||b.release();this.l=null;return Promise.resolve()};p.isTextVisible=function(){return this.A};
p.setTextVisibility=function(a){this.A=a;if(this.h.has(this.g)){var b=this.h.get(this.g).track;b.mode!=="disabled"&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.i&&this.i.jf()===3)if(b=Array.from(this.i.lf().textTracks).filter(function(d){return["captions","subtitles","forced"].includes(d.kind)}),a){a=null;b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c.mode==="showing"){a=null;break}else a||c.mode!=="hidden"||(a=c);a&&(a.mode="showing")}else for(a=r(b),b=a.next();!b.done;b=
a.next())b=b.value,b.mode==="showing"&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.i&&this.i.jf()===2&&(this.j=this.i.lf(),this.l.Na(this.i,"unloading",this.C),this.l.H(this.i,"textchanged",this.o),this.l.H(this.j.textTracks,"change",this.B),this.o())};K("shaka.text.NativeTextDisplayer",Ms);Ms.prototype.enableTextDisplayer=Ms.prototype.enableTextDisplayer;Ms.prototype.setTextLanguage=Ms.prototype.setTextLanguage;Ms.prototype.setTextVisibility=Ms.prototype.setTextVisibility;
Ms.prototype.isTextVisible=Ms.prototype.isTextVisible;Ms.prototype.destroy=Ms.prototype.destroy;Ms.prototype.append=Ms.prototype.append;Ms.prototype.remove=Ms.prototype.remove;Ms.prototype.configure=Ms.prototype.configure;function Ns(a,b){vb("SimpleTextDisplayer","Please migrate to NativeTextDisplayer");this.h=a;this.i=b;this.g=null;a=r(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,b.kind!=="metadata"&&b.kind!=="chapters"&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=Ns.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;Ls(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
p.append=function(a){this.g&&Ks(this.g,a)};p.destroy=function(){this.g&&(Ls(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?this.g.mode=="showing":!1};p.setTextVisibility=function(a){a&&!this.g&&Os(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){Os(this)};function Os(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}
K("shaka.text.SimpleTextDisplayer",Ns);Ns.prototype.enableTextDisplayer=Ns.prototype.enableTextDisplayer;Ns.prototype.setTextLanguage=Ns.prototype.setTextLanguage;Ns.prototype.setTextVisibility=Ns.prototype.setTextVisibility;Ns.prototype.isTextVisible=Ns.prototype.isTextVisible;Ns.prototype.destroy=Ns.prototype.destroy;Ns.prototype.append=Ns.prototype.append;Ns.prototype.remove=Ns.prototype.remove;Ns.prototype.configure=Ns.prototype.configure;function Ps(){}p=Ps.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};K("shaka.text.StubTextDisplayer",Ps);Ps.prototype.enableTextDisplayer=Ps.prototype.enableTextDisplayer;Ps.prototype.setTextLanguage=Ps.prototype.setTextLanguage;Ps.prototype.setTextVisibility=Ps.prototype.setTextVisibility;
Ps.prototype.isTextVisible=Ps.prototype.isTextVisible;Ps.prototype.destroy=Ps.prototype.destroy;Ps.prototype.append=Ps.prototype.append;Ps.prototype.remove=Ps.prototype.remove;Ps.prototype.configure=Ps.prototype.configure;function Qs(a,b){var c=this;this.j=!1;this.h=[];this.m=a;this.l=b;this.C=this.A=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.B=new Se(function(){c.m.paused||Rs(c)});Ss(this);this.o=new Map;this.i=new jb;this.i.H(document,"fullscreenchange",function(){Rs(c,!0)});this.i.H(this.m,"seeking",
function(){Rs(c,!0)});this.i.H(this.m,"ratechange",function(){Ss(c)});this.i.H(this.m,"resize",function(){var d=c.m,e=d.videoWidth;d=d.videoHeight;e&&d?c.A=e/d:c.A=null});this.G=!1;this.D=null;"ResizeObserver"in window&&(this.D=new ResizeObserver(function(){c.G||(c.G=!0,requestAnimationFrame(function(){c.G=!1;c.g&&c.g.parentElement&&c.j&&Rs(c,!0)}))}),this.D.observe(this.l));this.F=new Map}p=Qs.prototype;p.configure=function(a){this.C=a;Ss(this);Rs(this,!0)};
p.append=function(a){var b=[].concat(G(this.h));a=r(Is(a));for(var c=a.next(),d={};!c.done;d={Ke:void 0},c=a.next())d.Ke=c.value,b.some(function(e){return function(f){return Sd(f,e.Ke)}}(d))||this.h.push(d.Ke);this.h.length&&Ss(this);Rs(this)};
p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.l.removeChild(this.g);this.g=null;this.j=!1;this.h=[];this.B&&(this.B.stop(),this.B=null);this.o.clear();this.i&&(this.i.release(),this.i=null);this.D&&(this.D.disconnect(),this.D=null);return Promise.resolve()};p.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Rs(this,c>this.h.length);this.h.length||Ss(this);return!0};
p.isTextVisible=function(){return this.j};p.setTextVisibility=function(a){(this.j=a)?(this.g.parentElement||this.l.appendChild(this.g),Rs(this,!0)):this.g.parentElement&&this.l.removeChild(this.g)};p.setTextLanguage=function(a){a&&a!="und"?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function Ss(a){a.B&&(a.h.length?a.B.Da((a.C?a.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.m.playbackRate))):a.B.stop())}
function Ts(a,b){for(;b!=null;){if(b==a.g)return!0;b=b.parentElement}return!1}
function Us(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.o.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.ph:null;l&&(g.push(l.Le),l.qc&&g.push(l.qc),m||(f=!0,a.o.delete(k),l=null));m&&(h.push(k),l?Ts(a,n)||(f=!0):(Vs(a,k,e),l=a.o.get(k),n=l.ph,f=!0));k.nestedCues.length>0&&n&&Us(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,u){return q.startTime!=
u.startTime?q.startTime-u.startTime:q.endTime-u.endTime});h=r(h);for(d=h.next();!d.done;d=h.next())d=a.o.get(d.value),d.qc?(d.qc.contains(c)&&d.qc.removeChild(c),c.appendChild(d.qc),d.qc.appendChild(d.Le)):c.appendChild(d.Le)}}function Rs(a,b){if(a.g){var c=a.m.currentTime;if(!a.j||(b===void 0?0:b)){b=r(a.F.values());for(var d=b.next();!d.done;d=b.next())ri(d.value);ri(a.g);a.o.clear();a.F.clear()}a.j&&Us(a,a.h,a.g,c,[])}}
function Vs(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"&&Ws(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.A===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==ed?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==ed?"%":"px")+"-"+g.regionAnchorX+"x"+g.regionAnchorY;if(a.F.has(c))c=a.F.get(c);else{e=document.createElement("span");var k=
g.heightUnits==ed?"%":"px",l=g.widthUnits==ed?"%":"px",m=g.viewportAnchorUnits==ed?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;g.heightUnits===2&&(n=g.height*5.33,k="%");g.widthUnits===2&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;g.viewportAnchorUnits===2?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.A===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/100,e.style.top=h+"%",e.style.left=
k+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*q/100+m);g.heightUnits!==0&&g.widthUnits!==0&&g.viewportAnchorUnits!==0&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems=
"center";e.style.justifyContent=b.displayAlign=="before"?"flex-start":b.displayAlign=="center"?"center":"flex-end";a.F.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.o.set(b,{Le:f,ph:e,qc:c})}
function Xs(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Fd?c:a==="left"||a==="start"&&b===Kd||a==="end"&&b==="rtl"?"line-left":a==="right"||a==="start"&&b==="rtl"||a==="end"&&b===Kd?"line-right":"center"}
function Ws(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=Ys(c.linePadding,c,a.l);f.paddingRight=Ys(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=Zs(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=c.displayAlign=="before"?"flex-start":c.displayAlign=="center"?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=
c.fontStyle;f.letterSpacing=c.letterSpacing;d=a.C?a.C.fontScaleFactor:1;if(d!==1||c.fontSize)f.fontSize=Ys(c.fontSize||"1em",c,a.l,d);d=c.line;d!=null&&(g=c.lineInterpretation,g==Md&&(g=1,h=16,a.A&&a.A<1&&(h=32),d=d<0?100+d/h*100:d/h*100),g==1&&(f.position="absolute",c.writingMode==Ld?(f.width="100%",c.lineAlign==Nd?f.top=d+"%":c.lineAlign=="end"&&(f.bottom=100-d+"%")):c.writingMode=="vertical-lr"?(f.height="100%",c.lineAlign==Nd?f.left=d+"%":c.lineAlign=="end"&&(f.right=100-d+"%")):(f.height="100%",
c.lineAlign==Nd?f.right=d+"%":c.lineAlign=="end"&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=Xs(c);a=="line-left"?(f.cssFloat="left",c.position!==null&&(f.position="absolute",c.writingMode==Ld?(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==Ld?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):c.position!==null&&c.position!=50&&(f.position="absolute",c.writingMode==
Ld?(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==Ld?f.width=c.size+"%":f.height=c.size+"%")}
function Ys(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 Zs(a,b){for(var c=a.length-1;c>=0;c--){var d=b(a[c]);if(d||d===0)return d}return null}K("shaka.text.UITextDisplayer",Qs);Qs.prototype.enableTextDisplayer=Qs.prototype.enableTextDisplayer;
Qs.prototype.setTextLanguage=Qs.prototype.setTextLanguage;Qs.prototype.setTextVisibility=Qs.prototype.setTextVisibility;Qs.prototype.isTextVisible=Qs.prototype.isTextVisible;Qs.prototype.remove=Qs.prototype.remove;Qs.prototype.destroy=Qs.prototype.destroy;Qs.prototype.append=Qs.prototype.append;Qs.prototype.configure=Qs.prototype.configure;function $s(a,b){function c(f){for(var g=f,h=r(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(g*1E3%1E3);return(f<10?"0":"")+f+":"+(h<10?"0":"")+h+":"+(k<10?"0":"")+k+"."+(g<100?g<10?"00":"0":"")+g}var d=Hs(a);a="WEBVTT\n\n";d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
break;case "right":g.push("align:right");break;case Jd:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}K("shaka.text.WebVttGenerator",function(){});function at(a,b){this.g=b;this.j=a;this.m=new Map;this.l=void 0;this.D=!1;this.J=!0;this.A=this.I=!1;this.C=this.B=void 0;this.G=0;this.K={request:!1,response:!1,event:!1};this.o={};this.i=new jb;this.F=[];this.h=null}at.prototype.setMediaElement=function(a){this.h=a;bt(this)};at.prototype.configure=function(a){this.g=a;ct(this)};function dt(a){a.m.clear();a.D=!1;a.J=!0;a.I=!1;a.A=!1;a.B=0;a.C=0;a.G=0;a.K={request:!1,response:!1,event:!1};et(a);a.o={};a.h=null;a.i.bb()}
function ft(a,b){a.A=b;a.A?a.l==gt?a.l=ht:a.l==it&&(a.l=jt):a.l==ht?a.l=gt:a.l==jt&&(a.l=it)}function kt(a,b){if(a.g&&a.g.enabled&&(lt(a,"ps",{tc:"d"}),a.h&&a.h.autoplay)){var c=a.h.play();c&&c.then(function(){a.G=b}).catch(function(){a.G=0})}}
function mt(a,b,c){try{if(!a.g.enabled)return b;var d=nt(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=ot;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=pt;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=qt;break a}e=
void 0}d.ot=e;d.su=!0;var f=rt(d);return st(b,f)}catch(g){return Za("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
function bt(a){a.i.H(a.h,"playing",function(){a.C||(a.C=Date.now());lt(a,"ps",{tc:"p"})});a.i.H(a.h,"volumechange",function(){lt(a,a.h.muted?"m":"um")});a.i.H(a.h,"play",function(){a.B||(a.B=Date.now(),lt(a,"ps",{tc:"s"}))});a.i.H(a.h,"pause",function(){lt(a,"ps",{tc:"a"})});a.i.H(a.j,"buffering",function(){lt(a,"ps",{tc:"w"})});a.i.H(a.h,"seeking",function(){return lt(a,"ps",{tc:"k"})});a.i.H(document,"fullscreenchange",function(){lt(a,document.fullscreenElement?"pe":"pc")});var b=a.h;(b.webkitPresentationMode||
b.webkitSupportsFullscreen)&&a.i.H(b,"webkitpresentationmodechanged",function(){b.webkitPresentationMode?lt(a,b.webkitPresentationMode!=="inline"?"pe":"pc"):b.webkitSupportsFullscreen&&lt(a,b.webkitDisplayingFullscreen?"pe":"pc")});a.i.H(a.h,"enterpictureinpicture",function(){lt(a,"pe")});a.i.H(a.h,"leavepictureinpicture",function(){lt(a,"pc")});"documentPictureInPicture"in window&&a.i.H(window.documentPictureInPicture,"enter",function(c){lt(a,"pe");a.i.Na(c.window,"pagehide",function(){lt(a,"pc")})});
a.i.H(document,"visibilitychange",function(){document.hidden?lt(a,"b",{bg:!0}):lt(a,"b")});a.i.H(a.j,"complete",function(){lt(a,"ps",{tc:"e"})})}function ct(a){et(a);var b=tt(a);b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value.timeInterval,c===void 0&&(c=ut),c>=1){var d=new Se(function(){return lt(a,vt)});d.Da(c);a.F.push(d)}}function et(a){if(a.F)for(var b=r(a.F),c=b.next();!c.done;c=b.next())c.value.stop();a.F=[]}
function tt(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===wt&&b.enabled}):[]}function xt(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===yt&&b.enabled===!0}):[]}function nt(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.l,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.j.getBandwidthEstimate()/1E3}}
function lt(a,b,c){c=c===void 0?{}:c;b=Object.assign({e:b,ts:Date.now()},c);b=zt(a,b,wt);c=a.g.targets;if(!(a.g.version<At)&&c){var d=tt(a);c=Array.from(new Set([].concat(G(Bt),G(Ct))));d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=Dt(e.includeKeys||[],c);f.includes(Et)||f.push(Et);f=Ft(b,f);var g=e.events||[],h=f.e,k=f.sta;h&&(!Gt.includes(h)||!(h!=="ps"||k&&Ht.includes(k))||g&&g.length>0&&!g.includes(h))||It(a,f,e)}}}
function Jt(a,b,c){if(a.g.enabled){c=zt(a,c,Kt);var d=Lt({mode:Kt,useHeaders:a.g.useHeaders,includeKeys:a.g.includeKeys||[]});a.o[d]||(a.o[d]={request:1,response:1});c.sn=a.o[d].request++;d=a.g.includeKeys||[];var e=a.g.version==At?Array.from(new Set([].concat(G(Bt),G(Mt)))):Nt;d=Dt(d,e);c=Ft(c,d);Ot(a,c,b,a.g.useHeaders)}}
function It(a,b,c,d){var e=Pi(),f=c.url;if(c.useHeaders){b=Pt(b);if(!Object.keys(b).length)return;d&&Object.assign(d.headers,b);d=gj([f],e);Object.assign(d.headers,b)}else{b=rt(b);if(!b)return;f=st(f,b);d&&(d.uri=f);d=gj([f],e)}a.j.M.request(9,d)}function Ot(a,b,c,d){if(d){b=Pt(b);if(!Object.keys(b).length)return;Object.assign(c.headers,b)}else{var e=rt(b);if(!e)return;c.uris=c.uris.map(function(f){return st(f,e)})}xt(a).length>0||!a.m.has(c)||a.m.delete(c)}
function Dt(a,b){if(!a||a.length===0)return b;for(var c=r(a),d=c.next();!d.done;d=c.next())b.includes(d.value);return a=a.filter(function(e){return b.includes(e)})}function Ft(a,b){return Object.keys(a).reduce(function(c,d){b.includes(d)&&(c[d]=a[d]);return c},{})}function Qt(a){if(a.type===0)return Rt;if(a=a.stream){var b=a.type;if(b=="video")return a.codecs&&a.codecs.includes(",")?pt:St;if(b=="audio")return ot;if(b=="text")return a.mimeType==="application/mp4"?Tt:Ut}}
function Lt(a){var b=Object.keys(a).sort().reduce(function(c,d){d!=="enabled"&&(c[d]=a[d]);return c},{});return JSON.stringify(b)}function Vt(a,b){b=a.j.Xb()[b];if(!b.length)return NaN;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:NaN}function Wt(a,b){b=a.j.Xb()[b];if(!b.length)return 0;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:0}
function Xt(a,b){var c=a.j.Ob();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.type==="variant"&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case St:return a.videoBandwidth||NaN;case ot:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function Yt(a,b,c){var d=b.segment,e=0;d&&(e=d.endTime-d.startTime);e={d:e*1E3,st:a.j.ba()?Zt:$t};e.ot=Qt(b);var f=e.ot===St||e.ot===ot||e.ot===pt||e.ot===Tt;if(b=b.stream){var g=a.j.hb();if(f&&(e.bl=Vt(a,b.type),e.ot!==Tt)){var h=Wt(a,b.type);e.dl=g?h/Math.abs(g):h}b.bandwidth&&(e.br=b.bandwidth/1E3);if(b.segmentIndex&&d){if((g=b.segmentIndex.zb(d.endTime,!0,g<0))&&(g=g.next().value)&&g!=d){if(c&&!hb(d.N(),g.N())){var k=g.N()[0];h=new URL(k);var l=new URL(c);if(h.origin!==l.origin)c=k;else{c=h.pathname.split("/").slice(1);
k=l.pathname.split("/").slice(1,-1);l=Math.min(c.length,k.length);for(var m=0;m<l&&c[m]===k[m];m++)c.shift(),k.shift();for(;k.length;)k.shift(),c.unshift("..");c=c.join("/")+h.search+h.hash}e.nor=c}!g.startByte&&!g.endByte||d.startByte==g.startByte&&d.endByte==g.endByte||(c=g.startByte+"-",g.endByte&&(c+=g.endByte),e.nrr=c)}g=a.j.hb()||1;c=Wt(a,b.type)||500;d=(b=b.bandwidth)?b*(d.endTime-d.startTime)/1E3/(c/g/1E3)*a.g.rtpSafetyFactor:NaN;isNaN(d)||(e.rtp=d)}}f&&e.ot!==Tt&&(e.tb=Xt(a,e.ot)/1E3);return e}
function zt(a,b,c){Object.assign(b,nt(a));b.pr=a.j.hb();var d=b.ot===St||b.ot===pt;a.I&&d&&(b.bs=!0,b.su=!0,a.I=!1);b.su==null&&(b.su=a.J);a.j.ba()&&(d=au(a.j),b.ltc=d||void 0);document.hidden&&(b.bg=!0);d=a.C&&a.B?a.C-(a.G||a.B):void 0;d==void 0||a.K[c]||(b.msd=d,a.K[c]=!0);return b}
function rt(a){function b(n){return c(n/100)*100}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&n!=null&&n!==""&&n!==!1}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c,ttfb:c,ttlb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&(h!=="v"||k!==1)&&(h!="pr"||k!==1)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m=l==="string"&&h!=="ot"&&h!=="sf"&&h!=="st"?h+"="+JSON.stringify(k):
l==="boolean"?h:l==="symbol"?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}
function Pt(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[f[g]!=null?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=rt(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function st(a,b){if(!b||a.includes("offline:"))return a;a=new Ab(a);a.g.set("CMCD",b);return a.toString()}var qt="m",ot="a",St="v",pt="av",Rt="i",Ut="c",Tt="tt",At=2,$t="v",Zt="l",gt="d",ht="ld",it="h",jt="lh";K("shaka.util.CmcdManager.StreamingFormat",{DASH:gt,vj:ht,HLS:it,wj:jt,yj:"s",OTHER:"o"});
var Nt="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),Bt="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),Mt="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),bu="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),Ct=["e","sta"],Gt="ps e t c b m um pe pc".split(" "),Ht="spawkrfeqd".split(""),ut=10,Et="ts",vt="t",Kt="request",yt="response",wt="event";function cu(a){this.h=a;this.g=null}p=cu.prototype;p.configure=function(a){this.h=a};p.pg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(du)?this.g.get(du)*1E3:null};p.ng=function(){return this.h.enabled&&this.g&&this.g.has(eu)?this.g.get(eu)*1E3:null};p.ji=function(){return this.h.enabled&&this.g&&this.g.has(fu)?this.g.get(fu):null};p.ki=function(){return this.h.enabled&&this.g&&this.g.has(gu)?this.g.get(gu):null};
p.getBandwidthEstimate=function(a){var b=this.ng();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return c>0&&c<=1?a*(1-c)+b*c:a};function hu(a){return a?a.toLowerCase()==="false"?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}K("shaka.util.CmsdManager",cu);cu.prototype.getBandwidthEstimate=cu.prototype.getBandwidthEstimate;cu.prototype.getRoundTripTime=cu.prototype.ki;cu.prototype.getResponseDelay=cu.prototype.ji;cu.prototype.getEstimatedThroughput=cu.prototype.ng;
cu.prototype.getMaxBitrate=cu.prototype.pg;var eu="etp",du="mb",fu="rd",gu="rtt";function iu(){this.g=null;this.h=[]}function ju(a,b){return I(function(c){if(c.h==1)return a.g?c.g(new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;c.j()})}iu.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function Z(a,b,c){b=b===void 0?null:b;Zi.call(this);var d=this;this.m=ku;this.h=null;this.sd=b;this.ha=!1;this.Bd=new jb;this.td=new jb;this.j=new jb;this.Eb=new jb;this.Oc=new jb;this.F=this.G=this.D=this.M=null;this.Dd=0;this.ka=new iu;this.O=this.Fa=this.$=this.i=this.Tb=this.I=this.l=this.pd=this.U=this.ag=this.xa=this.K=this.Wa=this.za=this.rd=this.R=this.Ga=this.L=this.Cb=null;this.Ha=!1;this.wd=this.o=null;this.Cd=1E9;this.zd=[];this.Sb=new Map;this.Xa=[];this.Ae=-1;this.g=lu(this);this.Ce=
lr();this.Y=null;this.Ed=-1;this.Db=null;this.ya={width:Infinity,height:Infinity};this.vd=new qo(this.g,this.ya,null);this.yd=[];this.B=null;this.J=this.g.adaptationSetCriteriaFactory();this.J.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,
codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount});this.Qc=this.g.preferredTextLanguage;this.Tc=this.g.preferredTextRole;this.Sc=this.g.preferForcedSubs;this.ud=[];c&&c(this);this.K=new at(this,this.g.cmcd);this.xa=new cu(this.g.cmsd);this.M=mu(this);this.na=this.va=this.Ca=this.C=null;this.Ee=!1;this.Be=[];this.De=
new Se(function(){return I(function(e){if(e.h==1)return d.va?e.g(d.Kb(d.na,!0),3):e.u(0);if(e.h!=4)return e.g(d.load(d.va),4);d.Ee?d.na.pause():d.na.play();d.va=null;d.Ee=!1;e.j()})});nu&&(this.C=nu(),this.C.configure(this.g.ads),this.Oc.H(this.C,"ad-content-pause-requested",function(e){var f,g;return I(function(h){if(h.h==1){d.De.stop();if(d.va)return h.u(0);d.na=d.h;d.Ee=d.dd();f=e.saveLivePosition||!1;g=!0;d.ba()&&(g=f);return h.g(d.kg(!0,g),3)}d.va=h.i;h.j()})}),this.Oc.H(this.C,"ad-content-resume-requested",
function(e){e=e.offset||0;if(d.va){var f=d.va;f.m&&e&&(typeof f.m==="number"?f.m+=e:f.m.setTime(f.m.getTime()+e*1E3))}d.De.ma(.1)}),this.Oc.H(this.C,"ad-content-attach-requested",function(){return I(function(e){if(e.h==1)return d.h||!d.na?e.u(0):e.g(d.Kb(d.na,!0),3);d.na=null;e.j()})}));ou&&(this.Ca=ou(this),this.Ca.configure(this.g.queue));this.Bd.H(window,"online",function(){pu(d);d.Jf()});this.xd=new Se(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=r(d.i.variants),k=h.next();!k.done;k=h.next())k=
k.value,k.disabledUntilTime>0&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),k.disabledUntilTime>0&&(g=!1);g&&d.xd.stop();f&&qu(d,!1,void 0,!1,!1)});this.Ra=null;a&&(vb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Kb(a,!0));this.A=null}pa(Z,Zi);function ru(a){a.U!=null&&(Nc(a.U),a.U.release(),a.U=null)}
function su(a,b,c){c||b.lcevc.enabled?(ru(a),a.U==null&&(a.U=new Lc(a.h,a.ag,b.lcevc,c),a.G&&(a.G.C=a.U))):ru(a)}function tu(a,b){return new Yi(a,b)}p=Z.prototype;
p.destroy=function(){var a=this,b;return I(function(c){switch(c.h){case 1:if(a.m==uu)return c.return();ru(a);b=a.detach();a.m=uu;return c.g(b,2);case 2:return c.g(a.jg(),3);case 3:a.Bd&&(a.Bd.release(),a.Bd=null);a.td&&(a.td.release(),a.td=null);a.j&&(a.j.release(),a.j=null);a.Eb&&(a.Eb.release(),a.Eb=null);a.Oc&&(a.Oc.release(),a.Oc=null);a.wd=null;a.g=null;a.B=null;a.sd=null;a.K=null;a.xa=null;if(!a.M){c.u(4);break}return c.g(a.M.destroy(),5);case 5:a.M=null;case 4:a.o&&(a.o.release(),a.o=null),
a.Ca&&(a.Ca.destroy(),a.Ca=null),Zi.prototype.release.call(a),c.j()}})};function vu(a,b){a.dispatchEvent(tu("onstatechange",(new Map).set("state",b)))}
p.Kb=function(a,b){b=b===void 0?!0:b;var c=this,d,e,f;return I(function(g){switch(g.h){case 1:if(c.m==uu)throw new R(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return g.g(c.detach(),2);case 2:return g.g(wu(c,"attach"),4);case 4:if(g.i)return g.return();g.m(5,6);d||(vu(c,"attach"),e=function(){var h=xu(c,!1);h&&yu(c,h)},c.td.H(a,"error",e),c.h=a,c.K&&c.K.setMediaElement(a));qb();if(!b||!Tc()||c.G){g.u(6);break}return g.g(zu(c),6);case 6:g.F();c.ka.release();g.G(0);break;case 5:return f=g.l(),
g.g(c.detach(),10);case 10:throw f;}})};p.yh=function(a){this.ag=a};p.detach=function(a){a=a===void 0?!1:a;var b=this;return I(function(c){if(c.h==1){if(b.m==uu)throw new R(2,7,7E3);return c.g(b.od(!1,a),2)}if(c.h!=3)return c.g(wu(b,"detach"),3);if(c.i)return c.return();try{b.h&&(b.td.bb(),b.h=null),vu(b,"detach"),b.C&&!a&&b.C.release()}finally{b.ka.release()}c.j()})};
function wu(a,b){var c;return I(function(d){return d.h==1?(c=++a.Dd,d.g(ju(a.ka,b),2)):c!=a.Dd?(a.ka.release(),d.return(!0)):d.return(!1)})}
p.od=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y;return I(function(z){switch(z.h){case 1:return c.m!=uu&&(c.m=ku),z.g(wu(c,"unload"),2);case 2:if(z.i)return z.return();z.J(3);c.Ha=!1;vu(c,"unload");ru(c);d=c.ud.map(function(B){return B()});c.ud=[];return z.g(Promise.all(d),5);case 5:c.dispatchEvent(tu("unloading"));c.rd&&(c.rd.release(),c.rd=null);c.za&&(c.za.release(),c.za=null);c.Wa&&(c.Wa.release(),c.Wa=null);c.h&&(c.j.bb(),c.Eb.bb());c.xd.stop();
c.Cb&&(c.Cb.release(),c.Cb=null);c.Ga&&(c.Ga.stop(),c.Ga=null);if(!c.I){z.u(6);break}return z.g(c.I.stop(),7);case 7:c.I=null,c.Tb=null;case 6:c.o&&c.o.stop();if(!c.l){z.u(8);break}return z.g(c.l.destroy(),9);case 9:c.l=null;case 8:c.L&&(c.L.release(),c.L=null);c.F&&(c.F.release(),c.F=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.D){z.u(10);break}return z.g(c.D.destroy(),11);case 11:c.D=null;case 10:if(!c.G){z.u(12);break}return z.g(c.G.destroy(),13);case 13:c.G=null;case 12:if(c.C&&!b)c.C.onAssetUnload();
c.va&&!b&&(c.va.destroy(),c.va=null);b||c.De.stop();c.K&&dt(c.K);c.xa&&(c.xa.g=null);if(!c.A){z.u(14);break}return z.g(c.A.destroy(),15);case 15:c.A=null;case 14:c.ha=!1;if(c.h){e=r(c.Be);for(f=e.next();!f.done;f=e.next())g=f.value,g.src.startsWith("blob:")&&URL.revokeObjectURL(g.src),g.remove();c.Be=[];qi(c.h)&&c.h.load()}if(!c.D){z.u(16);break}return z.g(c.D.destroy(),17);case 17:c.D=null;case 16:c.Ra&&c.$!=c.Ra.Sd()&&(c.Ra.C||c.Ra.destroy(),c.Ra=null);c.$=null;c.Fa=null;c.R=null;if(c.i){h=r(c.i.variants);
for(k=h.next();!k.done;k=h.next())for(l=k.value,m=r([l.audio,l.video]),n=m.next();!n.done;n=m.next())(q=n.value)&&q.segmentIndex&&q.segmentIndex.release();u=r(c.i.textStreams);for(t=u.next();!t.done;t=u.next())v=t.value,v.segmentIndex&&v.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(wf.clear(),fc.clear());c.i=null;c.B=new sr;c.$f=null;c.Db=null;c.Y=null;c.Ed=-1;c.zd=[];w=r(c.Sb.values());for(x=w.next();!x.done;x=w.next())y=x.value,y.stop();c.Sb.clear();c.Xa=[];c.Ae=-1;c.M&&c.M.ig();
Au(c);case 3:z.F();c.ka.release();z.G(4);break;case 4:qb();if(a&&Tc()&&!c.G&&c.h)return z.g(zu(c),0);z.u(0)}})};p.oj=function(a){this.O=a};
p.load=function(a,b,c){b=b===void 0?null:b;var d=this,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y;return I(function(z){switch(z.h){case 1:if(d.m==uu)throw new R(2,7,7E3);if(d.h||!d.na){z.u(2);break}return z.g(d.Kb(d.na,!0),3);case 3:d.na=null;case 2:e=null;f="";c=(g=c)==null?void 0:g.toLowerCase();if(a instanceof Br){if(a.C)throw new R(2,7,7006);e=a;f=e.Sd()||""}else f=a||"";return z.g(ju(d.ka,"load"),4);case 4:d.ka.release();if(!d.h)throw new R(2,7,7002);if(!d.$){z.u(5);break}d.$=f;return z.g(d.od(!1),5);case 5:h=
++d.Dd;k=function(){return I(function(B){if(B.h==1)return d.Dd==h?B.u(0):e?B.g(e.destroy(),3):B.u(3);throw new R(2,7,7E3);})};l=function(B,H){return I(function(E){switch(E.h){case 1:return E.J(2),E.g(ju(d.ka,H),4);case 4:return E.g(k(),5);case 5:return E.g(B(),6);case 6:return E.g(k(),7);case 7:e&&d.g&&(e.g=d.g);case 2:E.F(),d.ka.release(),E.G(0)}})};z.m(7,8);b==null&&e&&(b=e.getStartTime());d.O=b;d.Ha=!1;d.dispatchEvent(tu("loading"));if(e){c=e.Y;z.u(10);break}if(c){z.u(10);break}return z.g(l(function(){return I(function(B){if(B.h==
1)return B.g(Bu(d,f),2);c=B.i;B.j()})},"guessMimeType_"),10);case 10:m=!!e;if(e){Er(e,d);d.B=e.getStats();z.u(13);break}return z.g(Cu(d,f,b,c,!0,d.g),14);case 14:(e=z.i)?(e.D=!1,Er(e,d),d.B=e.getStats(),e.start(),e.A.catch(function(){})):d.B=new sr;case 13:n=!e;q=Date.now()/1E3;d.B=e?e.getStats():new sr;d.$=f;d.Fa=c||null;Au(d);u=function(){var B=d.h?d.h.buffered:null;return{start:bo(B)||0,end:co(B)||0}};d.za=new Xp(u);d.za.addEventListener("regionadd",function(B){Du(d,B.region,"metadataadded")});
if(n)return z.g(l(function(){return I(function(B){return B.g(Eu(d,c),0)})},"initializeSrcEqualsDrmInner_"),25);d.Wa=new Xp(u);return z.g(l(function(){return I(function(B){if(B.h==1)return B.g(Promise.race([e.na,e.A]),2);d.Tb=e.G;var H=e;H.va=!0;d.I=H.l;d.i=e.kf();B.j()})},"waitForFinish"),17);case 17:if(d.G){z.u(18);break}return z.g(l(function(){return I(function(B){return B.g(zu(d),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return d.i&&d.i.textStreams.length&&(d.A.enableTextDisplayer?
d.A.enableTextDisplayer():vb("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),z.g(l(function(){return I(function(B){return B.g(e.A,0)})},"waitForFinish"),20);case 20:d.g=e.getConfiguration();d.vd=e.F;d.I&&d.I.setMediaElement&&d.h&&d.I.setMediaElement(d.h);d.rd=Fr(e);d.pd=e.Fa;if(t=e.B)d.J=t;m&&d.h&&d.h.nodeName==="AUDIO"&&(Fu(d),d.configure("manifest.disableVideo",!0));if(e.j){z.u(21);break}return z.g(l(function(){return I(function(B){return B.g(Kr(e,
d.h),0)})},"drmEngine_.init"),21);case 21:return d.D=Gr(e),z.g(l(function(){return I(function(B){return B.g(d.D.Kb(d.h),0)})},"drmEngine_.attach"),23);case 23:return v=d.g.abrFactory,d.o&&d.wd==v||(d.wd=v,d.o&&d.o.release(),d.o=v(),typeof d.o.setMediaElement!="function"&&(vb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),typeof d.o.setCmsdManager!="function"&&(vb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),
d.o.setCmsdManager=function(){}),typeof d.o.trySuggestStreams!="function"&&(vb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){}),d.o.configure(d.g.abr)),w=Hr(e),x=e.i,z.g(l(function(){return I(function(B){return B.g(Gu(d,q,x,w),0)})},"loadInner_"),24);case 24:Dr(e);d.Fa&&qb().jh()&&Fe(d.Fa)&&Do(d.G,d.$,d.Fa);z.u(16);break;case 25:return z.g(l(function(){return I(function(B){return B.g(Hu(d,q,c),0)})},"srcEqualsInner_"),
16);case 16:d.dispatchEvent(tu("loaded"));case 8:z.F();if(!e){z.u(27);break}return z.g(e.destroy(),27);case 27:d.Ra=null;z.G(0);break;case 7:y=z.l();if(!y||y.code==7E3){z.u(29);break}return z.g(d.od(!1),29);case 29:throw y;}})};function Fu(a){for(var b=r(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
p.lj=function(a,b,c){a=a===void 0?!0:a;b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this,e;return I(function(f){return f.h==1?f.g(Iu(d,c),2):f.h!=3?(e=f.i,f.g(d.od(a,b),3)):f.return(e)})};p.kg=function(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c=this,d;return I(function(e){return e.h==1?e.g(Iu(c,b),2):e.h!=3?(d=e.i,e.g(c.detach(a),3)):e.return(d)})};
function Iu(a,b){b=b===void 0?!1:b;var c,d,e;return I(function(f){if(f.h==1){c=null;if(!(a.i&&a.I&&a.Tb&&a.$&&a.g))return f.u(2);d=a.h.currentTime;b||(d=null);return f.g(Ju(a,a.$,d,a.Fa,a.g,!0,!1),3)}if(f.h!=2){c=f.i;a.yd.push(c);a.I&&a.I.setMediaElement&&a.I.setMediaElement(null);if(e=a.l?a.l.o:null)c.i=e;var g=c,h=a.I,k=a.Tb;g.h=a.i;g.l=h;g.G=k;c.B=a.J;c.start();a.i=null;a.I=null;a.Tb=null;a.o=null;a.wd=null}return f.return(c)})}
p.preload=function(a,b,c,d){b=b===void 0?null:b;var e=this,f,g,h;return I(function(k){if(k.h==1)return c=(f=c)==null?void 0:f.toLowerCase(),g=lu(e),mr(g,d||e.g,lu(e)),k.g(Cu(e,a,b,c,!1,g),2);(h=k.i)?h.start():yu(e,new R(2,7,7005));return k.return(h)})};p.jg=function(){var a=this,b,c,d,e;return I(function(f){b=[];c=r(a.yd);for(d=c.next();!d.done;d=c.next())e=d.value,e.C||b.push(e.destroy());a.yd=[];return f.g(Promise.all(b),0)})};
function Cu(a,b,c,d,e,f){e=e===void 0?!1:e;var g,h,k,l;return I(function(m){if(m.h==1)return d?m.u(2):m.g(Bu(a,b),3);m.h!=2&&(d=m.i);if(g=Ku(a,d))return m.return(null);h=f||a.g;k=!1;e&&a.h&&a.h.nodeName==="AUDIO"&&(k=!0);l=Ju(a,b,c,d||null,h,!e,k);l=e?l.then(function(n){n.D=!1;return n}):l.then(function(n){a.yd.push(n);return n});return m.return(l)})}
function Ju(a,b,c,d,e,f,g){f=f===void 0?!0:f;g=g===void 0?!1:g;var h,k,l,m,n,q,u,t,v,w,x,y,z,B,H;return I(function(E){if(E.h==1){h=null;k=qd(e);g&&(k.manifest.disableVideo=!0);l=function(){return h.R&&h.C?null:h};m=function(){return l()?l().getConfiguration():a.g};if(a.ya.width!=Infinity||a.ya.height!=Infinity||a.g.ignoreHardwareResolution)return E.u(2);n=qb();return E.g(n.Mb(),3)}E.h!=2&&(q=E.i,a.ya.width=q.width,a.ya.height=q.height);u=new qo(k,a.ya,null);t={networkingEngine:a.M,filter:function(C){var A,
F;return I(function(D){if(D.h==1)return D.g(ro(u,C),2);if(D.h!=4){A=D.i;if(!A)return D.u(0);F=tu("trackschanged");return D.g(Promise.resolve(),4)}h.dispatchEvent(F);D.j()})},makeTextStreamsForClosedCaptions:function(C){return Lu(a,C)},onTimelineRegionAdded:function(C){Yp(h.I,C)},onEvent:function(C){return h.dispatchEvent(C)},onError:function(C){return h.onError(C)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.l&&h.R&&a.l.updateDuration()},newDrmInfo:function(C){var A=
h.j,F=A?A.g:null;F&&A.B&&uo(u,F.keySystem,C)},onManifestUpdated:function(){var C=(new Map).set("isLive",a.ba());h.dispatchEvent(tu("manifestupdated",C));Cr(h,!1,function(){if(a.C)a.C.onManifestUpdated(a.ba())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(C,A,F,D){var J=C;if(C=="com.apple.hls.interstitial"||C=="com.apple.hls.overlay")if(J="com.apple.quicktime.HLS",C={startTime:A,endTime:F,values:D},a.C)a.C.onHLSInterstitialMetadata(a,a.h,C);D=r(D);C=D.next();
for(var L={};!C.done;L={Df:void 0},C=D.next())L.Df=C.value,L.Df.name!="ID"&&Cr(h,!1,function(P){return function(){Mu(a,A,F,J,P.Df)}}(L))},disableStream:function(C){return a.disableStream(C,a.g.streaming.maxDisabledTime)},addFont:function(C,A){return a.addFont(C,A)}};v=new Xp(function(){return a.Ua()});v.addEventListener("regionadd",function(C){var A=C.region;Nu(a,"timelineregionadded",A,h);Cr(h,!1,function(){a.C&&(a.C.onDashTimedMetadata(A),a.C.onDASHInterstitialMetadata(a,a.h,A))})});w=null;k.streaming.observeQualityChanges&&
(w=new Ok(function(){return a.Xb()}),w.addEventListener("qualitychange",function(C){Ou(a,C.quality,C.position)}),w.addEventListener("audiotrackchange",function(C){Ou(a,C.quality,C.position,!0)}));x=!0;y={lc:a.M,onError:function(C){return h.onError(C)},Lg:function(C){Cr(h,!0,function(){a.D&&Pu(a,C)})},onExpirationUpdated:function(C,A){var F=tu("expirationupdated");h.dispatchEvent(F);if((F=h.l)&&F.onExpirationUpdated)F.onExpirationUpdated(C,A)},onEvent:function(C){h.dispatchEvent(C);if(C.type=="drmsessionupdate"&&
x){x=!1;C=Date.now()/1E3-h.za;var A=a.B||h.getStats();C>=0&&(A.m=C);a.U&&Nc(a.U)}}};z=mu(a,l);fj(a.M,z);B=function(){return a.Ld(y)};H={config:k,Hi:t,Ui:v,Ti:w,Ld:B,Gi:u,networkingEngine:z,xh:f};h=new Br(b,d,c,H);return E.return(h)})}
function Bu(a,b){var c,d,e,f;return I(function(g){if(g.h==1)return c=a.g.manifest.retryParameters,g.g(ll(b,a.M,c),2);d=g.i;Fe(d)?(e=qb(),e.Aa()==="WEBKIT"&&(d="application/vnd.apple.mpegurl")):d==="video/quicktime"&&(f=qb(),f.Aa()==="CHROMIUM"&&(d="video/mp4"));return g.return(d)})}
function Ku(a,b){if(!Tc(qb()))return!0;if(b){if((a.h||Uc()).canPlayType(b)=="")return!1;if(!Tc(qb())||!Rc.has(b))return!0;if(Fe(b))return qb().Aa()==="WEBKIT"&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if(b==="application/dash+xml"||b==="video/vnd.mpeg.dash.mpd")return a.g.streaming.preferNativeDash}return!1}
function Qu(a,b){var c=a.g.textDisplayFactory;a.$f!==c||(b===void 0?0:b)?(b=a.A,a.A=c(),a.A.configure?a.A.configure(a.g.textDisplayer):vb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.A.setTextLanguage||vb("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),b?(a.A.setTextVisibility(b.isTextVisible()),b.destroy().catch(function(){})):a.A.setTextVisibility(a.ha),a.G&&jp(a.G,a.A),a.$f=c,a.l&&Bq(a.l)):a.A&&a.A.configure&&
a.A.configure(a.g.textDisplayer)}
function zu(a){var b,c,d;return I(function(e){if(e.h==1)return qb(),vu(a,"media-source"),a.g.mediaSource.useSourceElements&&qi(a.h),Qu(a),b=Ru(a.h,a.A,{Xh:function(){return a.keySystem()},onMetadata:function(f,g,h){f=r(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&typeof k.cueTime=="number"&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=r(k.frames),q=n.next();!q.done;q=n.next())Mu(a,l,m,"org.id3",q.value);if(a.C)a.C.onHlsTimedMetadata(k,l)}},Oi:function(f){a.Wa&&Yp(a.Wa,
{schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Qi:function(){a.I&&a.I.update&&a.I.update()}},a.U,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Fa=d,e.g(b.L,2);a.G=b;e.j()})}
function Su(a,b){a.L=new tp({mf:function(){return b.playbackRate},Bc:function(){return b.defaultPlaybackRate},$g:function(c){b.playbackRate=c},Ki:function(c){var d=b.currentTime;if(eo(b.buffered,d)&&!(b.readyState<=HTMLMediaElement.HAVE_CURRENT_DATA)){c=d+c;var e=a.Ua();c<e.start?d!==e.start&&(b.currentTime=e.start):c>e.end?d!==e.end&&(b.currentTime=e.end):b.currentTime=c}},isPaused:function(){return b.paused}})}
function Tu(a,b,c){function d(){return Uu(a)}a.j.H(b,"playing",d);a.j.H(b,"pause",d);a.j.H(b,"ended",d);a.j.H(b,"ratechange",function(){return Vu(a)});b.remote&&(a.j.H(b.remote,"connect",function(){a.l&&b.remote.state=="connected"&&Wu(a);Xu(a)}),a.j.H(b.remote,"connecting",function(){return Xu(a)}),a.j.H(b.remote,"disconnect",function(){return I(function(f){if(f.h==1)return a.l&&b.remote.state=="disconnected"?f.g(Pq(a.l),3):f.u(2);f.h!=2&&Wu(a);Xu(a);f.j()})}));b.audioTracks&&(a.j.H(b.audioTracks,
"addtrack",function(){return Xu(a)}),a.j.H(b.audioTracks,"removetrack",function(){return Xu(a)}),a.j.H(b.audioTracks,"change",function(){return Xu(a)}));b.videoTracks&&(a.j.H(b.videoTracks,"addtrack",function(){return Xu(a)}),a.j.H(b.videoTracks,"removetrack",function(){return Xu(a)}),a.j.H(b.videoTracks,"change",function(){return Xu(a)}));(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&a.j.H(b,"webkitpresentationmodechanged",function(){a.sd&&Qu(a,!0)});if(b.textTracks){var e=function(){a.m===
Yu&&a.A instanceof Ms&&Wu(a);Xu(a)};a.j.H(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Zu(a,f);break;case "chapters":$u(a,f);break;default:e()}});a.j.H(b.textTracks,"removetrack",e);a.j.H(b.textTracks,"change",e)}b.preload!="none"&&a.j.Na(b,"loadedmetadata",function(){var f=a.B,g=Date.now()/1E3-c;g>=0&&(f.F=g)})}
function Gu(a,b,c,d){var e,f,g,h,k,l,m,n,q,u,t,v,w,x,y,z,B,H,E,C,A,F,D,J,L,P,O,N,M;return I(function(S){switch(S.h){case 1:vu(a,"load");e=a.h;Su(a,e);Tu(a,e,b);"onchange"in window.screen&&a.j.H(window.screen,"change",function(){if(a.J.getConfiguration){var U=a.J.getConfiguration();U.hdrLevel=="AUTO"?av(a):a.g.preferredVideoHdrLevel=="AUTO"&&a.g.abr.enabled&&(U.hdrLevel="AUTO",a.J.configure(U),av(a))}});f=!1;g=r(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&
(f=Oc(l));su(a,a.g,f);a.Qc=a.g.preferredTextLanguage;a.Tc=a.g.preferredTextRole;a.Sc=a.g.preferForcedSubs;bv(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(U,da,aa){a.i&&a.l&&U!=a.l.o&&cv(a,U,!0,da===void 0?!1:da,aa===void 0?0:aa)});a.o.setMediaElement(e);a.o.setCmsdManager(a.xa);a.l=dv(a);a.l.configure(a.g.streaming);a.m=ev;a.dispatchEvent(tu("streaming"));m=c;case 2:q=a.l.o;q||(u=fv(a,!0),c||(m=u));t=[];n=q||m;v=r([n.video,n.audio]);for(w=v.next();!w.done;w=v.next())(x=
w.value)&&!x.segmentIndex&&(t.push(x.createSegmentIndex()),x.dependencyStream&&t.push(x.dependencyStream.createSegmentIndex()));if(!(t.length>0)){S.u(4);break}return S.g(Promise.all(t),4);case 4:if(!n||n.disabledUntilTime!=0){S.u(2);break}av(a);if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?a.configure(a.Ce):Ya("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.K&&(ft(a.K,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),kt(a.K,b*1E3));bv(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);rq(a.l,a.g.playRangeStart,a.g.playRangeEnd);a.Ha=!0;a.dispatchEvent(tu("canupdatestarttime"));y=function(U){a.F=gv(a,U);a.Cb=hv(a,U);iv(a,e,!1)};a.g.streaming.startAtSegmentBoundary||(z=a.O,z==null&&a.i.startTime&&(z=a.i.startTime),y(z));if(q){S.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){S.u(8);break}B=a.i.presentationTimeline;a.O instanceof Date&&
(E=B.m||B.i,C=a.O.getTime()/1E3-E,C!=null&&(H=C));H==null&&(H=typeof a.O==="number"?a.O:a.ba()?Infinity:a.h.currentTime);a.O==null&&a.i.startTime&&(H=a.i.startTime);A=B.Nb();F=B.ib();H<A?H=A:H>F&&(H=F);return S.g(jv(m,H),9);case 9:D=S.i,y(D);case 8:cv(a,m,!0,!1,0);case 7:return a.F.ready(),J=a.$b().find(function(U){return U.active}),J||((L=Of(a.i.textStreams,a.Qc,a.Tc,a.Sc)[0]||null)&&rr(a.B.h,L,!0),m&&(L?(Wf(m.audio,L,a.g)&&(a.ha=!0),a.ha&&a.A.setTextVisibility(!0)):(a.ha=!1,a.A.setTextVisibility(!1)),
kv(a)),L&&(a.g.streaming.alwaysStreamText||a.uf())&&(Aq(a.l,L),lv(a))),S.g(a.l.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),mv(a));Xu(a);a.i.variants.some(function(U){return U.primary});if((P=a.ba())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)O=function(){return nv(a)},a.j.H(e,"timeupdate",O);P||(N=function(){return ov(a)},a.j.H(e,"timeupdate",N),ov(a),a.i.nextUrl&&(a.g.streaming.preloadNextUrlWindow>
0&&(M=function(){var U;return I(function(da){if(da.h==1){U=a.Ua().end-a.h.currentTime;if(isNaN(U)||!(U<=a.g.streaming.preloadNextUrlWindow))return da.u(0);a.j.jb(e,"timeupdate",M);return da.g(a.preload(a.i.nextUrl),4)}a.Ra=da.i;da.j()})},a.j.H(e,"timeupdate",M)),a.j.H(e,"ended",function(){a.load(a.Ra||a.i.nextUrl)})));if(a.C)a.C.onManifestUpdated(P);S.j()}})}
function Eu(a,b){var c,d,e;return I(function(f){return f.h==1?(c=Date.now()/1E3,d=!0,a.D=a.Ld({lc:a.M,onError:function(g){yu(a,g)},Lg:function(){},onExpirationUpdated:function(){var g=tu("expirationupdated");a.dispatchEvent(g)},onEvent:function(g){a.dispatchEvent(g);if(g.type=="drmsessionupdate"&&d){d=!1;g=a.B;var h=Date.now()/1E3-c;h>=0&&(g.m=h)}}}),a.D.configure(a.g.drm),e=Xf([b]),a.D.$=!0,f.g(Aj(a.D,[e],[]),2)):f.g(a.D.Kb(a.h),0)})}
function Hu(a,b,c){var d,e,f,g,h,k,l,m,n,q,u,t;return I(function(v){switch(v.h){case 1:vu(a,"src-equals");d=a.h;a.F=new Ep(d);e=!1;a.ud.push(function(){e=!0});a.dispatchEvent(tu("canupdatestarttime"));a.O!=null&&a.F.ze(a.O);a.Cb=pv(a,a.O||0);Su(a,d);iv(a,d,!0);d.textTracks&&(Qu(a),f=function(w){if(!(a.A instanceof Ms)){var x=qv(a).find(function(y){return y.mode!=="disabled"});x&&(x.mode=w?"showing":"hidden");a.A instanceof Ns&&(x=rv(a))&&(x.mode=!w&&a.A.isTextVisible()?"showing":"hidden")}},a.j.H(d,
"enterpictureinpicture",function(){return f(!0)}),a.j.H(d,"leavepictureinpicture",function(){return f(!1)}),d.remote?(a.j.H(d.remote,"connect",function(){return f(!1)}),a.j.H(d.remote,"connecting",function(){return f(!1)}),a.j.H(d.remote,"disconnect",function(){return f(!1)})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.j.H(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){return f(!1)}),g=d,(g.webkitPresentationMode||g.webkitSupportsFullscreen)&&a.j.H(g,"webkitpresentationmodechanged",
function(){g.webkitPresentationMode?f(g.webkitPresentationMode!=="inline"):g.webkitSupportsFullscreen&&f(g.webkitDisplayingFullscreen)}));Tu(a,d,b);h=mt(a.K,a.$,c);!h.includes("#t=")&&(a.g.playRangeStart>0||isFinite(a.g.playRangeEnd))&&(h+="#t=",a.g.playRangeStart>0&&(h+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(h+=","+a.g.playRangeEnd));if(!a.G){v.u(2);break}return v.g(a.G.destroy(),3);case 3:a.G=null;case 2:return qi(d),d.src=h,k=qb(),k.Ma()=="TV"&&d.load(),d.preload!="none"&&!d.autoplay&&
Fe(c)&&k.Aa()==="WEBKIT"&&d.load(),a.m=Yu,a.dispatchEvent(tu("streaming")),l=function(){return new Promise(function(w){var x=new Se(w);a.j.H(d.textTracks,"change",function(){return x.ma(.5)});x.ma(.5)})},m=new Ri,vp(d,HTMLMediaElement.HAVE_METADATA,a.j,function(){return I(function(w){if(w.h==1)return a.F.ready(),a.Fa&&Fe(a.Fa)?w.g(l(),3):(m.resolve(),w.u(0));m.resolve();w.j()})}),vp(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.j,function(){var w,x,y,z,B;return I(function(H){if(H.h==1)return H.g(l(),2);
if(e)return H.return();sv(a);w=qv(a);w.some(function(E){return E.mode==="showing"})&&(a.ha=!0,a.A.setTextVisibility(!0));if(!(a.A instanceof Ms))for(w.length&&(a.A.enableTextDisplayer?a.A.enableTextDisplayer():vb("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),x=!1,y=r(w),z=y.next();!z.done;z=y.next())B=z.value,B.mode!=="disabled"&&(x?(B.mode="disabled",Ya("Found more than one enabled text track, disabling it",B)):(tv(a,B),x=!0));uv(a);H.j()})}),
d.error?m.reject(xu(a)):d.preload=="none"&&(Ya('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.'),m.resolve()),a.j.Na(d,"error",function(){m.reject(xu(a))}),v.g(Ye(a.g.streaming.loadTimeout,m),4);case 4:if((n=a.ba())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=
function(){return nv(a)},a.j.H(d,"timeupdate",q);n||(u=function(){return ov(a)},a.j.H(d,"timeupdate",u),ov(a));a.C&&(a.C.onManifestUpdated(n),n&&(t=a.Ua().end,a.j.H(d,"progress",function(){var w=a.Ua().end;t!=w&&(a.C.onManifestUpdated(a.ba()),t=w)})));a.Ha=!0;v.j()}})}function sv(a){var b=a.g.preferredAudioLanguage;b!=""&&a.Vg(b,a.g.preferredAudioRole)}function uv(a){var b=a.g.preferredTextLanguage;b!=""&&a.Wg(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function Zu(a,b){if(b.kind=="metadata"){b.mode="hidden";a.j.H(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Mu(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value);if(b.cues){d=[];e=r(b.cues);for(var f=e.next(),g={};!f.done;g={Vb:void 0},f=e.next())g.Vb=f.value,g.Vb.type=="com.apple.quicktime.HLS"&&g.Vb.startTime!=null&&(f=d.find(function(h){return function(k){return k.startTime==h.Vb.startTime&&k.endTime==h.Vb.endTime}}(g)),
f||(f={startTime:g.Vb.startTime,endTime:g.Vb.endTime,values:[]},d.push(f)),f.values.push(g.Vb.value));d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return h.key=="X-ASSET-URI"||h.key=="X-ASSET-LIST"})&&a.C&&(e.values.push({key:"CUE",description:"",data:e.startTime!=0||a.ba()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.C.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new Se(function(){var d=vv(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ub().ma(.5);
a.ud.push(function(){c.stop()})}}function Du(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(tu(c,b))}function Mu(a,b,c,d,e){a.za&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),Yp(a.za,b))}function $u(a,b){if(b&&b.kind=="chapters"){b.mode="hidden";var c=(new Se(function(){b.mode="hidden"})).Ub().ma(.5);a.ud.push(function(){c.stop()})}}
p.Xi=function(){for(var a=this.ka;a.g;)a.release()};p.Ld=function(a){return new vj(a)};
function mu(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?Cr(b(),!0,f):f()}b||(b=function(){return null});var e=new bj(function(f,g,h,k,l){d(function(){a.o&&a.o.segmentDownloaded(f,g,h,k,l)})},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(tu("downloadheadersreceived",g));d(function(){if(a.xa){var k=a.xa;if(k.h.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;l<n.length;l++){var q=n[l].split("=");
m.set(q[0],hu(q[1]))}}catch(x){}if(m=f["cmsd-dynamic"]){a:{try{var u=new Map,t=m.split(";");for(m=1;m<t.length;m++){var v=t[m].split("=");u.set(v[0],hu(v[1]))}var w=u;break a}catch(x){w=null;break a}w=void 0}w&&(k.g=w)}}}})},function(f,g){f=(new Map).set("request",f).set("response",g);c(tu("downloadcompleted",f))},function(f,g,h,k){f=(new Map).set("request",f).set("error",g).set("httpResponseCode",h).set("aborted",k);c(tu("downloadfailed",f))},function(f,g,h){d(function(){if(a.K){var k=a.K,l=h;l=
l===void 0?{}:l;if(k.g.enabled)if(g.method==="HEAD")Jt(k,g,{});else switch(f){case 0:try{if(k.g.enabled){if(l.type){a:{switch(l.type){case 4:var m=k.A?ht:gt;break a;case 3:case 2:m=k.A?jt:it;break a;case 5:m="s";break a}m=void 0}k.l=m}Jt(k,g,{ot:qt,su:!k.D})}}catch(q){Za("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",q)}break;case mj:try{if(k.g.enabled){var n=Yt(k,l,g.uris[0]);n.ts=Date.now();k.m.has(g)&&k.m.delete(g);k.m.set(g,n.ts);Jt(k,g,n)}}catch(q){Za("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",
q)}break;case 2:case 5:case 6:Jt(k,g,{ot:"k"});break;case 4:Jt(k,g,{ot:"o"})}}})},function(f,g,h,k){(f=b()?b().l:a.I)&&f.banLocation&&f.banLocation(k)},function(f,g,h){if(g.data){var k=g.data.byteLength,l=b()?b().getStats():a.B;l&&(zr(l,k),f===0&&(l.Bg=k));k=a.K;h=h===void 0?{}:h;if(xt(k).length!==0)switch(f){case mj:try{var m=Yt(k,h,g.uri);g.originalRequest&&g.originalRequest.timeToFirstByte!=null&&(m.ttfb=g.originalRequest.timeToFirstByte);g.timeMs!=null&&(m.ttlb=g.timeMs);var n=g.originalUri||
g.uri;if(n.includes("CMCD="))try{var q=new URL(n);q.searchParams.delete("CMCD");var u=q.toString()}catch(C){u=n}else u=n;m.url=u;k.m.has(g.originalRequest)?(m.ts=k.m.get(g.originalRequest),k.m.delete(g.originalRequest)):m.ts||(m.ts=Date.now());var t=xt(k);if(t.length!==0){var v=k.g.version==At?Array.from(new Set([].concat(G(Bt),G(bu)))):Nt;m.rc=g.status||0;var w=zt(k,m,yt);g.headers&&g.headers["CMSD-Static"]&&(w.cmsds=btoa(g.headers["CMSD-Static"]));g.headers&&g.headers["CMSD-Dynamic"]&&(w.cmsdd=
btoa(g.headers["CMSD-Dynamic"]));for(var x=r(t),y=x.next();!y.done;y=x.next()){var z=y.value,B=Dt(z.includeKeys||[],v),H=Lt(z);k.o[H]||(k.o[H]={request:1,response:1});w.sn=k.o[H].response++;var E=Ft(w,B);It(k,E,z,g)}}}catch(C){Za("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",C)}}}});e.configure(a.g.networking);return e}
function gv(a,b){return new Hp(a.h,a.i,a.g.streaming,b,function(){a.Cb&&Nk(a.Cb,!a.F.Xf());a.l&&a.l.sc();a.R&&wv(a,"seeking")},function(c){return a.dispatchEvent(c)})}
function hv(a,b){var c=a.ba()||typeof b==="number"&&b>0;b=new Ur(a.rd,c);b.addEventListener("enter",function(f){Nu(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){Nu(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(Nu(a,"timelineregionenter",g),Nu(a,"timelineregionexit",g))});var d=new Ur(a.za,c);d.addEventListener("enter",function(f){Du(a,f.region,"metadata")});c=new Ur(a.Wa,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",
f.region.emsg);a.dispatchEvent(tu("emsg",f))});var e=new Mk(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.pd&&e.g.add(a.pd);return e}function pv(a,b){b=new Ur(a.za,b instanceof Date||b>0);b.addEventListener("enter",function(d){Du(a,d.region,"metadata")});var c=new Mk(a.h);c.g.add(b);return c}
function iv(a,b,c){a.R=new on;rn(a.R,qn);xv(a);Au(a);a.Ga=new Se(function(){wv(a)});a.g.streaming.rebufferingGoal&&a.Ga.Da(.25);a.j.H(b,"waiting",function(){return wv(a,"waiting")});a.j.H(b,"canplaythrough",function(){return wv(a,"canplaythrough")});a.j.H(b,"playing",function(){return wv(a,"playing")});a.j.H(b,"seeked",function(){return wv(a,"seeked")});a.j.H(b,"timeupdate",function(){return wv(a,"timeupdate")});c&&(a.j.H(b,"progress",function(){return wv(a,"progress")}),a.j.H(b,"stalled",function(){return wv(a,
"stalled")}))}function xv(a){var b=a.g.streaming.rebufferingGoal;a.R.j.set(pn,Math.min(.5,b/2)).set(qn,b)}
function wv(a,b){if(a.g.streaming.rebufferingGoal){b=a.G?Fo(a.G):!1;b=a.dd()||b||a.F.vg();var c=fo(a.h.buffered,a.h.currentTime),d=a.R,e=d.j.get(d.g);rn(d,b||c>=e&&c>0?pn:qn)&&Au(a)}else if(b){c=a.R;d=a.h.currentTime;e=c.h;c.h=d;var f=void 0;switch(b){case "seeking":case "waiting":c.h=-1;f=qn;break;case "canplaythrough":case "playing":case "seeked":f=pn;break;case "timeupdate":e>=0&&d-e>.01&&(f=pn)}f!==void 0&&rn(c,f)&&Au(a)}}function Ru(a,b,c,d,e){return new yo(a,b,c,e,d)}
function dv(a){return new lq(a.i,{Ab:function(){return a.F?a.F.Uc():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},hb:function(){return a.hb()},video:a.h,P:a.G,lc:a.M,onError:function(b){return yu(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ic:function(b,c,d,e){var f=b.startTime,g=b.endTime,h=c.type;if(h!=Ic){if(a.F){a.F.Jg();var k=Mo(a.G,h);!a.ba()&&a.h.paused&&!a.h.seeking&&k!=null&&k>0&&a.F.Uc()<k&&!xo(a.F.Uc(),k,.001)&&a.F.ze(k)}wv(a)}d=(new Map).set("start",f).set("end",
g).set("contentType",h).set("isMuxed",d).set("isDependency",e);a.dispatchEvent(tu("segmentappended",d));a.o&&c.fastSwitching&&b.mc&&b.ed&&a.o.trySuggestStreams()},Pi:function(b,c){(c=c.Hc)&&a.pd&&Qk(a.pd,c,b)},gg:function(b,c){var d=a.D;if(d.h.parseInbandPsshEnabled&&!d.G&&["audio","video"].includes(b)){b=new uj(Q(c));c=0;for(var e=r(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(c==0)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=r(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,
c.set(f,e),e+=f.length;Jj(d,"cenc",c);d=d.l}}else d=Promise.resolve();return d},disableStream:function(b,c){return a.disableStream(b,c)},jj:function(b,c){return a.g.abr.enabled&&c.fastSwitching&&b.mc&&b.ed?!1:!0}})}
p.configure=function(a,b){var c=this.getConfiguration();arguments.length==2&&typeof a=="string"&&(a=dr(a,b));"preferredVariantRole"in a&&(vb("preferredVariantRole configuration","Please Use preferredAudioRole instead."),a.preferredAudioRole=a.preferredVariantRole,delete a.preferredVariantRole);a.streaming&&"forceTransmuxTS"in a.streaming&&(vb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,
delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(vb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);if(a.streaming&&"useNativeHlsOnSafari"in a.streaming){vb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var d=qb();a.streaming.preferNativeHls=
a.streaming.useNativeHlsOnSafari&&d.Aa()==="WEBKIT";delete a.streaming.useNativeHlsOnSafari}a.streaming&&typeof a.streaming.liveSync=="boolean"&&(vb("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),d=a.streaming.liveSync,a.streaming.liveSync={},a.streaming.liveSync.enabled=d);if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){d=a.streaming.liveSyncMinLatency||0;var e=Math.abs((a.streaming.liveSyncMaxLatency||
1)-d)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=d+e;a.streaming.liveSync.targetLatencyTolerance=e}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(vb("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMaxLatency);a.streaming&&"liveSyncMinLatency"in a.streaming&&(vb("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),
delete a.streaming.liveSyncMinLatency);a.streaming&&"liveSyncTargetLatency"in a.streaming&&(vb("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatency=a.streaming.liveSyncTargetLatency,delete a.streaming.liveSyncTargetLatency);a.streaming&&"liveSyncTargetLatencyTolerance"in a.streaming&&(vb("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),
a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatencyTolerance=a.streaming.liveSyncTargetLatencyTolerance,delete a.streaming.liveSyncTargetLatencyTolerance);a.streaming&&"liveSyncPlaybackRate"in a.streaming&&(vb("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.maxPlaybackRate=a.streaming.liveSyncPlaybackRate,delete a.streaming.liveSyncPlaybackRate);a.streaming&&"liveSyncMinPlaybackRate"in
a.streaming&&(vb("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.minPlaybackRate=a.streaming.liveSyncMinPlaybackRate,delete a.streaming.liveSyncMinPlaybackRate);a.streaming&&"liveSyncPanicMode"in a.streaming&&(vb("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicMode=a.streaming.liveSyncPanicMode,
delete a.streaming.liveSyncPanicMode);a.streaming&&"liveSyncPanicThreshold"in a.streaming&&(vb("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicThreshold=a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){vb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");
var f=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return f};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(vb("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&"parsePrftBox"in a.streaming&&(vb("streaming.parsePrftBox configuration","Now fired without needing a configuration."),
delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(vb("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),a.manifest.enableAudioGroups=a.manifest.dash.enableAudioGroups,delete a.manifest.dash.enableAudioGroups);a.streaming&&"dispatchAllEmsgBoxes"in a.streaming&&(vb("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.dispatchAllEmsgBoxes=
a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in a.streaming&&(vb("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),a.streaming.lowLatencyMode=a.streaming.autoLowLatencyMode,delete a.streaming.autoLowLatencyMode);a.manifest&&a.manifest.dash&&"ignoreSupplementalCodecs"in a.manifest.dash&&(vb("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),
a.manifest.ignoreSupplementalCodecs=a.manifest.dash.ignoreSupplementalCodecs,delete a.manifest.dash.ignoreSupplementalCodecs);a.manifest&&a.manifest.hls&&"ignoreSupplementalCodecs"in a.manifest.hls&&(vb("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),a.manifest.ignoreSupplementalCodecs=a.manifest.hls.ignoreSupplementalCodecs,delete a.manifest.hls.ignoreSupplementalCodecs);a.manifest&&a.manifest.dash&&"updatePeriod"in a.manifest.dash&&
(vb("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.dash.updatePeriod,delete a.manifest.dash.updatePeriod);a.manifest&&a.manifest.hls&&"updatePeriod"in a.manifest.hls&&(vb("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.hls.updatePeriod,delete a.manifest.hls.updatePeriod);a.manifest&&a.manifest.dash&&"ignoreDrmInfo"in a.manifest.dash&&(vb("manifest.dash.ignoreDrmInfo configuration",
"Please Use manifest.ignoreDrmInfo instead."),a.manifest.ignoreDrmInfo=a.manifest.dash.ignoreDrmInfo,delete a.manifest.dash.ignoreDrmInfo);if(a.drm&&a.drm.advanced){d=!1;for(var g in a.drm.advanced){var h=a.drm.advanced[g];e=h.videoRobustness;h=h.audioRobustness;"videoRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].videoRobustness)&&(a.drm.advanced[g].videoRobustness=[e],d=!0);"audioRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].audioRobustness)&&(a.drm.advanced[g].audioRobustness=
[h],d=!0)}d&&vb("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}a.streaming&&"forceHTTP"in a.streaming&&(vb("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTP=a.streaming.forceHTTP,delete a.streaming.forceHTTP);a.streaming&&"forceHTTPS"in a.streaming&&(vb("streaming.forceHTTPS configuration",
"Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTPS=a.streaming.forceHTTPS,delete a.streaming.forceHTTPS);a.streaming&&"minBytesForProgressEvents"in a.streaming&&(vb("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),a.networking=a.networking||{},a.networking.minBytesForProgressEvents=a.streaming.minBytesForProgressEvents,delete a.streaming.minBytesForProgressEvents);g=mr(this.g,a,lu(this));
yv(this,c);return g};p.Fh=function(a){this.Ce=a};
function yv(a,b){a.vd=new qo(a.g,a.ya,a.D);if(a.I){var c=qd(a.g.manifest);a.h&&a.h.nodeName==="AUDIO"&&(c.disableVideo=!0);a.I.configure(c)}a.D&&a.D.configure(a.g.drm);if(a.l){a.l.configure(a.g.streaming);try{a.m!=uu&&so(a.vd,a.i)&&Xu(a)}catch(e){yu(a,e)}a.o&&av(a);c=a.l.o;!c||c.allowedByApplication&&c.allowedByKeySystem||qu(a)}a.M&&a.M.configure(a.g.networking);a.G&&(a.G.configure(a.g.mediaSource),a.G.Fa=a.g.manifest.segmentRelativeVttTiming);a.A&&Qu(a);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?
a.o.enable():a.o.disable(),mv(a));a.R&&xv(a);a.Ga&&(a.g.streaming.rebufferingGoal?a.Ga.Da(.25):a.Ga.stop());a.i&&bv(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.C&&a.C.configure(a.g.ads);a.K&&a.K.configure(a.g.cmcd);a.xa&&a.xa.configure(a.g.cmsd);a.Ca&&a.Ca.configure(a.g.queue);if(a.m==ev&&a.J.getConfiguration){c=a.J.getConfiguration();var d=!1;b.preferredVideoHdrLevel!=a.g.preferredVideoHdrLevel&&c.hdrLevel!=a.g.preferredVideoHdrLevel&&(c.hdrLevel=a.g.preferredVideoHdrLevel,d=
!0);b.preferredVideoLayout!=a.g.preferredVideoLayout&&c.videoLayout!=a.g.preferredVideoLayout&&(c.videoLayout=a.g.preferredVideoLayout,d=!0);b.preferSpatialAudio!=a.g.preferSpatialAudio&&c.spatialAudio!=a.g.preferSpatialAudio&&(c.spatialAudio=a.g.preferSpatialAudio,d=!0);b.preferredVideoRole!=a.g.preferredVideoRole&&c.videoRole!=a.g.preferredVideoRole&&(c.videoRole=a.g.preferredVideoRole,d=!0);d&&(a.J.configure(c),qu(a))}}p.getConfiguration=function(){var a=lu(this);mr(a,this.g,lu(this));return a};
p.Qh=function(){return this.Ce};p.bi=function(){var a=lu(this);mr(a,this.g,lu(this));return fr(this.g,lu(this))};p.mg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=Math.min(this.h.currentTime+this.g.streaming.bufferingGoal,this.Ua().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};
p.Yi=function(){var a=this.getConfiguration(),b;for(b in this.g)delete this.g[b];mr(this.g,lu(this),lu(this));yv(this,a)};p.jf=function(){return this.m};p.og=function(){return this.i?this.i.type:null};p.lf=function(){return this.h};p.ai=function(){return this.M};p.Sd=function(){return this.$};p.Ih=function(){return this.C?this.C:null};p.ii=function(){return this.Ca?this.Ca:null};
p.ba=function(){return this.i&&!this.sa()?this.i.presentationTimeline.ba():this.h&&(this.h.src||this.sa())?this.h.duration==Infinity:!1};p.Gc=function(){return this.i?this.i.presentationTimeline.Gc():!1};p.Ai=function(){if(this.i&&!this.sa()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&(this.h.src||this.sa())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1};
p.yg=function(){if(this.i&&!this.sa()){var a=this.i.variants;if(!a.length)return!1;a=a[0];return a.audio||!a.video?!1:!a.video.codecs.includes(",")}return this.h&&(this.h.src||this.sa())&&this.h.audioTracks?this.h.audioTracks.length==0:!1};
p.Ua=function(){if(this.i&&!this.sa()){if(!this.Ha&&this.i.type=="HLS")return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Nb(),end:a.ib()}}if(this.h&&(this.h.src||this.sa())&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};p.wi=function(){this.ba()&&(this.h.currentTime=this.Ua().end)};p.Bi=function(){return this.Ha};
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.D?this.D.g:null};p.hf=function(){return this.D?this.D.hf():Infinity};p.gf=function(){return this.D?this.D.gf():[]};p.Td=function(){return this.D?this.D.Td():{}};p.wg=function(){return this.R?this.R.g==qn:!!this.$};p.hb=function(){return this.h?this.L?this.L.h:1:0};p.Vf=function(a){this.m==ev&&this.l&&xq(this.l,a)};
p.nd=function(a,b){b=b===void 0?!0:b;if(a==0)Ya("A trick play rate of 0 is unsupported!");else{var c=this.h.playbackRate,d=this.L.h;this.L.set(a);this.m==ev&&(this.o.playbackRateChanged(a),this.Vf(b&&a!=1));zv(this,a);c===0&&this.h.playbackRate===0&&a!=d&&Vu(this)}};p.Vc=function(){var a=this.L.Bc();this.m==Yu&&this.L.set(a);this.m==ev&&(this.L.set(a),this.o.playbackRateChanged(a),this.Vf(!1));this.Eb.bb()};
p.Ob=function(){if(this.i&&!this.sa()){for(var a=this.l?this.l.o:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Mf(e)){var f=Ef(e);f.active=e==a;f.active||c==1||a==null||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}if(this.h&&this.h.audioTracks){var g=Av(this);a=Array.from(this.h.audioTracks);return a.length?a.map(function(h){return Lf(h,g)}):g?[Lf(null,g)]:[]}return[]};
p.$b=function(){if(this.i){if(this.sa())return[];for(var a=this.l?this.l.B:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Ff(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?qv(this).map(function(f){return Kf(f)}):[]};p.Vh=function(){var a=this.zd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Gf(b)})};
p.Jh=function(a){var b=this,c,d;return I(function(e){if(e.h==1)return e.g(Bv(b,a),2);c=e.i;if(!c)return e.return(null);d=[];c.segmentIndex.yb(function(f){var g=Cv(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.columns,k=(f.l-f.startTime)/h,l=0;l<h;l++){var m=Dv(f,c,f.startTime+l*k,g);if(!m)break;d.push(m)}});return e.return(d)})};function Cv(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
p.pi=function(a,b){var c=this,d,e,f,g;return I(function(h){if(h.h==1)return h.g(Bv(c,a),2);d=h.i;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=Cv(f.tilesLayout||d.tilesLayout))?h.return(Dv(f,d,b,g)):h.return(null)})};
function Bv(a,b){var c,d,e;return I(function(f){if(f.h==1){if(a.m!=ev&&a.m!=Yu)return f.return(null);c=a.zd;a.i&&(c=a.i.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.u(2):f.g(d.createSegmentIndex(),2):f.return(null)}d.closeSegmentIndex&&(a.Sb.has(d)||(e=new Se(function(){d&&(d.closeSegmentIndex(),a.Sb.delete(d))}),a.Sb.set(d,e)),a.Sb.get(d).ma(5));return f.return(d)})}
function Dv(a,b,c,d){var e=b.width||0,f=b.height||0,g=e/d.columns,h=f/d.rows,k=d.columns*d.rows,l=a.l-a.startTime;l=a.C||l/k;var m=a.startTime,n=0,q=0;k>1&&(q=Math.floor((c-a.startTime)/l+1E-4),m=a.startTime+q*l,n=q%d.columns*g,q=Math.floor(q/d.columns)*h);if(m>=a.endTime||xo(m,a.endTime,1E-4))return null;d=!1;if(c=a.thumbnailSprite)d=!0,h=c.height,n=c.positionX,q=c.positionY,g=c.width;return{segment:a,imageHeight:f,imageWidth:e,height:h,positionX:n,positionY:q,startTime:m,duration:l,uris:a.N(),startByte:a.Zb(),
endByte:a.Yb(),width:g,sprite:d,mimeType:a.mimeType||b.mimeType,codecs:a.codecs||b.codecs}}
p.Mf=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.l.B&&(rr(c.B.h,d,!1),Aq(c.l,d),Wu(c),lv(c),c.Qc=d.language)}var c=this;if(this.i&&this.F&&(b(),!this.sa()))return;(function(){if(c.h&&c.h.textTracks){var d=qv(c),e=d.find(function(h){return If(h)===a.id});if(e){if(c.A instanceof Ms){d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f===e?c.ha?"showing":"hidden":"disabled";f.mode!==g&&(f.mode=g)}}else d=d.find(function(h){return h.mode!=="disabled"}),
d!==e&&(d&&(d.mode="disabled",c.j.jb(d,"cuechange"),c.A.remove(0,Infinity)),e&&tv(c,e));Wu(c);lv(c)}}})()};
function tv(a,b){a.j.H(b,"cuechange",function(){a.A.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},d=[],e=Array.from(b.activeCues||[]);e=r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(f.endTime===Infinity||f.endTime<f.startTime)f=null;else{var g=new Ed(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?
Md: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=ed,g.region.width=f.region.width,g.region.widthUnits=ed);Td(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.A.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
p.qe=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&Mf(f)){var g=e.l.o;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount&&g.audio.label==f.audio.label)&&Ya("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.sa()?cv(e,f,!1,!1,0):cv(e,f,!1,b||!1,c||0);e.J.configure({language:f.language,
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",videoRole:f.video&&f.video.roles&&f.video.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,hdrLevel:f.video&&f.video.hdr?f.video.hdr:"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1,videoLayout:f.video&&f.video.videoLayout?f.video.videoLayout:"",audioLabel:f.audio&&f.audio.label?f.audio.label:"",videoLabel:f.video&&f.video.label?f.video.label:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,
audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:"",activeAudioCodec:g.audio&&g.audio.codecs?g.audio.codecs:"",activeAudioChannelCount:g.audio&&g.audio.channelsCount?g.audio.channelsCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount});av(e)}}var e=this;b=b===void 0?!1:b;c=c===void 0?0:c;if(this.i&&this.F&&(d(),!this.sa()))return;(function(){if(a.originalAudioId&&e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=r(f);for(var g=f.next();!g.done;g=
f.next())if(g=g.value,If(g)==a.id){Ev(e,g);break}}})()};
p.bj=function(a,b){function c(){var e=d.J.getConfiguration();e.audioCodec=a.codecs||"";e.audioLabel=a.label||"";e.channelCount=a.channelsCount||0;e.language=a.language;e.role=a.roles[0]||"";e.spatialAudio=a.spatialAudio;var f=d.l.o;if(f=f&&f.audio)e.activeAudioCodec=f.codecs||"",e.activeAudioChannelCount=f.channelsCount||0;d.J.configure(e);qu(d,!0,b,!1,!1)}var d=this;b=b===void 0?0:b;if(this.i&&this.F&&(c(),!this.sa()))return;(function(){if(d.h&&d.h.audioTracks){var e=af(a.language),f=Array.from(d.h.audioTracks),
g=null;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=h.language||"und";if(h.label==a.label&&af(k)==e&&h.kind==a.roles[0]){g=h;break}}g&&Ev(d,g)}})()};
p.getAudioTracks=function(){if(this.i&&!this.sa()){var a=this.Ob();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.m!=ev||this.sa()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&(f.audioCodec||re.includes(f.audioMimeType||""))}));if(!c.length)return[];a=new Map;c=r(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.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(f){var g=
f.language;g={active:f.enabled,language:af(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}):[]};
p.dj=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?0:c;var d=this.Ob();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&&hb(g.videoRoles,a.roles)&&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&&Ae(g.audioCodec||"")===Ae(e.audioCodec||"")&&hb(g.audioRoles,e.audioRoles)}));f&&!f.active&&this.qe(f,b,c)}}};
p.getVideoTracks=function(){if(this.m==Yu||this.sa())return[];var a=this.Ob();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.yg()||(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&&Ae(f.audioCodec||"")===Ae(b.audioCodec||
"")&&hb(f.audioRoles,b.audioRoles):!1}));if(!c.length)return[];a=new Map;c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalVideoId;e||d.videoId==null||(e=String(d.videoId));e&&a.set(e,{active:d.active,bandwidth:d.videoBandwidth||d.bandwidth,width:d.width,height:d.height,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,mimeType:d.videoMimeType,codecs:d.videoCodec,roles:d.videoRoles||[],label:d.videoLabel})}return Array.from(a.values())};
p.Lh=function(){return Fv(this.Ob())};p.mi=function(){return Fv(this.$b())};p.Kh=function(){return Array.from(Gv(this.Ob()))};p.li=function(){return Array.from(Gv(this.$b()))};
p.Vg=function(a,b,c,d,e,f,g){function h(){function l(t,v){return t.video||v.video?t.video&&v.video?Math.abs((t.video.height||0)-(v.video.height||0))+Math.abs((t.video.width||0)-(v.video.width||0)):Infinity:0}var m=k.l.o;k.J=k.g.adaptationSetCriteriaFactory();k.J.configure({language:a,role:b||"",videoRole:m.video&&m.video.roles&&m.video.roles[0]||"",channelCount:c||0,hdrLevel:"",spatialAudio:f||!1,videoLayout:"",audioLabel:g||"",videoLabel:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,
audioCodec:e||"",activeAudioCodec:m.audio&&m.audio.codecs?m.audio.codecs:"",activeAudioChannelCount:m.audio&&m.audio.channelsCount?m.audio.channelsCount:0,preferredAudioCodecs:k.g.preferredAudioCodecs,preferredAudioChannelCount:k.g.preferredAudioChannelCount});var n=k.J.create(k.i.variants),q=null;n=r(n.values());for(var u=n.next();!u.done;u=n.next())u=u.value,Mf(u)&&(!q||l(q,m)>l(u,m))&&(q=u);q!=m&&(q?(m=Ef(q),k.qe(m,!0,d||0)):qu(k))}var k=this;c=c===void 0?0:c;d=d===void 0?0:d;e=e===void 0?"":e;
f=f===void 0?!1:f;g=g===void 0?"":g;if(this.i&&this.F&&(h(),!this.sa()))return;(function(){if(k.h&&k.h.audioTracks){var l=Of(k.Ob(),a,b||"",!1)[0];l&&k.qe(l)}})()};p.Wg=function(a,b,c){function d(){e.Qc=a;e.Tc=b||"";e.Sc=c||!1;var f=Of(e.i.textStreams,e.Qc,e.Tc,e.Sc)[0]||null;f&&f!=e.l.B&&(rr(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.uf())&&(Aq(e.l,f),Wu(e),lv(e))}var e=this;c=c===void 0?!1:c;if(this.i&&this.F&&(d(),!this.sa()))return;(function(){var f=Of(e.$b(),a,b||"",c||!1)[0];f&&e.Mf(f)})()};
p.cj=function(a,b,c){function d(){for(var f=null,g=r(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}f!=null&&(e.J=e.g.adaptationSetCriteriaFactory(),e.J.configure({language:f.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),
qu(e,b,c))}var e=this;b=b===void 0?!0:b;c=c===void 0?0:c;if(this.i&&this.F&&(d(),!this.sa()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=r(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&Ev(e,g)}})()};p.uf=function(){var a=this.ha;return this.A?this.A.isTextVisible():a};p.Ph=function(){return this.Xa.map(function(a){return Ff(a)})};
p.Nh=function(a){vb("getChapters","Please use an getChaptersAsync.");if(!this.Xa.length)return[];var b=af(a);a=this.Xa.filter(function(f){return af(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=r(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.yb(function(f){var g=f.N()[0],h=f.startTime+"-"+f.endTime+"-"+g;f={id:h,title:g,startTime:f.startTime,endTime:f.endTime};d.has(h)||(c.push(f),d.add(h))});return c};
p.Oh=function(a){var b=this,c,d,e,f,g,h,k;return I(function(l){switch(l.h){case 1:if(!b.Xa.length)return l.return([]);c=af(a);d=b.Xa.filter(function(m){return af(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=r(d);h=g.next();case 2:if(h.done){l.u(4);break}k=h.value;if(k.segmentIndex){l.u(5);break}return l.g(k.createSegmentIndex(),5);case 5:k.segmentIndex.yb(function(m){var n=m.N()[0],q=m.startTime+"-"+m.endTime+"-"+n;m={id:q,title:n,startTime:m.startTime,endTime:m.endTime};f.has(q)||
(e.push(m),f.add(q))});h=g.next();l.u(2);break;case 4:return l.return(e)}})};function qv(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind!="metadata"&&b.kind!="chapters"&&b.label!="Shaka Player TextTrack"})}function rv(a){return Array.from(a.h.textTracks).find(function(b){return b.label=="Shaka Player TextTrack"})}function vv(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind=="metadata"})}
p.bh=function(a){a=!!a;this.ha!=a&&(this.ha=a,this.m==ev?(this.A.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.B||(a=Of(this.i.textStreams,this.Qc,this.Tc,this.Sc),a.length>0&&(Aq(this.l,a[0]),Wu(this),lv(this))):wq(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.A.setTextVisibility(a),kv(this))};
p.ci=function(){if(this.F)var a=this.F.Uc();else{if(this.O==null)return new Date;if(this.O instanceof Date)return this.O;a=this.O}if(this.i&&!this.sa()){var b=this.i.presentationTimeline;return new Date(((b.m||b.i)+a)*1E3)}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),b instanceof Date&&!isNaN(b.getTime())?new Date(b.getTime()+a*1E3):null):null};
p.qg=function(){if(this.i&&!this.sa()){var a=this.i.presentationTimeline;a=a.m||a.i;return a===null?null:new Date(a*1E3)}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),a instanceof Date&&!isNaN(a.getTime())?a:null):null};p.Ud=function(){return this.ba()?this.i?this.i.presentationTimeline.Ud():null:null};p.Xb=function(){if(this.m==ev)return this.G.Xb();var a={total:[],audio:[],video:[],text:[]};this.m==Yu&&(a.total=go(this.h.buffered));return a};
function au(a){if(!a.h||!a.h.currentTime)return null;var b=a.qg();return b?Math.floor(Date.now()-(b.getTime()+a.h.currentTime*1E3)):null}p.getBandwidthEstimate=function(){return this.o?this.o.getBandwidthEstimate():NaN};
p.getStats=function(){if(this.m!=ev&&this.m!=Yu)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,
switchHistory:[],stateHistory:[]};Uu(this);var a=this.h,b=a.currentTime/a.duration;isNaN(b)||this.ba()||vr(this.B,Math.round(100*b));this.F&&(this.B.U=this.F.Wf(),this.B.Y=this.F.Yf());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),tr(this.B,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.B.M=Number(b.corruptedVideoFrames));wr(this.B,this.D?Rj(this.D):NaN);ur(this.B,a.videoWidth||NaN,a.videoHeight||NaN);this.B.l="";this.ba()&&(a=au(this),a!=null&&xr(this.B,a/1E3));b=this.Ob().find(function(e){return e.active});
a=this.$b().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.L?this.L.h:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.B.B=d}b.width&&b.height&&ur(this.B,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.B.l=b)}this.m!=ev||this.sa()||(this.i&&(this.B.I=this.i.periodCount,this.B.G=this.i.gapCount,this.i.presentationTimeline&&yr(this.B,this.i.presentationTimeline.h)),a=this.o.getBandwidthEstimate(),this.B.A=a);this.m==Yu&&zr(this.B,NaN);
return Ar(this.B)};
p.uh=function(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=this,k,l,m,n,q,u,t,v,w,x,y,z;return I(function(B){switch(B.h){case 1:if(h.m!=ev&&h.m!=Yu)throw new R(1,7,7004);c!="subtitles"&&c!="captions"&&Ya("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){B.u(2);break}return B.g(Hv(h,a),3);case 3:d=B.i;case 2:k=[];h.C&&(k=h.C.getCuePoints());if(h.m!=Yu){B.u(4);break}l=qb();g&&l.Aa()==="WEBKIT"&&(c="forced");return B.g(Iv(h,a,b,c,d,f||"",k),5);case 5:m=B.i;if(m.track)return Xu(h),
Wu(h),B.return(Kf(m.track));throw new R(1,2,2012);case 4:n=Kc;q=h.Ua();u=q.end-q.start;h.i&&(u=h.i.presentationTimeline.getDuration());if(u==Infinity)throw new R(1,4,4033);if(!k.length){B.u(6);break}return B.g(Jv(h,a),7);case 7:t=B.i,v=Kv(h,t,d,k),w=new Blob([v],{type:"text/vtt"}),a=Bo(w),d="text/vtt";case 6:x={id:h.Cd++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Wk(0,u,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,
language:b,originalLanguage:b,label:f||null,type:n.Ka,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([qe(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};y=qe(x.mimeType,x.codecs);z=Ke(y);if(!z)throw new R(2,2,2014,d);h.i.textStreams.push(x);Xu(h);Wu(h);return B.return(Ff(x))}})};
p.wh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y,z,B;return I(function(H){switch(H.h){case 1:if(c.m!=ev&&c.m!=Yu)throw new R(1,7,7004);if(b){H.u(2);break}return H.g(Hv(c,a),3);case 3:b=H.i;case 2:if(b!="text/vtt")throw new R(1,2,2017,a);d=Kc;e=c.Ua();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(f==Infinity)throw new R(1,4,4045);return H.g(Jv(c,a),4);case 4:g=H.i;h=Je(b);if(!h)throw new R(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,segmentEnd:f,vttOffset:0};
m=Q(g);n=k.parseMedia(m,l,a,[]);q=[];u=r(n);t=u.next();for(v={};!t.done;v={we:void 0,Ac:void 0},t=u.next())v.Ac=t.value,v.we=null,w=function(E){return function(){E.we==null&&(E.we=Ac([a],[E.Ac.payload]));return E.we||[]}}(v),x=new X(v.Ac.startTime,v.Ac.endTime,w,0,null,null,0,0,Infinity),v.Ac.payload.includes("#xywh")&&(y=v.Ac.payload.split("#xywh=")[1].split(","),y.length===4&&x.dh({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],10)})),q.push(x);
z=b;if(!q.length){H.u(5);break}return H.g(Hv(c,q[0].N()[0]),6);case 6:z=H.i;case 5:return B={id:c.Cd++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Uk(q),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.rh,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,
tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([qe(z||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.m==Yu?c.zd.push(B):c.i.imageStreams.push(B),Xu(c),H.return(Gf(B))}})};
p.sh=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y;return I(function(z){switch(z.h){case 1:if(d.m!=ev&&d.m!=Yu)throw new R(1,7,7004);if(c){z.u(2);break}return z.g(Hv(d,a),3);case 3:c=z.i;case 2:e=Kc;f=d.Ua();g=f.end-f.start;d.i&&(g=d.i.presentationTimeline.getDuration());if(g==Infinity)throw new R(1,4,4055);h=Je(c);if(!h)throw new R(2,2,2014,c);return z.g(Jv(d,a),4);case 4:k=z.i;l=h();m={periodStart:0,segmentStart:0,segmentEnd:g,vttOffset:0};n=Q(k);q=l.parseMedia(n,m,a,[]);u=[];t=r(q);
v=t.next();for(w={};!v.done;w={Md:void 0},v=t.next())w.Md=v.value,x=new X(w.Md.startTime,w.Md.endTime,function(B){return function(){return[B.Md.payload]}}(w),0,null,null,0,0,Infinity),u.push(x);y={id:d.Cd++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Uk(u),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:null,type:e.Ka,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,
roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([qe("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null};d.Xa.push(y);Xu(d);return z.return(Ff(y))}})};
function Hv(a,b){var c;return I(function(d){switch(d.h){case 1:return d.m(2),d.g(ll(b,a.M,a.g.streaming.retryParameters),4);case 4:c=d.i;d.o(3);break;case 2:d.l();case 3:if(c)return d.return(c);throw new R(1,2,2011,b);}})}
function Iv(a,b,c,d,e,f,g){var h,k,l,m;return I(function(n){if(n.h==1)return e!="text/vtt"||g.length?n.g(Jv(a,b),3):n.u(2);n.h!=2&&(h=n.i,k=Kv(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Bo(l),e="text/vtt");m=document.createElement("track");a:{var q=a.K,u=b;try{if(!q.g.enabled){var t=u;break a}var v=nt(q);v.ot=Ut;v.su=!0;var w=rt(v);t=st(u,w);break a}catch(x){Za("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x);t=u;break a}t=void 0}m.src=t;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);a.Be.push(m);return n.return(m)})}function Jv(a,b){var c,d,e,f;return I(function(g){if(g.h==1){c=mj;d=a.g.streaming.retryParameters;e=gj([b],d);e.method="GET";var h=a.K;try{h.g.enabled&&Jt(h,e,{ot:Ut,su:!0})}catch(k){Za("CMCD_TEXT_ERROR","Could not generate text CMCD data.",k)}return g.g(a.M.request(c,e).promise,2)}f=g.i;return g.return(f.data)})}
function Kv(a,b,c,d){var e=Je(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Q(b),b=c.parseMedia(b,a,null,[]),$s(b,d);throw new R(2,2,2014,c);}p.gj=function(a,b){this.ya.width=a;this.ya.height=b};p.Jf=function(a){if(this.m==ev){var b=this.l;a=a===void 0?.1:a;if(b.l.g)b=!1;else if(b.D)b=!1;else{for(var c=r(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Ec||d.Ba||d.Za||(d.Ec=!1,vq(b,d,a));b=!0}}else b=!1;return b};
p.kf=function(){Ya("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for.");return this.i};p.Yh=function(){return this.Tb};
p.Th=function(){var a={video:null,audio:null,text:null};if(this.m!=ev)return a;var b=this.l.o,c=this.h.currentTime;b=r([b.video,b.audio,this.l.B]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};d.type=="video"?(e.width=d.width,e.height=d.height,a.video=e):d.type=="audio"?a.audio=e:d.type==Ic&&(a.text=e)}return a};
function lu(a){var b=hr();b.streaming.failureCallback=function(c){if(a.ba()){var d=null;c.code==1001||c.code==1002?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):c.code==1003&&(d=.1);d!=null&&(c.severity=1,a.Jf(d))}};b.textDisplayFactory=function(){if(a.sd){var c=a.h;c=c.webkitDisplayingFullscreen||c.webkitPresentationMode&&c.webkitPresentationMode!="inline"?!1:!0}else c=!1;return c?new Qs(a.h,a.sd):"track"in document.createElement("track")?new Ms(a):new Ps};return b}p.ij=function(a){this.sd=a};
function Lu(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,e.mimeType!="application/cea-608"&&e.mimeType!="application/cea-708"||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Xk,l=e.closedCaptions.get(g);h={id:a.Cd++,originalId:g,groupId:null,
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Ic,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([qe(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
b.textStreams.push(h);c.add(g)}}
function jv(a,b){var c,d,e,f,g;return I(function(h){if(h.h==1)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return I(function(u){if(u.h==1)return k?k.segmentIndex?u.u(2):u.g(k.createSegmentIndex(),2):u.return(null);n=(m=k.segmentIndex.zb(l))?m.next().value:null;if(!n)return u.return(null);q=n.startTime;return u.return(q)})},h.g(e(c,b),2);if(h.h!=3)return f=h.i,h.g(e(d,b),3);g=h.i;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 Au(a){var b=a.wg();if(a.B&&a.R&&a.F){if(a.g.streaming.rebufferingGoal==0){var c=a.L;c.j=!1;up(c)}else c=a.L,c.j=b,up(c);a.K&&(c=a.K,b||c.D||(c.D=!0),c.D&&b&&(c.I=!0,lt(c,"ps",{tc:"r"})),c.J=b);Uu(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Ed<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;
a.Y&&(a.Y=Math.min(a.Y+ ++a.Ed*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(tu("buffering",b))}function Vu(a){var b=a.h.playbackRate;b==0?(b=a.hb(),b!==0&&b!==1&&(b=tu("ratechange"),a.dispatchEvent(b))):(a.L&&(a.L.set(b),a.m==ev&&a.o.playbackRateChanged(b),zv(a,b)),b=tu("ratechange"),a.dispatchEvent(b))}
function zv(a,b){a.Eb.bb();a.Eb.H(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.Ua(),e=a.ba(),f=e?a.g.streaming.safeSeekOffset:0;b>0?e&&b>1&&Math.floor(c)>=Math.floor(d.end)&&a.Vc():Math.floor(c)<=Math.floor(d.start+f)&&a.Vc()})}
function Uu(a){if(a.B&&a.R){var b=a.B.g,c="playing";a.R.g==qn?c="buffering":a.dd()?c="ended":a.h.paused&&(c="paused");var d=c;if(b.g==null)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(tu("statechanged",c)))}}
function nv(a){var b=a.h.playbackRate,c=a.ba();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.mg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.nd(d,!1):e==1&&b!==a.L.Bc()&&a.Vc()}if(c&&(c=a.Ua(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,a.i.serviceDescription.targetLatency!=null?h=a.i.serviceDescription.targetLatency+d:a.i.serviceDescription.maxLatency!=null&&(h=a.i.serviceDescription.maxLatency),a.i.serviceDescription.targetLatency!=null?
k=Math.max(0,a.i.serviceDescription.targetLatency-d):a.i.serviceDescription.minLatency!=null&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.Y||typeof g!=="number"||(a.Y=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Db&&a.Y!==null&&typeof g==="number"&&a.Ed<n&&Date.now()-a.Db>f*1E3&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
a.Y=Math.max(a.Y-(g-f)/2,f+d),a.Db=Date.now());e&&a.Y!==null&&(h=a.Y+d,k=a.Y-d);g=c.end-a.h.currentTime;d=0;a.m==Yu&&(e=a.h.buffered,e.length>0&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=a.g.streaming.liveSync.panicThreshold*1E3;f=Date.now()-a.R.i;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.nd(m,!1):h!=void 0&&l&&g-d>h?(b!=l&&a.nd(l,!1),a.Db=null):k!=void 0&&m&&g-d<k?(b!=m&&a.nd(m,!1),a.Db=null):b!==a.L.Bc()&&(a.Vc(),a.Db=Date.now())}}
function Lv(a,b,c){return(xo(b,c,.01)||c>b)&&a.Ae<b?(a.Ae=b,!0):!1}function ov(a){if(a.h){var b=a.Ua();b=b.end-b.start;b=b>0?a.h.currentTime/b:0;if(!isNaN(b)){b*=100;if(Lv(a,0,b))var c=tu("started");else if(Lv(a,25,b))c=tu("firstquartile");else if(Lv(a,50,b))c=tu("midpoint");else if(Lv(a,75,b))c=tu("thirdquartile");else{if(Lv(a,100,b)||b>100)c=tu("complete");a.g&&a.g.playRangeEnd!=Infinity&&a.dd()&&a.h.pause()}c&&a.dispatchEvent(c)}}}
function av(a){try{vo(a.vd,a.i)}catch(c){return yu(a,c),!1}var b=Nf(a.i.variants);b=a.J.create(b);a=a.o.setVariants(Array.from(b.values()));return typeof a=="boolean"?a:!0}
function fv(a,b){b=b===void 0?!1:b;if(av(a)){if(!a.g.abr.enabled){var c=a.J;typeof c.getLastAdaptationSet!="function"&&(vb("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),c.getLastAdaptationSet=function(){return null});if(c=c.getLastAdaptationSet())if(c=Array.from(c.values()),c.length){var d=a.l.o;if(d&&d.video&&(c=c.find(function(e){return e.video==d.video})))return c}}return a.o.chooseVariant(b)}return null}
function qu(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=fv(a);f&&cv(a,f,e,b,c,d)}
function cv(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a.l.o;if(b==g)d&&zq(a.l,b,d,e,!0);else{var h=a.B.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));zq(a.l,b,d,e,f,c);d=null;g&&(d=Ef(g));g=Ef(b);g.active=!0;if(a.U&&(e=a.U,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.og()){case "DASH":h=1;break;case "HLS":h=0}e.g&&(e.g.setLevelSwitching(b.id,
!0),e.g.setContainerFormat(f),e.j||e.g.setStreamingFormat(h))}c?(c=(new Map).set("oldTrack",d).set("newTrack",g),c=tu("adaptation",c),Mv(a,c)):Nv(a,d,g);Ov(a,d,g)}}function Ev(a,b){var c=Array.from(a.h.audioTracks).find(function(e){return e.enabled});b.enabled=!0;if(c){b.id!==c.id&&(c.enabled=!1);var d=Av(a);c=Lf(c,d);b=Lf(b,d);Nv(a,c,b);Ov(a,c,b)}}function Av(a){return a.h&&a.h.videoTracks?Array.from(a.h.videoTracks).find(function(b){return b.selected}):null}
function Xu(a){var b=tu("trackschanged");Mv(a,b);Pv(a)}function Nv(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=tu("variantchanged",b);Mv(a,b)}function Ov(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&Pv(a)}function Pv(a){var b=tu("audiotrackschanged");Mv(a,b)}function Wu(a){var b=tu("textchanged");Mv(a,b)}function kv(a){var b=tu("texttrackvisibility");Mv(a,b)}
function mv(a){a.g.abr.enabled||pu(a);var b=(new Map).set("newStatus",a.g.abr.enabled);Mv(a,tu("abrstatuschanged",b))}function lv(a){var b=a.$b().find(function(c){return c.active});b&&a.A&&a.A.setTextLanguage&&a.A.setTextLanguage(b.language)}function pu(a,b){b=b===void 0?!0:b;if(a.m==ev){a.xd.stop();for(var c=r(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&av(a)}}
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===uu||!navigator.onLine||b==0||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?a.type=="audio"?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=r(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.xd.Da(1);b=this.Xb().video.reduce(function(h,
k){return h+k.end-k.start},0);qu(this,!1,b,!0,!1);return!0}return!1};
function yu(a,b){var c,d,e,f,g;return I(function(h){switch(h.h){case 1:if(a.m==uu)return h.return();b.severity===1&&a.B.L++;c=!0;if(!(a.Ha&&a.i&&a.l)||b.code!=3016&&b.code!=3014&&b.code!=3015&&b.code!=3024&&b.code!=3018){h.u(2);break}d=qb();if(d.Aa()==="WEBKIT"&&b.code==3016)return h.return();h.m(3);return h.g(Pq(a.l),5);case 5:e=h.i;c=!e;e&&(f=tu("mediasourcerecovered"),a.dispatchEvent(f));h.o(2);break;case 3:h.l(),c=!0;case 2:if(!c)return h.return();b.severity===2&&pu(a,!1);g=tu("error",(new Map).set("detail",
b));a.dispatchEvent(g);g.defaultPrevented&&(b.handled=!0);h.j()}})}p.addFont=function(a,b){return ui(a,b)};function Nu(a,b,c,d){d=d===void 0?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,timescale:c.timescale,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(tu(b,a))}
function Ou(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(tu(d?"audiotrackchanged":"mediaqualitychanged",b))}
function xu(a,b){b=b===void 0?!0:b;if(!a.h.error)return b?new R(2,3,3016):null;var c=a.h.error.code;if(!b&&c==1)return null;if(b=a.h.error.msExtendedCode)b<0&&(b+=4294967296),b=b.toString(16);return new R(2,3,3016,c,b,a.h.error.message)}
function Pu(a,b){if(a.l){var c=tu("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=sj(a.g.drm.clearKeys),g=function(t,v){t.allowedByKeySystem=!0;v=r(v);for(var w=v.next();!w.done;w=v.next())if(w=w.value,(w=b[e?"00":w])||a.D.G)t.allowedByKeySystem=t.allowedByKeySystem&&!!w&&!wo.includes(w)},h=r(a.i.variants),k=h.next();!k.done;k=h.next()){k=k.value;var l=Qf(k);l=r(l);
for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=k.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!f.size&&a.i.type=="HLS")for(var q=r(m.drmInfos),u=q.next();!u.done;u=q.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&&(Xu(a),(c=a.l.o)&&!c.allowedByKeySystem?qu(a):av(a))}}function bv(a,b,c){b>0&&(a.ba()||a.eh(b));b=a.getDuration();c<b&&(a.ba()||a.cc(c))}
function Mv(a,b){I(function(c){if(c.h==1)return c.g(Promise.resolve(),2);a.m!=uu&&a.dispatchEvent(b);c.j()})}function Gv(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(af(c.language)):b.add("und");return b}
function Fv(a){for(var b=new Map,c=new Map,d=0;d<a.length;d++){var e=a[d],f="und",g=[];e.language&&(f=af(e.language));e.type=="variant"?g=e.audioRoles:g=e.roles;g&&g.length||(g=[""]);b.has(f)||b.set(f,new Set);g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,b.get(f).add(h),e.label&&(c.has(f)||c.set(f,new Map),c.get(f).set(h,e.label))}var k=[];b.forEach(function(l,m){l=r(l);for(var n=l.next();!n.done;n=l.next()){n=n.value;var q=null;c.has(m)&&c.get(m).has(n)&&(q=c.get(m).get(n));k.push({language:m,
role:n,label:q})}});return k}p.sa=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1};p.dd=function(){return!this.h||this.h.ended?!0:this.Ha&&!this.ba()&&this.h.currentTime>=this.Ua().end};K("shaka.Player",Z);Z.prototype.isEnded=Z.prototype.dd;Z.prototype.isRemotePlayback=Z.prototype.sa;Z.prototype.addFont=Z.prototype.addFont;Z.prototype.setVideoContainer=Z.prototype.ij;Z.prototype.getFetchedPlaybackInfo=Z.prototype.Th;Z.prototype.getManifestParserFactory=Z.prototype.Yh;
Z.prototype.getManifest=Z.prototype.kf;Z.prototype.retryStreaming=Z.prototype.Jf;Z.prototype.setMaxHardwareResolution=Z.prototype.gj;Z.prototype.addChaptersTrack=Z.prototype.sh;Z.prototype.addThumbnailsTrack=Z.prototype.wh;Z.prototype.addTextTrackAsync=Z.prototype.uh;Z.prototype.getStats=Z.prototype.getStats;Z.prototype.getBufferedInfo=Z.prototype.Xb;Z.prototype.getSegmentAvailabilityDuration=Z.prototype.Ud;Z.prototype.getPresentationStartTimeAsDate=Z.prototype.qg;
Z.prototype.getPlayheadTimeAsDate=Z.prototype.ci;Z.prototype.setTextTrackVisibility=Z.prototype.bh;Z.prototype.getChaptersAsync=Z.prototype.Oh;Z.prototype.getChapters=Z.prototype.Nh;Z.prototype.getChaptersTracks=Z.prototype.Ph;Z.prototype.isTextTrackVisible=Z.prototype.uf;Z.prototype.selectVariantsByLabel=Z.prototype.cj;Z.prototype.selectTextLanguage=Z.prototype.Wg;Z.prototype.selectAudioLanguage=Z.prototype.Vg;Z.prototype.getTextLanguages=Z.prototype.li;Z.prototype.getAudioLanguages=Z.prototype.Kh;
Z.prototype.getTextLanguagesAndRoles=Z.prototype.mi;Z.prototype.getAudioLanguagesAndRoles=Z.prototype.Lh;Z.prototype.getVideoTracks=Z.prototype.getVideoTracks;Z.prototype.selectVideoTrack=Z.prototype.dj;Z.prototype.getAudioTracks=Z.prototype.getAudioTracks;Z.prototype.selectAudioTrack=Z.prototype.bj;Z.prototype.selectVariantTrack=Z.prototype.qe;Z.prototype.selectTextTrack=Z.prototype.Mf;Z.prototype.getThumbnails=Z.prototype.pi;Z.prototype.getAllThumbnails=Z.prototype.Jh;
Z.prototype.getImageTracks=Z.prototype.Vh;Z.prototype.getTextTracks=Z.prototype.$b;Z.prototype.getVariantTracks=Z.prototype.Ob;Z.prototype.cancelTrickPlay=Z.prototype.Vc;Z.prototype.trickPlay=Z.prototype.nd;Z.prototype.useTrickPlayTrackIfAvailable=Z.prototype.Vf;Z.prototype.getPlaybackRate=Z.prototype.hb;Z.prototype.isBuffering=Z.prototype.wg;Z.prototype.getKeyStatuses=Z.prototype.Td;Z.prototype.getActiveSessionsMetadata=Z.prototype.gf;Z.prototype.getExpiration=Z.prototype.hf;
Z.prototype.drmInfo=Z.prototype.drmInfo;Z.prototype.keySystem=Z.prototype.keySystem;Z.prototype.isFullyLoaded=Z.prototype.Bi;Z.prototype.goToLive=Z.prototype.wi;Z.prototype.seekRange=Z.prototype.Ua;Z.prototype.isVideoOnly=Z.prototype.yg;Z.prototype.isAudioOnly=Z.prototype.Ai;Z.prototype.isInProgress=Z.prototype.Gc;Z.prototype.isLive=Z.prototype.ba;Z.prototype.getQueueManager=Z.prototype.ii;Z.prototype.getAdManager=Z.prototype.Ih;Z.prototype.getAssetUri=Z.prototype.Sd;
Z.prototype.getNetworkingEngine=Z.prototype.ai;Z.prototype.getMediaElement=Z.prototype.lf;Z.prototype.getManifestType=Z.prototype.og;Z.prototype.getLoadMode=Z.prototype.jf;Z.prototype.resetConfiguration=Z.prototype.Yi;Z.prototype.getBufferFullness=Z.prototype.mg;Z.prototype.getNonDefaultConfiguration=Z.prototype.bi;Z.prototype.getConfigurationForLowLatency=Z.prototype.Qh;Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.configurationForLowLatency=Z.prototype.Fh;
Z.prototype.configure=Z.prototype.configure;Z.prototype.releaseAllMutexes=Z.prototype.Xi;Z.prototype.destroyAllPreloads=Z.prototype.jg;Z.prototype.preload=Z.prototype.preload;Z.prototype.detachAndSavePreload=Z.prototype.kg;Z.prototype.unloadAndSavePreload=Z.prototype.lj;Z.prototype.load=Z.prototype.load;Z.prototype.updateStartTime=Z.prototype.oj;Z.prototype.unload=Z.prototype.od;Z.prototype.detach=Z.prototype.detach;Z.prototype.attachCanvas=Z.prototype.yh;Z.prototype.attach=Z.prototype.Kb;
Z.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return I(function(k){switch(k.h){case 1:b={};if(!a){k.u(2);break}return k.g(ck(),3);case 3:b=k.i;case 2:return c=Sc(),d=Eo(),e=qb(),k.g(e.Mb(),4);case 4:return f=k.i,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=Qv,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};
Z.isBrowserSupported=function(){window.Promise||Ya("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;qb();return Tc()?!0:Uc().canPlayType("application/x-mpegurl")!=""};Z.setQueueManagerFactory=function(a){ou=a};Z.setAdManagerFactory=function(a){nu=a};Z.registerSupportPlugin=function(a,b){Qv.set(a,b)};Z.prototype.destroy=Z.prototype.destroy;var uu=0,ku=1,ev=2,Yu=3;
Z.LoadMode={DESTROYED:uu,NOT_LOADED:ku,MEDIA_SOURCE:ev,SRC_EQUALS:Yu};Z.version="v4.16.37";var Rv=["4","16"];wb=new function(a){this.g=a;this.i=xb;this.h=yb}(new ub(Number(Rv[0]),Number(Rv[1])));var Qv=new Map,nu=null,ou=null;function Sv(){}function Tv(a,b){a={priority:b||0,callback:a};for(b=0;b<Uv.length;b++)if(Uv[b].priority<a.priority){Uv.splice(b,0,a);return}Uv.push(a)}K("shaka.polyfill",Sv);Sv.register=Tv;Sv.installAll=function(){for(var a=r(Uv),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Ya("Error installing polyfill!",c)}}};var Uv=[];function Vv(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}Vv.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};Vv.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function Wv(a){if(cc(a))return"cbcs";if(ac(a)||bc(a)||Zb(a)||a==="com.huawei.wiseplay")return"cenc";Ya("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Xv(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 Yv(a,b){return!a||a==b||(a=="cbcs"||a=="cbcs-1-9")&&qb().uc()?!0:!1};function Zv(){}var $v;function aw(){qb().ve()&&!$v&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&($v=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=bw,navigator.emeEncryptionSchemePolyfilled=!0)}
function bw(a,b){var c=this,d,e;return I(function(f){if(f.h==1)return f.g($v.call(c,a,b),2);d=f.i;if(e=Xv(d))return navigator.requestMediaKeySystemAccess=$v,f.return(d);navigator.requestMediaKeySystemAccess=cw;return f.return(cw.call(c,a,b))})}
function cw(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,u,t;return I(function(v){if(v.h==1){d=Wv(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=dw(h.videoCapabilities,d),l=dw(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.g($v.call(c,a,e),2)}q=v.i;t=u=null;e[0]&&(e[0].videoCapabilities&&(u=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(t=e[0].audioCapabilities[0].encryptionScheme));return v.return(new Vv(q,u,t))})}function dw(a,b){return a?a.filter(function(c){return Yv(c.encryptionScheme,b)}):a}Sv.EmeEncryptionScheme=Zv;Zv.install=aw;Tv(aw);function ew(){}var fw;function gw(){qb().ve()&&!fw&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(fw=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=hw,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
function hw(a){var b=this,c,d,e;return I(function(f){switch(f.h){case 1:return f.g(fw.call(b,a),2);case 2:c=f.i;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=Xv(d))return navigator.mediaCapabilities.decodingInfo=fw,f.return(c);navigator.mediaCapabilities.decodingInfo=iw;if(d){f.u(3);break}return f.g(jw(a),4);case 4:return c.keySystemAccess=f.i,f.return(c);case 3:return f.return(iw.call(b,a))}})}
function iw(a){var b=this,c,d,e,f,g,h,k;return I(function(l){switch(l.h){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=Wv(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},Yv(d,g)&&Yv(c,g))?l.g(fw.call(b,a),2):l.return(h);case 2:k=l.i;if(k.keySystemAccess){k.keySystemAccess=new Vv(k.keySystemAccess,c,d);l.u(3);break}if(!a.keySystemConfiguration){l.u(3);
break}return l.g(jw(a),5);case 5:k.keySystemAccess=l.i;case 3:return l.return(k)}})}
function jw(a){var b,c;return I(function(d){if(d.h==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.g(navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.i;return d.return(c)})}Sv.MCapEncryptionScheme=ew;ew.install=gw;Tv(gw,-2);function kw(){}function lw(){qb().Hb()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),kw.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=mw)}
function mw(a){var b,c,d,e,f,g,h,k,l,m,n;return I(function(q){switch(q.h){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};qb();c=a.video;d=a.audio;if(a.type!="media-source"){if(a.type=="file"){if(c&&(e=c.contentType,f=Uc().canPlayType(e)!="",!f)||d&&(g=d.contentType,h=Uc().canPlayType(g)!="",!h))return q.return(b)}else return q.return(b);q.u(2);break}if(!Tc())return q.return(b);if(!c){q.u(3);break}return q.g(nw(c),4);case 4:if(k=q.i,!k)return q.return(b);case 3:if(!d){q.u(2);
break}return q.g(ow(d),6);case 6:if(l=q.i,!l)return q.return(b);case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return q.g(pw(c,d,m),8);case 8:if(n=q.i)b.supported=!0,b.keySystemAccess=n;case 7:return q.return(b)}})}function nw(a){var b,c,d;return I(function(e){return e.h==1?(b=qb(),c=b.Ma(),c!=="CAST"?e.u(2):e.g(qw(a),3)):e.h!=2?(d=e.i,e.return(d)):e.return($k(a.contentType))})}
function ow(a){var b,c,d,e,f;return I(function(g){switch(g.h){case 1:b=qb();c=b.Ma();d=a.contentType;if(c!=="CAST"||!a.spatialRendering){g.u(2);break}d+="; spatialRendering=true";if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)){g.u(2);break}e=!1;f=rw;if(f.has(d)){e=f.get(d);g.u(4);break}return g.g(cast.__platform__.canDisplayType(d),5);case 5:e=g.i,f.set(d,e);case 4:return g.return(e);case 2:return g.return($k(d))}})}
function pw(a,b,c){var d,e,f,g,h,k,l,m,n,q,u,t;return I(function(v){switch(v.h){case 1:d=[];e=[];f=[];c.audio&&(g={robustness:c.audio.robustness||"",contentType:b.contentType},qb().Gg()&&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=De(l)+";"+Ce(l);q=De(m)+";"+Ce(m);u=c.keySystem;t=null;v.m(2);var w=dc(n,q,u,f);if(fc.has(w)){w=dc(n,q,u,f);t=fc.get(w)||null;v.u(4);break}return v.g(navigator.requestMediaKeySystemAccess(c.keySystem,
[k]),5);case 5:w=t=v.i;var x=dc(n,q,u,f);fc.set(x,w);case 4:v.o(3);break;case 2:v.l();case 3:return v.return(t)}})}
function qw(a){var b,c,d,e,f;return I(function(g){if(g.h==1){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return($k(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=rw;return f.has(b)?(e=f.get(b),g.u(2)):g.g(cast.__platform__.canDisplayType(b),3)}g.h!=2&&(e=g.i,f.set(b,e));return g.return(e)})}Sv.MediaCapabilities=kw;kw.install=lw;kw.originalMcap=null;var rw=new Map;Tv(lw,-1);function sw(){}function tw(){var a=qb(),b=a.Aa()==="WEBKIT"?a.ra():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(b<=12?(uw(),vw()):b<=15&&uw());a=r(a.Pg());for(b=a.next();!b.done;b=a.next())ww(b.value);(window.MediaSource||window.ManagedMediaSource)&&xw();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&yw()}
function uw(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function vw(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function xw(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return ze(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return ze(c)!="mp2t"&&b(c)}}}
function ww(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return Ce(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return Ce(d)!=a&&c(d)}}}
function yw(){var a=MediaSource.isTypeSupported;qb().ih()&&(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)})}Sv.MediaSource=sw;sw.install=tw;Tv(tw);function zw(){}var Aw,Bw,Cw,Dw,Ew,Fw;
function Gw(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=Hw){if(a===void 0?0:a)Aw=!0,Bw=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Cw=HTMLMediaElement.prototype.setMediaKeys,Dw=window.MediaKeys,Ew=window.MediaKeySystemAccess,Fw=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Iw;window.MediaKeys=Jw;window.MediaKeySystemAccess=
Kw;navigator.requestMediaKeySystemAccess=Lw;window.shakaMediaKeysPolyfill=Hw;wf.clear();fc.clear()}}function Lw(a,b){try{var c=new Kw(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Iw(a){var b=this.mediaKeys;b&&b!=a&&Mw(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Mw(a,this):Promise.resolve()}
function Nw(a){a=Q(a.initData);if(Ub(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=kc(a.subarray(4),!0);a=nc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Rb(a);this.dispatchEvent(b)}Sv.PatchedMediaKeysApple=zw;
zw.uninstall=function(){window.shakaMediaKeysPolyfill==Hw&&Aw&&(Aw=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Bw),HTMLMediaElement.prototype.setMediaKeys=Cw,window.MediaKeys=Dw,window.MediaKeySystemAccess=Ew,navigator.requestMediaKeySystemAccess=Fw,Bw=Fw=Cw=Ew=Dw=null,window.shakaMediaKeysPolyfill="",wf.clear(),fc.clear())};zw.install=Gw;
function Kw(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if(c.persistentState=="required")b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=r(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
Kw.prototype.createMediaKeys=function(){var a=new Jw(this.keySystem);return Promise.resolve(a)};Kw.prototype.getConfiguration=function(){return this.g};function Jw(a){this.h=new WebKitMediaKeys(a);this.g=new jb}Jw.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary")throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ow(this.h,a)};Jw.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function Mw(a,b){a.g.bb();if(!b)return Promise.resolve();a.g.H(b,"webkitneedkey",Nw);try{return vp(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Jw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Ow(a){Zi.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new jb;this.sessionId="";this.expiration=NaN;this.closed=new Ri;this.keyStatuses=new Pw;this.onkeystatuseschange=null}
pa(Ow,Zi);p=Ow.prototype;
p.generateRequest=function(a,b){var c=this;this.h=new Ri;try{var d=this.l.createSession("video/mp4",Q(b));this.i=d;this.sessionId=d.sessionId||"";this.j.H(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",c.keyStatuses.Bb()==void 0?"license-request":"license-renewal").set("message",Rb(e.message));e=new Yi("message",e);c.dispatchEvent(e)});this.j.H(d,"webkitkeyadded",function(){c.g&&(Qw(c,"usable"),c.g.resolve(),c.g=null)});this.j.H(d,"webkitkeyerror",
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(c.h!=null)c.h.reject(e),c.h=null;else if(c.g!=null)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Qw(c,"output-not-allowed");break;default:Qw(c,"internal-error")}});Qw(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
p.update=function(a){this.g=new Ri;try{this.i.update(Q(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.bb()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
function Qw(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new Yi("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}function Pw(){this.size=0;this.g=void 0}p=Pw.prototype;p.Bb=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,ec.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=ec.value();return this.g&&Qb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var Hw="apple";
Tv(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||Gw())});function Rw(){}function Sw(){if(window.MediaKeys){var a=qb();MediaKeys.prototype.setServerCertificate&&a.md()||(MediaKeys.prototype.setServerCertificate=Tw)}}function Tw(){return Promise.resolve(!1)}Sv.PatchedMediaKeysCert=Rw;Rw.install=Sw;Tv(Sw);function Uw(){}
function Vw(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Ww="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Xw;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Yw;window.MediaKeys=Zw;window.MediaKeySystemAccess=$w;window.shakaMediaKeysPolyfill=ax}}
function bx(a){var b=Ww;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Xw(a,b){try{var c=new $w(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Yw(a){var b=this.mediaKeys;b&&b!=a&&cx(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&cx(a,this);return Promise.resolve()}Sv.PatchedMediaKeysWebkit=Uw;Uw.install=Vw;
function $w(a,b){this.g=this.keySystem=a;var c=!1;a=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=r(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));f.persistentState=="required"&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if(a=="org.w3.clearkey"||a=="com.widevine.alpha")c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}$w.prototype.createMediaKeys=function(){var a=new Zw(this.g);return Promise.resolve(a)};$w.prototype.getConfiguration=function(){return this.h};function Zw(a){this.l=a;this.h=null;this.g=new jb;this.i=[];this.j=new Map}
function cx(a,b){a.h=b;a.g.bb();var c=Ww;b&&(a.g.H(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Rb(d.initData);a.h.dispatchEvent(e)}),a.g.H(b,c+"keymessage",function(d){var e=dx(a,d.sessionId);e&&(d=(new Map).set("messageType",e.keyStatuses.Bb()==void 0?"licenserequest":"licenserenewal").set("message",d.message),d=new Yi("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.H(b,c+"keyadded",function(d){(d=dx(a,d.sessionId))&&d.ready()}),
a.g.H(b,c+"keyerror",function(d){var e=dx(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(d.systemCode==45&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?ex(e,"output-restricted"):f==1?ex(e,"expired"):ex(e,"internal-error"))}}))}
Zw.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary"&&a!="persistent-license")throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new fx(b,this.l,a);this.i.push(a);return a};Zw.prototype.setServerCertificate=function(){return Promise.resolve(!1)};Zw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function dx(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function fx(a,b,c){Zi.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Ri;this.keyStatuses=new gx;this.onkeystatuseschange=null}pa(fx,Zi);p=fx.prototype;p.ready=function(){ex(this,"usable");this.g&&this.g.resolve();this.g=null};
function hx(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if(a.l=="persistent-license")if(c)var d=Q(nc("LOAD_SESSION|"+c));else{var e=nc("PERSISTENT|");d=yc(e,b)}else d=Q(b)}catch(g){return Promise.reject(g)}a.h=new Ri;var f=bx("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if(g.name!="InvalidStateError")return a.h=null,Promise.reject(g);(new Se(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).ma(.01)}return a.h}
function ix(a,b,c){if(a.g)a.g.then(function(){return ix(a,b,c)}).catch(function(){return ix(a,b,c)});else{a.g=b;if(a.i=="webkit-org.w3.clearkey"){var d=jc(c);var e=JSON.parse(d);e.keys[0].kty!="oct"&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=vc(e.keys[0].k);e=vc(e.keys[0].kid)}else d=Q(c),e=null;var f=bx("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function ex(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new Yi("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}p.generateRequest=function(a,b){return hx(this,b,null)};p.load=function(a){return this.l=="persistent-license"?hx(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Ri;ix(this,b,a);return b};
p.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=bx("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function gx(){this.size=0;this.g=void 0}p=gx.prototype;p.Bb=function(){return this.g};
p.forEach=function(a){this.g&&a(this.g,ec.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=ec.value();return this.g&&Qb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var Ww="",ax="webkit";Tv(Vw);function jx(){}function kx(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=lx))}function lx(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Sv.RandomUUID=jx;jx.install=kx;Tv(kx);function mx(){}function nx(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:ox})}function ox(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Sv.Symbol=mx;mx.install=nx;Tv(nx);function px(){}function qx(){for(var a=r([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)}}Sv.TypedArray=px;px.install=qx;Tv(qx);function rx(){}function sx(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Sv.VideoPlayPromise=rx;rx.install=sx;Tv(sx);function tx(){}function ux(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||typeof Uc().webkitDroppedFrameCount==="number")&&(a.getVideoPlaybackQuality=vx)}}function vx(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Sv.VideoPlaybackQuality=tx;tx.install=ux;Tv(ux);function wx(){}function xx(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(b==3)a=yx;else if(b==6)a=zx;else{try{var c=!!yx(1,2,"")}catch(d){c=!1}c&&(a=yx)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function yx(a,b,c){return new window.TextTrackCue(a,b,c)}function zx(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Sv.VTTCue=wx;wx.install=xx;Tv(xx);function Ax(){this.g="UNKNOWN"}Ax.prototype.parseInit=function(){};Ax.prototype.setSequenceMode=function(){};Ax.prototype.setManifestType=function(a){this.g=a};
Ax.prototype.parseMedia=function(a,b,c,d){var e=jc(a);a=[];if(e=="")return a;var f=td(e,"tt",!0);if(!f)throw new R(2,2,2005,"Failed to parse TTML.");e=Ad(f,"body")[0];if(!e)return[];var g=Cd(f,Bx,"frameRate"),h=Cd(f,Bx,"subFrameRate"),k=Cd(f,Bx,"frameRateMultiplier"),l=Cd(f,Bx,"tickRate"),m=Cd(f,Bx,"cellResolution"),n=f.attributes["xml:space"]||"default",q=Cd(f,Cx,"extent");if(n!="default"&&n!="preserve")throw new R(2,2,2005,"Invalid xml:space value: "+n);n=n=="default";g=new Dx(g,h,k,l);m=Ex(m);
h=Ad(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return v!="\n"});k=Ad(f,"style");f=Ad(f,"region");l=[];for(var u=r(f),t=u.next();!t.done;t=u.next())(t=Fx(this,t.value,k,q))&&l.push(t);if(yd(e,"p").length)throw new R(2,2,2001,"<p> can only be inside <div> in TTML");q=r(yd(e,"div"));for(u=q.next();!u.done;u=q.next())if(yd(u.value,"span").length)throw new R(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Gx(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 Gx(a,b,c,d,e,f,g,h,k,l,m,n,q,u){var t=m;if(xd(b)){if(!n)return null;var v={tagName:"span",children:[zd(b)],attributes:{},parent:null}}else v=b;for(var w=null,x=r(Hx),y=x.next();!y.done&&!(w=Ix(v,"backgroundImage",e,"#",y.value)[0]);y=x.next());x=null;y=Cd(v,Hx,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&z.test(y)){x=parseInt(y.split(":").pop(),10)-1;if(x>=u.length)return null;x=u[x]}else q&&y&&!y.startsWith("#")&&(z=new Ab(q),y=new Ab(y),(y=z.resolve(y).toString())&&
(x=y));if(b.tagName=="p"||w||x)n=!0;b=n;y=(v.attributes["xml:space"]||(k?"default":"preserve"))=="default";z=v.children.every(xd);k=[];if(!z)for(var B=r(v.children),H=B.next();!H.done;H=B.next())(H=Gx(a,H.value,c,d,e,f,g,h,y,l,v,n,q,u))&&k.push(H);e=m!=null;q=zd(v);q=v.children.length&&q&&/\S/.test(q);B=v.attributes.begin||v.attributes.end||v.attributes.dur;if(!(B||q||v.tagName=="br"||k.length!=0||e&&!y))return null;u=Jx(v,d);q=u.start;for(u=u.end;t&&t.tagName&&t.tagName!="tt";)u=Kx(t,d,q,u),q=u.start,
u=u.end,t=t.parent;q==null&&(q=0);q+=c.periodStart;u=u==null?Infinity:u+c.periodStart;a.g!=="HLS"&&(q=Math.max(q,c.segmentStart),u=Math.min(u,c.segmentEnd));if(!B&&k.length>0)for(q=Infinity,u=0,c=r(k),d=c.next();!d.done;d=c.next())d=d.value,q=Math.min(q,d.startTime),u=Math.max(u,d.endTime);if(v.tagName=="br")return a=new Ed(q,u,""),a.lineBreak=!0,a;c="";z&&(c=qc(zd(v)||""),y&&(c=c.replace(/\s+/g," ")));c=new Ed(q,u,c);c.nestedCues=k;n||(c.isContainer=!0);l&&(c.cellResolution=l);l=Ix(v,"region",g,
"")[0];if(v.attributes.region&&l&&l.attributes["xml:id"]){var E=l.attributes["xml:id"];c.region=h.filter(function(C){return C.id==E})[0]}h=l;m&&e&&!v.attributes.region&&!v.attributes.style&&(h=Ix(m,"region",g,"")[0]);Lx(a,c,v,h,w,x,f,b,k.length==0);return c}
function Fx(a,b,c,d){var e=new dd,f=b.attributes["xml:id"];if(!f)return null;e.id=f;f=null;d&&(f=Mx.exec(d)||Nx.exec(d));d=f?Number(f[1]):null;f=f?Number(f[2]):null;var g,h=Ox(a,b,c,"extent");if(h){var k=(g=Mx.exec(h))||Nx.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?ed:0,e.heightUnits=g||f!=null?ed:0)}if(a=Ox(a,b,c,"origin"))if(k=(g=Mx.exec(a))||Nx.exec(a),k!=null)e.viewportAnchorX=Number(k[1]),
e.viewportAnchorY=Number(k[2]),g?h||(e.width=100-e.viewportAnchorX,e.widthUnits=ed,e.height=100-e.viewportAnchorY,e.heightUnits=ed):(f!=null&&(e.viewportAnchorY=e.viewportAnchorY*100/f),d!=null&&(e.viewportAnchorX=e.viewportAnchorX*100/d)),e.viewportAnchorUnits=g||d!=null?ed:0;return e}function Px(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 Lx(a,b,c,d,e,f,g,h,k){h=h||k;Qx(a,c,d,g,"direction",h)=="rtl"&&(b.direction="rtl");k=Qx(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=Kd);(k=Qx(a,c,d,g,"textAlign",!0))?(b.positionAlign=Rx.get(k),b.lineAlign=Sx.get(k),b.textAlign=de[k.toUpperCase()]):b.textAlign=Jd;if(k=Qx(a,c,d,g,"displayAlign",!0))b.displayAlign=ee[k.toUpperCase()];if(k=Qx(a,c,d,g,"color",h))b.color=Px(k);
if(k=Qx(a,c,d,g,"backgroundColor",h))b.backgroundColor=Px(k);if(k=Qx(a,c,d,g,"border",h))b.border=k;if(k=Qx(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=Qx(a,c,d,g,"fontWeight",h))&&k=="bold"&&(b.fontWeight=ae);k=Qx(a,c,d,g,"wrapOption",h);b.wrapLine=k&&k=="noWrap"?!1:!0;(k=Qx(a,c,d,g,"lineHeight",h))&&k.match(Tx)&&(b.lineHeight=k);(k=Qx(a,c,d,g,"fontSize",h))&&(k.match(Tx)||k.match(Ux))&&(b.fontSize=k);if(k=Qx(a,c,d,g,"fontStyle",h))b.fontStyle=ge[k.toUpperCase()];e?(f=e.attributes.imageType||e.attributes.imagetype,k=e.attributes.encoding,e=zd(e).trim(),f=="PNG"&&k=="Base64"&&e&&
(b.backgroundImage="data:image/png;base64,"+e)):f&&(b.backgroundImage=f);if(e=Qx(a,c,d,g,"textOutline",h))e=e.split(" "),e[0].match(Tx)?b.textStrokeColor=b.color:(b.textStrokeColor=Px(e[0]),e.shift()),e[0]&&e[0].match(Tx)?b.textStrokeWidth=e[0]:b.textStrokeColor="";(e=Qx(a,c,d,g,"letterSpacing",h))&&e.match(Tx)&&(b.letterSpacing=e);(e=Qx(a,c,d,g,"linePadding",h))&&e.match(Tx)&&(b.linePadding=e);if(e=Qx(a,c,d,g,"opacity",h))b.opacity=parseFloat(e);(e=Ox(a,d,g,"textDecoration"))&&Vx(b,e);(e=Wx(a,c,
g,"textDecoration"))&&Vx(b,e);if(e=Qx(a,c,d,g,"textCombine",h))b.textCombineUpright=e;switch(Qx(a,c,d,g,"ruby",h)){case "container":b.rubyTag="ruby";break;case "text":b.rubyTag="rt"}}
function Vx(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(ce)||a.textDecoration.push(ce);break;case "noUnderline":a.textDecoration.includes(ce)&&eb(a.textDecoration,ce);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&eb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function Qx(a,b,c,d,e,f){f=f===void 0?!0:f;return(b=Wx(a,b,d,e))?b:f?Ox(a,c,d,e):null}function Ox(a,b,c,d){if(!b)return null;var e=Cd(b,Cx,d);return e?e:Xx(a,b,c,d)}function Wx(a,b,c,d){var e=Cd(b,Cx,d);return e?e:Xx(a,b,c,d)}
function Xx(a,b,c,d){b=Ix(b,"style",c,"");for(var e=null,f=0;f<b.length;f++){var g=Bd(b[f],"urn:ebu:tt:style",d);g||(g=Cd(b[f],Cx,d));g||(g=Wx(a,b[f],c,d));g&&(e=g)}return e}function Ix(a,b,c,d,e){var f=[];if(!a||c.length<1)return f;var g=a;for(a=null;!a&&!(a=e?Bd(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
function Kx(a,b,c,d){a=Jx(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 Jx(a,b){var c=Yx(a.attributes.begin,b),d=Yx(a.attributes.end,b);a=Yx(a.attributes.dur,b);d==null&&a!=null&&(d=c+a);return{start:c,end:d}}
function Yx(a,b){var c=null;if(Zx.test(a)){a=Zx.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+d*60+c*3600}else if($x.test(a))c=ay($x,a);else if(by.test(a))c=ay(by,a);else if(cy.test(a))a=cy.exec(a),c=Number(a[1])/b.frameRate;else if(dy.test(a))a=dy.exec(a),c=Number(a[1])/b.g;else if(ey.test(a))c=ay(ey,a);else if(a)throw new R(2,2,2001,"Could not parse cue time range in TTML");return c}
function ay(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 Ex(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}K("shaka.text.TtmlTextParser",Ax);Ax.prototype.parseMedia=Ax.prototype.parseMedia;Ax.prototype.setManifestType=Ax.prototype.setManifestType;Ax.prototype.setSequenceMode=Ax.prototype.setSequenceMode;Ax.prototype.parseInit=Ax.prototype.parseInit;
function Dx(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);this.g==0&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var Mx=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Ux=/^(\d{1,4}(?:\.\d+)?|100)%$/,Tx=/^(\d+px|\d+em|\d*\.?\d+c)$/,Nx=/^(\d+)px (\d+)px$/,Zx=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,$x=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,by=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,cy=/^(\d*(?:\.\d*)?)f$/,dy=/^(\d*(?:\.\d*)?)t$/,ey=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Sx=(new Map).set("left",Nd).set("center","center").set("right",
"end").set("start",Nd).set("end","end"),Rx=(new Map).set("left","line-left").set("center","center").set("right","line-right").set("start","line-left").set("end","line-right"),Bx=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Cx=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Hx=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];He("application/ttml+xml",function(){return new Ax});function fy(){this.g=new Ax}fy.prototype.parseInit=function(a){var b=!1;(new $g).boxes(["moov","trak","mdia","minf","stbl"],eh).ea("stsd",gh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new R(2,2,2007);};fy.prototype.setSequenceMode=function(a){this.g.setSequenceMode(a)};fy.prototype.setManifestType=function(a){this.g.setManifestType(a)};
fy.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new $g).boxes(["moof","traf"],eh).ea("tfhd",function(x){e=kh(x.reader,x.flags).Yc}).ea("trun",function(x){x=nh(x.reader,x.version,x.flags);x=r(x.Kf);for(var y=x.next();!y.done;y=x.next())h.push(y.value.sampleSize||e||0)}).ea("subs",function(x){for(var y=x.reader,z=y.S(),B=-1,H=0;H<z;H++){var E=y.S();B+=E;E=y.ua();for(var C=[],A=0;A<E;A++)x.version==1?C.push(y.S()):C.push(y.ua()),y.T(),y.T(),y.S();g.set(B,C)}}).box("mdat",
jh(function(x){f.push(x)},!1)).parse(a,!1);if(f.length==0)throw new R(2,2,2007);a=yc.apply(rc,G(f));for(var k=0,l=0;l<h.length;l++){var m=Q(a,k,h[l]);k+=h[l];var n=g.get(l);if(n&&n.length){for(var q=Q(m,0,n[0]),u=[],t=n[0],v=1;v<n.length;v++){var w=Q(m,t,n[v]);w=tc(w);u.push("data:image/png;base64,"+w);t+=n[v]}d=d.concat(this.g.parseMedia(q,b,c,u))}else d=d.concat(this.g.parseMedia(m,b,c,[]))}return d};K("shaka.text.Mp4TtmlParser",fy);fy.prototype.parseMedia=fy.prototype.parseMedia;
fy.prototype.setManifestType=fy.prototype.setManifestType;fy.prototype.setSequenceMode=fy.prototype.setSequenceMode;fy.prototype.parseInit=fy.prototype.parseInit;He('application/mp4; codecs="stpp"',function(){return new fy});He('application/mp4; codecs="stpp.ttml"',function(){return new fy});He('application/mp4; codecs="stpp.ttml.im1i"',function(){return new fy});He('application/mp4; codecs="stpp.ttml.im1t"',function(){return new fy});He('application/mp4; codecs="stpp.ttml.im2i"',function(){return new fy});
He('application/mp4; codecs="stpp.ttml.im2t"',function(){return new fy});He('application/mp4; codecs="stpp.ttml.etd1"',function(){return new fy});He('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new fy});He('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new fy});He('application/mp4; codecs="stpp.TTML.im1t"',function(){return new fy});function gy(){this.g="UNKNOWN"}gy.prototype.parseInit=function(){};gy.prototype.setSequenceMode=function(){};gy.prototype.setManifestType=function(a){this.g=a};
gy.prototype.parseMedia=function(a,b){a=jc(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 R(2,2,2E3);a=b.vttOffset;if(this.g=="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 R(2,2,2E3);d=(d=d[1])?nd(new jd(d)):null;if(d==null)throw new R(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=r(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new jd(e);var f=new dd;md(e);kd(e);for(var g=md(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");kd(e);g=md(e)}b.push(f)}d=new Map;Ud(d);e=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((f.length!=1||f[0])&&!hy.test(f[0])&&f[0]=="STYLE"){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),g!=-1&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Ed(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var u=q[2].trim().replace(";","");switch(q[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=ae;break;case "font-style":switch(u){case "normal":m=!0;l.fontStyle=Qd;break;case "italic":m=!0;l.fontStyle=be;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(g,l)}}l=f;n=a;if(l.length==1&&!l[0]||hy.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")f=null;else if(f=null,m=
0,l[0].includes("--\x3e")||(f=l[0],m=1),h=new jd(l[m]),g=nd(h),q=ld(h,/[ \t]+--\x3e[ \t]+/g),k=nd(h),g==null||q==null||k==null)Ya("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=n;k+=n;g<0&&(g=0);n="";for(q=m+1;q<l.length;q++)q>m+1&&(n+="\n"),n+=l[q];n=n.trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=n):l=new Ed(g,k,n);kd(h);for(g=md(h);g;)iy(l,g,b),kd(h),g=md(h);Td(l,d);f!=null&&(l.id=f);f=l}f&&e.push(f)}return e};
function iy(a,b,c){var d;if(d=jy.exec(b))b=d[1],b=="middle"?a.textAlign=Jd:a.textAlign=de[b.toUpperCase()];else if(d=ky.exec(b))a.writingMode=d[1]=="lr"?"vertical-lr":"vertical-rl";else if(d=ly.exec(b))a.size=Number(d[1]);else if(d=my.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":Fd);else if(d=ny.exec(b)){if(b=oy(c,d[1]))a.region=b}else if(c=py.exec(b))a.lineInterpretation=
1,a.line=Number(c[1]),c[2]&&(a.lineAlign=fe[c[2].toUpperCase()]);else if(c=qy.exec(b))a.lineInterpretation=Md,a.line=Number(c[1]),c[2]&&(a.lineAlign=fe[c[2].toUpperCase()])}function oy(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}K("shaka.text.VttTextParser",gy);gy.prototype.parseMedia=gy.prototype.parseMedia;gy.prototype.setManifestType=gy.prototype.setManifestType;gy.prototype.setSequenceMode=gy.prototype.setSequenceMode;gy.prototype.parseInit=gy.prototype.parseInit;
var hy=/^NOTE($|[ \t])/,jy=/^align:(start|middle|center|end|left|right)$/,ky=/^vertical:(lr|rl)$/,ly=/^size:([\d.]+)%$/,my=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/,ny=/^region:(.*)$/,py=/^line:([\d.]+)%(?:,(start|end|center))?$/,qy=/^line:(-?\d+)(?:,(start|end|center))?$/;He("text/vtt",function(){return new gy});He('text/vtt; codecs="vtt"',function(){return new gy});He('text/vtt; codecs="wvtt"',function(){return new gy});function ry(){this.g=null}ry.prototype.parseInit=function(a){var b=this,c=!1;(new $g).boxes(["moov","trak","mdia","minf","stbl"],eh).ea("mdhd",function(d){d=mh(d.reader,d.version);b.g=d.timescale}).ea("stsd",gh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new R(2,2,2008);if(!c)throw new R(2,2,2008);};ry.prototype.setSequenceMode=function(){};ry.prototype.setManifestType=function(){};
ry.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new R(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new $g).boxes(["moof","traf"],eh).ea("tfdt",function(z){g=!0;c=lh(z.reader,z.version).baseMediaDecodeTime}).ea("tfhd",function(z){l=kh(z.reader,z.flags).Xc}).ea("trun",function(z){h=!0;d=nh(z.reader,z.version,z.flags).Kf}).box("mdat",jh(function(z){k=!0;e=z},!1)).parse(a,!1);if(!k&&!g&&!h)throw new R(2,2,2008);a=c;for(var m=new Rg(e,0),n=r(d),q=n.next();!q.done;q=
n.next()){q=q.value;var u=q.Lf||l,t=q.pe?c+q.pe:a;a=t+(u||0);var v=0;do{var w=m.S();v+=w;var x=m.S(),y=null;dh(x)=="vttc"?w>8&&(y=m.sb(w-8,!1)):m.skip(w-8);u&&y&&(w=sy(y,b.periodStart+t/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(Xe)};function sy(a,b,c){var d,e,f;(new $g).box("payl",jh(function(g){d=jc(g)},!1)).box("iden",jh(function(g){e=jc(g)},!1)).box("sttg",jh(function(g){f=jc(g)},!1)).parse(a);return d?ty(d,e,f,b,c):null}
function ty(a,b,c,d,e){a=new Ed(d,e,a);Td(a);b&&(a.id=b);if(c)for(b=new jd(c),c=md(b);c;)iy(a,c,[]),kd(b),c=md(b);return a}K("shaka.text.Mp4VttParser",ry);ry.prototype.parseMedia=ry.prototype.parseMedia;ry.prototype.setManifestType=ry.prototype.setManifestType;ry.prototype.setSequenceMode=ry.prototype.setSequenceMode;ry.prototype.parseInit=ry.prototype.parseInit;He('application/mp4; codecs="wvtt"',function(){return new ry});function uy(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)?{cd:c,aa:a}:null}function vy(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 wy(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 xy(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};var yy=Object.freeze({rf:0,$d:0,Xd:0,Nd:0,Od:2,tf:0}),zy=Object.freeze({rf:0,$d:0,Xd:0,Nd:0,Od:2,tf:0}),Ay=Object.freeze({rf:0,$d:0,Xd:0,Nd:0,Od:1,tf:1});function By(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=By.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/aac"?$k(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(Ee(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Q(a),f=Qh(e),g=f.length;g<e.length&&!wy(e,g);g++);a=c.endTime*1E3;f=Ph(f);f.length&&c&&(f=f.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(a=f.data);f=vy(e,g);if(!f)return Promise.reject(new R(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=uy(e,g);if(!k)return Promise.reject(new R(2,3,3018,c?c.N()[0]:null));var l=k.cd+k.aa;g+l<=e.length&&h.push({data:e.subarray(g+
k.cd,g+l),size:k.aa,duration:1024,$a:0,flags:yy});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,timescale:e,duration:d,mb:[],qa:new Uint8Array([]),Ja:new Uint8Array([]),Pa:0,Qa:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,cb:h},stream:b};d=new sn([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=tn(d),this.g.set(c,b));c=this.i!==b;d=Qn(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};K("shaka.transmuxer.AacTransmuxer",By);
By.prototype.transmux=By.prototype.transmux;By.prototype.getOriginalMimeType=By.prototype.getOriginalMimeType;By.prototype.convertCodecs=By.prototype.convertCodecs;By.prototype.isSupported=By.prototype.isSupported;By.prototype.destroy=By.prototype.destroy;ie("audio/aac",function(){return new By("audio/aac")},oe);function Cy(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.qa=a;c.aa=f;return!0}
function Dy(a,b){if(a[b]===11&&a[b+1]===119){var c=0,d=5;b+=d;for(var e,f;d>0;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(c<16)return!0}return!1};function Ey(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=Ey.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ac3"?$k(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ac3"?qb().kd()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){a=Q(a);for(var e=Qh(a),f=e.length;f<a.length&&!Dy(a,f);f++);var g=c.endTime*1E3;e=Ph(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[],l={sampleRate:0,channelCount:0,qa:new Uint8Array(0),aa:0};f<a.length;){if(!Cy(a,f,l))return Promise.reject(new R(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.qa;
k.push({data:a.subarray(f,f+l.aa),size:l.aa,duration:1536,$a:0,flags:yy});f+=l.aa}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",timescale:e,duration:d,mb:[],qa:h,Ja:new Uint8Array([]),Pa:0,Qa:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,cb:k},stream:b};d=new sn([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=tn(d),this.g.set(c,b));c=this.i!==b;d=Qn(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};K("shaka.transmuxer.Ac3Transmuxer",Ey);
Ey.prototype.transmux=Ey.prototype.transmux;Ey.prototype.getOriginalMimeType=Ey.prototype.getOriginalMimeType;Ey.prototype.convertCodecs=Ey.prototype.convertCodecs;Ey.prototype.isSupported=Ey.prototype.isSupported;Ey.prototype.destroy=Ey.prototype.destroy;ie("audio/ac3",function(){return new Ey("audio/ac3")},oe);function Fy(a,b,c){if(b+8>a.length||(a[b]<<8|a[b+1]<<0)!==2935)return!1;var d=new Ah(a.subarray(b+2));Ch(d,2);Ch(d,3);var e=Dh(d,11)+1<<1,f=Dh(d,2);if(f==3){f=Dh(d,2);f=[24E3,22060,16E3][f];var g=3}else f=[48E3,44100,32E3][f],g=Dh(d,2);var h=Dh(d,3),k=Dh(d,1);d=Dh(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.qa=a;c.aa=e;return!0};function Gy(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=Gy.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ec3"?$k(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){a=Q(a);for(var e=Qh(a),f=e.length;f<a.length&&(a[f]<<8|a[f+1]<<0)!==2935;f++);var g=c.endTime*1E3;e=Ph(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[],l={sampleRate:0,channelCount:0,qa:new Uint8Array(0),aa:0};f<a.length;){if(!Fy(a,f,l))return Promise.reject(new R(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;
h=l.qa;k.push({data:a.subarray(f,f+l.aa),size:l.aa,duration:1536,$a:0,flags:yy});f+=l.aa}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",timescale:e,duration:d,mb:[],qa:h,Ja:new Uint8Array([]),Pa:0,Qa:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,cb:k},stream:b};d=new sn([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=tn(d),this.g.set(c,b));c=this.i!==b;d=Qn(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};K("shaka.transmuxer.Ec3Transmuxer",Gy);
Gy.prototype.transmux=Gy.prototype.transmux;Gy.prototype.getOriginalMimeType=Gy.prototype.getOriginalMimeType;Gy.prototype.convertCodecs=Gy.prototype.convertCodecs;Gy.prototype.isSupported=Gy.prototype.isSupported;Gy.prototype.destroy=Gy.prototype.destroy;ie("audio/ec3",function(){return new Gy("audio/ec3")},oe);function Hy(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 Ah(b.data),d=Hh(c);Hh(c);Hh(c);Fh(c);if(Iy.includes(d)&&(d=T(c),d===3&&Ch(c,1),Fh(c),Fh(c),Ch(c,1),V(c))){d=d!==3?8:12;for(var e=0;e<d;e++)V(c)&&(e<6?Ih(c,16):Ih(c,64))}Fh(c);d=T(c);if(d===0)T(c);else if(d===1)for(Ch(c,1),Fh(c),Fh(c),d=T(c),e=0;e<d;e++)Fh(c);Fh(c);Ch(c,1);var f=T(c),g=T(c),h=Dh(c,1);h===0&&Ch(c,1);Ch(c,1);var k=0,l=0,m=0,n=0;V(c)&&
(k=T(c),l=T(c),m=T(c),n=T(c));e=d=1;if(V(c)&&V(c)){var q=Hh(c),u=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],t=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];q>0&&q<=16?(d=u[q-1],e=t[q-1]):q===255&&(d=Dh(c,16),e=Dh(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,Ja:h,Pa:d,Qa:e}}
function Jy(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=r(e.nalus),x=w.next();!x.done;x=w.next())v+=x.value.fullData.byteLength;v=new Uint8Array(v);w=0;x=r(e.nalus);for(var y=x.next();!y.done;y=x.next()){y=y.value;var z=y.fullData.byteLength;v[w]=z>>24&255;v[w+1]=z>>16&255;v[w+2]=z>>8&255;v[w+3]=z&255;v.set(y.fullData,w+4);w+=4+z}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=r(k.nalus);for(var n=l.next();!n.done;n=l.next()){n=n.value;var q=!1;switch(n.type){case 1:var u=!1;q=!0;var t=n.data;m&&t.length>4&&(t=Jh(new Ah(t)),t===2||t===4||t===7||t===9)&&(u=!0);u&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(k);e.frame=!0;e.isKeyframe=u;break;case 5:q=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(k);e.frame=!0;e.isKeyframe=!0;break;case 6:q=!0;break;case 7:m=q=!0;break;case 8:q=!0;break;case 9:f=
q=!0;e&&e.frame&&(c(),e=null);e||b(k);break;case 12:q=!0;break;default:q=!1}e&&q&&e.nalus.push(n)}}c();return d}var Iy=[100,110,122,244,44,83,86,118,128,138,139,134];function Ky(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=Ly(b.fullData);a=My(c.fullData);var f=Ny(d.fullData);b=Oy(b.fullData,c.fullData,d.fullData,{yf:e.yf,Rf:e.Rf,df:a.df,ef:a.ef,Xe:a.Xe,cf:a.cf,Ye:a.Ye,Ze:a.Ze,$e:a.$e,bf:a.bf,Re:a.Re,Se:a.Se,Te:a.Te,Ue:a.Ue,Ve:a.Ve,We:a.We,ge:a.ge,Ie:a.Ie,He:a.He,Ge:a.Ge,Af:f.Af,Qe:a.Qe,Pe:a.Pe});return{height:a.height,width:a.width,
Ja:b,Pa:a.aj,Qa:a.$i}}function Ly(a){var b=new Ah(a,!0);Hh(b);Hh(b);Dh(b,4);Dh(b,2);Dh(b,6);a=Dh(b,3);b=V(b);return{yf:a+1,Rf:b}}
function My(a){a=new Ah(a,!0);Hh(a);Hh(a);var b=0,c=0,d=0,e=0;Dh(a,4);var f=Dh(a,3);V(a);for(var g=Dh(a,2),h=Dh(a,1),k=Dh(a,5),l=Hh(a),m=Hh(a),n=Hh(a),q=Hh(a),u=Hh(a),t=Hh(a),v=Hh(a),w=Hh(a),x=Hh(a),y=Hh(a),z=Hh(a),B=[],H=[],E=0;E<f;E++)B.push(V(a)),H.push(V(a));if(f>0)for(E=f;E<8;E++)Dh(a,2);for(E=0;E<f;E++)B[E]&&Dh(a,88),H[E]&&Hh(a);T(a);B=T(a);B==3&&Dh(a,1);H=T(a);E=T(a);V(a)&&(b+=T(a),c+=T(a),d+=T(a),e+=T(a));var C=T(a),A=T(a),F=T(a);if(V(a))for(var D=0;D<=f;D++)T(a),T(a),T(a);else T(a),T(a),
T(a);T(a);T(a);T(a);T(a);T(a);T(a);if(V(a)&&V(a))for(D=0;D<4;D++)for(var J=0;J<(D===3?2:6);J++)if(V(a)){var L=Math.min(64,1<<4+(D<<1));D>1&&Gh(a);for(var P=0;P<L;P++)Gh(a)}else T(a);V(a);V(a);V(a)&&(Hh(a),T(a),T(a),V(a));D=T(a);for(L=J=0;L<D;L++)if(P=!1,L!==0&&(P=V(a)),P){L===D&&T(a);V(a);T(a);for(var O=P=0;O<=J;O++){var N=V(a),M=!1;N||(M=V(a));(N||M)&&P++}J=P}else{O=T(a);P=T(a);J=O+P;for(N=0;N<O;N++)T(a),V(a);for(O=0;O<P;O++)T(a),V(a)}if(V(a))for(D=T(a),J=0;J<D;J++){for(L=0;L<F+4;L++)Dh(a,1);Dh(a,
1)}D=F=1;J=!0;L=1;O=P=0;V(a);V(a);if(V(a)){if(V(a)){N=Hh(a);M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var S=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];N>0&&N<=16?(F=M[N-1],D=S[N-1]):N===255&&(F=Dh(a,16),D=Dh(a,16))}V(a)&&V(a);V(a)&&(Dh(a,3),V(a),V(a)&&(Hh(a),Hh(a),Hh(a)));V(a)&&(T(a),T(a));V(a);V(a);V(a);if(N=V(a))Fh(a),Fh(a),Fh(a),Fh(a);if(V(a)&&(L=Dh(a,32),P=Dh(a,32),V(a)&&T(a),V(a))){S=!1;N=V(a);M=V(a);if(N||M){if(S=V(a))Hh(a),Dh(a,5),V(a),Dh(a,5);Dh(a,4);Dh(a,4);S&&Dh(a,4);Dh(a,5);Dh(a,
5);Dh(a,5)}for(var U=0;U<=f;U++){J=V(a);var da=!0,aa=1;J||(da=V(a));var Ka=!1;da?T(a):Ka=V(a);Ka||(aa=T(a)+1);if(N){for(da=0;da<aa;da++)T(a),T(a),S&&(T(a),T(a));V(a)}if(M){for(da=0;da<aa;da++)T(a),T(a),S&&(T(a),T(a));V(a)}}}V(a)&&(V(a),V(a),V(a),O=T(a),T(a),T(a),T(a),T(a))}return{Xe:z,df:g,ef:h,cf:k,Ye:l,Ze:m,$e:n,bf:q,Re:u,Se:t,Te:v,Ue:w,Ve:x,We:y,ge:O,Ie:B,He:C,Ge:A,width:H-(b+c)*(B===1||B===2?2:1),height:E-(d+e)*(B===1?2:1),aj:F,$i:D,Qe:P/L,Pe:J}}
function Ny(a){var b=new Ah(a,!0);Hh(b);Hh(b);T(b);T(b);V(b);V(b);Dh(b,3);V(b);V(b);T(b);T(b);Gh(b);V(b);V(b);V(b)&&T(b);Gh(b);Gh(b);V(b);V(b);V(b);V(b);a=V(b);b=V(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Af:c}}
function Oy(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.df&3)<<6|(d.ef?1:0)<<5|d.cf&31;e[2]=d.Ye;e[3]=d.Ze;e[4]=d.$e;e[5]=d.bf;e[6]=d.Re;e[7]=d.Se;e[8]=d.Te;e[9]=d.Ue;e[10]=d.Ve;e[11]=d.We;e[12]=d.Xe;e[13]=240|(d.ge&3840)>>8;e[14]=d.ge&255;e[15]=252|d.Af&3;e[16]=252|d.Ie&3;e[17]=248|d.He&7;e[18]=248|d.Ge&7;e[19]=0;e[20]=parseInt(d.Qe,10);e[21]=((d.Pe?1:0)&3)<<6|(d.yf&7)<<3|(d.Rf?1:0)<<2|3;e[22]=3;a=[a,b,c];b=23;c=a.length-1;for(d=0;d<a.length;d+=
1)e.set(new Uint8Array([32+d|(d===c?128:0),0,1,a[d].byteLength>>8,a[d].byteLength&255]),b),b+=5,e.set(a[d],b),b+=a[d].byteLength;return e};function Py(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=Qy[(c===3?3-d:d===3?3:4)*14+e-1]*1E3;f=Ry[(c===3?0:c===2?1:2)*3+f];c=Sy[c][d];var h=Ty[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,aa:k,Zi:c*8*h}}return null}
function Uy(a,b){return a[b]===255&&(a[b+1]&224)===224&&(a[b+1]&6)!==0}function Vy(a,b){if(b+1<a.length&&Uy(a,b)){var c=Py(a,b),d=4;c&&c.aa&&(d=c.aa);b+=d;return b===a.length||b+1<a.length&&Uy(a,b)}return!1}
var Qy=[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],Ry=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],Sy=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Ty=[0,1,1,4];function Wy(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=Wy.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/mpeg"?$k(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.j};
p.transmux=function(a,b,c,d){for(var e=Q(a),f=Qh(e).length;f<e.length&&!Vy(e,f);f++);var g;for(a=[];f<e.length;){var h=Py(e,f);if(!h)return Promise.reject(new R(2,3,3018,c?c.N()[0]:null));g||(g=h);f+h.aa<=e.length&&a.push({data:e.subarray(f,f+h.aa),size:h.aa,duration:1152,$a:0,flags:yy});f+=h.aa}if(!g)return Promise.reject(new R(2,3,3018,c?c.N()[0]:null));e=g.Zi*9E4/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",timescale:g.sampleRate,duration:d,mb:[],qa:new Uint8Array([]),Ja:new Uint8Array([]),
Pa:0,Qa:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,cb:a},stream:b};d=new sn([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=tn(d),this.g.set(c,b));c=this.i!==b;d=Qn(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};K("shaka.transmuxer.Mp3Transmuxer",Wy);Wy.prototype.transmux=Wy.prototype.transmux;Wy.prototype.getOriginalMimeType=Wy.prototype.getOriginalMimeType;Wy.prototype.convertCodecs=Wy.prototype.convertCodecs;Wy.prototype.isSupported=Wy.prototype.isSupported;
Wy.prototype.destroy=Wy.prototype.destroy;ie("audio/mpeg",function(){return new Wy("audio/mpeg")},oe);function Xy(a){this.h=a;this.g=null}p=Xy.prototype;p.destroy=function(){};p.isSupported=function(a){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var b=Ee(a).split(","),c=Gc("audio",b);b=Gc("video",b);return!c||b||Ae(c)!="mp3"?!1:$k(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Rh;this.g.re(c.i);a=Q(a);a=this.g.parse(a);if(a.Zc().audio!="mp3"||e!="audio")return Promise.reject(new R(2,3,3018,c?c.N()[0]:null));c=new Uint8Array([]);e=r(a.ab());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=Py(a,b))?(b+d.aa<=a.length&&(c=yc(c,a.subarray(b,b+d.aa))),b+=d.aa):b++;return Promise.resolve(c)};K("shaka.transmuxer.MpegTsTransmuxer",Xy);Xy.prototype.transmux=Xy.prototype.transmux;
Xy.prototype.getOriginalMimeType=Xy.prototype.getOriginalMimeType;Xy.prototype.convertCodecs=Xy.prototype.convertCodecs;Xy.prototype.isSupported=Xy.prototype.isSupported;Xy.prototype.destroy=Xy.prototype.destroy;ie("video/mp2t",function(){return new Xy("video/mp2t")},ne);function Yy(a){if(a.length<1)return 960;var b=a[0],c=b&3;b=Zy[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 Zy=[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 $y(a){this.m=a;this.g=0;this.j=new Map;this.l=this.i=this.h=null}p=$y.prototype;p.destroy=function(){this.j.clear();this.i&&this.i.destroy()};
p.isSupported=function(a,b){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Ee(c).split(",");c=Gc("audio",d);d=Gc("video",d);if(c&&(c=Ae(c),!az.includes(c))||d&&(c=Ae(d),!bz.includes(c)))return!1;if(b)return $k(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return $k(b)||$k(a)};
p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?(b=Ee(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return zf(c,"audio/mp4")}).map(Af).join(","),a=="audio"?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.getOriginalMimeType=function(){return this.m};
p.transmux=function(a,b,c,d,e){var f=Q(a);if(e=="audio"&&!$h(f)){for(var g=Qh(f),h=g.length;h<f.length;h++)if(Vy(f,h))return Promise.reject(new R(2,3,3018,c?c.N()[0]:null));for(h=g.length;h<f.length;h++)if(wy(f,h))return this.i||(this.i=new By("audio/aac")),this.i.transmux(a,b,c,d,e);return Promise.reject(new R(2,3,3018,c?c.N()[0]:null))}this.h?this.h.clearData():this.h=new Rh;this.h.re(c.i);var k=this.h.parse(f),l=[],m=k.Zc();try{var n=null;if(e=="video"){switch(m.video){case "avc":var q=[],u=null,
t=k.Dc(),v=Jy(t);if(!v.length)throw new R(2,3,3023,c?c.N()[0]:null);for(var w=0;w<v.length;w++){var x=v[w];u==null&&(u=x.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(x.dts||0):v.length>1?(x.dts||0)-(v[w-1].dts||0):(c.endTime-c.startTime)*9E4;q.push({data:x.data,size:x.data.byteLength,duration:y,$a:Math.round((x.pts||0)-(x.dts||0)),flags:x.isKeyframe?zy:Ay})}for(var z=[],B=r(t),H=B.next();!H.done;H=B.next())z.push.apply(z,G(H.value.nalus));var E=Hy(z);if(!E||u==null)throw new R(2,3,3018,c?c.N()[0]:
null);b.height=b.height||E.height;b.width=b.width||E.width;n={id:b.id,type:"video",codecs:"avc1",timescale:9E4,duration:d,mb:[],qa:new Uint8Array([]),Ja:E.Ja,Pa:E.Pa,Qa:E.Qa,data:{sequenceNumber:this.g,baseMediaDecodeTime:u,cb:q},stream:b};break;case "hvc":var C=[],A=null,F=[],D=k.Dc(),J=new Uint8Array(0),L=!1;if(!D.length)throw new R(2,3,3023,c?c.N()[0]:null);for(var P=0;P<D.length;P++){var O=D[P],N=O.nalus;F.push.apply(F,G(N));for(var M=!1,S=[],U=0,da=!1,aa=r(N),Ka=aa.next();!Ka.done;Ka=aa.next()){var ua=
Ka.value;switch(ua.type){case 1:case 0:var qa=da=!0;break;case 19:case 20:case 21:M=qa=da=!0;break;case 32:case 33:case 34:qa=!0;break;case 35:da=qa=!0;break;case 39:case 40:qa=!0;break;default:qa=!1}da&&qa&&(S.push(ua.fullData),U+=ua.fullData.byteLength)}if(S.length){U+=4*S.length;for(var xa=new Uint8Array(U),ka=0,La=r(S),za=La.next();!za.done;za=La.next()){var Na=za.value,Oa=Na.byteLength;xa[ka]=Oa>>24&255;xa[ka+1]=Oa>>16&255;xa[ka+2]=Oa>>8&255;xa[ka+3]=Oa&255;xa.set(Na,ka+4);ka+=Oa+4}J=xa;L=M;
var la=!0}else la=!1;if(la){A==null&&O.dts!=null&&(A=O.dts);var cb=void 0;cb=P+1<D.length?(D[P+1].dts||0)-(O.dts||0):D.length>1?(O.dts||0)-(D[P-1].dts||0):(c.endTime-c.startTime)*9E4;C.push({data:J,size:J.byteLength,duration:cb,$a:Math.round((O.pts||0)-(O.dts||0)),flags:L?zy:Ay})}}var Va=Ky(F);if(!Va||A==null)throw new R(2,3,3018,c?c.N()[0]:null);b.height=b.height||Va.height;b.width=b.width||Va.width;n={id:b.id,type:"video",codecs:"hvc1",timescale:9E4,duration:d,mb:[],qa:new Uint8Array([]),Ja:Va.Ja,
Pa:Va.Pa,Qa:Va.Qa,data:{sequenceNumber:this.g,baseMediaDecodeTime:A,cb:C},stream:b}}n&&(l.push(n),n=null)}if(e=="audio"){switch(m.audio){case "aac":for(var pc=[],Ec,Gd=null,fd=null,Hd=null,ps=r(k.ab()),Dl=ps.next();!Dl.done;Dl=ps.next()){var ei=Dl.value,$b=ei.data;if($b){var Vb=0;if(fd==-1&&Hd)$b=yc(Hd,ei.data),fd=null;else if(fd!=null&&Hd){Vb=Math.max(0,fd);var qs=yc(Hd,$b.subarray(0,Vb));pc.push({data:qs,size:qs.byteLength,duration:1024,$a:0,flags:yy});fd=Hd=null}Ec=vy($b,Vb);if(!Ec)throw new R(2,
3,3018,c?c.N()[0]:null);b.audioSamplingRate=Ec.sampleRate;b.channelsCount=Ec.channelCount;Gd==null&&ei.pts!==null&&(Gd=ei.pts);for(;Vb<$b.length;){var se=uy($b,Vb);if(!se){Hd=$b.subarray(Vb,$b.length);fd=-1;break}var Rf=se.cd+se.aa;fd=Math.max(0,Vb+Rf-$b.length);fd!=0?Hd=$b.subarray(Vb+se.cd,Vb+Rf):Vb+Rf<=$b.length&&pc.push({data:$b.subarray(Vb+se.cd,Vb+Rf),size:se.aa,duration:1024,$a:0,flags:yy});Vb+=Rf}}}if(!Ec||Gd==null){Gd=c.startTime*9E4;var El=Gc("audio",b.codecs.split(","));if(!El||!b.channelsCount||
!b.audioSamplingRate)throw new R(2,3,3018,c?c.N()[0]:null);Ec={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:El};var Fl=xy(El,b.channelsCount);if(!Fl)throw new R(2,3,3018,c?c.N()[0]:null);for(var Cz=Gd+(c.endTime-c.startTime)*9E4,rs=Gd;rs<Cz;)pc.push({data:Fl,size:Fl.byteLength,duration:1024,$a:0,flags:yy}),rs+=1024/Ec.sampleRate*9E4}var ss=Ec.sampleRate,Dz=Gd/9E4*ss;n={id:b.id,type:"audio",codecs:Ec.codec,timescale:ss,duration:d,mb:[],qa:new Uint8Array([]),Ja:new Uint8Array([]),
Pa:0,Qa:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:Dz,cb:pc},stream:b};break;case "ac3":for(var ts=[],fi=0,Gl=new Uint8Array([]),gi=null,gd={sampleRate:0,channelCount:0,qa:new Uint8Array(0),aa:0},us=r(k.ab()),Hl=us.next();!Hl.done;Hl=us.next()){var Il=Hl.value,Jl=Il.data;gi==null&&Il.pts!==null&&(gi=Il.pts);for(var te=0;te<Jl.length;)Cy(Jl,te,gd)?(b.audioSamplingRate=gd.sampleRate,b.channelsCount=gd.channelCount,fi=gd.sampleRate,Gl=gd.qa,ts.push({data:Jl.subarray(te,te+gd.aa),size:gd.aa,duration:1536,
$a:0,flags:yy}),te+=gd.aa):te++}if(fi==0||Gl.byteLength==0||gi==null)throw new R(2,3,3018,c?c.N()[0]:null);var Ez=gi/9E4*fi;n={id:b.id,type:"audio",codecs:"ac-3",timescale:fi,duration:d,mb:[],qa:Gl,Ja:new Uint8Array([]),Pa:0,Qa:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:Ez,cb:ts},stream:b};break;case "ec3":for(var vs=[],hi=0,Kl=new Uint8Array([]),ii=null,hd={sampleRate:0,channelCount:0,qa:new Uint8Array(0),aa:0},ws=r(k.ab()),Ll=ws.next();!Ll.done;Ll=ws.next()){var Ml=Ll.value,Nl=Ml.data;ii==
null&&Ml.pts!==null&&(ii=Ml.pts);for(var ue=0;ue<Nl.length;)Fy(Nl,ue,hd)?(b.audioSamplingRate=hd.sampleRate,b.channelsCount=hd.channelCount,hi=hd.sampleRate,Kl=hd.qa,vs.push({data:Nl.subarray(ue,ue+hd.aa),size:hd.aa,duration:1536,$a:0,flags:yy}),ue+=hd.aa):ue++}if(hi==0||Kl.byteLength==0||ii==null)throw new R(2,3,3018,c?c.N()[0]:null);var Fz=ii/9E4*hi;n={id:b.id,type:"audio",codecs:"ec-3",timescale:hi,duration:d,mb:[],qa:Kl,Ja:new Uint8Array([]),Pa:0,Qa:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:Fz,
cb:vs},stream:b};break;case "mp3":for(var xs=[],ji,ki=null,ys=r(k.ab()),Ol=ys.next();!Ol.done;Ol=ys.next()){var Pl=Ol.value,Sf=Pl.data;if(Sf){ki==null&&Pl.pts!==null&&(ki=Pl.pts);for(var Id=0;Id<Sf.length;){var ve=Py(Sf,Id);ve?(ji||(ji=ve),Id+ve.aa<=Sf.length&&xs.push({data:Sf.subarray(Id,Id+ve.aa),size:ve.aa,duration:1152,$a:0,flags:yy}),Id+=ve.aa):Id++}}}if(!ji||ki==null)throw new R(2,3,3018,c?c.N()[0]:null);var zs=ji.sampleRate,Gz=ki/9E4*zs;n={id:b.id,type:"audio",codecs:"mp3",timescale:zs,duration:d,
mb:[],qa:new Uint8Array([]),Ja:new Uint8Array([]),Pa:0,Qa:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:Gz,cb:xs},stream:b};break;case "opus":var As=[],li=null,sc=k.K;if(!sc)throw new R(2,3,3018,c?c.N()[0]:null);var pb=[];switch(sc.Bh){case 1:case 2:pb=[0];break;case 0:pb=[255,1,1,0,1];break;case 128:pb=[255,2,0,0,1];break;case 3:pb=[1,2,1,0,2,1];break;case 4:pb=[1,2,2,0,1,2,3];break;case 5:pb=[1,3,2,0,4,1,2,3];break;case 6:pb=[1,4,2,0,4,1,2,3,5];break;case 7:pb=[1,4,2,0,4,1,2,3,5,6];break;case 8:pb=
[1,5,3,0,6,1,2,3,4,5,7];break;case 130:pb=[1,1,2,0,1];break;case 131:pb=[1,1,3,0,1,2];break;case 132:pb=[1,1,4,0,1,2,3];break;case 133:pb=[1,1,5,0,1,2,3,4];break;case 134:pb=[1,1,6,0,1,2,3,4,5];break;case 135:pb=[1,1,7,0,1,2,3,4,5,6];break;case 136:pb=[1,1,8,0,1,2,3,4,5,6,7]}var Bs=new Uint8Array([0,sc.channelCount,0,0,sc.sampleRate>>>24&255,sc.sampleRate>>>17&255,sc.sampleRate>>>8&255,sc.sampleRate>>>0&255,0,0].concat(G(pb)));for(var Cs=sc.sampleRate,Ds=r(k.ab()),Ql=Ds.next();!Ql.done;Ql=Ds.next()){var Rl=
Ql.value,we=Rl.data;li==null&&Rl.pts!==null&&(li=Rl.pts);for(var Tf=0;Tf<we.length;){for(var Hz=(we[Tf+1]&16)!==0,Iz=(we[Tf+1]&8)!==0,Fc=Tf+2,mi=0;we[Fc]===255;)mi+=255,Fc+=1;mi+=we[Fc];Fc+=1;Fc+=Hz?2:0;Fc+=Iz?2:0;var Sl=we.slice(Fc,Fc+mi);As.push({data:Sl,size:Sl.byteLength,duration:Yy(Sl),$a:0,flags:yy});Tf=Fc+mi}}if(Bs.byteLength==0||li==null)throw new R(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=sc.sampleRate;b.channelsCount=sc.channelCount;var Jz=li/9E4*Cs;n={id:b.id,type:"audio",codecs:"opus",
timescale:Cs,duration:d,mb:[],qa:Bs,Ja:new Uint8Array([]),Pa:0,Qa:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:Jz,cb:As},stream:b}}n&&(l.push(n),n=null)}}catch(Tl){return Tl&&Tl.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(Tl)}if(!l.length)return Promise.reject(new R(2,3,3018,c?c.N()[0]:null));var Es=new sn(l),Ul=b.id+"_"+c.i;if(this.j.has(Ul))var Uf=this.j.get(Ul);else Uf=tn(Es),this.j.set(Ul,Uf);var Kz=this.l!==Uf,Lz=Qn(Es);this.l=Uf;this.g++;return Promise.resolve({data:Lz,
init:Kz?Uf:null})};K("shaka.transmuxer.TsTransmuxer",$y);$y.prototype.transmux=$y.prototype.transmux;$y.prototype.getOriginalMimeType=$y.prototype.getOriginalMimeType;$y.prototype.convertCodecs=$y.prototype.convertCodecs;$y.prototype.isSupported=$y.prototype.isSupported;$y.prototype.destroy=$y.prototype.destroy;var az=["aac","ac-3","ec-3","mp3","opus"],bz=["avc","hevc"];ie("video/mp2t",function(){return new $y("video/mp2t")},me);function cz(){}pa(cz,fk);K("shaka.util.FairPlayUtils",cz);function dz(){this.m=[];this.h=[];this.g=[];this.j=[];this.i=[];this.o=!1;this.l=new Set}p=dz.prototype;p.release=function(){for(var a=r(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.m=[];this.o=!1;this.l.clear()};p.ti=function(){return this.m};p.ni=function(){return this.j.slice()};p.Uh=function(){return this.i};
p.Hh=function(a,b){if(a){if(a.type=="audio")for(var c=r(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if(a.type=="video")for(c=r(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a})),d.dependencyStream&&(d.dependencyStream.matchedStreams=d.dependencyStream.matchedStreams.filter(function(e){return e!==
a}));else if(a.type==Ic)for(c=r(this.j),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if(a.type=="image")for(c=r(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.l.delete(b)}};
function ez(a,b){var c=[],d=[],e=[],f=[];a=r(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[fz(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[gz(n),n]})),l=new Map(h.textStreams.map(function(n){return[hz(n),n]}));h=new Map(h.imageStreams.map(function(n){return[iz(n),n]}));if(b){var m=jz(Ic);l.set(hz(m),m);m=jz("image");h.set(iz(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{eg:c,oh:d,kh:e,ug:f}}
p.Eh=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,q,u,t,v,w,x,y,z,B,H,E,C,A,F,D,J,L,P,O,N,M,S,U,da;return I(function(aa){if(aa.h==1){e=Kc;if(!b&&a.length==1)return f=ez(a,!1),g=f.eg,h=f.oh,k=f.kh,l=f.ug,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),aa.u(2);m=c?d.l.size:0;n=-1;for(q=0;q<a.length;q++)u=a[q],d.l.has(u.id)||(d.l.add(u.id),n==-1&&(n=q));if(n==-1)return aa.return();t=ez(a,!0);v=t.eg;w=t.oh;x=t.kh;
y=t.ug;return aa.g(Promise.all([kz(d,d.h,v,n,m),kz(d,d.g,w,n,m),kz(d,d.j,x,n,m),kz(d,d.i,y,n,m)]),2)}z=0;B=[];if(d.g.length&&d.h.length)for(J=r(d.h),L=J.next();!L.done;L=J.next())for(P=L.value,O=r(d.g),N=O.next();!N.done;N=O.next())M=N.value,S=Yb(P.drmInfos,M.drmInfos),P.drmInfos.length&&M.drmInfos.length&&!S.length||(U=(P.bandwidth||0)+(M.bandwidth||0),P.dependencyStream&&(U+=P.dependencyStream.bandwidth||0),M.dependencyStream&&(U+=M.dependencyStream.bandwidth||0),da=z++,B.push({id:da,language:P.language,
disabledUntilTime:0,primary:P.primary,audio:P,video:M,bandwidth:U,drmInfos:S,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(H=d.g.length?d.g:d.h,E=r(H),C=E.next();!C.done;C=E.next())A=C.value,F=z++,D=A.bandwidth||0,A.dependencyStream&&(D+=A.dependencyStream.bandwidth||0),B.push({id:F,language:A.language,disabledUntilTime:0,primary:A.primary,audio:A.type==e.W?A:null,video:A.type==e.oa?A:null,bandwidth:D,drmInfos:A.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
d.m=B;aa.j()})};
function kz(a,b,c,d,e){var f=lz,g=mz,h,k,l,m,n,q,u,t,v,w,x,y,z,B,H,E,C,A,F,D;return I(function(J){switch(J.h){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=r(b);m=l.next();case 2:if(m.done){J.u(4);break}n=m.value;return J.g(nz(a,n,c,d,g,h,e),5);case 5:q=J.i;if(!q)throw new R(2,4,4037);m=l.next();J.u(2);break;case 4:u=r(h);for(t=u.next();!t.done;t=u.next())for(v=t.value,w=r(v),x=w.next();!x.done;x=w.next())y=x.value,(z=oz(a,b,y,c,f,g,h))&&b.push(z);B=r(h);
for(H=B.next();!H.done;H=B.next())for(E=H.value,C=r(E),A=C.next(),F={};!A.done;F={Of:void 0},A=C.next())if(F.Of=A.value,!pz(F.Of)&&(D=b.some(function(L){return function(P){return qz(L.Of,P)}}(F))))throw new R(2,4,4037);return J.return(b)}})}function nz(a,b,c,d,e,f,g){return I(function(h){if(h.h==1)return rz(a,c,b,g>0),b.matchedStreams?b.segmentIndex?h.g(sz(b,d+g),2):h.u(2):h.return(!1);tz(b,d,e,f,g);return h.return(!0)})}
function sz(a,b){var c,d,e,f,g,h;return I(function(k){if(k.h==1){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex()),f.dependencyStream&&!f.dependencyStream.segmentIndex&&c.push(f.dependencyStream.createSegmentIndex());return k.g(Promise.all(c),2)}if(a.segmentIndex instanceof Xk)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);k.j()})}
function oz(a,b,c,d,e,f,g){if(pz(c))return null;var h=e(c);rz(a,d,h);h.createSegmentIndex&&(h.createSegmentIndex=function(){return I(function(k){if(h.segmentIndex)return k.u(0);h.segmentIndex=new Xk;return k.g(sz(h,0),0)})},h.closeSegmentIndex=function(){h.segmentIndex&&(h.segmentIndex.release(),h.segmentIndex=null);if(h.matchedStreams)for(var k=r(h.matchedStreams),l=k.next();!l.done;l=k.next()){l=l.value;var m;if(m=l.segmentIndex){a:{m=r(b);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n!==
h&&n.segmentIndex&&n.matchedStreams&&n.matchedStreams.includes(l)){m=!0;break a}m=!1}m=!m}m&&(l.segmentIndex.release(),l.segmentIndex=null)}});if(!h.matchedStreams||!h.matchedStreams.length)return null;tz(h,0,f,g,0);return h}
function tz(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"&&ef(a.language,g.language)==0&&(h=!1);if(h&&((h=d[b-e])&&h.delete(g),g.fullMimeTypes))for(g=r(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function lz(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 mz(a,b){function c(g,h){g||(g=[]);h=r(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=r(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);a.originalId==null?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Yb(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new R(2,
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=r(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=r(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=lz(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
for(var g=new Xk,h=r(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),mz(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),mz(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=lz(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new Xk,h=r(a.dependencyStream.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.dependencyStream.segmentIndex=g;return Promise.resolve()}),a.dependencyStream.matchedStreams.push(b.dependencyStream),mz(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),mz(a.dependencyStream,b))}
function rz(a,b,c,d){d=(d===void 0?0:d)?c.matchedStreams:[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=uz(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function uz(a,b,c){var d={audio:fz,video:gz,text:hz,image:iz}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return qz(l,m)},video:function(l,m){return qz(l,m)},text:vz,image:wz}[c.type];for(var g={audio:xz,video:yz,text:zz,image:Az}[c.type],h=r(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.o&&!pz(e)&&b.delete(d(e));return e}
function Bz(a,b){return a.mimeType!=b.mimeType?!1:Mz(a.codecs)===Mz(b.codecs)}p.hj=function(a){this.o=a};function qz(a,b){return a.drmInfos&&!Wb(a.drmInfos,b.drmInfos)?!1:!0}function vz(a,b){return b.language?a.forced!==b.forced||ef(a.language,b.language)==0||b.kind!=a.kind?!1:!0:!0}function wz(){return!0}
function xz(a,b,c){var d=Nz(a,b,c);if(d===Oz)return!0;if(d===Pz)return!1;d=ef(a.language,b.language);var e=ef(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=Qz(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Oz)return!0;if(d==Pz)return!1;d=Qz(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Oz?!0:d==Pz?!1:a.bandwidth&&Rz(a.bandwidth,b.bandwidth,c.bandwidth)==Oz?!0:!1}
function yz(a,b,c){var d=Nz(a,b,c);if(d===Oz)return!0;if(d===Pz)return!1;d=Qz(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Oz)return!0;if(d==Pz)return!1;if(a.frameRate){d=Qz(a.frameRate,b.frameRate,c.frameRate);if(d==Oz)return!0;if(d==Pz)return!1}return a.bandwidth&&Rz(a.bandwidth,b.bandwidth,c.bandwidth)==Oz?!0:!1}
function zz(a,b,c){var d=ef(a.language,b.language),e=ef(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 Az(a,b,c){return Qz(a.width*a.height,b.width*b.height,c.width*c.height)==Oz?!0:!1}
function jz(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Uk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,
baseOriginalId:null}}function Qz(a,b,c){if(b==a&&a!=c)return Pz;if(c==a&&a!=b)return Oz;if(b>a){if(c<=a||c-a<b-a)return Oz;if(c-a>b-a)return Pz}else{if(c>a)return Pz;if(a-c<a-b)return Oz;if(a-c>a-b)return Pz}return Sz}function Nz(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 Pz;if(!d&&e)return Oz;b=Bz(a,b);a=Bz(a,c);return b&&!a?Pz:!b&&a?Oz:Sz}function Rz(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Oz:b<a?Pz:Sz}
function pz(a){switch(a.type){case Ic:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function gz(a){return Tz([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}
function fz(a){return Tz([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function hz(a){return Tz([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function iz(a){return Tz([a.width,a.codecs,a.mimeType])}function Tz(a){return JSON.stringify(a)}function Mz(a){if(!Uz.has(a)){var b=Ae(a);Uz.set(a,b)}return Uz.get(a)}
K("shaka.util.PeriodCombiner",dz);dz.prototype.setUseStreamOnce=dz.prototype.hj;dz.prototype.combinePeriods=dz.prototype.Eh;dz.prototype.deleteStream=dz.prototype.Hh;dz.prototype.getImageStreams=dz.prototype.Uh;dz.prototype.getTextStreams=dz.prototype.ni;dz.prototype.getVariants=dz.prototype.ti;var Oz=1,Sz=0,Pz=-1,Uz=new Map;}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();

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