UNPKG

shaka-player

Version:
142 lines (141 loc) 780 kB
/* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ (function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var p,aa=typeof Object.create=="function"?Object.create:function(a){function b(){}b.prototype=a;return new b},ba=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a}; function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function ea(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ba(c,a,{configurable:!0,writable:!0,value:b})}}var fa; if(typeof Object.setPrototypeOf=="function")fa=Object.setPrototypeOf;else{var ha;a:{var ia={a:!0},ja={};try{ja.__proto__=ia;ha=ja.a;break a}catch(a){}ha=!1}fa=ha?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ka=fa; function la(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(ka)ka(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.Em=b.prototype}function na(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}} function t(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:na(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a} ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b}); ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];typeof d==="function"&&typeof d.prototype[a]!="function"&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return oa(na(this))}})}return a});function oa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a} function pa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.B=this.i=null}function qa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}pa.prototype.u=function(a){this.h=a};function ra(a,b){a.i={Xh:b,mi:!0};a.g=a.m||a.j}pa.prototype.return=function(a){this.i={return:a};this.g=this.j};function F(a,b,c){a.g=c;return{value:b}}pa.prototype.A=function(a){this.g=a};function G(a){a.g=0}function sa(a,b,c){a.m=b;c!=void 0&&(a.j=c)}function ta(a,b){a.m=0;a.j=b||0} function Aa(a,b,c){a.g=b;a.m=c||0}function Ba(a,b){a.m=b||0;b=a.i.Xh;a.i=null;return b}function Da(a){a.B=[a.i];a.m=0;a.j=0}function Fa(a,b){var c=a.B.splice(0)[0];(c=a.i=a.i||c)?c.mi?a.g=a.m||a.j:c.A!=void 0&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function Ha(a){this.g=new pa;this.h=a}function Ja(a,b){qa(a.g);var c=a.g.l;if(c)return Ka(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return La(a)} function Ka(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,ra(a.g,g),La(a)}a.g.l=null;d.call(a.g,f);return La(a)}function La(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ra(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.mi)throw b.Xh;return{value:b.return,done:!0}}return{value:void 0,done:!0}} function Ma(a){this.next=function(b){qa(a.g);a.g.l?b=Ka(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=La(a));return b};this.throw=function(b){qa(a.g);a.g.l?b=Ka(a,a.g.l["throw"],b,a.g.u):(ra(a.g,b),b=La(a));return b};this.return=function(b){return Ja(a,b)};this[Symbol.iterator]=function(){return this}}function Na(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})} function Q(a){return Na(new Ma(new Ha(a)))}function Oa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b} ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(this.g==null){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k= g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.G),reject:g(this.l)}};b.prototype.G=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.F(g):this.m(g)}}; b.prototype.F=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.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(this.h!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;this.h===2&&this.H();this.B()};b.prototype.H=function(){var g=this;e(function(){if(g.C()){var h=da.console;typeof h!=="undefined"&&h.error(g.i)}},1)};b.prototype.C= function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if(typeof k==="undefined")return!0;typeof g==="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof h==="function"?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.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.Qe(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,r){return typeof q=="function"?function(u){try{l(q(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.Qe(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Qe=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=t(g),m=l.next();!m.done;m=l.next())d(m.value).Qe(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){q[u]=v;r--;r==0&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).Qe(n(q.length-1),m),k=h.next(); while(!k.done)})};return b});function Pa(a,b){return Object.prototype.hasOwnProperty.call(a,b)} ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return l==="object"&&k!==null||l==="function"}function e(k){if(!Pa(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}), m=new a([[k,2],[l,3]]);if(m.get(k)!=2||m.get(l)!=3)return!1;m.delete(k);m.set(l,4);return!m.has(k)&&m.get(l)==4}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Pa(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Pa(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Pa(k, g)&&Pa(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Pa(k,g)&&Pa(k[g],this.g)?delete k[g][this.g]:!1};return b}); ea("Map",function(a){function b(){var h={};return h.xc=h.next=h.head=h}function c(h,k){var l=h[1];return oa(function(){if(l){for(;l.head!=h[1];)l=l.xc;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&&Pa(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l, list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!= 4||m.value[1]!="t"||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],xc:this[1].xc,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].xc.next=l.entry,this[1].xc=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.xc.next= h.entry.next,h.entry.next.xc=h.entry.xc,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].xc=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach= function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e}); ea("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||f.value[0].x!= 4||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]= b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Qa(a,b,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{ii:e,v:f}}return{ii:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Qa(this,b,c).ii}}); function Ra(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ea("Array.prototype.values",function(a){return a?a:function(){return Ra(this,function(b,c){return c})}}); ea("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}});ea("Array.prototype.keys",function(a){return a?a:function(){return Ra(this,function(b){return b})}}); ea("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}});ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}}); function Sa(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+""}ea("String.prototype.includes",function(a){return a?a:function(b,c){return Sa(this,b,"includes").indexOf(b,c||0)!==-1}}); ea("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(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}}); ea("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b}); ea("Array.prototype.find",function(a){return a?a:function(b,c){return Qa(this,b,c).v}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Sa(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push([d,b[d]]);return c}}); var Ta=typeof Object.assign=="function"?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Pa(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Ta});ea("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}}); ea("Array.prototype.entries",function(a){return a?a:function(){return Ra(this,function(b,c){return[b,c]})}});ea("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Sa(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}});ea("Number.EPSILON",function(){return 2.220446049250313E-16}); ea("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});ea("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}}); ea("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Sa(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}});ea("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}});var Ua=this||self; function S(a,b){a=a.split(".");var c=Ua;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 Va(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Va.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Wa(a){return a.h/(1-Math.pow(a.g,a.i))};function Xa(){this.h=new Va(2);this.j=new Va(5);this.g=0;this.i=128E3;this.l=16E3}Xa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Xa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Xa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Wa(this.h),Wa(this.j))};function Ya(){}function Za(){}function $a(){}function ab(a){var b=Oa.apply(1,arguments);bb.has(a)||(bb.add(a),$a.apply(Ya,x(b)))}function cb(){}function db(){}function eb(){}var bb=new Set; window.console&&((new Map).set(1,function(){return console.error.apply(console,x(Oa.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,x(Oa.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,x(Oa.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,x(Oa.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,x(Oa.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,x(Oa.apply(0,arguments)))}), $a=function(){return console.warn.apply(console,x(Oa.apply(0,arguments)))},Za=function(){console.error.apply(console,x(Oa.apply(0,arguments)))});function fb(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function gb(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function hb(a,b,c){c||(c=fb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={oi:void 0},d=a.next()){e.oi=d.value;d=b.findIndex(function(f){return function(g){return c(f.oi,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0} function ib(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=fb);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 jb(){this.g=new Map}p=jb.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 kb(){this.g=new jb}p=kb.prototype;p.release=function(){this.Qa();this.g=null};p.D=function(a,b,c,d){this.g&&(a=new lb(a,b,c,d),this.g.push(b,a))};p.za=function(a,b,c,d){function e(g){f.Ma(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};p.Ma=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ma(),this.g.remove(b,e))}}; p.Qa=function(){if(this.g){for(var a=[],b=t(this.g.g.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value));a=t(a);for(b=a.next();!b.done;b=a.next())b.value.Ma();this.g.g.clear()}};S("shaka.util.EventManager",kb);kb.prototype.removeAll=kb.prototype.Qa;kb.prototype.unlisten=kb.prototype.Ma;kb.prototype.listenOnce=kb.prototype.za;kb.prototype.listen=kb.prototype.D;kb.prototype.release=kb.prototype.release; function lb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=mb(a,d);this.target.addEventListener(b,c,this.g)}lb.prototype.Ma=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function mb(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 nb(a)?b:b.capture||!1} function nb(a){var b=ob;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}ob=b}return b||!1}var ob=void 0;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function qb(a){this.h=a;this.g=void 0}qb.prototype.value=function(){this.g===void 0&&(this.g=this.h());return this.g};/* @license Shaka Player Copyright 2025 Google LLC SPDX-License-Identifier: Apache-2.0 */ function rb(){return sb.value()}var tb=null,vb=null,sb=new qb(function(){var a=void 0;tb&&(a=tb());!a&&vb&&(a=vb());return a});function wb(a,b){this.g=a;this.h=b}wb.prototype.toString=function(){return"v"+this.g+"."+this.h};function xb(a,b){var c=new wb(5,0),d=yb,e=d.g,f=c.h-e.h;((c.g-e.g||f)>0?d.i:d.h)(d.g,c,a,b)}function zb(a,b,c,d){$a([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ab(a,b,c,d){Za([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var yb=null;/* @license Copyright 2008 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ var Bb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/* @license Copyright 2006 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ function Cb(a){var b;a instanceof Cb?(Db(this,a.ec),this.hd=a.hd,Eb(this,a.Eb),Fb(this,a.Cd),this.Tb=a.Tb,Gb(this,a.g.clone()),this.Rc=a.Rc):a&&(b=String(a).match(Bb))?(Db(this,b[1]||"",!0),this.hd=Hb(b[2]||""),Eb(this,b[3]||"",!0),Fb(this,b[4]),this.Tb=Hb(b[5]||"",!0),Gb(this,b[6]||"",!0),this.Rc=Hb(b[7]||"")):this.g=new Ib(null)}p=Cb.prototype;p.ec="";p.hd="";p.Eb="";p.Cd=null;p.Tb="";p.Rc=""; p.toString=function(){var a=[],b=this.ec;b&&a.push(Jb(b,Kb,!0),":");if(b=this.Eb){a.push("//");var c=this.hd;c&&a.push(Jb(c,Kb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Cd;b!=null&&a.push(":",String(b))}if(b=this.Tb)this.Eb&&b.charAt(0)!="/"&&a.push("/"),a.push(Jb(b,b.charAt(0)=="/"?Lb:Mb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Rc)&&a.push("#",Jb(b,Nb));return a.join("")}; p.resolve=function(a){var b=this.clone();b.ec==="data"&&(b=new Cb);var c=!!a.ec;c?Db(b,a.ec):c=!!a.hd;c?b.hd=a.hd:c=!!a.Eb;c?Eb(b,a.Eb):c=a.Cd!=null;var d=a.Tb;if(c)Fb(b,a.Cd);else if(c=!!a.Tb){if(d.charAt(0)!="/")if(this.Eb&&!this.Tb)d="/"+d;else{var e=b.Tb.lastIndexOf("/");e!=-1&&(d=b.Tb.substr(0,e+1)+d)}if(d==".."||d==".")d="";else if(d.indexOf("./")!=-1||d.indexOf("/.")!=-1){e=d.lastIndexOf("/",0)==0;d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];h=="."?e&&g==d.length&&f.push(""):h== ".."?((f.length>1||f.length==1&&f[0]!="")&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Tb=d:c=a.g.toString()!=="";c?Gb(b,a.g.clone()):c=!!a.Rc;c&&(b.Rc=a.Rc);return b};p.clone=function(){return new Cb(this)};function Db(a,b,c){a.ec=c?Hb(b,!0):b;a.ec&&(a.ec=a.ec.replace(/:$/,""))}function Eb(a,b,c){a.Eb=c?Hb(b,!0):b}function Fb(a,b){if(b){b=Number(b);if(isNaN(b)||b<0)throw Error("Bad port number "+b);a.Cd=b}else a.Cd=null} function Gb(a,b,c){b instanceof Ib?a.g=b:(c||(b=Jb(b,Ob)),a.g=new Ib(b))}function Hb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Jb(a,b,c){return a!=null?(a=encodeURI(a).replace(b,Pb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Pb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Kb=/[#\/\?@]/g,Mb=/[#\?:]/g,Lb=/[#\?]/g,Ob=/[#\?@]/g,Nb=/#/g;function Ib(a){this.g=a||null} function Qb(a){if(!a.fb&&(a.fb=new Map,a.Sd=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=Ib.prototype;p.fb=null;p.Sd=null;function Rb(a){Qb(a);return a.Sd}p.add=function(a,b){Qb(this);this.g=null;var c=this.fb.has(a)?this.fb.get(a):null;c||this.fb.set(a,c=[]);c.push(b);this.Sd++;return this}; p.set=function(a,b){Qb(this);this.g=null;this.fb.has(a)?this.fb.set(a,[b]):this.add(a,b);return this};p.get=function(a){Qb(this);return this.fb.get(a)||[]};p.toString=function(){if(this.g)return this.g;if(!this.fb||!this.fb.size)return"";for(var a=[],b=t(this.fb.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.fb.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 Ib;a.g=this.g;if(this.fb){for(var b=new Map,c=t(this.fb),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;b.set(d,e.concat())}a.fb=b;a.Sd=this.Sd}return a};function Sb(){}function Tb(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=Ub(a);b=Ub(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Vb(a){return ArrayBuffer.isView(a)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a} function Ub(a,b,c){c=c===void 0?Infinity:c;return Xb(a,b===void 0?0:b,c,Uint8Array)}function Zb(a,b,c){c=c===void 0?Infinity:c;return Xb(a,b===void 0?0:b,c,Uint16Array)}function $b(a,b,c){c=c===void 0?Infinity:c;return Xb(a,b===void 0?0:b,c,DataView)} function Xb(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}S("shaka.util.BufferUtils",Sb);Sb.toDataView=$b;Sb.toUint16=Zb;Sb.toUint8=Ub;Sb.toArrayBuffer=Vb;Sb.equal=Tb;function U(a,b,c){var d=Oa.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(ac)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}U.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};S("shaka.util.Error",U);var ac=!0;U.Severity={RECOVERABLE:1,CRITICAL:2};U.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10}; U.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011, CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,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 bc(){} function cc(a){if(!a)return"";a=Ub(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(window.TextDecoder&&!rb().sh())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Za('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;(a[c]&128)==0?d=a[c]:a.length>=c+2&&(a[c]&224)==192&&(a[c+1]&192)==128?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&(a[c]&240)==224&&(a[c+1]&192)==128&& (a[c+2]&192)==128?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&(a[c]&241)==240&&(a[c+1]&192)==128&&(a[c+2]&192)==128&&(a[c+3]&192)==128&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(d<=65535)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b} function dc(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=$b(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return ec(d)} function fc(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=Ub(a);if(c[0]==239&&c[1]==187&&c[2]==191)return cc(c);if(c[0]==254&&c[1]==255)return dc(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return dc(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return dc(a,!1);if(c[1]==0&&c[3]==0)return dc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return cc(a);throw new U(2,2,2003);} function hc(a){if(window.TextEncoder&&!rb().sh()){var b=new TextEncoder;return Vb(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 Vb(b)}function ic(a,b){for(var c=new ArrayBuffer(a.length*2),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(e*2,a.charCodeAt(e),b);return c}function ec(a){return jc.value()(a)} function kc(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return e[1]=="#"?(e=e[2]=="x"||e[2]=="X"?parseInt(e.substring(3),16):parseInt(e.substring(2),10),e>=0&&e<=1114111?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",bc);bc.resetFromCharCode=function(){jc.g=void 0}; bc.toUTF16=ic;bc.toUTF8=hc;bc.fromBytesAutoDetect=fc;bc.fromUTF16=dc;bc.fromUTF8=cc;var jc=new qb(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={Pc:65536};b.Pc>0;b={Pc:b.Pc},b.Pc/=2)if(a(b.Pc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Pc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Pc));return e}}(b);return null});function lc(){}function mc(a){a=ec(Ub(a));return btoa(a)}function nc(a,b){b=b==void 0?!0:b;a=mc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function oc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function pc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(d*2,2),16);return c} function qc(a){var b=Ub(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),c.length==1&&(c="0"+c),a+=c;return a}function tc(){for(var a=Oa.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1?b.set(e,c):b.set(Ub(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",lc);lc.concat=tc;lc.toHex=qc;lc.fromHex=pc;lc.fromBase64=oc;lc.toBase64=nc; lc.toStandardBase64=mc;function uc(a,b,c){c=c===void 0?"":c;if(b.length==0)return a;if(a.length==1&&b.length==1){var d=new Cb(a[0]);b=new Cb(b[0]);b=d.resolve(b);c&&Gb(b,c);return[b.toString()]}b=b.map(function(h){return new Cb(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new Cb(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&Gb(g,c),d.push(g.toString())}return d} function vc(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a} function wc(a,b){b=b===void 0?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;k.length!=22&&(k=nc(pc(h),!1));var l=g;l.length!=22&&(l=nc(pc(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:Ub(hc(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1, audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function xc(a,b){if(b.length==1)return b[0];a=yc(a,b);if(a!=null)return a;throw new U(2,4,4025,b);}function yc(a,b){var c=zc.get(a);c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Ac?"":null} function Bc(a,b){var c=[];a=zc.get(a);a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c} var Ac="text",Cc={Aa:"video",ka:"audio",Na:Ac,Uf:"image",ll:"application"},Dc=1/15,zc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Ec(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"&&$a("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,xb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{$a("Could not find LCEVC Library on this page");a=!1;break a}typeof this.h.SupportObject==="undefined"?($a("Could not find LCEVC Library on this page"), a=!1):(this.h.SupportObject.SupportStatus||$a(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 Fc(a,b,c,d){d.type!=="video"||a.o&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.o)}function Gc(a){a.g&&a.i.classList.add("shaka-hidden")}Ec.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Hc(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}S("shaka.lcevc.Dec",Ec);Ec.prototype.release=Ec.prototype.release;function Ic(){}function Jc(a,b){Kc.set(a,b)}function Lc(){var a={};rb();if(Mc())for(var b=t(Kc.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=Mc()?Kc.has(c):Nc().canPlayType(c)!="";return a}function Oc(a,b){if(b){var c=Kc.get(b.toLowerCase());if(c)return c}throw new U(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Ic); Ic.unregisterParserByMime=function(a){Kc.delete(a)};Ic.registerParserByMime=Jc;Ic.registerParserByExtension=function(){xb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Ic.AccessibilityPurpose={ym:"visually impaired",Jl:"hard of hearing",fm:"spoken subtitles"};var Kc=new Map;function Pc(){}Pc.prototype.extract=function(){};Pc.prototype.decode=function(){return[]};Pc.prototype.clear=function(){};Pc.prototype.getStreams=function(){return[]};function Qc(){}Qc.prototype.init=function(){};Qc.prototype.parse=function(){return[]};function Rc(){}p=Rc.prototype;p.init=function(){};p.xf=function(){};p.Nd=function(){};p.remove=function(){};p.Vf=function(){};S("shaka.media.IClosedCaptionParser",Rc);function Sc(a){this.h=new Map;this.i=0;this.j=new Qc;if(a=Tc(a.toLowerCase()))this.j=a();this.g=new Pc;if(a=Uc)this.g=a(),this.h.set(this.i,this.g)}p=Sc.prototype; p.init=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?-1:c;if(c!=-1&&this.i!=c){b=c;var d=this.h.get(b);this.h.set(this.i,this.g);if(d)this.g=d;else{if(d=Uc)this.g=d();this.h.set(b,this.g)}}else b||this.Nd();this.j.init(a);c!=-1&&(this.i=c)};p.xf=function(a){a=this.j.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Ub(b.packet);c.length>0&&this.g.extract(c,b.pts)}return this.g.decode()};p.Nd=function(){this.g.clear()}; p.remove=function(a){a=a===void 0?[]:a;a=new Set(a);for(var b=t(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=c.value,!a.has(c)){var d=this.h.get(c);d&&d.clear();this.h.delete(c)}};p.Vf=function(){return this.g.getStreams()};function Vc(a,b){Xc.set(a,b)}function Tc(a){return Xc.get(a)}S("shaka.media.ClosedCaptionParser",Sc);Sc.findDecoder=function(){return Uc};Sc.unregisterDecoder=function(){Uc=null};Sc.registerDecoder=function(a){Uc=a};Sc.findParser=Tc;Sc.unregisterParser=function(a){Xc.delete(a)}; Sc.registerParser=Vc;var Xc=new Map,Uc=null;function Yc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Zc;this.scroll=$c}S("shaka.text.CueRegion",Yc);var Zc=1;Yc.units={PX:0,PERCENTAGE:Zc,LINES:2};var $c="";Yc.scrollMode={NONE:$c,UP:"up"};function ad(a){this.h=a||"";this.g=0}function bd(a){cd(a,/[ \t]+/gm)}function cd(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 ed(a){return a.g==a.h.length?null:(a=cd(a,/[^ \t\n]*/gm))?a[0]:null} function fd(a){a=cd(a,gd);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}function hd(a){return a?fd(new ad(a)):null}var gd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function id(){}function jd(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 kd(a){var b={},c;for(c in a)b[c]=a[c];return b} function ld(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=ld(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if(typeof a=="function")a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=t(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],e!==void 0&&(e=ld(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}S("shaka.util.ObjectUtils",id);id.alphabeticalKeyOrderStringify=ld; id.shallowCloneObject=kd;id.cloneObject=jd;/* @license tXml Copyright 2015 Tobias Nickel SPDX-License-Identifier: MIT */ function nd(a,b){var c=c===void 0?!1:c;a=fc(a);return pd(a,b,c)}function pd(a,b,c){a=qd(a,c===void 0?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function rd(a){return sd.has(a)?sd.get(a):""} function qd(a,b){function c(f,g){g=g===void 0?!1:g;for(var h=[];a[e];)if(a.charCodeAt(e)==60){if(a.charCodeAt(e+1)===47){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(k==-1){var l=f.indexOf(".");l>0&&(k=g.indexOf(f.substring(0,l)))}if(k==-1)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(a.charCodeAt(e+1)===33){if(a.charCodeAt(e+2)==45){for(;e!==-1&&(a.charCodeAt(e)!== 62||a.charCodeAt(e-1)!=45||a.charCodeAt(e-2)!=45||e==-1);)e=a.indexOf(">",e+1);e===-1&&(e=a.length)}else if(a.charCodeAt(e+2)===91&&a.charCodeAt(e+8)===91&&a.substr(e+3,5).toLowerCase()==="cdata"){k=a.indexOf("]]\x3e",e);k==-1?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];a.charCodeAt(e)!==62&&a[e];){var q=a.charCodeAt(e);if(q>64&&q<91||q>96&&q<123){q=d();for(var r=a.charCodeAt(e);r&&r!==39&&r!==34&&!(r>64&&r<91||r>96&& r<123)&&r!==62;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(r===39||r===34){if(e===-1){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)typeof k[m]!=="string"&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(q.startsWith("xmlns:")){r=u;var v=q.split(":")[1];sd.set(r,v);td.set(v,r)}m==="tt"&&q==="xml:space"&&u==="preserve"&&(l=!0);n[q]=u}e++}a.charCodeAt(e-1)!==47?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length; for(n=0;n<m;n++)q=k[n],typeof q!=="string"?b&&(q.parent=l):n==m-1&&q=="\n"&&k.pop();k=l}h.push(k);if(typeof k==="string")break;k.tagName[0]==="?"&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,e===-2&&(e=a.length),k=a.slice(k,e+1),g?k.length>0&&h.push(k):h.length&&k.length==1&&k[0]=="\n"?h.push(k):k.trim().length>0&&h.push(k),e++;return h}function d(){for(var f=e;"\r\n\t>/= ".indexOf(a[e])===-1&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")} function ud(a){return typeof a==="string"}function vd(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c!=="string"&&b.push(c);return b}function wd(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function xd(a){if(typeof a==="string")return kc(a);a=a.children.reduce(function(b,c){return typeof c==="string"?b+c:b},"");return a===""?null:kc(a)} function yd(a){if(!Array.from(a.children).every(function(b){return typeof b==="string"}))return null;(a=xd(a))&&(a=a.trim());return a}function zd(a,b,c){c=c===void 0?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())zd(d.value,b,c)}return c}function Ad(a,b){a=wd(a,b);return a.length!=1?null:a[0]}function Bd(a,b,c){a=Cd(a,b,c);return a.length!=1?null:a[0]} function Dd(a,b,c,d){d=d===void 0?null:d;var e=null;a=a.attributes[b];a!=null&&(e=c(a));return e==null?d:e}function Ed(a,b,c){b=rd(b);return a.attributes[b+":"+c]||null}function Cd(a,b,c){var d=rd(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=t(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function Fd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=Ed(a,d.value,c))return d;return null} function Gd(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function Hd(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null} function Id(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Jd(a){a=Number(a);return a%1===0?a:null}function Kd(a){a=Number(a);return a%1===0&&a>0?a:null}function Ld(a){a=Number(a);return a%1===0&&a>=0?a:null}function Md(a){a=Number(a);return isNaN(a)?null:a}function Nd(a){return a?a.toLowerCase()==="true":!1} function Od(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c} function Pd(a){var b=[];a=kc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Dc:c.split("/@")[1]|| null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Dc=c.slice(1))}return b} function Rd(a,b){var c=Pd(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;c==null&&(d.t!==null&&(c=Sd(a,"t",d.t)),d.n!==null&&(c=Sd(a,"n",d.n)));c===null?c=e==="prepend"?0:a.length:e==="prepend"?--c:e==="after"&&++c;e=b.tagName;(d=d.Dc)&&a[c]?Td(a[c],e,d,yd(b)||""):(e!=="remove"&&e!=="replace"||a.splice(c,1),e!=="add"&&e!=="replace"||a.splice.apply(a,[c,0].concat(x(b.children))))}} function Sd(a,b,c){